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/material.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'js/lib/rdge/materials/material.js') diff --git a/js/lib/rdge/materials/material.js b/js/lib/rdge/materials/material.js index 65448c0c..34524097 100755 --- a/js/lib/rdge/materials/material.js +++ b/js/lib/rdge/materials/material.js @@ -32,16 +32,12 @@ var Material = function GLMaterial( world ) { // vertex deformation variables this._hasVertexDeformation = false; this._vertexDeformationRange = [0, 0, 1, 1]; // (xMin, yMin, xMax, yMax) - this._vertexDeformationTolerance = 0.1; + this._vertexDeformationTolerance = 0.02; // RDGE variables this._shader = null; this._materialNode = null; - // vertex deformation variables - this._hasVertexDeformation = false; - this._vertexDeformationRange = [0, 0, 1, 1]; // (xMin, yMin, xMax, yMax) - this._vertexDeformationTolerance = 0.02; /////////////////////////////////////////////////////////////////////// // Property Accessors @@ -366,6 +362,10 @@ var Material = function GLMaterial( world ) { throw new Error( "Material.init() must be overridden by subclass" ); }; + this.resetToDefault = function() { + // materials should override this functinon + }; + this.update = function( time ) { // animated materials should implement the update method }; @@ -374,6 +374,10 @@ var Material = function GLMaterial( world ) { // some materials need to preserve an aspect ratio - or someting else. }; + this.fitToPrimitiveArray = function( primArray ) { + // some materials need to preserve an aspect ratio - or someting else. + }; + this.registerTexture = function( texture ) { // the world needs to know about the texture map var world = this.getWorld(); -- cgit v1.2.3