diff options
author | Valerio Virgillito | 2012-02-13 21:43:51 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-13 21:43:51 -0800 |
commit | 081f17954c735fc8b946d72a25b0ee60d370ef9b (patch) | |
tree | de7b50f2d02365df897ef4356f953d3833c9cabd /js/helper-classes/RDGE/GLMaterial.js | |
parent | 47df0aff81c25334b129047bb227ea5015357eda (diff) | |
parent | 1d82f1a041612f32bbf6c9f20d9fb14e2d11fcc7 (diff) | |
download | ninja-081f17954c735fc8b946d72a25b0ee60d370ef9b.tar.gz |
Merge branch 'refs/heads/master' into components
Conflicts:
js/components/treeview/ninja-leaf.reel/ninja-leaf.js
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/helper-classes/RDGE/GLMaterial.js')
-rw-r--r-- | js/helper-classes/RDGE/GLMaterial.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/helper-classes/RDGE/GLMaterial.js b/js/helper-classes/RDGE/GLMaterial.js index e72b7908..642fab05 100644 --- a/js/helper-classes/RDGE/GLMaterial.js +++ b/js/helper-classes/RDGE/GLMaterial.js | |||
@@ -31,6 +31,11 @@ function GLMaterial( world ) | |||
31 | 31 | ||
32 | this._texture; | 32 | this._texture; |
33 | 33 | ||
34 | // vertex deformation variables | ||
35 | this._hasVertexDeformation = false; | ||
36 | this._vertexDeformationRange = [0, 0, 1, 1]; // (xMin, yMin, xMax, yMax) | ||
37 | this._vertexDeformationTolerance = 0.1; | ||
38 | |||
34 | // RDGE variables | 39 | // RDGE variables |
35 | this._shader; | 40 | this._shader; |
36 | this._materialNode; | 41 | this._materialNode; |
@@ -66,6 +71,12 @@ function GLMaterial( world ) | |||
66 | // Any material needing continuous rendering should override this method | 71 | // Any material needing continuous rendering should override this method |
67 | this.isAnimated = function() { return false; } | 72 | this.isAnimated = function() { return false; } |
68 | 73 | ||
74 | // the vertex shader can apply deformations requiring refinement in | ||
75 | // certain areas. | ||
76 | this.hasVertexDeformation = function() { return this._hasVertexDeformation; } | ||
77 | this.getVertexDeformationRange = function() { return this._vertexDeformationRange.slice(); } | ||
78 | this.getVertexDeformationTolerance = function() { return this._vertexDeformationTolerance; } | ||
79 | |||
69 | 80 | ||
70 | /////////////////////////////////////////////////////////////////////// | 81 | /////////////////////////////////////////////////////////////////////// |
71 | // Common Material Methods | 82 | // Common Material Methods |