From 96a0a8c916533eb5625816192ed38488f639326d Mon Sep 17 00:00:00 2001
From: Nivesh Rajbhandari
Date: Wed, 22 Feb 2012 11:00:20 -0800
Subject: Integrating canvas-2d drawing and WebGL fixes, including adding back
 WebGL materials.

Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
---
 js/helper-classes/RDGE/Materials/DeformMaterial.js | 133 +++++++++++
 js/helper-classes/RDGE/Materials/FlyMaterial.js    | 133 +++++++++++
 js/helper-classes/RDGE/Materials/JuliaMaterial.js  | 150 ++++++++++++
 .../RDGE/Materials/KeleidoscopeMaterial.js         | 149 ++++++++++++
 js/helper-classes/RDGE/Materials/MandelMaterial.js | 151 ++++++++++++
 js/helper-classes/RDGE/Materials/PlasmaMaterial.js | 134 +++++++++++
 js/helper-classes/RDGE/Materials/PulseMaterial.js  | 253 +++++++++++++++++++++
 .../RDGE/Materials/RadialBlurMaterial.js           | 246 ++++++++++++++++++++
 .../RDGE/Materials/ReliefTunnelMaterial.js         | 133 +++++++++++
 .../RDGE/Materials/SquareTunnelMaterial.js         | 133 +++++++++++
 js/helper-classes/RDGE/Materials/StarMaterial.js   | 133 +++++++++++
 js/helper-classes/RDGE/Materials/TaperMaterial.js  | 223 ++++++++++++++++++
 js/helper-classes/RDGE/Materials/TunnelMaterial.js | 133 +++++++++++
 js/helper-classes/RDGE/Materials/TwistMaterial.js  | 149 ++++++++++++
 .../RDGE/Materials/TwistVertMaterial.js            | 248 ++++++++++++++++++++
 js/helper-classes/RDGE/Materials/WaterMaterial.js  | 133 +++++++++++
 .../RDGE/Materials/ZInvertMaterial.js              | 133 +++++++++++
 17 files changed, 2767 insertions(+)
 create mode 100644 js/helper-classes/RDGE/Materials/DeformMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/FlyMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/JuliaMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/KeleidoscopeMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/MandelMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/PlasmaMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/PulseMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/RadialBlurMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/ReliefTunnelMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/SquareTunnelMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/StarMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/TaperMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/TunnelMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/TwistMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/TwistVertMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/WaterMaterial.js
 create mode 100644 js/helper-classes/RDGE/Materials/ZInvertMaterial.js

(limited to 'js/helper-classes/RDGE/Materials')

diff --git a/js/helper-classes/RDGE/Materials/DeformMaterial.js b/js/helper-classes/RDGE/Materials/DeformMaterial.js
new file mode 100644
index 00000000..ddc97383
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/DeformMaterial.js
@@ -0,0 +1,133 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function DeformMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = PulseMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "DeformMaterial";
+	this._shaderName = "deform";
+
+	this._texMap = 'assets/images/rocky-normal.jpg';
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Properties
+    ///////////////////////////////////////////////////////////////////////
+	// all defined in parent PulseMaterial.js
+	// load the local default value
+	this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// allocate a new uber material
+		var newMat = new DeformMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			newMat.setProperty( propNames[i], propValues[i] );
+
+		return newMat;
+	} 
+
+	this.init = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = deformMaterialDef;
+		this._shader.init();
+
+		// set up the material node
+		this._materialNode = createMaterialNode("deformMaterial");
+		this._materialNode.setShader(this._shader);
+
+		this._time = 0;
+		if (this._shader && this._shader.default)
+			this._shader.default.u_time.set( [this._time] );
+
+		// set the shader values in the shader
+		this.updateTexture();
+		this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
+		this.update( 0 );
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var deformMaterialDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/Basic.vert.glsl",
+		'defaultFShader':"assets/shaders/Deform.frag.glsl"
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'  :   { 'type' : 'vec3' },
+					'normal' :  { 'type' : 'vec3' },
+					'texcoord'  :   { 'type' : 'vec2' }
+				},
+				// parameters
+				'params' : 
+				{
+					'u_tex0': { 'type' : 'tex2d' },
+					'u_time' : { 'type' : 'float' },
+					'u_resolution'  :   { 'type' : 'vec2' },
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
+
+
+
diff --git a/js/helper-classes/RDGE/Materials/FlyMaterial.js b/js/helper-classes/RDGE/Materials/FlyMaterial.js
new file mode 100644
index 00000000..4a44e2e5
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/FlyMaterial.js
@@ -0,0 +1,133 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function FlyMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = PulseMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "FlyMaterial";
+	this._shaderName = "fly";
+
+	this._texMap = 'assets/images/rocky-normal.jpg';
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Properties
+    ///////////////////////////////////////////////////////////////////////
+	// all defined in parent PulseMaterial.js
+	// load the local default value
+	this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// allocate a new uber material
+		var newMat = new FlyMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			newMat.setProperty( propNames[i], propValues[i] );
+
+		return newMat;
+	} 
+
+	this.init = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = flyMaterialDef;
+		this._shader.init();
+
+		// set up the material node
+		this._materialNode = createMaterialNode("flyMaterial");
+		this._materialNode.setShader(this._shader);
+
+		this._time = 0;
+		if (this._shader && this._shader.default)
+			this._shader.default.u_time.set( [this._time] );
+
+		// set the shader values in the shader
+		this.updateTexture();
+		this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
+		this.update( 0 );
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var flyMaterialDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/Basic.vert.glsl",
+		'defaultFShader':"assets/shaders/Fly.frag.glsl"
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'  :   { 'type' : 'vec3' },
+					'normal' :  { 'type' : 'vec3' },
+					'texcoord'  :   { 'type' : 'vec2' }
+				},
+				// parameters
+				'params' : 
+				{
+					'u_tex0': { 'type' : 'tex2d' },
+					'u_time' : { 'type' : 'float' },
+					'u_resolution'  :   { 'type' : 'vec2' },
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
+
+
+
diff --git a/js/helper-classes/RDGE/Materials/JuliaMaterial.js b/js/helper-classes/RDGE/Materials/JuliaMaterial.js
new file mode 100644
index 00000000..f95263f4
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/JuliaMaterial.js
@@ -0,0 +1,150 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function JuliaMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = PulseMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "JuliaMaterial";
+	this._shaderName = "julia";
+
+	this._texMap = 'assets/images/rocky-normal.jpg';
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Properties
+    ///////////////////////////////////////////////////////////////////////
+	// no properties
+	this._propNames			= [];
+	this._propLabels		= [];
+	this._propTypes			= [];
+	this._propValues		= [];
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// allocate a new uber material
+		var newMat = new JuliaMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			newMat.setProperty( propNames[i], propValues[i] );
+
+		return newMat;
+	} 
+
+	this.init = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = JuliaMaterialDef;
+		this._shader.init();
+
+		// set up the material node
+		this._materialNode = createMaterialNode("juliaMaterial");
+		this._materialNode.setShader(this._shader);
+
+		this._time = 0;
+		if (this._shader && this._shader.default)
+			this._shader.default.u_time.set( [this._time] );
+
+		// set the shader values in the shader
+		this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
+		this.update( 0 );
+	}
+
+	this.update = function( time )
+	{
+		var material = this._materialNode;
+		if (material)
+		{
+			var technique = material.shaderProgram.default;
+			var renderer = g_Engine.getContext().renderer;
+			if (renderer && technique)
+			{
+				if (this._shader && this._shader.default)
+					this._shader.default.u_time.set( [this._time] );
+				this._time = time;
+			}
+		}
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var JuliaMaterialDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/Basic.vert.glsl",
+		'defaultFShader':"assets/shaders/Julia.frag.glsl"
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'  :   { 'type' : 'vec3' },
+					'normal' :  { 'type' : 'vec3' },
+					'texcoord'  :   { 'type' : 'vec2' }
+				},
+				// parameters
+				'params' : 
+				{
+					'u_tex0': { 'type' : 'tex2d' },
+					'u_time' : { 'type' : 'float' },
+					'u_resolution'  :   { 'type' : 'vec2' },
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
+
+
+
diff --git a/js/helper-classes/RDGE/Materials/KeleidoscopeMaterial.js b/js/helper-classes/RDGE/Materials/KeleidoscopeMaterial.js
new file mode 100644
index 00000000..1547aca9
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/KeleidoscopeMaterial.js
@@ -0,0 +1,149 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function KeleidoscopeMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = PulseMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "KeleidoscopeMaterial";
+	this._shaderName = "keleidoscope";
+
+	this._texMap = 'assets/images/rocky-normal.jpg';
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Properties
+    ///////////////////////////////////////////////////////////////////////
+	// all defined in parent PulseMaterial.js
+	// load the local default value
+	this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// allocate a new uber material
+		var newMat = new KeleidoscopeMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			newMat.setProperty( propNames[i], propValues[i] );
+
+		return newMat;
+	} 
+
+	this.init = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = keleidoscopeMaterialDef;
+		this._shader.init();
+
+		// set up the material node
+		this._materialNode = createMaterialNode("keleidoscopeMaterial");
+		this._materialNode.setShader(this._shader);
+
+		this._time = 0;
+		if (this._shader && this._shader.default)
+			this._shader.default.u_time.set( [this._time] );
+
+		// set the shader values in the shader
+		this.updateTexture();
+		this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
+		this.update( 0 );
+	}
+
+	this.update = function( time )
+	{
+		var material = this._materialNode;
+		if (material)
+		{
+			var technique = material.shaderProgram.default;
+			var renderer = g_Engine.getContext().renderer;
+			if (renderer && technique)
+			{
+				if (this._shader && this._shader.default)
+					this._shader.default.u_time.set( [this._time] );
+				this._time = time;
+			}
+		}
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var keleidoscopeMaterialDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/Basic.vert.glsl",
+		'defaultFShader':"assets/shaders/Keleidoscope.frag.glsl"
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'  :   { 'type' : 'vec3' },
+					'normal' :  { 'type' : 'vec3' },
+					'texcoord'  :   { 'type' : 'vec2' }
+				},
+				// parameters
+				'params' : 
+				{
+					'u_tex0': { 'type' : 'tex2d' },
+					'u_time' : { 'type' : 'float' },
+					'u_resolution'  :   { 'type' : 'vec2' },
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
+
+
+
diff --git a/js/helper-classes/RDGE/Materials/MandelMaterial.js b/js/helper-classes/RDGE/Materials/MandelMaterial.js
new file mode 100644
index 00000000..25b08404
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/MandelMaterial.js
@@ -0,0 +1,151 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function MandelMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = PulseMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "MandelMaterial";
+	this._shaderName = "mandel";
+
+	this._texMap = 'assets/images/rocky-normal.jpg';
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Properties
+    ///////////////////////////////////////////////////////////////////////
+	// no properties
+	this._propNames			= [];
+	this._propLabels		= [];
+	this._propTypes			= [];
+	this._propValues		= [];
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////
+
+	this.isAnimated = function()  {  return true;  }
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// allocate a new uber material
+		var newMat = new MandelMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			newMat.setProperty( propNames[i], propValues[i] );
+
+		return newMat;
+	} 
+
+	this.init = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = MandelMaterialDef;
+		this._shader.init();
+
+		// set up the material node
+		this._materialNode = createMaterialNode("mandelMaterial");
+		this._materialNode.setShader(this._shader);
+
+		this._time = 0;
+		if (this._shader && this._shader.default)
+			this._shader.default.u_time.set( [this._time] );
+
+		// set the shader values in the shader
+		this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
+		this.update( 0 );
+	}
+
+	this.update = function( time )
+	{
+		var material = this._materialNode;
+		if (material)
+		{
+			var technique = material.shaderProgram.default;
+			var renderer = g_Engine.getContext().renderer;
+			if (renderer && technique)
+			{
+				if (this._shader && this._shader.default)
+					this._shader.default.u_time.set( [this._time] );
+				this._time = time;
+			}
+		}
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var MandelMaterialDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/Basic.vert.glsl",
+		'defaultFShader':"assets/shaders/Mandel.frag.glsl"
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'  :   { 'type' : 'vec3' },
+					'normal' :  { 'type' : 'vec3' },
+					'texcoord'  :   { 'type' : 'vec2' }
+				},
+				// parameters
+				'params' : 
+				{
+					'u_tex0': { 'type' : 'tex2d' },
+					'u_time' : { 'type' : 'float' },
+					'u_resolution'  :   { 'type' : 'vec2' },
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
+
+
+
diff --git a/js/helper-classes/RDGE/Materials/PlasmaMaterial.js b/js/helper-classes/RDGE/Materials/PlasmaMaterial.js
new file mode 100644
index 00000000..a65f3a33
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/PlasmaMaterial.js
@@ -0,0 +1,134 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function PlasmaMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = GLMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "PlasmaMaterial";
+	this._shaderName = "plasma";
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+	this._speed = 1.0;
+
+	this._color = [1,0,0,1];
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+	this.getShaderName	= function()	{  return this._shaderName;		}
+
+	this.isAnimated		= function()	{  return true;					}
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+	this._propNames			= ["color"];
+	this._propLabels		= ["Color"];
+	this._propTypes			= ["color"];
+	this._propValues		= [];
+
+	this._propValues[ this._propNames[0] ] = this._color;
+
+    this.setProperty = function( prop, value )
+	{
+		// make sure we have legitimate imput
+		if (this.validateProperty( prop, value ))
+		{
+			this._color = value.slice(0);
+			this._shader.default[prop].set(value);
+		}
+	}
+    ///////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function()	{  return new PlasmaMaterial();	} 
+
+	this.init = function()
+	{
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = plasmaShaderDef;
+		this._shader.init();
+
+		// set the default value
+		this._time = 0;
+		this._shader.default.u_time = this._time;
+		this.setProperty( "color", [this._time, 0, 0,  1] );
+
+		// set up the material node
+		this._materialNode = createMaterialNode("plasmaMaterial");
+		this._materialNode.setShader(this._shader);
+	}
+
+	this.update = function( time )
+	{
+		this._shader.default.u_time = this._time;
+		var color = this.getProperty( "color" );
+		color[0] = this._time;
+		this.setProperty( "color", color );
+		//console.log( "update color to: " + color );
+		this._time += this._dTime;
+	}
+
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var plasmaShaderDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/plasma.vert.glsl",
+		'defaultFShader':"assets/shaders/plasma.frag.glsl",
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'	:	{ 'type' : 'vec3' },
+					'normal' :	{ 'type' : 'vec3' },
+					'texcoord'	:	{ 'type' : 'vec2' },
+				},
+				// parameters
+				'params' : 
+				{
+					'u_time' : { 'type' : 'float' },
+					'color' : { 'type' : 'vec4' }
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
diff --git a/js/helper-classes/RDGE/Materials/PulseMaterial.js b/js/helper-classes/RDGE/Materials/PulseMaterial.js
new file mode 100644
index 00000000..6f7e9fe0
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/PulseMaterial.js
@@ -0,0 +1,253 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function PulseMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = GLMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "PulseMaterial";
+	this._shaderName = "pulse";
+
+	this._texMap = 'assets/images/cubelight.png';
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+	this.getName		= function()	{ return this._name;			}
+	this.getShaderName	= function()	{  return this._shaderName;		}
+
+	this.getTextureMap			= function()		{  return this._propValues[this._propNames[0]] ? this._propValues[this._propNames[0]].slice() : null	}
+	this.setTextureMap			= function(m)		{  this._propValues[this._propNames[0]] = m ? m.slice(0) : null;  this.updateTexture();  	}	
+
+	this.isAnimated			= function()			{  return true;					}
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+	this._propNames			= ["texmap"];
+	this._propLabels		= ["Texture map"];
+	this._propTypes			= ["file"];
+	this._propValues		= [];
+
+	this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
+
+    this.setProperty = function( prop, value )
+	{
+		// make sure we have legitimate imput
+		var ok = this.validateProperty( prop, value );
+		if (!ok)
+			console.log( "invalid property in Radial Gradient Material:" + prop + " : " + value );
+
+		switch (prop)
+		{
+			case "texmap":
+				this.setTextureMap(value);
+				break;
+
+			case "color":
+				break;
+		}
+	}
+    ///////////////////////////////////////////////////////////////////////
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// allocate a new uber material
+		var newMat = new PulseMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			newMat.setProperty( propNames[i], propValues[i] );
+
+		return newMat;
+	} 
+
+	this.init = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// this variable declared above is inherited set to a smaller delta.
+		// the pulse material runs a little faster
+		this._dTime = 0.01;
+
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = pulseMaterialDef;
+		this._shader.init();
+
+		// set up the material node
+		this._materialNode = createMaterialNode("pulseMaterial");
+		this._materialNode.setShader(this._shader);
+
+		this._time = 0;
+		if (this._shader && this._shader.default)
+			this._shader.default.u_time.set( [this._time] );
+
+		// set the shader values in the shader
+		this.updateTexture();
+		this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
+		this.update( 0 );
+	}
+
+	this.updateTexture = function()
+	{
+		var material = this._materialNode;
+		if (material)
+		{
+			var technique = material.shaderProgram.default;
+			var renderer = g_Engine.getContext().renderer;
+			if (renderer && technique)
+			{
+				var texMapName = this._propValues[this._propNames[0]];
+				var wrap = 'REPEAT',  mips = true;
+				var tex = this.loadTexture( texMapName, wrap, mips );
+				
+				/*
+				var glTex = new GLTexture( this.getWorld() );
+				var prevWorld = this.findPreviousWorld();
+				if (prevWorld)
+				{
+					var srcCanvas = prevWorld.getCanvas();
+					tex = glTex.loadFromCanvas( srcCanvas );
+				}
+				else
+					tex = glTex.loadFromFile( texMapName, wrap, mips );
+				*/
+
+				if (tex)
+					technique.u_tex0.set( tex );
+			}
+		}
+	}
+
+	this.update = function( time )
+	{
+		var material = this._materialNode;
+		if (material)
+		{
+			var technique = material.shaderProgram.default;
+			var renderer = g_Engine.getContext().renderer;
+			if (renderer && technique)
+			{
+				if (this._shader && this._shader.default)
+					this._shader.default.u_time.set( [this._time] );
+				this._time += this._dTime;
+				if (this._time > 200.0)  this._time = 0.0;
+			}
+		}
+	}
+
+	this.setResolution = function( res )
+	{
+		var material = this._materialNode;
+		if (material)
+		{
+			var technique = material.shaderProgram.default;
+			var renderer = g_Engine.getContext().renderer;
+			if (renderer && technique)
+			{
+				technique.u_resolution.set( res );
+			}
+		}
+	}
+
+	this.export = function()
+	{
+		// every material needs the base type and instance name
+		var exportStr = "material: " + this.getShaderName() + "\n";
+		exportStr += "name: " + this.getName() + "\n";
+		
+		// every material needs to terminate like this
+		exportStr += "endMaterial\n";
+
+		return exportStr;
+	}
+
+	this.import = function( importStr )
+	{
+		var pu = new ParseUtils( importStr );
+		var material = pu.nextValue( "material: " );
+		if (material != this.getShaderName())  throw new Error( "ill-formed material" );
+		this.setName(  pu.nextValue( "name: ") );
+
+		var rtnStr;
+		
+		return rtnStr;
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var pulseMaterialDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/Basic.vert.glsl",
+		'defaultFShader':"assets/shaders/Pulse.frag.glsl"
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'  :   { 'type' : 'vec3' },
+					'normal' :  { 'type' : 'vec3' },
+					'texcoord'  :   { 'type' : 'vec2' }
+				},
+				// parameters
+				'params' : 
+				{
+					'u_tex0': { 'type' : 'tex2d' },
+					'u_time' : { 'type' : 'float' },
+					'u_resolution'  :   { 'type' : 'vec2' },
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
+
+
+
diff --git a/js/helper-classes/RDGE/Materials/RadialBlurMaterial.js b/js/helper-classes/RDGE/Materials/RadialBlurMaterial.js
new file mode 100644
index 00000000..732800cf
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/RadialBlurMaterial.js
@@ -0,0 +1,246 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function RadialBlurMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = GLMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "RadialBlurMaterial";
+	this._shaderName = "radialBlur";
+
+	this._texMap = 'assets/images/cubelight.png';
+	this._color = [1,0,0,1];
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+	this.getName		= function()	{ return this._name;			}
+	this.getShaderName	= function()	{  return this._shaderName;		}
+
+	this.getTextureMap			= function()		{  return this._texMap.slice(0);	}
+	this.setTextureMap			= function(m)		{  this._propValues[this._propNames[0]] = m.slice(0);  this.updateTexture();  	}	
+
+	this.isAnimated				= function()		{  return true;		}
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+	this._propNames			= ["texmap",			"color"];
+	this._propLabels		= ["Texture map",		"Color"];
+	this._propTypes			= ["file",				"color"];
+	this._propValues		= [];
+
+	this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
+	this._propValues[ this._propNames[1] ] = this._color.slice(0);
+
+    this.setProperty = function( prop, value )
+	{
+		// make sure we have legitimate imput
+		var ok = this.validateProperty( prop, value );
+		if (!ok)
+			console.log( "invalid property in Radial Gradient Material:" + prop + " : " + value );
+
+		switch (prop)
+		{
+			case "texmap":
+				this.setTextureMap(value);
+				break;
+
+			case "color":
+				this._propValues[prop] = value.slice(0);
+				if (this._shader && this._shader.default)
+					this._shader.default[prop].set(value);
+				break;
+		}
+	}
+    ///////////////////////////////////////////////////////////////////////
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// allocate a new uber material
+		var newMat = new RadialBlurMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			newMat.setProperty( propNames[i], propValues[i] );
+
+		return newMat;
+	} 
+
+	this.init = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = radialBlurMaterialDef;
+		this._shader.init();
+
+		// set up the material node
+		this._materialNode = createMaterialNode("radialBlurMaterial");
+		this._materialNode.setShader(this._shader);
+
+		this._time = 0;
+		if (this._shader && this._shader.default)
+			this._shader.default.u_time.set( [this._time] );
+		this.setProperty( "color", [this._time, 0, 0,  1] );
+
+		// set the shader values in the shader
+		this.updateTexture();
+		this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
+		this.update( 0 );
+	}
+
+	this.updateTexture = function()
+	{
+		var material = this._materialNode;
+		if (material)
+		{
+			var technique = material.shaderProgram.default;
+			var renderer = g_Engine.getContext().renderer;
+			if (renderer && technique)
+			{
+				var texMapName = this._propValues[this._propNames[0]];
+				var tex = renderer.getTextureByName(texMapName, 'REPEAT');
+//				if (tex)
+//				{
+//					var res = [tex.image.naturalWidth, tex.image.naturalHeight];
+//					this.setResoloution( res );
+//				}
+				technique.u_tex0.set( tex );
+			}
+		}
+	}
+
+	this.update = function( time )
+	{
+		var material = this._materialNode;
+		if (material)
+		{
+			var technique = material.shaderProgram.default;
+			var renderer = g_Engine.getContext().renderer;
+			if (renderer && technique)
+			{
+				if (this._shader && this._shader.default)
+					this._shader.default.u_time.set( [this._time] );
+				var color = this.getProperty( "color" );
+				color[0] = this._time;
+				this.setProperty( "color", color );
+				//console.log( "update color to: " + color );
+				this._time += this._dTime;
+			}
+		}
+	}
+
+	this.setResolution = function( res )
+	{
+		var material = this._materialNode;
+		if (material)
+		{
+			var technique = material.shaderProgram.default;
+			var renderer = g_Engine.getContext().renderer;
+			if (renderer && technique)
+			{
+				technique.u_resolution.set( res );
+			}
+		}
+	}
+
+	this.export = function()
+	{
+		// every material needs the base type and instance name
+		var exportStr = "material: " + this.getShaderName() + "\n";
+		exportStr += "name: " + this.getName() + "\n";
+		
+		// every material needs to terminate like this
+		exportStr += "endMaterial\n";
+
+		return exportStr;
+	}
+
+	this.import = function( importStr )
+	{
+		var pu = new ParseUtils( importStr );
+		var material = pu.nextValue( "material: " );
+		if (material != this.getShaderName())  throw new Error( "ill-formed material" );
+		this.setName(  pu.nextValue( "name: ") );
+
+		var rtnStr;
+		
+		return rtnStr;
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var radialBlurMaterialDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/Basic.vert.glsl",
+		'defaultFShader':"assets/shaders/radialBlur.frag.glsl"
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'  :   { 'type' : 'vec3' },
+					'normal' :  { 'type' : 'vec3' },
+					'texcoord'  :   { 'type' : 'vec2' }
+				},
+				// parameters
+				'params' : 
+				{
+					'u_tex0': { 'type' : 'tex2d' },
+					'u_time' : { 'type' : 'float' },
+					'u_resolution'  :   { 'type' : 'vec2' },
+					'color' :   { 'type' : 'vec4' }
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
+
+
+
diff --git a/js/helper-classes/RDGE/Materials/ReliefTunnelMaterial.js b/js/helper-classes/RDGE/Materials/ReliefTunnelMaterial.js
new file mode 100644
index 00000000..6540c3e9
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/ReliefTunnelMaterial.js
@@ -0,0 +1,133 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function ReliefTunnelMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = PulseMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "ReliefTunnelMaterial";
+	this._shaderName = "reliefTunnel";
+
+	this._texMap = 'assets/images/rocky-normal.jpg';
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Properties
+    ///////////////////////////////////////////////////////////////////////
+	// all defined in parent PulseMaterial.js
+	// load the local default value
+	this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// allocate a new uber material
+		var newMat = new ReliefTunnelMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			newMat.setProperty( propNames[i], propValues[i] );
+
+		return newMat;
+	} 
+
+	this.init = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = reliefTunnelMaterialDef;
+		this._shader.init();
+
+		// set up the material node
+		this._materialNode = createMaterialNode("reliefTunnelMaterial");
+		this._materialNode.setShader(this._shader);
+
+		this._time = 0;
+		if (this._shader && this._shader.default)
+			this._shader.default.u_time.set( [this._time] );
+
+		// set the shader values in the shader
+		this.updateTexture();
+		this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
+		this.update( 0 );
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var reliefTunnelMaterialDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/Basic.vert.glsl",
+		'defaultFShader':"assets/shaders/ReliefTunnel.frag.glsl"
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'  :   { 'type' : 'vec3' },
+					'normal' :  { 'type' : 'vec3' },
+					'texcoord'  :   { 'type' : 'vec2' }
+				},
+				// parameters
+				'params' : 
+				{
+					'u_tex0': { 'type' : 'tex2d' },
+					'u_time' : { 'type' : 'float' },
+					'u_resolution'  :   { 'type' : 'vec2' },
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
+
+
+
diff --git a/js/helper-classes/RDGE/Materials/SquareTunnelMaterial.js b/js/helper-classes/RDGE/Materials/SquareTunnelMaterial.js
new file mode 100644
index 00000000..8238b651
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/SquareTunnelMaterial.js
@@ -0,0 +1,133 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function SquareTunnelMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = PulseMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "SquareTunnelMaterial";
+	this._shaderName = "squareTunnel";
+
+	this._texMap = 'assets/images/rocky-normal.jpg';
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Properties
+    ///////////////////////////////////////////////////////////////////////
+	// all defined in parent PulseMaterial.js
+	// load the local default value
+	this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// allocate a new uber material
+		var newMat = new SquareTunnelMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			newMat.setProperty( propNames[i], propValues[i] );
+
+		return newMat;
+	} 
+
+	this.init = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = squareTunnelMaterialDef;
+		this._shader.init();
+
+		// set up the material node
+		this._materialNode = createMaterialNode("squareTunnelMaterial");
+		this._materialNode.setShader(this._shader);
+
+		this._time = 0;
+		if (this._shader && this._shader.default)
+			this._shader.default.u_time.set( [this._time] );
+
+		// set the shader values in the shader
+		this.updateTexture();
+		this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
+		this.update( 0 );
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var squareTunnelMaterialDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/Basic.vert.glsl",
+		'defaultFShader':"assets/shaders/SquareTunnel.frag.glsl"
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'  :   { 'type' : 'vec3' },
+					'normal' :  { 'type' : 'vec3' },
+					'texcoord'  :   { 'type' : 'vec2' }
+				},
+				// parameters
+				'params' : 
+				{
+					'u_tex0': { 'type' : 'tex2d' },
+					'u_time' : { 'type' : 'float' },
+					'u_resolution'  :   { 'type' : 'vec2' },
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
+
+
+
diff --git a/js/helper-classes/RDGE/Materials/StarMaterial.js b/js/helper-classes/RDGE/Materials/StarMaterial.js
new file mode 100644
index 00000000..a5f188a1
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/StarMaterial.js
@@ -0,0 +1,133 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function StarMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = PulseMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "StarMaterial";
+	this._shaderName = "star";
+
+	this._texMap = 'assets/images/rocky-normal.jpg';
+
+	this._time = 0.0;
+	this._dTime = 0.01;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Properties
+    ///////////////////////////////////////////////////////////////////////
+	// all defined in parent PulseMaterial.js
+	// load the local default value
+	this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// allocate a new uber material
+		var newMat = new StarMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			newMat.setProperty( propNames[i], propValues[i] );
+
+		return newMat;
+	} 
+
+	this.init = function( world )
+	{
+		// save the world
+		if (world)  this.setWorld( world );
+
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = starMaterialDef;
+		this._shader.init();
+
+		// set up the material node
+		this._materialNode = createMaterialNode("starMaterial");
+		this._materialNode.setShader(this._shader);
+
+		this._time = 0;
+		if (this._shader && this._shader.default)
+			this._shader.default.u_time.set( [this._time] );
+
+		// set the shader values in the shader
+		this.updateTexture();
+		this.setResolution( [world.getViewportWidth(),world.getViewportHeight()] );
+		this.update( 0 );
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+var starMaterialDef =
+{'shaders': 
+	{
+		'defaultVShader':"assets/shaders/Basic.vert.glsl",
+		'defaultFShader':"assets/shaders/Star.frag.glsl"
+	},
+	'techniques':
+	{ 
+		'default':
+		[
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+				// attributes
+				'attributes' :
+				{
+					'vert'  :   { 'type' : 'vec3' },
+					'normal' :  { 'type' : 'vec3' },
+					'texcoord'  :   { 'type' : 'vec2' }
+				},
+				// parameters
+				'params' : 
+				{
+					'u_tex0': { 'type' : 'tex2d' },
+					'u_time' : { 'type' : 'float' },
+					'u_resolution'  :   { 'type' : 'vec2' },
+				},
+
+				// render states
+				'states' : 
+				{
+					'depthEnable' : true,
+					'offset':[1.0, 0.1]
+				},
+			},
+		]
+	}
+};
+
+
+
+
diff --git a/js/helper-classes/RDGE/Materials/TaperMaterial.js b/js/helper-classes/RDGE/Materials/TaperMaterial.js
new file mode 100644
index 00000000..e8cc7a49
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/TaperMaterial.js
@@ -0,0 +1,223 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function TaperMaterial()
+{
+	// initialize the inherited members
+	this.inheritedFrom = GLMaterial;
+	this.inheritedFrom();
+   
+	///////////////////////////////////////////////////////////////////////
+	// Instance variables
+	///////////////////////////////////////////////////////////////////////
+	this._name = "TaperMaterial";
+	this._shaderName = "taper";
+
+	this._color = [1,0,0,1];
+
+	this._deltaTime = 0.0;
+
+	///////////////////////////////////////////////////////////////////////
+	// Property Accessors
+	///////////////////////////////////////////////////////////////////////
+	this.getColor				= function()	{  return this._color;					}
+	this.getShaderName			= function()	{  return this._shaderName;				}
+
+	this.isAnimated				= function()	{  return true;						}
+	this.hasVertexDeformation	= function()	{  return this._hasVertexDeformation;	}
+	this._hasVertexDeformation	= true;
+	this._vertexDeformationTolerance = 0.02;	// should be a property
+
+	///////////////////////////////////////////////////////////////////////
+	// Methods
+	///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function()	{  return new TaperMaterial();	} 
+
+	this.init = function()
+	{
+		// set up the shader
+		this._shader = new jshader();
+		this._shader.def = taperShaderDef;
+		this._shader.init();
+
+		// set the defaults
+		this._shader.colorMe.color.set( this.getColor() );
+
+		// set up the material node
+		this._materialNode = createMaterialNode("taperMaterial");
+		this._materialNode.setShader(this._shader);
+
+		// initialize the taper properties
+		this.updateShaderValues();
+	}
+
+
+	///////////////////////////////////////////////////////////////////////
+	// Material Property Accessors
+	///////////////////////////////////////////////////////////////////////
+	this._propNames		= ["color",		"u_limit1",					"u_limit2",					"u_limit3",					"u_minVal",				"u_maxVal",				"u_center",	"u_taperAmount" ];
+	this._propLabels	= ["Color",		"Minimum Parameter Value",	"Center Paramater Value",	"Maximum Parameter Value",	"Minimum Data Bounds",	"Maximum Data Bounds",	"Center",	"Taper Amount"];
+	this._propTypes		= ["color",		"float",					"float",					"float",					"float",				"float",				"float",	"float"];
+	this._propValues	= [];
+
+	// initialize the property values
+	this._propValues[ this._propNames[0] ] = this._color.slice();
+	this._propValues[ this._propNames[1] ] = 0.25;
+	this._propValues[ this._propNames[2] ] = 0.50;
+	this._propValues[ this._propNames[3] ] = 0.75;
+	this._propValues[ this._propNames[4] ] =   -1;
+	this._propValues[ this._propNames[5] ] =    1;
+	this._propValues[ this._propNames[6] ] =  0.0;
+	this._propValues[ this._propNames[7] ] =  0.9;
+
+	this.setProperty = function( prop, value )
+	{
+		// make sure we have legitimate input
+		if (this.validateProperty( prop, value ))
+		{
+			switch (prop)
+			{
+				case "color":		this._propValues[prop] = value.slice();		break;
+				default:			this._propValues[prop] = value;				break;
+			}
+
+			this.updateShaderValues();
+		}
+	}
+	///////////////////////////////////////////////////////////////////////
+
+	this.export = function()
+	{
+		// this function should be overridden by subclasses
+		var exportStr = "material: " + this.getShaderName() + "\n";
+		exportStr += "name: " + this.getName() + "\n";
+		
+		if (this._shader)
+			exportStr += "color: " + String(this._shader.colorMe.color) + "\n";
+		else
+			exportStr += "color: " + this.getColor() + "\n";
+		exportStr += "endMaterial\n";
+
+		return exportStr;
+	}
+
+	this.import = function( importStr )
+	{
+		var pu = new ParseUtils( importStr );
+		var material = pu.nextValue( "material: " );
+		if (material != this.getShaderName())  throw new Error( "ill-formed material" );
+		this.setName(  pu.nextValue( "name: ") );
+
+		var rtnStr;
+		try
+		{
+			var color  = eval( "[" + pu.nextValue( "color: " ) + "]" );
+
+			this.setProperty( "color",  color);
+
+			var endKey = "endMaterial\n";
+			var index = importStr.indexOf( endKey );
+			index += endKey.length;
+			rtnStr = importStr.substr( index );
+		}
+		catch (e)
+		{
+			throw new Error( "could not import material: " + importStr );
+		}
+
+		return rtnStr;
+	}
+
+	this.update = function( time )
+	{
+		//var speed = 0.01;
+		//time *= speed;
+		this._deltaTime += 0.01;
+
+		if (this._shader && this._shader.colorMe)
+		{
+			var t3 = this._propValues[ this._propNames[3] ] - this._deltaTime;
+			if (t3 < 0)
+			{
+				this._deltaTime = this._propValues[ this._propNames[1] ] - 1.0;
+				t3 = this._propValues[ this._propNames[3] ] - this._deltaTime;
+			}
+			var	t1 = this._propValues[ this._propNames[1] ] - this._deltaTime,
+				t2 = this._propValues[ this._propNames[2] ] - this._deltaTime;
+
+
+			this._shader.colorMe[this._propNames[1]].set( [t1] );
+			this._shader.colorMe[this._propNames[2]].set( [t2] );
+			this._shader.colorMe[this._propNames[3]].set( [t3] );
+		}
+	}
+
+	this.updateShaderValues = function()
+	{
+		if (this._shader && this._shader.colorMe)
+		{
+			var nProps = this._propNames.length;
+			for (var i=0;  i<nProps;  i++)
+			{
+				var propName = this._propNames[i];
+				var propValue = this._propValues[propName];
+				switch (propName)
+				{
+					case "color":	this._shader.colorMe[propName].set( propValue );		break;
+					default:		this._shader.colorMe[propName].set( [propValue] );		break;
+				}
+			}
+		}
+	}
+}
+
+///////////////////////////////////////////////////////////////////////////////////////
+// RDGE shader
+ 
+// shader spec (can also be loaded from a .JSON file, or constructed at runtime)
+taperShaderDef  = 
+{
+	'shaders':  { // shader files
+		'defaultVShader':"assets/shaders/Taper.vert.glsl",
+		'defaultFShader':"assets/shaders/Taper.frag.glsl"
+	},
+	'techniques': { // rendering control
+		'colorMe':[ // simple color pass
+			{
+				'vshader' : 'defaultVShader',
+				'fshader' : 'defaultFShader',
+		   
+				// attributes
+				'attributes' :
+				 {
+						'vert'	:	{ 'type' : 'vec3' },
+						'normal' :	{ 'type' : 'vec3' },
+						'texcoord'	:	{ 'type' : 'vec2' },
+				 },
+				// attributes
+				'params' :
+				 {
+					'color' :   { 'type' : 'vec4' },
+
+					'u_limit1': { 'type': 'float' },
+					'u_limit2': { 'type': 'float' },
+					'u_limit3': { 'type': 'float' },
+					'u_minVal': { 'type': 'float' },
+					'u_maxVal': { 'type': 'float' },
+					'u_center': { 'type': 'float' },
+					'u_taperAmount': { 'type': 'float' }
+				 },
+			},
+		]
+	 }
+};
+
diff --git a/js/helper-classes/RDGE/Materials/TunnelMaterial.js b/js/helper-classes/RDGE/Materials/TunnelMaterial.js
new file mode 100644
index 00000000..853a6a8d
--- /dev/null
+++ b/js/helper-classes/RDGE/Materials/TunnelMaterial.js
@@ -0,0 +1,133 @@
+/* <copyright>
+ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
+ (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
+ </copyright> */
+
+
+
+///////////////////////////////////////////////////////////////////////
+// Class GLMaterial
+//      RDGE representation of a material.
+///////////////////////////////////////////////////////////////////////
+function TunnelMaterial()
+{
+    // initialize the inherited members
+    this.inheritedFrom = PulseMaterial;
+    this.inheritedFrom();
+   
+    ///////////////////////////////////////////////////////////////////////
+    // Instance variables
+    ///////////////////////////////////////////////////////////////////////
+	this._name = "TunnelMaterial";
+	this._shaderName = "tunnel";
+
+	this._texMap = 'assets/images/rocky-normal.jpg';
+
+	this._time = 0.0;
+	this._dTime = 0.001;
+
+    ///////////////////////////////////////////////////////////////////////
+    // Properties
+    ///////////////////////////////////////////////////////////////////////
+	// all defined in parent PulseMaterial.js
+	// load the local default value
+	this._propValues[ this._propNames[0] ] = this._texMap.slice(0);
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////
+
+
+    ///////////////////////////////////////////////////////////////////////
+    // Methods
+    ///////////////////////////////////////////////////////////////////////
+	// duplcate method requirde
+	this.dup = function( world )
+	{
+		// allocate a new uber material
+		var newMat = new TunnelMaterial();
+
+		// copy over the current values;
+		var propNames = [],  propValues = [],  propTypes = [],  propLabels = [];
+		this.getAllProperties( propNames,  propValues,  propTypes,  propLabels);
+		var n = propNames.length;
+		for (var i=0;  i<n;  i++)
+			n