From ec10bf44c711e9c552780d2cd9ac0baef21de445 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Mon, 5 Mar 2012 15:16:52 -0800 Subject: WebGL & Canvas2D file IO --- js/helper-classes/RDGE/runtime/GLRuntime.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/helper-classes/RDGE/runtime/GLRuntime.js') 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 ) this.elapsed += dt; // changed the global position uniform of light 0, another way to change behavior of a light - //rdgeGlobalParameters.u_light0Pos.set( [5*Math.cos(this.elapsed), 5*Math.sin(this.elapsed), 20]); + rdgeGlobalParameters.u_light0Pos.set( [5*Math.cos(this.elapsed), 5*Math.sin(this.elapsed), 20]); // orbit the light nodes around the boxes //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 ) } // start RDGE or load Canvas 2D objects + var index = importStr.indexOf( "scenedata: " ); + this._useWebGL = (index >= 0); if (this._useWebGL) { var id = canvas.getAttribute( "data-RDGE-id" ); -- cgit v1.2.3