@leafer/helper 1.0.0-alpha.23 → 1.0.0-alpha.30

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-alpha.23",
3
+ "version": "1.0.0-alpha.30",
4
4
  "description": "@leafer/helper",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -19,9 +19,9 @@
19
19
  "leaferjs"
20
20
  ],
21
21
  "dependencies": {
22
- "@leafer/math": "1.0.0-alpha.23"
22
+ "@leafer/math": "1.0.0-alpha.30"
23
23
  },
24
24
  "devDependencies": {
25
- "@leafer/interface": "1.0.0-alpha.23"
25
+ "@leafer/interface": "1.0.0-alpha.30"
26
26
  }
27
27
  }
@@ -21,7 +21,7 @@ export const BranchHelper = {
21
21
  const { children } = branch
22
22
  for (let i = 0, len = children.length; i < len; i++) {
23
23
  branch = children[i]
24
- if (branch.__isBranch) {
24
+ if (branch.isBranch) {
25
25
  branch.__tempNumber = 1
26
26
  pushList.push(branch)
27
27
  pushAllChildBranch(branch, pushList)
@@ -53,7 +53,7 @@ export const BranchHelper = {
53
53
  let start = pushList.length
54
54
  const { children } = branch
55
55
  for (let i = 0, len = children.length; i < len; i++) {
56
- if (children[i].__isBranch) {
56
+ if (children[i].isBranch) {
57
57
  pushList.push(children[i])
58
58
  }
59
59
  }
package/src/LeafHelper.ts CHANGED
@@ -7,7 +7,7 @@ export const LeafHelper = {
7
7
  updateAllWorldMatrix(leaf: ILeaf): void {
8
8
  leaf.__updateWorldMatrix()
9
9
 
10
- if (leaf.__isBranch) {
10
+ if (leaf.isBranch) {
11
11
  const { children } = leaf
12
12
  for (let i = 0, len = children.length; i < len; i++) {
13
13
  updateAllWorldMatrix(children[i])
@@ -18,7 +18,7 @@ export const LeafHelper = {
18
18
  updateAllWorldOpacity(leaf: ILeaf): void {
19
19
  leaf.__updateWorldOpacity()
20
20
 
21
- if (leaf.__isBranch) {
21
+ if (leaf.isBranch) {
22
22
  const { children } = leaf
23
23
  for (let i = 0, len = children.length; i < len; i++) {
24
24
  updateAllWorldOpacity(children[i])
@@ -32,7 +32,7 @@ export const LeafHelper = {
32
32
 
33
33
  leaf.__updateChange()
34
34
 
35
- if (leaf.__isBranch) {
35
+ if (leaf.isBranch) {
36
36
  const { children } = leaf
37
37
  for (let i = 0, len = children.length; i < len; i++) {
38
38
  updateAllChange(children[i])
@@ -0,0 +1,8 @@
1
+ import { IFunction } from '@leafer/interface'
2
+
3
+ export const WaitHelper = {
4
+ run(wait: IFunction[]): void {
5
+ for (let i = 0, len = wait.length; i < len; i++) { wait[i]() }
6
+ wait.length = 0
7
+ }
8
+ }
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { LeafHelper } from './LeafHelper'
2
2
  export { LeafBoundsHelper } from './LeafBoundsHelper'
3
3
  export { BranchHelper } from './BranchHelper'
4
+ export { WaitHelper } from './WaitHelper'