Skip to content

Instantly share code, notes, and snippets.

View lonelydatum's full-sized avatar
💭
working on prequilt

Gar lonelydatum

💭
working on prequilt
View GitHub Profile
@lonelydatum
lonelydatum / gist:4772929
Last active December 12, 2015 12:38 — forked from padolsey/gist:527683
JavaScript: detect ie version
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
// Bind context
_.bindAll( this, "animate", "render", "update" );
// Initialize camera
this.camera = new THREE.Camera( 45, window.innerWidth / window.innerHeight, -2000, 10000 );
this.camera.projectionMatrix = THREE.Matrix4.makeOrtho( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, -2000, 10000 );
this.camera.position.y = 70.711;
this.camera.position.x = 100;
this.camera.position.z = 100;