12345678910111213141516171819202122232425 |
- const Vector3 = require("./Vector3");
- module.exports = class Moon {
- /**
- * @param {Vector3} position The starting position of the moon
- */
- constructor(position) {
- /**
- * The position of the moon in space
- */
- this.position = position;
- /**
- * The position of the moon at the time of creation
- *
- * This is a silly trick to get a clean copy of the Vector, but it works.
- *
- * @private
- */
- this._initialPosition = position.negate().negate();
- /**
- * The current velocity of the moon
- */
- this.velocity = new Vector3(0, 0, 0);
- }
- };
|