@gg-web-engine/matter 0.0.18 → 0.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.
@@ -1,4 +1,4 @@
1
- import { IGg2dBody, Point2, Gg2dEntity } from '@gg-web-engine/core';
1
+ import { Gg2dEntity, IGg2dBody, Point2 } from '@gg-web-engine/core';
2
2
  import { Gg2dPhysicsWorld } from './gg-2d-physics-world';
3
3
  import { Body } from 'matter-js';
4
4
  export declare class Gg2dBody implements IGg2dBody {
@@ -1,3 +1,4 @@
1
+ import { Pnt2 } from '@gg-web-engine/core';
1
2
  import { Body, Composite, Vector } from 'matter-js';
2
3
  export class Gg2dBody {
3
4
  constructor(nativeBody) {
@@ -33,7 +34,7 @@ export class Gg2dBody {
33
34
  }
34
35
  dispose() { }
35
36
  resetMotion() {
36
- Body.setVelocity(this.nativeBody, { x: 0, y: 0 });
37
+ Body.setVelocity(this.nativeBody, Pnt2.O);
37
38
  Body.setAngularVelocity(this.nativeBody, 0);
38
39
  }
39
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gg-web-engine/matter",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "An attempt to create open source game engine for browser",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/matter-js": "^0.18.2",
33
- "@gg-web-engine/core": "^0.0.18",
33
+ "@gg-web-engine/core": "^0.0.20",
34
34
  "matter-js": "^0.19.0",
35
35
  "prettier": "^2.8.6",
36
36
  "typescript": "~4.7.2"
37
37
  },
38
38
  "peerDependencies": {
39
- "@gg-web-engine/core": "^0.0.18",
39
+ "@gg-web-engine/core": "^0.0.20",
40
40
  "matter-js": "^0.19.0"
41
41
  }
42
42
  }