@woosh/meep-engine 2.113.10 → 2.113.12
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 +35 -3
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +35 -3
- package/package.json +1 -1
- package/src/core/assert.d.ts +26 -4
- package/src/core/assert.d.ts.map +1 -1
- package/src/core/assert.js +22 -0
- package/src/core/geom/Vector2.d.ts.map +1 -1
- package/src/core/geom/Vector2.js +12 -2
package/build/meep.cjs
CHANGED
|
@@ -248,6 +248,12 @@ class InMemoryDescriptor extends BaseDescription {
|
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
+
/**
|
|
252
|
+
* @template T
|
|
253
|
+
* @param {T} a
|
|
254
|
+
* @param {T} b
|
|
255
|
+
* @param {string} [m]
|
|
256
|
+
*/
|
|
251
257
|
function equal(a, b, m) {
|
|
252
258
|
if (a !== b) {
|
|
253
259
|
const details = `${a} !== ${b}`;
|
|
@@ -257,10 +263,21 @@ function equal(a, b, m) {
|
|
|
257
263
|
}
|
|
258
264
|
}
|
|
259
265
|
|
|
266
|
+
/**
|
|
267
|
+
* @template T
|
|
268
|
+
* @param {T} a
|
|
269
|
+
* @param {T} b
|
|
270
|
+
* @param {string} [m]
|
|
271
|
+
*/
|
|
260
272
|
function notEqual(a, b, m) {
|
|
261
273
|
assert(a !== b, m); // eslint-disable-line eqeqeq
|
|
262
274
|
}
|
|
263
275
|
|
|
276
|
+
/**
|
|
277
|
+
*
|
|
278
|
+
* @param {boolean} t
|
|
279
|
+
* @param {string} [m]
|
|
280
|
+
*/
|
|
264
281
|
function notOk(t, m) {
|
|
265
282
|
assert(!t, m);
|
|
266
283
|
}
|
|
@@ -274,6 +291,11 @@ function notOk(t, m) {
|
|
|
274
291
|
function logicalEquals(a, b, m) {
|
|
275
292
|
}
|
|
276
293
|
|
|
294
|
+
/**
|
|
295
|
+
*
|
|
296
|
+
* @param {boolean} t
|
|
297
|
+
* @param {string} [m]
|
|
298
|
+
*/
|
|
277
299
|
function assert(t, m) {
|
|
278
300
|
if (!t) {
|
|
279
301
|
throw new Error(m || 'AssertionError')
|
|
@@ -47396,7 +47418,7 @@ class Vector2 {
|
|
|
47396
47418
|
* @param {number[]} array
|
|
47397
47419
|
* @param {number} offset
|
|
47398
47420
|
*/
|
|
47399
|
-
|
|
47421
|
+
fromArray(array, offset = 0) {
|
|
47400
47422
|
this.set(
|
|
47401
47423
|
array[offset],
|
|
47402
47424
|
array[offset + 1]
|
|
@@ -47408,7 +47430,7 @@ class Vector2 {
|
|
|
47408
47430
|
* @param {number[]} array
|
|
47409
47431
|
* @param {number} offset
|
|
47410
47432
|
*/
|
|
47411
|
-
|
|
47433
|
+
toArray(array, offset = 0) {
|
|
47412
47434
|
array[offset] = this.x;
|
|
47413
47435
|
array[offset + 1] = this.y;
|
|
47414
47436
|
}
|
|
@@ -48021,7 +48043,17 @@ Vector2.one = Object.freeze(new Vector2(1, 1));
|
|
|
48021
48043
|
*/
|
|
48022
48044
|
Vector2.prototype.isVector2 = true;
|
|
48023
48045
|
|
|
48024
|
-
Vector2._distance = v2_distance;
|
|
48046
|
+
Vector2._distance = v2_distance;
|
|
48047
|
+
|
|
48048
|
+
/**
|
|
48049
|
+
* @deprecated use {@link Vector2#toArray} instead
|
|
48050
|
+
*/
|
|
48051
|
+
Vector2.prototype.writeToArray = Vector2.prototype.toArray;
|
|
48052
|
+
|
|
48053
|
+
/**
|
|
48054
|
+
* @deprecated use {@link Vector2#fromArray} instead
|
|
48055
|
+
*/
|
|
48056
|
+
Vector2.prototype.readFromArray = Vector2.prototype.fromArray;
|
|
48025
48057
|
|
|
48026
48058
|
/**
|
|
48027
48059
|
* NOTE, trying to keep to IANA registry: https://www.iana.org/assignments/media-types/media-types.xhtml
|