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
backingMode(RETAINED) | |
function setup() | |
background(0) | |
stroke(255) | |
strokeWidth(5) | |
fill(227, 106, 106, 255) | |
ellipse(WIDTH/2, HEIGHT/2, 500) | |
end |
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
function setup() | |
didDraw = false | |
background(0) | |
backingMode(RETAINED) | |
end | |
function draw() | |
-- Just draw one frame and bail out early if we have drawn | |
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
function setup() | |
background(0) | |
-- Render once into an image the size of the screen | |
img = image(WIDTH,HEIGHT) | |
setContext(img) | |
stroke(255) | |
strokeWidth(5) |
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
// | |
// KeyboardLayout.swift | |
// Codea | |
// | |
// Created by Simeon on 24/7/17. | |
// Copyright © 2017 Two Lives Left. All rights reserved. | |
// | |
import UIKit |
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
-- Use this function to perform your initial setup | |
function setup() | |
parameter.text("name", "Tiff") | |
end | |
-- This function gets called once every frame | |
function draw() | |
-- This sets a dark background color | |
background(40, 40, 50) |
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
--# Main | |
-- Lightsaber | |
function setup() | |
touches = {} | |
lightsaber = Saber(300, 15) | |
lightsaber:setTransform(matrix():translate(WIDTH/2, HEIGHT/2, 0), false) |
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
BoxScene = class(Scene) | |
function BoxScene:init() | |
-- We have to initialize our | |
-- super class | |
Scene.init(self) | |
end | |
function BoxScene:draw() | |
background(78, 99, 51, 255) |
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
--FPS = class(juice.text) | |
FPS = class() | |
function FPS:init() | |
--juice.text.init(self, "FPS", 0,0) | |
self.pos = vec2(0,0) | |
self.fps = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} | |
self.idx = 0 | |
end |
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
--Juice Single Install | |
--Installer created by @acp edited by @Briarfox | |
--- This will pull the Juice project into Codea for you | |
-- Instructions: | |
-- * Create a new project in Codea named Juice If you chose another name please change the variable Below | |
--This is case sensitive | |
ProjectName = "Juice" | |
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters) | |
-- * Run, run again, |
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
-- Juice | |
-- Use this function to perform your initial setup | |
function setup() | |
r = juice.rect(WIDTH/2,HEIGHT/2,70) | |
parameter.integer( "ObjType", 1, 4, 1, objChanged ) | |
parameter.action( "Spin", function() r:spin(2) end ) | |