wgge 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -96,4 +96,8 @@ export default class ModelBase extends NodeWithEvents {
96
96
  equalsTo(ch) {
97
97
  return this === ch;
98
98
  }
99
+
100
+ getResourcesForPreload() {
101
+ return [];
102
+ }
99
103
  }
@@ -153,13 +153,13 @@ export default class Vector2 extends ObjectModel {
153
153
  return Math.max(distX, distY) <= size;
154
154
  }
155
155
 
156
- getDirectNeighborPositions(position, includeCenter = false) {
156
+ getDirectNeighborPositions(includeCenter = false) {
157
157
  const positions = [];
158
- if (includeCenter) positions.push(position);
159
- positions.push(new Vector2(position.x - 1, position.y));
160
- positions.push(new Vector2(position.x, position.y - 1));
161
- positions.push(new Vector2(position.x + 1, position.y));
162
- positions.push(new Vector2(position.x, position.y + 1));
158
+ if (includeCenter) positions.push(this);
159
+ positions.push(new Vector2(this.x - 1, this.y));
160
+ positions.push(new Vector2(this.x, this.y - 1));
161
+ positions.push(new Vector2(this.x + 1, this.y));
162
+ positions.push(new Vector2(this.x, this.y + 1));
163
163
  return positions;
164
164
  }
165
165
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wgge",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "Web GL Game Engine",
5
5
  "main": "index.js",
6
6
  "devDependencies": {