@woosh/meep-engine 2.95.1 → 2.97.0
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 +214 -142
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +214 -142
- package/package.json +1 -2
- package/src/core/binary/BitSet.d.ts +2 -2
- package/src/core/binary/BitSet.d.ts.map +1 -1
- package/src/core/binary/BitSet.js +8 -5
- package/src/core/geom/Quaternion.d.ts.map +1 -1
- package/src/core/geom/Quaternion.js +14 -8
- package/src/core/graph/v2/Graph.d.ts.map +1 -1
- package/src/core/graph/v2/Graph.js +9 -0
- package/src/core/localization/Localization.d.ts.map +1 -1
- package/src/core/localization/Localization.js +11 -11
- package/src/core/math/epsilonEquals.d.ts.map +1 -1
- package/src/core/math/epsilonEquals.js +1 -0
- package/src/core/math/epsilonEquals.spec.d.ts +2 -0
- package/src/core/math/epsilonEquals.spec.d.ts.map +1 -0
- package/src/core/math/epsilonEquals.spec.js +17 -0
- package/src/core/math/spline/computeNonuniformCaltmullRomSplineDerivative.d.ts +16 -0
- package/src/core/math/spline/computeNonuniformCaltmullRomSplineDerivative.d.ts.map +1 -0
- package/src/core/math/spline/computeNonuniformCaltmullRomSplineDerivative.js +90 -0
- package/src/core/primitives/strings/string_compute_similarity.d.ts +6 -0
- package/src/core/primitives/strings/string_compute_similarity.d.ts.map +1 -0
- package/src/core/primitives/strings/string_compute_similarity.js +7 -0
- package/src/core/primitives/strings/string_jaro_distance.d.ts +10 -0
- package/src/core/primitives/strings/string_jaro_distance.d.ts.map +1 -0
- package/src/core/primitives/strings/string_jaro_distance.js +127 -0
- package/src/core/primitives/strings/string_jaro_winkler.d.ts +8 -0
- package/src/core/primitives/strings/string_jaro_winkler.d.ts.map +1 -0
- package/src/core/primitives/strings/string_jaro_winkler.js +53 -0
- package/src/core/primitives/strings/string_jaro_winkler.spec.d.ts +2 -0
- package/src/core/primitives/strings/string_jaro_winkler.spec.d.ts.map +1 -0
- package/src/core/primitives/strings/string_jaro_winkler.spec.js +39 -0
- package/src/engine/graphics/ecs/mesh/SkeletonUtils.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh/SkeletonUtils.js +5 -14
- package/src/engine/graphics/ecs/mesh/skeleton/BoneMapping.js +3 -3
- package/src/engine/graphics/ecs/path/testPathDisplaySystem.js +142 -10
- package/src/engine/graphics/ecs/path/tube/build/TubePathBuilder.d.ts.map +1 -1
- package/src/engine/graphics/ecs/path/tube/build/TubePathBuilder.js +9 -9
- package/src/engine/graphics/ecs/path/tube/build/build_geometry_catmullrom.d.ts.map +1 -1
- package/src/engine/graphics/ecs/path/tube/build/build_geometry_catmullrom.js +173 -23
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +16 -2
package/build/meep.module.js
CHANGED
|
@@ -3169,35 +3169,39 @@ const cos$1 = Math.cos;
|
|
|
3169
3169
|
let Quaternion$1 = class Quaternion {
|
|
3170
3170
|
/**
|
|
3171
3171
|
*
|
|
3172
|
-
* @param {
|
|
3173
|
-
* @param {
|
|
3174
|
-
* @param {
|
|
3175
|
-
* @param {
|
|
3172
|
+
* @param {number} [x=0]
|
|
3173
|
+
* @param {number} [y=0]
|
|
3174
|
+
* @param {number} [z=0]
|
|
3175
|
+
* @param {number} [w=1]
|
|
3176
3176
|
* @constructor
|
|
3177
3177
|
*/
|
|
3178
3178
|
constructor(x = 0, y = 0, z = 0, w = 1) {
|
|
3179
3179
|
|
|
3180
3180
|
/**
|
|
3181
3181
|
*
|
|
3182
|
-
* @type {
|
|
3182
|
+
* @type {number}
|
|
3183
3183
|
*/
|
|
3184
3184
|
this.x = x;
|
|
3185
3185
|
/**
|
|
3186
3186
|
*
|
|
3187
|
-
* @type {
|
|
3187
|
+
* @type {number}
|
|
3188
3188
|
*/
|
|
3189
3189
|
this.y = y;
|
|
3190
3190
|
/**
|
|
3191
3191
|
*
|
|
3192
|
-
* @type {
|
|
3192
|
+
* @type {number}
|
|
3193
3193
|
*/
|
|
3194
3194
|
this.z = z;
|
|
3195
3195
|
/**
|
|
3196
3196
|
*
|
|
3197
|
-
* @type {
|
|
3197
|
+
* @type {number}
|
|
3198
3198
|
*/
|
|
3199
3199
|
this.w = w;
|
|
3200
3200
|
|
|
3201
|
+
/**
|
|
3202
|
+
* @readonly
|
|
3203
|
+
* @type {Signal<number, number, number, number, number, number, number, number>}
|
|
3204
|
+
*/
|
|
3201
3205
|
this.onChanged = new Signal();
|
|
3202
3206
|
}
|
|
3203
3207
|
|
|
@@ -4479,6 +4483,7 @@ let Quaternion$1 = class Quaternion {
|
|
|
4479
4483
|
|
|
4480
4484
|
/**
|
|
4481
4485
|
* Based on GDC talk from Bungie on destiny, compressing quaternions for animation
|
|
4486
|
+
* @deprecated use `quat_decode_from_uint32` instead
|
|
4482
4487
|
* @param {number} value
|
|
4483
4488
|
*/
|
|
4484
4489
|
decodeFromUint32(value) {
|
|
@@ -4487,6 +4492,7 @@ let Quaternion$1 = class Quaternion {
|
|
|
4487
4492
|
|
|
4488
4493
|
/**
|
|
4489
4494
|
* Based on GDC talk from Bungie on destiny, compressing quaternions for animation
|
|
4495
|
+
* @deprecated use `quat_encode_to_uint32` instead
|
|
4490
4496
|
* @returns {number}
|
|
4491
4497
|
*/
|
|
4492
4498
|
encodeToUint32() {
|
|
@@ -69966,13 +69972,15 @@ BitSet.prototype.setShrinkFactor = function (x) {
|
|
|
69966
69972
|
|
|
69967
69973
|
/**
|
|
69968
69974
|
*
|
|
69969
|
-
* @param {number}
|
|
69975
|
+
* @param {number} bit_count
|
|
69970
69976
|
*/
|
|
69971
|
-
BitSet.prototype.setCapacity = function (
|
|
69972
|
-
|
|
69973
|
-
|
|
69977
|
+
BitSet.prototype.setCapacity = function (bit_count) {
|
|
69978
|
+
|
|
69979
|
+
if (this.__length > bit_count) {
|
|
69980
|
+
throw new Error(`Current length(=${this.__length}) is greater than requested size(=${bit_count})`);
|
|
69974
69981
|
}
|
|
69975
|
-
|
|
69982
|
+
|
|
69983
|
+
this.__resize(bit_count);
|
|
69976
69984
|
};
|
|
69977
69985
|
|
|
69978
69986
|
/**
|
|
@@ -71484,8 +71492,17 @@ class Graph {
|
|
|
71484
71492
|
*/
|
|
71485
71493
|
findPath(start, goal) {
|
|
71486
71494
|
const start_node_container = this.__nodes.get(start);
|
|
71495
|
+
|
|
71496
|
+
if (start_node_container === undefined) {
|
|
71497
|
+
throw new Error(`Start node not found in the graph '${start}'`);
|
|
71498
|
+
}
|
|
71499
|
+
|
|
71487
71500
|
const goal_node_container = this.__nodes.get(goal);
|
|
71488
71501
|
|
|
71502
|
+
if (goal_node_container === undefined) {
|
|
71503
|
+
throw new Error(`Goal node not found in the graph '${goal}'`);
|
|
71504
|
+
}
|
|
71505
|
+
|
|
71489
71506
|
const open = new Set();
|
|
71490
71507
|
open.add(start_node_container);
|
|
71491
71508
|
|
|
@@ -81286,132 +81303,6 @@ class Tag {
|
|
|
81286
81303
|
|
|
81287
81304
|
Tag.typeName = "Tag";
|
|
81288
81305
|
|
|
81289
|
-
const peq = new Uint32Array(0x10000);
|
|
81290
|
-
const myers_32 = (a, b) => {
|
|
81291
|
-
const n = a.length;
|
|
81292
|
-
const m = b.length;
|
|
81293
|
-
const lst = 1 << (n - 1);
|
|
81294
|
-
let pv = -1;
|
|
81295
|
-
let mv = 0;
|
|
81296
|
-
let sc = n;
|
|
81297
|
-
let i = n;
|
|
81298
|
-
while (i--) {
|
|
81299
|
-
peq[a.charCodeAt(i)] |= 1 << i;
|
|
81300
|
-
}
|
|
81301
|
-
for (i = 0; i < m; i++) {
|
|
81302
|
-
let eq = peq[b.charCodeAt(i)];
|
|
81303
|
-
const xv = eq | mv;
|
|
81304
|
-
eq |= ((eq & pv) + pv) ^ pv;
|
|
81305
|
-
mv |= ~(eq | pv);
|
|
81306
|
-
pv &= eq;
|
|
81307
|
-
if (mv & lst) {
|
|
81308
|
-
sc++;
|
|
81309
|
-
}
|
|
81310
|
-
if (pv & lst) {
|
|
81311
|
-
sc--;
|
|
81312
|
-
}
|
|
81313
|
-
mv = (mv << 1) | 1;
|
|
81314
|
-
pv = (pv << 1) | ~(xv | mv);
|
|
81315
|
-
mv &= xv;
|
|
81316
|
-
}
|
|
81317
|
-
i = n;
|
|
81318
|
-
while (i--) {
|
|
81319
|
-
peq[a.charCodeAt(i)] = 0;
|
|
81320
|
-
}
|
|
81321
|
-
return sc;
|
|
81322
|
-
};
|
|
81323
|
-
const myers_x = (b, a) => {
|
|
81324
|
-
const n = a.length;
|
|
81325
|
-
const m = b.length;
|
|
81326
|
-
const mhc = [];
|
|
81327
|
-
const phc = [];
|
|
81328
|
-
const hsize = Math.ceil(n / 32);
|
|
81329
|
-
const vsize = Math.ceil(m / 32);
|
|
81330
|
-
for (let i = 0; i < hsize; i++) {
|
|
81331
|
-
phc[i] = -1;
|
|
81332
|
-
mhc[i] = 0;
|
|
81333
|
-
}
|
|
81334
|
-
let j = 0;
|
|
81335
|
-
for (; j < vsize - 1; j++) {
|
|
81336
|
-
let mv = 0;
|
|
81337
|
-
let pv = -1;
|
|
81338
|
-
const start = j * 32;
|
|
81339
|
-
const vlen = Math.min(32, m) + start;
|
|
81340
|
-
for (let k = start; k < vlen; k++) {
|
|
81341
|
-
peq[b.charCodeAt(k)] |= 1 << k;
|
|
81342
|
-
}
|
|
81343
|
-
for (let i = 0; i < n; i++) {
|
|
81344
|
-
const eq = peq[a.charCodeAt(i)];
|
|
81345
|
-
const pb = (phc[(i / 32) | 0] >>> i) & 1;
|
|
81346
|
-
const mb = (mhc[(i / 32) | 0] >>> i) & 1;
|
|
81347
|
-
const xv = eq | mv;
|
|
81348
|
-
const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;
|
|
81349
|
-
let ph = mv | ~(xh | pv);
|
|
81350
|
-
let mh = pv & xh;
|
|
81351
|
-
if ((ph >>> 31) ^ pb) {
|
|
81352
|
-
phc[(i / 32) | 0] ^= 1 << i;
|
|
81353
|
-
}
|
|
81354
|
-
if ((mh >>> 31) ^ mb) {
|
|
81355
|
-
mhc[(i / 32) | 0] ^= 1 << i;
|
|
81356
|
-
}
|
|
81357
|
-
ph = (ph << 1) | pb;
|
|
81358
|
-
mh = (mh << 1) | mb;
|
|
81359
|
-
pv = mh | ~(xv | ph);
|
|
81360
|
-
mv = ph & xv;
|
|
81361
|
-
}
|
|
81362
|
-
for (let k = start; k < vlen; k++) {
|
|
81363
|
-
peq[b.charCodeAt(k)] = 0;
|
|
81364
|
-
}
|
|
81365
|
-
}
|
|
81366
|
-
let mv = 0;
|
|
81367
|
-
let pv = -1;
|
|
81368
|
-
const start = j * 32;
|
|
81369
|
-
const vlen = Math.min(32, m - start) + start;
|
|
81370
|
-
for (let k = start; k < vlen; k++) {
|
|
81371
|
-
peq[b.charCodeAt(k)] |= 1 << k;
|
|
81372
|
-
}
|
|
81373
|
-
let score = m;
|
|
81374
|
-
for (let i = 0; i < n; i++) {
|
|
81375
|
-
const eq = peq[a.charCodeAt(i)];
|
|
81376
|
-
const pb = (phc[(i / 32) | 0] >>> i) & 1;
|
|
81377
|
-
const mb = (mhc[(i / 32) | 0] >>> i) & 1;
|
|
81378
|
-
const xv = eq | mv;
|
|
81379
|
-
const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;
|
|
81380
|
-
let ph = mv | ~(xh | pv);
|
|
81381
|
-
let mh = pv & xh;
|
|
81382
|
-
score += (ph >>> (m - 1)) & 1;
|
|
81383
|
-
score -= (mh >>> (m - 1)) & 1;
|
|
81384
|
-
if ((ph >>> 31) ^ pb) {
|
|
81385
|
-
phc[(i / 32) | 0] ^= 1 << i;
|
|
81386
|
-
}
|
|
81387
|
-
if ((mh >>> 31) ^ mb) {
|
|
81388
|
-
mhc[(i / 32) | 0] ^= 1 << i;
|
|
81389
|
-
}
|
|
81390
|
-
ph = (ph << 1) | pb;
|
|
81391
|
-
mh = (mh << 1) | mb;
|
|
81392
|
-
pv = mh | ~(xv | ph);
|
|
81393
|
-
mv = ph & xv;
|
|
81394
|
-
}
|
|
81395
|
-
for (let k = start; k < vlen; k++) {
|
|
81396
|
-
peq[b.charCodeAt(k)] = 0;
|
|
81397
|
-
}
|
|
81398
|
-
return score;
|
|
81399
|
-
};
|
|
81400
|
-
const distance = (a, b) => {
|
|
81401
|
-
if (a.length < b.length) {
|
|
81402
|
-
const tmp = b;
|
|
81403
|
-
b = a;
|
|
81404
|
-
a = tmp;
|
|
81405
|
-
}
|
|
81406
|
-
if (b.length === 0) {
|
|
81407
|
-
return a.length;
|
|
81408
|
-
}
|
|
81409
|
-
if (a.length <= 32) {
|
|
81410
|
-
return myers_32(a, b);
|
|
81411
|
-
}
|
|
81412
|
-
return myers_x(a, b);
|
|
81413
|
-
};
|
|
81414
|
-
|
|
81415
81306
|
class Token {
|
|
81416
81307
|
/**
|
|
81417
81308
|
* @template V,T
|
|
@@ -82322,6 +82213,187 @@ function seedVariablesIntoTemplateString(template, seed) {
|
|
|
82322
82213
|
return result;
|
|
82323
82214
|
}
|
|
82324
82215
|
|
|
82216
|
+
/**
|
|
82217
|
+
* Calculate Jaro distance between two strings, this is a measure of string similarity. Higher value means more similarity.
|
|
82218
|
+
* @param {string} first
|
|
82219
|
+
* @param {string} second
|
|
82220
|
+
* @param {number} first_length
|
|
82221
|
+
* @param {number} second_length
|
|
82222
|
+
* @return {number}
|
|
82223
|
+
*/
|
|
82224
|
+
function string_jaro_distance(
|
|
82225
|
+
first, second,
|
|
82226
|
+
first_length, second_length
|
|
82227
|
+
) {
|
|
82228
|
+
|
|
82229
|
+
const matches1 = BitSet.fixedSize(first_length);
|
|
82230
|
+
const matches2 = BitSet.fixedSize(second_length);
|
|
82231
|
+
|
|
82232
|
+
const matches = getMatching(first, second, matches1, matches2);
|
|
82233
|
+
|
|
82234
|
+
if (matches <= 0) {
|
|
82235
|
+
return 0;
|
|
82236
|
+
}
|
|
82237
|
+
|
|
82238
|
+
const transpositions = getTranspositions(first, second, matches1, matches2);
|
|
82239
|
+
return (matches / first_length + matches / second_length + (matches - transpositions) / matches) / 3;
|
|
82240
|
+
|
|
82241
|
+
}
|
|
82242
|
+
|
|
82243
|
+
/**
|
|
82244
|
+
* Find matching characters in both strings according to Jaro algorithm
|
|
82245
|
+
* @param {string} a1
|
|
82246
|
+
* @param {string} a2
|
|
82247
|
+
* @param {BitSet} matches1
|
|
82248
|
+
* @param {BitSet} matches2
|
|
82249
|
+
* @return {number}
|
|
82250
|
+
*/
|
|
82251
|
+
function getMatching(a1, a2, matches1, matches2) {
|
|
82252
|
+
const a1_length = a1.length;
|
|
82253
|
+
const a2_length = a2.length;
|
|
82254
|
+
|
|
82255
|
+
// Window is modified to work with string of length 1
|
|
82256
|
+
const matchWindow = max2(
|
|
82257
|
+
0,
|
|
82258
|
+
Math.floor(max2(a1_length, a2_length) * 0.5) - 1
|
|
82259
|
+
);
|
|
82260
|
+
|
|
82261
|
+
let matches = 0;
|
|
82262
|
+
|
|
82263
|
+
// Loop to find matched characters:
|
|
82264
|
+
for (let index1 = 0; index1 < a1_length; index1++) {
|
|
82265
|
+
|
|
82266
|
+
// Use the highest of the window diff and the min of the window and string 2 length:
|
|
82267
|
+
const start = max2(0, index1 - matchWindow);
|
|
82268
|
+
const end = min2(index1 + matchWindow + 1, a2_length);
|
|
82269
|
+
|
|
82270
|
+
// Iterate second string index:
|
|
82271
|
+
for (let index2 = start; index2 < end; index2++) {
|
|
82272
|
+
|
|
82273
|
+
// If second string character already matched, skip:
|
|
82274
|
+
if (matches2.get(index2)) {
|
|
82275
|
+
continue;
|
|
82276
|
+
}
|
|
82277
|
+
|
|
82278
|
+
// If the characters don't match, skip:
|
|
82279
|
+
if (a1.charAt(index1) !== a2.charAt(index2)) {
|
|
82280
|
+
continue;
|
|
82281
|
+
}
|
|
82282
|
+
|
|
82283
|
+
// Assume match if the above 2 checks don't continue:
|
|
82284
|
+
matches1.set(index1, true);
|
|
82285
|
+
matches2.set(index2, true);
|
|
82286
|
+
|
|
82287
|
+
// Add matches by 1, break inner loop:
|
|
82288
|
+
++matches;
|
|
82289
|
+
break;
|
|
82290
|
+
}
|
|
82291
|
+
}
|
|
82292
|
+
|
|
82293
|
+
return matches;
|
|
82294
|
+
}
|
|
82295
|
+
|
|
82296
|
+
/**
|
|
82297
|
+
* Calculate the number of transpositions between the two words
|
|
82298
|
+
* @param {string} a1 The first string to compare
|
|
82299
|
+
* @param {string} a2 The second string to compare
|
|
82300
|
+
* @param {BitSet} matches1
|
|
82301
|
+
* @param {BitSet} matches2
|
|
82302
|
+
* @returns {number}
|
|
82303
|
+
*/
|
|
82304
|
+
function getTranspositions(
|
|
82305
|
+
a1, a2,
|
|
82306
|
+
matches1, matches2
|
|
82307
|
+
) {
|
|
82308
|
+
let transpositions = 0;
|
|
82309
|
+
|
|
82310
|
+
// Loop to find transpositions:
|
|
82311
|
+
const a1_length = a1.length;
|
|
82312
|
+
const a2_length = a2.length;
|
|
82313
|
+
|
|
82314
|
+
for (let i1 = 0, i2 = 0; i1 < a1_length; i1++) {
|
|
82315
|
+
// If a non-matching character was found, skip:
|
|
82316
|
+
if (matches1.get(i1) === false) {
|
|
82317
|
+
continue;
|
|
82318
|
+
}
|
|
82319
|
+
|
|
82320
|
+
// Move i2 index to the next match:
|
|
82321
|
+
while (
|
|
82322
|
+
i2 < a2_length
|
|
82323
|
+
&& matches2.get(i2) === false
|
|
82324
|
+
) {
|
|
82325
|
+
i2++;
|
|
82326
|
+
}
|
|
82327
|
+
|
|
82328
|
+
// If the characters don't match, increase transposition:
|
|
82329
|
+
if (a1.charAt(i1) !== a2.charAt(i2)) {
|
|
82330
|
+
transpositions++;
|
|
82331
|
+
}
|
|
82332
|
+
|
|
82333
|
+
// Iterate i2 index normally:
|
|
82334
|
+
i2++;
|
|
82335
|
+
}
|
|
82336
|
+
|
|
82337
|
+
return Math.floor(transpositions * 0.5);
|
|
82338
|
+
}
|
|
82339
|
+
|
|
82340
|
+
/**
|
|
82341
|
+
* Calculate the Jaro-Winkler distance between two strings
|
|
82342
|
+
* @param {string} first The string to compare
|
|
82343
|
+
* @param {string} second The string to compare with
|
|
82344
|
+
* @returns {number} similarity score, higher value means strings are more similar
|
|
82345
|
+
*/
|
|
82346
|
+
function string_jaro_winkler(first, second) {
|
|
82347
|
+
const l1 = first.length;
|
|
82348
|
+
const l2 = second.length;
|
|
82349
|
+
|
|
82350
|
+
if (l1 === 0 && l2 === 0) {
|
|
82351
|
+
// special case for empty string
|
|
82352
|
+
return 1;
|
|
82353
|
+
}
|
|
82354
|
+
|
|
82355
|
+
// Calculate the Jaro distance:
|
|
82356
|
+
const similarity = string_jaro_distance(first, second, l1, l2);
|
|
82357
|
+
|
|
82358
|
+
if (similarity === 0) {
|
|
82359
|
+
// no similarity at all
|
|
82360
|
+
return 0;
|
|
82361
|
+
}
|
|
82362
|
+
|
|
82363
|
+
// Transform to Jaro-Winkler:
|
|
82364
|
+
// Prefix scale gives more favorable ratings to strings that share common prefixes:
|
|
82365
|
+
const prefix_scale = 0.1;
|
|
82366
|
+
const prefix = getPrefix(first, second, min3(l1, l2, 4));
|
|
82367
|
+
return similarity + prefix * prefix_scale * (1 - similarity);
|
|
82368
|
+
}
|
|
82369
|
+
|
|
82370
|
+
/**
|
|
82371
|
+
* Counts the number of common characters at the beginning
|
|
82372
|
+
* of each word up to a maximum of 4
|
|
82373
|
+
* @param {string} a1 The first string to compare
|
|
82374
|
+
* @param {string} a2 The second string to compare
|
|
82375
|
+
* @param {number} character_limit
|
|
82376
|
+
* @returns {number}
|
|
82377
|
+
*/
|
|
82378
|
+
function getPrefix(a1, a2, character_limit) {
|
|
82379
|
+
|
|
82380
|
+
let p = 0;
|
|
82381
|
+
|
|
82382
|
+
for (; p < character_limit; p++) {
|
|
82383
|
+
if (a1.charAt(p) !== a2.charAt(p)) {
|
|
82384
|
+
return p;
|
|
82385
|
+
}
|
|
82386
|
+
}
|
|
82387
|
+
|
|
82388
|
+
return ++p;
|
|
82389
|
+
}
|
|
82390
|
+
|
|
82391
|
+
/**
|
|
82392
|
+
* Higher value means string are more similar
|
|
82393
|
+
* @type {(function(string, string): number)}
|
|
82394
|
+
*/
|
|
82395
|
+
const string_compute_similarity = string_jaro_winkler;
|
|
82396
|
+
|
|
82325
82397
|
/**
|
|
82326
82398
|
* Represents information about a language
|
|
82327
82399
|
*/
|
|
@@ -82527,7 +82599,7 @@ class Localization {
|
|
|
82527
82599
|
* @param {number} value
|
|
82528
82600
|
*/
|
|
82529
82601
|
formatIntegerByThousands(value) {
|
|
82530
|
-
const formatter = new Intl.NumberFormat(this.locale.getValue(), {useGrouping: true});
|
|
82602
|
+
const formatter = new Intl.NumberFormat(this.locale.getValue(), { useGrouping: true });
|
|
82531
82603
|
|
|
82532
82604
|
return formatter.format(value);
|
|
82533
82605
|
}
|
|
@@ -82547,10 +82619,10 @@ class Localization {
|
|
|
82547
82619
|
|
|
82548
82620
|
//try to find similar keys
|
|
82549
82621
|
const similarities = Object.keys(this.json).map(function (key) {
|
|
82550
|
-
const distance
|
|
82622
|
+
const distance = string_compute_similarity(key, id);
|
|
82551
82623
|
return {
|
|
82552
82624
|
key,
|
|
82553
|
-
distance
|
|
82625
|
+
distance
|
|
82554
82626
|
};
|
|
82555
82627
|
});
|
|
82556
82628
|
|
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.
|
|
8
|
+
"version": "2.97.0",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"README.md"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"fastest-levenshtein": "1.0.16",
|
|
42
41
|
"gl-matrix": "3.4.3",
|
|
43
42
|
"opentype.js": "1.3.3",
|
|
44
43
|
"robust-predicates": "3.0.2",
|
|
@@ -34,9 +34,9 @@ export class BitSet {
|
|
|
34
34
|
setShrinkFactor(x: number): void;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
|
-
* @param {number}
|
|
37
|
+
* @param {number} bit_count
|
|
38
38
|
*/
|
|
39
|
-
setCapacity(
|
|
39
|
+
setCapacity(bit_count: number): void;
|
|
40
40
|
/**
|
|
41
41
|
* Number of bits currently used for flags.
|
|
42
42
|
* @returns {number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitSet.d.ts","sourceRoot":"","sources":["../../../../src/core/binary/BitSet.js"],"names":[],"mappings":"AA6DA;;;GAGG;AACH,+BA0BC;;IAzBG;;;;OAIG;IACH,iBAAiB;IAEjB;;;;OAIG;IACH,mBAAoB;IAEpB;;;;OAIG;IACH,sBAA0D;IAE1D;;OAEG;IACH,gBAFU,MAAM,CAEmB;IAGvC,sBAEC;IAED;;;OAGG;IACH,mBAFW,MAAM,QAOhB;IAED;;;OAGG;IACH,
|
|
1
|
+
{"version":3,"file":"BitSet.d.ts","sourceRoot":"","sources":["../../../../src/core/binary/BitSet.js"],"names":[],"mappings":"AA6DA;;;GAGG;AACH,+BA0BC;;IAzBG;;;;OAIG;IACH,iBAAiB;IAEjB;;;;OAIG;IACH,mBAAoB;IAEpB;;;;OAIG;IACH,sBAA0D;IAE1D;;OAEG;IACH,gBAFU,MAAM,CAEmB;IAGvC,sBAEC;IAED;;;OAGG;IACH,mBAFW,MAAM,QAOhB;IAED;;;OAGG;IACH,uBAFW,MAAM,QAUhB;IAED;;;OAGG;IACH,QAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,YAFa,MAAM,CAIlB;IAO2B,iBAsB3B;IAED,uBAMC;IAO8B,oBAyB9B;IAED;;;;OAIG;IACH,oCAqCC;IAED;;;;OAIG;IACH,4BAFa,MAAM,CAuDlB;IAED;;;;OAIG;IACH,8BAFa,MAAM,CAkDlB;IAED;;;;OAIG;IACH,0BAFW,OAAO,QAmCjB;IAED;;;OAGG;IACH,2BAEC;IAED;;;;OAIG;IACH,qBAHW,MAAM,YACN,MAAM,QAWhB;IAED;;;;OAIG;IACH,uBAHW,MAAM,YACN,MAAM,QAShB;IAGD;;;OAGG;IACH,SAFW,MAAM,SAIhB;IAED;;;;OAIG;IACH,oBAFa,OAAO,CAkBnB;IAED;;;;OAIG;IACH,iBAHW,MAAM,GACJ,OAAO,CAUnB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,OAAO,CAUnB;IAED;;;;;OAKG;IACH,sBAJW,MAAM,eACN,MAAM,aACN,MAAM,QAShB;IAED;;;;;OAKG;IACH,qBAJW,MAAM,eACN,MAAM,aACN,MAAM,QAShB;IAED;;;;;OAKG;IACH,gBAJW,MAAM,eACN,MAAM,aACN,MAAM,QAQhB;IAED;;OAEG;IACH,cAgBC;IAED;;;OAGG;IACH,YAFW,MAAM,QAoChB;;;IAED;;;;OAIG;IACH,sCASC"}
|
|
@@ -108,13 +108,16 @@ BitSet.prototype.setShrinkFactor = function (x) {
|
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
*
|
|
111
|
-
* @param {number}
|
|
111
|
+
* @param {number} bit_count
|
|
112
112
|
*/
|
|
113
|
-
BitSet.prototype.setCapacity = function (
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
BitSet.prototype.setCapacity = function (bit_count) {
|
|
114
|
+
assert.isNonNegativeInteger(bit_count, "bit_count");
|
|
115
|
+
|
|
116
|
+
if (this.__length > bit_count) {
|
|
117
|
+
throw new Error(`Current length(=${this.__length}) is greater than requested size(=${bit_count})`);
|
|
116
118
|
}
|
|
117
|
-
|
|
119
|
+
|
|
120
|
+
this.__resize(bit_count);
|
|
118
121
|
};
|
|
119
122
|
|
|
120
123
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Quaternion.d.ts","sourceRoot":"","sources":["../../../../src/core/geom/Quaternion.js"],"names":[],"mappings":";AA0BA;
|
|
1
|
+
{"version":3,"file":"Quaternion.d.ts","sourceRoot":"","sources":["../../../../src/core/geom/Quaternion.js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ACH,cAHW,UAAU,GACR,OAAO,CAQnB;IAED;;;OAGG;IACH,QAFa,MAAM,CAQlB;IAED;;;;;OAKG;IACH,qBAJW,UAAU,cACV,MAAM,GACL,OAAO,CAIlB;IAED;;;;;;;;;OASG;IACH,uBAKC;IAED;;;;OAIG;IACH,sBAHsB,MAAM,GAChB,UAAU,CAkBrB;IAED,mBAEC;IAwDL,mBAjKe,MAAM,EAAE,WACR,MAAM,UAgKS;IAC9B,iBApJe,MAAM,EAAE,WACR,MAAM,UAmJO;IAh7CxB;;OAEG;IACH,sDAOC;CAm6CJ;;kBAOS,UAAU;;mBAjhDD,4BAA4B;oBAU3B,cAAc"}
|
|
@@ -27,35 +27,39 @@ const cos = Math.cos;
|
|
|
27
27
|
class Quaternion {
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
|
-
* @param {
|
|
31
|
-
* @param {
|
|
32
|
-
* @param {
|
|
33
|
-
* @param {
|
|
30
|
+
* @param {number} [x=0]
|
|
31
|
+
* @param {number} [y=0]
|
|
32
|
+
* @param {number} [z=0]
|
|
33
|
+
* @param {number} [w=1]
|
|
34
34
|
* @constructor
|
|
35
35
|
*/
|
|
36
36
|
constructor(x = 0, y = 0, z = 0, w = 1) {
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
*
|
|
40
|
-
* @type {
|
|
40
|
+
* @type {number}
|
|
41
41
|
*/
|
|
42
42
|
this.x = x;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
|
-
* @type {
|
|
45
|
+
* @type {number}
|
|
46
46
|
*/
|
|
47
47
|
this.y = y;
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
|
-
* @type {
|
|
50
|
+
* @type {number}
|
|
51
51
|
*/
|
|
52
52
|
this.z = z;
|
|
53
53
|
/**
|
|
54
54
|
*
|
|
55
|
-
* @type {
|
|
55
|
+
* @type {number}
|
|
56
56
|
*/
|
|
57
57
|
this.w = w;
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @readonly
|
|
61
|
+
* @type {Signal<number, number, number, number, number, number, number, number>}
|
|
62
|
+
*/
|
|
59
63
|
this.onChanged = new Signal();
|
|
60
64
|
}
|
|
61
65
|
|
|
@@ -1369,6 +1373,7 @@ class Quaternion {
|
|
|
1369
1373
|
|
|
1370
1374
|
/**
|
|
1371
1375
|
* Based on GDC talk from Bungie on destiny, compressing quaternions for animation
|
|
1376
|
+
* @deprecated use `quat_decode_from_uint32` instead
|
|
1372
1377
|
* @param {number} value
|
|
1373
1378
|
*/
|
|
1374
1379
|
decodeFromUint32(value) {
|
|
@@ -1377,6 +1382,7 @@ class Quaternion {
|
|
|
1377
1382
|
|
|
1378
1383
|
/**
|
|
1379
1384
|
* Based on GDC talk from Bungie on destiny, compressing quaternions for animation
|
|
1385
|
+
* @deprecated use `quat_encode_to_uint32` instead
|
|
1380
1386
|
* @returns {number}
|
|
1381
1387
|
*/
|
|
1382
1388
|
encodeToUint32() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../../../../../src/core/graph/v2/Graph.js"],"names":[],"mappings":"AAyBA;;GAEG;AACH;IAEI;;;;;OAKG;IACH,yBAAoB;IACpB;;;;;OAKG;IACH,yBAAoB;IAEpB;;OAEG;IACH;QACI;;WAEG;mBADO,OAAO,CAAC,EAAC,IAAI,CAAC;QAGxB;;WAEG;qBADO,OAAO,CAAC,EAAC,IAAI,CAAC;;;MAK1B;IAGF;;;;OAIG;IACH,cAHW,CAAC,GACC,OAAO,CAInB;IAED;;;;OAIG;IACH,cAHW,CAAC,GACC,OAAO,CAenB;IAED;;;;OAIG;IACH,iBAHW,CAAC,GACC,OAAO,CAiBnB;IAED;;;;OAIG;IACH,8BAHoB,CAAC,+BAOpB;IAED,wBAEC;IAED;;;OAGG;IACH,gBAFa,MAAM,CAIlB;IAED;;;;;OAKG;IACH,wBAJoB,CAAC,KAAE,OAAO,kBAEjB,CAAC,GAAC,SAAS,CAgBvB;IAED;;;;OAIG;IACH,uBAHW,CAAC,GACC,cAAc,CAAC,CAAC,GAAC,SAAS,CAItC;IAED;;;;OAIG;IACH,oBAHW,CAAC,GACA,MAAM,CAUjB;IAED;;;OAGG;IACH,iBAEC;IAED;;;OAGG;IACH,YAFY,SAAS,CAAC,CAAC,CAItB;IAED;;;OAGG;IACH,YAFY,IAAI,KAAK,CAAC,CAAC,CAAC,CAIvB;IAED;;;;;;OAMG;IACH,mBALW,CAAC,UACD,CAAC,cACD,iBAAiB,GACf,KAAK,CAAC,CAAC,CAgBnB;IAED;;;;;OAKG;IACH,cAJW,KAAK,CAAC,CAAC,GACL,OAAO,CA4BnB;IAED;;;;OAIG;IACH,iBAHW,KAAK,CAAC,CAAC,GACL,OAAO,CAwBnB;IAED;;;;OAIG;IACH,cAHW,KAAK,CAAC,CAAC,GACL,OAAO,CAQnB;IAED;;;;OAIG;IACH,8BAHoB,KAAK,CAAC,CAAC,+BAO1B;IAED,wBAEC;IAED;;;;;OAKG;IACH,qBAJW,CAAC,KACD,CAAC,GACC,OAAO,CAWnB;IAED;;;;;OAKG;IACH,qBAJW,CAAC,KACD,CAAC,GACC,KAAK,CAAC,CAAC,GAAC,SAAS,CAiB7B;IAED;;;;;OAKG;IACH,yBAJW,CAAC,MACD,CAAC,GACC,KAAK,CAAC,CAAC,GAAC,SAAS,CAU7B;IAED;;;;;OAKG;IACH,yBAJW,KAAK,CAAC,CAAC,EAAE,QACT,CAAC,GACC,MAAM,CA2BlB;IAED;;;;OAIG;IACH,oBAHW,CAAC,GACC,CAAC,EAAE,CAUf;IAED;;;;OAIG;IACH,mBAHW,CAAC,GACC,OAAO,CAYnB;IAED;;;;;OAKG;IACH,gBAJW,CAAC,QACD,CAAC,GACC,IAAI,GAAC,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"Graph.d.ts","sourceRoot":"","sources":["../../../../../src/core/graph/v2/Graph.js"],"names":[],"mappings":"AAyBA;;GAEG;AACH;IAEI;;;;;OAKG;IACH,yBAAo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B7B;IAED;;;;;OAKG;IACH,yBAJW,CAAC,MACD,CAAC,GACC,KAAK,CAAC,CAAC,GAAC,SAAS,CAU7B;IAED;;;;;OAKG;IACH,yBAJW,KAAK,CAAC,CAAC,EAAE,QACT,CAAC,GACC,MAAM,CA2BlB;IAED;;;;OAIG;IACH,oBAHW,CAAC,GACC,CAAC,EAAE,CAUf;IAED;;;;OAIG;IACH,mBAHW,CAAC,GACC,OAAO,CAYnB;IAED;;;;;OAKG;IACH,gBAJW,CAAC,QACD,CAAC,GACC,IAAI,GAAC,CAAC,EAAE,CA4EpB;IAED;;OAEG;IACH,cAGC;IAED;;;OAGG;IACH,YAFW,MAAM,CAAC,CAAC,QAOlB;IAED;;OAEG;IACH,SAFa,MAAM,CAAC,CAAC,CAQpB;CACJ;mBAtiBkB,+BAA+B;8BAEpB,oBAAoB;qBADV,YAAY;kCAAZ,YAAY"}
|
|
@@ -446,8 +446,17 @@ export class Graph {
|
|
|
446
446
|
*/
|
|
447
447
|
findPath(start, goal) {
|
|
448
448
|
const start_node_container = this.__nodes.get(start);
|
|
449
|
+
|
|
450
|
+
if (start_node_container === undefined) {
|
|
451
|
+
throw new Error(`Start node not found in the graph '${start}'`);
|
|
452
|
+
}
|
|
453
|
+
|
|
449
454
|
const goal_node_container = this.__nodes.get(goal);
|
|
450
455
|
|
|
456
|
+
if (goal_node_container === undefined) {
|
|
457
|
+
throw new Error(`Goal node not found in the graph '${goal}'`);
|
|
458
|
+
}
|
|
459
|
+
|
|
451
460
|
const open = new Set();
|
|
452
461
|
open.add(start_node_container);
|
|
453
462
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Localization.d.ts","sourceRoot":"","sources":["../../../../src/core/localization/Localization.js"],"names":[],"mappings":"AA6BA;IAEQ;;;OAGG;IACH,cAFU,eAAa,IAAI,CAEH;IAExB,SAAc;IAEd;;;OAGG;IACH,6BAFU,gBAAgB,CAEwB;IAElD;;;OAGG;IACH,QAFU,cAAc,CAEY;IAEpC;;;OAGG;IACH,OAFU,OAAO,CAEA;IAEjB;;;OAGG;IACH,wBAGE;IAGN;;;;OAIG;IACH,4BAEC;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,MAAM,CAMlB;IAED;;;OAGG;IACH,wCAEC;IAED;;;OAGG;IACH,8BAHa,OAAO,CAoBnB;IAED;;;;;;OAMG;IACH,mBAJW,MAAM,SACN,MAAM,gBAgDhB;IAGD;;;OAGG;IACH,gCAFW,MAAM,UAMhB;IAED;;;;;OAKG;IACH,0BA0BC;IAED;;;;;;OAMG;IACH,eALW,MAAM,SACN,MAAM,GAEJ,MAAM,CAoBlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACL,OAAO,CAIlB;CACJ;
|
|
1
|
+
{"version":3,"file":"Localization.d.ts","sourceRoot":"","sources":["../../../../src/core/localization/Localization.js"],"names":[],"mappings":"AA6BA;IAEQ;;;OAGG;IACH,cAFU,eAAa,IAAI,CAEH;IAExB,SAAc;IAEd;;;OAGG;IACH,6BAFU,gBAAgB,CAEwB;IAElD;;;OAGG;IACH,QAFU,cAAc,CAEY;IAEpC;;;OAGG;IACH,OAFU,OAAO,CAEA;IAEjB;;;OAGG;IACH,wBAGE;IAGN;;;;OAIG;IACH,4BAEC;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,MAAM,CAMlB;IAED;;;OAGG;IACH,wCAEC;IAED;;;OAGG;IACH,8BAHa,OAAO,CAoBnB;IAED;;;;;;OAMG;IACH,mBAJW,MAAM,SACN,MAAM,gBAgDhB;IAGD;;;OAGG;IACH,gCAFW,MAAM,UAMhB;IAED;;;;;OAKG;IACH,0BA0BC;IAED;;;;;;OAMG;IACH,eALW,MAAM,SACN,MAAM,GAEJ,MAAM,CAoBlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACL,OAAO,CAIlB;CACJ;iCAnPgC,uBAAuB;2BAL7B,4BAA4B"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {computeHashArray} from "../collection/array/computeHashArray.js";
|
|
1
|
+
import { parseTooltipString } from "../../view/tooltip/gml/parser/parseTooltipString.js";
|
|
2
|
+
import { assert } from "../assert.js";
|
|
3
|
+
import { Cache } from "../cache/Cache.js";
|
|
4
|
+
import { computeHashArray } from "../collection/array/computeHashArray.js";
|
|
6
5
|
import ObservedString from "../model/ObservedString.js";
|
|
7
|
-
import {seedVariablesIntoTemplateString} from "../parser/seedVariablesIntoTemplateString.js";
|
|
8
|
-
import {STRING_TEMPLATE_VARIABLE_REGEX} from "../parser/STRING_TEMPLATE_VARIABLE_REGEX.js";
|
|
9
|
-
import {computeStringHash} from "../primitives/strings/computeStringHash.js";
|
|
10
|
-
import {
|
|
6
|
+
import { seedVariablesIntoTemplateString } from "../parser/seedVariablesIntoTemplateString.js";
|
|
7
|
+
import { STRING_TEMPLATE_VARIABLE_REGEX } from "../parser/STRING_TEMPLATE_VARIABLE_REGEX.js";
|
|
8
|
+
import { computeStringHash } from "../primitives/strings/computeStringHash.js";
|
|
9
|
+
import { string_compute_similarity } from "../primitives/strings/string_compute_similarity.js";
|
|
10
|
+
import { LanguageMetadata } from "./LanguageMetadata.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Validation utility method
|
|
@@ -176,7 +176,7 @@ export class Localization {
|
|
|
176
176
|
* @param {number} value
|
|
177
177
|
*/
|
|
178
178
|
formatIntegerByThousands(value) {
|
|
179
|
-
const formatter = new Intl.NumberFormat(this.locale.getValue(), {useGrouping: true});
|
|
179
|
+
const formatter = new Intl.NumberFormat(this.locale.getValue(), { useGrouping: true });
|
|
180
180
|
|
|
181
181
|
return formatter.format(value);
|
|
182
182
|
}
|
|
@@ -196,7 +196,7 @@ export class Localization {
|
|
|
196
196
|
|
|
197
197
|
//try to find similar keys
|
|
198
198
|
const similarities = Object.keys(this.json).map(function (key) {
|
|
199
|
-
const distance =
|
|
199
|
+
const distance = string_compute_similarity(key, id);
|
|
200
200
|
return {
|
|
201
201
|
key,
|
|
202
202
|
distance
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"epsilonEquals.d.ts","sourceRoot":"","sources":["../../../../src/core/math/epsilonEquals.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,iCALW,MAAM,KACN,MAAM,aACN,MAAM,GACJ,OAAO,
|
|
1
|
+
{"version":3,"file":"epsilonEquals.d.ts","sourceRoot":"","sources":["../../../../src/core/math/epsilonEquals.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,iCALW,MAAM,KACN,MAAM,aACN,MAAM,GACJ,OAAO,CASnB"}
|
|
@@ -11,6 +11,7 @@ export function epsilonEquals(a, b, tolerance) {
|
|
|
11
11
|
assert.isNumber(a, 'a');
|
|
12
12
|
assert.isNumber(b, 'b');
|
|
13
13
|
assert.isNumber(tolerance, 'tolerance');
|
|
14
|
+
assert.greaterThanOrEqual(tolerance, 0, 'tolerance must be greater than 0');
|
|
14
15
|
|
|
15
16
|
return Math.abs(a - b) <= tolerance;
|
|
16
17
|
}
|