From 0f31002ca696c1ef303d2926a504afd27305e94f Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 4 Apr 2012 05:52:54 -0700 Subject: Added Flag material --- js/lib/geom/rectangle.js | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'js/lib/geom/rectangle.js') diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js index e511d5f4..51947ff1 100755 --- a/js/lib/geom/rectangle.js +++ b/js/lib/geom/rectangle.js @@ -943,13 +943,13 @@ RectangleFill.create = function( rectCtr, width, height, tlRad, blRad, brRad, } //refine the mesh for vertex deformations -// if (material) { -// if (material.hasVertexDeformation()) { -// var paramRange = material.getVertexDeformationRange(); -// var tolerance = material.getVertexDeformationTolerance(); -// nVertices = ShapePrimitive.refineMesh( this.vertices, this.normals, this.uvs, this.indices, nVertices, paramRange, tolerance ); -// } -// } + if (material) { + if (material.hasVertexDeformation()) { + var paramRange = material.getVertexDeformationRange(); + var tolerance = material.getVertexDeformationTolerance(); + nVertices = ShapePrimitive.refineMesh( this.vertices, this.normals, this.uvs, this.indices, nVertices, paramRange, tolerance ); + } + } // create the RDGE primitive return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, g_Engine.getContext().renderer.TRIANGLES, nVertices); @@ -1175,13 +1175,13 @@ RectangleStroke.create = function( rectCtr, width, height, strokeWidth, tlRad, } //refine the mesh for vertex deformations -// if (material) { -// if (material.hasVertexDeformation()) { -// var paramRange = material.getVertexDeformationRange(); -// var tolerance = material.getVertexDeformationTolerance(); -// nVertices = ShapePrimitive.refineMesh( this.vertices, this.normals, this.uvs, this.indices, nVertices, paramRange, tolerance ); -// } -// } + if (material) { + if (material.hasVertexDeformation()) { + var paramRange = material.getVertexDeformationRange(); + var tolerance = material.getVertexDeformationTolerance(); + nVertices = ShapePrimitive.refineMesh( this.vertices, this.normals, this.uvs, this.indices, nVertices, paramRange, tolerance ); + } + } // create the RDGE primitive return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, g_Engine.getContext().renderer.TRIANGLES, nVertices); @@ -1259,15 +1259,15 @@ RectangleGeometry.create = function( ctr, width, height, material ) { RectangleGeometry.pushIndices( 0, 3, 2 ); //refine the mesh for vertex deformations -// if (material) -// { -// if (material.hasVertexDeformation()) -// { -// var paramRange = material.getVertexDeformationRange(); -// var tolerance = material.getVertexDeformationTolerance(); -// nVertices = ShapePrimitive.refineMesh( this.vertices, this.normals, this.uvs, this.indices, nVertices, paramRange, tolerance ); -// } -// } + if (material) + { + if (material.hasVertexDeformation()) + { + var paramRange = material.getVertexDeformationRange(); + var tolerance = material.getVertexDeformationTolerance(); + nVertices = ShapePrimitive.refineMesh( this.vertices, this.normals, this.uvs, this.indices, nVertices, paramRange, tolerance ); + } + } // create the RDGE primitive return ShapePrimitive.create(this.vertices, this.normals, this.uvs, this.indices, g_Engine.getContext().renderer.TRIANGLES, nVertices); -- cgit v1.2.3