aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx
diff options
context:
space:
mode:
authorbrynnchernosky <56202540+brynnchernosky@users.noreply.github.com>2023-05-03 16:04:02 -0400
committerbrynnchernosky <56202540+brynnchernosky@users.noreply.github.com>2023-05-03 16:04:02 -0400
commit2e3df73d84228b04b8d1f284b5e18f7e48fad759 (patch)
tree9628abbbe9e86cc0ce15f7b9c6fcac2145daa0cd /src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx
parent018077581b70483ac2f3453ba813b5f4adb61fd5 (diff)
debugging json import
Diffstat (limited to 'src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx')
-rw-r--r--src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx
index 597256d44..8369a994a 100644
--- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx
+++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx
@@ -244,7 +244,6 @@ export default class Weight extends React.Component<IWeightProps, IState> {
// // Make sure weight doesn't go above max height
// if (prevState.updatedStartPosY != this.state.updatedStartPosY || prevProps.startVelY != this.props.startVelY) {
- // console.log('max height check')
// if (this.props.dataDoc['simulationType'] == "One Weight") {
// let maxYPos = this.state.updatedStartPosY;
// if (this.props.startVelY != 0) {
@@ -258,9 +257,9 @@ export default class Weight extends React.Component<IWeightProps, IState> {
// }
// Check for collisions and update
+ if (!this.props.paused) {
if (prevState.timer != this.state.timer) {
- console.log('update')
- if (!this.props.paused && !this.props.noMovement) {
+ if (!this.props.noMovement) {
let collisions = false;
if (
this.props.dataDoc['simulationType'] == "One Weight" ||
@@ -281,16 +280,15 @@ export default class Weight extends React.Component<IWeightProps, IState> {
this.setDisplayValues();
}
}
+ }
// Reset everything on reset button click
if (prevProps.reset != this.props.reset) {
- console.log('reset')
this.resetEverything();
}
// Convert from static to kinetic friction if/when weight slips on inclined plane
if (prevState.xVelocity != this.state.xVelocity) {
- console.log('friction')
if (
this.props.dataDoc['simulationType'] == "Inclined Plane" &&
Math.abs(this.state.xVelocity) > 0.1 &&
@@ -407,7 +405,6 @@ export default class Weight extends React.Component<IWeightProps, IState> {
// Add/remove walls when simulation type changes
if (prevProps.simulationType != this.props.simulationType) {
- console.log('walls')
let w: IWallProps[] = [];
if (this.props.dataDoc['simulationType'] == "One Weight" || this.props.dataDoc['simulationType'] == "Inclined Plane") {
w = this.props.wallPositions
@@ -440,7 +437,6 @@ export default class Weight extends React.Component<IWeightProps, IState> {
const coordinatePair2 = Math.round(left + this.props.wedgeWidth) + "," + this.props.yMax + " ";
const coordinatePair3 = Math.round(left) + "," + (this.props.yMax - this.props.wedgeHeight);
const coord = coordinatePair1 + coordinatePair2 + coordinatePair3;
- console.log('coord ', coord)
this.setState({coordinates: coord})
}