Skip to content

Instantly share code, notes, and snippets.

time_micros:integer,c_ip:string,c_ip_type:integer,c_ip_region:string,cs_method:string,cs_uri:string,sc_status:integer,cs_bytes:integer,sc_bytes:integer,time_taken_micros:integer,cs_host:string,cs_referer:string,cs_user_agent:string,s_request_id:string,cs_operation:string,cs_bucket:string,cs_object:string
define( [ 'WebGLRendererModule' ], function ( renderer ) {
return function () {
return new FRAME.Module( {
parameters: {
color: new FRAME.ModuleParameter.Color( 'Color', 0xffffff ),
opacity: new FRAME.ModuleParameter.Float( 'Opacity', 1, 0, 1 )
@mrdoob
mrdoob / gist:a021c0c5ea229f6641da
Created July 16, 2014 00:18
Object3D.js (debug)
/**
* @author mrdoob / http://mrdoob.com/
* @author mikael emtinger / http://gomo.se/
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
*/
THREE.Object3D = function () {
this.id = THREE.Object3DIdCount ++;
THREE.Particle = function (material) {
this.constructor.call(this);
this.size = 1,
this.material = material;
}
THREE.Particle.prototype = new THREE.Object3D();
package aze.motion.easing
{
final public class Bounce
{
static public function easeIn(k:Number):Number
{
return 1 - Bounce.easeOut(1 - k);
}
static public function easeOut(k:Number):Number
{
// Ported from http://blog.inspirit.ru/wp-content/uploads/qsort/Main.as
function flashSort( array ) {
var a = array, n = array.length;
var i = 0, j = 0, k = 0, t, hold, flash;
var m = ~~( n * 0.125 );
var l = [], anmin = a[ 0 ], nmax = 0, nmove = 0;
while ( ++i < n ) {
// Approach 1 (links)
// Once the renderer finds a *MeshFaceMaterial*, it'll process the face material array
var head_material = [ new MeshBitmapUVMappingMaterial( head_bitmap ) ];
var torso_material = [ new MeshBitmapUVMappingMaterial( torso_bitmap ) ]
mesh.material = [ new MeshFaceMaterial(), new MeshColorStrokeMaterial( 0xff0000 ) ];
mesh.faces[ 0 ].material = head_material;
mesh.faces[ 1 ].material = head_material;
@mrdoob
mrdoob / gist:721717
Created November 30, 2010 14:02
Matrix4New.js
THREE.Matrix4 = function () {
var _x = new THREE.Vector3(), _y = new THREE.Vector3(), _z = new THREE.Vector3(),
_array = new Float32Array( [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] );
this.array = _array;
this.copy = function ( m ) {
_array[ 0 ] = m.array[ 0 ]; _array[ 1 ] = m.array[ 1 ]; _array[ 2 ] = m.array[ 2 ]; _array[ 3 ] = m.array[ 3 ];
'new' : {
uniforms: {},
vertex_shader: [
"void main() {",
"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
@mrdoob
mrdoob / gist:845802
Created February 27, 2011 01:09
video to looped animated gif
ffmpeg -i out.ogv -s 160x128 -pix_fmt rgb24 -ss 62.6 -t 3 -r 5 -loop 0 -f gif out.gif
convert -loop 0 -layers Optimize out.gif outopt.gif