diff options
author | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-05-04 21:02:38 -0400 |
---|---|---|
committer | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-05-04 21:02:38 -0400 |
commit | bfc445334a5aeee27256ea59cb9f958ef844397d (patch) | |
tree | 537207f6dbd03ede9484eebb05dceba1cbd109c7 /src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx | |
parent | fbc3750dcfb124411965420bed6e04e36be18d09 (diff) |
debug pulley
Diffstat (limited to 'src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx')
-rw-r--r-- | src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx index 58ea745ef..695b0733d 100644 --- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx +++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx @@ -123,7 +123,6 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi this.dataDoc.mode = this.dataDoc.mode ?? "Freeform"; this.dataDoc.positionXDisplay = this.dataDoc.positionXDisplay ?? 0; this.dataDoc.positionYDisplay = this.dataDoc.positionYDisplay ?? 0; - this.dataDoc.resetAll = this.dataDoc.resetAll ?? true; this.dataDoc.showAcceleration = this.dataDoc.showAcceleration ?? false; this.dataDoc.showComponentForces = this.dataDoc.showComponentForces ?? false; this.dataDoc.showForces = this.dataDoc.showForces ?? true; @@ -506,17 +505,17 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi } 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.32 + yPos += 0.08*this.layoutDoc._height*0.33 } else if (angle >= 25 && angle < 30) { - yPos += 0.08*this.layoutDoc._height*0.34 + yPos += 0.08*this.layoutDoc._height*0.35 } else if (angle >= 30 && angle < 35) { - yPos += 0.08*this.layoutDoc._height*0.37 + yPos += 0.08*this.layoutDoc._height*0.40 } else if (angle >= 35 && angle < 40) { - yPos += 0.08*this.layoutDoc._height*0.42 + yPos += 0.08*this.layoutDoc._height*0.45 } else if (angle >= 40 && angle < 45) { - yPos += 0.08*this.layoutDoc._height*0.44 + yPos += 0.08*this.layoutDoc._height*0.47 } else if (angle >= 45) { - yPos += 0.08*this.layoutDoc._height*0.46 + yPos += 0.08*this.layoutDoc._height*0.52 } @@ -1791,7 +1790,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi upperBound={0} value={this.dataDoc.gravity ?? -9.81} effect={(val: number) => { - this.dataDoc.resetAll = (!this.dataDoc.resetAll); + this.setupSimulation(this.dataDoc.simulationType, this.dataDoc.mode) }} labelWidth={"5em"} /> @@ -1807,7 +1806,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi upperBound={5} value={this.dataDoc.mass ?? 1} effect={(val: number) => { - this.dataDoc.resetAll = (!this.dataDoc.resetAll); + this.setupSimulation(this.dataDoc.simulationType, this.dataDoc.mode) }} labelWidth={"5em"} /> @@ -1823,7 +1822,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi upperBound={5} value={this.dataDoc.mass ?? 1} effect={(val: number) => { - this.dataDoc.resetAll = (!this.dataDoc.resetAll); + this.setupSimulation(this.dataDoc.simulationType, this.dataDoc.mode) }} labelWidth={"5em"} /> @@ -1839,7 +1838,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi upperBound={5} value={this.dataDoc.mass2 ?? 1} effect={(val: number) => { - this.dataDoc.resetAll = (!this.dataDoc.resetAll); + this.setupSimulation(this.dataDoc.simulationType, this.dataDoc.mode) }} labelWidth={"5em"} /> @@ -1855,7 +1854,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi upperBound={250} value={this.dataDoc.circularMotionRadius ?? 100} effect={(val: number) => { - this.dataDoc.resetAll = (!this.dataDoc.resetAll); + this.setupSimulation(this.dataDoc.simulationType, this.dataDoc.mode) }} labelWidth={"5em"} /> |