diff options
author | hwc487 | 2012-06-13 13:56:10 -0700 |
---|---|---|
committer | hwc487 | 2012-06-13 13:56:10 -0700 |
commit | a7aa51e6b91623772eef54b827616432838b560e (patch) | |
tree | 5b082e3e24fd8311e9334055a7b3b264a3223b26 /js/lib/rdge/materials | |
parent | eea0703ca3b7f066a9d685ce09905d4860fa082d (diff) | |
download | ninja-a7aa51e6b91623772eef54b827616432838b560e.tar.gz |
Material bug fixes - reset texture array.
Diffstat (limited to 'js/lib/rdge/materials')
-rwxr-xr-x | js/lib/rdge/materials/bump-metal-material.js | 4 | ||||
-rw-r--r-- | js/lib/rdge/materials/deform-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/flag-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/fly-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/keleidoscope-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/radial-blur-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/relief-tunnel-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/square-tunnel-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/star-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/tunnel-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/twist-material.js | 3 | ||||
-rwxr-xr-x | js/lib/rdge/materials/uber-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/water-material.js | 3 | ||||
-rw-r--r-- | js/lib/rdge/materials/z-invert-material.js | 3 |
14 files changed, 41 insertions, 2 deletions
diff --git a/js/lib/rdge/materials/bump-metal-material.js b/js/lib/rdge/materials/bump-metal-material.js index f73f1d34..4604a89d 100755 --- a/js/lib/rdge/materials/bump-metal-material.js +++ b/js/lib/rdge/materials/bump-metal-material.js | |||
@@ -24,8 +24,8 @@ var BumpMetalMaterial = function BumpMetalMaterial() { | |||
24 | this._defaultSpecularTexture = "assets/images/silver.png"; | 24 | this._defaultSpecularTexture = "assets/images/silver.png"; |
25 | this._defaultNormalTexture = "assets/images/normalMap.png"; | 25 | this._defaultNormalTexture = "assets/images/normalMap.png"; |
26 | 26 | ||
27 | // keep the array of initialized textures | 27 | // array textures indexed by shader uniform name |
28 | this._textures = []; | 28 | this._glTextures = []; |
29 | 29 | ||
30 | this._speed = 1.0; | 30 | this._speed = 1.0; |
31 | 31 | ||
diff --git a/js/lib/rdge/materials/deform-material.js b/js/lib/rdge/materials/deform-material.js index 91202b24..7ff5b3e3 100644 --- a/js/lib/rdge/materials/deform-material.js +++ b/js/lib/rdge/materials/deform-material.js | |||
@@ -19,6 +19,9 @@ var DeformMaterial = function DeformMaterial() { | |||
19 | this._time = 0.0; | 19 | this._time = 0.0; |
20 | this._dTime = 0.01; | 20 | this._dTime = 0.01; |
21 | 21 | ||
22 | // array textures indexed by shader uniform name | ||
23 | this._glTextures = []; | ||
24 | |||
22 | /////////////////////////////////////////////////////////////////////// | 25 | /////////////////////////////////////////////////////////////////////// |
23 | // Properties | 26 | // Properties |
24 | /////////////////////////////////////////////////////////////////////// | 27 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/flag-material.js b/js/lib/rdge/materials/flag-material.js index a8c319e4..d0bf522f 100644 --- a/js/lib/rdge/materials/flag-material.js +++ b/js/lib/rdge/materials/flag-material.js | |||
@@ -27,6 +27,9 @@ var FlagMaterial = function FlagMaterial() { | |||
27 | 27 | ||
28 | this._hasVertexDeformation = true; | 28 | this._hasVertexDeformation = true; |
29 | 29 | ||
30 | // array textures indexed by shader uniform name | ||
31 | this._glTextures = []; | ||
32 | |||
30 | /////////////////////////////////////////////////////////////////////// | 33 | /////////////////////////////////////////////////////////////////////// |
31 | // Properties | 34 | // Properties |
32 | /////////////////////////////////////////////////////////////////////// | 35 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/fly-material.js b/js/lib/rdge/materials/fly-material.js index 7b880a2e..8fa2b614 100644 --- a/js/lib/rdge/materials/fly-material.js +++ b/js/lib/rdge/materials/fly-material.js | |||
@@ -19,6 +19,9 @@ var FlyMaterial = function FlyMaterial() { | |||
19 | this._time = 0.0; | 19 | this._time = 0.0; |
20 | this._dTime = 0.01; | 20 | this._dTime = 0.01; |
21 | 21 | ||
22 | // array textures indexed by shader uniform name | ||
23 | this._glTextures = []; | ||
24 | |||
22 | /////////////////////////////////////////////////////////////////////// | 25 | /////////////////////////////////////////////////////////////////////// |
23 | // Properties | 26 | // Properties |
24 | /////////////////////////////////////////////////////////////////////// | 27 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/keleidoscope-material.js b/js/lib/rdge/materials/keleidoscope-material.js index 2754420f..0696063d 100644 --- a/js/lib/rdge/materials/keleidoscope-material.js +++ b/js/lib/rdge/materials/keleidoscope-material.js | |||
@@ -19,6 +19,9 @@ var KeleidoscopeMaterial = function KeleidoscopeMaterial() { | |||
19 | this._time = 0.0; | 19 | this._time = 0.0; |
20 | this._dTime = 0.01; | 20 | this._dTime = 0.01; |
21 | 21 | ||
22 | // array textures indexed by shader uniform name | ||
23 | this._glTextures = []; | ||
24 | |||
22 | /////////////////////////////////////////////////////////////////////// | 25 | /////////////////////////////////////////////////////////////////////// |
23 | // Properties | 26 | // Properties |
24 | /////////////////////////////////////////////////////////////////////// | 27 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/radial-blur-material.js b/js/lib/rdge/materials/radial-blur-material.js index 57f4a6e0..0eb13631 100644 --- a/js/lib/rdge/materials/radial-blur-material.js +++ b/js/lib/rdge/materials/radial-blur-material.js | |||
@@ -19,6 +19,9 @@ var RadialBlurMaterial = function RadialBlurMaterial() { | |||
19 | this._time = 0.0; | 19 | this._time = 0.0; |
20 | this._dTime = 0.01; | 20 | this._dTime = 0.01; |
21 | 21 | ||
22 | // array textures indexed by shader uniform name | ||
23 | this._glTextures = []; | ||
24 | |||
22 | /////////////////////////////////////////////////////////////////////// | 25 | /////////////////////////////////////////////////////////////////////// |
23 | // Property Accessors | 26 | // Property Accessors |
24 | /////////////////////////////////////////////////////////////////////// | 27 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/relief-tunnel-material.js b/js/lib/rdge/materials/relief-tunnel-material.js index 9404e359..0390337e 100644 --- a/js/lib/rdge/materials/relief-tunnel-material.js +++ b/js/lib/rdge/materials/relief-tunnel-material.js | |||
@@ -21,6 +21,9 @@ var ReliefTunnelMaterial = function ReliefTunnelMaterial() | |||
21 | this._time = 0.0; | 21 | this._time = 0.0; |
22 | this._dTime = 0.01; | 22 | this._dTime = 0.01; |
23 | 23 | ||
24 | // array textures indexed by shader uniform name | ||
25 | this._glTextures = []; | ||
26 | |||
24 | /////////////////////////////////////////////////////////////////////// | 27 | /////////////////////////////////////////////////////////////////////// |
25 | // Material Property Accessors | 28 | // Material Property Accessors |
26 | /////////////////////////////////////////////////////////////////////// | 29 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/square-tunnel-material.js b/js/lib/rdge/materials/square-tunnel-material.js index bffae254..df2193c4 100644 --- a/js/lib/rdge/materials/square-tunnel-material.js +++ b/js/lib/rdge/materials/square-tunnel-material.js | |||
@@ -19,6 +19,9 @@ var SquareTunnelMaterial = function SquareTunnelMaterial() { | |||
19 | this._time = 0.0; | 19 | this._time = 0.0; |
20 | this._dTime = 0.01; | 20 | this._dTime = 0.01; |
21 | 21 | ||
22 | // array textures indexed by shader uniform name | ||
23 | this._glTextures = []; | ||
24 | |||
22 | /////////////////////////////////////////////////////////////////////// | 25 | /////////////////////////////////////////////////////////////////////// |
23 | // Material Property Accessors | 26 | // Material Property Accessors |
24 | /////////////////////////////////////////////////////////////////////// | 27 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/star-material.js b/js/lib/rdge/materials/star-material.js index 9f94b8c3..c99a1639 100644 --- a/js/lib/rdge/materials/star-material.js +++ b/js/lib/rdge/materials/star-material.js | |||
@@ -19,6 +19,9 @@ var StarMaterial = function StarMaterial() { | |||
19 | this._time = 0.0; | 19 | this._time = 0.0; |
20 | this._dTime = 0.01; | 20 | this._dTime = 0.01; |
21 | 21 | ||
22 | // array textures indexed by shader uniform name | ||
23 | this._glTextures = []; | ||
24 | |||
22 | /////////////////////////////////////////////////////////////////////// | 25 | /////////////////////////////////////////////////////////////////////// |
23 | // Property Accessors | 26 | // Property Accessors |
24 | /////////////////////////////////////////////////////////////////////// | 27 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/tunnel-material.js b/js/lib/rdge/materials/tunnel-material.js index b833a251..ec5eff99 100644 --- a/js/lib/rdge/materials/tunnel-material.js +++ b/js/lib/rdge/materials/tunnel-material.js | |||
@@ -20,6 +20,9 @@ var TunnelMaterial = function TunnelMaterial() { | |||
20 | this._time = 0.0; | 20 | this._time = 0.0; |
21 | this._dTime = 0.001; | 21 | this._dTime = 0.001; |
22 | 22 | ||
23 | // array textures indexed by shader uniform name | ||
24 | this._glTextures = []; | ||
25 | |||
23 | /////////////////////////////////////////////////////////////////////// | 26 | /////////////////////////////////////////////////////////////////////// |
24 | // Material Property Accessors | 27 | // Material Property Accessors |
25 | /////////////////////////////////////////////////////////////////////// | 28 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/twist-material.js b/js/lib/rdge/materials/twist-material.js index 35f7eda2..9a78914d 100644 --- a/js/lib/rdge/materials/twist-material.js +++ b/js/lib/rdge/materials/twist-material.js | |||
@@ -21,6 +21,9 @@ var TwistMaterial = function TwistMaterial() { | |||
21 | this._time = 0.0; | 21 | this._time = 0.0; |
22 | this._dTime = 0.01; | 22 | this._dTime = 0.01; |
23 | 23 | ||
24 | // array textures indexed by shader uniform name | ||
25 | this._glTextures = []; | ||
26 | |||
24 | /////////////////////////////////////////////////////////////////////// | 27 | /////////////////////////////////////////////////////////////////////// |
25 | // Material Property Accessors | 28 | // Material Property Accessors |
26 | /////////////////////////////////////////////////////////////////////// | 29 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/uber-material.js b/js/lib/rdge/materials/uber-material.js index 0fef78f6..9aa0f7ea 100755 --- a/js/lib/rdge/materials/uber-material.js +++ b/js/lib/rdge/materials/uber-material.js | |||
@@ -41,6 +41,9 @@ var UberMaterial = function UberMaterial() { | |||
41 | 41 | ||
42 | this._MAX_LIGHTS = 4; | 42 | this._MAX_LIGHTS = 4; |
43 | 43 | ||
44 | // array textures indexed by shader uniform name | ||
45 | this._glTextures = []; | ||
46 | |||
44 | /////////////////////////////////////////////////////////////////////// | 47 | /////////////////////////////////////////////////////////////////////// |
45 | // Material Property Accessors | 48 | // Material Property Accessors |
46 | /////////////////////////////////////////////////////////////////////// | 49 | /////////////////////////////////////////////////////////////////////// |
diff --git a/js/lib/rdge/materials/water-material.js b/js/lib/rdge/materials/water-material.js index 3e63ddb6..1dd127fc 100644 --- a/js/lib/rdge/materials/water-material.js +++ b/js/lib/rdge/materials/water-material.js | |||
@@ -24,6 +24,9 @@ var WaterMaterial = function WaterMaterial() | |||
24 | this._time = 0.0; | 24 | this._time = 0.0; |
25 | this._dTime = 0.01; | 25 | this._dTime = 0.01; |
26 | 26 | ||
27 | // array textures indexed by shader uniform name | ||
28 | this._glTextures = []; | ||
29 | |||
27 | this.isAnimated = function() { return true; }; | 30 | this.isAnimated = function() { return true; }; |
28 | this.getShaderDef = function() { return waterMaterialDef; }; | 31 | this.getShaderDef = function() { return waterMaterialDef; }; |
29 | 32 | ||
diff --git a/js/lib/rdge/materials/z-invert-material.js b/js/lib/rdge/materials/z-invert-material.js index 99b835b3..f1526b39 100644 --- a/js/lib/rdge/materials/z-invert-material.js +++ b/ |