exodeui 2.5.4 → 2.5.5

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.
package/dist/index.mjs CHANGED
@@ -4667,12 +4667,12 @@ class KC {
4667
4667
  if ((B = C.physics) != null && B.enabled && C.type === "Shape") {
4668
4668
  const i = this.objectStates.get(C.id);
4669
4669
  if (!i) return;
4670
- const D = C.geometry.width || 100, o = C.geometry.height || 100;
4670
+ const D = C.geometry.width || 100, o = C.geometry.height || 100, w = i.x + D / 2, h = i.y + o / 2;
4671
4671
  this.physicsEngine.createBody({
4672
4672
  id: C.id,
4673
4673
  type: C.geometry.type,
4674
- x: i.x,
4675
- y: i.y,
4674
+ x: w,
4675
+ y: h,
4676
4676
  width: D,
4677
4677
  height: o,
4678
4678
  rotation: i.rotation * (Math.PI / 180),
@@ -5121,7 +5121,7 @@ class KC {
5121
5121
  console.warn("No state for object:", I.id);
5122
5122
  return;
5123
5123
  }
5124
- const C = g.geometry || I.geometry, B = C.width || 0, i = C.height || 0, D = g.x, o = g.y;
5124
+ const C = g.geometry || I.geometry, B = C.width || 0, i = C.height || 0, D = g.x + B / 2, o = g.y + i / 2;
5125
5125
  A.save(), A.translate(D, o), A.rotate(g.rotation * Math.PI / 180), A.scale(g.scale_x, g.scale_y);
5126
5126
  const w = g.style || I.style;
5127
5127
  if (C.type === "Text") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exodeui",
3
- "version": "2.5.4",
3
+ "version": "2.5.5",
4
4
  "description": "React Runtime for ExodeUI Animation Engine",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",