diff options
Diffstat (limited to 'assets/javascripts/rectangles/rect.js')
| -rw-r--r-- | assets/javascripts/rectangles/rect.js | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/assets/javascripts/rectangles/rect.js b/assets/javascripts/rectangles/rect.js index 67abdee..3c6eedc 100644 --- a/assets/javascripts/rectangles/rect.js +++ b/assets/javascripts/rectangles/rect.js @@ -186,52 +186,50 @@ window.rect = (function(){ var width = this.x.length() var depth = this.y.length() - var height = 800 + var height = 500 if (this.sides & FRONT) { el = wall('.face.front') - el.scaleX = width - el.scaleY = height - el.z = this.y.a - depth/2 + el.width = width + el.height = height el.x = this.x.a - el.y = height/2 - list.push(el) - } - if (this.sides & LEFT) { - el = wall('.face.left') - el.rotationY = -HALF_PI - el.scaleY = height - el.scaleZ = depth - el.x = this.x.a - width/2 - el.z = this.y.a - el.y = height/2 - list.push(el) - } - if (this.sides & RIGHT) { - el = wall('.face.right') - el.rotationY = HALF_PI - el.scaleY = height - el.scaleZ = depth - el.x = this.x.a + width/2 - el.y = height/2 el.z = this.y.a list.push(el) } if (this.sides & BACK) { var el = wall('.face.back') - el.scaleX = width - el.scaleY = height + el.width = width + el.height = height el.rotationY = PI - el.z = this.y.a + depth/2 - el.y = height/2 el.x = this.x.a + el.z = this.y.a + depth list.push(el) } - + +// if (this.sides & LEFT) { +// el = wall('.face.left') +// el.rotationY = -HALF_PI +// el.height = height +// el.width = depth +// el.z = this.y.a - depth/2 +// el.x = this.x.a +// list.push(el) +// } +// if (this.sides & RIGHT) { +// el = wall('.face.right') +// el.rotationY = HALF_PI +// el.height = height +// el.width = depth +// el.z = this.y.a - depth/2 +// el.x = this.x.b +// list.push(el) +// } + function wall(klass){ var el = new MX.Object3D(klass || ".face") el.width = el.height = el.scaleX = el.scaleY = el.scaleZ = 1 el.z = el.y = el.x = 0 + el.y = height/2 el.type = "Face" return el } |
