spoint 0.1.38 → 0.1.39

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.
Files changed (2) hide show
  1. package/client/app.js +8 -1
  2. package/package.json +1 -1
package/client/app.js CHANGED
@@ -1096,6 +1096,13 @@ async function warmupShaders() {
1096
1096
  renderer.compile(scene, camera)
1097
1097
  console.log('[shader] warmup compile done (fallback)')
1098
1098
  }
1099
+ const culled = []
1100
+ scene.traverse(obj => { if (obj.frustumCulled) { culled.push(obj); obj.frustumCulled = false } })
1101
+ renderer.render(scene, camera)
1102
+ await new Promise(r => requestAnimationFrame(r))
1103
+ renderer.render(scene, camera)
1104
+ for (const obj of culled) obj.frustumCulled = true
1105
+ console.log('[shader] GPU upload render done, culled restored:', culled.length)
1099
1106
  }
1100
1107
 
1101
1108
  function checkAllLoaded() {
@@ -1105,8 +1112,8 @@ function checkAllLoaded() {
1105
1112
  if (!firstSnapshotReceived) return
1106
1113
  loadingMgr.setStage('INIT')
1107
1114
  loadingMgr.complete()
1108
- loadingScreen.hide().then(() => warmupShaders()).catch(() => warmupShaders())
1109
1115
  loadingScreenHidden = true
1116
+ warmupShaders().then(() => loadingScreen.hide()).catch(() => loadingScreen.hide())
1110
1117
  }
1111
1118
 
1112
1119
  function initInputHandler() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoint",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
4
4
  "description": "Physics and netcode SDK for multiplayer game servers",
5
5
  "type": "module",
6
6
  "main": "src/index.js",