@woosh/meep-engine 2.84.8 → 2.84.10

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.
Files changed (42) hide show
  1. package/README.md +27 -13
  2. package/build/meep.cjs +213 -140
  3. package/build/meep.min.js +1 -1
  4. package/build/meep.module.js +213 -140
  5. package/editor/process/symbolic/makePositionedIconDisplaySymbol.js +2 -4
  6. package/editor/view/EditorView.js +48 -204
  7. package/editor/view/ecs/HierarchicalEntityListView.js +191 -0
  8. package/editor/view/ecs/HierarchicalEntityListView.module.scss +13 -0
  9. package/editor/view/prepareMeshLibrary.js +178 -0
  10. package/editor/view/v2/SplitView.js +104 -0
  11. package/editor/view/v2/ViewManagementSystem.js +0 -0
  12. package/editor/view/v2/prototypeEditor.js +127 -0
  13. package/package.json +10 -5
  14. package/src/core/cache/Cache.d.ts +2 -0
  15. package/src/core/cache/Cache.js +58 -8
  16. package/src/core/cache/Cache.spec.js +38 -0
  17. package/src/core/cache/CacheElement.js +6 -0
  18. package/src/core/cache/LoadingCache.js +27 -3
  19. package/src/core/cache/LoadingCache.spec.js +22 -7
  20. package/src/core/collection/array/arraySetSortingDiff.js +6 -6
  21. package/src/core/collection/table/RowFirstTable.js +364 -368
  22. package/src/core/geom/3d/SurfacePoint3.js +3 -40
  23. package/src/core/geom/3d/plane/plane3_compute_ray_intersection.js +3 -1
  24. package/src/core/geom/3d/topology/simplify/prototypeMeshSimplification.js +7 -7
  25. package/src/core/geom/Vector3.js +25 -14
  26. package/src/core/model/stat/LinearModifier.spec.js +5 -6
  27. package/src/core/process/PromiseWatcher.spec.js +27 -23
  28. package/src/engine/animation/behavior/animateProperty.js +4 -4
  29. package/src/engine/animation/curve/ecd_bind_animation_curve.js +9 -0
  30. package/src/engine/ecs/EntityReference.js +12 -0
  31. package/src/engine/ecs/dynamic_actions/actions/definition/SpeakLineActionDescription.js +1 -1
  32. package/src/engine/ecs/transform/Transform.js +1 -1
  33. package/src/engine/ecs/transform/Transform.spec.js +44 -0
  34. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometryFlags.js +8 -1
  35. package/src/engine/graphics/ecs/mesh-v2/aggregate/prototypeSGMesh.js +23 -19
  36. package/src/engine/graphics/ecs/mesh-v2/sg_hierarchy_compute_bounding_box_via_parent_entity.js +2 -2
  37. package/src/engine/graphics/ecs/mesh-v2/three_object_to_entity_composition.js +3 -1
  38. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +6 -6
  39. package/src/engine/intelligence/behavior/ecs/SendEventBehavior.js +43 -0
  40. package/src/view/View.js +64 -95
  41. package/src/view/setElementTransform.js +20 -0
  42. package/src/view/setElementVisibility.js +15 -0
package/README.md CHANGED
@@ -15,14 +15,24 @@ To help get you started, various samples are provided under `/samples` folder. F
15
15
 
16
16
  ## Features
17
17
 
18
- * Automatic instancing. This will minimize the number of draw calls and improve performance.
19
- * Decals. Decals in meep are done on the GPU, and as a result you can have a lot of them in your scene. The most I tested in a single scene is 1,000,000 which works quite well. Decals are useful for bullet holes, blood splatter and various scene decorations such as signs and scuff marks.
20
- * Deferred lights. Meep implements clustered lighting technique which allows you to have a pretty much an unlimited number of point lights in your scene. All the other light types are supported as well, but only point lights are clustered for now. Point lights are useful for various effects, like muzzle flashes, grenade explosions, torches, etc.
21
- * Particle engine. Meep's particle engine ("Particular") is optimized for game development needs, this means supporting complex effects and being able to spawn/destroy many particle systems every frame. There are a lot of particle engines out there, but they tend to have costly spawning routines, take up a lot of draw calls and not manage memory well, which leads to pretty poor performance in games. My particle engine supports full particle lighting as well, and soft particles. On top of that - all particles are automatically atlassed in the background and are compiled with just 4 shaders. This means that no matter how many particle effects you have - there will be no shader switching and no texture switching, and there will be no delays associated with shader compilation. Particles are culled, so particle systems that are off-screen are not rendered and simulation for them can be paused to save CPU resources (this is automatic behavior)
22
- * Sound engine. Meep has a custom sound engine which is culled and has custom attenuation, this allows scenes to have 1000s of positional audio sources without any extra cost in terms of performance
23
- * Asset streaming. Meep in general is a web-first engine, all assets are streamed, meaning that the engine is up and running even before any models/texture are loaded, and you're free to decide when to let the player see your level, wait until everything is loaded or drop them in as soon as you can. There is a pre-loader module in case you want to load some assets in bulk before starting the game.
24
- * Terrain engine. The terrain engine is chunk-based, which means that terrain is split into rectangular pieces internally, and they are built on-the-fly inside a web-worker based on camera position. Terrain is automatically culled based on camera position, so you're only drawing the chunks that are in view. Terrain supports layers just like Unity, but unlike Unity - Meep supports up to 256 layers of terrain instead of 4.
25
- * AI tools, including
18
+ ### Automatic instancing
19
+ This will minimize the number of draw calls and improve performance.
20
+ ### Decals
21
+ Decals in meep are done on the GPU, and as a result you can have a lot of them in your scene. The most I tested in a single scene is 1,000,000 which works quite well. Decals are useful for bullet holes, blood splatter and various scene decorations such as signs and scuff marks.
22
+ ### Clustered lighting, aka Forward+
23
+ Meep implements clustered lighting technique which allows you to have a pretty much an unlimited number of point lights in your scene. All the other light types are supported as well, but only point lights are clustered for now. Point lights are useful for various effects, like muzzle flashes, grenade explosions, torches, etc.
24
+ ### Particles
25
+ Meep's particle engine ("Particular") is optimized for game development needs, this means supporting complex effects and being able to spawn/destroy many particle systems every frame. There are a lot of particle engines out there, but they tend to have costly spawning routines, take up a lot of draw calls and not manage memory well, which leads to pretty poor performance in games. My particle engine supports full particle lighting as well, and soft particles. On top of that - all particles are automatically atlassed in the background and are compiled with just 4 shaders. This means that no matter how many particle effects you have - there will be no shader switching and no texture switching, and there will be no delays associated with shader compilation. Particles are culled, so particle systems that are off-screen are not rendered and simulation for them can be paused to save CPU resources (this is automatic behavior)
26
+ ### Trails
27
+ Meep implements a fairly complex trail system, where a trail can be attached to an entity, and it will create a trail behind.
28
+ ### Terrain
29
+ The terrain engine is chunk-based, which means that terrain is split into rectangular pieces internally, and they are built on-the-fly inside a web-worker based on camera position. Terrain is automatically culled based on camera position, so you're only drawing the chunks that are in view. Terrain supports layers just like Unity, but unlike Unity - Meep supports up to 256 layers of terrain instead of 4.
30
+ ### Sound engine
31
+ Meep has a custom sound engine which is culled and has custom attenuation, this allows scenes to have 1000s of positional audio sources without any extra cost in terms of performance
32
+ ### Asset streaming
33
+ Meep in general is a web-first engine, all assets are streamed, meaning that the engine is up and running even before any models/texture are loaded, and you're free to decide when to let the player see your level, wait until everything is loaded or drop them in as soon as you can. There is a pre-loader module in case you want to load some assets in bulk before starting the game.
34
+ ### AI tools
35
+ including, but not limited to:
26
36
  * full-fledged Behavior trees
27
37
  * Blackboard (took for recording information useful for AI to read/write relevant world state, very commonly used with Behavior Trees)
28
38
  * monte-carlo tree search (same as Google's AlphaGo, useful for decision-making)
@@ -30,11 +40,15 @@ To help get you started, various samples are provided under `/samples` folder. F
30
40
  * grid-based path finding (optimized for 10,000s of queries per second)
31
41
  * resource allocation solver (useful for planning, given certain resources such as bullets/grenades/money/health - plan what actions to take to optimize your chances of winning)
32
42
  * and a number of other useful tools to complement AI development.
33
- * Inverse kinematics. Meep has 2 very useful IK solvers to fix foot position for characters on uneven terrain or stairs, aligning both the position and orientation of character feet. This works for hands as well if you want and is not limited to bipeds, the system works just as well for, say, spiders.
34
- * Extremely compact serialization system. You can save/load your scenes from files. This serialization system supports format changes, so as you develop your game - old saves will be supported and the system will automatically upgrade them to the most recent version, so the player doesn't have to lose any data.
35
- * Achievements. Achievements work with Blackboard components and are very easy to define. There is an abstraction system that helps connect your achievements to various platforms such as Steam or XBox (you'd have to implement that binding yourself though), by default it comes with a browser backend, storing data in IndexedDB. I also have bindings for Steam and NewGrounds that I can share.
36
- * UI system. You're free to use it or not, the engine works just fine without it. The system is written for speed, and it offers a few commonly used tools, such as popup windows, notifications and pages. The UI system is optimized for speed, so it generates no garbage, but again - if you want to use, say React - you can ignore this system or integrate it with the system.
37
- * Trails. Meep implements a fairly complex trail system, where a trail can be attached to an entity, and it will create a trail behind.
43
+ ### Inverse kinematics
44
+ Meep has 2 very useful IK solvers to fix foot position for characters on uneven terrain or stairs, aligning both the position and orientation of character feet. This works for hands as well if you want and is not limited to bipeds, the system works just as well for, say, spiders.
45
+ ### High-performance serialization
46
+ Extremely compact serialization system. You can save/load your scenes from files. This serialization system supports format changes, so as you develop your game - old saves will be supported and the system will automatically upgrade them to the most recent version, so the player doesn't have to lose any data.
47
+ ### Achievements
48
+ Achievements work with Blackboard components and are very easy to define. There is an abstraction system that helps connect your achievements to various platforms such as Steam or XBox (you'd have to implement that binding yourself though), by default it comes with a browser backend, storing data in IndexedDB. I also have bindings for Steam and NewGrounds that I can share.
49
+ ### UI system
50
+ You're free to use it or not, the engine works just fine without it. The system is written for speed, and it offers a few commonly used tools, such as popup windows, notifications and pages. The UI system is optimized for speed, so it generates no garbage, but again - if you want to use, say React - you can ignore this system or integrate it with the system.
51
+
38
52
 
39
53
  For more information, please refer to the documentation
40
54
 
package/build/meep.cjs CHANGED
@@ -2640,35 +2640,32 @@ let Vector3$1 = class Vector3 {
2640
2640
 
2641
2641
  /**
2642
2642
  *
2643
- * @param {ArrayList<number>|number[]|Float32Array} m4
2643
+ * @param {ArrayLike<number>|number[]|Float32Array} m4
2644
2644
  */
2645
2645
  applyMatrix4(m4) {
2646
2646
  const x = this.x;
2647
2647
  const y = this.y;
2648
2648
  const z = this.z;
2649
2649
 
2650
- const _x = m4[0] * x + m4[4] * y + m4[8] * z + m4[12];
2651
- const _y = m4[1] * x + m4[5] * y + m4[9] * z + m4[13];
2652
- const _z = m4[2] * x + m4[6] * y + m4[10] * z + m4[14];
2650
+ const w = 1 / (m4[3] * x + m4[7] * y + m4[11] * z + m4[15]);
2651
+
2652
+ const _x = (m4[0] * x + m4[4] * y + m4[8] * z + m4[12])* w;
2653
+ const _y = (m4[1] * x + m4[5] * y + m4[9] * z + m4[13])* w;
2654
+ const _z = (m4[2] * x + m4[6] * y + m4[10] * z + m4[14])* w;
2653
2655
 
2654
2656
  this.set(_x, _y, _z);
2655
2657
  }
2656
2658
 
2657
2659
  /**
2658
2660
  * Assume current vector holds a direction, transform using a matrix to produce a new directional unit vector
2659
- * @param {THREE.Matrix4} m
2661
+ * @param {ArrayLike<number>|number[]|Float32Array} m4
2660
2662
  */
2661
- transformDirection_three(m) {
2662
-
2663
- // input: THREE.Matrix4 affine matrix
2664
- // vector interpreted as a direction
2665
-
2663
+ applyDirectionMatrix4(m4){
2666
2664
  const x = this.x, y = this.y, z = this.z;
2667
- const e = m.elements;
2668
2665
 
2669
- const _x = e[0] * x + e[4] * y + e[8] * z;
2670
- const _y = e[1] * x + e[5] * y + e[9] * z;
2671
- const _z = e[2] * x + e[6] * y + e[10] * z;
2666
+ const _x = m4[0] * x + m4[4] * y + m4[8] * z;
2667
+ const _y = m4[1] * x + m4[5] * y + m4[9] * z;
2668
+ const _z = m4[2] * x + m4[6] * y + m4[10] * z;
2672
2669
 
2673
2670
  // normalize the result
2674
2671
  const _l = 1 / v3_length(_x, _y, _z);
@@ -2680,6 +2677,20 @@ let Vector3$1 = class Vector3 {
2680
2677
  );
2681
2678
  }
2682
2679
 
2680
+ /**
2681
+ * @deprecated use non-three.js version instead
2682
+ * @param {THREE.Matrix4} m
2683
+ */
2684
+ transformDirection_three(m) {
2685
+
2686
+ // input: THREE.Matrix4 affine matrix
2687
+ // vector interpreted as a direction
2688
+
2689
+ const e = m.elements;
2690
+
2691
+ this.applyDirectionMatrix4(e);
2692
+ }
2693
+
2683
2694
  /**
2684
2695
  *
2685
2696
  * @param {THREE.Matrix3} m
@@ -4743,7 +4754,7 @@ class Transform {
4743
4754
  get forward() {
4744
4755
  const result = Vector3$1.forward.clone();
4745
4756
 
4746
- result.applyMatrix4(this.matrix);
4757
+ result.applyDirectionMatrix4(this.matrix);
4747
4758
 
4748
4759
  return result;
4749
4760
  }
@@ -47191,44 +47202,8 @@ class SurfacePoint3 {
47191
47202
  */
47192
47203
  applyMatrix4(m) {
47193
47204
 
47194
- // transform position
47195
- const p = this.position;
47196
-
47197
- const p_x = p.x;
47198
- const p_y = p.y;
47199
- const p_z = p.z;
47200
-
47201
- // compute perspective projection
47202
- const w = 1 / (m[3] * p_x + m[7] * p_y + m[11] * p_z + m[15]);
47203
-
47204
- const result_p_x = (m[0] * p_x + m[4] * p_y + m[8] * p_z + m[12]) * w;
47205
- const result_p_y = (m[1] * p_x + m[5] * p_y + m[9] * p_z + m[13]) * w;
47206
- const result_p_z = (m[2] * p_x + m[6] * p_y + m[10] * p_z + m[14]) * w;
47207
-
47208
- p.set(
47209
- result_p_x,
47210
- result_p_y,
47211
- result_p_z
47212
- );
47213
-
47214
- // transform normal
47215
- const n = this.normal;
47216
-
47217
- const n_x = n.x;
47218
- const n_y = n.y;
47219
- const n_z = n.z;
47220
-
47221
- const result_n_x = m[0] * n_x + m[4] * n_y + m[8] * n_z;
47222
- const result_n_y = m[1] * n_x + m[5] * n_y + m[9] * n_z;
47223
- const result_n_z = m[2] * n_x + m[6] * n_y + m[10] * n_z;
47224
-
47225
- const normal_multiplier = 1 / v3_length(result_n_x, result_n_y, result_n_z);
47226
-
47227
- n.set(
47228
- result_n_x * normal_multiplier,
47229
- result_n_y * normal_multiplier,
47230
- result_n_z * normal_multiplier,
47231
- );
47205
+ this.position.applyMatrix4(m);
47206
+ this.normal.applyDirectionMatrix4(m);
47232
47207
  }
47233
47208
 
47234
47209
  /**
@@ -60605,6 +60580,12 @@ class CacheElement {
60605
60580
  */
60606
60581
  this.value = null;
60607
60582
 
60583
+ /**
60584
+ *
60585
+ * @type {number}
60586
+ */
60587
+ this.weight = 0;
60588
+
60608
60589
  /**
60609
60590
  * Link to next element (implements linked list)
60610
60591
  * @type {CacheElement<Key,Value>|null}
@@ -60793,14 +60774,56 @@ class Cache {
60793
60774
  recomputeWeight() {
60794
60775
  let result = 0;
60795
60776
 
60796
- for (let [key, value] of this.data) {
60797
- result += this.keyWeigher(key);
60798
- result += this.valueWeigher(value);
60777
+ for (let [key, record] of this.data) {
60778
+
60779
+ const weight = this.computeElementWeight(key, record.value);
60780
+ record.weight = weight;
60781
+
60782
+ result += weight;
60799
60783
  }
60800
60784
 
60801
60785
  this.weight = result;
60802
60786
  }
60803
60787
 
60788
+ /**
60789
+ * Useful when working with wrapped value types, where contents can change and affect overall weight
60790
+ * Instead of re-inserting element, we can just update weights
60791
+ * NOTE: this method may trigger eviction
60792
+ * @param {Key} key
60793
+ * @returns {boolean} true when weight successfully updated, false if element was not found in cache
60794
+ */
60795
+ updateElementWeight(key) {
60796
+ const record = this.data.get(key);
60797
+
60798
+ if (record === undefined) {
60799
+ return false;
60800
+ }
60801
+
60802
+ const old_weight = record.weight;
60803
+
60804
+ const new_weight = this.computeElementWeight(key, record.value);
60805
+
60806
+ if (new_weight === old_weight) {
60807
+ // we're done, no change
60808
+ return true;
60809
+ }
60810
+
60811
+ record.weight = new_weight;
60812
+
60813
+ const delta_weight = new_weight - old_weight;
60814
+
60815
+ this.weight += delta_weight;
60816
+
60817
+ if (
60818
+ this.weight > this.maxWeight
60819
+ && new_weight >= this.maxWeight //make it less likely to drop entire cache
60820
+ ) {
60821
+ this.evictUntilWeight(this.maxWeight);
60822
+ }
60823
+
60824
+ return true;
60825
+ }
60826
+
60804
60827
  /**
60805
60828
  * @private
60806
60829
  * @param {Key} key
@@ -60808,7 +60831,11 @@ class Cache {
60808
60831
  * @returns {number}
60809
60832
  */
60810
60833
  computeElementWeight(key, value) {
60811
- return this.keyWeigher(key) + this.valueWeigher(value);
60834
+ const key_weight = this.keyWeigher(key);
60835
+
60836
+ const value_weight = this.valueWeigher(value);
60837
+
60838
+ return key_weight + value_weight;
60812
60839
  }
60813
60840
 
60814
60841
  /**
@@ -60881,6 +60908,9 @@ class Cache {
60881
60908
  //compute weight
60882
60909
  const elementWeight = this.computeElementWeight(key, value);
60883
60910
 
60911
+ element.weight = elementWeight;
60912
+
60913
+
60884
60914
  /**
60885
60915
  * It's possible that element being added is larger than cache's capacity,
60886
60916
  * in which case entire cache will be evicted, but there still won't be enough space
@@ -60974,7 +61004,7 @@ class Cache {
60974
61004
  * @private
60975
61005
  */
60976
61006
  __removeElement(element) {
60977
- const value = element.value;
61007
+ element.value;
60978
61008
 
60979
61009
  // remove from the queue
60980
61010
  if (element === this.__first) {
@@ -60989,14 +61019,11 @@ class Cache {
60989
61019
 
60990
61020
  const key = element.key;
60991
61021
 
60992
- //compute weight
60993
- const elementWeight = this.computeElementWeight(key, value);
60994
-
60995
61022
  //remove from cache
60996
61023
  this.data.delete(key);
60997
61024
 
60998
61025
  //update weight
60999
- this.weight -= elementWeight;
61026
+ this.weight -= element.weight;
61000
61027
  }
61001
61028
 
61002
61029
  /**
@@ -66302,7 +66329,14 @@ const ShadedGeometryFlags = {
66302
66329
  /**
66303
66330
  * If set to false will not render
66304
66331
  */
66305
- Visible:16
66332
+ Visible: 16,
66333
+
66334
+ /**
66335
+ * Bounds are updated whenever transforms change, we can defer this until next frame render request
66336
+ * This lets us back updated and do less work overall
66337
+ * TODO implement, currently it's ignored
66338
+ */
66339
+ DeferredBoundsUpdate: 32,
66306
66340
  };
66307
66341
 
66308
66342
  /**
@@ -68394,6 +68428,7 @@ function plane3_compute_ray_intersection(
68394
68428
  const t = -p / denom;
68395
68429
 
68396
68430
  if (t < 0) {
68431
+ // ray starts and points behind the plane
68397
68432
  return false;
68398
68433
  }
68399
68434
 
@@ -68406,9 +68441,10 @@ function plane3_compute_ray_intersection(
68406
68441
  return true;
68407
68442
 
68408
68443
  } else {
68444
+ // ray direction is perpendicular to the plane normal. In other words ray runs parallel to the plane
68409
68445
 
68410
68446
  if (p === 0) {
68411
-
68447
+ // ray origin lies on the plane
68412
68448
  out.set(originX, originY, originZ);
68413
68449
 
68414
68450
  return true;
@@ -73611,6 +73647,39 @@ function assetTypeByPath(url) {
73611
73647
  }
73612
73648
  }
73613
73649
 
73650
+ class Name extends ObservedString {
73651
+ constructor(value = "") {
73652
+ super(value);
73653
+ }
73654
+
73655
+ /**
73656
+ *
73657
+ * @returns {string}
73658
+ */
73659
+ getLocalizationKey() {
73660
+ return `component.name.${this.getValue()}`;
73661
+ }
73662
+
73663
+ /**
73664
+ *
73665
+ * @param {Localization} localization
73666
+ * @returns {string}
73667
+ */
73668
+ getLocalizedValue(localization) {
73669
+ return localization.getString(this.getLocalizationKey());
73670
+ }
73671
+
73672
+ clone() {
73673
+ const clone = new Name();
73674
+
73675
+ clone.copy(this);
73676
+
73677
+ return clone;
73678
+ }
73679
+ }
73680
+
73681
+ Name.typeName = "Name";
73682
+
73614
73683
  /**
73615
73684
  *
73616
73685
  * @param {Transform} transform
@@ -73647,6 +73716,7 @@ function three_object_to_entity_composition(root) {
73647
73716
  transform.fromMatrix4(root.matrixWorld.elements);
73648
73717
 
73649
73718
  entity.add(transform);
73719
+ entity.add(new Name(root.name));
73650
73720
 
73651
73721
  if (root.isMesh) {
73652
73722
  if (root.isSkinnedMesh) ;
@@ -79770,6 +79840,22 @@ function m3_cm_compose_transform(
79770
79840
  */
79771
79841
  const FLT_EPSILON_32 = 1.192092896E-7;
79772
79842
 
79843
+ /**
79844
+ *
79845
+ * @param {HTMLElement} domElement
79846
+ * @param {boolean} visibility
79847
+ */
79848
+ function setElementVisibility(domElement, visibility) {
79849
+ const style = domElement.style;
79850
+
79851
+ if (!visibility) {
79852
+ style.display = 'none';
79853
+ } else {
79854
+ // remove display property, this allows style re-flow whereby previous display type is assumed
79855
+ style.removeProperty('display');
79856
+ }
79857
+ }
79858
+
79773
79859
  /**
79774
79860
  *
79775
79861
  * @param {Float32Array} m3
@@ -79803,21 +79889,6 @@ function writeCssTransformMatrix(m3, domElement) {
79803
79889
  */
79804
79890
 
79805
79891
 
79806
- /**
79807
- *
79808
- * @param {HTMLElement} domElement
79809
- * @param {boolean} visibility
79810
- */
79811
- function setElementVisibility(domElement, visibility) {
79812
- const style = domElement.style;
79813
-
79814
- if (!visibility) {
79815
- style.display = 'none';
79816
- } else {
79817
- // remove display property, this allows style re-flow whereby previous display type is assumed
79818
- style.removeProperty('display');
79819
- }
79820
- }
79821
79892
 
79822
79893
  /**
79823
79894
  *
@@ -79840,84 +79911,86 @@ const INITIAL_FLAGS = ViewFlags.Visible;
79840
79911
  * @class
79841
79912
  */
79842
79913
  class View {
79843
- #transform_written = new Float32Array(9);
79844
- #transform_current = new Float32Array(9);
79845
79914
 
79846
79915
  /**
79847
- * @constructor
79916
+ * Signal bindings, these will be linked and unlinked along with the view
79917
+ * @private
79918
+ * @type {SignalBinding[]}
79848
79919
  */
79849
- constructor() {
79850
- /**
79851
- *
79852
- * @type {Element|NodeDescription|null}
79853
- */
79854
- this.el = null;
79920
+ bindings = [];
79855
79921
 
79856
- /**
79857
- * Signal bindings, these will be linked and unlinked along with the view
79858
- * @private
79859
- * @type {SignalBinding[]}
79860
- */
79861
- this.bindings = [];
79922
+ /**
79923
+ *
79924
+ * @type {ViewFlags|number}
79925
+ */
79926
+ flags = INITIAL_FLAGS;
79862
79927
 
79863
- /**
79864
- *
79865
- * @type {ViewFlags|number}
79866
- */
79867
- this.flags = INITIAL_FLAGS;
79928
+ /**
79929
+ * @readonly
79930
+ * @type {Vector2}
79931
+ */
79932
+ position = new Vector2(0, 0);
79868
79933
 
79869
- /**
79870
- * @readonly
79871
- * @type {Vector2}
79872
- */
79873
- const position = this.position = new Vector2(0, 0);
79934
+ /**
79935
+ * @readonly
79936
+ * @type {Vector1}
79937
+ */
79938
+ rotation = new Vector1(0);
79874
79939
 
79875
- /**
79876
- * @readonly
79877
- * @type {Vector1}
79878
- */
79879
- const rotation = this.rotation = new Vector1(0);
79940
+ /**
79941
+ * @readonly
79942
+ * @type {Vector2}
79943
+ */
79944
+ scale = new Vector2(1, 1);
79880
79945
 
79881
- /**
79882
- * @readonly
79883
- * @type {Vector2}
79884
- */
79885
- const scale = this.scale = new Vector2(1, 1);
79946
+ /**
79947
+ * @readonly
79948
+ * @type {Vector2}
79949
+ */
79950
+ size = new Vector2(0, 0);
79886
79951
 
79887
- /**
79888
- * @readonly
79889
- * @type {Vector2}
79890
- */
79891
- const size = this.size = new Vector2(0, 0);
79952
+ /**
79953
+ * Origin from which rotation and scaling is applied
79954
+ * @readonly
79955
+ * @type {Vector2}
79956
+ */
79957
+ transformOrigin = new Vector2(0.5, 0.5);
79892
79958
 
79893
- /**
79894
- * Origin from which rotation and scaling is applied
79895
- * @readonly
79896
- * @type {Vector2}
79897
- */
79898
- this.transformOrigin = new Vector2(0.5, 0.5);
79959
+ on = {
79960
+ linked: new Signal(),
79961
+ unlinked: new Signal()
79962
+ };
79899
79963
 
79900
- this.on = {
79901
- linked: new Signal(),
79902
- unlinked: new Signal()
79903
- };
79964
+ /**
79965
+ *
79966
+ * @type {View[]}
79967
+ */
79968
+ children = [];
79904
79969
 
79905
- /**
79906
- *
79907
- * @type {View[]}
79908
- */
79909
- this.children = [];
79970
+ /**
79971
+ *
79972
+ * @type {View|null}
79973
+ */
79974
+ parent = null;
79910
79975
 
79976
+
79977
+ #transform_written = new Float32Array(9);
79978
+ #transform_current = new Float32Array(9);
79979
+
79980
+ /**
79981
+ * @constructor
79982
+ */
79983
+ constructor() {
79911
79984
  /**
79912
79985
  *
79913
- * @type {View|null}
79986
+ * @type {Element|NodeDescription|null}
79914
79987
  */
79915
- this.parent = null;
79988
+ this.el = null;
79916
79989
 
79917
- position.onChanged.add(this.__updateTransform, this);
79918
- scale.onChanged.add(this.__updateTransform, this);
79919
- rotation.onChanged.add(this.__updateTransform, this);
79920
- size.onChanged.add(this.__setDimensions, this);
79990
+ this.position.onChanged.add(this.__updateTransform, this);
79991
+ this.scale.onChanged.add(this.__updateTransform, this);
79992
+ this.rotation.onChanged.add(this.__updateTransform, this);
79993
+ this.size.onChanged.add(this.__setDimensions, this);
79921
79994
 
79922
79995
  this.transformOrigin.onChanged.add(this.__setTransformOrigin, this);
79923
79996
  }