aboutsummaryrefslogtreecommitdiff
path: root/components/position/index.js
blob: 9df10fcf768cfa364baae87a8c5b6c255f97027b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;
  }
};