spoint 0.1.32 → 0.1.33
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/client/app.js +3 -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/client/app.js
CHANGED
|
@@ -929,6 +929,7 @@ function loadEntityModel(entityId, entityState) {
|
|
|
929
929
|
const ep = entityState.position; group.position.set(ep[0], ep[1], ep[2])
|
|
930
930
|
const er = entityState.rotation; if (er) group.quaternion.set(er[0], er[1], er[2], er[3])
|
|
931
931
|
scene.add(group)
|
|
932
|
+
renderer.compileAsync(group, camera).catch(() => renderer.compile(group, camera))
|
|
932
933
|
entityMeshes.set(entityId, group)
|
|
933
934
|
pendingLoads.delete(entityId)
|
|
934
935
|
if (!environmentLoaded) { environmentLoaded = true; checkAllLoaded() }
|
|
@@ -951,6 +952,7 @@ function loadEntityModel(entityId, entityState) {
|
|
|
951
952
|
})
|
|
952
953
|
model.updateMatrixWorld(true)
|
|
953
954
|
scene.add(model)
|
|
955
|
+
renderer.compileAsync(model, camera).catch(() => renderer.compile(model, camera))
|
|
954
956
|
entityMeshes.set(entityId, model)
|
|
955
957
|
cam.setEnvironment(colliders)
|
|
956
958
|
scene.remove(ground)
|
|
@@ -1332,6 +1334,7 @@ function loadQueuedModels() {
|
|
|
1332
1334
|
group.position.set(x, y, z)
|
|
1333
1335
|
group.userData.isDroppedModel = true
|
|
1334
1336
|
scene.add(group)
|
|
1337
|
+
renderer.compileAsync(group, camera).catch(() => renderer.compile(group, camera))
|
|
1335
1338
|
const envApp = appModules.get('environment')
|
|
1336
1339
|
if (envApp?.onEvent) {
|
|
1337
1340
|
envApp.onEvent({
|