@series-inc/rundot-3d-engine 0.6.13 → 0.6.15
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/dist/{chunk-QESAUQPW.js → chunk-5YJZ36HT.js} +55 -1
- package/dist/chunk-5YJZ36HT.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +65 -3
- package/dist/index.js.map +1 -1
- package/dist/systems/index.d.ts +33 -2
- package/dist/systems/index.js +17 -4
- package/dist/systems/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-QESAUQPW.js.map +0 -1
|
@@ -5895,6 +5895,60 @@ var StowKitSystem = class _StowKitSystem {
|
|
|
5895
5895
|
);
|
|
5896
5896
|
return results;
|
|
5897
5897
|
}
|
|
5898
|
+
/**
|
|
5899
|
+
* Preload multiple asset types concurrently.
|
|
5900
|
+
* All categories load in parallel via Promise.all, eliminating sequential blocking.
|
|
5901
|
+
*/
|
|
5902
|
+
async preloadAll(options) {
|
|
5903
|
+
const start = performance.now();
|
|
5904
|
+
const [meshes, skinnedMeshes, textures, audio, animations] = await Promise.all([
|
|
5905
|
+
options.meshes ? this.preloadMeshes(options.meshes) : Promise.resolve(/* @__PURE__ */ new Map()),
|
|
5906
|
+
options.skinnedMeshes ? this.preloadSkinnedMeshes(options.skinnedMeshes.names, options.skinnedMeshes.scale) : Promise.resolve(/* @__PURE__ */ new Map()),
|
|
5907
|
+
options.textures ? this.preloadTexturesInternal(options.textures) : Promise.resolve(/* @__PURE__ */ new Map()),
|
|
5908
|
+
options.audio ? this.preloadAudio(options.audio) : Promise.resolve(/* @__PURE__ */ new Map()),
|
|
5909
|
+
options.animations ? this.preloadAnimationsInternal(options.animations) : Promise.resolve(/* @__PURE__ */ new Map())
|
|
5910
|
+
]);
|
|
5911
|
+
console.log(
|
|
5912
|
+
`[StowKitSystem] preloadAll completed in ${(performance.now() - start).toFixed(0)}ms`
|
|
5913
|
+
);
|
|
5914
|
+
return { meshes, skinnedMeshes, textures, audio, animations };
|
|
5915
|
+
}
|
|
5916
|
+
async preloadTexturesInternal(textureNames) {
|
|
5917
|
+
const start = performance.now();
|
|
5918
|
+
const results = /* @__PURE__ */ new Map();
|
|
5919
|
+
await Promise.allSettled(
|
|
5920
|
+
textureNames.map(async (name) => {
|
|
5921
|
+
try {
|
|
5922
|
+
const texture = await this.getTexture(name);
|
|
5923
|
+
results.set(name, texture);
|
|
5924
|
+
} catch (e) {
|
|
5925
|
+
console.warn(`[StowKitSystem] Failed to preload texture "${name}":`, e);
|
|
5926
|
+
}
|
|
5927
|
+
})
|
|
5928
|
+
);
|
|
5929
|
+
console.log(
|
|
5930
|
+
`[StowKitSystem] Preloaded ${results.size}/${textureNames.length} textures in ${(performance.now() - start).toFixed(0)}ms`
|
|
5931
|
+
);
|
|
5932
|
+
return results;
|
|
5933
|
+
}
|
|
5934
|
+
async preloadAnimationsInternal(anims) {
|
|
5935
|
+
const start = performance.now();
|
|
5936
|
+
const results = /* @__PURE__ */ new Map();
|
|
5937
|
+
await Promise.allSettled(
|
|
5938
|
+
anims.map(async ({ name, meshName }) => {
|
|
5939
|
+
try {
|
|
5940
|
+
const clip = await this.getAnimation(name, meshName);
|
|
5941
|
+
results.set(name, clip);
|
|
5942
|
+
} catch (e) {
|
|
5943
|
+
console.warn(`[StowKitSystem] Failed to preload animation "${name}":`, e);
|
|
5944
|
+
}
|
|
5945
|
+
})
|
|
5946
|
+
);
|
|
5947
|
+
console.log(
|
|
5948
|
+
`[StowKitSystem] Preloaded ${results.size}/${anims.length} animations in ${(performance.now() - start).toFixed(0)}ms`
|
|
5949
|
+
);
|
|
5950
|
+
return results;
|
|
5951
|
+
}
|
|
5898
5952
|
// ============================================
|
|
5899
5953
|
// Pack Access
|
|
5900
5954
|
// ============================================
|
|
@@ -6414,4 +6468,4 @@ export {
|
|
|
6414
6468
|
PrefabLoader,
|
|
6415
6469
|
StowKitSystem
|
|
6416
6470
|
};
|
|
6417
|
-
//# sourceMappingURL=chunk-
|
|
6471
|
+
//# sourceMappingURL=chunk-5YJZ36HT.js.map
|