From 96a0a8c916533eb5625816192ed38488f639326d Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 22 Feb 2012 11:00:20 -0800 Subject: Integrating canvas-2d drawing and WebGL fixes, including adding back WebGL materials. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/RDGE/src/core/script/precompiled.js | 10 +++++----- js/helper-classes/RDGE/src/core/script/runtime.js | 14 +++++++++----- js/helper-classes/RDGE/src/core/script/scenegraphNodes.js | 8 ++++---- 3 files changed, 18 insertions(+), 14 deletions(-) (limited to 'js/helper-classes/RDGE/src/core') diff --git a/js/helper-classes/RDGE/src/core/script/precompiled.js b/js/helper-classes/RDGE/src/core/script/precompiled.js index 7fd1a425..bed94e4e 100755 --- a/js/helper-classes/RDGE/src/core/script/precompiled.js +++ b/js/helper-classes/RDGE/src/core/script/precompiled.js @@ -48,11 +48,11 @@ rdgeGlobalParameters = "u_light3Amb": {'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0]}, "u_light3Spec": {'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0]}}, "colMap": {'type': 'tex2d', 'data': "assets/images/white.png"}, - "envMap": {'type': 'tex2d', 'data': null}, - "normalMap": {'type': 'tex2d', 'data': null}, - "glowMap": {'type': 'tex2d', 'data': "assets/images/black.png"}, - "u_shadowDepthMap": {'type': 'tex2d', 'data': null}, - "u_depthMap": {'type': 'tex2d', 'data': null}, + //"envMap": {'type': 'tex2d', 'data': null}, + //"normalMap": {'type': 'tex2d', 'data': null}, + //"glowMap": {'type': 'tex2d', 'data': "assets/images/black.png"}, + //"u_shadowDepthMap": {'type': 'tex2d', 'data': null}, + //"u_depthMap": {'type': 'tex2d', 'data': null}, "u_matAmbient": {'type': 'vec4', 'data': [1.00,1.00,1.00, 1]}, "u_matDiffuse": {'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0]}, "u_matSpecular": {'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0]}, diff --git a/js/helper-classes/RDGE/src/core/script/runtime.js b/js/helper-classes/RDGE/src/core/script/runtime.js index 18b9b223..3d824faf 100755 --- a/js/helper-classes/RDGE/src/core/script/runtime.js +++ b/js/helper-classes/RDGE/src/core/script/runtime.js @@ -206,11 +206,15 @@ RDGETask = (function() { self.lastTime = self.currTime; } - this.start = function() { - this.running = true; - this.currTime = new Date().getTime(); - this.lastTime = this.currTime; - tasks[this.id](); + this.start = function() + { + if (!this.running) + { + this.running = true; + this.currTime = new Date().getTime(); + this.lastTime = this.currTime; + tasks[this.id](); + } } this.stop = function() { diff --git a/js/helper-classes/RDGE/src/core/script/scenegraphNodes.js b/js/helper-classes/RDGE/src/core/script/scenegraphNodes.js index 48f0aab9..e80a14fb 100755 --- a/js/helper-classes/RDGE/src/core/script/scenegraphNodes.js +++ b/js/helper-classes/RDGE/src/core/script/scenegraphNodes.js @@ -321,10 +321,10 @@ materialNodeTemplate = function(matNode) var renderer = g_Engine.getContext().renderer; matNode.textureList = [ - {'name':"colMap", 'handle':renderer.getTextureByName("assets/images/white"), 'unit': TEX_DIF, "type":UNIFORMTYPE.TEXTURE2D}, - {'name':"envMap", 'handle':renderer.getTextureByName("assets/images/material_paint"),'unit': TEX_SPEC, "type":UNIFORMTYPE.TEXTURE2D}, - {'name':"normalMap",'handle':renderer.getTextureByName("assets/images/blue"), 'unit': TEX_NORM, "type":UNIFORMTYPE.TEXTURE2D}, - {'name':"glowMap", 'handle':renderer.getTextureByName("assets/images/black"), 'unit': TEX_GLOW, "type":UNIFORMTYPE.TEXTURE2D} +// {'name':"colMap", 'handle':renderer.getTextureByName("assets/images/white"), 'unit': TEX_DIF, "type":UNIFORMTYPE.TEXTURE2D}, +// {'name':"envMap", 'handle':renderer.getTextureByName("assets/images/material_paint"),'unit': TEX_SPEC, "type":UNIFORMTYPE.TEXTURE2D}, +// {'name':"normalMap",'handle':renderer.getTextureByName("assets/images/blue"), 'unit': TEX_NORM, "type":UNIFORMTYPE.TEXTURE2D}, +// {'name':"glowMap", 'handle':renderer.getTextureByName("assets/images/black"), 'unit': TEX_GLOW, "type":UNIFORMTYPE.TEXTURE2D} ]; } -- cgit v1.2.3