Skip to content

Instantly share code, notes, and snippets.

@Stavr0gin
Stavr0gin / main.lua
Created August 2, 2012 16:04
Particular particle system
-- Copyright 2012 Javier Moral
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
@reefwing
reefwing / MenuBar.lua
Created September 30, 2012 00:54
Tutorial 18 - Saving and Loading Complicated Tables (Part 2)
--# MenuBar
-- MenuBar Class
--
-- Developed by @dave1707
-- 16th September 2012
--
-- Version 1.1
--
-- Modified by: Reefwing Software
--
@AntonioCiolino
AntonioCiolino / DropBox.lua
Created November 16, 2012 23:22
Codea - Dropbox integration
--DropBox features
--This code allows an application to register with DropBox and perform file functions.
--There are 3 steps to getting a NEW app registed to a DropBox folder:
--1: get a request token. this says, "I'm going to request access"
--2. have the USER authorize. This proves that a human is choosing to do the request
--3. get a "real" token and secret (password) to access DropBox. This is what we want
-- to save, so we can access DropBox in the future without re-registering.
DropBox = class()
--We allow the developer to set these. These are the app Key and app Secret,
@JMV38
JMV38 / Ants v2
Last active December 11, 2015 04:08
Ant simulation v2 Update v2.1 added the behavior so ants are not stuck on obstacles
--# Main
-- 0 fourmi
-- copyright JMV38 2013 - all rights reserved
displayMode(FULLSCREEN)
supportedOrientations(LANDSCAPE_ANY)
function setup()
-- codea settings
--- This will pull the Gister project into Codea for you
-- Instructions:
-- * Create a new project in Codea named Gister, leave it empty
-- * Create another project to bootstrap (name doesn't matter)
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters)
-- * Run, run again, then delete the bootstrap project
-- If all went well, you should have a Gister project now
function getJsonLib()
local tabs = listProjectTabs()
@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 = {}
@sp4cemonkey
sp4cemonkey / Grass
Last active December 15, 2015 05:19
-- Grass
-- Use this function to perform your initial setup
function setup()
field = mesh()
--field.shader = shader("Documents:Grass")
field.shader = shader(GrassShader.vertexShader, GrassShader.fragmentShader)
bladeWidth = 0.15
bladeHeight = 1.5
midWeight = 0.4
@dermotbalson
dermotbalson / 24. Raytracing
Created April 9, 2013 14:49
24. Raytracing
--# Main
-- Main
function setup()
if Backup then Backup("TrackDemo 200") end
t=Track3()
parameter.boolean("Rays",true)
end
function draw()
@devilstower
devilstower / gist:5384102
Created April 14, 2013 20:34
Cider 1.6
--# UIElement
UIElement = class()
CONTROLTYPE = 0
LABELTYPE = 1
BUTTONTYPE = 2
TEXTBOXTYPE = 3
SWITCHTYPE = 4
SLIDERTYPE = 5
@devilstower
devilstower / gist:5384106
Created April 14, 2013 20:36
Cider Controls 1.6
--# Frame
Frame = class()
-- Frame
-- ver. 1.5
-- a simple rectangle for holding controls.
-- ====================