diff options
Diffstat (limited to 'js/lib')
-rw-r--r-- | js/lib/rdge/materials/cloud-material.js | 2 | ||||
-rw-r--r-- | js/lib/rdge/texture.js | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/js/lib/rdge/materials/cloud-material.js b/js/lib/rdge/materials/cloud-material.js index c1dabce8..f253718a 100644 --- a/js/lib/rdge/materials/cloud-material.js +++ b/js/lib/rdge/materials/cloud-material.js | |||
@@ -188,6 +188,8 @@ var CloudMaterial = function CloudMaterial() { | |||
188 | var material = this._materialNode; | 188 | var material = this._materialNode; |
189 | if (material) | 189 | if (material) |
190 | { | 190 | { |
191 | if (this._srcWorld) this._srcWorld.draw(); | ||
192 | |||
191 | var technique = material.shaderProgram['default']; | 193 | var technique = material.shaderProgram['default']; |
192 | var renderer = g_Engine.getContext().renderer; | 194 | var renderer = g_Engine.getContext().renderer; |
193 | if (renderer && technique) { | 195 | if (renderer && technique) { |
diff --git a/js/lib/rdge/texture.js b/js/lib/rdge/texture.js index 345effd6..569bc364 100644 --- a/js/lib/rdge/texture.js +++ b/js/lib/rdge/texture.js | |||
@@ -159,6 +159,8 @@ function Texture( dstWorld, texMapName, wrap, mips ) | |||
159 | var __texCounter = 0; | 159 | var __texCounter = 0; |
160 | this.loadFromCanvas = function() | 160 | this.loadFromCanvas = function() |
161 | { | 161 | { |
162 | var NJUtils = require("js/lib/NJUtils").NJUtils; | ||
163 | |||
162 | var srcCanvas = this._srcCanvas; | 164 | var srcCanvas = this._srcCanvas; |
163 | var wrap = this._wrap; | 165 | var wrap = this._wrap; |
164 | var mips = this._mips; | 166 | var mips = this._mips; |
@@ -175,7 +177,8 @@ function Texture( dstWorld, texMapName, wrap, mips ) | |||
175 | 177 | ||
176 | // create the canvas and context to render into | 178 | // create the canvas and context to render into |
177 | var doc = srcCanvas.ownerDocument; | 179 | var doc = srcCanvas.ownerDocument; |
178 | this._renderCanvas = doc.createElement("texture_canvas"); | 180 | //this._renderCanvas = doc.createElement("texture_canvas"); |
181 | this._renderCanvas = NJUtils.makeNJElement("canvas", "texture_canvas", "shape", {"data-RDGE-id": NJUtils.generateRandom()}, true); | ||
179 | 182 | ||
180 | this.render(); | 183 | this.render(); |
181 | 184 | ||