Skip to content

Instantly share code, notes, and snippets.

View seacloud9's full-sized avatar
🔨
Happy to Build

Brendon Smith seacloud9

🔨
Happy to Build
View GitHub Profile
@jgranick
jgranick / Main.hx
Last active December 19, 2015 03:09
Adding controller support for OUYA
package;
import flash.display.Sprite;
import flash.geom.Point;
import openfl.events.JoystickEvent;
#if android
import openfl.utils.JNI;
import tv.ouya.console.api.OuyaController;
@AngryAnt
AngryAnt / DualDisplay.cs
Last active January 24, 2024 08:26
Example use of the Unity 4.1 AirPlay API - gives a setup with the iOS device as controller of the remote display.
using UnityEngine;
using System.Collections;
/*
Runtime use:
To be available, AirPlay needs to be switched on for the device either via a native AirPlay UI component or
via the global AirPlay mirroring setting. Your options are:
A: Modify your Xcode project to layer a native AirPlay Cocoa control somewhere over your Unity content.
@dariusk
dariusk / index.js
Created February 21, 2013 01:28
voxel.js game
var createGame = require('voxel-engine')
function sphereWorld(x, y, z) {
// return the index of the material you want to show up
// 0 is air
if (x*x + y*y + z*z > 15*15) return 0
return 4
}
var game = createGame({
@max-mapper
max-mapper / index.js
Last active December 12, 2015 03:59
voxel.js game
var createEngine = require('voxel-engine')
window.game = createEngine({ lightsDisabled: true })
game.scene.add(new game.THREE.HemisphereLight(0x408CFF, 0xFFC880, 0.6))
game.on('mousedown', function(pos) {
var light = new game.THREE.PointLight( 0xffffff, 1, 500 )
var direction = game.camera.matrixWorld.multiplyVector3(new game.THREE.Vector3(0,0,-1))
var diff = direction.subSelf(game.controls.yawObject.position.clone()).normalize()
@mminer
mminer / Marquee.cs
Last active January 27, 2024 10:32
Simple Unity script to create a scrolling marquee.
using UnityEngine;
public class Marquee : MonoBehaviour
{
public string message = "Where we're going, we don't need roads.";
public float scrollSpeed = 50;
Rect messageRect;
void OnGUI ()
@studioijeoma
studioijeoma / WebGL_Canvas_Texture_Text_Example.html
Created September 1, 2011 18:47
Three.js WebGL Canvas Texture Text Example
<!doctype html>
<html>
<head>
<title>Three.js : WebGL Canvas Texture Text Example</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
@jessefreeman
jessefreeman / layers_to_sprite_sheet.js
Created March 15, 2011 01:15
This is a PS script to make Sprite Sheets out of layers. Modified from http://www.garagegames.com/community/blogs/view/11527
// Put this file in Program Files\Adobe\Photoshop\Presets\Scripts\
// In PhotoShop menu File > Automate > Scripts: layersToSprite.js
// Arrange layers into a sprite sheet.
if (documents.length > 0)
{
// --------------------------
docRef = activeDocument;