Skip to content

Instantly share code, notes, and snippets.

View tnlogy's full-sized avatar

Tobias Teleman tnlogy

View GitHub Profile
@tnlogy
tnlogy / Scene and Noise
Created February 24, 2013 17:53
Scene and Noise and Pinch Zoom
--# Main
-- 0 UI
-- Use this function to perform your initial setup
function setup()
displayMode(FULLSCREEN)
local p1 = UI.Pad({0,100,200,200})
local p2 = UI.Pad({550,100,200,200})
local shipPos = UI.Item({500,500,scale=0.1},
@tnlogy
tnlogy / UI
Created February 23, 2013 21:21
--# 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"},
@tnlogy
tnlogy / Formation
Created February 17, 2013 12:26
Swarming behaviour in Codea
--# Main
-- Formation
function setup()
displayMode(FULLSCREEN)
physics.gravity(0,0)
touches = {}
items = {}
ships = {}
@tnlogy
tnlogy / Notes in Codea
Created February 4, 2013 16:24
Notes in Codea
-- 4 play
-- Use this function to perform your initial setup
function setup()
displayMode(FULLSCREEN)
createPitchTable()
parameter.integer("X", 1,10,1,play)
song = {
@tnlogy
tnlogy / Light Shader in Codea
Created February 1, 2013 09:40
Light Shader in Codea
--# 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,
@tnlogy
tnlogy / UI.codea
Created January 26, 2013 20:33
QML implementation attempt for Codea
--# UI
UI = {}
function UI.C(code)
return loadstring("return " .. code)
end
UI.Item = class()
UI.Item.defaults = {