spoint 0.1.32 → 0.1.34
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/SKILL.md +4 -0
- package/apps/world/index.js +0 -1
- package/client/app.js +7 -0
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -762,6 +762,10 @@ App reloads never happen mid-tick. Queue drains at end of each tick. After each
|
|
|
762
762
|
|
|
763
763
|
## Client Rendering
|
|
764
764
|
|
|
765
|
+
### GLB Shader Stall Prevention
|
|
766
|
+
|
|
767
|
+
The engine automatically calls `renderer.compileAsync(object, camera)` immediately after adding any GLB or procedural mesh to the scene. This prevents first-draw GPU stall for dynamically loaded entities (environment models, physics crates, power crates, smart objects, drag-and-drop models). No action is needed from app code — warmup is handled in `loadEntityModel` and `loadQueuedModels`. VRM players use a separate one-time warmup path.
|
|
768
|
+
|
|
765
769
|
### render(ctx) Return Value
|
|
766
770
|
|
|
767
771
|
```js
|
package/apps/world/index.js
CHANGED
package/client/app.js
CHANGED
|
@@ -714,6 +714,10 @@ function initAssets(playerModelUrl) {
|
|
|
714
714
|
animAssets = result
|
|
715
715
|
assetsLoaded = true
|
|
716
716
|
checkAllLoaded()
|
|
717
|
+
}).catch(err => {
|
|
718
|
+
console.warn('[assets] player model unavailable:', err.message)
|
|
719
|
+
assetsLoaded = true
|
|
720
|
+
checkAllLoaded()
|
|
717
721
|
})
|
|
718
722
|
}
|
|
719
723
|
|
|
@@ -929,6 +933,7 @@ function loadEntityModel(entityId, entityState) {
|
|
|
929
933
|
const ep = entityState.position; group.position.set(ep[0], ep[1], ep[2])
|
|
930
934
|
const er = entityState.rotation; if (er) group.quaternion.set(er[0], er[1], er[2], er[3])
|
|
931
935
|
scene.add(group)
|
|
936
|
+
renderer.compileAsync(group, camera).catch(() => renderer.compile(group, camera))
|
|
932
937
|
entityMeshes.set(entityId, group)
|
|
933
938
|
pendingLoads.delete(entityId)
|
|
934
939
|
if (!environmentLoaded) { environmentLoaded = true; checkAllLoaded() }
|
|
@@ -951,6 +956,7 @@ function loadEntityModel(entityId, entityState) {
|
|
|
951
956
|
})
|
|
952
957
|
model.updateMatrixWorld(true)
|
|
953
958
|
scene.add(model)
|
|
959
|
+
renderer.compileAsync(model, camera).catch(() => renderer.compile(model, camera))
|
|
954
960
|
entityMeshes.set(entityId, model)
|
|
955
961
|
cam.setEnvironment(colliders)
|
|
956
962
|
scene.remove(ground)
|
|
@@ -1332,6 +1338,7 @@ function loadQueuedModels() {
|
|
|
1332
1338
|
group.position.set(x, y, z)
|
|
1333
1339
|
group.userData.isDroppedModel = true
|
|
1334
1340
|
scene.add(group)
|
|
1341
|
+
renderer.compileAsync(group, camera).catch(() => renderer.compile(group, camera))
|
|
1335
1342
|
const envApp = appModules.get('environment')
|
|
1336
1343
|
if (envApp?.onEvent) {
|
|
1337
1344
|
envApp.onEvent({
|