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
// | |
// PathSimplify.cpp | |
// PathFitter | |
// | |
// Created by Greg Kepler on 4/18/12. | |
// Copyright (c) 2012 The Barbarian Group. All rights reserved. | |
// | |
#include <iostream> | |
#include "PathSimplify.h" |
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
#include "cinder/app/AppBasic.h" | |
#include "cinder/Perlin.h" | |
#include "cinder/Rand.h" | |
using namespace ci; | |
using namespace ci::app; | |
using namespace std; | |
class NoiseRangeTest : public AppBasic { | |
public: |
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
#include "cinder/app/AppNative.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder/Json.h" | |
using namespace ci; | |
using namespace ci::app; | |
using namespace std; | |
JsonTree queryData( const std::string &query ); |
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
// json file should be formatted something like | |
{ | |
"data": { | |
"photos": [ | |
{ | |
... | |
"images": { | |
"low_resolution": { | |
"url": "http://distilleryimage3.s3.amazonaws.com/###_6.jpg", | |
"width": 306, |
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
// ShaderToy Inputs | |
uniform vec3 iResolution; // viewport resolution (in pixels) | |
uniform float iGlobalTime; // shader playback time (in seconds) | |
const float PI=3.14159265358979323846; | |
float round( float x ) { | |
float val = mod( x, x ); | |
if( val >= 0.5 ){ | |
return ceil( x ); |
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
#include "cinder/app/AppBasic.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder/Timeline.h" | |
#include "cinder/Rand.h" | |
using namespace ci; | |
using namespace ci::app; | |
using namespace std; | |
class CinderEventLoopApp : public AppBasic { |
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
// import TweenLite for tweening and TimelineLite for keeping track of tweens | |
import com.greensock.TimelineLite; | |
import com.greensock.TweenLite; | |
// import filestream classes for saving images to disk (available only in AIR SDK) | |
import flash.filesystem.*; | |
// import PNGEncoder (available here https://github.com/mikechambers/as3corelib) | |
import com.adobe.images.PNGEncoder; |
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
// from http://davidwalsh.name/vendor-prefix | |
window.prefix = (function () { | |
var styles = window.getComputedStyle(document.documentElement, ''), | |
pre = (Array.prototype.slice | |
.call(styles) | |
.join('') | |
.match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o']) | |
)[1], | |
dom = ('WebKit|Moz|MS|O').match(new RegExp('(' + pre + ')', 'i'))[1]; | |
return { |
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
// is android | |
var isAndroid = navigator.userAgent.toLowerCase().indexOf("android") > -1; | |
// ios detection | |
var isIOS = false; | |
var iDevice = ['iPad', 'iPhone', 'iPod']; | |
for ( i = 0 ; i < iDevice.length ; i++ ) { | |
if( navigator.platform === iDevice[i] ){ |
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
// originall from from http://cvmlrobotics.blogspot.com/2013/03/angularjs-get-element-offset-position.html | |
function bounds( elm ) { | |
try {return elm.offset();} catch(e) {} | |
var rawDom = elm[0]; | |
var _x = 0; | |
var _y = 0; | |
var body = document.documentElement || document.body; | |
var scrollX = window.pageXOffset || body.scrollLeft; |
OlderNewer