canvasengine 2.0.0-beta.27 → 2.0.0-beta.28

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.js CHANGED
@@ -1,5 +1,5 @@
1
- import { h as a } from "./index-JzoygiZz.js";
2
- import { A as r, B as n, w as o, C as c, m as l, l as p, D as S, v as m, a5 as u, a4 as g, a2 as b, n as d, G as C, c as j, M as T, N as E, O, P as f, a3 as v, R as w, o as h, p as D, S as P, q as k, r as x, T as y, b as A, V as H, t as M, a1 as V, a0 as B, _ as G, d as N, J as R, H as q, K as U, e as z, W as I, $ as J, f as K, g as L, x as Q, j as W, i as X, y as Y, k as Z, X as _, I as $, Q as F, L as aa, Z as sa, z as ea, s as ta, U as ia, Y as ra, a as na, u as oa } from "./index-JzoygiZz.js";
1
+ import { h as a } from "./index-Cif_Fy_t.js";
2
+ import { A as r, B as n, w as o, C as c, m as l, l as p, D as S, v as m, a5 as u, a4 as g, a2 as b, n as d, G as C, c as j, M as T, N as E, O, P as f, a3 as v, R as w, o as h, p as D, S as P, q as k, r as x, T as y, b as A, V as H, t as M, a1 as V, a0 as B, _ as G, d as N, J as R, H as q, K as U, e as z, W as I, $ as J, f as K, g as L, x as Q, j as W, i as X, y as Y, k as Z, X as _, I as $, Q as F, L as aa, Z as sa, z as ea, s as ta, U as ia, Y as ra, a as na, u as oa } from "./index-Cif_Fy_t.js";
3
3
  const e = a.Howler;
4
4
  export {
5
5
  r as ArraySubject,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvasengine",
3
- "version": "2.0.0-beta.27",
3
+ "version": "2.0.0-beta.28",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -275,7 +275,7 @@ export class CanvasSprite extends DisplayObject(PixiSprite) {
275
275
  this.play(this.sheetCurrentAnimation, [this.sheetParams]);
276
276
  }
277
277
 
278
- if (props.hitbox) this.hitbox = props.hitbox;
278
+ if (props.hitbox) this.hitbox = props.hitbox.value ?? props.hitbox;
279
279
 
280
280
  if (props.scaleMode) this.baseTexture.scaleMode = props.scaleMode;
281
281
  else if (props.image && this.fullProps.rectangle === undefined) {
@@ -353,7 +353,7 @@ export class CanvasSprite extends DisplayObject(PixiSprite) {
353
353
  );
354
354
  }
355
355
 
356
- const cloneParams = structuredClone(params);
356
+ const cloneParams = (params);
357
357
 
358
358
  this.removeChildren();
359
359
  animation.sprites = [];
@@ -459,6 +459,7 @@ export class CanvasSprite extends DisplayObject(PixiSprite) {
459
459
  const widthOfSprite =
460
460
  typeof realSize == "number" ? realSize : realSize?.width;
461
461
 
462
+
462
463
  const applyAnchorBySize = () => {
463
464
  if (heightOfSprite && this.hitbox) {
464
465
  const { spriteWidth, spriteHeight } = data;