@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
package/dist/fixed.d.ts
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
export declare interface AabbFx {
|
|
2
|
+
readonly min: Vec2Fx;
|
|
3
|
+
readonly max: Vec2Fx;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export declare interface AabbFx32 {
|
|
7
|
+
readonly min: Vec2Fx32;
|
|
8
|
+
readonly max: Vec2Fx32;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Inclusive boundary/tangent predicates over exact raw integers. */
|
|
12
|
+
export declare const aabbIntersectsFx: (offeredA: AabbFx, offeredB: AabbFx) => boolean;
|
|
13
|
+
|
|
14
|
+
/** Inclusive predicates over exact captured signed64 raw coordinates. */
|
|
15
|
+
export declare const aabbIntersectsFx32: (offeredA: AabbFx32, offeredB: AabbFx32) => boolean;
|
|
16
|
+
|
|
17
|
+
export declare interface AabbSweepFx {
|
|
18
|
+
readonly entry: SweepFractionFx;
|
|
19
|
+
readonly exit: SweepFractionFx;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare interface AabbSweepFx32 {
|
|
23
|
+
readonly entry: SweepFractionFx32;
|
|
24
|
+
readonly exit: SweepFractionFx32;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** First table ray enclosing the positive quadrant vector, then exact quadrant
|
|
28
|
+
* reflection; bounded binary search, unsigned-word products, result [0,1) turn.
|
|
29
|
+
* No floating ratio or native atan decides the angle. Zero vector refuses. */
|
|
30
|
+
export declare const atan2Fx: (offeredY: Fx, offeredX: Fx) => Fx;
|
|
31
|
+
|
|
32
|
+
/** Bounded enclosing table-ray search. Compare complete positive wide products,
|
|
33
|
+
* including MIN's 2^63 magnitude; no rounded float ratio/native atan in runtime. */
|
|
34
|
+
export declare const atan2Fx32: (offeredY: Fx32, offeredX: Fx32) => Fx32;
|
|
35
|
+
|
|
36
|
+
export declare const circleAabbIntersectsFx: (offeredCircle: CircleFx, offeredBox: AabbFx) => boolean;
|
|
37
|
+
|
|
38
|
+
export declare const circleAabbIntersectsFx32: (offeredCircle: CircleFx32, offeredBox: AabbFx32) => boolean;
|
|
39
|
+
|
|
40
|
+
export declare const circleContainsFx: (offered: CircleFx, offeredPoint: Vec2Fx) => boolean;
|
|
41
|
+
|
|
42
|
+
export declare const circleContainsFx32: (offered: CircleFx32, offeredPoint: Vec2Fx32) => boolean;
|
|
43
|
+
|
|
44
|
+
export declare interface CircleFx {
|
|
45
|
+
readonly center: Vec2Fx;
|
|
46
|
+
readonly radius: Fx;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export declare interface CircleFx32 {
|
|
50
|
+
readonly center: Vec2Fx32;
|
|
51
|
+
readonly radius: Fx32;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export declare const circlesIntersectFx: (offeredA: CircleFx, offeredB: CircleFx) => boolean;
|
|
55
|
+
|
|
56
|
+
export declare const circlesIntersectFx32: (offeredA: CircleFx32, offeredB: CircleFx32) => boolean;
|
|
57
|
+
|
|
58
|
+
export declare const cosFx: (angle: Fx) => Fx;
|
|
59
|
+
|
|
60
|
+
export declare const cosFx32: (angle: Fx32) => Fx32;
|
|
61
|
+
|
|
62
|
+
/** No floating trig, BigInt, randomness, clock, store or mutable global state. */
|
|
63
|
+
export declare const createFixed: (offered?: FixedMathOptions) => FixedMath;
|
|
64
|
+
|
|
65
|
+
/** Pure scalar Q32.32 core with shared pinned table trig. Vector/collision32 remains open;
|
|
66
|
+
* no BigInt, floating transcendentals, clock, store or global entropy here. */
|
|
67
|
+
export declare const createFixed32: (offered?: FixedMathOptions) => Fixed32Math;
|
|
68
|
+
|
|
69
|
+
/** Component operations retain the selected Q32.32 overflow/truncation policy.
|
|
70
|
+
* Dot/cross/length enforce every intermediate; cancellation does not bypass it. */
|
|
71
|
+
export declare const createFixed32Vectors: (options?: FixedMathOptions) => Fixed32Vectors;
|
|
72
|
+
|
|
73
|
+
/** Component operations retain the selected Q16.16 overflow/truncation policy.
|
|
74
|
+
* Dot/cross/length enforce every intermediate; cancellation does not bypass it. */
|
|
75
|
+
export declare const createFixedVectors: (options?: FixedMathOptions) => FixedVectors;
|
|
76
|
+
|
|
77
|
+
declare const fixed32Brand: unique symbol;
|
|
78
|
+
|
|
79
|
+
export declare interface Fixed32Math {
|
|
80
|
+
readonly format: '32.32';
|
|
81
|
+
readonly fractionalBits: 32;
|
|
82
|
+
readonly overflowChecks: boolean;
|
|
83
|
+
raw(value: Uint64Words): Fx32;
|
|
84
|
+
fromInt(value: number): Fx32;
|
|
85
|
+
fromRatio(numerator: number, denominator: number): Fx32;
|
|
86
|
+
toNumber(value: Fx32): number;
|
|
87
|
+
compare(a: Fx32, b: Fx32): number;
|
|
88
|
+
add(a: Fx32, b: Fx32): Fx32;
|
|
89
|
+
sub(a: Fx32, b: Fx32): Fx32;
|
|
90
|
+
mul(a: Fx32, b: Fx32): Fx32;
|
|
91
|
+
div(a: Fx32, b: Fx32): Fx32;
|
|
92
|
+
sin(angle: Fx32): Fx32;
|
|
93
|
+
cos(angle: Fx32): Fx32;
|
|
94
|
+
atan2(y: Fx32, x: Fx32): Fx32;
|
|
95
|
+
sqrt(value: Fx32): Fx32;
|
|
96
|
+
abs(value: Fx32): Fx32;
|
|
97
|
+
floor(value: Fx32): Fx32;
|
|
98
|
+
round(value: Fx32): Fx32;
|
|
99
|
+
clamp(value: Fx32, min: Fx32, max: Fx32): Fx32;
|
|
100
|
+
lerp(a: Fx32, b: Fx32, fraction: Fx32): Fx32;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare interface Fixed32Vectors {
|
|
104
|
+
readonly math: Fixed32Math;
|
|
105
|
+
vec2(x: Fx32, y: Fx32): Vec2Fx32;
|
|
106
|
+
vec3(x: Fx32, y: Fx32, z: Fx32): Vec3Fx32;
|
|
107
|
+
add2(a: Vec2Fx32, b: Vec2Fx32): Vec2Fx32;
|
|
108
|
+
sub2(a: Vec2Fx32, b: Vec2Fx32): Vec2Fx32;
|
|
109
|
+
scale2(a: Vec2Fx32, scale: Fx32): Vec2Fx32;
|
|
110
|
+
dot2(a: Vec2Fx32, b: Vec2Fx32): Fx32;
|
|
111
|
+
cross2(a: Vec2Fx32, b: Vec2Fx32): Fx32;
|
|
112
|
+
length2(a: Vec2Fx32): Fx32;
|
|
113
|
+
normalize2(a: Vec2Fx32): Vec2Fx32;
|
|
114
|
+
lerp2(a: Vec2Fx32, b: Vec2Fx32, fraction: Fx32): Vec2Fx32;
|
|
115
|
+
add3(a: Vec3Fx32, b: Vec3Fx32): Vec3Fx32;
|
|
116
|
+
sub3(a: Vec3Fx32, b: Vec3Fx32): Vec3Fx32;
|
|
117
|
+
scale3(a: Vec3Fx32, scale: Fx32): Vec3Fx32;
|
|
118
|
+
dot3(a: Vec3Fx32, b: Vec3Fx32): Fx32;
|
|
119
|
+
cross3(a: Vec3Fx32, b: Vec3Fx32): Vec3Fx32;
|
|
120
|
+
length3(a: Vec3Fx32): Fx32;
|
|
121
|
+
normalize3(a: Vec3Fx32): Vec3Fx32;
|
|
122
|
+
lerp3(a: Vec3Fx32, b: Vec3Fx32, fraction: Fx32): Vec3Fx32;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export declare interface FixedMath {
|
|
126
|
+
readonly format: '16.16';
|
|
127
|
+
readonly fractionalBits: 16;
|
|
128
|
+
readonly scale: 65536;
|
|
129
|
+
readonly overflowChecks: boolean;
|
|
130
|
+
raw(value: number): Fx;
|
|
131
|
+
fromInt(value: number): Fx;
|
|
132
|
+
fromRatio(numerator: number, denominator: number): Fx;
|
|
133
|
+
toNumber(value: Fx): number;
|
|
134
|
+
add(a: Fx, b: Fx): Fx;
|
|
135
|
+
sub(a: Fx, b: Fx): Fx;
|
|
136
|
+
mul(a: Fx, b: Fx): Fx;
|
|
137
|
+
div(a: Fx, b: Fx): Fx;
|
|
138
|
+
sin(angle: Fx): Fx;
|
|
139
|
+
cos(angle: Fx): Fx;
|
|
140
|
+
atan2(y: Fx, x: Fx): Fx;
|
|
141
|
+
sqrt(value: Fx): Fx;
|
|
142
|
+
abs(value: Fx): Fx;
|
|
143
|
+
floor(value: Fx): Fx;
|
|
144
|
+
round(value: Fx): Fx;
|
|
145
|
+
clamp(value: Fx, min: Fx, max: Fx): Fx;
|
|
146
|
+
lerp(a: Fx, b: Fx, fraction: Fx): Fx;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export declare interface FixedMathOptions {
|
|
150
|
+
readonly overflowChecks?: boolean;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export declare interface FixedVectors {
|
|
154
|
+
readonly math: FixedMath;
|
|
155
|
+
vec2(x: Fx, y: Fx): Vec2Fx;
|
|
156
|
+
vec3(x: Fx, y: Fx, z: Fx): Vec3Fx;
|
|
157
|
+
add2(a: Vec2Fx, b: Vec2Fx): Vec2Fx;
|
|
158
|
+
sub2(a: Vec2Fx, b: Vec2Fx): Vec2Fx;
|
|
159
|
+
scale2(a: Vec2Fx, scale: Fx): Vec2Fx;
|
|
160
|
+
dot2(a: Vec2Fx, b: Vec2Fx): Fx;
|
|
161
|
+
cross2(a: Vec2Fx, b: Vec2Fx): Fx;
|
|
162
|
+
length2(a: Vec2Fx): Fx;
|
|
163
|
+
normalize2(a: Vec2Fx): Vec2Fx;
|
|
164
|
+
lerp2(a: Vec2Fx, b: Vec2Fx, fraction: Fx): Vec2Fx;
|
|
165
|
+
add3(a: Vec3Fx, b: Vec3Fx): Vec3Fx;
|
|
166
|
+
sub3(a: Vec3Fx, b: Vec3Fx): Vec3Fx;
|
|
167
|
+
scale3(a: Vec3Fx, scale: Fx): Vec3Fx;
|
|
168
|
+
dot3(a: Vec3Fx, b: Vec3Fx): Fx;
|
|
169
|
+
cross3(a: Vec3Fx, b: Vec3Fx): Vec3Fx;
|
|
170
|
+
length3(a: Vec3Fx): Fx;
|
|
171
|
+
normalize3(a: Vec3Fx): Vec3Fx;
|
|
172
|
+
lerp3(a: Vec3Fx, b: Vec3Fx, fraction: Fx): Vec3Fx;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** Signed Q16.16 raw integer; convert to ordinary numbers only for rendering. */
|
|
176
|
+
export declare type Fx = number & {
|
|
177
|
+
readonly [fxBrand]: 'Q16.16';
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
/** Signed Q32.32 two's-complement raw value, never a lossy 64-bit JS number. */
|
|
181
|
+
export declare type Fx32 = Uint64Words & {
|
|
182
|
+
readonly [fixed32Brand]: 'Q32.32';
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
declare const fxBrand: unique symbol;
|
|
186
|
+
|
|
187
|
+
/** PCG-XSH-RR 64/32. Numeric seeds are unsigned 32-bit; word seeds retain 64 bits.
|
|
188
|
+
* Algorithm reference: https://www.pcg-random.org/using-pcg-c-basic.html
|
|
189
|
+
* No global generator, BigInt, native dependency or implicit time/entropy seed. */
|
|
190
|
+
export declare class Pcg32 {
|
|
191
|
+
#private;
|
|
192
|
+
constructor(seed: Pcg32Seed, stream?: Pcg32Seed, maxRejectionAttempts?: number);
|
|
193
|
+
get maxRejectionAttempts(): number;
|
|
194
|
+
nextU32(): number;
|
|
195
|
+
/** Rejection removes modulo bias. Exhaustion consumes exactly the bounded
|
|
196
|
+
* draws and fails; it never returns a biased fallback or substitutes entropy. */
|
|
197
|
+
bounded(bound: number): number;
|
|
198
|
+
snapshot(): Pcg32Snapshot;
|
|
199
|
+
restore(offered: Pcg32Snapshot): void;
|
|
200
|
+
clone(): Pcg32;
|
|
201
|
+
/** Exact skip-ahead modulo 2^64; at most 32 iterations for this delta API. */
|
|
202
|
+
advance(delta: number): void;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export declare type Pcg32Seed = number | Uint64Words;
|
|
206
|
+
|
|
207
|
+
export declare interface Pcg32Snapshot {
|
|
208
|
+
readonly stateHi: number;
|
|
209
|
+
readonly stateLo: number;
|
|
210
|
+
readonly incrementHi: number;
|
|
211
|
+
readonly incrementLo: number;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export declare interface SegmentFx {
|
|
215
|
+
readonly start: Vec2Fx;
|
|
216
|
+
readonly end: Vec2Fx;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export declare interface SegmentFx32 {
|
|
220
|
+
readonly start: Vec2Fx32;
|
|
221
|
+
readonly end: Vec2Fx32;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export declare const segmentsIntersectFx: (offeredA: SegmentFx, offeredB: SegmentFx) => boolean;
|
|
225
|
+
|
|
226
|
+
export declare const segmentsIntersectFx32: (offeredA: SegmentFx32, offeredB: SegmentFx32) => boolean;
|
|
227
|
+
|
|
228
|
+
/** Table-interpolated deterministic approximation. Angle unit: turns, not radians. */
|
|
229
|
+
export declare const sinFx: (angle: Fx) => Fx;
|
|
230
|
+
|
|
231
|
+
/** Angles are turns; the low word is the exact wrapped fractional turn. */
|
|
232
|
+
export declare const sinFx32: (angle: Fx32) => Fx32;
|
|
233
|
+
|
|
234
|
+
/** Swept moving AABB against a stationary AABB over one captured displacement.
|
|
235
|
+
* Slab clipping compares exact 64-bit integer products; no float division or
|
|
236
|
+
* Q16 truncation decides contact. Entry/exit remain exact clipped fractions. */
|
|
237
|
+
export declare const sweepAabbFx: (offeredMoving: AabbFx, offeredDisplacement: Vec2Fx, offeredStationary: AabbFx) => AabbSweepFx | null;
|
|
238
|
+
|
|
239
|
+
/** Exact slab clipping over one displacement. No intermediate endpoint update,
|
|
240
|
+
* rounded division or scalar overflow policy decides contact. */
|
|
241
|
+
export declare const sweepAabbFx32: (offeredMoving: AabbFx32, offeredDisplacement: Vec2Fx32, offeredStationary: AabbFx32) => AabbSweepFx32 | null;
|
|
242
|
+
|
|
243
|
+
/** Exact clipped time ratio. Both unsigned values, denominator nonzero, in [0,1]. */
|
|
244
|
+
export declare interface SweepFractionFx {
|
|
245
|
+
readonly numerator: number;
|
|
246
|
+
readonly denominator: number;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/** Exact unsigned raw-integer ratio in [0,1], not a rounded Q32.32 value.
|
|
250
|
+
* Numerator/denominator are magnitudes; denominator is nonzero. */
|
|
251
|
+
export declare interface SweepFractionFx32 {
|
|
252
|
+
readonly numerator: Uint64Words;
|
|
253
|
+
readonly denominator: Uint64Words;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/** Exact unsigned 64-bit integer as independent 32-bit words. */
|
|
257
|
+
export declare interface Uint64Words {
|
|
258
|
+
readonly hi: number;
|
|
259
|
+
readonly lo: number;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export declare interface Vec2Fx {
|
|
263
|
+
readonly x: Fx;
|
|
264
|
+
readonly y: Fx;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export declare interface Vec2Fx32 {
|
|
268
|
+
readonly x: Fx32;
|
|
269
|
+
readonly y: Fx32;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export declare interface Vec3Fx {
|
|
273
|
+
readonly x: Fx;
|
|
274
|
+
readonly y: Fx;
|
|
275
|
+
readonly z: Fx;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export declare interface Vec3Fx32 {
|
|
279
|
+
readonly x: Fx32;
|
|
280
|
+
readonly y: Fx32;
|
|
281
|
+
readonly z: Fx32;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export { }
|
package/dist/fixed.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { atan2Fx as e, cosFx as t, sinFx as n } from "./fixedTrig.js";
|
|
2
|
+
import { createFixed as r } from "./fixedMath.js";
|
|
3
|
+
import { Pcg32 as i } from "./pcg32.js";
|
|
4
|
+
import { createFixedVectors as a } from "./fixedVectors.js";
|
|
5
|
+
import { aabbIntersectsFx as o, circleAabbIntersectsFx as s, circleContainsFx as c, circlesIntersectFx as l, segmentsIntersectFx as u, sweepAabbFx as d } from "./fixedCollision.js";
|
|
6
|
+
import { atan2Fx32 as f, cosFx32 as p, sinFx32 as m } from "./fixedTrig32.js";
|
|
7
|
+
import { createFixed32 as h } from "./fixed32.js";
|
|
8
|
+
import { createFixed32Vectors as g } from "./fixedVectors32.js";
|
|
9
|
+
import { aabbIntersectsFx32 as _, circleAabbIntersectsFx32 as v, circleContainsFx32 as y, circlesIntersectFx32 as b, segmentsIntersectFx32 as x, sweepAabbFx32 as S } from "./fixedCollision32.js";
|
|
10
|
+
export { i as Pcg32, o as aabbIntersectsFx, _ as aabbIntersectsFx32, e as atan2Fx, f as atan2Fx32, s as circleAabbIntersectsFx, v as circleAabbIntersectsFx32, c as circleContainsFx, y as circleContainsFx32, l as circlesIntersectFx, b as circlesIntersectFx32, t as cosFx, p as cosFx32, r as createFixed, h as createFixed32, g as createFixed32Vectors, a as createFixedVectors, u as segmentsIntersectFx, x as segmentsIntersectFx32, n as sinFx, m as sinFx32, d as sweepAabbFx, S as sweepAabbFx32 };
|
package/dist/fixed32.js
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { RoomAuthoringError as e } from "./errors.js";
|
|
2
|
+
import { addUint64 as t, captureUint64Words as n, compareUint64 as r } from "./fixedWords.js";
|
|
3
|
+
import { fixedRawInteger as i } from "./fixedRaw.js";
|
|
4
|
+
import { simulationOwnData as a } from "./simulationAuthoring.js";
|
|
5
|
+
import { compare as o, compareWide as s, invert as c, limbs as l, magnitude as u, negative as d, product as f, subtract as p, words as m } from "./fixedWide.js";
|
|
6
|
+
import { atan2Fx32 as h, cosFx32 as g, sinFx32 as _ } from "./fixedTrig32.js";
|
|
7
|
+
// src/fixed32.ts
|
|
8
|
+
function v(t) {
|
|
9
|
+
throw new e({
|
|
10
|
+
room: "fixed",
|
|
11
|
+
detail: t
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
var y = (e, t) => {
|
|
15
|
+
if (!t.hi && !t.lo) return v("Fixed division by zero");
|
|
16
|
+
let n = [
|
|
17
|
+
0,
|
|
18
|
+
0,
|
|
19
|
+
...l(e)
|
|
20
|
+
], i = [
|
|
21
|
+
,
|
|
22
|
+
,
|
|
23
|
+
,
|
|
24
|
+
,
|
|
25
|
+
,
|
|
26
|
+
,
|
|
27
|
+
].fill(0), a = {
|
|
28
|
+
hi: 0,
|
|
29
|
+
lo: 0
|
|
30
|
+
};
|
|
31
|
+
for (let e = 95; e >= 0; e--) {
|
|
32
|
+
let o = a.hi >>> 31, s = n[Math.floor(e / 16)] >>> e % 16 & 1;
|
|
33
|
+
a = {
|
|
34
|
+
hi: (a.hi << 1 | a.lo >>> 31) >>> 0,
|
|
35
|
+
lo: (a.lo << 1 | s) >>> 0
|
|
36
|
+
}, (o || r(a, t) >= 0) && (a = p(a, t), i[Math.floor(e / 16)] += 2 ** (e % 16));
|
|
37
|
+
}
|
|
38
|
+
return i;
|
|
39
|
+
}, b = (e = {}) => {
|
|
40
|
+
let r = a(e, ["overflowChecks"], []), b = !Object.hasOwn(r, "overflowChecks") || r.overflowChecks;
|
|
41
|
+
if (typeof b != "boolean") return v("Fixed overflowChecks must be boolean");
|
|
42
|
+
let x = (e) => n(e), S = (e, t) => {
|
|
43
|
+
let n = m(e);
|
|
44
|
+
return b && (e.slice(4).some((e) => e !== 0) || !t && n.hi >= 2147483648 || t && (n.hi > 2147483648 || n.hi === 2147483648 && n.lo !== 0)) ? v("Fixed Q32.32 overflow") : x(t ? c(n) : n);
|
|
45
|
+
}, C = (e, n) => {
|
|
46
|
+
let r = t(e, n);
|
|
47
|
+
return b && d(e) === d(n) && d(r) !== d(e) ? v("Fixed Q32.32 overflow") : x(r);
|
|
48
|
+
}, w = (e, t) => S(y(u(e), u(t)), d(e) !== d(t));
|
|
49
|
+
return Object.freeze({
|
|
50
|
+
format: "32.32",
|
|
51
|
+
fractionalBits: 32,
|
|
52
|
+
overflowChecks: b,
|
|
53
|
+
raw: x,
|
|
54
|
+
fromInt: (e) => x({
|
|
55
|
+
hi: i(e) >>> 0,
|
|
56
|
+
lo: 0
|
|
57
|
+
}),
|
|
58
|
+
fromRatio: (e, t) => w({
|
|
59
|
+
hi: i(e) >>> 0,
|
|
60
|
+
lo: 0
|
|
61
|
+
}, {
|
|
62
|
+
hi: i(t) >>> 0,
|
|
63
|
+
lo: 0
|
|
64
|
+
}),
|
|
65
|
+
toNumber: (e) => {
|
|
66
|
+
let t = x(e);
|
|
67
|
+
return (t.hi | 0) + t.lo / 4294967296;
|
|
68
|
+
},
|
|
69
|
+
compare: (e, t) => o(x(e), x(t)),
|
|
70
|
+
add: (e, t) => C(x(e), x(t)),
|
|
71
|
+
sub: (e, t) => {
|
|
72
|
+
let n = x(e), r = x(t), i = p(n, r);
|
|
73
|
+
return b && d(n) !== d(r) && d(i) !== d(n) ? v("Fixed Q32.32 overflow") : x(i);
|
|
74
|
+
},
|
|
75
|
+
mul: (e, t) => {
|
|
76
|
+
let n = x(e), r = x(t);
|
|
77
|
+
return S(f(u(n), u(r)).slice(2), d(n) !== d(r));
|
|
78
|
+
},
|
|
79
|
+
div: (e, t) => w(x(e), x(t)),
|
|
80
|
+
sin: _,
|
|
81
|
+
cos: g,
|
|
82
|
+
atan2: h,
|
|
83
|
+
sqrt: (e) => {
|
|
84
|
+
let t = x(e);
|
|
85
|
+
if (d(t)) return v("Fixed square root requires a nonnegative value");
|
|
86
|
+
let n = [
|
|
87
|
+
0,
|
|
88
|
+
0,
|
|
89
|
+
...l(t)
|
|
90
|
+
], r = 0, i = 281474976710656;
|
|
91
|
+
for (; r + 1 < i;) {
|
|
92
|
+
let e = Math.floor((r + i) / 2), t = {
|
|
93
|
+
hi: Math.floor(e / 4294967296),
|
|
94
|
+
lo: e >>> 0
|
|
95
|
+
};
|
|
96
|
+
s(f(t, t), n) <= 0 ? r = e : i = e;
|
|
97
|
+
}
|
|
98
|
+
return x({
|
|
99
|
+
hi: Math.floor(r / 4294967296),
|
|
100
|
+
lo: r >>> 0
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
abs: (e) => {
|
|
104
|
+
let t = x(e);
|
|
105
|
+
return S(l(u(t)), !1);
|
|
106
|
+
},
|
|
107
|
+
floor: (e) => {
|
|
108
|
+
let t = x(e);
|
|
109
|
+
return x({
|
|
110
|
+
hi: t.hi,
|
|
111
|
+
lo: 0
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
round: (e) => {
|
|
115
|
+
let t = x(e), n = (t.hi | 0) + +(t.lo >= 2147483648);
|
|
116
|
+
return b && n > 2147483647 ? v("Fixed Q32.32 overflow") : x({
|
|
117
|
+
hi: n >>> 0,
|
|
118
|
+
lo: 0
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
clamp: (e, t, n) => {
|
|
122
|
+
let r = x(e), i = x(t), a = x(n);
|
|
123
|
+
return o(i, a) > 0 ? v("Fixed clamp requires ordered bounds") : o(r, i) < 0 ? i : o(r, a) > 0 ? a : r;
|
|
124
|
+
},
|
|
125
|
+
lerp: (e, n, r) => {
|
|
126
|
+
let i = x(e), a = x(n), s = x(r);
|
|
127
|
+
if (d(s) || s.hi > 1 || s.hi === 1 && s.lo !== 0) return v("Fixed interpolation fraction must lie in [0, 1]");
|
|
128
|
+
let l = o(a, i) < 0, u = l ? p(i, a) : p(a, i), h = m(f(u, s).slice(2));
|
|
129
|
+
return x(t(i, l ? c(h) : h));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
export { b as createFixed32 };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { RoomAuthoringError as e } from "./errors.js";
|
|
2
|
+
import { compareUint64 as t, multiplyWords as n, signedProductDifferenceSign as r } from "./fixedWords.js";
|
|
3
|
+
import { createFixed as i } from "./fixedMath.js";
|
|
4
|
+
import { captureVec2 as a, fixedOwnData as o } from "./fixedVectors.js";
|
|
5
|
+
import { clipFixedBoxSlabs as s } from "./fixedSlabs.js";
|
|
6
|
+
// src/fixedCollision.ts
|
|
7
|
+
var c = i();
|
|
8
|
+
function l(t) {
|
|
9
|
+
throw new e({
|
|
10
|
+
room: "fixed-collision",
|
|
11
|
+
detail: t
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
var u = (e) => {
|
|
15
|
+
let t = o(e, ["min", "max"]), n = a(t.min), r = a(t.max);
|
|
16
|
+
return n.x > r.x || n.y > r.y ? l("AABB bounds must be ordered") : {
|
|
17
|
+
min: n,
|
|
18
|
+
max: r
|
|
19
|
+
};
|
|
20
|
+
}, d = (e) => {
|
|
21
|
+
let t = o(e, ["center", "radius"]), n = a(t.center), r = c.raw(t.radius);
|
|
22
|
+
return r < 0 ? l("Circle radius must be nonnegative") : {
|
|
23
|
+
center: n,
|
|
24
|
+
radius: r
|
|
25
|
+
};
|
|
26
|
+
}, f = (e) => {
|
|
27
|
+
let t = o(e, ["start", "end"]);
|
|
28
|
+
return {
|
|
29
|
+
start: a(t.start),
|
|
30
|
+
end: a(t.end)
|
|
31
|
+
};
|
|
32
|
+
}, p = (e, r, i) => {
|
|
33
|
+
let a = Math.abs(e), o = Math.abs(r);
|
|
34
|
+
if (a > i || o > i) return !1;
|
|
35
|
+
let s = n(a, a), c = n(o, o), l = n(i, i), u = s.lo + c.lo, d = s.hi + c.hi + +(u >= 4294967296);
|
|
36
|
+
return d <= 4294967295 && t({
|
|
37
|
+
hi: d,
|
|
38
|
+
lo: u >>> 0
|
|
39
|
+
}, l) <= 0;
|
|
40
|
+
}, m = (e, t) => {
|
|
41
|
+
let n = u(e), r = u(t);
|
|
42
|
+
return n.min.x <= r.max.x && n.max.x >= r.min.x && n.min.y <= r.max.y && n.max.y >= r.min.y;
|
|
43
|
+
}, h = (e, t) => {
|
|
44
|
+
let n = d(e), r = a(t);
|
|
45
|
+
return p(r.x - n.center.x, r.y - n.center.y, n.radius);
|
|
46
|
+
}, g = (e, t) => {
|
|
47
|
+
let n = d(e), r = d(t);
|
|
48
|
+
return p(n.center.x - r.center.x, n.center.y - r.center.y, n.radius + r.radius);
|
|
49
|
+
}, _ = (e, t) => {
|
|
50
|
+
let n = d(e), r = u(t), i = Math.min(r.max.x, Math.max(r.min.x, n.center.x)), a = Math.min(r.max.y, Math.max(r.min.y, n.center.y));
|
|
51
|
+
return p(n.center.x - i, n.center.y - a, n.radius);
|
|
52
|
+
}, v = (e, t, n) => r(t.x - e.x, n.y - e.y, t.y - e.y, n.x - e.x), y = (e, t, n) => n.x >= Math.min(e.x, t.x) && n.x <= Math.max(e.x, t.x) && n.y >= Math.min(e.y, t.y) && n.y <= Math.max(e.y, t.y), b = (e, t) => {
|
|
53
|
+
let n = f(e), r = f(t), i = v(n.start, n.end, r.start), a = v(n.start, n.end, r.end), o = v(r.start, r.end, n.start), s = v(r.start, r.end, n.end);
|
|
54
|
+
return i * a < 0 && o * s < 0 || i === 0 && y(n.start, n.end, r.start) || a === 0 && y(n.start, n.end, r.end) || o === 0 && y(r.start, r.end, n.start) || s === 0 && y(r.start, r.end, n.end);
|
|
55
|
+
}, x = (e, t, n) => {
|
|
56
|
+
let r = u(e), i = u(n), o = a(t);
|
|
57
|
+
return s([r.min.x, r.min.y], [r.max.x, r.max.y], [o.x, o.y], [i.min.x, i.min.y], [i.max.x, i.max.y], !1);
|
|
58
|
+
};
|
|
59
|
+
export { m as aabbIntersectsFx, _ as circleAabbIntersectsFx, h as circleContainsFx, g as circlesIntersectFx, b as segmentsIntersectFx, x as sweepAabbFx };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { RoomAuthoringError as e } from "./errors.js";
|
|
2
|
+
import { addUint64 as t, compareUint64 as n } from "./fixedWords.js";
|
|
3
|
+
import { fixedOwnData as r } from "./fixedVectors.js";
|
|
4
|
+
import { addWide as i, compare as a, compareWide as o, magnitude as s, negative as c, product as l, subtract as u } from "./fixedWide.js";
|
|
5
|
+
import { createFixed32 as d } from "./fixed32.js";
|
|
6
|
+
import { captureVec2Fx32 as f } from "./fixedVectors32.js";
|
|
7
|
+
// src/fixedCollision32.ts
|
|
8
|
+
var p = d(), m = {
|
|
9
|
+
hi: 0,
|
|
10
|
+
lo: 0
|
|
11
|
+
}, h = {
|
|
12
|
+
hi: 0,
|
|
13
|
+
lo: 1
|
|
14
|
+
};
|
|
15
|
+
function g(t) {
|
|
16
|
+
throw new e({
|
|
17
|
+
room: "fixed-collision32",
|
|
18
|
+
detail: t
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
var _ = (e) => e.hi === 0 && e.lo === 0, v = (e, t) => a(e, t) < 0 ? {
|
|
22
|
+
negative: !0,
|
|
23
|
+
words: u(t, e)
|
|
24
|
+
} : {
|
|
25
|
+
negative: !1,
|
|
26
|
+
words: u(e, t)
|
|
27
|
+
}, y = (e, t, n, r) => {
|
|
28
|
+
let i = !_(e.words) && !_(t.words) && e.negative !== t.negative;
|
|
29
|
+
if (i !== (!_(n.words) && !_(r.words) && n.negative !== r.negative)) return i ? -1 : 1;
|
|
30
|
+
let a = o(l(e.words, t.words), l(n.words, r.words));
|
|
31
|
+
return i ? -a : a;
|
|
32
|
+
}, b = (e) => {
|
|
33
|
+
let t = r(e, ["min", "max"]), n = f(t.min), i = f(t.max);
|
|
34
|
+
return a(n.x, i.x) > 0 || a(n.y, i.y) > 0 ? g("AABB bounds must be ordered") : {
|
|
35
|
+
min: n,
|
|
36
|
+
max: i
|
|
37
|
+
};
|
|
38
|
+
}, x = (e) => {
|
|
39
|
+
let t = r(e, ["center", "radius"]), n = f(t.center), i = p.raw(t.radius);
|
|
40
|
+
return c(i) ? g("Circle radius must be nonnegative") : {
|
|
41
|
+
center: n,
|
|
42
|
+
radius: i
|
|
43
|
+
};
|
|
44
|
+
}, S = (e) => {
|
|
45
|
+
let t = r(e, ["start", "end"]);
|
|
46
|
+
return {
|
|
47
|
+
start: f(t.start),
|
|
48
|
+
end: f(t.end)
|
|
49
|
+
};
|
|
50
|
+
}, C = (e, t, r) => n(e, r) > 0 || n(t, r) > 0 ? !1 : o(i(l(e, e), l(t, t)), l(r, r)) <= 0, w = (e, t) => {
|
|
51
|
+
let n = b(e), r = b(t);
|
|
52
|
+
return a(n.min.x, r.max.x) <= 0 && a(n.max.x, r.min.x) >= 0 && a(n.min.y, r.max.y) <= 0 && a(n.max.y, r.min.y) >= 0;
|
|
53
|
+
}, T = (e, t) => {
|
|
54
|
+
let n = x(e), r = f(t);
|
|
55
|
+
return C(v(r.x, n.center.x).words, v(r.y, n.center.y).words, n.radius);
|
|
56
|
+
}, E = (e, n) => {
|
|
57
|
+
let r = x(e), i = x(n);
|
|
58
|
+
return C(v(r.center.x, i.center.x).words, v(r.center.y, i.center.y).words, t(r.radius, i.radius));
|
|
59
|
+
}, D = (e, t, n) => a(e, t) < 0 ? t : a(e, n) > 0 ? n : e, O = (e, t) => {
|
|
60
|
+
let n = x(e), r = b(t), i = D(n.center.x, r.min.x, r.max.x), a = D(n.center.y, r.min.y, r.max.y);
|
|
61
|
+
return C(v(n.center.x, i).words, v(n.center.y, a).words, n.radius);
|
|
62
|
+
}, k = (e, t, n) => y(v(t.x, e.x), v(n.y, e.y), v(t.y, e.y), v(n.x, e.x)), A = (e, t, n) => a(e, t) <= 0 ? a(n, e) >= 0 && a(n, t) <= 0 : a(n, t) >= 0 && a(n, e) <= 0, j = (e, t, n) => A(e.x, t.x, n.x) && A(e.y, t.y, n.y), M = (e, t) => {
|
|
63
|
+
let n = S(e), r = S(t), i = k(n.start, n.end, r.start), a = k(n.start, n.end, r.end), o = k(r.start, r.end, n.start), s = k(r.start, r.end, n.end);
|
|
64
|
+
return i * a < 0 && o * s < 0 || i === 0 && j(n.start, n.end, r.start) || a === 0 && j(n.start, n.end, r.end) || o === 0 && j(r.start, r.end, n.start) || s === 0 && j(r.start, r.end, n.end);
|
|
65
|
+
}, N = (e, t) => y(e.numerator, {
|
|
66
|
+
negative: !1,
|
|
67
|
+
words: t.denominator
|
|
68
|
+
}, t.numerator, {
|
|
69
|
+
negative: !1,
|
|
70
|
+
words: e.denominator
|
|
71
|
+
}), P = (e) => Object.freeze({
|
|
72
|
+
numerator: Object.freeze({ ...e.numerator.words }),
|
|
73
|
+
denominator: Object.freeze({ ...e.denominator })
|
|
74
|
+
}), F = (e, t, n) => {
|
|
75
|
+
let r = b(e), i = b(n), o = f(t), l = {
|
|
76
|
+
numerator: {
|
|
77
|
+
negative: !1,
|
|
78
|
+
words: m
|
|
79
|
+
},
|
|
80
|
+
denominator: h
|
|
81
|
+
}, u = {
|
|
82
|
+
numerator: {
|
|
83
|
+
negative: !1,
|
|
84
|
+
words: h
|
|
85
|
+
},
|
|
86
|
+
denominator: h
|
|
87
|
+
};
|
|
88
|
+
for (let e of ["x", "y"]) {
|
|
89
|
+
let t = o[e];
|
|
90
|
+
if (_(t)) {
|
|
91
|
+
if (a(r.max[e], i.min[e]) < 0 || a(r.min[e], i.max[e]) > 0) return null;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
let n = s(t), d = {
|
|
95
|
+
numerator: c(t) ? v(r.min[e], i.max[e]) : v(i.min[e], r.max[e]),
|
|
96
|
+
denominator: n
|
|
97
|
+
}, f = {
|
|
98
|
+
numerator: c(t) ? v(r.max[e], i.min[e]) : v(i.max[e], r.min[e]),
|
|
99
|
+
denominator: n
|
|
100
|
+
};
|
|
101
|
+
if (N(d, l) > 0 && (l = d), N(f, u) < 0 && (u = f), N(l, u) > 0) return null;
|
|
102
|
+
}
|
|
103
|
+
return Object.freeze({
|
|
104
|
+
entry: P(l),
|
|
105
|
+
exit: P(u)
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
export { w as aabbIntersectsFx32, O as circleAabbIntersectsFx32, T as circleContainsFx32, E as circlesIntersectFx32, M as segmentsIntersectFx32, F as sweepAabbFx32 };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { RoomAuthoringError as e } from "./errors.js";
|
|
2
|
+
import { multiplyWords as t } from "./fixedWords.js";
|
|
3
|
+
import { fixedRawInteger as n } from "./fixedRaw.js";
|
|
4
|
+
import { atan2Fx as r, cosFx as i, sinFx as a } from "./fixedTrig.js";
|
|
5
|
+
// src/fixedMath.ts
|
|
6
|
+
function o(t) {
|
|
7
|
+
throw new e({
|
|
8
|
+
room: "fixed",
|
|
9
|
+
detail: t
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
var s = (e, n) => {
|
|
13
|
+
let r = t(Math.abs(e), Math.abs(n)), i = r.hi * 65536 + (r.lo >>> 16);
|
|
14
|
+
return e < 0 == n < 0 ? i : -i;
|
|
15
|
+
}, c = (e = {}) => {
|
|
16
|
+
if (!e || Object.getPrototypeOf(e) !== Object.prototype || Reflect.ownKeys(e).some((t) => {
|
|
17
|
+
let n = Object.getOwnPropertyDescriptor(e, t);
|
|
18
|
+
return t !== "overflowChecks" || !n?.enumerable || !("value" in n);
|
|
19
|
+
})) return o("Fixed configuration requires exact own data");
|
|
20
|
+
let t = !Object.hasOwn(e, "overflowChecks") || e.overflowChecks;
|
|
21
|
+
if (typeof t != "boolean") return o("Fixed overflowChecks must be boolean");
|
|
22
|
+
let c = (e) => !Number.isInteger(e) || !Number.isSafeInteger(e) ? o("Fixed arithmetic exceeded exact integer precision") : t && (e < -2147483648 || e > 2147483647) ? o("Fixed Q16.16 overflow") : e | 0;
|
|
23
|
+
return Object.freeze({
|
|
24
|
+
format: "16.16",
|
|
25
|
+
fractionalBits: 16,
|
|
26
|
+
scale: 65536,
|
|
27
|
+
overflowChecks: t,
|
|
28
|
+
raw: (e) => n(e) | 0,
|
|
29
|
+
fromInt: (e) => c(n(e) * 65536),
|
|
30
|
+
fromRatio: (e, t) => (n(e), n(t), t === 0 ? o("Fixed division by zero") : c(Math.trunc(e * 65536 / t))),
|
|
31
|
+
toNumber: (e) => n(e) / 65536,
|
|
32
|
+
add: (e, t) => c(n(e) + n(t)),
|
|
33
|
+
sub: (e, t) => c(n(e) - n(t)),
|
|
34
|
+
mul: (e, t) => c(s(n(e), n(t))),
|
|
35
|
+
div: (e, t) => (n(e), n(t), t === 0 ? o("Fixed division by zero") : c(Math.trunc(e * 65536 / t))),
|
|
36
|
+
sin: a,
|
|
37
|
+
cos: i,
|
|
38
|
+
atan2: r,
|
|
39
|
+
sqrt: (e) => {
|
|
40
|
+
if (n(e), e < 0) return o("Fixed square root requires a nonnegative value");
|
|
41
|
+
let t = e * 65536, r = 0, i = 16777216;
|
|
42
|
+
for (; r + 1 < i;) {
|
|
43
|
+
let e = Math.floor((r + i) / 2);
|
|
44
|
+
e * e <= t ? r = e : i = e;
|
|
45
|
+
}
|
|
46
|
+
return c(r);
|
|
47
|
+
},
|
|
48
|
+
abs: (e) => c(Math.abs(n(e))),
|
|
49
|
+
floor: (e) => c(Math.floor(n(e) / 65536) * 65536),
|
|
50
|
+
round: (e) => c(Math.floor((n(e) + 32768) / 65536) * 65536),
|
|
51
|
+
clamp: (e, t, r) => (n(e), n(t), n(r), t > r ? o("Fixed clamp requires ordered bounds") : c(Math.min(r, Math.max(t, e)))),
|
|
52
|
+
lerp: (e, t, r) => (n(e), n(t), n(r), r < 0 || r > 65536 ? o("Fixed interpolation fraction must lie in [0, 1]") : c(e + s(t - e, r)))
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
export { c as createFixed };
|
package/dist/fixedRaw.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RoomAuthoringError as e } from "./errors.js";
|
|
2
|
+
// src/fixedRaw.ts
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
if (!Number.isInteger(t) || t < -2147483648 || t > 2147483647) throw new e({
|
|
5
|
+
room: "fixed",
|
|
6
|
+
detail: "Fixed raw values must be signed 32-bit integers"
|
|
7
|
+
});
|
|
8
|
+
return t === 0 ? 0 : t;
|
|
9
|
+
};
|
|
10
|
+
export { t as fixedRawInteger };
|