@leafer/display 1.0.0-alpha.10 → 1.0.0-alpha.21
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 +9 -9
- package/src/Branch.ts +2 -2
- package/src/Leaf.ts +4 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer/display",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.21",
|
|
4
4
|
"description": "@leafer/display",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"leaferjs"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@leafer/math": "1.0.0-alpha.
|
|
23
|
-
"@leafer/data": "1.0.0-alpha.
|
|
24
|
-
"@leafer/layout": "1.0.0-alpha.
|
|
25
|
-
"@leafer/display-module": "1.0.0-alpha.
|
|
26
|
-
"@leafer/event": "1.0.0-alpha.
|
|
27
|
-
"@leafer/decorator": "1.0.0-alpha.
|
|
28
|
-
"@leafer/helper": "1.0.0-alpha.
|
|
22
|
+
"@leafer/math": "1.0.0-alpha.21",
|
|
23
|
+
"@leafer/data": "1.0.0-alpha.21",
|
|
24
|
+
"@leafer/layout": "1.0.0-alpha.21",
|
|
25
|
+
"@leafer/display-module": "1.0.0-alpha.21",
|
|
26
|
+
"@leafer/event": "1.0.0-alpha.21",
|
|
27
|
+
"@leafer/decorator": "1.0.0-alpha.21",
|
|
28
|
+
"@leafer/helper": "1.0.0-alpha.21"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@leafer/interface": "1.0.0-alpha.
|
|
31
|
+
"@leafer/interface": "1.0.0-alpha.21"
|
|
32
32
|
}
|
|
33
33
|
}
|
package/src/Branch.ts
CHANGED
|
@@ -95,7 +95,7 @@ export class Branch extends Leaf {
|
|
|
95
95
|
child.parent = this
|
|
96
96
|
|
|
97
97
|
index === undefined ? this.children.push(child) : this.children.splice(index, 0, child)
|
|
98
|
-
if (child.__isBranch) this.__childBranchNumber ? this.__childBranchNumber++ : this.__childBranchNumber = 1
|
|
98
|
+
if (child.__isBranch) this.__.__childBranchNumber ? this.__.__childBranchNumber++ : this.__.__childBranchNumber = 1
|
|
99
99
|
|
|
100
100
|
if (this.root) {
|
|
101
101
|
child.__bindRoot(this.root)
|
|
@@ -115,7 +115,7 @@ export class Branch extends Leaf {
|
|
|
115
115
|
if (index > -1) {
|
|
116
116
|
this.children.splice(index, 1)
|
|
117
117
|
|
|
118
|
-
if (child.__isBranch) this.__childBranchNumber > 1 ? this.__childBranchNumber-- : this.__childBranchNumber = 0
|
|
118
|
+
if (child.__isBranch) this.__.__childBranchNumber > 1 ? this.__.__childBranchNumber-- : this.__.__childBranchNumber = 0
|
|
119
119
|
|
|
120
120
|
if (this.root) {
|
|
121
121
|
const event = new ChildEvent(ChildEvent.REMOVE, child, this)
|
package/src/Leaf.ts
CHANGED
|
@@ -37,10 +37,6 @@ export class Leaf implements ILeaf {
|
|
|
37
37
|
|
|
38
38
|
public __worldOpacity: number
|
|
39
39
|
public __renderTime: number // μs 1000微秒 = 1毫秒
|
|
40
|
-
public __complex: boolean // 外观是否复杂
|
|
41
|
-
|
|
42
|
-
public __interactionOff: boolean
|
|
43
|
-
public __childrenInteractionOff: boolean
|
|
44
40
|
|
|
45
41
|
public __level: number // 所在层级 0 -> 高
|
|
46
42
|
public __tempNumber: number // 用于排序,记录最后一次在parent中的排序索引,可用于移除之后回退
|
|
@@ -56,7 +52,6 @@ export class Leaf implements ILeaf {
|
|
|
56
52
|
|
|
57
53
|
// branch
|
|
58
54
|
public children?: ILeaf[]
|
|
59
|
-
public __childBranchNumber?: number
|
|
60
55
|
|
|
61
56
|
constructor(data?: ILeafInputData) {
|
|
62
57
|
|
|
@@ -123,14 +118,6 @@ export class Leaf implements ILeaf {
|
|
|
123
118
|
// ---
|
|
124
119
|
|
|
125
120
|
|
|
126
|
-
// worldOpacity rewrite, include visible
|
|
127
|
-
|
|
128
|
-
public __updateWorldOpacity(): void { }
|
|
129
|
-
|
|
130
|
-
// ---
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
121
|
// LeafMatrix rewrite
|
|
135
122
|
|
|
136
123
|
public __updateWorldMatrix(): void { }
|
|
@@ -189,6 +176,10 @@ export class Leaf implements ILeaf {
|
|
|
189
176
|
|
|
190
177
|
public __draw(_canvas: ILeaferCanvas, _options: IRenderOptions): void { }
|
|
191
178
|
|
|
179
|
+
public __updateWorldOpacity(): void { }
|
|
180
|
+
|
|
181
|
+
public __updateRenderTime(): void { }
|
|
182
|
+
|
|
192
183
|
public __updateChange(): void { }
|
|
193
184
|
|
|
194
185
|
// ---
|