aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge
diff options
context:
space:
mode:
authorhwc4872012-06-12 15:31:48 -0700
committerhwc4872012-06-12 15:31:48 -0700
commit1d65f82295ea96e019409d08daa5d11e84a44581 (patch)
treec0d4857862a101f411d23137b486f6741401bb8d /js/lib/rdge
parentd4ca478ad313c6c20834e410ba14ad3a5e7b20bf (diff)
downloadninja-1d65f82295ea96e019409d08daa5d11e84a44581.tar.gz
Runtime material fixes
Diffstat (limited to 'js/lib/rdge')
-rwxr-xr-xjs/lib/rdge/materials/material.js3
-rwxr-xr-xjs/lib/rdge/materials/radial-gradient-material.js6
2 files changed, 9 insertions, 0 deletions
diff --git a/js/lib/rdge/materials/material.js b/js/lib/rdge/materials/material.js
index d2586b58..34529e6b 100755
--- a/js/lib/rdge/materials/material.js
+++ b/js/lib/rdge/materials/material.js
@@ -331,6 +331,9 @@ var Material = function GLMaterial( world ) {
331 jObj[prop] = value; 331 jObj[prop] = value;
332 } 332 }
333 333
334 if (this.customExport)
335 jObj = this.customExport( jObj );
336
334 return jObj; 337 return jObj;
335 }; 338 };
336 339
diff --git a/js/lib/rdge/materials/radial-gradient-material.js b/js/lib/rdge/materials/radial-gradient-material.js
index b5ffd01a..0e67daf0 100755
--- a/js/lib/rdge/materials/radial-gradient-material.js
+++ b/js/lib/rdge/materials/radial-gradient-material.js
@@ -108,6 +108,12 @@ var RadialGradientMaterial = function RadialGradientMaterial() {
108 108
109 } 109 }
110 }; 110 };
111
112 this.customExport = function( jObj )
113 {
114 jObj.u_texTransform = this._textureTransform.slice();
115 return jObj;
116 }
111}; 117};
112 118
113/////////////////////////////////////////////////////////////////////////////////////// 119///////////////////////////////////////////////////////////////////////////////////////