@leafer/helper 1.0.0-rc.7 → 1.0.0-rc.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/helper",
3
- "version": "1.0.0-rc.7",
3
+ "version": "1.0.0-rc.8",
4
4
  "description": "@leafer/helper",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,9 +22,9 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/math": "1.0.0-rc.7"
25
+ "@leafer/math": "1.0.0-rc.8"
26
26
  },
27
27
  "devDependencies": {
28
- "@leafer/interface": "1.0.0-rc.7"
28
+ "@leafer/interface": "1.0.0-rc.8"
29
29
  }
30
30
  }
package/src/LeafHelper.ts CHANGED
@@ -67,11 +67,9 @@ export const LeafHelper = {
67
67
  },
68
68
 
69
69
  worldHittable(t: ILeaf): boolean {
70
- if (!t.__.hittable) return false
71
- let { parent } = t
72
- while (parent) {
73
- if (!parent.__.hittable || !parent.__.hitChildren) return false
74
- parent = parent.parent
70
+ while (t) {
71
+ if (!t.__.hittable) return false
72
+ t = t.parent
75
73
  }
76
74
  return true
77
75
  },