@voltro/plugin-rooms 0.0.0-stage → 0.88.0
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/CHANGELOG.md +24492 -0
- package/LICENSE +61 -0
- package/README.md +9204 -2
- package/SECURITY.md +56 -0
- package/THIRD-PARTY-NOTICES.md +12496 -0
- package/dist/actor.js +1473 -0
- package/dist/apiBinding.js +677 -0
- package/dist/apiRegistryBinding.js +398 -0
- package/dist/apiReservations.js +432 -0
- package/dist/baselines.js +72 -0
- package/dist/bots.d.ts +1485 -0
- package/dist/bots.js +562 -0
- package/dist/catalog.js +79 -0
- package/dist/checkpointJson.js +23 -0
- package/dist/checkpointStore.js +385 -0
- package/dist/client.js +55 -0
- package/dist/clockSync.js +50 -0
- package/dist/collision.js +155 -0
- package/dist/commandDelivery.js +100 -0
- package/dist/commandRecord.js +10 -0
- package/dist/commandWithdrawal.js +182 -0
- package/dist/connection.js +496 -0
- package/dist/controlCarrier.js +374 -0
- package/dist/controlRegistry.js +78 -0
- package/dist/controlTarget.js +44 -0
- package/dist/controlTransport.js +573 -0
- package/dist/developmentBinding.js +112 -0
- package/dist/directory.js +322 -0
- package/dist/directoryProjection.js +116 -0
- package/dist/errors.d.ts +125 -0
- package/dist/errors.js +52 -0
- package/dist/fixed.d.ts +284 -0
- package/dist/fixed.js +10 -0
- package/dist/fixed32.js +133 -0
- package/dist/fixedCollision.js +59 -0
- package/dist/fixedCollision32.js +108 -0
- package/dist/fixedMath.js +55 -0
- package/dist/fixedRaw.js +10 -0
- package/dist/fixedSlabs.js +33 -0
- package/dist/fixedTrig.js +47 -0
- package/dist/fixedTrig32.js +37 -0
- package/dist/fixedVectors.js +112 -0
- package/dist/fixedVectors32.js +94 -0
- package/dist/fixedWide.js +49 -0
- package/dist/fixedWords.js +45 -0
- package/dist/gateway.js +56 -0
- package/dist/geometry-retention-app/rooms.geometryJournalRetention.workflow.server.tsx +4 -0
- package/dist/geometry-retention-app/rooms.geometryJournalRetention.workflow.tsx +14 -0
- package/dist/geometry-worker/worker.d.mts +2 -0
- package/dist/geometry-worker/worker.mjs +50 -0
- package/dist/geometry.d.ts +2249 -0
- package/dist/geometry.js +40 -0
- package/dist/geometryActivation.js +81 -0
- package/dist/geometryActorInventory.js +107 -0
- package/dist/geometryAdminClient.js +86 -0
- package/dist/geometryAdminData.js +31 -0
- package/dist/geometryAdminFixtures.js +49 -0
- package/dist/geometryAdminPorts.js +4 -0
- package/dist/geometryAdminRpc.js +57 -0
- package/dist/geometryAdminRpcRoutes.js +48 -0
- package/dist/geometryAdminSchemas.js +38 -0
- package/dist/geometryAdministration.js +189 -0
- package/dist/geometryAdministrationPorts.js +4 -0
- package/dist/geometryApiBinding.js +164 -0
- package/dist/geometryAppStorage.js +57 -0
- package/dist/geometryArtifacts.js +197 -0
- package/dist/geometryAssetBundle.js +116 -0
- package/dist/geometryAssetClient.js +24 -0
- package/dist/geometryAssetData.js +105 -0
- package/dist/geometryAssetHttp.js +122 -0
- package/dist/geometryAssetPorts.js +4 -0
- package/dist/geometryAssetRpc.js +29 -0
- package/dist/geometryAssetRpcRoutes.js +39 -0
- package/dist/geometryAssetStorageGrant.js +102 -0
- package/dist/geometryBoxOverlap.js +109 -0
- package/dist/geometryCatalogueDigest.js +110 -0
- package/dist/geometryCellCoverage.js +84 -0
- package/dist/geometryCellLoader.js +27 -0
- package/dist/geometryChannel.js +133 -0
- package/dist/geometryChunkHttp.js +53 -0
- package/dist/geometryChunkLeases.js +21 -0
- package/dist/geometryClient.d.ts +1429 -0
- package/dist/geometryClient.js +148 -0
- package/dist/geometryClientChunks.js +329 -0
- package/dist/geometryClientDelta.js +24 -0
- package/dist/geometryClientHttp.js +36 -0
- package/dist/geometryClientInterest.js +108 -0
- package/dist/geometryClientStatic.js +33 -0
- package/dist/geometryCms.d.ts +763 -0
- package/dist/geometryCms.js +216 -0
- package/dist/geometryCommitCoordinator.js +240 -0
- package/dist/geometryCompactionFixture.js +83 -0
- package/dist/geometryCompactionStrategies.js +37 -0
- package/dist/geometryConnectionClient.js +22 -0
- package/dist/geometryDerivationFixtures.js +140 -0
- package/dist/geometryDerivationStrategies.js +26 -0
- package/dist/geometryDigest.js +12 -0
- package/dist/geometryEditChannel.js +69 -0
- package/dist/geometryEditIngress.js +262 -0
- package/dist/geometryEdits.js +365 -0
- package/dist/geometryEnvelope.js +40 -0
- package/dist/geometryGridRaycast.js +91 -0
- package/dist/geometryGridSweep.js +91 -0
- package/dist/geometryHeightfield.js +165 -0
- package/dist/geometryHeightfieldRaycast.js +73 -0
- package/dist/geometryHeightfieldSweep.js +84 -0
- package/dist/geometryHeightfieldVolume.js +44 -0
- package/dist/geometryHost.js +321 -0
- package/dist/geometryHostDirectory.js +206 -0
- package/dist/geometryHostMutations.js +136 -0
- package/dist/geometryHostStreams.js +123 -0
- package/dist/geometryHttpBody.js +75 -0
- package/dist/geometryHttpRoutes.js +111 -0
- package/dist/geometryImportGltf.js +299 -0
- package/dist/geometryImportLdtk.js +53 -0
- package/dist/geometryImportPng.js +143 -0
- package/dist/geometryImportPublication.js +66 -0
- package/dist/geometryImportTiled.js +38 -0
- package/dist/geometryImportTiles.js +135 -0
- package/dist/geometryImportVox.js +129 -0
- package/dist/geometryImportedSource.js +100 -0
- package/dist/geometryInspectEndpoint.js +247 -0
- package/dist/geometryInspection.js +91 -0
- package/dist/geometryInstall.js +120 -0
- package/dist/geometryJournalArchiveData.js +20 -0
- package/dist/geometryJournalArchiveIndex.js +329 -0
- package/dist/geometryJournalArchiveTable.js +20 -0
- package/dist/geometryJournalCompaction.js +99 -0
- package/dist/geometryJournalPatch.js +46 -0
- package/dist/geometryJournalRetention.js +111 -0
- package/dist/geometryJournalRetentionSchemas.js +35 -0
- package/dist/geometryJournalRetentionSweep.js +111 -0
- package/dist/geometryJournalRetentionWorkflow.js +27 -0
- package/dist/geometryJournalRetentionWorkflowData.js +30 -0
- package/dist/geometryJournalStorage.js +147 -0
- package/dist/geometryLoader.js +117 -0
- package/dist/geometryManifest.js +112 -0
- package/dist/geometryManifestChannel.js +92 -0
- package/dist/geometryManifestClient.js +121 -0
- package/dist/geometryManifestData.js +48 -0
- package/dist/geometryManifestPorts.js +4 -0
- package/dist/geometryManifestPublication.js +108 -0
- package/dist/geometryManifestSource.js +67 -0
- package/dist/geometryMigrationJournal.js +13 -0
- package/dist/geometryMigrationStrategies.js +6 -0
- package/dist/geometryMigrations.js +322 -0
- package/dist/geometryNativeMetadata.js +51 -0
- package/dist/geometryPatch.js +169 -0
- package/dist/geometryPersistence.js +448 -0
- package/dist/geometryPersistenceCapture.js +68 -0
- package/dist/geometryPersistenceData.js +139 -0
- package/dist/geometryPersistencePorts.js +4 -0
- package/dist/geometryPlayerAdmission.js +33 -0
- package/dist/geometryPlayerEditOwner.js +264 -0
- package/dist/geometryPlayerEdits.js +48 -0
- package/dist/geometryPrepared.js +187 -0
- package/dist/geometryPrivacyFence.js +23 -0
- package/dist/geometryProceduralPublication.js +90 -0
- package/dist/geometryProceduralWorker.js +163 -0
- package/dist/geometryPublication.js +109 -0
- package/dist/geometryRayAlgebra.js +115 -0
- package/dist/geometryReadClient.js +156 -0
- package/dist/geometryReadPorts.js +4 -0
- package/dist/geometryReadRpc.js +26 -0
- package/dist/geometryReadRpcRoutes.js +46 -0
- package/dist/geometryReliablePublication.js +81 -0
- package/dist/geometryReloadPorts.js +45 -0
- package/dist/geometryReloadSource.js +277 -0
- package/dist/geometryRenderCache.js +164 -0
- package/dist/geometryRenderLod.js +101 -0
- package/dist/geometryRollback.js +124 -0
- package/dist/geometryRollbackCoordinator.js +202 -0
- package/dist/geometryRollbackPorts.js +45 -0
- package/dist/geometryRollbackSource.js +208 -0
- package/dist/geometryRollbackStore.js +197 -0
- package/dist/geometrySchemas.js +26 -0
- package/dist/geometryServer.d.ts +2766 -0
- package/dist/geometryServer.js +62 -0
- package/dist/geometryShapeRaycast.js +110 -0
- package/dist/geometryShapeSegments.js +33 -0
- package/dist/geometryShapes.js +222 -0
- package/dist/geometrySnapshot.js +75 -0
- package/dist/geometrySnapshotChannel.js +159 -0
- package/dist/geometrySnapshotClient.js +158 -0
- package/dist/geometrySnapshotPreparation.js +75 -0
- package/dist/geometrySnapshotServer.js +190 -0
- package/dist/geometrySqlOwner.js +20 -0
- package/dist/geometryStorage.js +126 -0
- package/dist/geometryStorageGrant.js +68 -0
- package/dist/geometryStorageIdentity.js +8 -0
- package/dist/geometryTileArtifact.js +9 -0
- package/dist/geometryTileCodec.js +193 -0
- package/dist/geometryTileCollision.js +95 -0
- package/dist/geometryTileNavigation.js +127 -0
- package/dist/geometryTileView.js +34 -0
- package/dist/geometryVersionActivation.js +113 -0
- package/dist/geometryVersionClient.js +237 -0
- package/dist/geometryVersionCompare.js +39 -0
- package/dist/geometryVersionMigration.js +105 -0
- package/dist/geometryVoxel.js +252 -0
- package/dist/geometryWorldEntitySubject.js +31 -0
- package/dist/geometryWorldExtent.js +11 -0
- package/dist/geometryWorldMetadata.js +37 -0
- package/dist/geometryWorldStrategyFixtures.js +126 -0
- package/dist/geometryWorldView.js +306 -0
- package/dist/host.js +127 -0
- package/dist/hostBinding.js +276 -0
- package/dist/hostCellObservation.js +113 -0
- package/dist/hostClientCapacity.js +89 -0
- package/dist/hostCommandScope.js +63 -0
- package/dist/hostController.js +3093 -0
- package/dist/hostDeployment.js +64 -0
- package/dist/hostDrain.js +151 -0
- package/dist/hostDrainPorts.js +4 -0
- package/dist/hostDriver.js +178 -0
- package/dist/hostLane.js +287 -0
- package/dist/hostListener.js +78 -0
- package/dist/hostListenerBinding.js +18 -0
- package/dist/hostLoopObservation.js +89 -0
- package/dist/hostMetrics.js +55 -0
- package/dist/hostRegistryBinding.js +417 -0
- package/dist/hostSelection.js +15 -0
- package/dist/hostShutdown.js +46 -0
- package/dist/hostTurnObservation.js +52 -0
- package/dist/identities.js +3 -0
- package/dist/index.d.ts +8632 -0
- package/dist/index.js +231 -0
- package/dist/inputReceipts.js +62 -0
- package/dist/inputRedundancy.js +54 -0
- package/dist/inspect.js +237 -0
- package/dist/lockstep.d.ts +436 -0
- package/dist/lockstep.js +381 -0
- package/dist/lockstepAdmission.js +261 -0
- package/dist/lockstepAdmissionCodec.js +93 -0
- package/dist/lockstepAdmissionPorts.js +4 -0
- package/dist/lockstepClientSession.js +577 -0
- package/dist/lockstepDefinition.js +147 -0
- package/dist/lockstepHostLoop.js +242 -0
- package/dist/lockstepInitialAdmission.js +66 -0
- package/dist/lockstepInitialStrategyFixtures.js +44 -0
- package/dist/lockstepJournal.js +394 -0
- package/dist/lockstepJournalCodec.js +253 -0
- package/dist/lockstepJournalPorts.js +4 -0
- package/dist/lockstepJournalRebuild.js +207 -0
- package/dist/lockstepJournalRows.js +56 -0
- package/dist/lockstepMembers.js +130 -0
- package/dist/lockstepMessages.js +46 -0
- package/dist/lockstepOwnedRoom.js +763 -0
- package/dist/lockstepPolicies.js +83 -0
- package/dist/lockstepReact.js +46 -0
- package/dist/lockstepRecoveryTruth.js +120 -0
- package/dist/lockstepRosterConfig.js +31 -0
- package/dist/lockstepSeed.js +11 -0
- package/dist/lockstepSeedFixture.js +19 -0
- package/dist/lockstepServer.d.ts +3897 -0
- package/dist/lockstepServer.js +324 -0
- package/dist/lockstepServerConfig.js +100 -0
- package/dist/lockstepServerRoles.js +402 -0
- package/dist/lockstepServerStrategyFixtures.js +32 -0
- package/dist/lockstepStrategies.js +5 -0
- package/dist/lockstepStrategyFixtures.js +136 -0
- package/dist/lockstepTerminal.js +89 -0
- package/dist/lockstepTerminalPorts.js +4 -0
- package/dist/lockstepTransport.js +772 -0
- package/dist/lockstepTransportConfig.js +31 -0
- package/dist/lockstepWireRoster.js +33 -0
- package/dist/matchRoomProvider.js +31 -0
- package/dist/matchRooms.js +18 -0
- package/dist/membershipObserver.js +46 -0
- package/dist/moderation.js +97 -0
- package/dist/movementSpecials.js +103 -0
- package/dist/ownership.js +16 -0
- package/dist/ownershipWithdrawal.js +17 -0
- package/dist/pcg32.js +95 -0
- package/dist/ports.d.ts +1241 -0
- package/dist/ports.js +10 -0
- package/dist/quaternion.js +69 -0
- package/dist/react.d.ts +406 -0
- package/dist/react.js +108 -0
- package/dist/reaper-app/rooms.reaper.workflow.server.tsx +5 -0
- package/dist/reaper-app/rooms.reaper.workflow.tsx +13 -0
- package/dist/reaper.js +242 -0
- package/dist/reaperSchemas.js +41 -0
- package/dist/reaperWorkflow.js +69 -0
- package/dist/recovery.js +188 -0
- package/dist/recoverySeats.js +25 -0
- package/dist/replay.d.ts +273 -0
- package/dist/replay.js +484 -0
- package/dist/replayPorts.js +4 -0
- package/dist/replayRecording.js +66 -0
- package/dist/replaySchema.js +156 -0
- package/dist/replayStorage.d.ts +149 -0
- package/dist/replayStorage.js +484 -0
- package/dist/reservationBatch.js +421 -0
- package/dist/reservationSchemas.js +16 -0
- package/dist/reservations.js +258 -0
- package/dist/reservePort.js +68 -0
- package/dist/resolvedOptions.js +3 -0
- package/dist/room.d.ts +1006 -0
- package/dist/room.js +283 -0
- package/dist/roomAccessSweep.js +94 -0
- package/dist/roomAppCommandControl.js +58 -0
- package/dist/roomAuthoringStrategy.js +16 -0
- package/dist/roomErasure.js +197 -0
- package/dist/roomPoolRuntimeDefaults.js +23 -0
- package/dist/roomPoolSelection.js +18 -0
- package/dist/roomPoolTopology.js +211 -0
- package/dist/rpc.d.ts +551 -0
- package/dist/rpc.js +111 -0
- package/dist/rpcClient.js +151 -0
- package/dist/rpcRoutes.js +27 -0
- package/dist/runtime.js +1122 -0
- package/dist/schemaHistory.js +97 -0
- package/dist/seatStore.js +150 -0
- package/dist/seatStrategyFixtures.js +51 -0
- package/dist/seatSubject.js +31 -0
- package/dist/seats.js +129 -0
- package/dist/serverSession.js +810 -0
- package/dist/serverSessionConfig.js +42 -0
- package/dist/sessionAdmission.js +52 -0
- package/dist/sidecarAdmission.js +102 -0
- package/dist/sidecarConfig.js +115 -0
- package/dist/sidecarConfigPublication.js +63 -0
- package/dist/sidecarHostListener.js +207 -0
- package/dist/sidecarIpc.js +204 -0
- package/dist/sidecarPeer.js +309 -0
- package/dist/sidecarProcessPort.js +27 -0
- package/dist/sidecarRuntime.js +167 -0
- package/dist/sidecarSelection.js +141 -0
- package/dist/sidecarWire.js +177 -0
- package/dist/sidecarWrites.js +162 -0
- package/dist/simulation.d.ts +391 -0
- package/dist/simulation.js +281 -0
- package/dist/simulationAuthoring.js +28 -0
- package/dist/simulationBytes.js +26 -0
- package/dist/simulationConformance.js +304 -0
- package/dist/simulationInputHistoryCapture.js +34 -0
- package/dist/simulationInputHistoryWire.js +192 -0
- package/dist/simulationOptionsWire.js +77 -0
- package/dist/simulationRecoveryWire.js +133 -0
- package/dist/simulationReplay.js +126 -0
- package/dist/simulationSnapshotWire.js +111 -0
- package/dist/simulationState.js +177 -0
- package/dist/snapshotBlob.js +125 -0
- package/dist/snapshotBlobCleanup.js +92 -0
- package/dist/snapshotBlobIndex.js +37 -0
- package/dist/snapshotBudget.js +79 -0
- package/dist/snapshotChain.js +184 -0
- package/dist/snapshotErasure.js +171 -0
- package/dist/snapshotInspection.js +104 -0
- package/dist/snapshotSegmentBlobs.js +57 -0
- package/dist/snapshotUploads.js +165 -0
- package/dist/socketTransport.js +252 -0
- package/dist/spatial.js +103 -0
- package/dist/spectatorPolicy.js +25 -0
- package/dist/spectatorProducer.js +88 -0
- package/dist/startFailureCause.js +3 -0
- package/dist/stateCodec.js +657 -0
- package/dist/strategies.d.ts +210 -0
- package/dist/strategies.js +8 -0
- package/dist/strategiesServer.d.ts +286 -0
- package/dist/strategiesServer.js +11 -0
- package/dist/strategyFixtures.js +181 -0
- package/dist/streamFraming.js +121 -0
- package/dist/streamTransport.js +265 -0
- package/dist/subjectAdmission.js +49 -0
- package/dist/subjectPrivacy.js +280 -0
- package/dist/subjectPrivacyBinding.js +89 -0
- package/dist/systemManifest.js +181 -0
- package/dist/tables.js +158 -0
- package/dist/testHarness.js +88 -0
- package/dist/testing.d.ts +3684 -0
- package/dist/testing.js +220 -0
- package/dist/testingPorts.js +270 -0
- package/dist/testingServer.d.ts +4060 -0
- package/dist/testingServer.js +18 -0
- package/dist/transform.d.ts +692 -0
- package/dist/transform.js +216 -0
- package/dist/transform3d.js +117 -0
- package/dist/transformCollection.js +23 -0
- package/dist/transformCollection3d.js +23 -0
- package/dist/transformCollectionCore.js +155 -0
- package/dist/transformFrames.js +120 -0
- package/dist/transformPrediction3d.js +126 -0
- package/dist/transformRules.js +122 -0
- package/dist/transformSchemas.js +19 -0
- package/dist/transport.js +31 -0
- package/dist/transportAuthoring.js +28 -0
- package/dist/transportCleanup.js +21 -0
- package/dist/transportConformance.js +123 -0
- package/dist/transportConnector.js +81 -0
- package/dist/transportEndpoints.js +37 -0
- package/dist/transportsServer.d.ts +5515 -0
- package/dist/transportsServer.js +6 -0
- package/dist/viewProjection.js +15 -0
- package/dist/web.d.ts +2286 -0
- package/dist/web.js +517 -0
- package/dist/webTransportClient.js +172 -0
- package/dist/wire.d.ts +992 -0
- package/dist/wire.js +491 -0
- package/dist/withdrawalPort.js +27 -0
- package/dist/world.d.ts +1894 -0
- package/dist/world.js +332 -0
- package/dist/worldActorReceipts.js +47 -0
- package/dist/worldActorTransferSnapshot.js +13 -0
- package/dist/worldAdmissionPending.js +7 -0
- package/dist/worldBoundaryCoordinator.js +147 -0
- package/dist/worldCatalog.js +80 -0
- package/dist/worldCellAllocation.js +202 -0
- package/dist/worldCellDestination.js +67 -0
- package/dist/worldCells.js +488 -0
- package/dist/worldChange.js +31 -0
- package/dist/worldClient.js +663 -0
- package/dist/worldClientControl.js +140 -0
- package/dist/worldClientPendingInput.js +15 -0
- package/dist/worldClientRpc.js +132 -0
- package/dist/worldClientRpcRoutes.js +42 -0
- package/dist/worldClientSchemas.js +27 -0
- package/dist/worldCommands.js +139 -0
- package/dist/worldData.js +41 -0
- package/dist/worldDefaultBinding.js +376 -0
- package/dist/worldDefaultGroupAdmission.js +81 -0
- package/dist/worldDefaultGroupAppServices.js +30 -0
- package/dist/worldDefaultGroupCompensation.js +108 -0
- package/dist/worldDefaultGroupContinuation.js +95 -0
- package/dist/worldDefaultGroupControl.js +71 -0
- package/dist/worldDefaultGroupMembers.js +84 -0
- package/dist/worldDefaultGroups.js +20 -0
- package/dist/worldDefaultPending.js +78 -0
- package/dist/worldDefaultService.js +244 -0
- package/dist/worldEntities.js +2979 -0
- package/dist/worldEntityCodec.js +20 -0
- package/dist/worldEntityHandoffView.js +153 -0
- package/dist/worldGeometry.js +169 -0
- package/dist/worldGhostAdmission.js +64 -0
- package/dist/worldGhostDestination.js +117 -0
- package/dist/worldGhostGateway.js +131 -0
- package/dist/worldGhostHandshake.js +107 -0
- package/dist/worldGhostHost.js +41 -0
- package/dist/worldGhostIngress.js +131 -0
- package/dist/worldGhostNeighborhood.js +69 -0
- package/dist/worldGhostNeighbors.js +85 -0
- package/dist/worldGhostOutbound.js +109 -0
- package/dist/worldGhostPublisher.js +215 -0
- package/dist/worldGhostReceiver.js +212 -0
- package/dist/worldGhostSender.js +145 -0
- package/dist/worldGhostSocket.js +77 -0
- package/dist/worldGhostWire.js +171 -0
- package/dist/worldGroupCommand.js +48 -0
- package/dist/worldGroupDeadline.js +114 -0
- package/dist/worldGroupPreparation.js +114 -0
- package/dist/worldGroupReadyControl.js +127 -0
- package/dist/worldGroupSupervisor.js +119 -0
- package/dist/worldHandoffMetrics.js +58 -0
- package/dist/worldHandoffView.js +99 -0
- package/dist/worldHostSource.js +68 -0
- package/dist/worldInspectEndpoint.js +249 -0
- package/dist/worldInspection.js +108 -0
- package/dist/worldInstanceAdmission.js +30 -0
- package/dist/worldInstanceAllocation.js +115 -0
- package/dist/worldInstanceDestination.js +63 -0
- package/dist/worldInstanceExpiry.js +281 -0
- package/dist/worldInstanceExpirySupervisor.js +87 -0
- package/dist/worldInstanceLifecycle.js +102 -0
- package/dist/worldInstanceState.js +51 -0
- package/dist/worldInstances.js +477 -0
- package/dist/worldJoin.js +55 -0
- package/dist/worldLayers.js +150 -0
- package/dist/worldLeases.js +77 -0
- package/dist/worldManifest.js +24 -0
- package/dist/worldMovement.js +62 -0
- package/dist/worldPersistence.js +133 -0
- package/dist/worldProjection.js +220 -0
- package/dist/worldReact.js +109 -0
- package/dist/worldRecoveryActor.js +34 -0
- package/dist/worldReturnAnchor.js +48 -0
- package/dist/worldRoomHooks.js +56 -0
- package/dist/worldRoomPool.js +26 -0
- package/dist/worldRoomSteps.js +132 -0
- package/dist/worldSeatBinding.js +35 -0
- package/dist/worldServer.d.ts +6936 -0
- package/dist/worldServer.js +48 -0
- package/dist/worldSourceSeatPending.js +8 -0
- package/dist/worldStrategyFixtures.js +163 -0
- package/dist/worldTesting.js +26 -0
- package/dist/worldTransitionDefaults.js +197 -0
- package/dist/worldTransitionExecutor.js +518 -0
- package/dist/worldTransitionGroup.js +112 -0
- package/dist/worldTransitionPhysicalSteps.js +39 -0
- package/dist/worldTransitionResolver.js +227 -0
- package/dist/worldTransitionSeatGroup.js +63 -0
- package/dist/worldTransitionSeats.js +259 -0
- package/dist/worldTransitionState.js +94 -0
- package/dist/worldTransitions.js +100 -0
- package/package.json +189 -4
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { BudgetExceeded as e, ProtocolError as t } from "./errors.js";
|
|
2
|
+
import { RoomInputCodec as n } from "./stateCodec.js";
|
|
3
|
+
import { geometryOwnData as r } from "./geometryTileCodec.js";
|
|
4
|
+
import { geometryPersistenceId as i, geometryPersistenceInteger as a } from "./geometryPersistenceData.js";
|
|
5
|
+
import { captureGeometryPreparedBaseline as o, captureGeometryPreparedInventory as s } from "./geometryPrepared.js";
|
|
6
|
+
import { captureGeometryActorFrame as c, makeGeometryActorInventory as l, sealGeometryActivation as u } from "./geometryActorInventory.js";
|
|
7
|
+
import { captureGeometryAssetManifest as d, captureGeometryAssetReadGrant as f, captureGeometryAssetReadRequest as p, captureGeometryAssetReference as m, captureGeometryAssetRoot as h, geometryAssetManifest as g } from "./geometryAssetData.js";
|
|
8
|
+
import { makeGeometryAssetBundle as _ } from "./geometryAssetBundle.js";
|
|
9
|
+
import { geometryClientFieldsAtDistance as v, geometryTransformInterest2D as y, planGeometryClientInterest as b } from "./geometryClientInterest.js";
|
|
10
|
+
import { prepareGeometryClientDelta as x } from "./geometryClientDelta.js";
|
|
11
|
+
import { decodeGeometryChunkHttpScope as S, geometryChunkHttpHeaders as C, geometryChunkHttpQuery as w, geometryChunkHttpResponse as T } from "./geometryChunkHttp.js";
|
|
12
|
+
import { GeometryDeltaFragmentSchema as E, makeGeometryDeltaReceiver as D } from "./geometryChannel.js";
|
|
13
|
+
import { captureRoomClientReliableChannel as O } from "./web.js";
|
|
14
|
+
import { makeRoomGeometryChunkCache as k } from "./geometryClientChunks.js";
|
|
15
|
+
import { defaultGeometryHeightfieldLodStride as A, prepareGeometryHeightfieldLod as j, prepareGeometryRenderLod as M } from "./geometryRenderLod.js";
|
|
16
|
+
import { makeGeometryRenderLodCache as N } from "./geometryRenderCache.js";
|
|
17
|
+
import { captureGeometryStreamManifest as P } from "./geometryManifestData.js";
|
|
18
|
+
import { makeGeometryHttpChunkSource as F } from "./geometryClientHttp.js";
|
|
19
|
+
import { makeRoomGeometrySnapshotSource as I } from "./geometrySnapshotClient.js";
|
|
20
|
+
import { makeRoomConnectionGeometryCache as L, makeRoomConnectionGeometrySnapshotSource as R, prefetchRoomConnectionGeometryCache as z } from "./geometryConnectionClient.js";
|
|
21
|
+
import { makeRoomConnectionGeometryManifestClient as B, makeRoomGeometryManifestClient as V } from "./geometryManifestClient.js";
|
|
22
|
+
import { makeGeometryHttpStaticSource as H, reuseGeometryStaticArtifact as U } from "./geometryClientStatic.js";
|
|
23
|
+
import { makeManifestGeometryChunkSource as W } from "./geometryManifestSource.js";
|
|
24
|
+
import { geometryRpcReadGrants as G, makeGrantedGeometryHttpStaticCache as K, makeGrantedGeometryHttpStaticSource as q } from "./geometryReadClient.js";
|
|
25
|
+
import { makeRoomConnectionGeometryVersionClient as J, makeRoomGeometryVersionClient as Y } from "./geometryVersionClient.js";
|
|
26
|
+
import { geometryRpcAssetGrants as X } from "./geometryAssetClient.js";
|
|
27
|
+
import { makeGrantedGeometryAssetCache as Z } from "./geometryAssetHttp.js";
|
|
28
|
+
import { makeGeometryAdminClient as Q } from "./geometryAdminClient.js";
|
|
29
|
+
// src/geometryClient.ts
|
|
30
|
+
function $() {
|
|
31
|
+
throw new t({ detail: "Room geometry client lost its exact admitted baseline or delivery" });
|
|
32
|
+
}
|
|
33
|
+
var ee = (d, f, p = {}) => {
|
|
34
|
+
let m = s(f), h = l(m), g = m.scope, _ = r(p, [
|
|
35
|
+
"channel",
|
|
36
|
+
"maxQueued",
|
|
37
|
+
"maxQueuedBytes",
|
|
38
|
+
"maxPatchBytes",
|
|
39
|
+
"maxHistory",
|
|
40
|
+
"maxHistoryBytes"
|
|
41
|
+
], []), v = (e, t, n, r) => Object.hasOwn(_, e) ? a(_[e], n, r) : t, y = v("maxQueued", 4, 1, 256), b = v("maxPatchBytes", 262144, 512, 16777216), S = v("maxQueuedBytes", Math.max(1048576, b), 512, 67108864), C = v("maxHistory", 16, 1, 4096), w = v("maxHistoryBytes", Math.max(1048576, b), 512, 67108864), T = Object.hasOwn(_, "channel") ? i(_.channel, 96) : "geometry", k = O(d, T, new n(E).schemaHash), A = k.identity(), j = D({
|
|
42
|
+
maxPending: y,
|
|
43
|
+
maxPatchBytes: b,
|
|
44
|
+
maxPendingBytes: S
|
|
45
|
+
}), M = [], N = /* @__PURE__ */ new Map(), P = [];
|
|
46
|
+
if (!A) return $();
|
|
47
|
+
let F = null, I = null, L = !1, R = !1, z = null, B = () => M.reduce((e, t) => e + t.bytes.length, 0), V = () => [...N.values()].reduce((e, t) => e + t.bytes.length, 0), H = () => !R && JSON.stringify(k.identity()) === JSON.stringify(A), U = (e) => JSON.stringify([e.scope, e.requestId]), W = (e, t) => JSON.stringify(e.receipt) === JSON.stringify(t.receipt) && e.bytes.length === t.bytes.length && e.bytes.every((e, n) => e === t.bytes[n]), G = () => {
|
|
48
|
+
R = !0, j.reset(), M.length = 0, N.clear(), h.close();
|
|
49
|
+
for (let e of P.splice(0)) e();
|
|
50
|
+
}, K = (n) => {
|
|
51
|
+
if (!H()) G();
|
|
52
|
+
else try {
|
|
53
|
+
let t = j.receive(n);
|
|
54
|
+
if (t._tag === "pending") return;
|
|
55
|
+
let r = t.receipt.scope;
|
|
56
|
+
if (r.tenantId !== g.tenantId || r.kind !== g.kind || r.worldId !== g.worldId || r.layerSetId !== g.layerSetId || r.version !== g.version) return $();
|
|
57
|
+
if (M.length >= y) throw new e({
|
|
58
|
+
budget: "geometryClientQueuedOperations",
|
|
59
|
+
limit: y
|
|
60
|
+
});
|
|
61
|
+
if (B() + t.patch.length > S) throw new e({
|
|
62
|
+
budget: "geometryClientQueuedBytes",
|
|
63
|
+
limit: S
|
|
64
|
+
});
|
|
65
|
+
M.push({
|
|
66
|
+
receipt: t.receipt,
|
|
67
|
+
bytes: t.patch
|
|
68
|
+
});
|
|
69
|
+
} catch (n) {
|
|
70
|
+
z = n instanceof e ? n : new t({ detail: "Room geometry reliable delivery could not be admitted" }), G();
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
try {
|
|
74
|
+
if (P.push(k.onMessage(K)), P.push(k.subscribe(() => {
|
|
75
|
+
H() || G();
|
|
76
|
+
})), !H()) return $();
|
|
77
|
+
} catch (e) {
|
|
78
|
+
throw G(), e;
|
|
79
|
+
}
|
|
80
|
+
return Object.freeze({
|
|
81
|
+
at: (e) => H() ? h.at(e) : (G(), $()),
|
|
82
|
+
contains: (e) => H() ? h.contains(e) : (G(), $()),
|
|
83
|
+
observation: () => {
|
|
84
|
+
let e = j.observation();
|
|
85
|
+
return Object.freeze({
|
|
86
|
+
queued: M.length,
|
|
87
|
+
queuedBytes: B(),
|
|
88
|
+
receiving: e.pending,
|
|
89
|
+
receivingBytes: e.accountedBytes,
|
|
90
|
+
history: N.size,
|
|
91
|
+
historyBytes: V(),
|
|
92
|
+
active: L,
|
|
93
|
+
withdrawn: R,
|
|
94
|
+
failed: z !== null,
|
|
95
|
+
generation: h.observation().generation
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
pump: async () => {
|
|
99
|
+
if (z) throw z;
|
|
100
|
+
if (!H() || L) return $();
|
|
101
|
+
L = !0, F = new Promise((e) => {
|
|
102
|
+
I = e;
|
|
103
|
+
});
|
|
104
|
+
let n = 0, r = 0, i = 0;
|
|
105
|
+
try {
|
|
106
|
+
for (; M.length;) {
|
|
107
|
+
let t = M[0], a = U(t.receipt), s = c(h), l = t.receipt.scope, d = {
|
|
108
|
+
cx: l.cx,
|
|
109
|
+
cy: l.cy,
|
|
110
|
+
...l.cz === void 0 ? {} : { cz: l.cz }
|
|
111
|
+
}, f = o(s, d), p = N.get(a);
|
|
112
|
+
if (p) {
|
|
113
|
+
if (!W(p, t) || f.revision < t.receipt.revision || f.revision === t.receipt.revision && (f.artifact.blobSha256 !== t.receipt.blobSha256 || f.artifact.contentSha256 !== t.receipt.contentSha256)) return $();
|
|
114
|
+
M.shift(), r++;
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
if (t.bytes.length > w) throw new e({
|
|
118
|
+
budget: "geometryClientHistoryBytes",
|
|
119
|
+
limit: w
|
|
120
|
+
});
|
|
121
|
+
let m = await x(s, t.receipt, t.bytes, b);
|
|
122
|
+
if (!H() || c(h) !== s) return $();
|
|
123
|
+
let g = h.activate(u(h, s, m, t.receipt));
|
|
124
|
+
for (; N.size >= C || V() + t.bytes.length > w;) {
|
|
125
|
+
let e = N.keys().next().value;
|
|
126
|
+
if (e === void 0) return $();
|
|
127
|
+
N.delete(e);
|
|
128
|
+
}
|
|
129
|
+
N.set(a, t), M.shift(), g ? n++ : i++;
|
|
130
|
+
}
|
|
131
|
+
return Object.freeze({
|
|
132
|
+
applied: n,
|
|
133
|
+
duplicates: r,
|
|
134
|
+
unchanged: i
|
|
135
|
+
});
|
|
136
|
+
} catch (n) {
|
|
137
|
+
throw z = n instanceof e ? n : new t({ detail: "Room geometry baseline or native application requires explicit recovery" }), z;
|
|
138
|
+
} finally {
|
|
139
|
+
L = !1, I?.(), I = null, F = null;
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
close: async () => {
|
|
143
|
+
let e = F;
|
|
144
|
+
G(), e && await e;
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
export { d as captureGeometryAssetManifest, f as captureGeometryAssetReadGrant, p as captureGeometryAssetReadRequest, m as captureGeometryAssetReference, h as captureGeometryAssetRoot, P as captureGeometryStreamManifest, S as decodeGeometryChunkHttpScope, A as defaultGeometryHeightfieldLodStride, g as geometryAssetManifest, C as geometryChunkHttpHeaders, w as geometryChunkHttpQuery, T as geometryChunkHttpResponse, v as geometryClientFieldsAtDistance, X as geometryRpcAssetGrants, G as geometryRpcReadGrants, y as geometryTransformInterest2D, Q as makeGeometryAdminClient, _ as makeGeometryAssetBundle, F as makeGeometryHttpChunkSource, H as makeGeometryHttpStaticSource, N as makeGeometryRenderLodCache, Z as makeGrantedGeometryAssetCache, K as makeGrantedGeometryHttpStaticCache, q as makeGrantedGeometryHttpStaticSource, W as makeManifestGeometryChunkSource, L as makeRoomConnectionGeometryCache, B as makeRoomConnectionGeometryManifestClient, R as makeRoomConnectionGeometrySnapshotSource, J as makeRoomConnectionGeometryVersionClient, k as makeRoomGeometryChunkCache, ee as makeRoomGeometryClient, V as makeRoomGeometryManifestClient, I as makeRoomGeometrySnapshotSource, Y as makeRoomGeometryVersionClient, b as planGeometryClientInterest, z as prefetchRoomConnectionGeometryCache, j as prepareGeometryHeightfieldLod, M as prepareGeometryRenderLod, U as reuseGeometryStaticArtifact };
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import { BudgetExceeded as e, ProtocolError as t } from "./errors.js";
|
|
2
|
+
import { captureSimulationBytes as n } from "./simulationBytes.js";
|
|
3
|
+
import { RoomInputCodec as r } from "./stateCodec.js";
|
|
4
|
+
import { geometryOwnData as i } from "./geometryTileCodec.js";
|
|
5
|
+
import { verifyGeometryArtifact as a } from "./geometryArtifacts.js";
|
|
6
|
+
import { assertGeometryArtifactScope as o, captureGeometryCodecProfiles as s, captureGeometryDense as c, captureGeometryPersistenceScope as l, geometryPersistenceId as u, geometryPersistenceInteger as d } from "./geometryPersistenceData.js";
|
|
7
|
+
import { captureGeometryPreparedBaseline as f, captureGeometryPreparedCoordinate as p, captureGeometryPreparedScope as m, prepareGeometryInventory as ee } from "./geometryPrepared.js";
|
|
8
|
+
import { planGeometryClientInterest as h } from "./geometryClientInterest.js";
|
|
9
|
+
import { prepareGeometryClientDelta as g } from "./geometryClientDelta.js";
|
|
10
|
+
import { GeometryDeltaFragmentSchema as _, captureGeometryDeltaFragment as v, makeGeometryDeltaReceiver as y } from "./geometryChannel.js";
|
|
11
|
+
import { captureRoomClientReliableChannel as te } from "./web.js";
|
|
12
|
+
import { geometryChunkHasWorldExtent as ne } from "./geometryWorldExtent.js";
|
|
13
|
+
import { captureWorldCatalog as re } from "./world.js";
|
|
14
|
+
// src/geometryClientChunks.ts
|
|
15
|
+
var b = /* @__PURE__ */ new WeakMap();
|
|
16
|
+
function x() {
|
|
17
|
+
throw new t({ detail: "Room geometry chunk cache requires its exact current admission and actual verified source" });
|
|
18
|
+
}
|
|
19
|
+
var S = (S, ie, ae, C, oe = {}) => {
|
|
20
|
+
let w = re([ie])[0], T = m(ae), E = w.geometry;
|
|
21
|
+
if (!E || T.worldId !== w.name || T.kind !== E.kind) return x();
|
|
22
|
+
let D = i(oe, [
|
|
23
|
+
"channel",
|
|
24
|
+
"maxCachedChunks",
|
|
25
|
+
"maxConcurrent",
|
|
26
|
+
"maxCacheBytes",
|
|
27
|
+
"maxStagedBytes",
|
|
28
|
+
"maxChunkBytes",
|
|
29
|
+
"maxPendingDeltas",
|
|
30
|
+
"maxQueuedDeltaBytes",
|
|
31
|
+
"codecLimits"
|
|
32
|
+
], []), O = (e, t, n, r) => Object.hasOwn(D, e) ? d(D[e], n, r) : t, k = O("maxCachedChunks", E.streaming.client.maxCachedChunks, 1, E.streaming.client.maxCachedChunks), se = O("maxConcurrent", Math.min(E.streaming.client.maxConcurrent, k), 1, Math.min(E.streaming.client.maxConcurrent, k)), A = O("maxCacheBytes", E.budgets.maxPreparedBytes, 512, E.budgets.maxPreparedBytes), j = O("maxStagedBytes", A, 512, E.budgets.maxPreparedBytes), ce = O("maxChunkBytes", Math.min(16777216, j), 512, Math.min(16777216, j)), le = (Object.hasOwn(D, "codecLimits") ? s(D.codecLimits) : /* @__PURE__ */ new Map()).get(T.kind) ?? {}, ue = O("maxPendingDeltas", 64, 1, 256), de = E.dynamic.maxDeltaBytesPerChunk, fe = O("maxQueuedDeltaBytes", Math.min(1048576, j), 512, Math.min(67108864, j)), pe = Object.hasOwn(D, "channel") ? u(D.channel, 96) : "geometry", M = te(S, pe, new r(_).schemaHash), me = M.identity();
|
|
33
|
+
if (!me) return x();
|
|
34
|
+
let he = i(C, ["load"]);
|
|
35
|
+
if (typeof he.load != "function") return x();
|
|
36
|
+
let ge = he.load.bind(C), _e = new AbortController(), N = [], P = y({
|
|
37
|
+
maxPending: ue,
|
|
38
|
+
maxPatchBytes: de,
|
|
39
|
+
maxPendingBytes: fe
|
|
40
|
+
}), F = [], I = /* @__PURE__ */ new Map(), ve = () => F.reduce((e, t) => e + t.patch.length, 0), L = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Set(), z = /* @__PURE__ */ new Map(), B = !1, V = !1, H = 0, U = 0, W = null, G = null, K = (e) => ({
|
|
41
|
+
cx: e.cx,
|
|
42
|
+
cy: e.cy,
|
|
43
|
+
...e.cz === void 0 ? {} : { cz: e.cz }
|
|
44
|
+
}), q = (e) => JSON.stringify([
|
|
45
|
+
e.cx,
|
|
46
|
+
e.cy,
|
|
47
|
+
e.cz ?? null
|
|
48
|
+
]), ye = () => !V && JSON.stringify(M.identity()) === JSON.stringify(me), J = () => {
|
|
49
|
+
V = !0, _e.abort(), P.reset(), I.clear(), F.length = 0, z.clear(), L.clear(), R.clear();
|
|
50
|
+
for (let e of N.splice(0)) e();
|
|
51
|
+
}, Y = () => {
|
|
52
|
+
if (!ye()) return J(), x();
|
|
53
|
+
}, X = (e) => [...e.values()].reduce((e, t) => e + t.inventory.accountedBytes, 0), Z = (e, t) => {
|
|
54
|
+
let n = L.get(e), r = {
|
|
55
|
+
cx: t.scope.cx,
|
|
56
|
+
cy: t.scope.cy,
|
|
57
|
+
...t.scope.cz === void 0 ? {} : { cz: t.scope.cz }
|
|
58
|
+
}, i = t.inventory.at(r);
|
|
59
|
+
return !n || i.revision > n.revision || i.revision === n.revision && i.blobSha256 === n.blobSha256 && i.contentSha256 === n.contentSha256;
|
|
60
|
+
}, Q = () => {
|
|
61
|
+
for (let e of L.keys()) !z.has(e) && !R.has(e) && L.delete(e);
|
|
62
|
+
for (let [e, t] of I) !z.has(e) && !R.has(e) && (P.drop(t.scope, t.requestId), I.delete(e));
|
|
63
|
+
}, be = (t) => {
|
|
64
|
+
if (!ye()) J();
|
|
65
|
+
else try {
|
|
66
|
+
let n = v(t, { maxPatchBytes: de }), r = n.receipt, i = r.scope;
|
|
67
|
+
if (i.tenantId !== T.tenantId || i.kind !== T.kind || i.worldId !== T.worldId || i.layerSetId !== T.layerSetId || i.version !== T.version) return x();
|
|
68
|
+
let a = q(i);
|
|
69
|
+
if (!z.has(a) && !R.has(a)) return;
|
|
70
|
+
let o = L.get(a), s = z.get(a)?.inventory.at(K(i));
|
|
71
|
+
if (s && r.revision < s.revision || o && r.revision < o.revision) return;
|
|
72
|
+
if (o && r.revision === o.revision && (r.blobSha256 !== o.blobSha256 || r.contentSha256 !== o.contentSha256) || s && r.revision === s.revision && (r.blobSha256 !== s.blobSha256 || r.contentSha256 !== s.contentSha256)) return x();
|
|
73
|
+
L.set(a, {
|
|
74
|
+
revision: r.revision,
|
|
75
|
+
blobSha256: r.blobSha256,
|
|
76
|
+
contentSha256: r.contentSha256
|
|
77
|
+
});
|
|
78
|
+
let c = I.get(a);
|
|
79
|
+
c && c.requestId !== r.requestId && (P.drop(c.scope, c.requestId), I.delete(a));
|
|
80
|
+
let l = P.receive(n);
|
|
81
|
+
if (l._tag === "pending" ? I.set(a, {
|
|
82
|
+
scope: i,
|
|
83
|
+
requestId: r.requestId,
|
|
84
|
+
revision: r.revision
|
|
85
|
+
}) : I.delete(a), l._tag === "complete") {
|
|
86
|
+
if (F.length >= ue) throw new e({
|
|
87
|
+
budget: "geometryClientPendingDeltas",
|
|
88
|
+
limit: ue
|
|
89
|
+
});
|
|
90
|
+
if (ve() + l.patch.length > fe) throw new e({
|
|
91
|
+
budget: "geometryClientQueuedDeltaBytes",
|
|
92
|
+
limit: fe
|
|
93
|
+
});
|
|
94
|
+
F.push({
|
|
95
|
+
receipt: l.receipt,
|
|
96
|
+
patch: l.patch
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
} catch {
|
|
100
|
+
J();
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
try {
|
|
104
|
+
N.push(M.onMessage(be)), N.push(M.subscribe(() => {
|
|
105
|
+
ye() || J();
|
|
106
|
+
})), Y();
|
|
107
|
+
} catch (e) {
|
|
108
|
+
throw J(), e;
|
|
109
|
+
}
|
|
110
|
+
let $ = async (r, s) => {
|
|
111
|
+
if (Y(), B) return x();
|
|
112
|
+
let u = c(r, k, (e) => p(T, e)), f = /* @__PURE__ */ new Set();
|
|
113
|
+
for (let e of u) {
|
|
114
|
+
if (f.has(q(e))) return x();
|
|
115
|
+
f.add(q(e));
|
|
116
|
+
}
|
|
117
|
+
if (!u.length) return x();
|
|
118
|
+
let m = u.filter((e) => s || !z.has(q(e)) || !Z(q(e), z.get(q(e)))), h = /* @__PURE__ */ new Map();
|
|
119
|
+
for (let e of f) R.add(e);
|
|
120
|
+
B = !0;
|
|
121
|
+
let g;
|
|
122
|
+
W = new Promise((e) => {
|
|
123
|
+
g = e;
|
|
124
|
+
});
|
|
125
|
+
let _ = 0, v = !1, y, te = async () => {
|
|
126
|
+
for (; !v && _ < m.length;) {
|
|
127
|
+
let t = m[_++];
|
|
128
|
+
try {
|
|
129
|
+
Y();
|
|
130
|
+
let r = ge(t, _e.signal);
|
|
131
|
+
if (!(r instanceof Promise)) return x();
|
|
132
|
+
let s = i(await r, [
|
|
133
|
+
"scope",
|
|
134
|
+
"revision",
|
|
135
|
+
"bytes",
|
|
136
|
+
"blobSha256",
|
|
137
|
+
"contentSha256"
|
|
138
|
+
]), c = l(s.scope), u = d(s.revision), f = n(s.bytes, ce, "geometryClientChunkBytes");
|
|
139
|
+
if (JSON.stringify(c) !== JSON.stringify(t)) return x();
|
|
140
|
+
let p = await a(T.kind, f, s.blobSha256, le);
|
|
141
|
+
if (Y(), o(p, t), p.contentSha256 !== s.contentSha256 || !ne(p, E.chunkSizeRaw)) return x();
|
|
142
|
+
let m = ee(T, [{
|
|
143
|
+
scope: t,
|
|
144
|
+
revision: u,
|
|
145
|
+
artifact: p
|
|
146
|
+
}], {
|
|
147
|
+
maxChunks: 1,
|
|
148
|
+
maxAccountedBytes: j,
|
|
149
|
+
codecLimits: { [T.kind]: le }
|
|
150
|
+
});
|
|
151
|
+
if (U + m.accountedBytes > j) throw new e({
|
|
152
|
+
budget: "geometryClientStagedBytes",
|
|
153
|
+
limit: j
|
|
154
|
+
});
|
|
155
|
+
let g = q(t), _ = z.get(g)?.inventory.at(K(t)), v = {
|
|
156
|
+
scope: t,
|
|
157
|
+
inventory: m
|
|
158
|
+
};
|
|
159
|
+
if (_ && (u < _.revision || u === _.revision && (p.blobSha256 !== _.blobSha256 || p.contentSha256 !== _.contentSha256)) || !Z(g, v)) return x();
|
|
160
|
+
h.set(g, v), H++, U += m.accountedBytes;
|
|
161
|
+
} catch (e) {
|
|
162
|
+
v || (v = !0, y = e);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
try {
|
|
167
|
+
if (await Promise.all(Array.from({ length: Math.min(se, m.length) }, () => te())), v) throw y;
|
|
168
|
+
Y();
|
|
169
|
+
let t = new Map(z);
|
|
170
|
+
for (let e of u) {
|
|
171
|
+
let n = q(e), r = h.get(n) ?? t.get(n);
|
|
172
|
+
if (!r || !Z(n, r)) return x();
|
|
173
|
+
t.delete(n), t.set(n, r);
|
|
174
|
+
}
|
|
175
|
+
for (; t.size > k || X(t) > A;) {
|
|
176
|
+
let n = [...t.keys()].find((e) => !f.has(e));
|
|
177
|
+
if (n === void 0) throw new e({
|
|
178
|
+
budget: "geometryClientCacheBytes",
|
|
179
|
+
limit: A
|
|
180
|
+
});
|
|
181
|
+
t.delete(n);
|
|
182
|
+
}
|
|
183
|
+
z = t, Q();
|
|
184
|
+
} catch (n) {
|
|
185
|
+
throw n instanceof e ? n : new t({ detail: "Complete verified client geometry download remains unavailable" });
|
|
186
|
+
} finally {
|
|
187
|
+
B = !1, H = 0, U = 0, h.clear(), R.clear(), Q(), g?.(), W = null;
|
|
188
|
+
}
|
|
189
|
+
}, xe = async () => {
|
|
190
|
+
if (Y(), B) return x();
|
|
191
|
+
B = !0;
|
|
192
|
+
let n;
|
|
193
|
+
W = new Promise((e) => {
|
|
194
|
+
n = e;
|
|
195
|
+
});
|
|
196
|
+
let r = 0, i = 0, a = 0, o = /* @__PURE__ */ new Map();
|
|
197
|
+
try {
|
|
198
|
+
for (; F.length;) {
|
|
199
|
+
Y();
|
|
200
|
+
let t = F[0], n = t.receipt.scope, s = q(n), c = z.get(s), l = {
|
|
201
|
+
cx: n.cx,
|
|
202
|
+
cy: n.cy,
|
|
203
|
+
...n.cz === void 0 ? {} : { cz: n.cz }
|
|
204
|
+
};
|
|
205
|
+
if (!c) {
|
|
206
|
+
F.shift(), a++;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
let u = c.inventory.at(l);
|
|
210
|
+
if (u.revision > t.receipt.revision) {
|
|
211
|
+
F.shift(), a++;
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
if (u.revision === t.receipt.revision) {
|
|
215
|
+
if (u.blobSha256 !== t.receipt.blobSha256 || u.contentSha256 !== t.receipt.contentSha256) return x();
|
|
216
|
+
F.shift(), i++;
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
if (u.revision !== t.receipt.baseRevision) {
|
|
220
|
+
o.set(s, l), F.shift();
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
let d = await g(c.inventory, t.receipt, t.patch, de);
|
|
224
|
+
if (Y(), z.get(s) !== c || !ne(f(d, l).artifact, E.chunkSizeRaw)) return x();
|
|
225
|
+
let p = new Map(z);
|
|
226
|
+
for (p.delete(s), p.set(s, {
|
|
227
|
+
scope: n,
|
|
228
|
+
inventory: d
|
|
229
|
+
}); X(p) > A;) {
|
|
230
|
+
let t = [...p.keys()].find((e) => e !== s);
|
|
231
|
+
if (t === void 0) throw new e({
|
|
232
|
+
budget: "geometryClientCacheBytes",
|
|
233
|
+
limit: A
|
|
234
|
+
});
|
|
235
|
+
p.delete(t);
|
|
236
|
+
}
|
|
237
|
+
z = p, F.shift(), r++, Q();
|
|
238
|
+
}
|
|
239
|
+
return Object.freeze({
|
|
240
|
+
applied: r,
|
|
241
|
+
duplicates: i,
|
|
242
|
+
obsolete: a,
|
|
243
|
+
recovery: Object.freeze([...o.values()].map((e) => Object.freeze(e)))
|
|
244
|
+
});
|
|
245
|
+
} catch (n) {
|
|
246
|
+
throw n instanceof e ? n : new t({ detail: "Native streamed geometry Delta requires explicit source recovery" });
|
|
247
|
+
} finally {
|
|
248
|
+
B = !1, n?.(), W = null;
|
|
249
|
+
}
|
|
250
|
+
}, Se = (e, t = {}) => {
|
|
251
|
+
try {
|
|
252
|
+
if (Y(), B || G) return x();
|
|
253
|
+
let n = i(t, [
|
|
254
|
+
"maxChunks",
|
|
255
|
+
"maxVisitedCoordinates",
|
|
256
|
+
"velocity"
|
|
257
|
+
], []), r = Object.hasOwn(n, "maxChunks") ? d(n.maxChunks, 1, k) : k, a = h(w, T, e, {
|
|
258
|
+
...n,
|
|
259
|
+
maxChunks: r
|
|
260
|
+
}), o = Promise.resolve().then(async () => {
|
|
261
|
+
Y(), await xe();
|
|
262
|
+
let e = a.chunks.filter((e) => e.role === "visible").map((e) => e.coordinate);
|
|
263
|
+
await $(e, !1), Y(), a.chunks.length > e.length && await $(a.chunks.map((e) => e.coordinate), !1), Y();
|
|
264
|
+
let t = new Set(a.chunks.map((e) => q(e.coordinate))), n = (e) => Math.max(Math.abs(e.cx - a.center.cx), Math.abs(e.cy - a.center.cy), Math.abs((e.cz ?? 0) - (a.center.cz ?? 0)));
|
|
265
|
+
for (let [e, r] of z) !t.has(e) && n(r.scope) > a.radiusChunks + 2 && z.delete(e);
|
|
266
|
+
return Q(), a;
|
|
267
|
+
});
|
|
268
|
+
return G = o, o.then(() => {
|
|
269
|
+
G = null;
|
|
270
|
+
}, () => {
|
|
271
|
+
G = null;
|
|
272
|
+
}), o;
|
|
273
|
+
} catch (e) {
|
|
274
|
+
return Promise.reject(e);
|
|
275
|
+
}
|
|
276
|
+
}, Ce = (e) => G ? Promise.reject(new t({ detail: "Geometry render streaming already owns the cache operation" })) : e(), we = Object.freeze({
|
|
277
|
+
observation: () => Object.freeze({
|
|
278
|
+
cached: z.size,
|
|
279
|
+
accountedBytes: X(z),
|
|
280
|
+
staged: H,
|
|
281
|
+
stagedBytes: U,
|
|
282
|
+
active: B || G !== null,
|
|
283
|
+
withdrawn: V,
|
|
284
|
+
stale: [...z].filter(([e, t]) => !Z(e, t)).length,
|
|
285
|
+
queuedDeltas: F.length,
|
|
286
|
+
queuedDeltaBytes: ve(),
|
|
287
|
+
receiving: P.observation().pending,
|
|
288
|
+
receivingBytes: P.observation().accountedBytes
|
|
289
|
+
}),
|
|
290
|
+
contains: (e) => {
|
|
291
|
+
Y();
|
|
292
|
+
let t = q(p(T, e)), n = z.get(t);
|
|
293
|
+
return n !== void 0 && Z(t, n);
|
|
294
|
+
},
|
|
295
|
+
at: (e) => {
|
|
296
|
+
Y();
|
|
297
|
+
let t = p(T, e), n = q(t), r = z.get(n);
|
|
298
|
+
return !r || !Z(n, r) ? x() : (z.delete(n), z.set(n, r), r.inventory.at(K(t)));
|
|
299
|
+
},
|
|
300
|
+
pump: () => Ce(xe),
|
|
301
|
+
stream: Se,
|
|
302
|
+
request: (e) => Ce(() => $(e, !1)),
|
|
303
|
+
refresh: (e) => Ce(() => $(e, !0)),
|
|
304
|
+
close: async () => {
|
|
305
|
+
let e = W, t = G;
|
|
306
|
+
J(), e && await e, t && await t.catch(() => void 0);
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
return b.set(we, {
|
|
310
|
+
session: S,
|
|
311
|
+
root: T,
|
|
312
|
+
artifactAt: (e) => {
|
|
313
|
+
Y();
|
|
314
|
+
let t = p(T, e), n = q(t), r = z.get(n);
|
|
315
|
+
return !r || !Z(n, r) ? x() : f(r.inventory, K(t)).artifact;
|
|
316
|
+
}
|
|
317
|
+
}), we;
|
|
318
|
+
}, ie = (e, t, n) => {
|
|
319
|
+
if (!e || typeof e != "object") return x();
|
|
320
|
+
let r = b.get(e);
|
|
321
|
+
if (!r || r.session !== t || n !== void 0 && r.root.worldId !== n) return x();
|
|
322
|
+
let i = e;
|
|
323
|
+
return i.observation().withdrawn ? x() : i;
|
|
324
|
+
}, ae = (e) => !e || typeof e != "object" || !b.has(e) ? x() : e, C = (e) => !e || typeof e != "object" ? x() : b.get(e)?.root ?? x(), oe = (e, t) => {
|
|
325
|
+
if (!e || typeof e != "object") return x();
|
|
326
|
+
let n = b.get(e);
|
|
327
|
+
return n ? n.artifactAt(t) : x();
|
|
328
|
+
};
|
|
329
|
+
export { ae as captureOwnedRoomGeometryChunkCache, ie as captureRoomGeometryChunkCache, oe as captureRoomGeometryChunkCacheArtifact, C as captureRoomGeometryChunkCacheRoot, S as makeRoomGeometryChunkCache };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ProtocolError as e } from "./errors.js";
|
|
2
|
+
import { captureGeometryReceipt as t, geometryPersistenceInteger as n } from "./geometryPersistenceData.js";
|
|
3
|
+
import { captureGeometryPreparedBaseline as r, captureGeometryPreparedInventory as i, captureGeometryPreparedProfile as a, deriveGeometryPreparedInventory as o } from "./geometryPrepared.js";
|
|
4
|
+
import { applyGeometryPatch as s, decodeGeometryPatch as c } from "./geometryPatch.js";
|
|
5
|
+
// src/geometryClientDelta.ts
|
|
6
|
+
var l = async (l, u, d, f) => {
|
|
7
|
+
let p = i(l), m = t(u), h = m.scope, g = n(f, 512, 16777216), _ = {
|
|
8
|
+
cx: h.cx,
|
|
9
|
+
cy: h.cy,
|
|
10
|
+
...h.cz === void 0 ? {} : { cz: h.cz }
|
|
11
|
+
}, v = r(p, _), y = p.scope, b = c(d, {
|
|
12
|
+
maxBytes: g,
|
|
13
|
+
maxMetadataBytes: Math.min(4096, g - 16)
|
|
14
|
+
}), x = b.metadata;
|
|
15
|
+
if (h.tenantId !== y.tenantId || h.kind !== y.kind || h.worldId !== y.worldId || h.layerSetId !== y.layerSetId || h.version !== y.version || JSON.stringify(v.scope) !== JSON.stringify(h) || v.revision !== m.baseRevision || x.kind !== h.kind || x.worldId !== h.worldId || x.layerSetId !== h.layerSetId || x.version !== h.version || x.cx !== h.cx || x.cy !== h.cy || x.cz !== h.cz || x.baseRevision !== m.baseRevision || x.revision !== m.revision || x.changed !== m.changed || x.blobSha256 !== m.blobSha256 || x.contentSha256 !== m.contentSha256) throw new e({ detail: "Native geometry client Delta does not match its exact admitted baseline and receipt" });
|
|
16
|
+
let S = await s(v.artifact, b, v.revision, a(p));
|
|
17
|
+
if (S.revision !== m.revision || S.artifact.blobSha256 !== m.blobSha256 || S.artifact.contentSha256 !== m.contentSha256) throw new e({ detail: "Native geometry client Delta digest or revision requires explicit recovery" });
|
|
18
|
+
return m.changed ? o(p, {
|
|
19
|
+
scope: h,
|
|
20
|
+
revision: S.revision,
|
|
21
|
+
artifact: S.artifact
|
|
22
|
+
}) : p;
|
|
23
|
+
};
|
|
24
|
+
export { l as prepareGeometryClientDelta };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ProtocolError as e } from "./errors.js";
|
|
2
|
+
import { geometryOwnData as t } from "./geometryTileCodec.js";
|
|
3
|
+
import { captureGeometryPersistenceScope as n, geometryPersistenceInteger as r } from "./geometryPersistenceData.js";
|
|
4
|
+
import { decodeGeometryChunkHttpScope as i, geometryChunkHttpHeaders as a } from "./geometryChunkHttp.js";
|
|
5
|
+
import { readGeometryHttp as o } from "./geometryHttpBody.js";
|
|
6
|
+
// src/geometryClientHttp.ts
|
|
7
|
+
var s = () => new e({ detail: "Authorized native geometry HTTP download remains unavailable" }), c = (e, t, n) => {
|
|
8
|
+
if (e === null || !/^(0|[1-9][0-9]{0,15})$/.test(e)) throw s();
|
|
9
|
+
return r(Number(e), t, n);
|
|
10
|
+
}, l = (e) => {
|
|
11
|
+
let l = t(e, [
|
|
12
|
+
"urlFor",
|
|
13
|
+
"fetch",
|
|
14
|
+
"maxResponseBytes",
|
|
15
|
+
"maxReadChunks"
|
|
16
|
+
], ["urlFor"]), u = Object.hasOwn(l, "maxResponseBytes") ? r(l.maxResponseBytes, 512, 16777216) : 16777216, d = Object.hasOwn(l, "maxReadChunks") ? r(l.maxReadChunks, 1, 65536) : 4096;
|
|
17
|
+
if (typeof l.urlFor != "function" || Object.hasOwn(l, "fetch") && typeof l.fetch != "function" || !Object.hasOwn(l, "fetch") && typeof globalThis.fetch != "function") throw s();
|
|
18
|
+
let f = l.urlFor.bind(e), p = Object.hasOwn(l, "fetch") ? l.fetch.bind(e) : globalThis.fetch.bind(globalThis);
|
|
19
|
+
return Object.freeze({ load: async (e, t) => {
|
|
20
|
+
let r = n(e), l = await o(() => f(r), p, t, u, d, (e) => {
|
|
21
|
+
let t = i(e.headers.get(a.scope)), n = c(e.headers.get(a.revision), 0, 2 ** 53 - 1), o = e.headers.get("etag"), l = e.headers.get(a.contentSha256);
|
|
22
|
+
if (JSON.stringify(t) !== JSON.stringify(r) || o === null || !/^"[a-f0-9]{64}"$/.test(o) || l === null || !/^[a-f0-9]{64}$/.test(l)) throw s();
|
|
23
|
+
return {
|
|
24
|
+
scope: t,
|
|
25
|
+
revision: n,
|
|
26
|
+
blobSha256: o.slice(1, -1),
|
|
27
|
+
contentSha256: l
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
return Object.freeze({
|
|
31
|
+
...l.metadata,
|
|
32
|
+
bytes: l.bytes
|
|
33
|
+
});
|
|
34
|
+
} });
|
|
35
|
+
};
|
|
36
|
+
export { l as makeGeometryHttpChunkSource };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { BudgetExceeded as e, ProtocolError as t } from "./errors.js";
|
|
2
|
+
import { geometryOwnData as n } from "./geometryTileCodec.js";
|
|
3
|
+
import { geometryPersistenceInteger as r } from "./geometryPersistenceData.js";
|
|
4
|
+
import { captureGeometryPreparedCoordinate as i, captureGeometryPreparedScope as a } from "./geometryPrepared.js";
|
|
5
|
+
import { captureWorldCatalog as o } from "./world.js";
|
|
6
|
+
// src/geometryClientInterest.ts
|
|
7
|
+
function s() {
|
|
8
|
+
throw new t({ detail: "Client geometry interest requires its genuine World, exact root and bounded render focus" });
|
|
9
|
+
}
|
|
10
|
+
var c = (t, c, l, d = {}) => {
|
|
11
|
+
let f = o([t])[0], p = a(c), m = f.geometry;
|
|
12
|
+
if (!m || p.worldId !== f.name || p.kind !== m.kind) return s();
|
|
13
|
+
let h = p.kind === "3d-voxel" || p.kind === "3d-shapes", g = n(l, h ? [
|
|
14
|
+
"xRaw",
|
|
15
|
+
"yRaw",
|
|
16
|
+
"zRaw"
|
|
17
|
+
] : ["xRaw", "yRaw"]), _ = r(g.xRaw, -2147483648, 2147483647), v = r(g.yRaw, -2147483648, 2147483647), y = h ? r(g.zRaw, -2147483648, 2147483647) : void 0, b = n(d, [
|
|
18
|
+
"maxChunks",
|
|
19
|
+
"maxVisitedCoordinates",
|
|
20
|
+
"velocity"
|
|
21
|
+
], []), x = Object.hasOwn(b, "maxChunks") ? r(b.maxChunks, 1, m.streaming.client.maxCachedChunks) : m.streaming.client.maxCachedChunks, S = Object.hasOwn(b, "maxVisitedCoordinates") ? r(b.maxVisitedCoordinates, 1, 33554432) : 65536, C = Object.hasOwn(b, "velocity") ? n(b.velocity, h ? [
|
|
22
|
+
"xRaw",
|
|
23
|
+
"yRaw",
|
|
24
|
+
"zRaw"
|
|
25
|
+
] : ["xRaw", "yRaw"]) : null, w = C ? r(C.xRaw, -2147483648, 2147483647) : 0, T = C ? r(C.yRaw, -2147483648, 2147483647) : 0, E = C && h ? r(C.zRaw, -2147483648, 2147483647) : 0, D = m.streaming.client.radiusChunks, O = m.streaming.client.prefetchChunks, k = (O * 2 + 1) ** (h ? 3 : 2), A = Math.floor(_ / m.chunkSizeRaw), j = Math.floor(v / m.chunkSizeRaw), M = y === void 0 ? void 0 : Math.floor(y / m.chunkSizeRaw), N = _ / 65536, P = v / 65536;
|
|
26
|
+
if (N < f.map.bounds[0][0] || N >= f.map.bounds[1][0] || P < f.map.bounds[0][1] || P >= f.map.bounds[1][1]) return s();
|
|
27
|
+
if (k > S) throw new e({
|
|
28
|
+
budget: "geometryClientInterestCoordinates",
|
|
29
|
+
limit: S
|
|
30
|
+
});
|
|
31
|
+
let F = i(p, {
|
|
32
|
+
cx: A,
|
|
33
|
+
cy: j,
|
|
34
|
+
...M === void 0 ? {} : { cz: M }
|
|
35
|
+
}), I = [], L = /* @__PURE__ */ new Map(), R = (e) => {
|
|
36
|
+
let t = L.get(e);
|
|
37
|
+
if (t) return t;
|
|
38
|
+
let n = u(f, e);
|
|
39
|
+
return L.set(e, n), n;
|
|
40
|
+
};
|
|
41
|
+
for (let e = h ? -O : 0; e <= (h ? O : 0); e++) for (let t = -O; t <= O; t++) for (let n = -O; n <= O; n++) {
|
|
42
|
+
let r = i(p, {
|
|
43
|
+
cx: A + n,
|
|
44
|
+
cy: j + t,
|
|
45
|
+
...M === void 0 ? {} : { cz: M + e }
|
|
46
|
+
}), a = r.cx * m.chunkSize, o = r.cy * m.chunkSize, s = a + m.chunkSize, c = o + m.chunkSize;
|
|
47
|
+
if (s <= f.map.bounds[0][0] || a >= f.map.bounds[1][0] || c <= f.map.bounds[0][1] || o >= f.map.bounds[1][1]) continue;
|
|
48
|
+
let l = Math.max(Math.abs(n), Math.abs(t), Math.abs(e));
|
|
49
|
+
I.push(Object.freeze({
|
|
50
|
+
coordinate: Object.freeze({
|
|
51
|
+
cx: r.cx,
|
|
52
|
+
cy: r.cy,
|
|
53
|
+
...r.cz === void 0 ? {} : { cz: r.cz }
|
|
54
|
+
}),
|
|
55
|
+
distanceChunks: l,
|
|
56
|
+
role: l <= D ? "visible" : "prefetch",
|
|
57
|
+
fields: R(l)
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
let z = (e) => (e.coordinate.cx - A) * w + (e.coordinate.cy - j) * T + ((e.coordinate.cz ?? 0) - (M ?? 0)) * E, B = (e) => (e.coordinate.cx - A) ** 2 + (e.coordinate.cy - j) ** 2 + ((e.coordinate.cz ?? 0) - (M ?? 0)) ** 2;
|
|
61
|
+
if (I.sort((e, t) => e.distanceChunks - t.distanceChunks || (e.role === "prefetch" && t.role === "prefetch" ? z(t) - z(e) || (w || T || E ? B(e) - B(t) : 0) : 0) || e.coordinate.cx - t.coordinate.cx || e.coordinate.cy - t.coordinate.cy || (e.coordinate.cz ?? 0) - (t.coordinate.cz ?? 0)), I.filter((e) => e.role === "visible").length > x) throw new e({
|
|
62
|
+
budget: "geometryClientVisibleChunks",
|
|
63
|
+
limit: x
|
|
64
|
+
});
|
|
65
|
+
let V = I.slice(0, x);
|
|
66
|
+
return Object.freeze({
|
|
67
|
+
scope: p,
|
|
68
|
+
center: Object.freeze({
|
|
69
|
+
cx: F.cx,
|
|
70
|
+
cy: F.cy,
|
|
71
|
+
...F.cz === void 0 ? {} : { cz: F.cz }
|
|
72
|
+
}),
|
|
73
|
+
radiusChunks: D,
|
|
74
|
+
prefetchChunks: O,
|
|
75
|
+
visitedCoordinates: k,
|
|
76
|
+
omittedPrefetch: Math.max(0, I.length - V.length),
|
|
77
|
+
chunks: Object.freeze(V)
|
|
78
|
+
});
|
|
79
|
+
}, l = (e) => {
|
|
80
|
+
let t = n(e, [
|
|
81
|
+
"x",
|
|
82
|
+
"y",
|
|
83
|
+
"rot",
|
|
84
|
+
"vx",
|
|
85
|
+
"vy"
|
|
86
|
+
], [
|
|
87
|
+
"x",
|
|
88
|
+
"y",
|
|
89
|
+
"rot"
|
|
90
|
+
]), i = (e) => typeof e != "number" || !Number.isFinite(e) ? s() : r(Math.round(e * 65536), -2147483648, 2147483647);
|
|
91
|
+
return typeof t.rot != "number" || !Number.isFinite(t.rot) ? s() : Object.freeze({
|
|
92
|
+
focus: Object.freeze({
|
|
93
|
+
xRaw: i(t.x),
|
|
94
|
+
yRaw: i(t.y)
|
|
95
|
+
}),
|
|
96
|
+
velocity: Object.freeze({
|
|
97
|
+
xRaw: Object.hasOwn(t, "vx") ? i(t.vx) : 0,
|
|
98
|
+
yRaw: Object.hasOwn(t, "vy") ? i(t.vy) : 0
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}, u = (e, t) => {
|
|
102
|
+
let n = o([e])[0].geometry, i = r(t, 0, 2147483647);
|
|
103
|
+
if (!n) return s();
|
|
104
|
+
let a = Object.freeze([n.kind === "2d-tiles" ? "tiles" : n.kind === "2d-heightfield" ? "heights" : n.kind === "3d-voxel" ? "voxels" : "shapes"]);
|
|
105
|
+
for (let e of n.lod) i > n.streaming.client.radiusChunks && i >= e.beyondChunks && (a = e.fields);
|
|
106
|
+
return a;
|
|
107
|
+
};
|
|
108
|
+
export { u as geometryClientFieldsAtDistance, l as geometryTransformInterest2D, c as planGeometryClientInterest };
|