diff options
author | hwc487 | 2012-04-12 06:24:46 -0700 |
---|---|---|
committer | hwc487 | 2012-04-12 06:24:46 -0700 |
commit | 1fa8516bcd0fb0277c13a7081b5a51ce041d3496 (patch) | |
tree | 11f80ddc57a6cc47d7a57ff8091b5cb435d6d253 /js/lib/rdge/texture.js | |
parent | b5aa082842f798d1eec582428468a322bd5a017f (diff) | |
download | ninja-1fa8516bcd0fb0277c13a7081b5a51ce041d3496.tar.gz |
Cloud material
Diffstat (limited to 'js/lib/rdge/texture.js')
-rw-r--r-- | js/lib/rdge/texture.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/js/lib/rdge/texture.js b/js/lib/rdge/texture.js index 569bc364..b85ee076 100644 --- a/js/lib/rdge/texture.js +++ b/js/lib/rdge/texture.js | |||
@@ -75,16 +75,19 @@ function Texture( dstWorld, texMapName, wrap, mips ) | |||
75 | if (srcCanvas) | 75 | if (srcCanvas) |
76 | { | 76 | { |
77 | this._srcCanvas = srcCanvas; | 77 | this._srcCanvas = srcCanvas; |
78 | if (srcCanvas.elementModel && srcCanvas.elementModel.shapeModel && srcCanvas.elementModel.shapeModel.GLWorld) | 78 | var srcWorld |
79 | if (srcCanvas.elementModel && srcCanvas.elementModel.shapeModel && srcCanvas.elementModel.shapeModel.GLWorld) | ||
80 | srcWorld = srcCanvas.elementModel.shapeModel.GLWorld; | ||
81 | if (!srcWorld) srcWorld = srcCanvas.__GLWorld; | ||
82 | if (srcWorld) | ||
79 | { | 83 | { |
80 | this._srcWorld = srcCanvas.elementModel.shapeModel.GLWorld; | 84 | this._srcWorld = srcWorld; |
81 | 85 | ||
82 | // add a notifier to the world | 86 | // add a notifier to the world |
83 | this._srcWorld.addListener( this, this.worldCallback, { srcWorld: this._srcWorld } ); | 87 | srcWorld.addListener( this, this.worldCallback, { srcWorld: this._srcWorld } ); |
84 | 88 | ||
85 | // check if the source is animated | 89 | // check if the source is animated |
86 | if (srcCanvas.elementModel && srcCanvas.elementModel.shapeModel && srcCanvas.elementModel.shapeModel.GLWorld) | 90 | this._isAnimated = srcWorld._hasAnimatedMaterials; |
87 | this._isAnimated = this._srcWorld._hasAnimatedMaterials; | ||
88 | } | 91 | } |
89 | 92 | ||
90 | this.loadFromCanvas(); | 93 | this.loadFromCanvas(); |