Compare commits

...

22 Commits

Author SHA1 Message Date
Jay cf3929e790 02013 Api Dump 2020-05-10 22:09:10 +01:00
Sanjay 8ee1e633e2
Merge pull request #75 from Sanjay-B/master
Remove legacy files / cleanup
2020-05-10 15:32:19 -04:00
Sanjay Bhadra dc2577fb8b Correct vsc merge error 2020-05-10 15:31:22 -04:00
Sanjay Bhadra 547fa8d97b Remove legacy files / directories 2020-05-10 15:26:05 -04:00
Sanjay Bhadra 59e8f168ff Merge remote-tracking branch 'upstream/master' 2020-05-10 15:25:36 -04:00
Sanjay a09916531e
Remove apiDump.json
Replaced by api.json.
2020-05-10 15:23:50 -04:00
Sanjay Bhadra 5a829404fc Merge remote-tracking branch 'upstream/master' 2020-05-08 18:45:28 -04:00
Sanjay Bhadra ac8feee10f Merge remote-tracking branch 'upstream/master' 2020-05-08 13:55:57 -04:00
Sanjay Bhadra 3e3db80ebb Merge remote-tracking branch 'upstream/master' 2020-05-06 01:38:11 -04:00
Sanjay Bhadra 77038455d1 Merge remote-tracking branch 'upstream/master' 2020-05-04 00:52:57 -04:00
Sanjay Bhadra 51676c685b Merge remote-tracking branch 'upstream/master' 2020-05-02 20:17:17 -04:00
Sanjay Bhadra 243e654a3f Merge branch 'Sanjay-B-feature-dashboard-wall-users' 2020-05-02 20:14:27 -04:00
Sanjay Bhadra 0c0322b855 Feed user modal 2020-05-02 18:48:44 -04:00
Sanjay Bhadra da410f9eef Balance Branch 2020-05-02 18:48:28 -04:00
Sanjay Bhadra c4f3c75900 Balance branch 2020-04-25 00:37:32 -04:00
Sanjay Bhadra e042e4b71b Fix posting bug 2020-04-25 00:28:26 -04:00
Sanjay Bhadra 7b49c94906 Remove unneeded HTTP GET call, restructured newFeedItem() 2020-04-24 23:48:17 -04:00
Sanjay Bhadra 1cf50c3fc2 Merge branch 'feature-dashboard-wall' of https://github.com/Sanjay-B/teverse into feature-dashboard-wall 2020-04-24 21:43:00 -04:00
Sanjay Bhadra 02a0068bd5 Merge branch 'master' into feature-dashboard-wall 2020-04-24 21:42:34 -04:00
teverse 519fa3ee76
Merge branch 'master' into feature-dashboard-wall 2020-04-24 09:13:11 +01:00
Sanjay Bhadra 4d7d284a02 Implement flair system + wall feed flair 2020-04-23 18:43:10 -04:00
Sanjay Bhadra 7ffb2dfe47 Refactored Workshop to TevX Format 2020-04-20 15:25:54 -04:00
7 changed files with 33 additions and 2886 deletions

View File

@ -1,8 +1,8 @@
{ {
"os": "OSX", "os": "OSX",
"arch": "x64", "arch": "x64",
"version": "0.20.9", "version": "0.20.13",
"generatedAt": "08/05/2020 20:22:50", "generatedAt": "10/05/2020 22:07:37",
"sandbox": { "sandbox": {
"coroutine": { "coroutine": {
"status": "function", "status": "function",
@ -20,7 +20,7 @@
"xpcall": "function", "xpcall": "function",
"_DEVICE_PAD_BOTTOM": 0, "_DEVICE_PAD_BOTTOM": 0,
"ipairs": "function", "ipairs": "function",
"_TEV_BUILD": "0209", "_TEV_BUILD": "02013",
"colour": "cdata", "colour": "cdata",
"print": "function", "print": "function",
"_TEV_VERSION_MINOR": 20, "_TEV_VERSION_MINOR": 20,
@ -45,11 +45,11 @@
"insert": "function" "insert": "function"
}, },
"error": "function", "error": "function",
"_TEV_VERSION": "0.20.9", "_TEV_VERSION": "0.20.13",
"_DEVICE": "Mac", "_DEVICE": "Mac",
"require": "function", "require": "function",
"_VERSION": "Lua 5.1", "_VERSION": "Lua 5.1",
"_TEV_VERSION_PATCH": 9, "_TEV_VERSION_PATCH": 13,
"next": "function", "next": "function",
"math": { "math": {
"ceil": "function", "ceil": "function",
@ -407,7 +407,20 @@
}, },
"classes": { "classes": {
"input": { "input": {
"methods": [], "methods": {
"isKeyDown": {
"parameters": [
{
"type": "keyCode",
"name": "code"
}
],
"returns": [
"boolean"
],
"description": "Returns true if the provided key is down"
}
},
"className": "input", "className": "input",
"events": { "events": {
"mouseRightUp": { "mouseRightUp": {
@ -1791,23 +1804,29 @@
"properties": [] "properties": []
}, },
"dev": { "dev": {
"methods": [], "methods": {
"promptTevGit": {
"parameters": [],
"returns": [],
"description": "Prompts the user to select a directory for tevgit."
}
},
"className": "dev", "className": "dev",
"events": [], "events": [],
"constructable": false, "constructable": false,
"properties": { "properties": {
"state": {
"hasGetter": true,
"type": "string",
"description": "Mostly for internal use, represents what the user is currently doing.",
"hasSetter": true
},
"interface": { "interface": {
"hasGetter": true, "hasGetter": true,
"type": "interface", "type": "interface",
"description": "Workshop level interface, renders above the teverse.interfave singleton", "description": "Workshop level interface, renders above the teverse.interfave singleton",
"hasSetter": false "hasSetter": false
}, },
"state": {
"hasGetter": true,
"type": "string",
"description": "Mostly for internal use, represents what the user is currently doing.",
"hasSetter": true
},
"localTevGit": { "localTevGit": {
"hasGetter": true, "hasGetter": true,
"type": "boolean", "type": "boolean",
@ -1883,5 +1902,5 @@
"properties": [] "properties": []
} }
}, },
"build": "0209" "build": "02013"
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,44 +0,0 @@
--[[
create.lua
Copyright (c) 2020 teverse.com
This script is ran when the user loads create mode,
it is given workshop level sandboxing permissions.
However, scripts required from this script will not inherit workshop apis.
We overcome this by manually passing a reference to the workshop object to the required "main.lua" script.
------------------------------------------------
-- SETTING UP A LOCAL DEVELOPMENT CREATE MODE --
------------------------------------------------
1) Make sure you're looking at your local version
of this script and not the git version.
On Windows, this script can be found at "%localappdata%/teverse/create.lua"
2) Clone the Teverse Repo from Github anywhere on your PC e.g. your Desktop,
preferably away from the Teverse directory.
>> git clone https://github.com/teverse/teverse.git
3) Uncomment LINE 42 below,
making sure to include the FULL PATH to your newly cloned repo.
(!) You must include a following forward slash (!)
(!) Do not use backslashes (!)
VALID examples:
>> engine.workshop:setTevGit("C:/Users/YOURNAME/Desktop/teverse/")
>> engine.workshop:setTevGit("C:/teverse/")
>> engine.workshop:setTevGit("C:/Users/YOURNAME/Documents/teverse/")
(!) BAD examples:
(!) >> engine.workshop:setTevGit("C:/Users/YOURNAME/Desktop/teverse") -- missing slash on the end
(!) >> engine.workshop:setTevGit("C:\Users\YOURNAME\Desktop\teverse\") -- backslashes
]]
--engine.workshop:setTevGit('C:/Users/YOURNAME/Desktop/teverse/')
require("tevgit:workshop/main.lua")(engine.workshop)

View File

@ -1,282 +0,0 @@
--local module = {}
local tevEd = require("tevgit:tevEd/tevEd.lua")
tevEd.addTutorial("Introduction", "Getting Started", "tevEd/tutorials/intro.lua")
--[[
tevEd.addTutorial("Introduction", "Introducing Blocks", "tevEd/tutorials/intro.lua")
tevEd.addTutorial("Introduction", "Introducing GUIs", "tevEd/tutorials/intro.lua")
tevEd.addTutorial("3D", "Using Meshes", "tevEd/tutorials/intro.lua")
tevEd.addTutorial("3D", "Physics Forces", "tevEd/tutorials/intro.lua")
tevEd.addTutorial("3D", "Making an Interactive Scene", "tevEd/tutorials/intro.lua")
tevEd.addTutorial("Interfaces", "Fun with Frames", "tevEd/tutorials/intro.lua")
tevEd.addTutorial("Interfaces", "Introducing Images", "tevEd/tutorials/intro.lua")
--]]
local mainContainer = nil
local workshop = nil
local function runTutorial(module)
mainContainer:destroyChildren()
local tutorial = require("tevgit:"..module)
local tutorialContainer = engine.construct("guiFrame", mainContainer, {
size = guiCoord(1, 0, 1, -20),
backgroundAlpha = 0.1,
backgroundColour=colour:black(),
})
local header = engine.construct("guiFrame", mainContainer, {
size = guiCoord(1, 0, 0, 50),
backgroundAlpha = 0.1,
backgroundColour=colour:white(),
})
local title = engine.construct("guiTextBox", header, {
size = guiCoord(1,-20,1,0),
position = guiCoord(0,10,0,0),
backgroundAlpha = 0,
align = enums.align.middleLeft,
fontFile = "local:OpenSans-SemiBold.ttf",
fontSize = 24,
text = tutorial.name
})
engine.construct("guiTextBox", header, {
size = guiCoord(1,-(title.textDimensions.x + 30),1,0),
position = guiCoord(0,(title.textDimensions.x + 20),0,0),
backgroundAlpha = 0,
align = enums.align.middleLeft,
fontFile = "local:OpenSans-Regular.ttf",
fontSize = 18,
textAlpha = 0.5,
text = tutorial.description
})
local body = engine.construct("guiFrame", tutorialContainer, {
size = guiCoord(1, 0, 1, -50),
backgroundAlpha = 0,
position = guiCoord(0,0,0,50)
})
local instructions = engine.construct("guiFrame", body, {
size = guiCoord(1/4, 0, 1, 0),
backgroundColour=colour:fromRGB(37, 37, 44),
})
local code = engine.construct("guiFrame", body, {
size = guiCoord(1/2, 0, 1, 0),
position = guiCoord(1/4, 0, 0, 0),
backgroundColour= colour:fromRGB(40,42,54),
})
local codeTxt = engine.construct("guiTextBox", code, {
size = guiCoord(1, -20, 1, -14),
position = guiCoord(0, 10, 0, 7),
align = enums.align.topLeft,
fontFile = "tevurl:font/FiraCode-Regular.otf",
fontSize = 20,
backgroundAlpha = 0,
multiline = true,
readOnly = true,
wrap = true,
text = ""
})
for _,page in pairs(tutorial.tutorial) do
instructions:destroyChildren()
if type(page) == "string" then
local txt = engine.construct("guiTextBox", instructions, {
size = guiCoord(1,-10,1,-10),
position = guiCoord(0,5,0,5),
backgroundAlpha = 0,
align = enums.align.topLeft,
textWrap = true,
fontFile = "local:OpenSans-Regular.ttf",
fontSize = 20,
text = page,
textColour = colour:white(),
handleEvents = false
})
local yield = true
local btn = engine.construct("guiTextBox", instructions, {
size = guiCoord(0, 120, 0, 24),
position = guiCoord(0,5,0,txt.textDimensions.y + 15),
align = enums.align.middle,
fontFile = "local:OpenSans-Regular.ttf",
fontSize = 20,
text = "Next",
backgroundColour= colour(0.4, 0.4, 0.4),
borderRadius = 4
})
btn:once("mouseLeftReleased", function ()
yield = false
end)
repeat wait() until not yield
btn:destroy()
elseif type(page) == "table" then
local y = 5
for _,v in pairs(page) do
if type(v) == "string" then
local txt = engine.construct("guiTextBox", instructions, {
size = guiCoord(1,-10,1,-10),
position = guiCoord(0,5,0,y),
backgroundAlpha = 0,
align = enums.align.topLeft,
wrap = true,
fontFile = "local:OpenSans-Regular.ttf",
fontSize = 20,
text = v,
textColour = colour:white(),
handleEvents = false
})
y = y + txt.textDimensions.y + 15
local yield = true
local btn = engine.construct("guiTextBox", instructions, {
size = guiCoord(0, 120, 0, 22),
position = guiCoord(0,5,0,y),
align = enums.align.middle,
fontFile = "local:OpenSans-Regular.ttf",
fontSize = 20,
text = "Continue",
backgroundColour= colour(0.4, 0.4, 0.4),
borderRadius = 4
})
btn:once("mouseLeftReleased", function ()
yield = false
end)
repeat wait() until not yield
btn:destroy()
elseif type(v) == "table" then
if v.type == "script" then
codeTxt.text = v.script
local btn = engine.construct("guiTextBox", instructions, {
size = guiCoord(0, 120, 0, 22),
position = guiCoord(0,5,0,y),
align = enums.align.middle,
fontFile = "local:OpenSans-Regular.ttf",
fontSize = 20,
text = v.btnText,
backgroundColour= colour(0.4, 0.4, 0.4),
borderRadius = 4
})
btn:once("mouseLeftReleased", function ()
v.action(workshop, codeTxt.text)
btn:destroy()
end)
elseif v.type == "helpText" then
local txt = engine.construct("guiTextBox", instructions, {
size = guiCoord(1,-10,1,-10),
position = guiCoord(0,5,0,y),
backgroundAlpha = 0,
align = enums.align.topLeft,
wrap = true,
fontFile = "tevurl:font/OpenSans-Italic.ttf",
fontSize = 20,
text = v.text,
textColour = colour:white(),
handleEvents = false
})
y = y + txt.textDimensions.y + 15
end
end
end
end
end
end
local function createMainInterface()
mainContainer:destroyChildren()
local sectionYPos = 0
for section, tutorials in pairs(tevEd.tutorials) do
local sectionContainer = engine.construct("guiFrame", mainContainer, {
position = guiCoord(0, 0, 0, sectionYPos),
backgroundAlpha = 0.1,
borderRadius = 4
})
engine.construct("guiTextBox", sectionContainer, {
size = guiCoord(1,-20,0,24),
position = guiCoord(0,10,0,10),
backgroundAlpha = 0,
align = enums.align.middleLeft,
fontFile = "local:OpenSans-SemiBold.ttf",
fontSize = 24,
text = section
})
local yPos = 44
for i,tutorial in pairs(tutorials) do
local tutorialContainer = engine.construct("guiFrame", sectionContainer, {
size = guiCoord(1, -20, 0, 30),
position = guiCoord(0, 10, 0, yPos),
backgroundColour = colour:black(),
backgroundAlpha = 0.1,
hoverCursor = "fa:s-hand-pointer"
})
tutorialContainer:mouseLeftReleased(function ()
runTutorial(tutorial[2])
end)
tutorialContainer:mouseFocused(function ()
tutorialContainer.backgroundAlpha = 0.2
end)
tutorialContainer:mouseUnfocused(function ()
tutorialContainer.backgroundAlpha = 0.1
end)
engine.construct("guiTextBox", tutorialContainer, {
size = guiCoord(0, 30,0,30),
position = guiCoord(0,0,0,0),
backgroundAlpha = 0.1,
textAlpha = 0.5,
align = enums.align.middle,
fontFile = "local:OpenSans-SemiBold.ttf",
fontSize = 20,
backgroundColour= colour:black(),
text = tostring(i),
handleEvents = false,
})
engine.construct("guiTextBox", tutorialContainer, {
size = guiCoord(1,-45,0,20),
position = guiCoord(0,40,0,5),
backgroundAlpha = 0,
align = enums.align.middleLeft,
fontFile = "local:OpenSans-Regular.ttf",
fontSize = 20,
text = tutorial[1],
handleEvents = false,
})
yPos = yPos + 40
end
sectionContainer.size = guiCoord(0, 240, 0, yPos)
sectionYPos = sectionYPos + yPos + 10
end
end
return function(c, w)
mainContainer = c
workshop = w
createMainInterface()
end

View File

@ -1,13 +0,0 @@
local tevEd = {}
tevEd.tutorials = {}
tevEd.addTutorial = function( section, name, module )
if not tevEd.tutorials[section] then
tevEd.tutorials[section] = {}
end
table.insert(tevEd.tutorials[section], {name, module})
end
return tevEd

View File

@ -1,12 +0,0 @@
return {
runAndContinue = function (workshop, code)
workshop:loadString(code)
return true -- continue
end,
code = function(code, action)
return { type = "script", script = code, btnText = "Run", action = action }
end,
helpText = function(text)
return { type = "helpText", text = text }
end
}

View File

@ -1,21 +0,0 @@
local helpers = require("tevgit:tevEd/tutorials/helpers.lua")
return {
name = "Introduction",
description = "This tutorial will introduce the very basics of coding in a 3D sandbox with Lua.",
difficulty = 1,
tutorial = {
"Example Tutorial, This isnt a real tutorial!",
{"This string is shown to the user", "This message is shown on the sampe page when the user hits next."},
{
"Teverse uses Lua, lets test some sample code before getting started...",
helpers.helpText("Press run to test this code."),
-- helpers.runAndContinue is a function that processes the users
-- input when they hit run. Any function can be used however,
-- helpers.runAndContinue is a quick way to simply execute the input w/o validation.
helpers.code("print(\"Hello Teverse!\")", helpers.runAndContinue),
},
"Congratulations, check the output on the right to see your creation!"
}
}