diff options
author | bobzel <zzzman@gmail.com> | 2023-06-14 09:12:13 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-06-14 09:12:13 -0400 |
commit | 376270791c7fe414c05a87f73afe11146d119c35 (patch) | |
tree | c6c788c958a5aaca4a9bbdd709d5e6f1d76dde0d /src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx | |
parent | 2bc89733ce522527c2f27203b537d99395c9479b (diff) | |
parent | bf16eca7a84adfdf1c5970e7e4793568ee70325d (diff) |
Merge branch 'master' into advanced-trails
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..8cc1d0fbf --- /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 Wall extends React.Component<IWallProps> { + + constructor(props: any) { + super(props) + } + + wallStyle = { + width: this.props.angleInDegrees == 0 ? this.props.length + "%" : "5px", + height: this.props.angleInDegrees == 0 ? "5px" : 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>); + } +}; |