@woosh/meep-engine 2.84.2 → 2.84.4
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 +82 -88
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +82 -88
- package/editor/view/ecs/EntityEditor.js +7 -8
- package/package.json +1 -1
- package/src/core/math/random/roundFair.js +5 -2
- package/src/core/math/random/roundFair.spec.js +12 -0
- package/src/core/math/random/seededRandom.d.ts +1 -4
- package/src/core/math/random/seededRandom_Mulberry32.spec.js +19 -0
- package/src/core/model/node-graph/node/NodeInstancePortReference.spec.js +25 -2
- package/src/core/model/node-graph/node/Port.js +8 -6
- package/src/core/model/node-graph/node/Port.spec.js +49 -0
- package/src/core/process/matcher/and.js +16 -0
- package/src/core/process/matcher/isDefined.js +8 -0
- package/src/core/process/matcher/isEqualTo.js +10 -0
- package/src/core/process/matcher/isGreaterThan.js +10 -0
- package/src/core/process/matcher/isGreaterThanOrEqualTo.js +10 -0
- package/src/core/process/matcher/isInstanceOf.js +10 -0
- package/src/core/process/matcher/isLessThan.js +10 -0
- package/src/core/process/matcher/isLessThanOrEqualTo.js +10 -0
- package/src/core/process/matcher/isNull.js +8 -0
- package/src/core/process/matcher/isTypeOf.js +16 -0
- package/src/core/process/matcher/not.js +10 -0
- package/src/core/process/matcher/or.js +16 -0
- package/src/core/process/task/util/actionTask.spec.js +14 -0
- package/src/core/process/task/util/countTask.js +1 -1
- package/src/core/process/task/util/countTask.spec.js +18 -0
- package/src/engine/ecs/Entity.js +4 -4
- package/src/view/common/LabelView.js +3 -1
- package/src/view/elements/windrose/WindRoseDiagram.js +3 -3
- package/src/core/math/spline/spline_catmullrom_1d.js +0 -120
- package/src/core/process/IntervalExecutor.js +0 -78
- package/src/core/process/matcher/Matchers.js +0 -145
package/build/meep.cjs
CHANGED
|
@@ -63966,7 +63966,7 @@ Task.prototype.isTask = true;
|
|
|
63966
63966
|
/**
|
|
63967
63967
|
*
|
|
63968
63968
|
* @param {number|function(*):number} initial
|
|
63969
|
-
* @param {number|function(*):number} limit
|
|
63969
|
+
* @param {number|function(*):number} limit limit is excluded from the count, same as `for(;i < limit;)`
|
|
63970
63970
|
* @param {function(index:int)} callback
|
|
63971
63971
|
* @returns {Task}
|
|
63972
63972
|
*/
|
|
@@ -69664,6 +69664,36 @@ function array_remove_first(array, element, start_index = 0, length = array.leng
|
|
|
69664
69664
|
return false;
|
|
69665
69665
|
}
|
|
69666
69666
|
|
|
69667
|
+
/**
|
|
69668
|
+
*
|
|
69669
|
+
* @param {*} value
|
|
69670
|
+
* @return {boolean}
|
|
69671
|
+
*/
|
|
69672
|
+
function isDefined(value) {
|
|
69673
|
+
return value !== undefined;
|
|
69674
|
+
}
|
|
69675
|
+
|
|
69676
|
+
/**
|
|
69677
|
+
*
|
|
69678
|
+
* @enum
|
|
69679
|
+
*/
|
|
69680
|
+
const EntityFlags = {
|
|
69681
|
+
/**
|
|
69682
|
+
* Whether the entity is built, set internally
|
|
69683
|
+
*/
|
|
69684
|
+
Built: 1,
|
|
69685
|
+
/**
|
|
69686
|
+
* If component type is not registered on the {@link EntityComponentDataset} when calling {@link Entity#build} - will register the component first
|
|
69687
|
+
*/
|
|
69688
|
+
RegisterComponents: 2,
|
|
69689
|
+
/**
|
|
69690
|
+
* Entity builder will watch destruction of the entity (subscribe to event), this will make the {@link Entity} automatically
|
|
69691
|
+
* recognize when the corresponding entity is destroyed outside the {@link Entity} API
|
|
69692
|
+
* NOTE: useful to turn off to save a bit of memory, as those event listeners take up a bit of space. Feel free to turn this flag off when you don't care to keep the reference to the {@link Entity}
|
|
69693
|
+
*/
|
|
69694
|
+
WatchDestruction: 4
|
|
69695
|
+
};
|
|
69696
|
+
|
|
69667
69697
|
/**
|
|
69668
69698
|
* de Bruijn sequence
|
|
69669
69699
|
* @see https://graphics.stanford.edu/~seander/bithacks.html
|
|
@@ -72276,78 +72306,6 @@ class EntityManager {
|
|
|
72276
72306
|
}
|
|
72277
72307
|
}
|
|
72278
72308
|
|
|
72279
|
-
/**
|
|
72280
|
-
* @author Alex Goldring
|
|
72281
|
-
* @copyright Alex Goldring 2017
|
|
72282
|
-
*/
|
|
72283
|
-
|
|
72284
|
-
|
|
72285
|
-
/**
|
|
72286
|
-
*
|
|
72287
|
-
* @param {*} value
|
|
72288
|
-
* @return {boolean}
|
|
72289
|
-
*/
|
|
72290
|
-
function isDefined(value) {
|
|
72291
|
-
return value !== undefined;
|
|
72292
|
-
}
|
|
72293
|
-
|
|
72294
|
-
/**
|
|
72295
|
-
* performs instanceof match
|
|
72296
|
-
* @param {function} type
|
|
72297
|
-
* @returns {function(*): boolean}
|
|
72298
|
-
*/
|
|
72299
|
-
function isInstanceOf$1(type) {
|
|
72300
|
-
return function (m) {
|
|
72301
|
-
return m instanceof type;
|
|
72302
|
-
}
|
|
72303
|
-
}
|
|
72304
|
-
|
|
72305
|
-
/**
|
|
72306
|
-
* performs typeof match
|
|
72307
|
-
* @param {string} type
|
|
72308
|
-
* @returns {function(*): boolean}
|
|
72309
|
-
*/
|
|
72310
|
-
function isTypeOf(type) {
|
|
72311
|
-
|
|
72312
|
-
return function (m) {
|
|
72313
|
-
return typeof m === type;
|
|
72314
|
-
}
|
|
72315
|
-
}
|
|
72316
|
-
|
|
72317
|
-
/**
|
|
72318
|
-
* Joins two matchers via OR
|
|
72319
|
-
* @param {function(*):boolean} a
|
|
72320
|
-
* @param {function(*):boolean} b
|
|
72321
|
-
* @returns {function(*):boolean}
|
|
72322
|
-
*/
|
|
72323
|
-
function or(a, b) {
|
|
72324
|
-
|
|
72325
|
-
return function (m) {
|
|
72326
|
-
return a(m) || b(m);
|
|
72327
|
-
}
|
|
72328
|
-
}
|
|
72329
|
-
|
|
72330
|
-
/**
|
|
72331
|
-
*
|
|
72332
|
-
* @enum
|
|
72333
|
-
*/
|
|
72334
|
-
const EntityFlags = {
|
|
72335
|
-
/**
|
|
72336
|
-
* Whether the entity is built, set internally
|
|
72337
|
-
*/
|
|
72338
|
-
Built: 1,
|
|
72339
|
-
/**
|
|
72340
|
-
* If component type is not registered on the {@link EntityComponentDataset} when calling {@link Entity#build} - will register the component first
|
|
72341
|
-
*/
|
|
72342
|
-
RegisterComponents: 2,
|
|
72343
|
-
/**
|
|
72344
|
-
* Entity builder will watch destruction of the entity (subscribe to event), this will make the {@link Entity} automatically
|
|
72345
|
-
* recognize when the corresponding entity is destroyed outside the {@link Entity} API
|
|
72346
|
-
* NOTE: useful to turn off to save a bit of memory, as those event listeners take up a bit of space. Feel free to turn this flag off when you don't care to keep the reference to the {@link Entity}
|
|
72347
|
-
*/
|
|
72348
|
-
WatchDestruction: 4
|
|
72349
|
-
};
|
|
72350
|
-
|
|
72351
72309
|
/**
|
|
72352
72310
|
* Set of default flags
|
|
72353
72311
|
* @type {number}
|
|
@@ -89825,7 +89783,7 @@ class InputDeviceSwitch {
|
|
|
89825
89783
|
* @param klass
|
|
89826
89784
|
* @returns {boolean}
|
|
89827
89785
|
*/
|
|
89828
|
-
function isInstanceOf(thing, klass) {
|
|
89786
|
+
function isInstanceOf$1(thing, klass) {
|
|
89829
89787
|
if (klass === undefined) {
|
|
89830
89788
|
return false;
|
|
89831
89789
|
}
|
|
@@ -89846,12 +89804,12 @@ function isInstanceOf(thing, klass) {
|
|
|
89846
89804
|
* @param {Element} el
|
|
89847
89805
|
*/
|
|
89848
89806
|
function isFocusable(el) {
|
|
89849
|
-
return isInstanceOf(el, HTMLInputElement)
|
|
89850
|
-
|| isInstanceOf(el, HTMLSelectElement)
|
|
89851
|
-
|| isInstanceOf(el, HTMLTextAreaElement)
|
|
89852
|
-
|| isInstanceOf(el, HTMLAnchorElement)
|
|
89853
|
-
|| isInstanceOf(el, HTMLButtonElement)
|
|
89854
|
-
|| isInstanceOf(el, HTMLAreaElement)
|
|
89807
|
+
return isInstanceOf$1(el, HTMLInputElement)
|
|
89808
|
+
|| isInstanceOf$1(el, HTMLSelectElement)
|
|
89809
|
+
|| isInstanceOf$1(el, HTMLTextAreaElement)
|
|
89810
|
+
|| isInstanceOf$1(el, HTMLAnchorElement)
|
|
89811
|
+
|| isInstanceOf$1(el, HTMLButtonElement)
|
|
89812
|
+
|| isInstanceOf$1(el, HTMLAreaElement)
|
|
89855
89813
|
}
|
|
89856
89814
|
|
|
89857
89815
|
/**
|
|
@@ -96123,6 +96081,42 @@ function number_pretty_print(value) {
|
|
|
96123
96081
|
|
|
96124
96082
|
}
|
|
96125
96083
|
|
|
96084
|
+
/**
|
|
96085
|
+
* performs instanceof match
|
|
96086
|
+
* @param {function} type
|
|
96087
|
+
* @returns {function(*): boolean}
|
|
96088
|
+
*/
|
|
96089
|
+
function isInstanceOf(type) {
|
|
96090
|
+
return function (m) {
|
|
96091
|
+
return m instanceof type;
|
|
96092
|
+
}
|
|
96093
|
+
}
|
|
96094
|
+
|
|
96095
|
+
/**
|
|
96096
|
+
* performs typeof match
|
|
96097
|
+
* @param {string} type
|
|
96098
|
+
* @returns {function(*): boolean}
|
|
96099
|
+
*/
|
|
96100
|
+
function isTypeOf(type) {
|
|
96101
|
+
|
|
96102
|
+
return function (m) {
|
|
96103
|
+
return typeof m === type;
|
|
96104
|
+
}
|
|
96105
|
+
}
|
|
96106
|
+
|
|
96107
|
+
/**
|
|
96108
|
+
* Joins two matchers via OR
|
|
96109
|
+
* @param {function(*):boolean} a
|
|
96110
|
+
* @param {function(*):boolean} b
|
|
96111
|
+
* @returns {function(*):boolean}
|
|
96112
|
+
*/
|
|
96113
|
+
function or(a, b) {
|
|
96114
|
+
|
|
96115
|
+
return function (m) {
|
|
96116
|
+
return a(m) || b(m);
|
|
96117
|
+
}
|
|
96118
|
+
}
|
|
96119
|
+
|
|
96126
96120
|
/**
|
|
96127
96121
|
* Created by Alex on 01/11/2014.
|
|
96128
96122
|
* @copyright Alex Goldring 2014
|
|
@@ -96271,14 +96265,14 @@ function p(m, e, f) {
|
|
|
96271
96265
|
* @type {Array.<ValueProcessor>}
|
|
96272
96266
|
*/
|
|
96273
96267
|
const processors = [
|
|
96274
|
-
p(isInstanceOf
|
|
96275
|
-
p(isInstanceOf
|
|
96276
|
-
p(isInstanceOf
|
|
96277
|
-
p(isInstanceOf
|
|
96278
|
-
p(isInstanceOf
|
|
96279
|
-
p(isInstanceOf
|
|
96280
|
-
p(isInstanceOf
|
|
96281
|
-
p(isInstanceOf
|
|
96268
|
+
p(isInstanceOf(ObservedBoolean), extractorGetValue, format),
|
|
96269
|
+
p(isInstanceOf(ObservedValue), extractorGetValue, format),
|
|
96270
|
+
p(isInstanceOf(ObservedString), extractorGetValue, format),
|
|
96271
|
+
p(isInstanceOf(LinearValue), extractorGetValue, formatNumber),
|
|
96272
|
+
p(isInstanceOf(BoundedValue), extractBoundedValue, formatArray),
|
|
96273
|
+
p(isInstanceOf(Stat), extractorGetValue, formatNumber),
|
|
96274
|
+
p(isInstanceOf(Vector1), extractorGetValue, formatNumber),
|
|
96275
|
+
p(isInstanceOf(ObservedInteger), extractorGetValue, formatNumber),
|
|
96282
96276
|
p(or(isTypedArray, Array.isArray), arrayUnwrap, formatArray),
|
|
96283
96277
|
p(isTypeOf("number"), passThrough, formatNumber),
|
|
96284
96278
|
p(isTypeOf("string"), passThrough, passThrough),
|