@woosh/meep-engine 2.76.2 → 2.76.3

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/build/meep.cjs CHANGED
@@ -973,6 +973,7 @@ const SignalFlags = {
973
973
  * @copyright Alex Goldring 2014
974
974
  */
975
975
 
976
+
976
977
  /**
977
978
  * Common dispatch stack
978
979
  * @type {SignalHandler[]}
@@ -2191,6 +2192,7 @@ function v3_slerp(
2191
2192
  * @copyright Alex Goldring 2015
2192
2193
  */
2193
2194
 
2195
+
2194
2196
  let Vector3$1 = class Vector3 {
2195
2197
  /**
2196
2198
  *
@@ -3208,6 +3210,7 @@ Vector3$1._dot = v3_dot;
3208
3210
  */
3209
3211
 
3210
3212
 
3213
+
3211
3214
  const forward = new Vector3$1();
3212
3215
  const up = new Vector3$1();
3213
3216
  const right = new Vector3$1();
@@ -4755,6 +4758,7 @@ const TransformFlags = {
4755
4758
  * Created by Alex on 02/04/2014.
4756
4759
  */
4757
4760
 
4761
+
4758
4762
  /**
4759
4763
  *
4760
4764
  * @type {Float32Array}
@@ -5110,6 +5114,7 @@ Transform.adjustRotation = function (sourceQuaternion, targetVector, limit = Inf
5110
5114
  * Common utilities
5111
5115
  * @module glMatrix
5112
5116
  */
5117
+ // Configuration Constants
5113
5118
  var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;
5114
5119
  if (!Math.hypot) Math.hypot = function () {
5115
5120
  var y = 0,
@@ -47391,6 +47396,7 @@ function max2(a, b) {
47391
47396
  * @copyright Alex Goldring 14/02/14.
47392
47397
  */
47393
47398
 
47399
+
47394
47400
  class Vector2 {
47395
47401
  /**
47396
47402
  *
@@ -48223,6 +48229,7 @@ const chunks = {
48223
48229
  * Created by Alex on 22/06/2015.
48224
48230
  */
48225
48231
 
48232
+
48226
48233
  function vertex$1() {
48227
48234
  return `
48228
48235
  #define PHYSICAL
@@ -49048,6 +49055,7 @@ function typedArrayConstructorByInstance(a) {
49048
49055
  * Created by Alex on 11/11/2014.
49049
49056
  */
49050
49057
 
49058
+
49051
49059
  /**
49052
49060
  * Data Texture class, providing an abstraction around 2d numerical arrays, mostly for sampling purposes
49053
49061
  * Inspired by OpenGL's glsl sampler2d API
@@ -50421,6 +50429,7 @@ function array_copy(
50421
50429
  */
50422
50430
 
50423
50431
 
50432
+
50424
50433
  class Vector1 extends Number {
50425
50434
  /**
50426
50435
  *
@@ -50747,6 +50756,7 @@ function computeHashIntegerArray(...value) {
50747
50756
  * Created by Alex on 29/12/2015.
50748
50757
  */
50749
50758
 
50759
+
50750
50760
  /**
50751
50761
  *
50752
50762
  * @param {number[]} result
@@ -51228,6 +51238,7 @@ function computeStringHash(string) {
51228
51238
  * @copyright Alex Goldring 2018
51229
51239
  */
51230
51240
 
51241
+
51231
51242
  class ObservedString extends String {
51232
51243
  /**
51233
51244
  *
@@ -51698,6 +51709,7 @@ function sampler2d_paint(
51698
51709
  * Created by Alex on 28/12/2015.
51699
51710
  */
51700
51711
 
51712
+
51701
51713
  let Context$1 = class Context {
51702
51714
  /**
51703
51715
  *
@@ -52002,6 +52014,7 @@ class TerrainOverlay {
52002
52014
  * Created by Alex on 04/05/2016.
52003
52015
  */
52004
52016
 
52017
+
52005
52018
  const texture_cache = new Map();
52006
52019
 
52007
52020
  /**
@@ -53659,6 +53672,7 @@ function hex2rgb(hex) {
53659
53672
  */
53660
53673
 
53661
53674
 
53675
+
53662
53676
  const rgbRegEx = /rgb\(\s*([0-9]+),\s*([0-9]+),\s*([0-9]+)\s*\)/;
53663
53677
  const rgbaRegEx = /rgba\(\s*([0-9]+(?:\.[0-9]*)?),\s*([0-9]+(?:\.[0-9]*)?),\s*([0-9]+(?:\.[0-9]*)?),\s*([0-9]+(?:\.[0-9]*)?)\s*\)/;
53664
53678
  const hsvRegEx = /hsv\(([0-9]+(?:\.[0-9]*)?),\s*([0-9]+(?:\.[0-9]*)?),\s*([0-9]+(?:\.[0-9]*)?)\)/;
@@ -55079,6 +55093,7 @@ ObservedInteger.prototype.isObservedInteger = true;
55079
55093
  * Created by Alex on 21/03/2016.
55080
55094
  */
55081
55095
 
55096
+
55082
55097
  /**
55083
55098
  *
55084
55099
  * @template T
@@ -55256,6 +55271,7 @@ function array_swap(a, a_offset, b, b_offset, length) {
55256
55271
 
55257
55272
  //
55258
55273
 
55274
+
55259
55275
  /**
55260
55276
  * Merge bounds of two axis-aligned bounding boxes, the result is a box that tightly bounds inputs
55261
55277
  * @param {ArrayLike<number>|number[]|Float32Array} result where resulting value is written to
@@ -56121,6 +56137,7 @@ function aabb3_intersects_clipping_volume_array(
56121
56137
 
56122
56138
  //
56123
56139
 
56140
+
56124
56141
  /**
56125
56142
  *
56126
56143
  * @param {number} x0
@@ -56363,6 +56380,7 @@ function aabb3_signed_distance_to_aabb3(
56363
56380
  * Created by Alex on 16/11/2014.
56364
56381
  */
56365
56382
 
56383
+
56366
56384
  /**
56367
56385
  * Axis-Aligned bounding box in 3D
56368
56386
  * NOTE: In cases where all you want is raw performance - prefer to use typed arrays instead along with `aabb3_` functions
@@ -57337,6 +57355,7 @@ function ray3_array_compose(output, origin_x, origin_y, origin_z, direction_x, d
57337
57355
 
57338
57356
  //
57339
57357
 
57358
+
57340
57359
  /**
57341
57360
  *
57342
57361
  * @param {ArrayLike<number>|number[]|Float32Array} aabb bounding box, order: x0,y0,z0,x1,y1,z1
@@ -57683,6 +57702,7 @@ function bvh32_geometry_raycast(
57683
57702
  * Created by Alex on 28/01/2017.
57684
57703
  */
57685
57704
 
57705
+
57686
57706
  function prepareObject(object) {
57687
57707
  //turn off automatic matrix re-calculations each frame
57688
57708
  object.matrixAutoUpdate = false;
@@ -57757,6 +57777,7 @@ var ThreeFactory = {
57757
57777
  */
57758
57778
 
57759
57779
 
57780
+
57760
57781
  const EMPTY_GEOMETRY = new BufferGeometry();
57761
57782
  const DEFAULT_MATERIAL = new MeshBasicMaterial();
57762
57783
 
@@ -59178,6 +59199,7 @@ const FULL_SCREEN_QUAD_VERTEX_SHADER = `
59178
59199
  * Created by Alex on 09/11/2014.
59179
59200
  */
59180
59201
 
59202
+
59181
59203
  /**
59182
59204
  *
59183
59205
  * @param {WebGLRenderer} renderer
@@ -59487,6 +59509,7 @@ function DenoiseShader(sigma = 10, filterSmoothness = 0.2) {
59487
59509
  * Created by Alex on 15/11/2014.
59488
59510
  */
59489
59511
 
59512
+
59490
59513
  function filterResult2Texture(data, width, height) {
59491
59514
  const result = new DataTexture();
59492
59515
  result.format = RGBAFormat;
@@ -59565,6 +59588,7 @@ function normalMap2OcclusionMap(
59565
59588
  * Created by Alex on 10/11/2014.
59566
59589
  */
59567
59590
 
59591
+
59568
59592
  const NormalMapShader = function () {
59569
59593
  return {
59570
59594
 
@@ -59629,6 +59653,7 @@ const NormalMapShader = function () {
59629
59653
  */
59630
59654
 
59631
59655
 
59656
+
59632
59657
  function convertChannel(v) {
59633
59658
  return (v) / 255 - 0.5;
59634
59659
  }
@@ -61409,6 +61434,7 @@ function arraySetDiff(a, b, equals = strictEquals) {
61409
61434
  */
61410
61435
 
61411
61436
 
61437
+
61412
61438
  /**
61413
61439
  *
61414
61440
  * List structure with event signals for observing changes.
@@ -63465,6 +63491,7 @@ class WorkerProxy {
63465
63491
  * Created by Alex on 21/05/2016.
63466
63492
  */
63467
63493
 
63494
+
63468
63495
  const RxMatchFunctionName = /(function\s*)([a-zA-Z0-9_]+)?(\s*\([^\]]*\)\s*\{.*)/g;
63469
63496
 
63470
63497
  class WorkerBuilder {
@@ -63800,6 +63827,7 @@ const TaskState = {
63800
63827
  * Created by Alex on 22/05/2016.
63801
63828
  */
63802
63829
 
63830
+
63803
63831
  /**
63804
63832
  *
63805
63833
  * @type {number}
@@ -64673,6 +64701,7 @@ const TerrainFlags = {
64673
64701
  * Created by Alex on 28/10/2014.
64674
64702
  */
64675
64703
 
64704
+
64676
64705
  let idCounter = 0;
64677
64706
 
64678
64707
  class Terrain {
@@ -67051,6 +67080,7 @@ function aabb3_array_intersects_frustum_degree(aabb, frustum) {
67051
67080
 
67052
67081
  //
67053
67082
 
67083
+
67054
67084
  const stack$5 = SCRATCH_UINT32_TRAVERSAL_STACK;
67055
67085
 
67056
67086
  /**
@@ -68255,6 +68285,7 @@ function array_copy_unique(source, source_position, destination, destination_pos
68255
68285
  * Created by Alex on 01/04/2014.
68256
68286
  */
68257
68287
 
68288
+
68258
68289
  /**
68259
68290
  *
68260
68291
  * @template C
@@ -68847,6 +68878,7 @@ function unprojectPoint(result, input, projection_matrix_inverse, world_matrix)
68847
68878
  * Created by Alex on 31/12/2014.
68848
68879
  */
68849
68880
 
68881
+
68850
68882
  /**
68851
68883
  * @class
68852
68884
  */
@@ -69211,6 +69243,7 @@ function update_camera_transform(camera) {
69211
69243
  * Created by Alex on 31/12/2014.
69212
69244
  */
69213
69245
 
69246
+
69214
69247
  class CameraSystem extends System {
69215
69248
  /**
69216
69249
  *
@@ -70503,6 +70536,7 @@ class EntityObserver {
70503
70536
  * Created by Alex on 29/01/14.
70504
70537
  */
70505
70538
 
70539
+
70506
70540
  /**
70507
70541
  *
70508
70542
  * @enum {number}
@@ -71480,6 +71514,7 @@ function validateSystem(system) {
71480
71514
  * Created by Alex on 01/04/2014.
71481
71515
  */
71482
71516
 
71517
+
71483
71518
  /**
71484
71519
  *
71485
71520
  * @enum {string}
@@ -72234,6 +72269,7 @@ class EntityManager {
72234
72269
  * @copyright Alex Goldring 2017
72235
72270
  */
72236
72271
 
72272
+
72237
72273
  /**
72238
72274
  *
72239
72275
  * @param {*} value
@@ -79137,6 +79173,7 @@ function line_segment_compute_line_segment_intersection_2d(
79137
79173
  * @copyright Alex Goldring 2016
79138
79174
  */
79139
79175
 
79176
+
79140
79177
  /**
79141
79178
  *
79142
79179
  * Axis-Aligned Bounding Box in 2D
@@ -79734,6 +79771,7 @@ function m3_cm_compose_transform(
79734
79771
  */
79735
79772
 
79736
79773
 
79774
+
79737
79775
  const scratch_m3_0 = new Float32Array(9);
79738
79776
 
79739
79777
  /**
@@ -80501,6 +80539,7 @@ View.prototype.isView = true;
80501
80539
  * Created by Alex on 06/03/2017.
80502
80540
  */
80503
80541
 
80542
+
80504
80543
  class EmptyView extends View {
80505
80544
  /**
80506
80545
  * @param {string[]} [classList]
@@ -80676,6 +80715,7 @@ SerializationMetadata.typeName = "SerializationMetadata";
80676
80715
  * Created by Alex on 23/04/2014.
80677
80716
  */
80678
80717
 
80718
+
80679
80719
  /**
80680
80720
  * Stores textual tags, useful for marking entities
80681
80721
  */
@@ -83086,6 +83126,7 @@ function domify(x, namespace) {
83086
83126
  * Created by Alex on 04/11/2016.
83087
83127
  */
83088
83128
 
83129
+
83089
83130
  /**
83090
83131
  *
83091
83132
  * @param {View} view
@@ -84211,6 +84252,7 @@ const AssetLoadState = {
84211
84252
  * Created by Alex on 21/03/2016.
84212
84253
  */
84213
84254
 
84255
+
84214
84256
  /**
84215
84257
  *
84216
84258
  * @param {Number} currentValue
@@ -84553,6 +84595,7 @@ AssetRequestScope.GLOBAL = Object.freeze(new AssetRequestScope());
84553
84595
  */
84554
84596
 
84555
84597
 
84598
+
84556
84599
  let Response$1 = class Response {
84557
84600
  /**
84558
84601
  *
@@ -86058,6 +86101,7 @@ class PeriodicConsolePrinter {
86058
86101
  * Created by Alex on 29/01/14.
86059
86102
  */
86060
86103
 
86104
+
86061
86105
  /**
86062
86106
  * @callback Graph~visitor
86063
86107
  * @param {*} node
@@ -88476,6 +88520,7 @@ class RenderLayerState {
88476
88520
  * Created by Alex on 11/10/2016.
88477
88521
  */
88478
88522
 
88523
+
88479
88524
  class RenderLayer {
88480
88525
 
88481
88526
  /**
@@ -89582,6 +89627,7 @@ class ShadowMapRenderer {
89582
89627
  * Created by Alex on 14/03/14.
89583
89628
  */
89584
89629
 
89630
+
89585
89631
  /**
89586
89632
  *
89587
89633
  * @param {WebGLRenderer} webGLRenderer
@@ -90291,6 +90337,7 @@ class InputDeviceSwitch {
90291
90337
  * Created by Alex on 06/03/2017.
90292
90338
  */
90293
90339
 
90340
+
90294
90341
  /**
90295
90342
  *
90296
90343
  * @param thing
@@ -91949,6 +91996,7 @@ class Option extends OptionAbstract {
91949
91996
  * Created by Alex on 03/11/2016.
91950
91997
  */
91951
91998
 
91999
+
91952
92000
  /**
91953
92001
  *
91954
92002
  * @param {object|number|string|null|array} json
@@ -94690,6 +94738,7 @@ function promiseTask(promise, name) {
94690
94738
  * Created by Alex on 11/08/2015.
94691
94739
  */
94692
94740
 
94741
+
94693
94742
  class Scene {
94694
94743
  /**
94695
94744
  *
@@ -95545,6 +95594,7 @@ function current_time_in_seconds() {
95545
95594
  * Created by Alex on 11/02/14.
95546
95595
  */
95547
95596
 
95597
+
95548
95598
  /**
95549
95599
  *
95550
95600
  * @param {Clock} clock
@@ -96838,6 +96888,7 @@ GUIElement.serializable = true;
96838
96888
  * Created by Alex on 28/01/2015.
96839
96889
  */
96840
96890
 
96891
+
96841
96892
  class ViewportPosition {
96842
96893
  /**
96843
96894
  *
@@ -98001,6 +98052,7 @@ class ImmutableObjectPool {
98001
98052
  * Created by Alex on 27/02/2017.
98002
98053
  */
98003
98054
 
98055
+
98004
98056
  /**
98005
98057
  *
98006
98058
  * @type {ObjectPoolFactory<HTMLElementCacheKey>}
@@ -98140,6 +98192,7 @@ class ImageView extends View {
98140
98192
  * Created by Alex on 21/03/2017.
98141
98193
  */
98142
98194
 
98195
+
98143
98196
  class ButtonView extends View {
98144
98197
  /**
98145
98198
  *
@@ -98257,6 +98310,7 @@ class ButtonView extends View {
98257
98310
  * Created by Alex on 07/09/2016.
98258
98311
  */
98259
98312
 
98313
+
98260
98314
  /**
98261
98315
  * @typedef {Object} ConfirmationDialogView~Option
98262
98316
  * @property {string} name
@@ -98330,6 +98384,7 @@ class ConfirmationDialogView extends View {
98330
98384
  * @author Alex Goldring, travnick@gmail.com
98331
98385
  */
98332
98386
 
98387
+
98333
98388
  class DraggableAspect {
98334
98389
  /**
98335
98390
  *
@@ -101939,6 +101994,7 @@ class ModalStack {
101939
101994
  * Created by Alex on 16/04/2016.
101940
101995
  */
101941
101996
 
101997
+
101942
101998
  /**
101943
101999
  * @class
101944
102000
  */
@@ -101974,6 +102030,7 @@ Notification.prototype.isNotification = true;
101974
102030
  * Created by Alex on 16/04/2016.
101975
102031
  */
101976
102032
 
102033
+
101977
102034
  function NotificationLog() {
101978
102035
  /**
101979
102036
  * @readonly
@@ -102902,6 +102959,7 @@ class SceneGUIContext {
102902
102959
  */
102903
102960
 
102904
102961
 
102962
+
102905
102963
  class GUIEngine {
102906
102964
  windows = new List();
102907
102965
 
@@ -103433,6 +103491,7 @@ function createTextView(text) {
103433
103491
  */
103434
103492
 
103435
103493
 
103494
+
103436
103495
  function EngineSettings() {
103437
103496
  this.graphics_control_viewport_size = new ObservedBoolean(true);
103438
103497
  this.simulation_speed = new Vector1(1);
@@ -104135,6 +104194,7 @@ function normalize_angle_rad(angle) {
104135
104194
 
104136
104195
  //
104137
104196
 
104197
+
104138
104198
  function atan2(a, b) {
104139
104199
  return Math.atan2(a, b);
104140
104200
  }
@@ -104251,6 +104311,7 @@ function eulerAnglesFromMatrix(res, m4, a0, a1, a2) {
104251
104311
  * Created by Alex on 17/08/2015.
104252
104312
  */
104253
104313
 
104314
+
104254
104315
  const m4 = new Matrix4();
104255
104316
  const angles = [];
104256
104317
 
@@ -104531,6 +104592,7 @@ class InputBinding {
104531
104592
  */
104532
104593
 
104533
104594
 
104595
+
104534
104596
  class InputController {
104535
104597
  /**
104536
104598
  *
@@ -104680,6 +104742,7 @@ function makeOrbitalCameraController({
104680
104742
  */
104681
104743
 
104682
104744
 
104745
+
104683
104746
  const v3_scratch = new Vector3$1();
104684
104747
 
104685
104748
  class TopDownCameraControllerSystem extends System {
@@ -104773,6 +104836,7 @@ const LightType = {
104773
104836
  */
104774
104837
 
104775
104838
 
104839
+
104776
104840
  const DEFAULT_DISTANCE = 1;
104777
104841
 
104778
104842
  class Light {
@@ -106937,6 +107001,7 @@ class MaxRectanglesPacker {
106937
107001
  * Created by Alex on 01/04/2014.
106938
107002
  */
106939
107003
 
107004
+
106940
107005
  /**
106941
107006
  * Pool of unsigned integer IDs, useful when you don't want to just keep incrementing ID counter and want to re-use IDs after they are no longer needed
106942
107007
  * Main use case is when your IDs are array indices, having compact IDs lets you use fixed size array even as objects are added and removed as you're able to reuse slots in an efficient manner
@@ -111109,6 +111174,7 @@ class ForwardPlusRenderingPlugin extends EnginePlugin {
111109
111174
  */
111110
111175
 
111111
111176
 
111177
+
111112
111178
  const corners = [
111113
111179
  new Vector3(-1, -1, 0),
111114
111180
  new Vector3(-1, -1, 0),
@@ -112368,6 +112434,7 @@ class ThreeLightCache {
112368
112434
  * Created by Alex on 01/06/2016.
112369
112435
  */
112370
112436
 
112437
+
112371
112438
  class LightSystem extends AbstractContextSystem {
112372
112439
  /**
112373
112440
  *
@@ -112663,6 +112730,7 @@ const WATER_SIZE = 800;
112663
112730
  * Created by Alex on 17/02/2017.
112664
112731
  */
112665
112732
 
112733
+
112666
112734
  class Water {
112667
112735
  level = new Vector1(0);
112668
112736
  /**
@@ -113484,6 +113552,7 @@ Script.serializable = false;
113484
113552
  * Created by Alex on 06/03/2017.
113485
113553
  */
113486
113554
 
113555
+
113487
113556
  const v3$1 = new Vector3$1();
113488
113557
 
113489
113558
  class KeyboardCameraController {
@@ -113675,6 +113744,7 @@ function resolvePath(object, path, missingPropertyHandler) {
113675
113744
  * Created by Alex on 09/10/2015.
113676
113745
  */
113677
113746
 
113747
+
113678
113748
  /**
113679
113749
  *
113680
113750
  * @param {Object} object
@@ -971,6 +971,7 @@ const SignalFlags = {
971
971
  * @copyright Alex Goldring 2014
972
972
  */
973
973
 
974
+
974
975
  /**
975
976
  * Common dispatch stack
976
977
  * @type {SignalHandler[]}
@@ -2189,6 +2190,7 @@ function v3_slerp(
2189
2190
  * @copyright Alex Goldring 2015
2190
2191
  */
2191
2192
 
2193
+
2192
2194
  let Vector3$1 = class Vector3 {
2193
2195
  /**
2194
2196
  *
@@ -3206,6 +3208,7 @@ Vector3$1._dot = v3_dot;
3206
3208
  */
3207
3209
 
3208
3210
 
3211
+
3209
3212
  const forward = new Vector3$1();
3210
3213
  const up = new Vector3$1();
3211
3214
  const right = new Vector3$1();
@@ -4753,6 +4756,7 @@ const TransformFlags = {
4753
4756
  * Created by Alex on 02/04/2014.
4754
4757
  */
4755
4758
 
4759
+
4756
4760
  /**
4757
4761
  *
4758
4762
  * @type {Float32Array}
@@ -5108,6 +5112,7 @@ Transform.adjustRotation = function (sourceQuaternion, targetVector, limit = Inf
5108
5112
  * Common utilities
5109
5113
  * @module glMatrix
5110
5114
  */
5115
+ // Configuration Constants
5111
5116
  var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;
5112
5117
  if (!Math.hypot) Math.hypot = function () {
5113
5118
  var y = 0,
@@ -47389,6 +47394,7 @@ function max2(a, b) {
47389
47394
  * @copyright Alex Goldring 14/02/14.
47390
47395
  */
47391
47396
 
47397
+
47392
47398
  class Vector2 {
47393
47399
  /**
47394
47400
  *
@@ -48221,6 +48227,7 @@ const chunks = {
48221
48227
  * Created by Alex on 22/06/2015.
48222
48228
  */
48223
48229
 
48230
+
48224
48231
  function vertex$1() {
48225
48232
  return `
48226
48233
  #define PHYSICAL
@@ -49046,6 +49053,7 @@ function typedArrayConstructorByInstance(a) {
49046
49053
  * Created by Alex on 11/11/2014.
49047
49054
  */
49048
49055
 
49056
+
49049
49057
  /**
49050
49058
  * Data Texture class, providing an abstraction around 2d numerical arrays, mostly for sampling purposes
49051
49059
  * Inspired by OpenGL's glsl sampler2d API
@@ -50419,6 +50427,7 @@ function array_copy(
50419
50427
  */
50420
50428
 
50421
50429
 
50430
+
50422
50431
  class Vector1 extends Number {
50423
50432
  /**
50424
50433
  *
@@ -50745,6 +50754,7 @@ function computeHashIntegerArray(...value) {
50745
50754
  * Created by Alex on 29/12/2015.
50746
50755
  */
50747
50756
 
50757
+
50748
50758
  /**
50749
50759
  *
50750
50760
  * @param {number[]} result
@@ -51226,6 +51236,7 @@ function computeStringHash(string) {
51226
51236
  * @copyright Alex Goldring 2018
51227
51237
  */
51228
51238
 
51239
+
51229
51240
  class ObservedString extends String {
51230
51241
  /**
51231
51242
  *
@@ -51696,6 +51707,7 @@ function sampler2d_paint(
51696
51707
  * Created by Alex on 28/12/2015.
51697
51708
  */
51698
51709
 
51710
+
51699
51711
  let Context$1 = class Context {
51700
51712
  /**
51701
51713
  *
@@ -52000,6 +52012,7 @@ class TerrainOverlay {
52000
52012
  * Created by Alex on 04/05/2016.
52001
52013
  */
52002
52014
 
52015
+
52003
52016
  const texture_cache = new Map();
52004
52017
 
52005
52018
  /**
@@ -53657,6 +53670,7 @@ function hex2rgb(hex) {
53657
53670
  */
53658
53671
 
53659
53672
 
53673
+
53660
53674
  const rgbRegEx = /rgb\(\s*([0-9]+),\s*([0-9]+),\s*([0-9]+)\s*\)/;
53661
53675
  const rgbaRegEx = /rgba\(\s*([0-9]+(?:\.[0-9]*)?),\s*([0-9]+(?:\.[0-9]*)?),\s*([0-9]+(?:\.[0-9]*)?),\s*([0-9]+(?:\.[0-9]*)?)\s*\)/;
53662
53676
  const hsvRegEx = /hsv\(([0-9]+(?:\.[0-9]*)?),\s*([0-9]+(?:\.[0-9]*)?),\s*([0-9]+(?:\.[0-9]*)?)\)/;
@@ -55077,6 +55091,7 @@ ObservedInteger.prototype.isObservedInteger = true;
55077
55091
  * Created by Alex on 21/03/2016.
55078
55092
  */
55079
55093
 
55094
+
55080
55095
  /**
55081
55096
  *
55082
55097
  * @template T
@@ -55254,6 +55269,7 @@ function array_swap(a, a_offset, b, b_offset, length) {
55254
55269
 
55255
55270
  //
55256
55271
 
55272
+
55257
55273
  /**
55258
55274
  * Merge bounds of two axis-aligned bounding boxes, the result is a box that tightly bounds inputs
55259
55275
  * @param {ArrayLike<number>|number[]|Float32Array} result where resulting value is written to
@@ -56119,6 +56135,7 @@ function aabb3_intersects_clipping_volume_array(
56119
56135
 
56120
56136
  //
56121
56137
 
56138
+
56122
56139
  /**
56123
56140
  *
56124
56141
  * @param {number} x0
@@ -56361,6 +56378,7 @@ function aabb3_signed_distance_to_aabb3(
56361
56378
  * Created by Alex on 16/11/2014.
56362
56379
  */
56363
56380
 
56381
+
56364
56382
  /**
56365
56383
  * Axis-Aligned bounding box in 3D
56366
56384
  * NOTE: In cases where all you want is raw performance - prefer to use typed arrays instead along with `aabb3_` functions
@@ -57335,6 +57353,7 @@ function ray3_array_compose(output, origin_x, origin_y, origin_z, direction_x, d
57335
57353
 
57336
57354
  //
57337
57355
 
57356
+
57338
57357
  /**
57339
57358
  *
57340
57359
  * @param {ArrayLike<number>|number[]|Float32Array} aabb bounding box, order: x0,y0,z0,x1,y1,z1
@@ -57681,6 +57700,7 @@ function bvh32_geometry_raycast(
57681
57700
  * Created by Alex on 28/01/2017.
57682
57701
  */
57683
57702
 
57703
+
57684
57704
  function prepareObject(object) {
57685
57705
  //turn off automatic matrix re-calculations each frame
57686
57706
  object.matrixAutoUpdate = false;
@@ -57755,6 +57775,7 @@ var ThreeFactory = {
57755
57775
  */
57756
57776
 
57757
57777
 
57778
+
57758
57779
  const EMPTY_GEOMETRY = new BufferGeometry();
57759
57780
  const DEFAULT_MATERIAL = new MeshBasicMaterial();
57760
57781
 
@@ -59176,6 +59197,7 @@ const FULL_SCREEN_QUAD_VERTEX_SHADER = `
59176
59197
  * Created by Alex on 09/11/2014.
59177
59198
  */
59178
59199
 
59200
+
59179
59201
  /**
59180
59202
  *
59181
59203
  * @param {WebGLRenderer} renderer
@@ -59485,6 +59507,7 @@ function DenoiseShader(sigma = 10, filterSmoothness = 0.2) {
59485
59507
  * Created by Alex on 15/11/2014.
59486
59508
  */
59487
59509
 
59510
+
59488
59511
  function filterResult2Texture(data, width, height) {
59489
59512
  const result = new DataTexture();
59490
59513
  result.format = RGBAFormat;
@@ -59563,6 +59586,7 @@ function normalMap2OcclusionMap(
59563
59586
  * Created by Alex on 10/11/2014.
59564
59587
  */
59565
59588
 
59589
+
59566
59590
  const NormalMapShader = function () {
59567
59591
  return {
59568
59592
 
@@ -59627,6 +59651,7 @@ const NormalMapShader = function () {
59627
59651
  */
59628
59652
 
59629
59653
 
59654
+
59630
59655
  function convertChannel(v) {
59631
59656
  return (v) / 255 - 0.5;
59632
59657
  }
@@ -61407,6 +61432,7 @@ function arraySetDiff(a, b, equals = strictEquals) {
61407
61432
  */
61408
61433
 
61409
61434
 
61435
+
61410
61436
  /**
61411
61437
  *
61412
61438
  * List structure with event signals for observing changes.
@@ -63463,6 +63489,7 @@ class WorkerProxy {
63463
63489
  * Created by Alex on 21/05/2016.
63464
63490
  */
63465
63491
 
63492
+
63466
63493
  const RxMatchFunctionName = /(function\s*)([a-zA-Z0-9_]+)?(\s*\([^\]]*\)\s*\{.*)/g;
63467
63494
 
63468
63495
  class WorkerBuilder {
@@ -63798,6 +63825,7 @@ const TaskState = {
63798
63825
  * Created by Alex on 22/05/2016.
63799
63826
  */
63800
63827
 
63828
+
63801
63829
  /**
63802
63830
  *
63803
63831
  * @type {number}
@@ -64671,6 +64699,7 @@ const TerrainFlags = {
64671
64699
  * Created by Alex on 28/10/2014.
64672
64700
  */
64673
64701
 
64702
+
64674
64703
  let idCounter = 0;
64675
64704
 
64676
64705
  class Terrain {
@@ -67049,6 +67078,7 @@ function aabb3_array_intersects_frustum_degree(aabb, frustum) {
67049
67078
 
67050
67079
  //
67051
67080
 
67081
+
67052
67082
  const stack$5 = SCRATCH_UINT32_TRAVERSAL_STACK;
67053
67083
 
67054
67084
  /**
@@ -68253,6 +68283,7 @@ function array_copy_unique(source, source_position, destination, destination_pos
68253
68283
  * Created by Alex on 01/04/2014.
68254
68284
  */
68255
68285
 
68286
+
68256
68287
  /**
68257
68288
  *
68258
68289
  * @template C
@@ -68845,6 +68876,7 @@ function unprojectPoint(result, input, projection_matrix_inverse, world_matrix)
68845
68876
  * Created by Alex on 31/12/2014.
68846
68877
  */
68847
68878
 
68879
+
68848
68880
  /**
68849
68881
  * @class
68850
68882
  */
@@ -69209,6 +69241,7 @@ function update_camera_transform(camera) {
69209
69241
  * Created by Alex on 31/12/2014.
69210
69242
  */
69211
69243
 
69244
+
69212
69245
  class CameraSystem extends System {
69213
69246
  /**
69214
69247
  *
@@ -70501,6 +70534,7 @@ class EntityObserver {
70501
70534
  * Created by Alex on 29/01/14.
70502
70535
  */
70503
70536
 
70537
+
70504
70538
  /**
70505
70539
  *
70506
70540
  * @enum {number}
@@ -71478,6 +71512,7 @@ function validateSystem(system) {
71478
71512
  * Created by Alex on 01/04/2014.
71479
71513
  */
71480
71514
 
71515
+
71481
71516
  /**
71482
71517
  *
71483
71518
  * @enum {string}
@@ -72232,6 +72267,7 @@ class EntityManager {
72232
72267
  * @copyright Alex Goldring 2017
72233
72268
  */
72234
72269
 
72270
+
72235
72271
  /**
72236
72272
  *
72237
72273
  * @param {*} value
@@ -79135,6 +79171,7 @@ function line_segment_compute_line_segment_intersection_2d(
79135
79171
  * @copyright Alex Goldring 2016
79136
79172
  */
79137
79173
 
79174
+
79138
79175
  /**
79139
79176
  *
79140
79177
  * Axis-Aligned Bounding Box in 2D
@@ -79732,6 +79769,7 @@ function m3_cm_compose_transform(
79732
79769
  */
79733
79770
 
79734
79771
 
79772
+
79735
79773
  const scratch_m3_0 = new Float32Array(9);
79736
79774
 
79737
79775
  /**
@@ -80499,6 +80537,7 @@ View.prototype.isView = true;
80499
80537
  * Created by Alex on 06/03/2017.
80500
80538
  */
80501
80539
 
80540
+
80502
80541
  class EmptyView extends View {
80503
80542
  /**
80504
80543
  * @param {string[]} [classList]
@@ -80674,6 +80713,7 @@ SerializationMetadata.typeName = "SerializationMetadata";
80674
80713
  * Created by Alex on 23/04/2014.
80675
80714
  */
80676
80715
 
80716
+
80677
80717
  /**
80678
80718
  * Stores textual tags, useful for marking entities
80679
80719
  */
@@ -83084,6 +83124,7 @@ function domify(x, namespace) {
83084
83124
  * Created by Alex on 04/11/2016.
83085
83125
  */
83086
83126
 
83127
+
83087
83128
  /**
83088
83129
  *
83089
83130
  * @param {View} view
@@ -84209,6 +84250,7 @@ const AssetLoadState = {
84209
84250
  * Created by Alex on 21/03/2016.
84210
84251
  */
84211
84252
 
84253
+
84212
84254
  /**
84213
84255
  *
84214
84256
  * @param {Number} currentValue
@@ -84551,6 +84593,7 @@ AssetRequestScope.GLOBAL = Object.freeze(new AssetRequestScope());
84551
84593
  */
84552
84594
 
84553
84595
 
84596
+
84554
84597
  let Response$1 = class Response {
84555
84598
  /**
84556
84599
  *
@@ -86056,6 +86099,7 @@ class PeriodicConsolePrinter {
86056
86099
  * Created by Alex on 29/01/14.
86057
86100
  */
86058
86101
 
86102
+
86059
86103
  /**
86060
86104
  * @callback Graph~visitor
86061
86105
  * @param {*} node
@@ -88474,6 +88518,7 @@ class RenderLayerState {
88474
88518
  * Created by Alex on 11/10/2016.
88475
88519
  */
88476
88520
 
88521
+
88477
88522
  class RenderLayer {
88478
88523
 
88479
88524
  /**
@@ -89580,6 +89625,7 @@ class ShadowMapRenderer {
89580
89625
  * Created by Alex on 14/03/14.
89581
89626
  */
89582
89627
 
89628
+
89583
89629
  /**
89584
89630
  *
89585
89631
  * @param {WebGLRenderer} webGLRenderer
@@ -90289,6 +90335,7 @@ class InputDeviceSwitch {
90289
90335
  * Created by Alex on 06/03/2017.
90290
90336
  */
90291
90337
 
90338
+
90292
90339
  /**
90293
90340
  *
90294
90341
  * @param thing
@@ -91947,6 +91994,7 @@ class Option extends OptionAbstract {
91947
91994
  * Created by Alex on 03/11/2016.
91948
91995
  */
91949
91996
 
91997
+
91950
91998
  /**
91951
91999
  *
91952
92000
  * @param {object|number|string|null|array} json
@@ -94688,6 +94736,7 @@ function promiseTask(promise, name) {
94688
94736
  * Created by Alex on 11/08/2015.
94689
94737
  */
94690
94738
 
94739
+
94691
94740
  class Scene {
94692
94741
  /**
94693
94742
  *
@@ -95543,6 +95592,7 @@ function current_time_in_seconds() {
95543
95592
  * Created by Alex on 11/02/14.
95544
95593
  */
95545
95594
 
95595
+
95546
95596
  /**
95547
95597
  *
95548
95598
  * @param {Clock} clock
@@ -96836,6 +96886,7 @@ GUIElement.serializable = true;
96836
96886
  * Created by Alex on 28/01/2015.
96837
96887
  */
96838
96888
 
96889
+
96839
96890
  class ViewportPosition {
96840
96891
  /**
96841
96892
  *
@@ -97999,6 +98050,7 @@ class ImmutableObjectPool {
97999
98050
  * Created by Alex on 27/02/2017.
98000
98051
  */
98001
98052
 
98053
+
98002
98054
  /**
98003
98055
  *
98004
98056
  * @type {ObjectPoolFactory<HTMLElementCacheKey>}
@@ -98138,6 +98190,7 @@ class ImageView extends View {
98138
98190
  * Created by Alex on 21/03/2017.
98139
98191
  */
98140
98192
 
98193
+
98141
98194
  class ButtonView extends View {
98142
98195
  /**
98143
98196
  *
@@ -98255,6 +98308,7 @@ class ButtonView extends View {
98255
98308
  * Created by Alex on 07/09/2016.
98256
98309
  */
98257
98310
 
98311
+
98258
98312
  /**
98259
98313
  * @typedef {Object} ConfirmationDialogView~Option
98260
98314
  * @property {string} name
@@ -98328,6 +98382,7 @@ class ConfirmationDialogView extends View {
98328
98382
  * @author Alex Goldring, travnick@gmail.com
98329
98383
  */
98330
98384
 
98385
+
98331
98386
  class DraggableAspect {
98332
98387
  /**
98333
98388
  *
@@ -101937,6 +101992,7 @@ class ModalStack {
101937
101992
  * Created by Alex on 16/04/2016.
101938
101993
  */
101939
101994
 
101995
+
101940
101996
  /**
101941
101997
  * @class
101942
101998
  */
@@ -101972,6 +102028,7 @@ Notification.prototype.isNotification = true;
101972
102028
  * Created by Alex on 16/04/2016.
101973
102029
  */
101974
102030
 
102031
+
101975
102032
  function NotificationLog() {
101976
102033
  /**
101977
102034
  * @readonly
@@ -102900,6 +102957,7 @@ class SceneGUIContext {
102900
102957
  */
102901
102958
 
102902
102959
 
102960
+
102903
102961
  class GUIEngine {
102904
102962
  windows = new List();
102905
102963
 
@@ -103431,6 +103489,7 @@ function createTextView(text) {
103431
103489
  */
103432
103490
 
103433
103491
 
103492
+
103434
103493
  function EngineSettings() {
103435
103494
  this.graphics_control_viewport_size = new ObservedBoolean(true);
103436
103495
  this.simulation_speed = new Vector1(1);
@@ -104133,6 +104192,7 @@ function normalize_angle_rad(angle) {
104133
104192
 
104134
104193
  //
104135
104194
 
104195
+
104136
104196
  function atan2(a, b) {
104137
104197
  return Math.atan2(a, b);
104138
104198
  }
@@ -104249,6 +104309,7 @@ function eulerAnglesFromMatrix(res, m4, a0, a1, a2) {
104249
104309
  * Created by Alex on 17/08/2015.
104250
104310
  */
104251
104311
 
104312
+
104252
104313
  const m4 = new Matrix4();
104253
104314
  const angles = [];
104254
104315
 
@@ -104529,6 +104590,7 @@ class InputBinding {
104529
104590
  */
104530
104591
 
104531
104592
 
104593
+
104532
104594
  class InputController {
104533
104595
  /**
104534
104596
  *
@@ -104678,6 +104740,7 @@ function makeOrbitalCameraController({
104678
104740
  */
104679
104741
 
104680
104742
 
104743
+
104681
104744
  const v3_scratch = new Vector3$1();
104682
104745
 
104683
104746
  class TopDownCameraControllerSystem extends System {
@@ -104771,6 +104834,7 @@ const LightType = {
104771
104834
  */
104772
104835
 
104773
104836
 
104837
+
104774
104838
  const DEFAULT_DISTANCE = 1;
104775
104839
 
104776
104840
  class Light {
@@ -106935,6 +106999,7 @@ class MaxRectanglesPacker {
106935
106999
  * Created by Alex on 01/04/2014.
106936
107000
  */
106937
107001
 
107002
+
106938
107003
  /**
106939
107004
  * Pool of unsigned integer IDs, useful when you don't want to just keep incrementing ID counter and want to re-use IDs after they are no longer needed
106940
107005
  * Main use case is when your IDs are array indices, having compact IDs lets you use fixed size array even as objects are added and removed as you're able to reuse slots in an efficient manner
@@ -111107,6 +111172,7 @@ class ForwardPlusRenderingPlugin extends EnginePlugin {
111107
111172
  */
111108
111173
 
111109
111174
 
111175
+
111110
111176
  const corners = [
111111
111177
  new Vector3(-1, -1, 0),
111112
111178
  new Vector3(-1, -1, 0),
@@ -112366,6 +112432,7 @@ class ThreeLightCache {
112366
112432
  * Created by Alex on 01/06/2016.
112367
112433
  */
112368
112434
 
112435
+
112369
112436
  class LightSystem extends AbstractContextSystem {
112370
112437
  /**
112371
112438
  *
@@ -112661,6 +112728,7 @@ const WATER_SIZE = 800;
112661
112728
  * Created by Alex on 17/02/2017.
112662
112729
  */
112663
112730
 
112731
+
112664
112732
  class Water {
112665
112733
  level = new Vector1(0);
112666
112734
  /**
@@ -113482,6 +113550,7 @@ Script.serializable = false;
113482
113550
  * Created by Alex on 06/03/2017.
113483
113551
  */
113484
113552
 
113553
+
113485
113554
  const v3$1 = new Vector3$1();
113486
113555
 
113487
113556
  class KeyboardCameraController {
@@ -113673,6 +113742,7 @@ function resolvePath(object, path, missingPropertyHandler) {
113673
113742
  * Created by Alex on 09/10/2015.
113674
113743
  */
113675
113744
 
113745
+
113676
113746
  /**
113677
113747
  *
113678
113748
  * @param {Object} object
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.76.2",
8
+ "version": "2.76.3",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -46,17 +46,17 @@
46
46
  "three": ">=0.135.0 & <0.137.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@babel/core": "7.20.12",
50
- "@babel/preset-env": "7.20.2",
51
- "@rollup/plugin-commonjs": "24.0.1",
52
- "@rollup/plugin-node-resolve": "15.0.1",
53
- "@rollup/plugin-terser": "0.4.0",
49
+ "@babel/core": "7.22.9",
50
+ "@babel/preset-env": "7.22.9",
51
+ "@rollup/plugin-commonjs": "25.0.2",
52
+ "@rollup/plugin-node-resolve": "15.1.0",
53
+ "@rollup/plugin-terser": "0.4.3",
54
54
  "@rollup/plugin-strip": "3.0.2",
55
55
  "@types/three": "^0.135.0",
56
56
  "babel-jest": "29.5.0",
57
57
  "jest": "29.5.0",
58
58
  "jest-environment-jsdom": "29.5.0",
59
- "rollup": "3.16.0"
59
+ "rollup": "3.26.2"
60
60
  },
61
61
  "keywords": [
62
62
  "dream",