mirror of https://github.com/teverse/teverse
Compare commits
No commits in common. "74fd6919971ddf545b8191fbcdc830723bef8c5d" and "a4dc190998dd55fece58622bfd2fc1817e6198fa" have entirely different histories.
74fd691997
...
a4dc190998
|
@ -1 +0,0 @@
|
||||||
print("Hello Client!")
|
|
|
@ -1,393 +0,0 @@
|
||||||
{
|
|
||||||
"className": "engine",
|
|
||||||
"version": "Debug 0.10.0",
|
|
||||||
"gameCloudId": "",
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"name": "sounds",
|
|
||||||
"className": "sounds"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ambientColour": [
|
|
||||||
0.92156863212585,
|
|
||||||
0.92156863212585,
|
|
||||||
0.92156863212585
|
|
||||||
],
|
|
||||||
"className": "graphics",
|
|
||||||
"name": "graphics",
|
|
||||||
"clearColour": [
|
|
||||||
0.21960784494877,
|
|
||||||
0.21960784494877,
|
|
||||||
0.258823543787
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"fov": 80,
|
|
||||||
"position": [
|
|
||||||
11,
|
|
||||||
5,
|
|
||||||
10
|
|
||||||
],
|
|
||||||
"className": "camera",
|
|
||||||
"name": "camera",
|
|
||||||
"rotation": [
|
|
||||||
-0.065341390669346,
|
|
||||||
0.90250700712204,
|
|
||||||
-0.1477076113224,
|
|
||||||
-0.39924192428589
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rotation": [
|
|
||||||
0.54463905096054,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0.83867055177689
|
|
||||||
],
|
|
||||||
"position": [
|
|
||||||
3,
|
|
||||||
2,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"power": 1,
|
|
||||||
"specularColour": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"shadowNearClip": 0.2,
|
|
||||||
"radius": 11,
|
|
||||||
"shadowFarClip": 1000,
|
|
||||||
"lumThreshold": 0.01,
|
|
||||||
"className": "light",
|
|
||||||
"type": 0,
|
|
||||||
"shadows": false,
|
|
||||||
"falloff": 1,
|
|
||||||
"diffuseColour": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name": "mainLight",
|
|
||||||
"shadowFarDistance": 500
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"velocity": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"rotation": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"emissiveColour": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"linearFactor": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"friction": 0.5,
|
|
||||||
"mesh": "primitive:cube",
|
|
||||||
"restitution": 0,
|
|
||||||
"spinningFriction": 0,
|
|
||||||
"workshopLocked": true,
|
|
||||||
"colour": [
|
|
||||||
0.60000002384186,
|
|
||||||
0.60000002384186,
|
|
||||||
0.60000002384186
|
|
||||||
],
|
|
||||||
"name": "basePlate",
|
|
||||||
"roughness": 0,
|
|
||||||
"size": [
|
|
||||||
100,
|
|
||||||
1,
|
|
||||||
100
|
|
||||||
],
|
|
||||||
"position": [
|
|
||||||
0,
|
|
||||||
-1,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"renderQueue": 0,
|
|
||||||
"physics": true,
|
|
||||||
"angularFactor": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"metalness": 0,
|
|
||||||
"static": true,
|
|
||||||
"rollingFriction": 0,
|
|
||||||
"className": "block",
|
|
||||||
"linearDamping": 0,
|
|
||||||
"castsShadows": false,
|
|
||||||
"angularDamping": 0,
|
|
||||||
"wireframe": false,
|
|
||||||
"angularVelocity": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"opacity": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"velocity": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"rotation": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"emissiveColour": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"linearFactor": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"friction": 0.5,
|
|
||||||
"mesh": "primitive:cube",
|
|
||||||
"restitution": 0,
|
|
||||||
"spinningFriction": 0,
|
|
||||||
"workshopLocked": false,
|
|
||||||
"colour": [
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"name": "redBlock",
|
|
||||||
"roughness": 0,
|
|
||||||
"size": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"position": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"renderQueue": 0,
|
|
||||||
"physics": true,
|
|
||||||
"angularFactor": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"metalness": 0,
|
|
||||||
"static": true,
|
|
||||||
"rollingFriction": 0,
|
|
||||||
"className": "block",
|
|
||||||
"linearDamping": 0,
|
|
||||||
"castsShadows": false,
|
|
||||||
"angularDamping": 0,
|
|
||||||
"wireframe": false,
|
|
||||||
"angularVelocity": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"opacity": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"velocity": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"rotation": [
|
|
||||||
0,
|
|
||||||
0.70710676908493,
|
|
||||||
0,
|
|
||||||
0.70710676908493
|
|
||||||
],
|
|
||||||
"emissiveColour": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"linearFactor": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"friction": 0.5,
|
|
||||||
"mesh": "primitive:wedge",
|
|
||||||
"restitution": 0,
|
|
||||||
"spinningFriction": 0,
|
|
||||||
"workshopLocked": false,
|
|
||||||
"colour": [
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"name": "greenBlock",
|
|
||||||
"roughness": 0,
|
|
||||||
"size": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"position": [
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"renderQueue": 0,
|
|
||||||
"physics": true,
|
|
||||||
"angularFactor": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"metalness": 0,
|
|
||||||
"static": true,
|
|
||||||
"rollingFriction": 0,
|
|
||||||
"className": "block",
|
|
||||||
"linearDamping": 0,
|
|
||||||
"castsShadows": false,
|
|
||||||
"angularDamping": 0,
|
|
||||||
"wireframe": false,
|
|
||||||
"angularVelocity": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"opacity": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"velocity": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"rotation": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"emissiveColour": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"linearFactor": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"friction": 0.5,
|
|
||||||
"mesh": "primitive:sphere",
|
|
||||||
"restitution": 0,
|
|
||||||
"spinningFriction": 0,
|
|
||||||
"workshopLocked": false,
|
|
||||||
"colour": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"name": "blueBlock",
|
|
||||||
"roughness": 0,
|
|
||||||
"size": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"position": [
|
|
||||||
0.5,
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"renderQueue": 0,
|
|
||||||
"physics": true,
|
|
||||||
"angularFactor": [
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1
|
|
||||||
],
|
|
||||||
"metalness": 0,
|
|
||||||
"static": true,
|
|
||||||
"rollingFriction": 0,
|
|
||||||
"className": "block",
|
|
||||||
"linearDamping": 0,
|
|
||||||
"castsShadows": false,
|
|
||||||
"angularDamping": 0,
|
|
||||||
"wireframe": false,
|
|
||||||
"angularVelocity": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"opacity": 1
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"className": "workspace",
|
|
||||||
"name": "workspace"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"autoRun": true,
|
|
||||||
"className": "script",
|
|
||||||
"source": "require('tevgit:demos/multiplayer/client.lua')",
|
|
||||||
"name": "clientLoader"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "client",
|
|
||||||
"className": "luaClientFolder"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"autoRun": true,
|
|
||||||
"className": "script",
|
|
||||||
"source": "require('tevgit:demos/multiplayer/server.lua')",
|
|
||||||
"name": "serverLoader"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"className": "luaServerFolder",
|
|
||||||
"name": "server"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "shared",
|
|
||||||
"className": "luaSharedFolder"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"disableDefaultLoaders": true,
|
|
||||||
"className": "luaFolder",
|
|
||||||
"name": "lua"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"className": "assetsFolder",
|
|
||||||
"name": "assets"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "interface",
|
|
||||||
"className": "interface"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"savedBy": "Jay",
|
|
||||||
"name": "teverse",
|
|
||||||
"signature": "unsigned"
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
print("Hello Server!")
|
|
|
@ -8,7 +8,6 @@ local boundingBox = engine.construct("block", workspace, {
|
||||||
static = true,
|
static = true,
|
||||||
physics = false,
|
physics = false,
|
||||||
workshopLocked = true,
|
workshopLocked = true,
|
||||||
doNotSerialise = true,
|
|
||||||
position = vector3(0, -100, 0)
|
position = vector3(0, -100, 0)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -9,12 +9,13 @@ local ui = require("tevgit:workshop/controllers/ui/core/ui.lua")
|
||||||
-- use a table of two icons,
|
-- use a table of two icons,
|
||||||
-- [1] will be unexpanded and [2] will be used when the obj is expanded.
|
-- [1] will be unexpanded and [2] will be used when the obj is expanded.
|
||||||
local overridingIcons = {
|
local overridingIcons = {
|
||||||
script = "fa:s-file-code",
|
scriptSource = "fa:s-file-code",
|
||||||
|
scriptContainer = "fa:s-microchip",
|
||||||
input = {"fa:s-keyboard", "fa:r-keyboard"},
|
input = {"fa:s-keyboard", "fa:r-keyboard"},
|
||||||
debug = "fa:s-bug",
|
debug = "fa:s-bug",
|
||||||
light = "fa:s-lightbulb",
|
light = "fa:s-lightbulb",
|
||||||
block = "fa:s-cube",
|
block = "fa:s-cube",
|
||||||
camera = "fa:s-camera",
|
camera = "fa:s-camera"
|
||||||
}
|
}
|
||||||
|
|
||||||
-- dictionary of buttons to their corrosponding objects.
|
-- dictionary of buttons to their corrosponding objects.
|
||||||
|
@ -67,7 +68,7 @@ local function updatePositions(frame)
|
||||||
else
|
else
|
||||||
-- object has no children
|
-- object has no children
|
||||||
frame.icon.texture = regularIconWithOutChildren
|
frame.icon.texture = regularIconWithOutChildren
|
||||||
frame.icon.imageAlpha = 0.5
|
frame.icon.imageAlpha = .2
|
||||||
frame.textAlpha = .6
|
frame.textAlpha = .6
|
||||||
frame.fontFile = "local:OpenSans-Regular.ttf"
|
frame.fontFile = "local:OpenSans-Regular.ttf"
|
||||||
end
|
end
|
||||||
|
@ -75,7 +76,7 @@ local function updatePositions(frame)
|
||||||
-- object is expanded
|
-- object is expanded
|
||||||
frame.textAlpha = 0.6
|
frame.textAlpha = 0.6
|
||||||
frame.fontFile = "local:OpenSans-Regular.ttf"
|
frame.fontFile = "local:OpenSans-Regular.ttf"
|
||||||
frame.icon.imageAlpha = 0.75
|
frame.icon.imageAlpha = 0.4
|
||||||
frame.icon.texture = expandedIcon
|
frame.icon.texture = expandedIcon
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -187,9 +188,8 @@ local function createHierarchyButton(object, guiParent)
|
||||||
|
|
||||||
btn:once("destroying", function() childAddedEvent:disconnect() end)
|
btn:once("destroying", function() childAddedEvent:disconnect() end)
|
||||||
|
|
||||||
if object:isA("luaSharedFolder")
|
if object:isA("luaSharedFolder") or object:isA("luaServerFolder") or
|
||||||
or object:isA("luaServerFolder")
|
object:isA("luaClientFolder") then
|
||||||
or object:isA("luaClientFolder") then
|
|
||||||
context.bind(btn, {
|
context.bind(btn, {
|
||||||
{name = "Add Script", callback = function() engine.construct("script", object) end}
|
{name = "Add Script", callback = function() engine.construct("script", object) end}
|
||||||
})
|
})
|
||||||
|
@ -200,10 +200,10 @@ local function createHierarchyButton(object, guiParent)
|
||||||
end
|
end
|
||||||
|
|
||||||
controller.window = ui.window(shared.workshop.interface, "Hierarchy",
|
controller.window = ui.window(shared.workshop.interface, "Hierarchy",
|
||||||
guiCoord(0, 260, 0, 400), -- size
|
guiCoord(0, 260, 0, 400), -- size
|
||||||
guiCoord(1, -260, 0.75, -25), -- pos
|
guiCoord(1, -260, 0.75, -25), -- pos
|
||||||
true, -- dockable
|
true, -- dockable
|
||||||
true -- hidable
|
true -- hidable
|
||||||
)
|
)
|
||||||
controller.window.visible = true
|
controller.window.visible = true
|
||||||
|
|
||||||
|
|
|
@ -189,6 +189,26 @@ createInputs = {
|
||||||
return container
|
return container
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
scriptSource = function(instance, property, value)
|
||||||
|
local container = createInputs.default(value, pType, readOnly)
|
||||||
|
local presetSelect = ui.create("guiTextBox", container, {
|
||||||
|
size = guiCoord(1, -4, 0, 16),
|
||||||
|
position = guiCoord(0, 2, 0, 2),
|
||||||
|
borderRadius = 3,
|
||||||
|
text = "Edit Source",
|
||||||
|
fontSize = 16,
|
||||||
|
align = enums.align.middle,
|
||||||
|
backgroundAlpha = 0.75
|
||||||
|
}, "primary")
|
||||||
|
presetSelect:mouseLeftReleased(function ()
|
||||||
|
if instance[property] then
|
||||||
|
instance[property]:editExternal()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
return container
|
||||||
|
end,
|
||||||
|
|
||||||
string = function(instance, property, value)
|
string = function(instance, property, value)
|
||||||
local container = createInputs.default(value, pType, readOnly)
|
local container = createInputs.default(value, pType, readOnly)
|
||||||
|
|
||||||
|
@ -196,15 +216,13 @@ createInputs = {
|
||||||
backgroundAlpha = 0.25,
|
backgroundAlpha = 0.25,
|
||||||
readOnly = false,
|
readOnly = false,
|
||||||
multiline = false,
|
multiline = false,
|
||||||
wrapped = true,
|
|
||||||
fontSize = 18,
|
fontSize = 18,
|
||||||
name = "input",
|
name = "input",
|
||||||
size = guiCoord(1, -4, 0, 18),
|
size = guiCoord(1, -4, 0, 18),
|
||||||
position = guiCoord(0, 2, 0, 1),
|
position = guiCoord(0, 2, 0, 1),
|
||||||
text = "text input",
|
text = "text input",
|
||||||
align = enums.align.middleLeft,
|
align = enums.align.middleLeft,
|
||||||
zIndex = 2,
|
zIndex = 2
|
||||||
cropChildren = true
|
|
||||||
}, "primary")
|
}, "primary")
|
||||||
|
|
||||||
x:textInput(function ()
|
x:textInput(function ()
|
||||||
|
|
|
@ -37,8 +37,7 @@ local function alphabeticalSorter(a, b) return a.property < b.property end
|
||||||
|
|
||||||
local excludePropertyList = {
|
local excludePropertyList = {
|
||||||
physics = true, -- letting user changes this will break raycasts
|
physics = true, -- letting user changes this will break raycasts
|
||||||
doNotSerialise = true,
|
doNotSerialise = true
|
||||||
source = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function controller.generateProperties()
|
function controller.generateProperties()
|
||||||
|
|
Loading…
Reference in New Issue