aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib')
-rwxr-xr-xjs/lib/geom/geom-obj.js2
-rwxr-xr-xjs/lib/geom/rectangle.js13
2 files changed, 7 insertions, 8 deletions
diff --git a/js/lib/geom/geom-obj.js b/js/lib/geom/geom-obj.js
index 6f37ad1c..6b73463f 100755
--- a/js/lib/geom/geom-obj.js
+++ b/js/lib/geom/geom-obj.js
@@ -325,11 +325,9 @@ exports.GeomObj = Object.create(Object.prototype, {
325 if (this._materialArray && this._materialNodeArray && this.getWorld().isWebGL()) { 325 if (this._materialArray && this._materialNodeArray && this.getWorld().isWebGL()) {
326 var nMats = this._materialArray.length; 326 var nMats = this._materialArray.length;
327 if (nMats > 0) { 327 if (nMats > 0) {
328 {
329 var arr = []; 328 var arr = [];
330 329
331 for (var i = 0; i < nMats; i++) { 330 for (var i = 0; i < nMats; i++) {
332 {
333 var matObj = 331 var matObj =
334 { 332 {
335 'materialNodeName':this._materialNodeArray[i].name, 333 'materialNodeName':this._materialNodeArray[i].name,
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js
index 22cbb5d4..ab0d7022 100755
--- a/js/lib/geom/rectangle.js
+++ b/js/lib/geom/rectangle.js
@@ -14,13 +14,12 @@ var MaterialsModel = require("js/models/materials-model").MaterialsModel;
14// Derived from class GeomObj 14// Derived from class GeomObj
15/////////////////////////////////////////////////////////////////////// 15///////////////////////////////////////////////////////////////////////
16exports.Rectangle = Object.create(GeomObj, { 16exports.Rectangle = Object.create(GeomObj, {
17{
18 if (!MaterialsModel)
19 MaterialsModel = require("js/models/materials-model").MaterialsModel;
20
21 // CONSTANTS 17 // CONSTANTS
22 N_TRIANGLES: { value : 15, writable: false }, // TODO - This is not being used anywhere. Remove? 18 N_TRIANGLES: { value : 15, writable: false }, // TODO - This is not being used anywhere. Remove?
23 19
20 //if (!MaterialsModel)
21 // MaterialsModel = require("js/models/materials-model").MaterialsModel;
22
24 /////////////////////////////////////////////////////////////////////// 23 ///////////////////////////////////////////////////////////////////////
25 // Instance variables 24 // Instance variables
26 /////////////////////////////////////////////////////////////////////// 25 ///////////////////////////////////////////////////////////////////////
@@ -1180,8 +1179,10 @@ RectangleStroke.create = function( rectCtr, width, height, strokeWidth, tlRad,
1180 } 1179 }
1181 1180
1182 //refine the mesh for vertex deformations 1181 //refine the mesh for vertex deformations
1183 if (material) { 1182 if (material)
1184 if (material.hasVertexDeformation()) { 1183 {
1184 if (material.hasVertexDeformation())
1185 {
1185 var paramRange = material.getVertexDeformationRange(); 1186 var paramRange = material.getVertexDeformationRange();
1186 var tolerance = material.getVertexDeformationTolerance(); 1187 var tolerance = material.getVertexDeformationTolerance();
1187 nVertices = ShapePrimitive.refineMesh( this.vertices, this.normals, this.uvs, this.indices, nVertices, paramRange, tolerance ); 1188 nVertices = ShapePrimitive.refineMesh( this.vertices, this.normals, this.uvs, this.indices, nVertices, paramRange, tolerance );