@leafer-draw/miniapp 1.12.0 → 1.12.1

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.
@@ -4951,10 +4951,53 @@ const BranchHelper = {
4951
4951
  if (exclude && exclude === branch) continue;
4952
4952
  updateBounds$3(branch);
4953
4953
  }
4954
+ },
4955
+ move(branch, x, y) {
4956
+ let w;
4957
+ const {children: children} = branch;
4958
+ for (let i = 0, len = children.length; i < len; i++) {
4959
+ branch = children[i];
4960
+ w = branch.__world;
4961
+ w.e += x;
4962
+ w.f += y;
4963
+ w.x += x;
4964
+ w.y += y;
4965
+ if (branch.isBranch) move$3(branch, x, y);
4966
+ }
4967
+ },
4968
+ scale(branch, x, y, scaleX, scaleY, a, b) {
4969
+ let w;
4970
+ const {children: children} = branch;
4971
+ const changeScaleX = scaleX - 1;
4972
+ const changeScaleY = scaleY - 1;
4973
+ for (let i = 0, len = children.length; i < len; i++) {
4974
+ branch = children[i];
4975
+ w = branch.__world;
4976
+ w.a *= scaleX;
4977
+ w.d *= scaleY;
4978
+ if (w.b || w.c) {
4979
+ w.b *= scaleX;
4980
+ w.c *= scaleY;
4981
+ }
4982
+ if (w.e === w.x && w.f === w.y) {
4983
+ w.x = w.e += (w.e - a) * changeScaleX + x;
4984
+ w.y = w.f += (w.f - b) * changeScaleY + y;
4985
+ } else {
4986
+ w.e += (w.e - a) * changeScaleX + x;
4987
+ w.f += (w.f - b) * changeScaleY + y;
4988
+ w.x += (w.x - a) * changeScaleX + x;
4989
+ w.y += (w.y - b) * changeScaleY + y;
4990
+ }
4991
+ w.width *= scaleX;
4992
+ w.height *= scaleY;
4993
+ w.scaleX *= scaleX;
4994
+ w.scaleY *= scaleY;
4995
+ if (branch.isBranch) scale$1(branch, x, y, scaleX, scaleY, a, b);
4996
+ }
4954
4997
  }
4955
4998
  };
4956
4999
 
4957
- const {pushAllChildBranch: pushAllChildBranch$1, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack} = BranchHelper;
5000
+ const {pushAllChildBranch: pushAllChildBranch$1, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack, move: move$3, scale: scale$1} = BranchHelper;
4958
5001
 
4959
5002
  const WaitHelper = {
4960
5003
  run(wait) {
@@ -6518,10 +6561,10 @@ let Leaf = class Leaf {
6518
6561
  hit(_world, _hitRadius) {
6519
6562
  return true;
6520
6563
  }
6521
- __hitWorld(_point) {
6564
+ __hitWorld(_point, _forceHitFill) {
6522
6565
  return true;
6523
6566
  }
6524
- __hit(_local) {
6567
+ __hit(_local, _forceHitFill) {
6525
6568
  return true;
6526
6569
  }
6527
6570
  __hitFill(_inner) {
@@ -6880,7 +6923,7 @@ class LeafLevelList {
6880
6923
  }
6881
6924
  }
6882
6925
 
6883
- const version = "1.12.0";
6926
+ const version = "1.12.1";
6884
6927
 
6885
6928
  class LeaferCanvas extends LeaferCanvasBase {
6886
6929
  get allowBackgroundColor() {