From 98a02c1ac6f189aba93d7cce64ba5bdbc0617f6c Mon Sep 17 00:00:00 2001 From: hwc487 Date: Tue, 20 Mar 2012 16:26:52 -0700 Subject: Bug Fixes for Canvas & WebGL File IO --- js/lib/rdge/materials/plasma-material.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'js/lib/rdge/materials/plasma-material.js') diff --git a/js/lib/rdge/materials/plasma-material.js b/js/lib/rdge/materials/plasma-material.js index 86b1a93c..316a5989 100644 --- a/js/lib/rdge/materials/plasma-material.js +++ b/js/lib/rdge/materials/plasma-material.js @@ -67,6 +67,25 @@ var PlasmaMaterial = function PlasmaMaterial() { this._time += this._dTime; } + this.exportJSON = function() + { + + var jObj = + { + 'material' : this.getShaderName(), + 'name' : this.getName(), + 'speed' : this._speed, + 'dTime' : this._dTime + } + + return jObj; + } + + this.importJSON = function( jObj ) + { + this._speed = jObj.speed; + this._dTime = jObj.dTime; + } }; /////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From eb59a523258cad3351cba9bf8de986e90a8e5b1c Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 21 Mar 2012 15:17:58 -0700 Subject: Added material library data to the canvas data. --- js/lib/rdge/materials/plasma-material.js | 1 - 1 file changed, 1 deletion(-) (limited to 'js/lib/rdge/materials/plasma-material.js') diff --git a/js/lib/rdge/materials/plasma-material.js b/js/lib/rdge/materials/plasma-material.js index 316a5989..b04d8451 100644 --- a/js/lib/rdge/materials/plasma-material.js +++ b/js/lib/rdge/materials/plasma-material.js @@ -69,7 +69,6 @@ var PlasmaMaterial = function PlasmaMaterial() { this.exportJSON = function() { - var jObj = { 'material' : this.getShaderName(), -- cgit v1.2.3