@safe-engine/cocos 2.3.6 → 2.3.7

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.
@@ -84,7 +84,7 @@ export class PhysicsSystem {
84
84
  const position = new b2Vec2(node.posX / PTM_RATIO, node.posY / PTM_RATIO);
85
85
  const square = new b2PolygonShape();
86
86
  const [x = 0, y = 0] = offset;
87
- square.SetAsBox(width / 2 / PTM_RATIO, height / 2 / PTM_RATIO, new b2Vec2(x, y), 0);
87
+ square.SetAsBox(width / 2 / PTM_RATIO, height / 2 / PTM_RATIO, new b2Vec2(x / PTM_RATIO, y / PTM_RATIO), 0);
88
88
  const fixtureDef = new b2FixtureDef();
89
89
  fixtureDef.set_shape(square);
90
90
  fixtureDef.set_density(density);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box2d-wasm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,IAAI,CAAA;AAGpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAE/B,wBAAgB,YAAY,CAAC,KAAK,YAAqB,EAAE,WAAW,UAAQ,EAAE,OAAO;;;;;;;;;;;;;;;;;;CAAiB,QAQrG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box2d-wasm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,IAAI,CAAA;AAGpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAE/B,wBAAgB,YAAY,CAAC,KAAK,YAAqB,EAAE,WAAW,UAAQ,EAAE,OAAO;;;;;;;;;;;;;;;;;;CAAgB,QAQpG"}
@@ -3,7 +3,7 @@ import { PhysicsSystem } from './PhysicsSystem';
3
3
  export * from './PhysicsComponent';
4
4
  export * from './PhysicsSprite';
5
5
  export * from './PhysicsSystem';
6
- export function setupPhysics(world = GameWorld.Instance, isDebugDraw = false, gravity = Vec2(0, -0.98)) {
6
+ export function setupPhysics(world = GameWorld.Instance, isDebugDraw = false, gravity = Vec2(0, -9.8)) {
7
7
  const physicsSystem = world.addSystemAndUpdate(PhysicsSystem);
8
8
  if (isDebugDraw) {
9
9
  physicsSystem.addDebug();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safe-engine/cocos",
3
- "version": "2.3.6",
3
+ "version": "2.3.7",
4
4
  "description": "safe-engine with cocos renderer support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",