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
/* | |
* This file provided by Facebook is for non-commercial testing and evaluation purposes only. | |
* Facebook reserves all rights not expressly granted. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | |
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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
package com.facebook.rebound; | |
import java.util.concurrent.CopyOnWriteArrayList; | |
public class SpringChain implements SpringListener { | |
private final SpringSystem mSpringSystem; | |
private final CopyOnWriteArrayList<SpringListener> mListeners; | |
private final CopyOnWriteArrayList<Spring> mSprings; | |
private static final SpringConfig ATTACHMENT_SPRING = SpringConfig.fromOrigamiTensionAndFriction(70, 10); |
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() { | |
var hb = {}; | |
var deg2rad = rebound.MathUtil.degreesToRadians; | |
var mapVal = rebound.MathUtil.mapValueInRange; | |
hb.HamburgerButton = function(container, size, color, cornerRadius) { | |
this.canvas = document.createElement('canvas'); | |
this.ctx = this.canvas.getContext('2d'); | |
this.padding = size * 0.1; |
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
package com.facebook.rebound.origami; | |
import android.app.Activity; | |
import android.content.res.Resources; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.view.ViewTreeObserver; | |
import com.facebook.rebound.SimpleSpringListener; | |
import com.facebook.rebound.Spring; |
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
Feedback on Home Alpha/Beta: | |
---------------------------- |
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
#include <stdio.h> | |
int main(int argc, char *argv[]) { | |
char *days[] = {"first", "second", "third", "fourth", "fifth", "sixth", | |
"seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth"}; | |
char *gifts[] = {"a partridge in a pear tree", "two turtle doves", | |
"three french hens", "four calling birds", "***** five golden rings *****", | |
"six geese a laying", "seven swans a swimming", "eight maids a milking", |
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
### | |
CoffeeScript port of http://processing.org/learning/topics/flocking.html | |
### | |
window.FlockingSketch = class FlockingSketch | |
# setup the environment and start the draw loop | |
constructor: -> | |
@setup() | |
@draw() |
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
randomColor = function() { | |
var i = 0, val = null, out = ''; | |
while (i < 3) { | |
val = Math.round(Math.random() * 255).toString(16); | |
if (val.length < 2) { | |
val = '0' + val; | |
} | |
out +=val; | |
i++; | |
} |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Index</title> | |
<script type="text/javascript" charset="utf-8" src="https://raw.github.com/gist/2354906/aefea983f6ca0b0e22656726a74250608397ab83/transformations.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
document.addEventListener('DOMContentLoaded', function() { | |
// creating a transformable element |