This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Main | |
function setup() | |
-- Set this to true or false to activate/deactivate the lighting shader | |
useShader = true | |
rotX,rotY = 0.2,1.3 -- camera rotation | |
camDist = 100 -- distance from the camera to origin | |
camOrigin = vec3(0,0,0) -- point of which the camera orbits | |
lightColour = color(255, 255, 255, 255) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Main | |
-- Dimensions of screen: 1024,768 | |
Worlds = {} | |
function Worlds.addTri(pos1,pos2,pos3,addTex,col,world) | |
local col,world = color(255),Worlds.town | |
local m = world.mesh | |
do | |
verts = m.vertices | |
verts[#verts+1],verts[#verts+2],verts[#verts+3] = pos1,pos2,pos3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--# Main | |
-- FPS | |
displayMode(FULLSCREEN) | |
supportedOrientations(LANDSCAPE_ANY) | |
-- Use this function to perform your initial setup | |
function setup() | |
Player.chunkX = math.ceil(Player.x/1600) | |
Player.chunkZ = math.ceil(Player.z/1600) | |
do |