diff options
Diffstat (limited to 'js/lib/rdge/materials/taper-material.js')
-rw-r--r-- | js/lib/rdge/materials/taper-material.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/js/lib/rdge/materials/taper-material.js b/js/lib/rdge/materials/taper-material.js index 2a70a153..356087d6 100644 --- a/js/lib/rdge/materials/taper-material.js +++ b/js/lib/rdge/materials/taper-material.js | |||
@@ -115,44 +115,6 @@ function TaperMaterial() { | |||
115 | } | 115 | } |
116 | }; | 116 | }; |
117 | 117 | ||
118 | this.export = function () { | ||
119 | // this function should be overridden by subclasses | ||
120 | var exportStr = "material: " + this.getShaderName() + "\n"; | ||
121 | exportStr += "name: " + this.getName() + "\n"; | ||
122 | |||
123 | if (this._shader) | ||
124 | exportStr += "color: " + this._shader.colorMe.color + "\n"; | ||
125 | else | ||
126 | exportStr += "color: " + this.getColor() + "\n"; | ||
127 | exportStr += "endMaterial\n"; | ||
128 | |||
129 | return exportStr; | ||
130 | }; | ||
131 | |||
132 | this.import = function (importStr) { | ||
133 | var pu = new MaterialParser(importStr); | ||
134 | var material = pu.nextValue("material: "); | ||
135 | if (material != this.getShaderName()) throw new Error("ill-formed material"); | ||
136 | this.setName(pu.nextValue("name: ")); | ||
137 | |||
138 | var rtnStr; | ||
139 | try { | ||
140 | var color = eval("[" + pu.nextValue("color: ") + "]"); | ||
141 | |||
142 | this.setProperty("color", color); | ||
143 | |||
144 | var endKey = "endMaterial\n"; | ||
145 | var index = importStr.indexOf(endKey); | ||
146 | index += endKey.length; | ||
147 | rtnStr = importStr.substr(index); | ||
148 | } | ||
149 | catch (e) { | ||
150 | throw new Error("could not import material: " + importStr); | ||
151 | } | ||
152 | |||
153 | return rtnStr; | ||
154 | }; | ||
155 | |||
156 | this.update = function (time) { | 118 | this.update = function (time) { |
157 | //var speed = 0.01; | 119 | //var speed = 0.01; |
158 | //time *= speed; | 120 | //time *= speed; |