From 7bcb453724378ed947c95a348c91affb9eaf45d6 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Mon, 25 May 2015 21:14:33 -0700 Subject: [PATCH] cells rendreing --- js/fea/DmaCell.js | 1 + js/fea/DmaPart.js | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/js/fea/DmaCell.js b/js/fea/DmaCell.js index 369017c2..34359dbd 100644 --- a/js/fea/DmaCell.js +++ b/js/fea/DmaCell.js @@ -14,6 +14,7 @@ function DMACell(indices, cellMode, partType) { this.cellMesh = this._buildCellMesh(); this._doMeshTransformations(this.cellMesh);//some cell types require transformations + this._setMeshPosition(this.cellMesh, this._calcPosition()); globals.three.sceneAdd(this.cellMesh,this._sceneType(indices)); diff --git a/js/fea/DmaPart.js b/js/fea/DmaPart.js index 7069dfb5..cd977ced 100644 --- a/js/fea/DmaPart.js +++ b/js/fea/DmaPart.js @@ -22,13 +22,6 @@ var partMaterial = new THREE.MeshLambertMaterial({ color:0xffffff, shading: THRE globals.three.sceneAdd(this.mesh, "part"); }; - DMAPart.prototype.updateForScale = function(scale, position){ - if (this.mesh) { - this.mesh.scale.set(scale, scale, scale); - this._setMeshPosition(position); - } - }; - DMAPart.prototype._setMeshPosition = function(position){ var mesh = this.mesh; mesh.position.x = position.x; @@ -229,7 +222,6 @@ var partMaterial = new THREE.MeshLambertMaterial({ color:0xffffff, shading: THRE var unitScale = 1/(1.2699999809265137); unitPartGeo.applyMatrix(new THREE.Matrix4().makeRotationX(Math.PI/2)); unitPartGeo.applyMatrix(new THREE.Matrix4().makeScale(unitScale, unitScale, unitScale)); - console.log(unitPartGeo); }); function DMAGIKPart(type, parent){ -- GitLab