فهرست منبع

Add Moon class

The objects we're working with have more than just a Vector3 to
track, so created a class to contain all of it.
ApisNecros 4 ماه پیش
والد
کامیت
c0316de99c
1فایلهای تغییر یافته به همراه17 افزوده شده و 0 حذف شده
  1. 17 0
      12/Moon.js

+ 17 - 0
12/Moon.js

@@ -0,0 +1,17 @@
+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 current velocity of the moon
+         */
+        this.velocity = new Vector3(0, 0, 0);
+    }
+};