From 129b5282ef35f320ea39d1878d2b5f77ae73a3e2 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 29 May 2012 14:36:59 -0700 Subject: Fixed authortime & runtime for twist vertex shader. --- js/lib/rdge/materials/twist-vert-material.js | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'js/lib/rdge/materials') 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() this.exportJSON = function () { var jObj = { - 'material': this.getShaderName(), - 'name': this.getName(), + 'material' : this.getShaderName(), + 'name' : this.getName(), + + 'tex0' : this._propValues[this._propNames[4]], + 'tex1' : this._propValues[this._propNames[5]], + + 'speed' : this._propValues[this._propNames[3]], + + 'limit1' : this._propValues[this._propNames[0]], + 'limit2' : this._propValues[this._propNames[1]], + 'angle' : this._propValues[this._propNames[2]] } return jObj; @@ -137,6 +146,17 @@ var TwistVertMaterial = function TwistVertMaterial() this.setName(jObj.name); try { + + this._propValues[this._propNames[4]] = jObj.tex0; + this._propValues[this._propNames[5]] = jObj.tex1; + + this._propValues[this._propNames[3]] = jObj.speed; + + this._propValues[this._propNames[0]] = jObj.limit1; + this._propValues[this._propNames[1]] = jObj.limit2; + this._propValues[this._propNames[2]] = jObj.angle; + + this.updateShaderValues(); } catch (e) { throw new Error("could not import material: " + importStr); -- cgit v1.2.3