diff options
Diffstat (limited to 'components/position/index.js')
| -rw-r--r-- | components/position/index.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/components/position/index.js b/components/position/index.js new file mode 100644 index 0000000..9df10fc --- /dev/null +++ b/components/position/index.js @@ -0,0 +1,19 @@ +import { Component } from '@serpentity/serpentity'; + +/* + * Position component, stores the location of an object in x, y and z + * Public members: + * -x <Number> // the position along the x axis + * -y <Number> // the position along the y axis + * -z <Number> // the position along the z axis + */ +export default class Position extends Component { + constructor(config) { + + super(config) + + this.x = this.x || 0; + this.y = this.y || 0; + this.z = this.z || 0; + } +}; |