X-Git-Url: https://git.r.bdr.sh/rbdr/serpentity-lib/blobdiff_plain/8d90115ac567adb5a3c61eefd27ab675fb3c0ef7..582cea2aedd3b5763232837cc4960f07223908fb:/components/position/index.js 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 // the position along the x axis + * -y // the position along the y axis + * -z // 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; + } +};