This file contains 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
using UnityEngine; | |
using System.Collections; | |
[RequireComponent(typeof(Camera))] | |
public class MixableCamera : MonoBehaviour { | |
public Camera fromCamera, toCamera; | |
public float mixPosition = 0f; | |
public float mixSpeed = 0f; |
This file contains 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
// | |
// ofxRectFit.h | |
// | |
// Created by Tiago on 11/28/14. | |
// | |
// | |
#ifndef __ofxRectFit__ | |
#define __ofxRectFit__ |
This file contains 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
using UnityEngine; | |
using UnityEngine.Events; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class State { | |
public delegate void EnterStateEvent(State s, State from); | |
public delegate void ExitStateEvent(State s, State to); | |
public delegate void UpdateStateEvent(State s); | |
public delegate void Constructor(State s); |
This file contains 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
using System.Collections; | |
using System.Collections.Generic; | |
using System.Xml; | |
using System.Xml.Serialization; | |
using System.IO; | |
using System.Text; | |
using System; | |
// XML-Serializable Dictionary class, |
This file contains 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
#lang racket | |
(define (*vm* accum | |
stack | |
code | |
rstack | |
env) | |
(if (pair? code) | |
(let ([word (car code)]) | |
(match word | |
['halt! accum] |
This file contains 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
using UnityEngine; | |
using System.Collections; | |
public static class Vector3Addons { | |
public static Vector2 xx(this Vector3 vec) { return new Vector2(vec.x, vec.x); } | |
public static Vector2 xy(this Vector3 vec) { return new Vector2(vec.x, vec.y); } | |
public static Vector2 xz(this Vector3 vec) { return new Vector2(vec.x, vec.z); } | |
public static Vector2 yx(this Vector3 vec) { return new Vector2(vec.y, vec.x); } | |
public static Vector2 yy(this Vector3 vec) { return new Vector2(vec.y, vec.y); } | |
public static Vector2 yz(this Vector3 vec) { return new Vector2(vec.y, vec.z); } |
This file contains 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
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"follow_symlinks": true, | |
"path": ".", | |
"folder_exclude_patterns": ["Library", "ProjectSettings", "Temp"], | |
"file_exclude_patterns": ["*.meta", "*.dll", "*.obj", "*.o", "*.a", "*.lib", ".DS_Store", "*.sublime-workspace"], | |
} | |
], |
This file contains 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 TestObj1() { this.counter = 0; this.doit = function() { return this.counter++ } }; | |
function TestObj2() { this.counter = 0; }; | |
TestObj2.prototype.doit = function() { return this.counter++; }; | |
testit = function() { var testobj1 = new TestObj1(); var counter = 0; var startt1 = (new Date).getTime(); while(testobj1.doit()<1000000) { counter++ }; console.log("time for test 1: "+((new Date).getTime()-startt1)); var testobj2 = new TestObj2(); var startt2 = (new Date).getTime(); while(testobj2.doit()<1000000) { counter++ }; console.log("time for test 2: "+((new Date).getTime()-startt2));}; | |
testit(); | |
// Firefox 3.6 is awful slow on both methods, but the first one is a tiny bit faster than the second one (on winXP 32, AMD x2 2.2GHz 4GB ram, it does 522ms vs. 534ms). | |
// Firefox 4.0 is some sort of improvement, but is still godawful slow. 340ms and 350ms, respectively. I guess Tamarin does not help much on this. | |
// Chrome Canary Build flies on both methods, and the second one is almost 2x faster - 45ms vs. 27ms |
This file contains 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
typedef int32_t Fixed; | |
typedef int16_t FWord; | |
typedef struct | |
{ | |
Fixed Table; // version number 0x00010000 for version 1.0. | |
Fixed fontRevision; // Set by font manufacturer. | |
uint32_t checkSumAdjustment; // To compute: set it to 0, sum the entire font as ULONG, then store 0xB1B0AFBA - sum. | |
uint32_t magicNumber; // Set to 0x5F0F3CF5. | |
uint16_t flags; // Bit 0 - baseline for font at y=0; |
This file contains 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
package com.pixelofview.audio.analog | |
{ | |
/** | |
* Simulation of a Moog-like voltage-controlled filter | |
* based on the [moog~] external for Pd | |
*/ | |
public class MoogVCF | |
{ | |
public static const GainTable:Vector.<Number> = new Vector.<Number>(); | |
OlderNewer