aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge
diff options
context:
space:
mode:
authorhwc4872012-05-29 14:36:59 -0700
committerhwc4872012-05-29 14:36:59 -0700
commit129b5282ef35f320ea39d1878d2b5f77ae73a3e2 (patch)
tree13f485597bd08571aef4fdf87d3b6704e08c8a64 /js/lib/rdge
parent08e9abf8db06f714a95f0490d65c7337bed648b8 (diff)
downloadninja-129b5282ef35f320ea39d1878d2b5f77ae73a3e2.tar.gz
Fixed authortime & runtime for twist vertex shader.
Diffstat (limited to 'js/lib/rdge')
-rw-r--r--js/lib/rdge/materials/twist-vert-material.js24
1 files changed, 22 insertions, 2 deletions
diff --git a/js/lib/rdge/materials/twist-vert-material.js b/js/lib/rdge/materials/twist-vert-material.js
index 4d5ab88d..cc232444 100644
--- a/js/lib/rdge/materials/twist-vert-material.js
+++ b/js/lib/rdge/materials/twist-vert-material.js
@@ -125,8 +125,17 @@ var TwistVertMaterial = function TwistVertMaterial()
125 this.exportJSON = function () { 125 this.exportJSON = function () {
126 var jObj = 126 var jObj =
127 { 127 {
128 'material': this.getShaderName(), 128 'material' : this.getShaderName(),
129 'name': this.getName(), 129 'name' : this.getName(),
130
131 'tex0' : this._propValues[this._propNames[4]],
132 'tex1' : this._propValues[this._propNames[5]],
133
134 'speed' : this._propValues[this._propNames[3]],
135
136 'limit1' : this._propValues[this._propNames[0]],
137 'limit2' : this._propValues[this._propNames[1]],
138 'angle' : this._propValues[this._propNames[2]]
130 } 139 }
131 140
132 return jObj; 141 return jObj;
@@ -137,6 +146,17 @@ var TwistVertMaterial = function TwistVertMaterial()
137 this.setName(jObj.name); 146 this.setName(jObj.name);
138 147
139 try { 148 try {
149
150 this._propValues[this._propNames[4]] = jObj.tex0;
151 this._propValues[this._propNames[5]] = jObj.tex1;
152
153 this._propValues[this._propNames[3]] = jObj.speed;
154
155 this._propValues[this._propNames[0]] = jObj.limit1;
156 this._propValues[this._propNames[1]] = jObj.limit2;
157 this._propValues[this._propNames[2]] = jObj.angle;
158
159 this.updateShaderValues();
140 } 160 }
141 catch (e) { 161 catch (e) {
142 throw new Error("could not import material: " + importStr); 162 throw new Error("could not import material: " + importStr);