@konitif/workbench 0.284.1
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/LICENSE.md +21 -0
- package/README.md +54 -0
- package/dist/application/boot/applicationBoot.d.ts +48 -0
- package/dist/application/boot/applicationBoot.js +174 -0
- package/dist/application/experiment/ControlledExperimentCampaign.d.ts +12 -0
- package/dist/application/experiment/ControlledExperimentCampaign.js +159 -0
- package/dist/application/experiment/ControlledExperimentRecorder.d.ts +17 -0
- package/dist/application/experiment/ControlledExperimentRecorder.js +215 -0
- package/dist/application/i18n/WorkbenchTranslationRegistry.d.ts +19 -0
- package/dist/application/i18n/WorkbenchTranslationRegistry.js +179 -0
- package/dist/application/layout/surfaceCommandRouter.d.ts +18 -0
- package/dist/application/layout/surfaceCommandRouter.js +247 -0
- package/dist/application/physics/NoopPhysicsBackend.d.ts +2 -0
- package/dist/application/physics/NoopPhysicsBackend.js +2 -0
- package/dist/application/physics/PhysicsService.d.ts +2 -0
- package/dist/application/physics/PhysicsService.js +2 -0
- package/dist/application/project/ProjectManifest.d.ts +15 -0
- package/dist/application/project/ProjectManifest.js +107 -0
- package/dist/application/repository/RepositoryPreflightEngine.d.ts +6 -0
- package/dist/application/repository/RepositoryPreflightEngine.js +301 -0
- package/dist/application/runtime/RuntimeBackendConnection.d.ts +9 -0
- package/dist/application/runtime/RuntimeBackendConnection.js +34 -0
- package/dist/application/runtime/RuntimeBackendSubscription.d.ts +8 -0
- package/dist/application/runtime/RuntimeBackendSubscription.js +52 -0
- package/dist/application/runtime/RuntimeCheckpointStore.d.ts +20 -0
- package/dist/application/runtime/RuntimeCheckpointStore.js +65 -0
- package/dist/application/runtime/RuntimeLaunchProgress.d.ts +3 -0
- package/dist/application/runtime/RuntimeLaunchProgress.js +38 -0
- package/dist/application/runtime/RuntimeLaunchStateSnapshot.d.ts +48 -0
- package/dist/application/runtime/RuntimeLaunchStateSnapshot.js +73 -0
- package/dist/application/runtime/RuntimeObservabilityHub.d.ts +28 -0
- package/dist/application/runtime/RuntimeObservabilityHub.js +262 -0
- package/dist/application/runtime/RuntimeObservationEvents.d.ts +15 -0
- package/dist/application/runtime/RuntimeObservationEvents.js +18 -0
- package/dist/application/runtime/RuntimeOffloadManager.d.ts +24 -0
- package/dist/application/runtime/RuntimeOffloadManager.js +96 -0
- package/dist/application/runtime/RuntimePlanEngine.d.ts +11 -0
- package/dist/application/runtime/RuntimePlanEngine.js +67 -0
- package/dist/application/runtime/RuntimeProjectionCatalog.d.ts +5 -0
- package/dist/application/runtime/RuntimeProjectionCatalog.js +48 -0
- package/dist/application/runtime/RuntimeProjectionSession.d.ts +5 -0
- package/dist/application/runtime/RuntimeProjectionSession.js +4 -0
- package/dist/application/runtime/RuntimeProjectionSessionKeys.d.ts +5 -0
- package/dist/application/runtime/RuntimeProjectionSessionKeys.js +10 -0
- package/dist/application/runtime/RuntimeProjectionSessionReducers.d.ts +7 -0
- package/dist/application/runtime/RuntimeProjectionSessionReducers.js +101 -0
- package/dist/application/runtime/RuntimeProjectionSessionSerialization.d.ts +5 -0
- package/dist/application/runtime/RuntimeProjectionSessionSerialization.js +89 -0
- package/dist/application/runtime/RuntimeProjectionSessionSharedState.d.ts +3 -0
- package/dist/application/runtime/RuntimeProjectionSessionSharedState.js +53 -0
- package/dist/application/runtime/RuntimeProjectionSessionTypes.d.ts +38 -0
- package/dist/application/runtime/RuntimeProjectionSessionTypes.js +1 -0
- package/dist/application/runtime/RuntimeProjectionViewerSessionSync.d.ts +29 -0
- package/dist/application/runtime/RuntimeProjectionViewerSessionSync.js +39 -0
- package/dist/application/runtime/RuntimeProjectionViewerSessionUpdates.d.ts +27 -0
- package/dist/application/runtime/RuntimeProjectionViewerSessionUpdates.js +38 -0
- package/dist/application/runtime/RuntimeRegistryOwner.d.ts +20 -0
- package/dist/application/runtime/RuntimeRegistryOwner.js +71 -0
- package/dist/application/runtime/RuntimeRegistrySnapshots.d.ts +6 -0
- package/dist/application/runtime/RuntimeRegistrySnapshots.js +51 -0
- package/dist/application/runtime/RuntimeRegistryTypes.d.ts +29 -0
- package/dist/application/runtime/RuntimeRegistryTypes.js +1 -0
- package/dist/application/runtime/RuntimeSharedState.d.ts +6 -0
- package/dist/application/runtime/RuntimeSharedState.js +47 -0
- package/dist/application/runtime/WorkbenchRuntimeCore.d.ts +82 -0
- package/dist/application/runtime/WorkbenchRuntimeCore.js +463 -0
- package/dist/application/runtime/WorkbenchRuntimeSanitizers.d.ts +9 -0
- package/dist/application/runtime/WorkbenchRuntimeSanitizers.js +62 -0
- package/dist/application/shell/state.d.ts +22 -0
- package/dist/application/shell/state.js +308 -0
- package/dist/application/widgets/createWorkbenchWidgetAdapter.d.ts +9 -0
- package/dist/application/widgets/createWorkbenchWidgetAdapter.js +30 -0
- package/dist/application/workspace/canonicalizeLayout.d.ts +2 -0
- package/dist/application/workspace/canonicalizeLayout.js +91 -0
- package/dist/application/workspace/closePanel.d.ts +6 -0
- package/dist/application/workspace/closePanel.js +43 -0
- package/dist/application/workspace/collapseSplit.d.ts +7 -0
- package/dist/application/workspace/collapseSplit.js +45 -0
- package/dist/application/workspace/collapseSplitBoundary.d.ts +8 -0
- package/dist/application/workspace/collapseSplitBoundary.js +106 -0
- package/dist/application/workspace/commands.d.ts +71 -0
- package/dist/application/workspace/commands.js +216 -0
- package/dist/application/workspace/createPeripheralBands.d.ts +14 -0
- package/dist/application/workspace/createPeripheralBands.js +62 -0
- package/dist/application/workspace/createWorkspace.d.ts +7 -0
- package/dist/application/workspace/createWorkspace.js +12 -0
- package/dist/application/workspace/detachPanelToWindow.d.ts +12 -0
- package/dist/application/workspace/detachPanelToWindow.js +57 -0
- package/dist/application/workspace/dockPanel.d.ts +10 -0
- package/dist/application/workspace/dockPanel.js +399 -0
- package/dist/application/workspace/finalizeWorkspace.d.ts +4 -0
- package/dist/application/workspace/finalizeWorkspace.js +23 -0
- package/dist/application/workspace/focusPanel.d.ts +2 -0
- package/dist/application/workspace/focusPanel.js +19 -0
- package/dist/application/workspace/joinPanelArea.d.ts +13 -0
- package/dist/application/workspace/joinPanelArea.js +281 -0
- package/dist/application/workspace/layoutInteraction.d.ts +176 -0
- package/dist/application/workspace/layoutInteraction.js +852 -0
- package/dist/application/workspace/layoutTree.d.ts +34 -0
- package/dist/application/workspace/layoutTree.js +135 -0
- package/dist/application/workspace/openTool.d.ts +15 -0
- package/dist/application/workspace/openTool.js +89 -0
- package/dist/application/workspace/presetArtifacts.d.ts +60 -0
- package/dist/application/workspace/presetArtifacts.js +231 -0
- package/dist/application/workspace/presets.d.ts +5 -0
- package/dist/application/workspace/presets.js +12 -0
- package/dist/application/workspace/reattachWorkspaceWindow.d.ts +7 -0
- package/dist/application/workspace/reattachWorkspaceWindow.js +24 -0
- package/dist/application/workspace/resizeSplit.d.ts +7 -0
- package/dist/application/workspace/resizeSplit.js +12 -0
- package/dist/application/workspace/resizeSplitBoundary.d.ts +10 -0
- package/dist/application/workspace/resizeSplitBoundary.js +115 -0
- package/dist/application/workspace/runToolShellCommand.d.ts +11 -0
- package/dist/application/workspace/runToolShellCommand.js +133 -0
- package/dist/application/workspace/session.d.ts +9 -0
- package/dist/application/workspace/session.js +36 -0
- package/dist/application/workspace/setActiveStackChild.d.ts +7 -0
- package/dist/application/workspace/setActiveStackChild.js +12 -0
- package/dist/application/workspace/setDesignSystemThemeSession.d.ts +3 -0
- package/dist/application/workspace/setDesignSystemThemeSession.js +12 -0
- package/dist/application/workspace/setPanelFullscreenToggleVisibility.d.ts +7 -0
- package/dist/application/workspace/setPanelFullscreenToggleVisibility.js +7 -0
- package/dist/application/workspace/setStackHeaderVisibility.d.ts +7 -0
- package/dist/application/workspace/setStackHeaderVisibility.js +7 -0
- package/dist/application/workspace/setToolPanelTitleOverride.d.ts +9 -0
- package/dist/application/workspace/setToolPanelTitleOverride.js +33 -0
- package/dist/application/workspace/setToolShellStatus.d.ts +8 -0
- package/dist/application/workspace/setToolShellStatus.js +32 -0
- package/dist/application/workspace/setWorkspaceFullscreenPanel.d.ts +3 -0
- package/dist/application/workspace/setWorkspaceFullscreenPanel.js +26 -0
- package/dist/application/workspace/snapshots.d.ts +10 -0
- package/dist/application/workspace/snapshots.js +34 -0
- package/dist/application/workspace/splitPanel.d.ts +10 -0
- package/dist/application/workspace/splitPanel.js +21 -0
- package/dist/application/workspace/subdividePanel.d.ts +39 -0
- package/dist/application/workspace/subdividePanel.js +128 -0
- package/dist/application/workspace/swapPanelArea.d.ts +11 -0
- package/dist/application/workspace/swapPanelArea.js +163 -0
- package/dist/application/workspace/targetWindow.d.ts +4 -0
- package/dist/application/workspace/targetWindow.js +22 -0
- package/dist/application/workspace/toolCapabilities.d.ts +11 -0
- package/dist/application/workspace/toolCapabilities.js +59 -0
- package/dist/application/workspace/toolRuntime.d.ts +32 -0
- package/dist/application/workspace/toolRuntime.js +65 -0
- package/dist/application/workspace/updateToolState.d.ts +8 -0
- package/dist/application/workspace/updateToolState.js +20 -0
- package/dist/boot/applicationBoot.d.ts +1 -0
- package/dist/boot/applicationBoot.js +2 -0
- package/dist/boot/events.d.ts +43 -0
- package/dist/boot/events.js +16 -0
- package/dist/boot/executor.d.ts +13 -0
- package/dist/boot/executor.js +210 -0
- package/dist/boot/graph.d.ts +16 -0
- package/dist/boot/graph.js +126 -0
- package/dist/boot/index.d.ts +2 -0
- package/dist/boot/index.js +3 -0
- package/dist/boot/mechanism.d.ts +5 -0
- package/dist/boot/mechanism.js +6 -0
- package/dist/boot/projection.d.ts +72 -0
- package/dist/boot/projection.js +398 -0
- package/dist/boot/types.d.ts +80 -0
- package/dist/boot/types.js +46 -0
- package/dist/domain/composition/dockArrangement.d.ts +57 -0
- package/dist/domain/composition/dockArrangement.js +304 -0
- package/dist/domain/composition/docking.d.ts +68 -0
- package/dist/domain/composition/docking.js +187 -0
- package/dist/domain/design-system/themeSession.d.ts +12 -0
- package/dist/domain/design-system/themeSession.js +42 -0
- package/dist/domain/experiment/model.d.ts +149 -0
- package/dist/domain/experiment/model.js +1 -0
- package/dist/domain/i18n/languageRegistry.d.ts +57 -0
- package/dist/domain/i18n/languageRegistry.js +1 -0
- package/dist/domain/i18n/model.d.ts +31 -0
- package/dist/domain/i18n/model.js +1 -0
- package/dist/domain/icon/model.d.ts +8 -0
- package/dist/domain/icon/model.js +1 -0
- package/dist/domain/input/interactionBindings.d.ts +2 -0
- package/dist/domain/input/interactionBindings.js +2 -0
- package/dist/domain/launch/model.d.ts +58 -0
- package/dist/domain/launch/model.js +109 -0
- package/dist/domain/layout/interaction.d.ts +90 -0
- package/dist/domain/layout/interaction.js +1 -0
- package/dist/domain/layout/model.d.ts +28 -0
- package/dist/domain/layout/model.js +1 -0
- package/dist/domain/layout/selectors.d.ts +12 -0
- package/dist/domain/layout/selectors.js +84 -0
- package/dist/domain/layout/surfaceProjection.d.ts +56 -0
- package/dist/domain/layout/surfaceProjection.js +249 -0
- package/dist/domain/layout/validation.d.ts +9 -0
- package/dist/domain/layout/validation.js +71 -0
- package/dist/domain/panel/model.d.ts +9 -0
- package/dist/domain/panel/model.js +1 -0
- package/dist/domain/physics/colliderGeometry.d.ts +2 -0
- package/dist/domain/physics/colliderGeometry.js +1 -0
- package/dist/domain/physics/contracts.d.ts +2 -0
- package/dist/domain/physics/contracts.js +1 -0
- package/dist/domain/physics/kinematicBinding.d.ts +22 -0
- package/dist/domain/physics/kinematicBinding.js +1 -0
- package/dist/domain/physics/model.d.ts +4 -0
- package/dist/domain/physics/model.js +1 -0
- package/dist/domain/physics/mujoco.d.ts +5 -0
- package/dist/domain/physics/mujoco.js +1 -0
- package/dist/domain/physics/observationProfile.d.ts +2 -0
- package/dist/domain/physics/observationProfile.js +1 -0
- package/dist/domain/physics/presentationBinding.d.ts +6 -0
- package/dist/domain/physics/presentationBinding.js +1 -0
- package/dist/domain/physics/simulationProfile.d.ts +2 -0
- package/dist/domain/physics/simulationProfile.js +1 -0
- package/dist/domain/physics/visualAlignment.d.ts +17 -0
- package/dist/domain/physics/visualAlignment.js +1 -0
- package/dist/domain/presentation/readingLevel.d.ts +12 -0
- package/dist/domain/presentation/readingLevel.js +29 -0
- package/dist/domain/project/model.d.ts +55 -0
- package/dist/domain/project/model.js +1 -0
- package/dist/domain/repo-quality/model.d.ts +111 -0
- package/dist/domain/repo-quality/model.js +1 -0
- package/dist/domain/repository/model.d.ts +110 -0
- package/dist/domain/repository/model.js +1 -0
- package/dist/domain/runtime/checkpoint.d.ts +37 -0
- package/dist/domain/runtime/checkpoint.js +87 -0
- package/dist/domain/runtime/hydration.d.ts +26 -0
- package/dist/domain/runtime/hydration.js +92 -0
- package/dist/domain/runtime/initialization.d.ts +25 -0
- package/dist/domain/runtime/initialization.js +87 -0
- package/dist/domain/runtime/lifecycle.d.ts +51 -0
- package/dist/domain/runtime/lifecycle.js +118 -0
- package/dist/domain/runtime/model.d.ts +252 -0
- package/dist/domain/runtime/model.js +13 -0
- package/dist/domain/runtime/observability.d.ts +142 -0
- package/dist/domain/runtime/observability.js +1 -0
- package/dist/domain/runtime/offload.d.ts +56 -0
- package/dist/domain/runtime/offload.js +129 -0
- package/dist/domain/runtime/plan.d.ts +26 -0
- package/dist/domain/runtime/plan.js +1 -0
- package/dist/domain/runtime/qualityPolicy.d.ts +28 -0
- package/dist/domain/runtime/qualityPolicy.js +97 -0
- package/dist/domain/runtime/recovery.d.ts +61 -0
- package/dist/domain/runtime/recovery.js +129 -0
- package/dist/domain/runtime/suspension.d.ts +32 -0
- package/dist/domain/runtime/suspension.js +107 -0
- package/dist/domain/runtime/teardown.d.ts +33 -0
- package/dist/domain/runtime/teardown.js +109 -0
- package/dist/domain/shared/id.d.ts +1 -0
- package/dist/domain/shared/id.js +5 -0
- package/dist/domain/shared/json.d.ts +9 -0
- package/dist/domain/shared/json.js +24 -0
- package/dist/domain/shell/model.d.ts +40 -0
- package/dist/domain/shell/model.js +1 -0
- package/dist/domain/shell/runtime.d.ts +76 -0
- package/dist/domain/shell/runtime.js +40 -0
- package/dist/domain/surface/model.d.ts +97 -0
- package/dist/domain/surface/model.js +71 -0
- package/dist/domain/temporal/model.d.ts +95 -0
- package/dist/domain/temporal/model.js +45 -0
- package/dist/domain/tool/internalTab.d.ts +11 -0
- package/dist/domain/tool/internalTab.js +20 -0
- package/dist/domain/tool/model.d.ts +207 -0
- package/dist/domain/tool/model.js +1 -0
- package/dist/domain/tool/runtime.d.ts +122 -0
- package/dist/domain/tool/runtime.js +2 -0
- package/dist/domain/tool/shell.d.ts +38 -0
- package/dist/domain/tool/shell.js +175 -0
- package/dist/domain/widget/composition.d.ts +79 -0
- package/dist/domain/widget/composition.js +250 -0
- package/dist/domain/widget/model.d.ts +35 -0
- package/dist/domain/widget/model.js +8 -0
- package/dist/domain/widget/toolDock.d.ts +30 -0
- package/dist/domain/widget/toolDock.js +52 -0
- package/dist/domain/workbench/model.d.ts +35 -0
- package/dist/domain/workbench/model.js +1 -0
- package/dist/domain/workbench/routing.d.ts +17 -0
- package/dist/domain/workbench/routing.js +72 -0
- package/dist/domain/workspace/factories.d.ts +9 -0
- package/dist/domain/workspace/factories.js +47 -0
- package/dist/domain/workspace/model.d.ts +23 -0
- package/dist/domain/workspace/model.js +1 -0
- package/dist/domain/workspace/persistence.d.ts +5 -0
- package/dist/domain/workspace/persistence.js +1 -0
- package/dist/domain/workspace/selectors.d.ts +19 -0
- package/dist/domain/workspace/selectors.js +90 -0
- package/dist/domain/workspace/session.d.ts +9 -0
- package/dist/domain/workspace/session.js +1 -0
- package/dist/domain/workspace/validation.d.ts +10 -0
- package/dist/domain/workspace/validation.js +231 -0
- package/dist/hosting.d.ts +15 -0
- package/dist/hosting.js +12 -0
- package/dist/index.d.ts +111 -0
- package/dist/index.js +111 -0
- package/dist/infrastructure/audio/WorkbenchAudioManager.d.ts +36 -0
- package/dist/infrastructure/audio/WorkbenchAudioManager.js +100 -0
- package/dist/infrastructure/backend/HttpWorkbenchBackendClient.d.ts +30 -0
- package/dist/infrastructure/backend/HttpWorkbenchBackendClient.js +314 -0
- package/dist/infrastructure/persistence/LocalWorkspacePersistence.d.ts +8 -0
- package/dist/infrastructure/persistence/LocalWorkspacePersistence.js +29 -0
- package/dist/infrastructure/surfaces/InMemorySurfaceViewerRegistry.d.ts +58 -0
- package/dist/infrastructure/surfaces/InMemorySurfaceViewerRegistry.js +121 -0
- package/dist/infrastructure/temporal/InMemoryTemporalDialectRegistry.d.ts +8 -0
- package/dist/infrastructure/temporal/InMemoryTemporalDialectRegistry.js +38 -0
- package/dist/infrastructure/tools/InMemoryToolRegistry.d.ts +46 -0
- package/dist/infrastructure/tools/InMemoryToolRegistry.js +82 -0
- package/dist/infrastructure/widgets/InMemoryShellWidgetRegistry.d.ts +42 -0
- package/dist/infrastructure/widgets/InMemoryShellWidgetRegistry.js +66 -0
- package/dist/infrastructure/widgets/InMemoryWorkbenchWidgetRegistry.d.ts +20 -0
- package/dist/infrastructure/widgets/InMemoryWorkbenchWidgetRegistry.js +35 -0
- package/dist/infrastructure/workbenches/InMemoryWorkbenchRegistry.d.ts +7 -0
- package/dist/infrastructure/workbenches/InMemoryWorkbenchRegistry.js +28 -0
- package/dist/physics-runtime.d.ts +4 -0
- package/dist/physics-runtime.js +2 -0
- package/dist/stage/easing.d.ts +5 -0
- package/dist/stage/easing.js +15 -0
- package/dist/stage/index.d.ts +6 -0
- package/dist/stage/index.js +6 -0
- package/dist/stage/projection.d.ts +4 -0
- package/dist/stage/projection.js +74 -0
- package/dist/stage/stageRuntime.d.ts +2 -0
- package/dist/stage/stageRuntime.js +32 -0
- package/dist/stage/timeline.d.ts +3 -0
- package/dist/stage/timeline.js +69 -0
- package/dist/stage/tween.d.ts +3 -0
- package/dist/stage/tween.js +104 -0
- package/dist/stage/types.d.ts +104 -0
- package/dist/stage/types.js +30 -0
- package/dist/temporal/clock/audioClock.d.ts +1 -0
- package/dist/temporal/clock/audioClock.js +1 -0
- package/dist/temporal/clock/clockGraph.d.ts +1 -0
- package/dist/temporal/clock/clockGraph.js +1 -0
- package/dist/temporal/clock/clockTypes.d.ts +1 -0
- package/dist/temporal/clock/clockTypes.js +1 -0
- package/dist/temporal/clock/fixedStepClock.d.ts +1 -0
- package/dist/temporal/clock/fixedStepClock.js +1 -0
- package/dist/temporal/clock/musicalClock.d.ts +7 -0
- package/dist/temporal/clock/musicalClock.js +35 -0
- package/dist/temporal/clock/rootClock.d.ts +1 -0
- package/dist/temporal/clock/rootClock.js +1 -0
- package/dist/temporal/clock/videoClock.d.ts +1 -0
- package/dist/temporal/clock/videoClock.js +1 -0
- package/dist/temporal/easing/easingFunctions.d.ts +2 -0
- package/dist/temporal/easing/easingFunctions.js +19 -0
- package/dist/temporal/easing/easingRegistry.d.ts +10 -0
- package/dist/temporal/easing/easingRegistry.js +32 -0
- package/dist/temporal/easing/easingShaderSource.d.ts +2 -0
- package/dist/temporal/easing/easingShaderSource.js +16 -0
- package/dist/temporal/easing/easingTypes.d.ts +9 -0
- package/dist/temporal/easing/easingTypes.js +1 -0
- package/dist/temporal/history/runtimeHistory.d.ts +77 -0
- package/dist/temporal/history/runtimeHistory.js +5 -0
- package/dist/temporal/history/temporalHistoryCore.d.ts +1 -0
- package/dist/temporal/history/temporalHistoryCore.js +1 -0
- package/dist/temporal/index.d.ts +20 -0
- package/dist/temporal/index.js +20 -0
- package/dist/temporal/invalidation/invalidationController.d.ts +1 -0
- package/dist/temporal/invalidation/invalidationController.js +1 -0
- package/dist/temporal/scheduler/browserSchedulerHost.d.ts +3 -0
- package/dist/temporal/scheduler/browserSchedulerHost.js +19 -0
- package/dist/temporal/scheduler/frameBudget.d.ts +1 -0
- package/dist/temporal/scheduler/frameBudget.js +1 -0
- package/dist/temporal/scheduler/temporalScheduler.d.ts +4 -0
- package/dist/temporal/scheduler/temporalScheduler.js +6 -0
- package/dist/temporal/scheduler/temporalSchedulerCore.d.ts +1 -0
- package/dist/temporal/scheduler/temporalSchedulerCore.js +1 -0
- package/dist/temporal/scheduler/visibilityPolicy.d.ts +2 -0
- package/dist/temporal/scheduler/visibilityPolicy.js +1 -0
- package/dist/temporal/transport/temporalTransport.d.ts +1 -0
- package/dist/temporal/transport/temporalTransport.js +1 -0
- package/dist/temporal/transport/transportScope.d.ts +7 -0
- package/dist/temporal/transport/transportScope.js +3 -0
- package/dist/temporal/transport/transportTimeline.d.ts +22 -0
- package/dist/temporal/transport/transportTimeline.js +36 -0
- package/dist/temporal/transport/transportTypes.d.ts +1 -0
- package/dist/temporal/transport/transportTypes.js +1 -0
- package/dist/workspace-contracts.d.ts +36 -0
- package/dist/workspace-contracts.js +28 -0
- package/package.json +57 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { easeStageProgress } from "./easing.js";
|
|
2
|
+
export function resolveStageTrackValue(track, timeMs) {
|
|
3
|
+
const keyframes = [...track.keyframes].sort((a, b) => a.at - b.at);
|
|
4
|
+
if (keyframes.length === 0) {
|
|
5
|
+
return undefined;
|
|
6
|
+
}
|
|
7
|
+
if (timeMs <= keyframes[0].at) {
|
|
8
|
+
return keyframes[0].value;
|
|
9
|
+
}
|
|
10
|
+
const last = keyframes[keyframes.length - 1];
|
|
11
|
+
if (timeMs >= last.at) {
|
|
12
|
+
return last.value;
|
|
13
|
+
}
|
|
14
|
+
const nextIndex = keyframes.findIndex((keyframe) => keyframe.at >= timeMs);
|
|
15
|
+
const previous = keyframes[nextIndex - 1];
|
|
16
|
+
const next = keyframes[nextIndex];
|
|
17
|
+
return interpolateStageKeyframes(previous, next, timeMs);
|
|
18
|
+
}
|
|
19
|
+
export function setStageTweenValue(state, targetId, property, value) {
|
|
20
|
+
if (property.startsWith('camera.')) {
|
|
21
|
+
setCameraTweenValue(state, property, value);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const node = state.nodes[targetId];
|
|
25
|
+
if (!node) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
switch (property) {
|
|
29
|
+
case 'position.x':
|
|
30
|
+
node.position.x = Number(value);
|
|
31
|
+
break;
|
|
32
|
+
case 'position.y':
|
|
33
|
+
node.position.y = Number(value);
|
|
34
|
+
break;
|
|
35
|
+
case 'position.z':
|
|
36
|
+
node.position.z = Number(value);
|
|
37
|
+
break;
|
|
38
|
+
case 'rotation.x':
|
|
39
|
+
node.rotation.x = Number(value);
|
|
40
|
+
break;
|
|
41
|
+
case 'rotation.y':
|
|
42
|
+
node.rotation.y = Number(value);
|
|
43
|
+
break;
|
|
44
|
+
case 'rotation.z':
|
|
45
|
+
node.rotation.z = Number(value);
|
|
46
|
+
break;
|
|
47
|
+
case 'scale.x':
|
|
48
|
+
node.scale.x = Number(value);
|
|
49
|
+
break;
|
|
50
|
+
case 'scale.y':
|
|
51
|
+
node.scale.y = Number(value);
|
|
52
|
+
break;
|
|
53
|
+
case 'scale.z':
|
|
54
|
+
node.scale.z = Number(value);
|
|
55
|
+
break;
|
|
56
|
+
case 'opacity':
|
|
57
|
+
node.opacity = Number(value);
|
|
58
|
+
break;
|
|
59
|
+
case 'visible':
|
|
60
|
+
node.visible = Boolean(value);
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
throwUnsupportedStageProperty(property);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function interpolateStageKeyframes(previous, next, timeMs) {
|
|
67
|
+
if (typeof previous.value === 'boolean' || typeof next.value === 'boolean') {
|
|
68
|
+
return timeMs >= next.at ? next.value : previous.value;
|
|
69
|
+
}
|
|
70
|
+
const span = next.at - previous.at;
|
|
71
|
+
const progress = span <= 0 ? 1 : (timeMs - previous.at) / span;
|
|
72
|
+
const eased = easeStageProgress(progress, next.easing ?? previous.easing ?? 'linear');
|
|
73
|
+
return previous.value + (next.value - previous.value) * eased;
|
|
74
|
+
}
|
|
75
|
+
function setCameraTweenValue(state, property, value) {
|
|
76
|
+
switch (property) {
|
|
77
|
+
case 'camera.position.x':
|
|
78
|
+
state.camera.position.x = Number(value);
|
|
79
|
+
break;
|
|
80
|
+
case 'camera.position.y':
|
|
81
|
+
state.camera.position.y = Number(value);
|
|
82
|
+
break;
|
|
83
|
+
case 'camera.position.z':
|
|
84
|
+
state.camera.position.z = Number(value);
|
|
85
|
+
break;
|
|
86
|
+
case 'camera.rotation.x':
|
|
87
|
+
state.camera.rotation.x = Number(value);
|
|
88
|
+
break;
|
|
89
|
+
case 'camera.rotation.y':
|
|
90
|
+
state.camera.rotation.y = Number(value);
|
|
91
|
+
break;
|
|
92
|
+
case 'camera.rotation.z':
|
|
93
|
+
state.camera.rotation.z = Number(value);
|
|
94
|
+
break;
|
|
95
|
+
case 'camera.perspective':
|
|
96
|
+
state.camera.perspective = Number(value);
|
|
97
|
+
break;
|
|
98
|
+
default:
|
|
99
|
+
throwUnsupportedStageProperty(property);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function throwUnsupportedStageProperty(property) {
|
|
103
|
+
throw new Error(`Unsupported stage tween property "${property}".`);
|
|
104
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
export interface Vec3 {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
z: number;
|
|
5
|
+
}
|
|
6
|
+
export type StageNodeKind = 'panel' | 'drawer' | 'overlay' | 'camera';
|
|
7
|
+
export interface StageNode {
|
|
8
|
+
id: string;
|
|
9
|
+
kind: StageNodeKind;
|
|
10
|
+
position: Vec3;
|
|
11
|
+
rotation: Vec3;
|
|
12
|
+
scale: Vec3;
|
|
13
|
+
opacity: number;
|
|
14
|
+
visible: boolean;
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
/** Runtime admission accepts plain data (including nested arrays), not resources or callbacks. */
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export interface StageCamera {
|
|
20
|
+
position: Vec3;
|
|
21
|
+
rotation: Vec3;
|
|
22
|
+
perspective: number;
|
|
23
|
+
}
|
|
24
|
+
export interface StageState {
|
|
25
|
+
nodes: Record<string, StageNode>;
|
|
26
|
+
camera: StageCamera;
|
|
27
|
+
ambient?: StageAmbientState;
|
|
28
|
+
}
|
|
29
|
+
export type StageEasingName = 'linear' | 'easeIn' | 'easeOut' | 'easeInOut';
|
|
30
|
+
export type StageTweenProperty = 'position.x' | 'position.y' | 'position.z' | 'rotation.x' | 'rotation.y' | 'rotation.z' | 'scale.x' | 'scale.y' | 'scale.z' | 'opacity' | 'visible' | 'camera.position.x' | 'camera.position.y' | 'camera.position.z' | 'camera.rotation.x' | 'camera.rotation.y' | 'camera.rotation.z' | 'camera.perspective';
|
|
31
|
+
export interface StageKeyframe {
|
|
32
|
+
at: number;
|
|
33
|
+
value: number | boolean;
|
|
34
|
+
easing?: StageEasingName;
|
|
35
|
+
}
|
|
36
|
+
export interface StageTimelineTrack {
|
|
37
|
+
targetId: string;
|
|
38
|
+
property: StageTweenProperty;
|
|
39
|
+
keyframes: StageKeyframe[];
|
|
40
|
+
}
|
|
41
|
+
export interface StageTimeline {
|
|
42
|
+
id: string;
|
|
43
|
+
duration: number;
|
|
44
|
+
tracks: StageTimelineTrack[];
|
|
45
|
+
metadata?: Record<string, unknown>;
|
|
46
|
+
}
|
|
47
|
+
export interface StageViewport {
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
}
|
|
51
|
+
export interface StageProjectedNode {
|
|
52
|
+
id: string;
|
|
53
|
+
kind: StageNodeKind;
|
|
54
|
+
visible: boolean;
|
|
55
|
+
opacity: number;
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
depth: number;
|
|
59
|
+
scale: number;
|
|
60
|
+
zIndex: number;
|
|
61
|
+
transform: string;
|
|
62
|
+
metadata?: Record<string, unknown>;
|
|
63
|
+
}
|
|
64
|
+
export interface StageProjection {
|
|
65
|
+
viewport: StageViewport;
|
|
66
|
+
camera: StageCamera;
|
|
67
|
+
nodes: StageProjectedNode[];
|
|
68
|
+
ambient: StageAmbientProjection;
|
|
69
|
+
}
|
|
70
|
+
export interface StageAmbientState {
|
|
71
|
+
focusNodeId?: string;
|
|
72
|
+
depthIntensity?: number;
|
|
73
|
+
fogIntensity?: number;
|
|
74
|
+
lightIntensity?: number;
|
|
75
|
+
motionIntensity?: number;
|
|
76
|
+
parallaxIntensity?: number;
|
|
77
|
+
tint?: string;
|
|
78
|
+
/** Same plain-data admission as StageNode metadata when owned by StageRuntime. */
|
|
79
|
+
metadata?: Record<string, unknown>;
|
|
80
|
+
}
|
|
81
|
+
export interface StageAmbientProjection {
|
|
82
|
+
focusPoint: {
|
|
83
|
+
x: number;
|
|
84
|
+
y: number;
|
|
85
|
+
};
|
|
86
|
+
focusDepth: number;
|
|
87
|
+
depthIntensity: number;
|
|
88
|
+
fogIntensity: number;
|
|
89
|
+
lightIntensity: number;
|
|
90
|
+
motionIntensity: number;
|
|
91
|
+
parallaxIntensity: number;
|
|
92
|
+
tint?: string;
|
|
93
|
+
metadata?: Record<string, unknown>;
|
|
94
|
+
}
|
|
95
|
+
export interface StageRuntime {
|
|
96
|
+
getState(): StageState;
|
|
97
|
+
setState(state: StageState): void;
|
|
98
|
+
subscribe(listener: (state: StageState) => void): () => void;
|
|
99
|
+
applyTimeline(timeline: StageTimeline, timeMs: number): StageState;
|
|
100
|
+
}
|
|
101
|
+
export declare function vec3(x?: number, y?: number, z?: number): Vec3;
|
|
102
|
+
export declare function createStageNode(id: string, kind: StageNodeKind, options?: Partial<Omit<StageNode, 'id' | 'kind'>>): StageNode;
|
|
103
|
+
export declare function createStageCamera(options?: Partial<StageCamera>): StageCamera;
|
|
104
|
+
export declare function createStageState(options?: Partial<StageState>): StageState;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export function vec3(x = 0, y = 0, z = 0) {
|
|
2
|
+
return { x, y, z };
|
|
3
|
+
}
|
|
4
|
+
export function createStageNode(id, kind, options = {}) {
|
|
5
|
+
return {
|
|
6
|
+
id,
|
|
7
|
+
kind,
|
|
8
|
+
position: options.position ?? vec3(),
|
|
9
|
+
rotation: options.rotation ?? vec3(),
|
|
10
|
+
scale: options.scale ?? vec3(1, 1, 1),
|
|
11
|
+
opacity: options.opacity ?? 1,
|
|
12
|
+
visible: options.visible ?? true,
|
|
13
|
+
zIndex: options.zIndex,
|
|
14
|
+
metadata: options.metadata,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export function createStageCamera(options = {}) {
|
|
18
|
+
return {
|
|
19
|
+
position: options.position ?? vec3(),
|
|
20
|
+
rotation: options.rotation ?? vec3(),
|
|
21
|
+
perspective: options.perspective ?? 900,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export function createStageState(options = {}) {
|
|
25
|
+
return {
|
|
26
|
+
nodes: options.nodes ?? {},
|
|
27
|
+
camera: options.camera ?? createStageCamera(),
|
|
28
|
+
ambient: options.ambient,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/audioClock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/audioClock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/clockGraph';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/clockGraph';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/clockTypes';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/clockTypes';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/fixedStepClock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/fixedStepClock';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function createMusicalClock(options) {
|
|
2
|
+
const ticksPerBeat = options.ticksPerBeat ?? 960;
|
|
3
|
+
const secondsPerBeat = 60 / options.bpm;
|
|
4
|
+
const descriptor = {
|
|
5
|
+
id: options.id ?? 'musical',
|
|
6
|
+
kind: 'musical',
|
|
7
|
+
unit: 'beats',
|
|
8
|
+
rate: 1,
|
|
9
|
+
bpm: options.bpm,
|
|
10
|
+
ticksPerBeat,
|
|
11
|
+
};
|
|
12
|
+
return {
|
|
13
|
+
descriptor,
|
|
14
|
+
now() {
|
|
15
|
+
return { clockId: descriptor.id, unit: 'beats', value: 0 };
|
|
16
|
+
},
|
|
17
|
+
toSeconds(value) {
|
|
18
|
+
if (value.unit === 'ticks')
|
|
19
|
+
return (value.value / ticksPerBeat) * secondsPerBeat;
|
|
20
|
+
if (value.unit === 'beats')
|
|
21
|
+
return value.value * secondsPerBeat;
|
|
22
|
+
if (value.unit === 'milliseconds')
|
|
23
|
+
return value.value / 1000;
|
|
24
|
+
return value.value;
|
|
25
|
+
},
|
|
26
|
+
fromSeconds(seconds, unit = 'beats') {
|
|
27
|
+
const beats = seconds / secondsPerBeat;
|
|
28
|
+
const value = unit === 'ticks' ? beats * ticksPerBeat :
|
|
29
|
+
unit === 'milliseconds' ? seconds * 1000 :
|
|
30
|
+
unit === 'seconds' ? seconds :
|
|
31
|
+
beats;
|
|
32
|
+
return { clockId: descriptor.id, unit, value };
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/rootClock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/rootClock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/videoClock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/clock/videoClock';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const clamp01 = (t) => Math.min(1, Math.max(0, t));
|
|
2
|
+
export const easingDefinitions = [
|
|
3
|
+
{ id: 'linear', label: 'Linear', fn: t => clamp01(t) },
|
|
4
|
+
{ id: 'quad.in', label: 'Quad In', fn: t => { t = clamp01(t); return t * t; } },
|
|
5
|
+
{ id: 'quad.out', label: 'Quad Out', fn: t => { t = clamp01(t); return 1 - (1 - t) * (1 - t); } },
|
|
6
|
+
{ id: 'quad.inOut', label: 'Quad In Out', fn: t => { t = clamp01(t); return t < .5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2; } },
|
|
7
|
+
{ id: 'cubic.in', label: 'Cubic In', fn: t => { t = clamp01(t); return t * t * t; } },
|
|
8
|
+
{ id: 'cubic.out', label: 'Cubic Out', fn: t => { t = clamp01(t); return 1 - Math.pow(1 - t, 3); } },
|
|
9
|
+
{ id: 'cubic.inOut', label: 'Cubic In Out', fn: t => { t = clamp01(t); return t < .5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2; } },
|
|
10
|
+
{ id: 'quart.in', label: 'Quart In', fn: t => { t = clamp01(t); return t * t * t * t; } },
|
|
11
|
+
{ id: 'quart.out', label: 'Quart Out', fn: t => { t = clamp01(t); return 1 - Math.pow(1 - t, 4); } },
|
|
12
|
+
{ id: 'quart.inOut', label: 'Quart In Out', fn: t => { t = clamp01(t); return t < .5 ? 8 * t * t * t * t : 1 - Math.pow(-2 * t + 2, 4) / 2; } },
|
|
13
|
+
{ id: 'expo.in', label: 'Expo In', fn: t => { t = clamp01(t); return t === 0 ? 0 : Math.pow(2, 10 * t - 10); } },
|
|
14
|
+
{ id: 'expo.out', label: 'Expo Out', fn: t => { t = clamp01(t); return t === 1 ? 1 : 1 - Math.pow(2, -10 * t); } },
|
|
15
|
+
{ id: 'expo.inOut', label: 'Expo In Out', fn: t => { t = clamp01(t); return t === 0 ? 0 : t === 1 ? 1 : t < .5 ? Math.pow(2, 20 * t - 10) / 2 : (2 - Math.pow(2, -20 * t + 10)) / 2; } },
|
|
16
|
+
{ id: 'sine.in', label: 'Sine In', fn: t => { t = clamp01(t); return 1 - Math.cos((t * Math.PI) / 2); } },
|
|
17
|
+
{ id: 'sine.out', label: 'Sine Out', fn: t => { t = clamp01(t); return Math.sin((t * Math.PI) / 2); } },
|
|
18
|
+
{ id: 'sine.inOut', label: 'Sine In Out', fn: t => { t = clamp01(t); return -(Math.cos(Math.PI * t) - 1) / 2; } },
|
|
19
|
+
];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EasingDefinition, EasingFunction } from "./easingTypes.js";
|
|
2
|
+
export interface EasingRegistry {
|
|
3
|
+
register(definition: EasingDefinition): void;
|
|
4
|
+
get(id: string): EasingDefinition | undefined;
|
|
5
|
+
evaluate(id: string, t: number): number;
|
|
6
|
+
list(): EasingDefinition[];
|
|
7
|
+
}
|
|
8
|
+
export declare function createEasingRegistry(definitions?: EasingDefinition[]): EasingRegistry;
|
|
9
|
+
export declare const easingRegistry: EasingRegistry;
|
|
10
|
+
export declare function resolveEasing(easing: string | EasingFunction): EasingFunction;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { easingDefinitions } from "./easingFunctions.js";
|
|
2
|
+
export function createEasingRegistry(definitions = easingDefinitions) {
|
|
3
|
+
const map = new Map();
|
|
4
|
+
for (const definition of definitions)
|
|
5
|
+
map.set(definition.id, definition);
|
|
6
|
+
return {
|
|
7
|
+
register(definition) {
|
|
8
|
+
map.set(definition.id, definition);
|
|
9
|
+
},
|
|
10
|
+
get(id) {
|
|
11
|
+
return map.get(id);
|
|
12
|
+
},
|
|
13
|
+
evaluate(id, t) {
|
|
14
|
+
const definition = map.get(id);
|
|
15
|
+
if (!definition)
|
|
16
|
+
throw new Error(`[EasingRegistry] Unknown easing "${id}"`);
|
|
17
|
+
return definition.fn(t);
|
|
18
|
+
},
|
|
19
|
+
list() {
|
|
20
|
+
return [...map.values()];
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export const easingRegistry = createEasingRegistry();
|
|
25
|
+
export function resolveEasing(easing) {
|
|
26
|
+
if (typeof easing === 'function')
|
|
27
|
+
return easing;
|
|
28
|
+
const definition = easingRegistry.get(easing);
|
|
29
|
+
if (!definition)
|
|
30
|
+
throw new Error(`[EasingRegistry] Unknown easing "${easing}"`);
|
|
31
|
+
return definition.fn;
|
|
32
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const easingGlslSource = "\nfloat easeLinear(float t){ return clamp(t, 0.0, 1.0); }\nfloat easeQuadIn(float t){ t = clamp(t, 0.0, 1.0); return t * t; }\nfloat easeQuadOut(float t){ t = clamp(t, 0.0, 1.0); return 1.0 - (1.0 - t) * (1.0 - t); }\nfloat easeCubicIn(float t){ t = clamp(t, 0.0, 1.0); return t * t * t; }\nfloat easeCubicOut(float t){ t = clamp(t, 0.0, 1.0); return 1.0 - pow(1.0 - t, 3.0); }\nfloat easeExpoOut(float t){ t = clamp(t, 0.0, 1.0); return t == 1.0 ? 1.0 : 1.0 - pow(2.0, -10.0 * t); }\nfloat easeSineInOut(float t){ t = clamp(t, 0.0, 1.0); return -(cos(3.141592653589793 * t) - 1.0) / 2.0; }\n";
|
|
2
|
+
export declare const easingWgslSource = "\nfn easeLinear(t: f32) -> f32 { return clamp(t, 0.0, 1.0); }\nfn easeQuadIn(t0: f32) -> f32 { let t = clamp(t0, 0.0, 1.0); return t * t; }\nfn easeQuadOut(t0: f32) -> f32 { let t = clamp(t0, 0.0, 1.0); return 1.0 - (1.0 - t) * (1.0 - t); }\nfn easeCubicIn(t0: f32) -> f32 { let t = clamp(t0, 0.0, 1.0); return t * t * t; }\nfn easeCubicOut(t0: f32) -> f32 { let t = clamp(t0, 0.0, 1.0); return 1.0 - pow(1.0 - t, 3.0); }\n";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const easingGlslSource = `
|
|
2
|
+
float easeLinear(float t){ return clamp(t, 0.0, 1.0); }
|
|
3
|
+
float easeQuadIn(float t){ t = clamp(t, 0.0, 1.0); return t * t; }
|
|
4
|
+
float easeQuadOut(float t){ t = clamp(t, 0.0, 1.0); return 1.0 - (1.0 - t) * (1.0 - t); }
|
|
5
|
+
float easeCubicIn(float t){ t = clamp(t, 0.0, 1.0); return t * t * t; }
|
|
6
|
+
float easeCubicOut(float t){ t = clamp(t, 0.0, 1.0); return 1.0 - pow(1.0 - t, 3.0); }
|
|
7
|
+
float easeExpoOut(float t){ t = clamp(t, 0.0, 1.0); return t == 1.0 ? 1.0 : 1.0 - pow(2.0, -10.0 * t); }
|
|
8
|
+
float easeSineInOut(float t){ t = clamp(t, 0.0, 1.0); return -(cos(3.141592653589793 * t) - 1.0) / 2.0; }
|
|
9
|
+
`;
|
|
10
|
+
export const easingWgslSource = `
|
|
11
|
+
fn easeLinear(t: f32) -> f32 { return clamp(t, 0.0, 1.0); }
|
|
12
|
+
fn easeQuadIn(t0: f32) -> f32 { let t = clamp(t0, 0.0, 1.0); return t * t; }
|
|
13
|
+
fn easeQuadOut(t0: f32) -> f32 { let t = clamp(t0, 0.0, 1.0); return 1.0 - (1.0 - t) * (1.0 - t); }
|
|
14
|
+
fn easeCubicIn(t0: f32) -> f32 { let t = clamp(t0, 0.0, 1.0); return t * t * t; }
|
|
15
|
+
fn easeCubicOut(t0: f32) -> f32 { let t = clamp(t0, 0.0, 1.0); return 1.0 - pow(1.0 - t, 3.0); }
|
|
16
|
+
`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type EasingId = 'linear' | 'quad.in' | 'quad.out' | 'quad.inOut' | 'cubic.in' | 'cubic.out' | 'cubic.inOut' | 'quart.in' | 'quart.out' | 'quart.inOut' | 'expo.in' | 'expo.out' | 'expo.inOut' | 'sine.in' | 'sine.out' | 'sine.inOut';
|
|
2
|
+
export type EasingFunction = (t: number) => number;
|
|
3
|
+
export interface EasingDefinition {
|
|
4
|
+
id: EasingId | string;
|
|
5
|
+
label: string;
|
|
6
|
+
fn: EasingFunction;
|
|
7
|
+
glsl?: string;
|
|
8
|
+
wgsl?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { JsonObject } from "../../domain/shared/json.js";
|
|
2
|
+
import { type TemporalHistoryRecorder, type TemporalHistoryRecorderOptions, type TemporalHistorySnapshot, type TemporalHistorySpan, type TemporalHistoryReplayState } from "./temporalHistoryCore.js";
|
|
3
|
+
export type RuntimeHistoryReplayState = TemporalHistoryReplayState;
|
|
4
|
+
export type RuntimeHistoryChannel = 'viewer' | 'physics' | 'timeline' | 'interaction' | 'ui' | 'performance';
|
|
5
|
+
export interface RuntimeHistoryVector3 {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
z: number;
|
|
9
|
+
}
|
|
10
|
+
export interface RuntimeHistoryQuaternion {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
z: number;
|
|
14
|
+
w: number;
|
|
15
|
+
}
|
|
16
|
+
export interface RuntimeHistoryTransform {
|
|
17
|
+
id: string;
|
|
18
|
+
position: RuntimeHistoryVector3;
|
|
19
|
+
rotation?: RuntimeHistoryQuaternion;
|
|
20
|
+
scale?: RuntimeHistoryVector3;
|
|
21
|
+
sourceId?: string;
|
|
22
|
+
metadata?: JsonObject;
|
|
23
|
+
}
|
|
24
|
+
export interface RuntimeHistoryViewerCameraSample {
|
|
25
|
+
position: RuntimeHistoryVector3;
|
|
26
|
+
target: RuntimeHistoryVector3;
|
|
27
|
+
projection: string;
|
|
28
|
+
}
|
|
29
|
+
export interface RuntimeHistoryPhysicsSample {
|
|
30
|
+
engine: string;
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
motorsCoupled?: boolean;
|
|
33
|
+
bodyCount: number;
|
|
34
|
+
jointCount: number;
|
|
35
|
+
centerOfMass?: RuntimeHistoryVector3 | null;
|
|
36
|
+
bodyTransforms?: RuntimeHistoryTransform[];
|
|
37
|
+
jointStates?: Record<string, number>;
|
|
38
|
+
}
|
|
39
|
+
export interface RuntimeHistoryPlaybackSample {
|
|
40
|
+
sourceId?: string;
|
|
41
|
+
currentTime: number;
|
|
42
|
+
isPlaying: boolean;
|
|
43
|
+
playbackRate?: number;
|
|
44
|
+
duration?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface RuntimeHistoryViewerSample {
|
|
47
|
+
camera?: RuntimeHistoryViewerCameraSample;
|
|
48
|
+
joints?: Record<string, number>;
|
|
49
|
+
physics?: RuntimeHistoryPhysicsSample;
|
|
50
|
+
playback?: RuntimeHistoryPlaybackSample;
|
|
51
|
+
metadata?: JsonObject;
|
|
52
|
+
}
|
|
53
|
+
export interface RuntimeHistorySample {
|
|
54
|
+
id: number;
|
|
55
|
+
timeSeconds: number;
|
|
56
|
+
recordedAt: number;
|
|
57
|
+
viewer?: RuntimeHistoryViewerSample;
|
|
58
|
+
metadata?: JsonObject;
|
|
59
|
+
}
|
|
60
|
+
export interface RuntimeHistoryEvent {
|
|
61
|
+
id: number;
|
|
62
|
+
timeSeconds: number;
|
|
63
|
+
recordedAt: number;
|
|
64
|
+
channel: RuntimeHistoryChannel;
|
|
65
|
+
type: string;
|
|
66
|
+
label?: string;
|
|
67
|
+
payload?: JsonObject;
|
|
68
|
+
}
|
|
69
|
+
type SampleData = Omit<RuntimeHistorySample, 'id' | 'recordedAt'>;
|
|
70
|
+
type EventData = Omit<RuntimeHistoryEvent, 'id' | 'recordedAt'>;
|
|
71
|
+
export type RuntimeHistorySpan = TemporalHistorySpan;
|
|
72
|
+
export type RuntimeHistorySnapshot = TemporalHistorySnapshot<SampleData, EventData>;
|
|
73
|
+
export type RuntimeHistoryRecorderOptions = TemporalHistoryRecorderOptions;
|
|
74
|
+
export type RuntimeHistoryRecorder = TemporalHistoryRecorder<SampleData, EventData>;
|
|
75
|
+
/** Compatibility specialization; the shared composition recorder keeps its identity. */
|
|
76
|
+
export declare function createRuntimeHistoryRecorder(options?: RuntimeHistoryRecorderOptions): RuntimeHistoryRecorder;
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createTemporalHistoryRecorder, } from "./temporalHistoryCore.js";
|
|
2
|
+
/** Compatibility specialization; the shared composition recorder keeps its identity. */
|
|
3
|
+
export function createRuntimeHistoryRecorder(options = {}) {
|
|
4
|
+
return createTemporalHistoryRecorder(options);
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/history/temporalHistoryCore';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/history/temporalHistoryCore';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "./clock/clockTypes.js";
|
|
2
|
+
export * from "./clock/rootClock.js";
|
|
3
|
+
export * from "./clock/audioClock.js";
|
|
4
|
+
export * from "./clock/videoClock.js";
|
|
5
|
+
export * from "./clock/fixedStepClock.js";
|
|
6
|
+
export * from "./clock/musicalClock.js";
|
|
7
|
+
export * from "./clock/clockGraph.js";
|
|
8
|
+
export * from "./transport/transportTypes.js";
|
|
9
|
+
export * from "./transport/temporalTransport.js";
|
|
10
|
+
export * from "./transport/transportTimeline.js";
|
|
11
|
+
export * from "./transport/transportScope.js";
|
|
12
|
+
export * from "./scheduler/frameBudget.js";
|
|
13
|
+
export * from "./scheduler/visibilityPolicy.js";
|
|
14
|
+
export * from "./scheduler/temporalScheduler.js";
|
|
15
|
+
export * from "./easing/easingTypes.js";
|
|
16
|
+
export * from "./easing/easingFunctions.js";
|
|
17
|
+
export * from "./easing/easingRegistry.js";
|
|
18
|
+
export * from "./easing/easingShaderSource.js";
|
|
19
|
+
export * from "./invalidation/invalidationController.js";
|
|
20
|
+
export * from "./history/runtimeHistory.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "./clock/clockTypes.js";
|
|
2
|
+
export * from "./clock/rootClock.js";
|
|
3
|
+
export * from "./clock/audioClock.js";
|
|
4
|
+
export * from "./clock/videoClock.js";
|
|
5
|
+
export * from "./clock/fixedStepClock.js";
|
|
6
|
+
export * from "./clock/musicalClock.js";
|
|
7
|
+
export * from "./clock/clockGraph.js";
|
|
8
|
+
export * from "./transport/transportTypes.js";
|
|
9
|
+
export * from "./transport/temporalTransport.js";
|
|
10
|
+
export * from "./transport/transportTimeline.js";
|
|
11
|
+
export * from "./transport/transportScope.js";
|
|
12
|
+
export * from "./scheduler/frameBudget.js";
|
|
13
|
+
export * from "./scheduler/visibilityPolicy.js";
|
|
14
|
+
export * from "./scheduler/temporalScheduler.js";
|
|
15
|
+
export * from "./easing/easingTypes.js";
|
|
16
|
+
export * from "./easing/easingFunctions.js";
|
|
17
|
+
export * from "./easing/easingRegistry.js";
|
|
18
|
+
export * from "./easing/easingShaderSource.js";
|
|
19
|
+
export * from "./invalidation/invalidationController.js";
|
|
20
|
+
export * from "./history/runtimeHistory.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/invalidation/invalidationController';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/invalidation/invalidationController';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function documentIsVisible() {
|
|
2
|
+
if (typeof document === 'undefined')
|
|
3
|
+
return true;
|
|
4
|
+
return document.visibilityState !== 'hidden';
|
|
5
|
+
}
|
|
6
|
+
export function createBrowserSchedulerHost() {
|
|
7
|
+
return {
|
|
8
|
+
isVisible: documentIsVisible,
|
|
9
|
+
requestFrame(callback) {
|
|
10
|
+
if (typeof requestAnimationFrame !== 'undefined')
|
|
11
|
+
return requestAnimationFrame(callback);
|
|
12
|
+
return undefined;
|
|
13
|
+
},
|
|
14
|
+
cancelFrame(handle) {
|
|
15
|
+
if (typeof cancelAnimationFrame !== 'undefined')
|
|
16
|
+
cancelAnimationFrame(handle);
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/scheduler/frameBudget';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/scheduler/frameBudget';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type TemporalSchedulerOptions, type TemporalScheduler } from "./temporalSchedulerCore.js";
|
|
2
|
+
export type { TemporalSchedulerOptions, TemporalScheduler } from "./temporalSchedulerCore.js";
|
|
3
|
+
/** Compatibility entry: browser integration stays outside the scheduler core. */
|
|
4
|
+
export declare function createTemporalScheduler(options: TemporalSchedulerOptions): TemporalScheduler;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createBrowserSchedulerHost } from "./browserSchedulerHost.js";
|
|
2
|
+
import { createTemporalSchedulerCore } from "./temporalSchedulerCore.js";
|
|
3
|
+
/** Compatibility entry: browser integration stays outside the scheduler core. */
|
|
4
|
+
export function createTemporalScheduler(options) {
|
|
5
|
+
return createTemporalSchedulerCore(options, createBrowserSchedulerHost());
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/scheduler/temporalSchedulerCore';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/scheduler/temporalSchedulerCore';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { documentIsVisible } from "./browserSchedulerHost.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/transport/temporalTransport';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@konitif/temporal/transport/temporalTransport';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TemporalTransport } from "./temporalTransport.js";
|
|
2
|
+
export interface TransportScope {
|
|
3
|
+
id: string;
|
|
4
|
+
transport: TemporalTransport;
|
|
5
|
+
dispose(): void;
|
|
6
|
+
}
|
|
7
|
+
export declare function createTransportScope(id: string, transport: TemporalTransport, dispose?: () => void): TransportScope;
|