aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE
diff options
context:
space:
mode:
authorhwc4872012-01-30 16:15:12 -0800
committerhwc4872012-01-30 16:15:12 -0800
commit8e43a46e3d79323fe06dc7771bc611a2c3c85c5c (patch)
tree37773f0a4d3212ff633690b270a4756c02d2b2bc /js/helper-classes/RDGE
parentc41d2c2b749b67921f243fb7594ce0cdb1ccce36 (diff)
downloadninja-8e43a46e3d79323fe06dc7771bc611a2c3c85c5c.tar.gz
Renderer startup handling of non-animated materials.
Changed zoom from the document bar to keep the location center of the viewable portion of the document fixed.
Diffstat (limited to 'js/helper-classes/RDGE')
-rw-r--r--js/helper-classes/RDGE/GLWorld.js10
-rw-r--r--js/helper-classes/RDGE/Materials/FlatMaterial.js2
-rw-r--r--js/helper-classes/RDGE/Materials/LinearGradientMaterial.js2
-rw-r--r--js/helper-classes/RDGE/Materials/RadialGradientMaterial.js2
4 files changed, 12 insertions, 4 deletions
diff --git a/js/helper-classes/RDGE/GLWorld.js b/js/helper-classes/RDGE/GLWorld.js
index dd9b6977..b84bb585 100644
--- a/js/helper-classes/RDGE/GLWorld.js
+++ b/js/helper-classes/RDGE/GLWorld.js
@@ -248,9 +248,17 @@ function GLWorld( canvas, use3D )
248 if (!this.hasAnimatedMaterials()) 248 if (!this.hasAnimatedMaterials())
249 { 249 {
250 this.myScene.render(); 250 this.myScene.render();
251 this._canvas.task.stop(); 251 //this._canvas.task.stop();
252 this._renderCount = 3;
252 } 253 }
253 } 254 }
255 else if (this._renderCount >= 0)
256 {
257 this._renderCount--;
258 if (this._renderCount == 0)
259 this._canvas.task.stop();
260 }
261
254 } 262 }
255 } 263 }
256 else 264 else
diff --git a/js/helper-classes/RDGE/Materials/FlatMaterial.js b/js/helper-classes/RDGE/Materials/FlatMaterial.js
index db66ca42..f342eef8 100644
--- a/js/helper-classes/RDGE/Materials/FlatMaterial.js
+++ b/js/helper-classes/RDGE/Materials/FlatMaterial.js
@@ -29,7 +29,7 @@ function FlatMaterial()
29 this.getColor = function() { return this._color; } 29 this.getColor = function() { return this._color; }
30 this.getShaderName = function() { return this._shaderName; } 30 this.getShaderName = function() { return this._shaderName; }
31 31
32 this.isAnimated = function() { return true; } 32 this.isAnimated = function() { return false; }
33 33
34 //////////////////////////////////s///////////////////////////////////// 34 //////////////////////////////////s/////////////////////////////////////
35 // Methods 35 // Methods
diff --git a/js/helper-classes/RDGE/Materials/LinearGradientMaterial.js b/js/helper-classes/RDGE/Materials/LinearGradientMaterial.js
index f026cd15..ce965296 100644
--- a/js/helper-classes/RDGE/Materials/LinearGradientMaterial.js
+++ b/js/helper-classes/RDGE/Materials/LinearGradientMaterial.js
@@ -98,7 +98,7 @@ function LinearGradientMaterial()
98 this._shader.default.u_cos_sin_angle.set([Math.cos(a), Math.sin(a)]); 98 this._shader.default.u_cos_sin_angle.set([Math.cos(a), Math.sin(a)]);
99 } 99 }
100 100
101 this.isAnimated = function() { return true; } 101 this.isAnimated = function() { return false; }
102 102
103 /////////////////////////////////////////////////////////////////////// 103 ///////////////////////////////////////////////////////////////////////
104 // Material Property Accessors 104 // Material Property Accessors
diff --git a/js/helper-classes/RDGE/Materials/RadialGradientMaterial.js b/js/helper-classes/RDGE/Materials/RadialGradientMaterial.js
index 5f912dec..cf91f1aa 100644
--- a/js/helper-classes/RDGE/Materials/RadialGradientMaterial.js
+++ b/js/helper-classes/RDGE/Materials/RadialGradientMaterial.js
@@ -92,7 +92,7 @@ function RadialGradientMaterial()
92 this._shader.default.u_colorCount.set([c]); 92 this._shader.default.u_colorCount.set([c]);
93 } 93 }
94 94
95 this.isAnimated = function() { return true; } 95 this.isAnimated = function() { return false; }
96 96
97 97
98 /////////////////////////////////////////////////////////////////////// 98 ///////////////////////////////////////////////////////////////////////