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
-- table library extensions | |
-- allows the table.copy function to return a shallow copy of a range of the table items | |
-- Example: | |
--local t={1,2,3,4,5,6,7,8,9,10} | |
--dump(table.copy(t,3,8)) | |
--prints out 3,4,5,6,7,8 | |
local table_copy = table.copy | |
table.copy = function( t, ... ) | |
if (type(arg[1]) == "number" and (arg[2] == nil or type(arg[2]) == "number")) then |
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
-- collision library | |
local collisionslib = {} | |
local categoryNames = {} | |
local categoryCounter = 1 | |
local function newCategory( name ) | |
categoryNames[ name ] = categoryCounter | |
categoryCounter = categoryCounter * 2 |
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
-- download.lua by Michael Weingarden May 2014 | |
local dropbox = require("dropboxModule") | |
local widget = require( "widget" ) | |
-- Load the relevant LuaSocket modules (no additional files required for these) | |
local http = require("socket.http") | |
local ltn12 = require("ltn12") | |
_H = display.contentHeight |
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
-- the only code changed from the original is from lines 454 to 466 | |
package.preload['json']=(function(...)local e=string | |
local a=math | |
local u=table | |
local i=error | |
local d=tonumber | |
local c=tostring | |
local s=type | |
local o=setmetatable |
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
------------------------------------------------------------------------------------------------------------------------ | |
--Convex Separator for Box2D Flash for Corona SDK | |
--The original class has been written by Antoan Angelov. | |
--This LUA port was done by Ragdog Studios SRL (http://www.ragdogstudios.com) | |
--It is designed to work with Erin Catto's Box2D physics library implementation in Corona SDK (http://www.coronalabs.com) | |
--Everybody can use this software for any purpose, under two restrictions: | |
--1. You cannot claim that you wrote this software. | |
--2. You cannot remove or alter this notice. | |
--How to use it: |
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
-------------------------------------------------------------------------------- | |
--[[ | |
Pixels | |
A simple POC of "pixel-based" drawing in Corona SDK. Implements a simple queue-based flood fill algorithm. | |
--]] | |
-------------------------------------------------------------------------------- | |
display.setStatusBar(display.HiddenStatusBar) |
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
-- fingerPaint Library for Corona SDK | |
-- Copyright (c) 2014 Jason Schroeder | |
-- http://www.jasonschroeder.com | |
-- http://www.twitter.com/schroederapps | |
--[[ Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
-- Project: Dropbox Module | |
-- Description: A module for accessing Dropbox from Lua/CoronaSDK using the Dropbox REST API. Module written | |
-- by F. E. Torkel, based off code by Michael Weingarden. | |
local lfs = require( "lfs" ) | |
local json = require( "json" ) | |
local M = {} |
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
math.randomseed( os.time() ) | |
local function rollDice( dicePattern ) | |
-- Dice pattern 3d6+3k3 | |
-- First number : number of dice | |
-- d : required string | |
-- Second number : sides to the dice | |
-- +/- : optional modifier | |
-- ^/k : optional string; '^' keeps the high values, 'k' keeps the low values | |
-- Third number : number of dice to keep, i.e. 4d6^3 keeps the best three numbers |
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
local SpringEasing = {} | |
-- EASING | |
local inflectX, inflectY = 0.075, 0.2 | |
local outflectX, outflectY = 1 - inflectX, 1 - inflectY | |
local decay = 12 | |
local function springIn(progress) | |
return progress ^ 4 |