aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/runtime/GLRuntime.js
diff options
context:
space:
mode:
authorhwc4872012-03-05 15:16:52 -0800
committerhwc4872012-03-05 15:16:52 -0800
commitec10bf44c711e9c552780d2cd9ac0baef21de445 (patch)
tree1a48fef7db5c560e997ce3d345fa351dc878a8bb /js/helper-classes/RDGE/runtime/GLRuntime.js
parentcad4d6cb3f667f6174ec05cecead675b244285b9 (diff)
downloadninja-ec10bf44c711e9c552780d2cd9ac0baef21de445.tar.gz
WebGL & Canvas2D file IO
Diffstat (limited to 'js/helper-classes/RDGE/runtime/GLRuntime.js')
-rw-r--r--js/helper-classes/RDGE/runtime/GLRuntime.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/helper-classes/RDGE/runtime/GLRuntime.js b/js/helper-classes/RDGE/runtime/GLRuntime.js
index e0fff4a8..58cb4e33 100644
--- a/js/helper-classes/RDGE/runtime/GLRuntime.js
+++ b/js/helper-classes/RDGE/runtime/GLRuntime.js
@@ -131,7 +131,7 @@ function GLRuntime( canvas, importStr )
131 this.elapsed += dt; 131 this.elapsed += dt;
132 132
133 // changed the global position uniform of light 0, another way to change behavior of a light 133 // changed the global position uniform of light 0, another way to change behavior of a light
134 //rdgeGlobalParameters.u_light0Pos.set( [5*Math.cos(this.elapsed), 5*Math.sin(this.elapsed), 20]); 134 rdgeGlobalParameters.u_light0Pos.set( [5*Math.cos(this.elapsed), 5*Math.sin(this.elapsed), 20]);
135 135
136 // orbit the light nodes around the boxes 136 // orbit the light nodes around the boxes
137 //this.light.setPosition([1.2*Math.cos(this.elapsed*2.0), 1.2*Math.sin(this.elapsed*2.0), 1.2*Math.cos(this.elapsed*2.0)]); 137 //this.light.setPosition([1.2*Math.cos(this.elapsed*2.0), 1.2*Math.sin(this.elapsed*2.0), 1.2*Math.cos(this.elapsed*2.0)]);
@@ -328,6 +328,8 @@ function GLRuntime( canvas, importStr )
328 } 328 }
329 329
330 // start RDGE or load Canvas 2D objects 330 // start RDGE or load Canvas 2D objects
331 var index = importStr.indexOf( "scenedata: " );
332 this._useWebGL = (index >= 0);
331 if (this._useWebGL) 333 if (this._useWebGL)
332 { 334 {
333 var id = canvas.getAttribute( "data-RDGE-id" ); 335 var id = canvas.getAttribute( "data-RDGE-id" );