aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/water-material.js
diff options
context:
space:
mode:
authorhwc4872012-03-20 16:26:52 -0700
committerhwc4872012-03-20 16:26:52 -0700
commit98a02c1ac6f189aba93d7cce64ba5bdbc0617f6c (patch)
tree93a3fc2c1aaffb97edeecc890e5540f7d15ad838 /js/lib/rdge/materials/water-material.js
parent43ea2515f1482eeb77454f407111f0568c056f72 (diff)
downloadninja-98a02c1ac6f189aba93d7cce64ba5bdbc0617f6c.tar.gz
Bug Fixes for Canvas & WebGL File IO
Diffstat (limited to 'js/lib/rdge/materials/water-material.js')
-rw-r--r--js/lib/rdge/materials/water-material.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/water-material.js b/js/lib/rdge/materials/water-material.js
index cac5a249..565055a1 100644
--- a/js/lib/rdge/materials/water-material.js
+++ b/js/lib/rdge/materials/water-material.js
@@ -18,6 +18,7 @@ var WaterMaterial = function WaterMaterial() {
18 this._shaderName = "water"; 18 this._shaderName = "water";
19 19
20 this._texMap = 'assets/images/rocky-normal.jpg'; 20 this._texMap = 'assets/images/rocky-normal.jpg';
21 //this._texMap = 'assets/images/powderblue.png';
21 22
22 this._time = 0.0; 23 this._time = 0.0;
23 this._dTime = 0.01; 24 this._dTime = 0.01;
@@ -27,6 +28,7 @@ var WaterMaterial = function WaterMaterial() {
27 /////////////////////////////////////////////////////////////////////// 28 ///////////////////////////////////////////////////////////////////////
28 // all defined in parent PulseMaterial.js 29 // all defined in parent PulseMaterial.js
29 // load the local default value 30 // load the local default value
31 this._propValues = [];
30 this._propValues[ this._propNames[0] ] = this._texMap.slice(0); 32 this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
31 33
32 /////////////////////////////////////////////////////////////////////// 34 ///////////////////////////////////////////////////////////////////////
@@ -115,6 +117,29 @@ var waterMaterialDef =
115 } 117 }
116}; 118};
117 119
120/*
121var ParisMaterial = function ParisMaterial()
122{
123 // initialize the inherited members
124 this.inheritedFrom = WaterMaterial;
125 this.inheritedFrom();
126
127 this._name = "ParisMaterial";
128 this._shaderName = "water";
129
130 this._texMap = 'assets/images/paris.png';
131 this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
132
133 this._diffuseColor = [0.5, 0.5, 0.5, 0.5];
134 this._propValues[ this._propNames[1] ] = this._diffuseColor.slice();
135}
136ParisMaterial.prototype = new PulseMaterial();
137if (typeof exports === "object") {
138 exports.ParisMaterial = ParisMaterial;
139}
140*/
141
142
118WaterMaterial.prototype = new PulseMaterial(); 143WaterMaterial.prototype = new PulseMaterial();
119 144
120if (typeof exports === "object") { 145if (typeof exports === "object") {