diff options
Diffstat (limited to 'js/lib/rdge/materials/flat-material.js')
-rwxr-xr-x | js/lib/rdge/materials/flat-material.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/js/lib/rdge/materials/flat-material.js b/js/lib/rdge/materials/flat-material.js index 106641a9..9442ae5b 100755 --- a/js/lib/rdge/materials/flat-material.js +++ b/js/lib/rdge/materials/flat-material.js | |||
@@ -79,34 +79,6 @@ var FlatMaterial = function FlatMaterial() { | |||
79 | }; | 79 | }; |
80 | /////////////////////////////////////////////////////////////////////// | 80 | /////////////////////////////////////////////////////////////////////// |
81 | 81 | ||
82 | this.export = function () { | ||
83 | // this function should be overridden by subclasses | ||
84 | var exportStr = "material: " + this.getShaderName() + "\n"; | ||
85 | exportStr += "name: " + this.getName() + "\n"; | ||
86 | exportStr += "color: " + String(this._propValues["color"]) + "\n"; | ||
87 | exportStr += "endMaterial\n"; | ||
88 | |||
89 | return exportStr; | ||
90 | }; | ||
91 | |||
92 | this.import = function (importStr) { | ||
93 | var pu = new MaterialParser(importStr); | ||
94 | var material = pu.nextValue("material: "); | ||
95 | if (material != this.getShaderName()) throw new Error("ill-formed material"); | ||
96 | this.setName(pu.nextValue("name: ")); | ||
97 | |||
98 | var rtnStr; | ||
99 | try { | ||
100 | var color = eval("[" + pu.nextValue("color: ") + "]"); | ||
101 | this.setProperty("color", color); | ||
102 | } | ||
103 | catch (e) { | ||
104 | throw new Error("could not import material: " + importStr); | ||
105 | } | ||
106 | |||
107 | return rtnStr; | ||
108 | }; | ||
109 | |||
110 | this.exportJSON = function () { | 82 | this.exportJSON = function () { |
111 | var jObj = | 83 | var jObj = |
112 | { | 84 | { |