@woosh/meep-engine 2.121.0 → 2.121.2
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/README.md +1 -1
- package/package.json +1 -1
- package/src/core/collection/map/HashMap.d.ts.map +1 -1
- package/src/core/collection/map/HashMap.js +29 -2
- package/src/core/geom/2d/aabb/aabb2_intersects_point.d.ts +12 -0
- package/src/core/geom/2d/aabb/aabb2_intersects_point.d.ts.map +1 -0
- package/src/core/geom/2d/aabb/aabb2_intersects_point.js +17 -0
- package/src/core/geom/2d/quad-tree/QuadTreeNode.d.ts +17 -6
- package/src/core/geom/2d/quad-tree/QuadTreeNode.d.ts.map +1 -1
- package/src/core/geom/2d/quad-tree/QuadTreeNode.js +59 -98
- package/src/core/geom/2d/quad-tree/qt_collect_by_box.d.ts +14 -0
- package/src/core/geom/2d/quad-tree/qt_collect_by_box.d.ts.map +1 -0
- package/src/core/geom/2d/quad-tree/qt_collect_by_box.js +90 -0
- package/src/core/geom/2d/quad-tree/qt_collect_by_point.d.ts +11 -0
- package/src/core/geom/2d/quad-tree/qt_collect_by_point.d.ts.map +1 -0
- package/src/core/geom/2d/quad-tree/qt_collect_by_point.js +85 -0
- package/src/core/geom/3d/ray/ray3_distance_to_point.d.ts +14 -1
- package/src/core/geom/3d/ray/ray3_distance_to_point.d.ts.map +1 -1
- package/src/core/geom/3d/ray/ray3_distance_to_point.js +18 -1
- package/src/core/geom/3d/shape/UnionShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnionShape3D.js +4 -0
- package/src/core/geom/3d/shape/UnitCubeShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnitCubeShape3D.js +4 -0
- package/src/core/geom/ConicRay.d.ts +5 -1
- package/src/core/geom/ConicRay.d.ts.map +1 -1
- package/src/core/geom/ConicRay.js +5 -1
- package/src/core/geom/Vector3.d.ts.map +1 -1
- package/src/core/geom/Vector3.js +67 -49
- package/src/core/geom/packing/max-rect/MaxRectanglesPacker.d.ts.map +1 -1
- package/src/core/geom/packing/max-rect/MaxRectanglesPacker.js +3 -0
- package/src/core/geom/packing/max-rect/cutArea.d.ts.map +1 -1
- package/src/core/geom/packing/max-rect/cutArea.js +8 -1
- package/src/core/geom/packing/max-rect/findBestContainer.d.ts +4 -4
- package/src/core/geom/packing/max-rect/findBestContainer.d.ts.map +1 -1
- package/src/core/geom/packing/max-rect/findBestContainer.js +30 -8
- package/src/core/geom/packing/max-rect/packOneBox.d.ts.map +1 -1
- package/src/core/geom/packing/max-rect/packOneBox.js +7 -2
- package/src/core/geom/packing/max-rect/removeRedundantBoxesArray.d.ts.map +1 -1
- package/src/core/geom/packing/max-rect/removeRedundantBoxesArray.js +13 -7
- package/src/core/geom/packing/miniball/Miniball.d.ts.map +1 -1
- package/src/core/geom/packing/miniball/Miniball.js +27 -1
- package/src/core/geom/packing/miniball/PointSet.d.ts.map +1 -1
- package/src/core/geom/packing/miniball/PointSet.js +25 -4
- package/src/core/geom/packing/miniball/Quality.js +1 -3
- package/src/core/geom/vec3/v3_lerp.d.ts +2 -2
- package/src/core/geom/vec3/v3_lerp.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_lerp.js +3 -1
- package/src/core/geom/vec3/v3_slerp.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_slerp.js +5 -0
- package/src/core/graph/layout/box/position_box_next_to_box.d.ts.map +1 -1
- package/src/core/graph/layout/box/position_box_next_to_box.js +15 -8
- package/src/core/math/lerp.d.ts +1 -1
- package/src/core/math/lerp.d.ts.map +1 -1
- package/src/core/math/lerp.js +3 -2
- package/src/view/View.d.ts.map +1 -1
- package/src/view/View.js +14 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Miniball.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/packing/miniball/Miniball.js"],"names":[],"mappings":"AAwBA;;;GAGG;AACH;IACI;;;;;OAKG;IACH,oBAFW,QAAQ,
|
|
1
|
+
{"version":3,"file":"Miniball.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/packing/miniball/Miniball.js"],"names":[],"mappings":"AAwBA;;;GAGG;AACH;IACI;;;;;OAKG;IACH,oBAFW,QAAQ,EAoGlB;IA/FG;;;OAGG;IACH,WAFU,MAAM,CAEE;IAClB;;;OAGG;IACH,WAFU,MAAM,CAEE;IAClB;;;OAGG;IACH,iBAFU,MAAM,CAEQ;IACxB;;;;;;;;;;OAUG;IACH,wBAAwB;IACxB;;;;OAIG;IACH,iBAAiB;IACjB;;;OAGG;IACH,SAFU,MAAM,CAEA;IAEhB;;OAEG;IACH,GAFU,QAAQ,CAEH;IAEf;;;;OAIG;IACH,eAA2B;IAI3B;;;OAGG;IACH,KAFU,MAAM,CAEU;IAM1B;;;;OAIG;IACH,iBAA4D;IAE5D;;;OAGG;IACH,aAFU,MAAM,EAAE,GAAC,YAAY,CAEkD;IAEjF;;;OAGG;IACH,eAFU,MAAM,EAAE,GAAC,YAAY,CAEwD;IAEvF;;;OAGG;IACH,SAFU,MAAM,EAAE,GAAC,YAAY,CAEsD;IAErF;;;;OAIG;IACH,kBAAgC;IAIpC;;;;;;;OAOG;IACH,WAFY,OAAO,CAIlB;IAED;;;;;;OAMG;IACH,UAFY,MAAM,CAIjB;IAED;;;;;;OAMG;IACH,UAFY,MAAM,EAAE,CAInB;IAED;;;OAGG;IACH,eAFa,OAAO,CAInB;IAED;;;;;;OAMG;IACH,QAJY,MAAM,CAMjB;IAED;;;;;;;;OAQG;IACH,iBAkCC;IAED;;OAEG;IACH,yBAGC;IAED;;OAEG;IACH,qBAcC;IAED;;;;;;;;;;OAUG;IACH,gBA4CC;IAED;;;;;;;;OAQG;IACH,kBAFY,OAAO,CA4BlB;IAED;;;;;;;;OAQG;IACH,yBAyDC;IAGD;;;OAGG;IACH,YAFY,MAAM,CAkBjB;CACJ;wBAlbuB,cAAc"}
|
|
@@ -36,8 +36,20 @@ export class Miniball {
|
|
|
36
36
|
constructor(points) {
|
|
37
37
|
assert.defined(points, 'points');
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {number}
|
|
42
|
+
*/
|
|
39
43
|
this.iteration = 0;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {number}
|
|
47
|
+
*/
|
|
40
48
|
this.distToAff = 0;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {number}
|
|
52
|
+
*/
|
|
41
53
|
this.distToAffSquare = 0;
|
|
42
54
|
/**
|
|
43
55
|
*
|
|
@@ -51,7 +63,16 @@ export class Miniball {
|
|
|
51
63
|
* @private
|
|
52
64
|
*/
|
|
53
65
|
this.__squaredRadius = 0;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @private
|
|
70
|
+
*/
|
|
54
71
|
this.__radius = 0;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {number}
|
|
75
|
+
*/
|
|
55
76
|
this.stopper = 0;
|
|
56
77
|
|
|
57
78
|
/**
|
|
@@ -59,13 +80,18 @@ export class Miniball {
|
|
|
59
80
|
*/
|
|
60
81
|
this.S = points;
|
|
61
82
|
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {number}
|
|
86
|
+
* @private
|
|
87
|
+
*/
|
|
62
88
|
this.__size = this.S.size();
|
|
63
89
|
|
|
64
90
|
const dimension_count = this.S.dimension();
|
|
65
91
|
|
|
66
92
|
/**
|
|
67
93
|
* Number of dimensions (2 for 2d, 3 for 3d etc.)
|
|
68
|
-
* @type {
|
|
94
|
+
* @type {number}
|
|
69
95
|
*/
|
|
70
96
|
this.dim = dimension_count;
|
|
71
97
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointSet.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/packing/miniball/PointSet.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PointSet.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/packing/miniball/PointSet.js"],"names":[],"mappings":"AAEA;IACI;;;;;;OAMG;IACH,kBALW,MAAM,cACN,MAAM,QACN,QAAM,YAAY,GAAC,YAAY,EA0BzC;IAlBG;;;;OAIG;IACH,eAAkB;IAClB;;;;OAIG;IACH,eAAkB;IAClB;;;;OAIG;IACH,qBAA8B;IAGlC;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,aAFa,MAAM,CAIlB;IAED;;;;;OAKG;IACH,SAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAIlB;CACJ"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { assert } from "../../../assert.js";
|
|
2
|
+
|
|
1
3
|
export class PointSet {
|
|
2
4
|
/**
|
|
3
5
|
*
|
|
@@ -7,14 +9,33 @@ export class PointSet {
|
|
|
7
9
|
* @constructor
|
|
8
10
|
*/
|
|
9
11
|
constructor(size, dimensions, data) {
|
|
12
|
+
assert.isNonNegativeInteger(size, 'size');
|
|
13
|
+
assert.isNonNegativeInteger(dimensions, 'dimensions');
|
|
14
|
+
assert.isArrayLike(data, 'data');
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @type {Array|Float32Array|Float64Array}
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
10
21
|
this.__data = data;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @private
|
|
26
|
+
*/
|
|
11
27
|
this.__size = size;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
12
33
|
this.__dimensions = dimensions;
|
|
13
34
|
}
|
|
14
35
|
|
|
15
36
|
/**
|
|
16
37
|
* Number of points in the set
|
|
17
|
-
* @returns {
|
|
38
|
+
* @returns {number}
|
|
18
39
|
*/
|
|
19
40
|
size() {
|
|
20
41
|
return this.__size;
|
|
@@ -22,7 +43,7 @@ export class PointSet {
|
|
|
22
43
|
|
|
23
44
|
/**
|
|
24
45
|
* Number of dimensions for each point
|
|
25
|
-
* @returns {
|
|
46
|
+
* @returns {number}
|
|
26
47
|
*/
|
|
27
48
|
dimension() {
|
|
28
49
|
return this.__dimensions;
|
|
@@ -30,8 +51,8 @@ export class PointSet {
|
|
|
30
51
|
|
|
31
52
|
/**
|
|
32
53
|
* get coordinate for a point
|
|
33
|
-
* @param {
|
|
34
|
-
* @param {
|
|
54
|
+
* @param {number} i point index
|
|
55
|
+
* @param {number} j dimension
|
|
35
56
|
* @returns {number}
|
|
36
57
|
*/
|
|
37
58
|
coord(i, j) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Information about the quality of the computed ball.
|
|
10
10
|
* @class
|
|
11
11
|
*/
|
|
12
|
-
class Quality {
|
|
12
|
+
export class Quality {
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @param {number} qrInconsistency
|
|
@@ -112,5 +112,3 @@ class Quality {
|
|
|
112
112
|
return "Quality [qrInconsistency=" + this.qrInconsistency + ", minConvexCoefficient=" + this.minConvexCoefficient + ", maxOverlength=" + this.maxOverlength + ", maxUnderlength=" + this.maxUnderlength + ", iterations=" + this.iterations + ", supportSize=" + this.supportSize + "]";
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
export { Quality };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {Vector3} result
|
|
3
|
+
* @param {Vector3|{set:function(x:number,y:number,z:number)}} result
|
|
4
4
|
* @param {number} a_x
|
|
5
5
|
* @param {number} a_y
|
|
6
6
|
* @param {number} a_z
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* @param {number} b_z
|
|
10
10
|
* @param {number} fraction
|
|
11
11
|
*/
|
|
12
|
-
export function v3_lerp(result:
|
|
12
|
+
export function v3_lerp(result: any, a_x: number, a_y: number, a_z: number, b_x: number, b_y: number, b_z: number, fraction: number): void;
|
|
13
13
|
//# sourceMappingURL=v3_lerp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3_lerp.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_lerp.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v3_lerp.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_lerp.js"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,0CARW,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,YACN,MAAM,QAehB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
1
2
|
import { lerp } from "../../math/lerp.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
|
-
* @param {Vector3} result
|
|
6
|
+
* @param {Vector3|{set:function(x:number,y:number,z:number)}} result
|
|
6
7
|
* @param {number} a_x
|
|
7
8
|
* @param {number} a_y
|
|
8
9
|
* @param {number} a_z
|
|
@@ -17,6 +18,7 @@ export function v3_lerp(
|
|
|
17
18
|
b_x, b_y, b_z,
|
|
18
19
|
fraction
|
|
19
20
|
) {
|
|
21
|
+
assert.isNumber(fraction, 'fraction');
|
|
20
22
|
|
|
21
23
|
const x = lerp(a_x, b_x, fraction);
|
|
22
24
|
const y = lerp(a_y, b_y, fraction);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v3_slerp.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_slerp.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v3_slerp.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/vec3/v3_slerp.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,iCATW,OAAO,GAAC;IAAC,GAAG,CAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,MAAM,OAAC;CAAC,OACzC,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,OACN,MAAM,YACN,MAAM,QAsChB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
1
2
|
import { v3_dot } from "./v3_dot.js";
|
|
2
3
|
import { v3_lerp } from "./v3_lerp.js";
|
|
3
4
|
|
|
@@ -20,6 +21,8 @@ export function v3_slerp(
|
|
|
20
21
|
b_x, b_y, b_z,
|
|
21
22
|
fraction
|
|
22
23
|
) {
|
|
24
|
+
assert.isNumber(fraction, 'fraction');
|
|
25
|
+
|
|
23
26
|
const dot = v3_dot(
|
|
24
27
|
a_x, a_y, a_z,
|
|
25
28
|
b_x, b_y, b_z
|
|
@@ -38,6 +41,8 @@ export function v3_slerp(
|
|
|
38
41
|
|
|
39
42
|
const inv_sin_theta = 1 / sin_theta;
|
|
40
43
|
|
|
44
|
+
// TODO check for sin_theta == 0 to avoid division by 0
|
|
45
|
+
|
|
41
46
|
const scale_0 = Math.sin((1 - fraction) * theta) * inv_sin_theta;
|
|
42
47
|
const scale_1 = Math.sin((fraction) * theta) * inv_sin_theta;
|
|
43
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"position_box_next_to_box.d.ts","sourceRoot":"","sources":["../../../../../../src/core/graph/layout/box/position_box_next_to_box.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"position_box_next_to_box.d.ts","sourceRoot":"","sources":["../../../../../../src/core/graph/layout/box/position_box_next_to_box.js"],"names":[],"mappings":"AA8JA;;;;;;GAMG;AACH,8CALW,KAAK,UACL,KAAK,UACL,KAAK,GACH,KAAK,CAsCjB;kBAzMiB,gCAAgC"}
|
|
@@ -12,7 +12,12 @@ import { resolveAABB2Overlap } from "./resolveAABB2Overlap.js";
|
|
|
12
12
|
* @param {AABB2} bounds
|
|
13
13
|
* @returns {Vector2}
|
|
14
14
|
*/
|
|
15
|
-
function
|
|
15
|
+
function compute_initial_placement(
|
|
16
|
+
box,
|
|
17
|
+
target,
|
|
18
|
+
bounds
|
|
19
|
+
) {
|
|
20
|
+
|
|
16
21
|
/**
|
|
17
22
|
* list of preferred directions, ordered. First direction is higher priority than the next, last is lowest priority
|
|
18
23
|
* @type {Vector2[]}
|
|
@@ -158,7 +163,12 @@ function computeInitialPlacement(box, target, bounds) {
|
|
|
158
163
|
* @param {AABB2} bounds
|
|
159
164
|
* @returns {AABB2} input {@link box} parameter
|
|
160
165
|
*/
|
|
161
|
-
export function position_box_next_to_box(
|
|
166
|
+
export function position_box_next_to_box(
|
|
167
|
+
box,
|
|
168
|
+
target,
|
|
169
|
+
bounds
|
|
170
|
+
) {
|
|
171
|
+
|
|
162
172
|
const b = box.clone();
|
|
163
173
|
const t = target.clone();
|
|
164
174
|
|
|
@@ -170,13 +180,14 @@ export function position_box_next_to_box(box, target, bounds) {
|
|
|
170
180
|
|
|
171
181
|
t.locked = true;
|
|
172
182
|
|
|
173
|
-
const initialPosition =
|
|
183
|
+
const initialPosition = compute_initial_placement(b, t, bounds);
|
|
184
|
+
|
|
174
185
|
//set bounds to initial position
|
|
175
186
|
b.set(initialPosition.x, initialPosition.y, initialPosition.x + b.width, initialPosition.y + b.height);
|
|
176
187
|
|
|
177
188
|
// touch();
|
|
178
189
|
|
|
179
|
-
|
|
190
|
+
for (let i = 0; i < 5; i++) {
|
|
180
191
|
//pull
|
|
181
192
|
pullBoxTowardsPoint(b, initialPosition.x + b.width / 2, initialPosition.y + b.height / 2, 0.1);
|
|
182
193
|
|
|
@@ -185,10 +196,6 @@ export function position_box_next_to_box(box, target, bounds) {
|
|
|
185
196
|
forceIntoBox(bounds, [b]);
|
|
186
197
|
}
|
|
187
198
|
|
|
188
|
-
for (let i = 0; i < 5; i++) {
|
|
189
|
-
step();
|
|
190
|
-
}
|
|
191
|
-
|
|
192
199
|
box.copy(b);
|
|
193
200
|
|
|
194
201
|
return box;
|
package/src/core/math/lerp.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Linear interpolation between two values controlled by a given fraction
|
|
3
3
|
* @param {number} a
|
|
4
4
|
* @param {number} b
|
|
5
|
-
* @param {number} fraction
|
|
5
|
+
* @param {number} fraction value between 0 and 1
|
|
6
6
|
* @return {number}
|
|
7
7
|
*/
|
|
8
8
|
export function lerp(a: number, b: number, fraction: number): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lerp.d.ts","sourceRoot":"","sources":["../../../../src/core/math/lerp.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBALW,MAAM,KACN,MAAM,YACN,MAAM,GACL,MAAM,
|
|
1
|
+
{"version":3,"file":"lerp.d.ts","sourceRoot":"","sources":["../../../../src/core/math/lerp.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBALW,MAAM,KACN,MAAM,YACN,MAAM,GACL,MAAM,CAKjB"}
|
package/src/core/math/lerp.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Linear interpolation between two values controlled by a given fraction
|
|
3
3
|
* @param {number} a
|
|
4
4
|
* @param {number} b
|
|
5
|
-
* @param {number} fraction
|
|
5
|
+
* @param {number} fraction value between 0 and 1
|
|
6
6
|
* @return {number}
|
|
7
7
|
*/
|
|
8
8
|
export function lerp(a, b, fraction) {
|
|
9
|
-
|
|
9
|
+
const span = b - a;
|
|
10
|
+
return span * fraction + a;
|
|
10
11
|
}
|
package/src/view/View.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../src/view/View.js"],"names":[],"mappings":"wBAsBU,MAAM;;;;;;;AAchB
|
|
1
|
+
{"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../src/view/View.js"],"names":[],"mappings":"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"}
|
package/src/view/View.js
CHANGED
|
@@ -35,7 +35,9 @@ export const ViewFlags = {
|
|
|
35
35
|
const INITIAL_FLAGS = ViewFlags.Visible;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Building block for UI elements.
|
|
39
|
+
* Implements a DOM model, built around HTML elements (svg and XML is allowed as well)
|
|
40
|
+
* Base View class.
|
|
39
41
|
* @class
|
|
40
42
|
*/
|
|
41
43
|
class View {
|
|
@@ -43,6 +45,7 @@ class View {
|
|
|
43
45
|
/**
|
|
44
46
|
* Signal bindings, these will be linked and unlinked along with the view
|
|
45
47
|
* @private
|
|
48
|
+
* @readonly
|
|
46
49
|
* @type {SignalBinding[]}
|
|
47
50
|
*/
|
|
48
51
|
bindings = [];
|
|
@@ -84,14 +87,24 @@ class View {
|
|
|
84
87
|
*/
|
|
85
88
|
transformOrigin = new Vector2(0.5, 0.5);
|
|
86
89
|
|
|
90
|
+
/**
|
|
91
|
+
* @readonly
|
|
92
|
+
*/
|
|
87
93
|
on = {
|
|
94
|
+
/**
|
|
95
|
+
* @readonly
|
|
96
|
+
*/
|
|
88
97
|
linked: new Signal(),
|
|
98
|
+
/**
|
|
99
|
+
* @readonly
|
|
100
|
+
*/
|
|
89
101
|
unlinked: new Signal()
|
|
90
102
|
};
|
|
91
103
|
|
|
92
104
|
/**
|
|
93
105
|
*
|
|
94
106
|
* @type {View[]}
|
|
107
|
+
* @readonly
|
|
95
108
|
*/
|
|
96
109
|
children = [];
|
|
97
110
|
|