aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials')
-rwxr-xr-xjs/lib/rdge/materials/bump-metal-material.js2
-rw-r--r--js/lib/rdge/materials/cloud-material.js21
-rw-r--r--js/lib/rdge/materials/pulse-material.js6
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js4
4 files changed, 27 insertions, 6 deletions
diff --git a/js/lib/rdge/materials/bump-metal-material.js b/js/lib/rdge/materials/bump-metal-material.js
index 0570e8ed..7e192a12 100755
--- a/js/lib/rdge/materials/bump-metal-material.js
+++ b/js/lib/rdge/materials/bump-metal-material.js
@@ -168,7 +168,7 @@ var BumpMetalMaterial = function BumpMetalMaterial() {
168 if (glTex) 168 if (glTex)
169 { 169 {
170 if (glTex.isAnimated()) 170 if (glTex.isAnimated())
171 glTex.rerender(); 171 glTex.render();
172 172
173 var tex = glTex.getTexture(); 173 var tex = glTex.getTexture();
174 if (tex) 174 if (tex)
diff --git a/js/lib/rdge/materials/cloud-material.js b/js/lib/rdge/materials/cloud-material.js
index 85088f91..f7f4c6bb 100644
--- a/js/lib/rdge/materials/cloud-material.js
+++ b/js/lib/rdge/materials/cloud-material.js
@@ -176,6 +176,27 @@ var CloudMaterial = function CloudMaterial() {
176 } 176 }
177 }; 177 };
178 178
179 this.generateQuads = function()
180 {
181 var quads = [];
182 for ( i = 0; i < 8000; i++ )
183 {
184 var quad =
185 {
186 }
187 x: Math.random() * 1000 - 500,
188 y = - Math.random() * Math.random() * 200 - 15,
189 z = i,
190 rotation.z = Math.random() * Math.PI,
191 scale = Math.random() * Math.random() * 1.5 + 0.5,
192 }
193
194 quads.push( quad );
195 }
196
197 this._quads = quads;
198 };
199
179 // JSON export 200 // JSON export
180 this.exportJSON = function() 201 this.exportJSON = function()
181 { 202 {
diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js
index 0a7a5dd8..9cb500c8 100644
--- a/js/lib/rdge/materials/pulse-material.js
+++ b/js/lib/rdge/materials/pulse-material.js
@@ -139,7 +139,7 @@ var PulseMaterial = function PulseMaterial()
139 if (this._glTex) 139 if (this._glTex)
140 { 140 {
141 if (this._glTex.isAnimated()) 141 if (this._glTex.isAnimated())
142 this._glTex.rerender(); 142 this._glTex.render();
143 tex = this._glTex.getTexture(); 143 tex = this._glTex.getTexture();
144 } 144 }
145 145
@@ -157,7 +157,7 @@ var PulseMaterial = function PulseMaterial()
157 { 157 {
158 if (!this._glTex.isAnimated()) 158 if (!this._glTex.isAnimated())
159 { 159 {
160 this._glTex.rerender(); 160 this._glTex.render();
161 this.updateTexture(); 161 this.updateTexture();
162 } 162 }
163 } 163 }
@@ -177,7 +177,7 @@ var PulseMaterial = function PulseMaterial()
177 { 177 {
178 //this.updateTexture(); 178 //this.updateTexture();
179 if (this._glTex.isAnimated()) 179 if (this._glTex.isAnimated())
180 this._glTex.rerender(); 180 this._glTex.render();
181 tex = this._glTex.getTexture(); 181 tex = this._glTex.getTexture();
182 if (tex) 182 if (tex)
183 technique.u_tex0.set( tex ); 183 technique.u_tex0.set( tex );
diff --git a/js/lib/rdge/materials/uber-material.js b/js/lib/rdge/materials/uber-material.js
index 71354216..4edb101f 100755
--- a/js/lib/rdge/materials/uber-material.js
+++ b/js/lib/rdge/materials/uber-material.js
@@ -300,7 +300,7 @@ var UberMaterial = function UberMaterial() {
300 { 300 {
301 if (!this._diffuseTexture.isAnimated()) 301 if (!this._diffuseTexture.isAnimated())
302 { 302 {
303 this._diffuseTexture.rerender(); 303 this._diffuseTexture.render();
304 var tex = this._diffuseTexture.getTexture(); 304 var tex = this._diffuseTexture.getTexture();
305 technique.s_diffuseMap.set( tex ); 305 technique.s_diffuseMap.set( tex );
306 } 306 }
@@ -412,7 +412,7 @@ var UberMaterial = function UberMaterial() {
412 { 412 {
413 if (this._diffuseTexture && this._diffuseTexture.isAnimated()) 413 if (this._diffuseTexture && this._diffuseTexture.isAnimated())
414 { 414 {
415 this._diffuseTexture.rerender(); 415 this._diffuseTexture.render();
416 technique.s_diffuseMap.set( this._diffuseTexture.getTexture() ); 416 technique.s_diffuseMap.set( this._diffuseTexture.getTexture() );
417 } 417 }
418 } 418 }