From b8762e80e3fd6b1c78b62f6bd50acb2029a68f58 Mon Sep 17 00:00:00 2001 From: brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> Date: Mon, 20 Feb 2023 13:46:55 -0500 Subject: start sim settings menu --- src/client/views/nodes/PhysicsSimulationBox.tsx | 73 ++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 9 deletions(-) (limited to 'src/client/views/nodes/PhysicsSimulationBox.tsx') diff --git a/src/client/views/nodes/PhysicsSimulationBox.tsx b/src/client/views/nodes/PhysicsSimulationBox.tsx index 0f2bc43a0..b7f4ed0fb 100644 --- a/src/client/views/nodes/PhysicsSimulationBox.tsx +++ b/src/client/views/nodes/PhysicsSimulationBox.tsx @@ -7,8 +7,8 @@ import "./PhysicsSimulationBox.scss"; import Weight from "./PhysicsSimulationWeight"; import Wall from "./PhysicsSimulationWall" import Wedge from "./PhysicsSimulationWedge" -import { isUndefined } from "lodash"; - +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { CheckBox } from "../search/CheckBox"; export interface IForce { description: string; magnitude: number; @@ -53,6 +53,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent )} -
- {/* {this.dataDoc.wallPositions && ( - {this.dataDoc.wallPositions.map((element: { length: number; xPos: number; yPos: number; angleInDegrees: number; }, index: React.Key | null | undefined) => { + {/*
+ {this.dataDoc.wallPositions.map((element: { length: number; xPos: number; yPos: number; angleInDegrees: number; }, index: React.Key | null | undefined) => { return (
); })} - )} */} -
+
*/}
+
+ {this.menuIsOpen && ( +
+
{this.menuIsOpen = false}}> + +
+

Simulation Settings

+ {this.dataDoc.simulationType == "Free Weight" && +
+

Elastic collisions

+ {this.dataDoc.elasticCollisions = val}} originalStatus={this.dataDoc.elasticCollisions} /> +
+ } + {/* {this.dataDoc.simulationType == "Inclined Plane" && +
+

Inclined plane angle

+

input field!

+
+ } + {this.dataDoc.simulationType == "Pendulum" && +
+

Pendulum angle

+

input field!

+
+ } +
+

Show forces

+ + this.dataDoc.showForces = !this.dataDoc.showForces + } + /> +
+
+

Show acceleration

+ + this.dataDoc.showAcceleration = !this.dataDoc.showAcceleration + } + /> +
+
+

Show velocity

+ + this.dataDoc.showVelocity = !this.dataDoc.showVelocity + } + /> +
*/} +
+ )} +
@@ -395,6 +449,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponentTYPE)} +
-- cgit v1.2.3-70-g09d2