diff options
Diffstat (limited to 'js/lib/rdge')
-rw-r--r-- | js/lib/rdge/materials/twist-vert-material.js | 24 |
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); |