diff options
author | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-05-04 11:47:33 -0400 |
---|---|---|
committer | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-05-04 11:47:33 -0400 |
commit | fbc3750dcfb124411965420bed6e04e36be18d09 (patch) | |
tree | b199883246ce0e445f7e33c846781bede12b38a0 /src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx | |
parent | 550d2d4b02bbaa19d6ca1b7f4d6146f4ed171bab (diff) |
debug incline plane and pulley positioning
Diffstat (limited to 'src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx')
-rw-r--r-- | src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx index db187d1b8..58ea745ef 100644 --- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx +++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx @@ -500,15 +500,23 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi // adjust y position if (angle >= 5 && angle < 10) { - yPos += 0.08*this.layoutDoc._height*0.2 + yPos += 0.08*this.layoutDoc._height*0.1 } else if (angle >= 10 && angle < 15) { yPos += 0.08*this.layoutDoc._height*0.23 } else if (angle >= 15 && angle < 20) { yPos += 0.08*this.layoutDoc._height*0.26 } else if (angle >= 20 && angle < 25) { - yPos += 0.08*this.layoutDoc._height*0.28 - } else if (angle >=25 && angle < 40) { - yPos += 0.08*this.layoutDoc._height*0.3 + yPos += 0.08*this.layoutDoc._height*0.32 + } else if (angle >= 25 && angle < 30) { + yPos += 0.08*this.layoutDoc._height*0.34 + } else if (angle >= 30 && angle < 35) { + yPos += 0.08*this.layoutDoc._height*0.37 + } else if (angle >= 35 && angle < 40) { + yPos += 0.08*this.layoutDoc._height*0.42 + } else if (angle >= 40 && angle < 45) { + yPos += 0.08*this.layoutDoc._height*0.44 + } else if (angle >= 45) { + yPos += 0.08*this.layoutDoc._height*0.46 } @@ -1182,9 +1190,9 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi this.dataDoc.updatedForces = ([gravityForce1, tensionForce1]); this.dataDoc.startForces = ([gravityForce1, tensionForce1]); this.dataDoc.startPosY2 = ((this.yMax + this.yMin) / 2); - this.dataDoc.startPosX2 = ((this.xMin + this.xMax) / 2 + 5 + (0.08*this.layoutDoc._height)); + this.dataDoc.startPosX2 = ((this.xMin + this.xMax) / 2 + 5 ); this.dataDoc.positionYDisplay2 = (this.getDisplayYPos((this.yMax + this.yMin) / 2)); - this.dataDoc.positionXDisplay2 = ((this.xMin + this.xMax) / 2 + 5 + (0.08*this.layoutDoc._height)); + this.dataDoc.positionXDisplay2 = ((this.xMin + this.xMax) / 2 + 5); this.dataDoc.updatedForces2 = ([gravityForce2, tensionForce2]); this.dataDoc.startForces2 = ([gravityForce2, tensionForce2]); |