]> git.r.bdr.sh - rbdr/serpentity-lib/blame_incremental - components/position/index.js
Publish
[rbdr/serpentity-lib] / components / position / index.js
... / ...
CommitLineData
1import { Component } from '@serpentity/serpentity';
2
3/*
4 * Position component, stores the location of an object in x, y and z
5 * Public members:
6 * -x <Number> // the position along the x axis
7 * -y <Number> // the position along the y axis
8 * -z <Number> // the position along the z axis
9 */
10export default class Position extends Component {
11 constructor(config) {
12
13 super(config)
14
15 this.x = this.x || 0;
16 this.y = this.y || 0;
17 this.z = this.z || 0;
18 }
19};