forked from AllanAxolotls/3DLove
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.lua
40 lines (31 loc) · 1.09 KB
/
main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
local Allos = require("Allos")
local mlib = require("mlib")
--local map = require("map")
local FollowCamera = true
local LG = love.graphics
local LK = love.keyboard
--// opt
local floor = math.floor
local round = function(x) return floor(x + 0.5) end
function love.load()
Allos.Init(1920, 1080, 30, 0.1, 1000)
Objects = Allos.LoadObjectFile("RobloxWorld2", true)
Allos.Sun.AmbientIntensity = 1
Allos.Sun.DiffuseIntensity = 1
Allos.Sun.WorldDirection:Set(mlib.Vector3(1, -1, 0))
end
function love.keypressed(key) end
function love.mousepressed(x, y, button) Allos.MousePressed(x, y, button) end
function love.mousereleased(x, y, button) Allos.MouseReleased(x, y, button) end
function love.update(dt)
Allos.UpdateMousePan(dt)
Allos.Controls(dt)
Allos.Update(dt)
end
function love.draw()
--local Render = map.StaticGetRenderList(Allos.MainCamera, 3)
--Allos.WriteCanvas(Render)
Allos.WriteCanvas(Objects)
Allos.DrawCanvas()
love.graphics.print("\n\t" .. Allos.MainCamera.pos:ToIntString() .. "\n\t" .. Allos.TriangleCount .. "\n\t" .. love.timer.getFPS())
end