diff options
Diffstat (limited to 'js/lib/rdge/materials/twist-vert-material.js')
-rw-r--r-- | js/lib/rdge/materials/twist-vert-material.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/js/lib/rdge/materials/twist-vert-material.js b/js/lib/rdge/materials/twist-vert-material.js index 0cf4d954..54e5168f 100644 --- a/js/lib/rdge/materials/twist-vert-material.js +++ b/js/lib/rdge/materials/twist-vert-material.js | |||
@@ -121,44 +121,6 @@ function TwistVertMaterial() { | |||
121 | } | 121 | } |
122 | }; | 122 | }; |
123 | 123 | ||
124 | this.export = function () { | ||
125 | // this function should be overridden by subclasses | ||
126 | var exportStr = "material: " + this.getShaderName() + "\n"; | ||
127 | exportStr += "name: " + this.getName() + "\n"; | ||
128 | |||
129 | if (this._shader) | ||
130 | exportStr += "color: " + String(this._shader.twistMe.color) + "\n"; | ||
131 | else | ||
132 | exportStr += "color: " + this.getColor() + "\n"; | ||
133 | exportStr += "endMaterial\n"; | ||
134 | |||
135 | return exportStr; | ||
136 | }; | ||
137 | |||
138 | this.import = function (importStr) { | ||
139 | var pu = new MaterialParser(importStr); | ||
140 | var material = pu.nextValue("material: "); | ||
141 | if (material != this.getShaderName()) throw new Error("ill-formed material"); | ||
142 | this.setName(pu.nextValue("name: ")); | ||
143 | |||
144 | var rtnStr; | ||
145 | try { | ||
146 | var color = eval("[" + pu.nextValue("color: ") + "]"); | ||
147 | |||
148 | this.setProperty("color", color); | ||
149 | |||
150 | var endKey = "endMaterial\n"; | ||
151 | var index = importStr.indexOf(endKey); | ||
152 | index += endKey.length; | ||
153 | rtnStr = importStr.substr(index); | ||
154 | } | ||
155 | catch (e) { | ||
156 | throw new Error("could not import material: " + importStr); | ||
157 | } | ||
158 | |||
159 | return rtnStr; | ||
160 | }; | ||
161 | |||
162 | this.update = function (time) { | 124 | this.update = function (time) { |
163 | if (this._shader && this._shader.twistMe) { | 125 | if (this._shader && this._shader.twistMe) { |
164 | var angle = this._angle; | 126 | var angle = this._angle; |