1
0
mirror of https://github.com/teverse/teverse synced 2025-08-25 23:54:46 +02:00

Compare commits

..

2 Commits

Author SHA1 Message Date
c49e97ab71 remove a word in in TEVERSE-STYLE.md (#52) 2019-11-15 21:28:30 +00:00
teverse
1189ae6191 Fixes 2019-11-15 21:24:41 +00:00
3 changed files with 14 additions and 63 deletions

View File

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

View File

@ -33,7 +33,7 @@ return {
size = vector3(1, 1, 1), size = vector3(1, 1, 1),
position = vector3(1, 0, 0), position = vector3(1, 0, 0),
mesh = "primitive:wedge", 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, { local block = engine.construct("block", workspace, {
@ -43,55 +43,6 @@ return {
position = vector3(0.5, 1, 0), position = vector3(0.5, 1, 0),
mesh = "primitive:sphere" 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, end,
setupEnvironment = function () setupEnvironment = function ()

View File

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