Created
May 22, 2011 21:15
Revisions
-
jsermeno revised this gist
Sep 24, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -39,7 +39,7 @@ function initialize() { meshCanvas.rotation.x = -90 * Math.PI / 180; meshCanvas.scale.x = meshCanvas.scale.y = meshCanvas.scale.z = 100; scene.addChild( meshCanvas ); renderer = new THREE.WebGLRenderer( { antialias: true } ); renderer.setSize( window.innerWidth, window.innerHeight ); -
jsermeno revised this gist
Sep 24, 2011 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ function initialize() { grass = THREE.ImageUtils.loadTexture( "textures/grass.gif" ); grass.wrapT = grass.wrapS = THREE.RepeatWrapping; plane = new THREE.PlaneGeometry(8, 8, 8, 8); for ( i = 0; i < plane.faceVertexUvs[ 0 ].length; i ++ ) { @@ -39,7 +39,7 @@ function initialize() { meshCanvas.rotation.x = -90 * Math.PI / 180; meshCanvas.scale.x = meshCanvas.scale.y = meshCanvas.scale.z = 100; scene.add( meshCanvas ); renderer = new THREE.WebGLRenderer( { antialias: true } ); renderer.setSize( window.innerWidth, window.innerHeight ); -
jsermeno revised this gist
Jun 20, 2011 . No changes.There are no files selected for viewing
-
jsermeno revised this gist
Jun 20, 2011 . No changes.There are no files selected for viewing
-
jsermeno revised this gist
May 30, 2011 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,9 +11,9 @@ function initialize() { i, j, uvs; camera = new THREE.Camera( 3, window.innerWidth / window.innerHeight, -2000, 10000 ); camera.projectionMatrix = THREE.Matrix4.makeOrtho( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, - 2000, 10000 ); camera.position.x = 100; camera.position.y = 70.711; // 30 degree angle from the xz plane camera.position.z = 100; scene = new THREE.Scene(); -
jsermeno revised this gist
May 23, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ function initialize() { i, j, uvs; camera = new THREE.Camera( 3, window.innerWidth / window.innerHeight, -2000, 10000 ); camera.projectionMatrix = THREE.Matrix4.makeOrtho( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 1, window.innerHeight / - 1, - 2000, 10000 ); camera.position.x = 100; camera.position.y = 200; camera.position.z = 100; -
jsermeno revised this gist
May 23, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function initialize() { camera = new THREE.Camera( 3, window.innerWidth / window.innerHeight, -2000, 10000 ); camera.projectionMatrix = THREE.Matrix4.makeOrtho( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, - 2000, 10000 ); camera.position.x = 100; camera.position.y = 200; camera.position.z = 100; scene = new THREE.Scene(); -
jsermeno created this gist
May 22, 2011 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ var camera, scene, renderer; function initialize() { var grass, meshCanvas, plane, i, j, uvs; camera = new THREE.Camera( 3, window.innerWidth / window.innerHeight, -2000, 10000 ); camera.projectionMatrix = THREE.Matrix4.makeOrtho( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, - 2000, 10000 ); camera.position.x = 100; camera.position.y = 300; camera.position.z = 100; scene = new THREE.Scene(); grass = THREE.ImageUtils.loadTexture( "textures/grass.gif" ); grass.wrapT = grass.wrapS = THREE.RepeatWrapping; plane = new THREE.Plane(8, 8, 8, 8); for ( i = 0; i < plane.faceVertexUvs[ 0 ].length; i ++ ) { uvs = plane.faceVertexUvs[ 0 ][ i ]; for ( j = 0; j < uvs.length; j ++ ) { uvs[ j ].u *= 8; uvs[ j ].v *= 8; } } meshCanvas = new THREE.Mesh( plane, new THREE.MeshBasicMaterial( { map: grass, wireframe: false } )); meshCanvas.rotation.x = -90 * Math.PI / 180; meshCanvas.scale.x = meshCanvas.scale.y = meshCanvas.scale.z = 100; scene.addObject( meshCanvas ); renderer = new THREE.WebGLRenderer( { antialias: true } ); renderer.setSize( window.innerWidth, window.innerHeight ); document.body.appendChild(renderer.domElement); }