Skip to content

Instantly share code, notes, and snippets.

--
-- Project: PinchZoom with Pan
--
-- Date: August 19, 2010
--
-- Version: 1.1
--
-- File name: main.lua
--
-- Author: Corona Labs (mikofh)
--[[
Perspective v2.0.2
A library for easily and smoothly integrating a virtual camera into your game.
Based on modified version of the Dusk camera system.
v2.0.2 adds a more stable tracking system and re-implements scrollX and scrollY
--]]
-- 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
local function fire()
local beam = {}
for i = 1, 20 do
--Have used circle, but if you use a blurry yellow glow, it would look more like a fire
beam[i] = display.newCircle(0,0,3.5) --display.newImage("glow4.png")--
beam[i].x, beam[i].y = math.random(100,200) , 500
-- io operations
local iolib = {}
-- returns true if the file exists
local function fileExists( filename, base )
local path = system.pathForFile( filename, base )
local file = io.open( path, "r" )
if file then
io.close(file)
--[[
Perspective v2.0.2
A library for easily and smoothly integrating a virtual camera into your game.
Based on modified version of the Dusk camera system.
v2.0.2 adds a more stable tracking system and re-implements scrollX and scrollY
--]]
-- arrow test
-- http://www.iforce2d.net/b2dtut/sticky-projectiles
-- video: http://screencast.com/t/vcPLSJR6xkIq
require("mathlib")
local sWidth, sHeight = display.actualContentWidth, display.actualContentHeight
local centerX, centerY = sWidth/2, sHeight/2
Here are all the classes from Bootstrap 3 (version 3.1.1).
Method of extraction:
1. Download Bootstrap 3 and rename bootstrap.css as "bootstrap.html"
2. Add the following 24 lines of code to the very bottom of the bootstrap.html file:
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script>
function print_r ( t )
local print_r_cache={}
local function sub_print_r(t,indent)
if (print_r_cache[tostring(t)]) then
print(indent.."*"..tostring(t))
else
print_r_cache[tostring(t)]=true
if (type(t)=="table") then
for pos,val in pairs(t) do
if (type(val)=="table") then
This file has been truncated, but you can view the full file.
local M = {}
local wordz = {}
wordz[1] = nil
wordz[2] = { 'aa','ab','ad','ae','ag','ah','ai','al','am','an','ar','as','at','aw','ax','ay','ba','be','bi','bo','by','de','do','ed','ef','eh','el','em','en','er','es','et','ex','fa','go','ha','he','hi','hm','ho','id','if','in','is','it','jo','ka','la','li','lo','ma','me','mi','mm','mo','mu','my','na','ne','no','nu','od','oe','of','oh','om','on','op','or','os','ow','ox','oy','pa','pe','pi','re','sh','si','so','ta','ti','to','uh','um','un','up','us','ut','we','wo','xi','xu','ya','ye','yo' }
wordz[3] = { 'aah','aal','aas','aba','abo','abs','aby','ace','act','add','ado','ads','adz','aff','aft','aga','age','ago','aha','aid','ail','aim','ain','air','ais','ait','ala','alb','ale','all','alp','als','alt','ama','ami','amp','amu','ana','and','ane','ani','ant','any','ape','apt','arb','arc','are','arf','ark','arm','ars','art','ash','ask','asp','ass','ate','att','auk','ava','ave','avo','awa','awe','awl','awn','axe','aye','ays','azo','baa','bad','bag','bah','