spoint 0.1.21 → 0.1.22
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/client/app.js +5 -3
- package/package.json +1 -1
package/client/app.js
CHANGED
|
@@ -657,8 +657,10 @@ ground.rotation.x = -Math.PI / 2
|
|
|
657
657
|
ground.receiveShadow = true
|
|
658
658
|
scene.add(ground)
|
|
659
659
|
|
|
660
|
-
const
|
|
661
|
-
|
|
660
|
+
const loadingManager = new THREE.LoadingManager()
|
|
661
|
+
loadingManager.onError = (url) => console.warn('[THREE] Failed to load:', url)
|
|
662
|
+
const gltfLoader = new GLTFLoader(loadingManager)
|
|
663
|
+
const dracoLoader = new DRACOLoader(loadingManager)
|
|
662
664
|
dracoLoader.setDecoderPath('/draco/')
|
|
663
665
|
gltfLoader.setDRACOLoader(dracoLoader)
|
|
664
666
|
gltfLoader.register((parser) => new VRMLoaderPlugin(parser))
|
|
@@ -942,7 +944,7 @@ function loadEntityModel(entityId, entityState) {
|
|
|
942
944
|
fitShadowFrustum()
|
|
943
945
|
pendingLoads.delete(entityId)
|
|
944
946
|
if (!environmentLoaded) { environmentLoaded = true; checkAllLoaded() }
|
|
945
|
-
},
|
|
947
|
+
}, (progress) => { if (progress.total > 0) console.log('[gltf]', url, Math.round(progress.loaded / progress.total * 100) + '%') }, (err) => { console.error('[gltf]', url, err); pendingLoads.delete(entityId) })
|
|
946
948
|
}
|
|
947
949
|
|
|
948
950
|
function renderAppUI(state) {
|