diff options
author | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-04-24 13:39:14 -0400 |
---|---|---|
committer | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-04-24 13:39:14 -0400 |
commit | 0cda1a8f8b4e3d79c30291685456c7cb62fd7e8e (patch) | |
tree | b751e75a3f1c7a60b440c75834b723e5299ed0ff /src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx | |
parent | dffb5bdfdcffc7e1f85888b7222468bfb95a05ac (diff) |
add folder for physics box
Diffstat (limited to 'src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx')
-rw-r--r-- | src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx new file mode 100644 index 000000000..9283e8d46 --- /dev/null +++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx @@ -0,0 +1,34 @@ +import React = require('react'); + +export interface Force { + magnitude: number; + directionInDegrees: number; +} +export interface IWallProps { + length: number; + xPos: number; + yPos: number; + angleInDegrees: number; +} + +export default class App extends React.Component<IWallProps> { + + constructor(props: any) { + super(props) + } + + wallStyle = { + width: this.props.angleInDegrees == 0 ? this.props.length + "%" : "3%", + height: this.props.angleInDegrees == 0 ? "3%" : this.props.length + "%", + position: "absolute" as "absolute", + left: this.props.xPos + "%", + top: this.props.yPos + "%", + backgroundColor: "#6c7b8b", + margin: 0, + padding: 0, + }; + + render () { + return (<div style={this.wallStyle}></div>); + } +}; |