This file contains 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() | |
parameter.boolean("FILL") | |
parameter.integer("RANGE", 1,20,3) | |
parameter.boolean("LINE") | |
parameter.boolean("FOV") | |
parameter.boolean("MOVE") | |
hs = Hexagons():createMesh():set(0,0,color(207, 67, 67)) | |
u = Unit(hs:pos(0,0)) |
This file contains 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 | |
-- March | |
function setup() | |
local function sp(p) | |
return p:len() * p:dist(vec3(5,3,0)) | |
end | |
local st = os.clock() | |
local vs = volume(sp, 9, .5, 6) | |
print(os.clock() - st) |
This file contains 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 | |
-- Voronoi | |
function draw() | |
background(40, 40, 50) | |
startVoronoi() | |
end | |
This file contains 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
--# UI | |
UI = {} | |
function UI.C(code) | |
return loadstring("return " .. code) | |
end | |
UI.Item = class() | |
UI.Item.defaults = { |
This file contains 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 | |
-- 2 Face | |
function parseObjFormat(data) | |
local avs, ans, auvs = {},{},{} | |
local f = "%s(\-?%d*[\.]%d+)" | |
for x,y,z in string.gmatch(data, "v" .. f .. f .. f) do | |
table.insert(avs, |
This file contains 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
-- 4 play | |
-- Use this function to perform your initial setup | |
function setup() | |
displayMode(FULLSCREEN) | |
createPitchTable() | |
parameter.integer("X", 1,10,1,play) | |
song = { |
This file contains 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 | |
-- Formation | |
function setup() | |
displayMode(FULLSCREEN) | |
physics.gravity(0,0) | |
touches = {} | |
items = {} | |
ships = {} |
This file contains 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 | |
-- 0 UI | |
-- Use this function to perform your initial setup | |
function setup() | |
displayMode(FULLSCREEN) | |
scene = Item({0,0}, | |
Button{100,300,180,60,text="Hello"}, | |
Button{400,300,100,40,text="Ping"}, |
This file contains 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
-- CSG - Constructive Solid Geometry | |
function table.map(t, f) | |
local res = {}; | |
for i,v in ipairs(t) do res[i] = f(v); end | |
return res; | |
end | |
function table.append(t1, t2) | |
local res = table.copy(t1) |
This file contains 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 | |
-- IsoSphere | |
-- Use this function to perform your initial setup | |
function setup() | |
parameter.integer("Divisions", 0,5,1, createSphere) | |
parameter.number("H",-10,10,0) | |
R = 0 | |
end |
OlderNewer