From 22cbc9644b79df60b3f6336f9563debd47fb3ea1 Mon Sep 17 00:00:00 2001
From: hwc487
Date: Thu, 28 Jun 2012 11:44:15 -0700
Subject: Added capability to split a mesh into multiiple parts to avoid buffer
 overflow situations.

---
 js/lib/rdge/materials/star-material.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'js/lib/rdge/materials/star-material.js')

diff --git a/js/lib/rdge/materials/star-material.js b/js/lib/rdge/materials/star-material.js
index 760cf128..e5873810 100644
--- a/js/lib/rdge/materials/star-material.js
+++ b/js/lib/rdge/materials/star-material.js
@@ -71,6 +71,16 @@ var StarMaterial = function StarMaterial() {
         this.setResolution([world.getViewportWidth(), world.getViewportHeight()]);
         this.update(0);
     };
+
+	this.resetToDefault = function()
+	{
+		this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0);
+		this._propValues[this._propNames[u_speed_index]] = 1.0;
+	
+		var nProps = this._propNames.length;
+		for (var i=0; i<nProps;  i++)
+			this.setProperty( this._propNames[i],  this._propValues[this._propNames[i]]  );
+	};
 };
 
 ///////////////////////////////////////////////////////////////////////////////////////
-- 
cgit v1.2.3


From 648ee61ae84216d0236e0dbc211addc13b2cfa3a Mon Sep 17 00:00:00 2001
From: Kris Kowal
Date: Fri, 6 Jul 2012 11:52:06 -0700
Subject: Expand tabs

---
 js/lib/rdge/materials/star-material.js | 100 ++++++++++++++++-----------------
 1 file changed, 50 insertions(+), 50 deletions(-)

(limited to 'js/lib/rdge/materials/star-material.js')

diff --git a/js/lib/rdge/materials/star-material.js b/js/lib/rdge/materials/star-material.js
index 445f6023..989b6160 100644
--- a/js/lib/rdge/materials/star-material.js
+++ b/js/lib/rdge/materials/star-material.js
@@ -46,23 +46,23 @@ var StarMaterial = function StarMaterial() {
     // array textures indexed by shader uniform name
     this._glTextures = [];
 
-	///////////////////////////////////////////////////////////////////////
-	// Property Accessors
-	///////////////////////////////////////////////////////////////////////
-	this.isAnimated			= function()			{  return true;		};
-	this.getShaderDef		= function()			{  return starMaterialDef;	}
-
-	///////////////////////////////////////////////////////////////////////
-	// Material Property Accessors
-	///////////////////////////////////////////////////////////////////////
-	var u_tex0_index	= 0,  u_speed_index = 1;
-	this._propNames			= ["u_tex0",		"u_speed" ];
-	this._propLabels		= ["Texture map",	"Speed" ];
-	this._propTypes			= ["file",			"float" ];
-	this._propValues		= [];
+    ///////////////////////////////////////////////////////////////////////
+    // Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+    this.isAnimated         = function()            {  return true;     };
+    this.getShaderDef       = function()            {  return starMaterialDef;  }
+
+    ///////////////////////////////////////////////////////////////////////
+    // Material Property Accessors
+    ///////////////////////////////////////////////////////////////////////
+    var u_tex0_index    = 0,  u_speed_index = 1;
+    this._propNames         = ["u_tex0",        "u_speed" ];
+    this._propLabels        = ["Texture map",   "Speed" ];
+    this._propTypes         = ["file",          "float" ];
+    this._propValues        = [];
     this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0);
     this._propValues[this._propNames[u_speed_index]] = 1.0;
-	///////////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////////
 
     ///////////////////////////////////////////////////////////////////////
     // Methods
@@ -103,42 +103,42 @@ var StarMaterial = function StarMaterial() {
 // 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"
-	},
+    {
+        '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_speed': { 'type': 'float' },
-				    'u_resolution': { 'type': 'vec2' }
-				},
-
-			    // render states
-			    'states':
-				{
-				    'depthEnable': true,
-				    'offset': [1.0, 0.1]
-				}
-			}
-		]
-	}
+    {
+        '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_speed': { 'type': 'float' },
+                    'u_resolution': { 'type': 'vec2' }
+                },
+
+                // render states
+                'states':
+                {
+                    'depthEnable': true,
+                    'offset': [1.0, 0.1]
+                }
+            }
+        ]
+    }
 };
 
 StarMaterial.prototype = new PulseMaterial();
-- 
cgit v1.2.3


From fdbec324dad4ab33d97282ab021d2c1661bc097c Mon Sep 17 00:00:00 2001
From: Kris Kowal
Date: Mon, 9 Jul 2012 16:27:52 -0700
Subject: BSD License

---
 js/lib/rdge/materials/star-material.js | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

(limited to 'js/lib/rdge/materials/star-material.js')

diff --git a/js/lib/rdge/materials/star-material.js b/js/lib/rdge/materials/star-material.js
index 34cca767..26aa66aa 100644
--- a/js/lib/rdge/materials/star-material.js
+++ b/js/lib/rdge/materials/star-material.js
@@ -1,24 +1,25 @@
 /* <copyright>
-Copyright (c) 2012, Motorola Mobility, Inc
+Copyright (c) 2012, Motorola Mobility LLC.
 All Rights Reserved.
-BSD License.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
 
-  - Redistributions of source code must retain the above copyright notice,
-    this list of conditions and the following disclaimer.
-  - Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
-  - Neither the name of Motorola Mobility nor the names of its contributors
-    may be used to endorse or promote products derived from this software
-    without specific prior written permission.
+* Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of Motorola Mobility LLC nor the names of its
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
 
 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
@@ -100,7 +101,7 @@ var StarMaterial = function StarMaterial() {
 	{
 		this._propValues[this._propNames[u_tex0_index]] = this._defaultTexMap.slice(0);
 		this._propValues[this._propNames[u_speed_index]] = 1.0;
-	
+
 		var nProps = this._propNames.length;
 		for (var i=0; i<nProps;  i++)
 			this.setProperty( this._propNames[i],  this._propValues[this._propNames[i]]  );
-- 
cgit v1.2.3