From 3d5b5f7c5efb25b5e605d5d120b57f2dde33fd23 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Fri, 3 Feb 2012 15:18:45 -0800 Subject: Added a counter to the renderer that tracks the number of unloaded texture maps. Started vertex deformations. --- js/helper-classes/RDGE/GLMaterial.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js/helper-classes/RDGE/GLMaterial.js') diff --git a/js/helper-classes/RDGE/GLMaterial.js b/js/helper-classes/RDGE/GLMaterial.js index c633f679..07a98ab5 100644 --- a/js/helper-classes/RDGE/GLMaterial.js +++ b/js/helper-classes/RDGE/GLMaterial.js @@ -31,6 +31,11 @@ function GLMaterial( world ) this._texture; + // vertex deformation variables + this._hasVertexDeformation = false; + this._vertexDeformationRange = [0, 0, 1, 1]; // (xMin, yMin, xMax, yMax) + this._vertexDeformationTolerance = 0.05; + // RDGE variables this._shader; this._materialNode; @@ -66,6 +71,12 @@ function GLMaterial( world ) // Any material needing continuous rendering should override this method this.isAnimated = function() { return false; } + // the vertex shader can apply deformations requiring refinement in + // certain areas. + this.hasVertexDeformation = function() { return this._hasVertexDeformation; } + this.getVertexDeformationRange = function() { return this._vertexDeformationRange.slice(); } + this.getVertexDeformationTolerance = function() { return this._vertexDeformationTolerance; } + /////////////////////////////////////////////////////////////////////// // Common Material Methods -- cgit v1.2.3