1
0
mirror of https://github.com/teverse/teverse synced 2025-08-26 08:04:46 +02:00

Compare commits

..

No commits in common. "c49e97ab71ff0082de4057b34cd85eda9dc0193f" and "52ee9314920d2f697bbf1dafea194ad22636bccf" have entirely different histories.

3 changed files with 63 additions and 14 deletions

View File

@ -30,7 +30,7 @@ local function runCourse(courseName, targetObjective)
-- ...
```
## Documentation
To promote readability, understanding and maintainability of shared code, documentation is necessary for all methods.
To promote readability, understanding and maintainability of shared code, documentation is necessary for for all methods.
#### Good
``` lua

View File

@ -33,7 +33,7 @@ return {
size = vector3(1, 1, 1),
position = vector3(1, 0, 0),
mesh = "primitive:wedge",
rotation = quaternion:setEuler(0, math.rad(90), 0)
rotation = quaternion:setEuler(0, math.rad(-90), 0)
})
local block = engine.construct("block", workspace, {
@ -43,6 +43,55 @@ return {
position = vector3(0.5, 1, 0),
mesh = "primitive:sphere"
})
-- this debug code needs to be moved elsewhere
--[[
local compoundGroup = engine.construct("compoundGroup", workspace, {
name = "testCompoundGroup"
})
local testA = engine.construct("block", compoundGroup, {
colour = colour(1, 0, 0),
size = vector3(1, 1, 1),
position = vector3(0, 10, 1)
})
local testB = engine.construct("block", compoundGroup, {
colour = colour(0, 1, 0),
size = vector3(1, 1, 1),
position = vector3(0, 11, 0)
})
local testC = engine.construct("block", compoundGroup, {
colour = colour(0, 0, 1),
size = vector3(1, 1, 1),
position = vector3(1, 12, 0)
})
--]]
-- block:on("collisionStarted", function (collidingWith, hit, normal)
-- local b = engine.construct("block", workspace, {
-- position = hit,
-- physics = false,
-- size = vector3(0.1, 0.1, 0.1),
-- mesh = "primitive:sphere"
-- })
-- wait(1)
-- b:destroy()
-- end)
-- spawnThread(function ( ... )
-- while wait() do
-- local mouseHit = engine.physics:rayTestScreen( engine.input.mousePosition )
-- if mouseHit then
-- local b = engine.construct("block", workspace, {
-- position = mouseHit.hitPosition,
-- physics = false,
-- size = vector3(0.1, 0.1, 0.1),
-- mesh = "primitive:sphere"
-- })
-- end
-- end
-- end)
end,
setupEnvironment = function ()

View File

@ -647,18 +647,18 @@ createInputs = {
borderRadius = 2,
})
-- col:mouseLeftReleased(function ()
-- controller.colourPicker.window.visible = not controller.colourPicker.window.visible
-- if controller.colourPicker.window.visible and instanceEditing and instanceEditing[property] then
-- controller.colourPicker.setColour(instanceEditing[property])
-- controller.colourPicker.setCallback(function (c)
-- x.text = tostring(c.r)
-- g.text = tostring(c.g)
-- b.text = tostring(c.b)
-- parseInputs[type(value)](property, container)
-- end)
-- end
-- end)
col:mouseLeftReleased(function ()
controller.colourPicker.window.visible = not controller.colourPicker.window.visible
if controller.colourPicker.window.visible and instanceEditing and instanceEditing[property] then
controller.colourPicker.setColour(instanceEditing[property])
controller.colourPicker.setCallback(function (c)
x.text = tostring(c.r)
g.text = tostring(c.g)
b.text = tostring(c.b)
parseInputs[type(value)](property, container)
end)
end
end)
return container
end,