aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/material.js')
-rwxr-xr-xjs/lib/rdge/materials/material.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/js/lib/rdge/materials/material.js b/js/lib/rdge/materials/material.js
index e1d17aa8..a7183187 100755
--- a/js/lib/rdge/materials/material.js
+++ b/js/lib/rdge/materials/material.js
@@ -56,16 +56,12 @@ var Material = function GLMaterial( world ) {
56 // vertex deformation variables 56 // vertex deformation variables
57 this._hasVertexDeformation = false; 57 this._hasVertexDeformation = false;
58 this._vertexDeformationRange = [0, 0, 1, 1]; // (xMin, yMin, xMax, yMax) 58 this._vertexDeformationRange = [0, 0, 1, 1]; // (xMin, yMin, xMax, yMax)
59 this._vertexDeformationTolerance = 0.1; 59 this._vertexDeformationTolerance = 0.02;
60 60
61 // RDGE variables 61 // RDGE variables
62 this._shader = null; 62 this._shader = null;
63 this._materialNode = null; 63 this._materialNode = null;
64 64
65 // vertex deformation variables
66 this._hasVertexDeformation = false;
67 this._vertexDeformationRange = [0, 0, 1, 1]; // (xMin, yMin, xMax, yMax)
68 this._vertexDeformationTolerance = 0.02;
69 65
70 /////////////////////////////////////////////////////////////////////// 66 ///////////////////////////////////////////////////////////////////////
71 // Property Accessors 67 // Property Accessors
@@ -396,6 +392,10 @@ var Material = function GLMaterial( world ) {
396 throw new Error( "Material.init() must be overridden by subclass" ); 392 throw new Error( "Material.init() must be overridden by subclass" );
397 }; 393 };
398 394
395 this.resetToDefault = function() {
396 // materials should override this functinon
397 };
398
399 this.update = function( time ) { 399 this.update = function( time ) {
400 // animated materials should implement the update method 400 // animated materials should implement the update method
401 }; 401 };
@@ -404,6 +404,10 @@ var Material = function GLMaterial( world ) {
404 // some materials need to preserve an aspect ratio - or someting else. 404 // some materials need to preserve an aspect ratio - or someting else.
405 }; 405 };
406 406
407 this.fitToPrimitiveArray = function( primArray ) {
408 // some materials need to preserve an aspect ratio - or someting else.
409 };
410
407 this.registerTexture = function( texture ) { 411 this.registerTexture = function( texture ) {
408 // the world needs to know about the texture map 412 // the world needs to know about the texture map
409 var world = this.getWorld(); 413 var world = this.getWorld();