diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/PhysicsSimulationBox.tsx | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/client/views/nodes/PhysicsSimulationBox.tsx b/src/client/views/nodes/PhysicsSimulationBox.tsx index 1a64ec795..2db49de3c 100644 --- a/src/client/views/nodes/PhysicsSimulationBox.tsx +++ b/src/client/views/nodes/PhysicsSimulationBox.tsx @@ -194,8 +194,6 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi this.dataDoc.startPosX = xPos; this.dataDoc.startPosY = this.getDisplayYPos(yPos); - console.log('update start pos x') - console.log('update start pos y') this.updateForcesWithFriction( Number(this.dataDoc.coefficientOfStaticFriction), width, @@ -383,7 +381,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi <p>Show velocity</p></div> <div><input type="checkbox" checked={this.dataDoc.showVelocity} onClick={() => {this.dataDoc.showVelocity = !this.dataDoc.showVelocity}}/></div> </div> - <br/> + <hr/> {this.dataDoc.simulationType == "Free Weight" && <div className="mechanicsSimulationSettingsMenuRow"> <div className="mechanicsSimulationSettingsMenuRowDescription"><p>Elastic collisions </p></div> <div><input type="checkbox" checked={this.dataDoc.elasticCollisions} onClick={() => {this.dataDoc.elasticCollisions = !this.dataDoc.elasticCollisions}}/></div> @@ -421,12 +419,29 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<Fi /> </div> </div>} - {/* {this.dataDoc.simulationType == "Inclined Plane" && - <div className="mechanicsSimulationSettingsMenuRow"> - <p>Inclined plane angle </p> - <p>input field!</p> + {this.dataDoc.simulationType == "Inclined Plane" && <div className="mechanicsSimulationSettingsMenuRow"> + <div className="mechanicsSimulationSettingsMenuRowDescription"><p>Inclined plane angle</p></div> + <div> + <input + type="number" + value={this.dataDoc.wedgeAngle} + max={70} + min={0} + step={1} + onInput={(e) => { + let angle = e.target.value ?? 0 + if (angle > 70) { + angle = 70 + } + if (angle < 0) { + angle = 0 + } + this.dataDoc.wedgeAngle = angle + this.changeWedgeBasedOnNewAngle(angle) + }} + /> </div> - } */} + </div>} </div> )} </div> |