spoint 0.1.626 → 0.1.628
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/core/Grass.js
CHANGED
|
@@ -675,7 +675,8 @@ export async function createGrass(opts = {}) {
|
|
|
675
675
|
if (!cell._occProxy) {
|
|
676
676
|
const root = new THREE.Object3D()
|
|
677
677
|
// must have a real (unit-box) mesh child: OcclusionQueryTier's Box3.setFromObject walks geometry not transforms, so a bare Object3D yields an empty box and the candidate never queries
|
|
678
|
-
const
|
|
678
|
+
const perProxyOccBoxGeo = _occBoxGeo.clone()
|
|
679
|
+
const boxMesh = new THREE.Mesh(perProxyOccBoxGeo, _occBoxMat)
|
|
679
680
|
boxMesh.visible = false
|
|
680
681
|
boxMesh.raycast = () => {}
|
|
681
682
|
root.add(boxMesh)
|
package/client/core/Rocks.js
CHANGED
|
@@ -338,7 +338,8 @@ export async function createRocks(opts = {}) {
|
|
|
338
338
|
if (!cell._occProxy) {
|
|
339
339
|
const root = new THREE.Object3D()
|
|
340
340
|
// must have a real (unit-box) mesh child: OcclusionQueryTier's Box3.setFromObject walks geometry not transforms, so a bare Object3D yields an empty box and the candidate never queries
|
|
341
|
-
const
|
|
341
|
+
const perProxyOccBoxGeo = _occBoxGeo.clone()
|
|
342
|
+
const boxMesh = new THREE.Mesh(perProxyOccBoxGeo, _occBoxMat)
|
|
342
343
|
boxMesh.visible = false
|
|
343
344
|
boxMesh.raycast = () => {}
|
|
344
345
|
root.add(boxMesh)
|
|
@@ -429,12 +429,14 @@ export async function warmupShaders(renderer, scene, camera, entityMeshes, playe
|
|
|
429
429
|
// try/finally guarantees the restore runs on every exit path -- return, throw, or abort.
|
|
430
430
|
try {
|
|
431
431
|
// must compile ONLY entity+player meshes, not the whole scene -- InstancedMesh2 veg/rocks reference instanceIndex outside per-object setup and raise a VALIDATE_STATUS error; they warm via their own render() pass
|
|
432
|
+
let compiledCount = 0
|
|
432
433
|
for (const m of allMeshes) {
|
|
433
434
|
if (abortSignal?.aborted) { _record({ aborted: true, total, manifestedCount: manifestedMeshes.length }); return }
|
|
434
435
|
try { await renderer.compileAsync(m, camera, scene) } catch (_) { try { renderer.compile(m, camera, scene) } catch (_2) {} }
|
|
436
|
+
compiledCount++
|
|
437
|
+
loadingMgr.reportProcessing(compiledCount, total)
|
|
435
438
|
}
|
|
436
439
|
if (abortSignal?.aborted) { _record({ aborted: true, total, manifestedCount: manifestedMeshes.length }); return }
|
|
437
|
-
loadingMgr.reportProcessing(Math.floor(total / 2), total)
|
|
438
440
|
renderer.shadowMap.needsUpdate = true
|
|
439
441
|
renderer.render(scene, camera)
|
|
440
442
|
await new Promise(r => requestAnimationFrame(r))
|
|
@@ -926,7 +926,8 @@ export async function createVegetation(opts = {}) {
|
|
|
926
926
|
if (!cell._occProxy) {
|
|
927
927
|
const root = new THREE.Object3D()
|
|
928
928
|
// must have a real (unit-box) mesh child: OcclusionQueryTier's Box3.setFromObject walks geometry not transforms, so a bare Object3D yields an empty box and the candidate never queries
|
|
929
|
-
const
|
|
929
|
+
const perProxyOccBoxGeo = _occBoxGeo.clone()
|
|
930
|
+
const boxMesh = new THREE.Mesh(perProxyOccBoxGeo, _occBoxMat)
|
|
930
931
|
boxMesh.visible = false
|
|
931
932
|
boxMesh.raycast = () => {}
|
|
932
933
|
root.add(boxMesh)
|