Compare commits

..

No commits in common. "9c7cd0d0e2c1d59054c63b9c2757ef5f070483ff" and "29d3d912451be369b0e3fd66ad116360da5a3f44" have entirely different histories.

7 changed files with 26 additions and 33 deletions

View File

@ -1,6 +1,3 @@
-- Copyright 2020- Teverse
-- This script is required when workshop is loaded & acts as the 3D Camera for the 3D Environment
local keyMap = { local keyMap = {
[tonumber(enums.keys.KEY_W)] = vector3(0, 0, 1), [tonumber(enums.keys.KEY_W)] = vector3(0, 0, 1),
[tonumber(enums.keys.KEY_S)] = vector3(0, 0, -1), [tonumber(enums.keys.KEY_S)] = vector3(0, 0, -1),
@ -17,12 +14,17 @@ local cam = teverse.scene.camera
local db = false local db = false
teverse.input:on("keyDown", function(key) teverse.input:on("keyDown", function(key)
if db then return end
db = true
local mapped = keyMap[tonumber(key)] local mapped = keyMap[tonumber(key)]
if mapped then if mapped then
while sleep() and teverse.input:isKeyDown(key) do while sleep() and teverse.input:isKeyDown(key) do
cam.position = cam.position + (cam.rotation * mapped * moveStep) cam.position = cam.position + (cam.rotation * mapped * moveStep)
end end
end end
db = false
end) end)
teverse.input:on("mouseMoved", function( movement ) teverse.input:on("mouseMoved", function( movement )

View File

@ -108,7 +108,7 @@ return {
local function calculateScrollHeight() local function calculateScrollHeight()
local y = 0 local y = 0
for _,v in pairs(appsContainer.children) do for _,v in pairs(appsContainer.children) do
y = math.max(y, v.absolutePosition.y + 350) y = math.max(y, v.absolutePosition.y + 320)
end end
appsContainer.size = guiCoord(1.0, -20, 0, y - appsContainer.absolutePosition.y) appsContainer.size = guiCoord(1.0, -20, 0, y - appsContainer.absolutePosition.y)
page.canvasSize = guiCoord(1, 0, 0, y - appsContainer.absolutePosition.y) page.canvasSize = guiCoord(1, 0, 0, y - appsContainer.absolutePosition.y)

View File

@ -1,21 +0,0 @@
-- Copyright 2020- Teverse
-- This script constructs (or builds) the baseline (or default) environment
return {
default = function()
teverse.scene.simulate = true
teverse.scene.camera.position = vector3(0, 1, -10)
teverse.scene.camera.rotation = quaternion.euler(math.rad(25), 0, 0)
local light = teverse.construct("directionalLight", {
rotation = quaternion.euler(math.rad(-45), math.rad(20), 0),
colour = colour(5, 5, 5)
})
local base = teverse.construct("block", {
position = vector3(0, -10, 0),
scale = vector3(30, 1, 30),
colour = colour(1, 1, 1)
})
end
}

View File

@ -3,6 +3,20 @@
local globals = require("tevgit:workshop/library/globals.lua") -- globals; variables or instances that can be shared between files local globals = require("tevgit:workshop/library/globals.lua") -- globals; variables or instances that can be shared between files
function dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. dump(v) .. ','
end
return s .. '} '
else
return tostring(o)
end
end
return { return {
createGroup = function(id) createGroup = function(id)
local data = {} local data = {}

View File

@ -21,6 +21,8 @@ return {
local count = 0 local count = 0
self = data self = data
self.id = idValue -- Unique Indentifier self.id = idValue -- Unique Indentifier
--self.pages = {} -- Where we store our pages for sidebar
--self.activeTool = nil
local toolsContainer = teverse.construct("guiFrame", { local toolsContainer = teverse.construct("guiFrame", {
parent = teverse.interface, parent = teverse.interface,
@ -81,7 +83,7 @@ return {
end) end)
_icon:on("mouseLeftUp", function() _icon:on("mouseLeftUp", function()
callback() _icon.dropShadowAlpha = 0.2
end) end)
_count = _count + 1 _count = _count + 1
@ -112,7 +114,7 @@ return {
end) end)
icon:on("mouseLeftUp", function() icon:on("mouseLeftUp", function()
callback() icon.dropShadowAlpha = 0.2
end) end)
count = count + 1 count = count + 1

View File

@ -195,7 +195,8 @@ return {
end) end)
icon:on("mouseLeftUp", function() icon:on("mouseLeftUp", function()
callback() icon.iconAlpha = 1.0
icon.dropShadowAlpha = 0.2
end) end)
count = count + 1 count = count + 1

View File

@ -2,8 +2,6 @@
-- This script is required when workshop is loaded. -- This script is required when workshop is loaded.
local globals = require("tevgit:workshop/library/globals.lua") -- globals; variables or instances that can be shared between files local globals = require("tevgit:workshop/library/globals.lua") -- globals; variables or instances that can be shared between files
local environmentPresets = require("tevgit:workshop/library/environment/presets.lua") -- 3D environment presets (or defaults)
local camera = require("tevgit:core/3d/camera.lua") -- 3D Camera for 3D Environment
local function init(dev) local function init(dev)
--[[ --[[
@ -44,9 +42,6 @@ local function init(dev)
if loadingScreen then if loadingScreen then
loadingScreen:destroy() loadingScreen:destroy()
end end
-- Setup Basic Default Scene (3D viewport)
environmentPresets.default()
end end
return function(dev) return function(dev)