spoint 0.1.36 → 0.1.38

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.
@@ -63,6 +63,6 @@ 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',
66
+ playerModel: './apps/tps-game/cleetus.vrm',
67
67
  spawnPoint: [-35, 3, -65]
68
68
  }
package/client/app.js CHANGED
@@ -616,6 +616,9 @@ sun.shadow.camera.near = 0.5; sun.shadow.camera.far = 200
616
616
  scene.add(sun)
617
617
  scene.add(sun.target)
618
618
 
619
+ const _warmupPointLight = new THREE.PointLight(0xffffff, 0, 1)
620
+ scene.add(_warmupPointLight)
621
+
619
622
  function fitShadowFrustum() {
620
623
  const box = new THREE.Box3()
621
624
  scene.traverse(o => { if (o.isMesh && (o.castShadow || o.receiveShadow) && o.geometry) box.expandByObject(o) })
@@ -730,6 +733,7 @@ async function createPlayerVRM(id) {
730
733
  try {
731
734
  const gltf = await gltfLoader.parseAsync(vrmBuffer.buffer.slice(0), '')
732
735
  const vrm = gltf.userData.vrm
736
+ if (!vrm) { console.error('[vrm]', id, 'VRMLoaderPlugin did not produce vrm - file may not be VRM format'); return group }
733
737
  VRMUtils.removeUnnecessaryVertices(vrm.scene)
734
738
  VRMUtils.combineSkeletons(vrm.scene)
735
739
  const vrmVersion = detectVrmVersion(vrmBuffer)
@@ -933,7 +937,6 @@ function loadEntityModel(entityId, entityState) {
933
937
  const ep = entityState.position; group.position.set(ep[0], ep[1], ep[2])
934
938
  const er = entityState.rotation; if (er) group.quaternion.set(er[0], er[1], er[2], er[3])
935
939
  scene.add(group)
936
- renderer.compileAsync(group, camera).catch(() => renderer.compile(group, camera))
937
940
  entityMeshes.set(entityId, group)
938
941
  pendingLoads.delete(entityId)
939
942
  if (!environmentLoaded) { environmentLoaded = true; checkAllLoaded() }
@@ -956,7 +959,6 @@ function loadEntityModel(entityId, entityState) {
956
959
  })
957
960
  model.updateMatrixWorld(true)
958
961
  scene.add(model)
959
- renderer.compileAsync(model, camera).catch(() => renderer.compile(model, camera))
960
962
  entityMeshes.set(entityId, model)
961
963
  cam.setEnvironment(colliders)
962
964
  scene.remove(ground)
@@ -1338,7 +1340,6 @@ function loadQueuedModels() {
1338
1340
  group.position.set(x, y, z)
1339
1341
  group.userData.isDroppedModel = true
1340
1342
  scene.add(group)
1341
- renderer.compileAsync(group, camera).catch(() => renderer.compile(group, camera))
1342
1343
  const envApp = appModules.get('environment')
1343
1344
  if (envApp?.onEvent) {
1344
1345
  envApp.onEvent({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spoint",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
4
4
  "description": "Physics and netcode SDK for multiplayer game servers",
5
5
  "type": "module",
6
6
  "main": "src/index.js",