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 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
@@ -63,6 +63,5 @@ export default {
63
63
  { id: 'power-crates', position: [0, 0, 0], app: 'power-crate' },
64
64
  { id: 'interact-box', position: [-100, 3, -100], app: 'interactable' }
65
65
  ],
66
- playerModel: './apps/tps-game/Cleetus.vrm',
67
66
  spawnPoint: [-35, 3, -65]
68
67
  }
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({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoint",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "Physics and netcode SDK for multiplayer game servers",
5
5
  "type": "module",
6
6
  "main": "src/index.js",