diff options
author | bobzel <zzzman@gmail.com> | 2023-05-24 16:39:38 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-05-24 16:39:38 -0400 |
commit | 9e1c341955fb016f4a62339e4f11ac42d9572e95 (patch) | |
tree | 007a18eb3daba387144e00131a93d6e3fa5c91ef /src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx | |
parent | 4c96bbd25d84964811838d005ff4e40487e1ec41 (diff) |
render cleanup for phys vector arrows.
Diffstat (limited to 'src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx')
-rw-r--r-- | src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx index d3e1c6fd2..f4acba2a6 100644 --- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx +++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx @@ -87,7 +87,7 @@ export class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<FieldViewP wallPositions: IWallProps[] = []; @computed get circularMotionRadius() { - return NumCast(this.dataDoc.circularMotionRadius, 150); + return (NumCast(this.dataDoc.circularMotionRadius, 150) * this.props.PanelWidth()) / 1000; } @computed get gravity() { return NumCast(this.dataDoc.simulation_gravity, -9.81); @@ -757,7 +757,7 @@ export class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<FieldViewP this.dataDoc.mass1_forcesUpdated = JSON.stringify([forceOfGravityReview, normalForceReview, staticFrictionForceReview]); }; - pause = () => (this.dataDoc.paused = true); + pause = () => (this.dataDoc.simulation_paused = true); componentForces1 = () => PhysicsSimulationBox.parseJSON(StrCast(this.dataDoc.mass1_componentForces)); setComponentForces1 = (forces: IForce[]) => (this.dataDoc.mass1_componentForces = JSON.stringify(forces)); componentForces2 = () => PhysicsSimulationBox.parseJSON(StrCast(this.dataDoc.mass2_componentForces)); @@ -810,7 +810,7 @@ export class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<FieldViewP yMax: this.yMax, yMin: this.yMin, wallPositions: this.wallPositions, - gravity: this.gravity, + gravity: Math.abs(this.gravity), timestepSize: 0.05, showComponentForces: BoolCast(this.dataDoc.simulation_showComponentForces), coefficientOfKineticFriction: NumCast(this.dataDoc.coefficientOfKineticFriction), |