diff options
author | hwc487 | 2012-04-08 05:26:08 -0700 |
---|---|---|
committer | hwc487 | 2012-04-08 05:26:08 -0700 |
commit | 5b878fdfaa696c1a01afa191c1d65c0ccb006b65 (patch) | |
tree | ca9ae5497500a46edd00e0e61b8e49ae53242e4d /js/lib/rdge/materials/cloud-material.js | |
parent | 416ce9d4954e0a7f4ee7b9afe43bf691fdb276f4 (diff) | |
download | ninja-5b878fdfaa696c1a01afa191c1d65c0ccb006b65.tar.gz |
Clouds
Diffstat (limited to 'js/lib/rdge/materials/cloud-material.js')
-rw-r--r-- | js/lib/rdge/materials/cloud-material.js | 21 |
1 files changed, 21 insertions, 0 deletions
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 | { |