@woosh/meep-engine 2.92.3 → 2.92.5
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 +17 -5
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +17 -5
- package/package.json +1 -1
- package/src/core/model/object/objectDeepEquals.d.ts.map +1 -1
- package/src/core/model/object/objectDeepEquals.js +16 -4
- package/src/core/model/object/objectDeepEquals.spec.js +40 -0
- package/src/engine/asset/AssetManager.d.ts.map +1 -1
- package/src/engine/asset/AssetManager.js +6 -2
package/build/meep.cjs
CHANGED
|
@@ -85078,7 +85078,7 @@ class AssetManager {
|
|
|
85078
85078
|
* @template T
|
|
85079
85079
|
* @param {String} path
|
|
85080
85080
|
* @param {String} type
|
|
85081
|
-
* @param {function(asset:Asset<T>)} callback
|
|
85081
|
+
* @param {function(asset:Asset<T>)} [callback]
|
|
85082
85082
|
* @param {function(*)} [failure]
|
|
85083
85083
|
* @param {function(loaded:number, total:number)} [progress]
|
|
85084
85084
|
* @param {boolean} [skip_queue]
|
|
@@ -85087,7 +85087,7 @@ class AssetManager {
|
|
|
85087
85087
|
get({
|
|
85088
85088
|
path,
|
|
85089
85089
|
type,
|
|
85090
|
-
callback,
|
|
85090
|
+
callback = noop,
|
|
85091
85091
|
failure = console.error,
|
|
85092
85092
|
progress = noop,
|
|
85093
85093
|
skip_queue = false,
|
|
@@ -101298,6 +101298,11 @@ function easeInOutQuad(t) {
|
|
|
101298
101298
|
* @returns {boolean}
|
|
101299
101299
|
*/
|
|
101300
101300
|
function objectDeepEquals(a, b) {
|
|
101301
|
+
if (a === b) {
|
|
101302
|
+
// identity shortcut
|
|
101303
|
+
return true;
|
|
101304
|
+
}
|
|
101305
|
+
|
|
101301
101306
|
const tA = typeof a;
|
|
101302
101307
|
const tB = typeof b;
|
|
101303
101308
|
|
|
@@ -101305,7 +101310,16 @@ function objectDeepEquals(a, b) {
|
|
|
101305
101310
|
return false;
|
|
101306
101311
|
}
|
|
101307
101312
|
|
|
101308
|
-
if (tA
|
|
101313
|
+
if (tA !== "object") {
|
|
101314
|
+
// primitive types, identity equality already checked
|
|
101315
|
+
return false;
|
|
101316
|
+
} else {
|
|
101317
|
+
|
|
101318
|
+
if (a === null || b === null) {
|
|
101319
|
+
// we know that A and B are not the same, so if one of them is a null - there is no possible equality
|
|
101320
|
+
return false;
|
|
101321
|
+
}
|
|
101322
|
+
|
|
101309
101323
|
if (Array.isArray(a)) {
|
|
101310
101324
|
// special fast path for arrays
|
|
101311
101325
|
if (!Array.isArray(b)) {
|
|
@@ -101335,8 +101349,6 @@ function objectDeepEquals(a, b) {
|
|
|
101335
101349
|
|
|
101336
101350
|
return true;
|
|
101337
101351
|
|
|
101338
|
-
} else {
|
|
101339
|
-
return a === b;
|
|
101340
101352
|
}
|
|
101341
101353
|
}
|
|
101342
101354
|
|