@automovie/viewer 0.3.3 → 0.4.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/README.md +8 -87
- package/lib/IAutoMovieViewerCompletedFrame.d.ts +19 -11
- package/lib/IAutoMovieViewerDisplayMetadata.d.ts +0 -5
- package/lib/IAutoMovieViewerHandle.d.ts +3 -25
- package/lib/IMountViewerOptions.d.ts +24 -38
- package/lib/IViewerCameraStateSnapshot.d.ts +0 -5
- package/lib/IViewerFrameTransfer.d.ts +11 -0
- package/lib/IViewerFrameTransfer.js +3 -0
- package/lib/IViewerFrameTransfer.js.map +1 -0
- package/lib/IViewerFrameTransfer.mjs +0 -0
- package/lib/applyCaptureCanvasSize.d.ts +9 -10
- package/lib/applyCaptureCanvasSize.js +7 -13
- package/lib/applyCaptureCanvasSize.js.map +1 -1
- package/lib/applyCaptureCanvasSize.mjs +7 -10
- package/lib/applyCaptureCanvasSize.mjs.map +1 -1
- package/lib/audio/IAutoMovieAudioCue.d.ts +3 -8
- package/lib/audio/planAutoMovieAudioPlayback.d.ts +8 -21
- package/lib/audio/planAutoMovieAudioPlayback.js +8 -14
- package/lib/audio/planAutoMovieAudioPlayback.js.map +1 -1
- package/lib/audio/planAutoMovieAudioPlayback.mjs +8 -14
- package/lib/audio/planAutoMovieAudioPlayback.mjs.map +1 -1
- package/lib/audio/playAutoMovieAudioCues.d.ts +4 -11
- package/lib/audio/playAutoMovieAudioCues.js +4 -11
- package/lib/audio/playAutoMovieAudioCues.js.map +1 -1
- package/lib/audio/playAutoMovieAudioCues.mjs +4 -11
- package/lib/audio/playAutoMovieAudioCues.mjs.map +1 -1
- package/lib/createViewerCameraState.d.ts +3 -11
- package/lib/createViewerCameraState.js +80 -121
- package/lib/createViewerCameraState.js.map +1 -1
- package/lib/createViewerCameraState.mjs +46 -98
- package/lib/createViewerCameraState.mjs.map +1 -1
- package/lib/createViewerDisplayClock.d.ts +2 -10
- package/lib/createViewerDisplayClock.js +4 -12
- package/lib/createViewerDisplayClock.js.map +1 -1
- package/lib/createViewerDisplayClock.mjs +3 -11
- package/lib/createViewerDisplayClock.mjs.map +1 -1
- package/lib/createViewerDisplayPublication.d.ts +7 -15
- package/lib/createViewerDisplayPublication.js +7 -15
- package/lib/createViewerDisplayPublication.js.map +1 -1
- package/lib/createViewerDisplayPublication.mjs +7 -15
- package/lib/createViewerDisplayPublication.mjs.map +1 -1
- package/lib/createViewerDisplaySave.d.ts +8 -16
- package/lib/createViewerDisplaySave.js +8 -16
- package/lib/createViewerDisplaySave.js.map +1 -1
- package/lib/createViewerDisplaySave.mjs +8 -16
- package/lib/createViewerDisplaySave.mjs.map +1 -1
- package/lib/createViewerFrameControl.d.ts +8 -10
- package/lib/createViewerFrameControl.js +3 -15
- package/lib/createViewerFrameControl.js.map +1 -1
- package/lib/createViewerFrameControl.mjs +3 -12
- package/lib/createViewerFrameControl.mjs.map +1 -1
- package/lib/createViewerViewportResize.d.ts +4 -12
- package/lib/createViewerViewportResize.js +7 -20
- package/lib/createViewerViewportResize.js.map +1 -1
- package/lib/createViewerViewportResize.mjs +6 -14
- package/lib/createViewerViewportResize.mjs.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +6 -1
- package/lib/inspector/AutoMovieInspector.d.ts +33 -13
- package/lib/inspector/AutoMovieInspector.js +110 -19
- package/lib/inspector/AutoMovieInspector.js.map +1 -1
- package/lib/inspector/AutoMovieInspector.mjs +121 -18
- package/lib/inspector/AutoMovieInspector.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorBeauty.d.ts +41 -0
- package/lib/inspector/AutoMovieInspectorBeauty.js +56 -0
- package/lib/inspector/AutoMovieInspectorBeauty.js.map +1 -0
- package/lib/inspector/AutoMovieInspectorBeauty.mjs +55 -0
- package/lib/inspector/AutoMovieInspectorBeauty.mjs.map +1 -0
- package/lib/inspector/AutoMovieInspectorDiagnosticLog.d.ts +48 -0
- package/lib/inspector/AutoMovieInspectorDiagnosticLog.js +186 -0
- package/lib/inspector/AutoMovieInspectorDiagnosticLog.js.map +1 -0
- package/lib/inspector/AutoMovieInspectorDiagnosticLog.mjs +171 -0
- package/lib/inspector/AutoMovieInspectorDiagnosticLog.mjs.map +1 -0
- package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.d.ts +23 -0
- package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.js +37 -0
- package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.js.map +1 -0
- package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.mjs +85 -0
- package/lib/inspector/AutoMovieInspectorDiagnosticsPanel.mjs.map +1 -0
- package/lib/inspector/AutoMovieInspectorMarksPanel.d.ts +4 -10
- package/lib/inspector/AutoMovieInspectorMarksPanel.js +18 -35
- package/lib/inspector/AutoMovieInspectorMarksPanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorMarksPanel.mjs +32 -38
- package/lib/inspector/AutoMovieInspectorMarksPanel.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorPlayhead.d.ts +35 -96
- package/lib/inspector/AutoMovieInspectorPlayhead.js +41 -101
- package/lib/inspector/AutoMovieInspectorPlayhead.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorPlayhead.mjs +44 -98
- package/lib/inspector/AutoMovieInspectorPlayhead.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorRequestPanel.d.ts +9 -10
- package/lib/inspector/AutoMovieInspectorRequestPanel.js +18 -12
- package/lib/inspector/AutoMovieInspectorRequestPanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorRequestPanel.mjs +32 -14
- package/lib/inspector/AutoMovieInspectorRequestPanel.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorSelectionPanel.d.ts +0 -8
- package/lib/inspector/AutoMovieInspectorSelectionPanel.js +0 -8
- package/lib/inspector/AutoMovieInspectorSelectionPanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorSelectionPanel.mjs +0 -8
- package/lib/inspector/AutoMovieInspectorSelectionPanel.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorShadePanel.d.ts +2 -9
- package/lib/inspector/AutoMovieInspectorShadePanel.js +18 -25
- package/lib/inspector/AutoMovieInspectorShadePanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorShadePanel.mjs +18 -27
- package/lib/inspector/AutoMovieInspectorShadePanel.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorTimePanel.d.ts +0 -8
- package/lib/inspector/AutoMovieInspectorTimePanel.js +0 -8
- package/lib/inspector/AutoMovieInspectorTimePanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorTimePanel.mjs +0 -8
- package/lib/inspector/AutoMovieInspectorTimePanel.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorTimeReadout.d.ts +0 -8
- package/lib/inspector/AutoMovieInspectorTimeReadout.js +4 -10
- package/lib/inspector/AutoMovieInspectorTimeReadout.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorTimeReadout.mjs +3 -12
- package/lib/inspector/AutoMovieInspectorTimeReadout.mjs.map +1 -1
- package/lib/inspector/AutoMovieInspectorTransition.d.ts +79 -0
- package/lib/inspector/AutoMovieInspectorTransition.js +131 -0
- package/lib/inspector/AutoMovieInspectorTransition.js.map +1 -0
- package/lib/inspector/AutoMovieInspectorTransition.mjs +119 -0
- package/lib/inspector/AutoMovieInspectorTransition.mjs.map +1 -0
- package/lib/inspector/AutoMovieInspectorViewPanel.d.ts +0 -8
- package/lib/inspector/AutoMovieInspectorViewPanel.js +0 -8
- package/lib/inspector/AutoMovieInspectorViewPanel.js.map +1 -1
- package/lib/inspector/AutoMovieInspectorViewPanel.mjs +0 -8
- package/lib/inspector/AutoMovieInspectorViewPanel.mjs.map +1 -1
- package/lib/inspector/IAutoMovieInspectorAction.d.ts +54 -95
- package/lib/inspector/IAutoMovieInspectorLive.d.ts +43 -0
- package/lib/inspector/IAutoMovieInspectorLive.js +3 -0
- package/lib/inspector/IAutoMovieInspectorLive.js.map +1 -0
- package/lib/inspector/IAutoMovieInspectorLive.mjs +0 -0
- package/lib/inspector/IAutoMovieInspectorPathNode.d.ts +14 -9
- package/lib/inspector/IAutoMovieInspectorProps.d.ts +3 -14
- package/lib/inspector/IAutoMovieInspectorScene.d.ts +96 -100
- package/lib/inspector/IAutoMovieInspectorSceneHost.d.ts +37 -102
- package/lib/inspector/IAutoMovieInspectorState.d.ts +6 -7
- package/lib/inspector/assertAutoMovieInspectorRaster.d.ts +7 -0
- package/lib/inspector/assertAutoMovieInspectorRaster.js +19 -0
- package/lib/inspector/assertAutoMovieInspectorRaster.js.map +1 -0
- package/lib/inspector/assertAutoMovieInspectorRaster.mjs +17 -0
- package/lib/inspector/assertAutoMovieInspectorRaster.mjs.map +1 -0
- package/lib/inspector/buildAutoMovieInspectorPathTree.d.ts +9 -10
- package/lib/inspector/buildAutoMovieInspectorPathTree.js +9 -10
- package/lib/inspector/buildAutoMovieInspectorPathTree.js.map +1 -1
- package/lib/inspector/buildAutoMovieInspectorPathTree.mjs +9 -10
- package/lib/inspector/buildAutoMovieInspectorPathTree.mjs.map +1 -1
- package/lib/inspector/changesAutoMovieObservedScene.d.ts +16 -0
- package/lib/inspector/changesAutoMovieObservedScene.js +28 -0
- package/lib/inspector/changesAutoMovieObservedScene.js.map +1 -0
- package/lib/inspector/changesAutoMovieObservedScene.mjs +21 -0
- package/lib/inspector/changesAutoMovieObservedScene.mjs.map +1 -0
- package/lib/inspector/createAutoMovieInspectorAddressWriter.d.ts +13 -11
- package/lib/inspector/createAutoMovieInspectorAddressWriter.js +13 -11
- package/lib/inspector/createAutoMovieInspectorAddressWriter.js.map +1 -1
- package/lib/inspector/createAutoMovieInspectorAddressWriter.mjs +13 -11
- package/lib/inspector/createAutoMovieInspectorAddressWriter.mjs.map +1 -1
- package/lib/inspector/createAutoMovieInspectorCanvasHost.d.ts +7 -10
- package/lib/inspector/createAutoMovieInspectorCanvasHost.js +14 -11
- package/lib/inspector/createAutoMovieInspectorCanvasHost.js.map +1 -1
- package/lib/inspector/createAutoMovieInspectorCanvasHost.mjs +17 -14
- package/lib/inspector/createAutoMovieInspectorCanvasHost.mjs.map +1 -1
- package/lib/inspector/createAutoMovieInspectorState.d.ts +3 -9
- package/lib/inspector/createAutoMovieInspectorState.js +3 -9
- package/lib/inspector/createAutoMovieInspectorState.js.map +1 -1
- package/lib/inspector/createAutoMovieInspectorState.mjs +3 -9
- package/lib/inspector/createAutoMovieInspectorState.mjs.map +1 -1
- package/lib/inspector/firstAutoMovieInspectorSecond.d.ts +6 -0
- package/lib/inspector/firstAutoMovieInspectorSecond.js +13 -0
- package/lib/inspector/firstAutoMovieInspectorSecond.js.map +1 -0
- package/lib/inspector/firstAutoMovieInspectorSecond.mjs +11 -0
- package/lib/inspector/firstAutoMovieInspectorSecond.mjs.map +1 -0
- package/lib/inspector/followAutoMovieInspectorSize.d.ts +11 -0
- package/lib/inspector/followAutoMovieInspectorSize.js +26 -0
- package/lib/inspector/followAutoMovieInspectorSize.js.map +1 -0
- package/lib/inspector/followAutoMovieInspectorSize.mjs +26 -0
- package/lib/inspector/followAutoMovieInspectorSize.mjs.map +1 -0
- package/lib/inspector/formatAutoMovieInspectorAddress.d.ts +11 -10
- package/lib/inspector/formatAutoMovieInspectorAddress.js +15 -11
- package/lib/inspector/formatAutoMovieInspectorAddress.js.map +1 -1
- package/lib/inspector/formatAutoMovieInspectorAddress.mjs +15 -11
- package/lib/inspector/formatAutoMovieInspectorAddress.mjs.map +1 -1
- package/lib/inspector/formatAutoMovieInspectorCommand.d.ts +20 -14
- package/lib/inspector/formatAutoMovieInspectorCommand.js +33 -14
- package/lib/inspector/formatAutoMovieInspectorCommand.js.map +1 -1
- package/lib/inspector/formatAutoMovieInspectorCommand.mjs +26 -15
- package/lib/inspector/formatAutoMovieInspectorCommand.mjs.map +1 -1
- package/lib/inspector/handleAutoMovieInspectorKey.d.ts +24 -15
- package/lib/inspector/handleAutoMovieInspectorKey.js +27 -16
- package/lib/inspector/handleAutoMovieInspectorKey.js.map +1 -1
- package/lib/inspector/handleAutoMovieInspectorKey.mjs +27 -16
- package/lib/inspector/handleAutoMovieInspectorKey.mjs.map +1 -1
- package/lib/inspector/index.d.ts +5 -0
- package/lib/inspector/index.js +5 -0
- package/lib/inspector/index.js.map +1 -1
- package/lib/inspector/index.mjs +6 -1
- package/lib/inspector/inspectAutoMovieInspectorRequest.d.ts +19 -0
- package/lib/inspector/inspectAutoMovieInspectorRequest.js +20 -0
- package/lib/inspector/inspectAutoMovieInspectorRequest.js.map +1 -0
- package/lib/inspector/inspectAutoMovieInspectorRequest.mjs +20 -0
- package/lib/inspector/inspectAutoMovieInspectorRequest.mjs.map +1 -0
- package/lib/inspector/installAutoMovieInspectorRequest.d.ts +20 -0
- package/lib/inspector/installAutoMovieInspectorRequest.js +36 -0
- package/lib/inspector/installAutoMovieInspectorRequest.js.map +1 -0
- package/lib/inspector/installAutoMovieInspectorRequest.mjs +35 -0
- package/lib/inspector/installAutoMovieInspectorRequest.mjs.map +1 -0
- package/lib/inspector/locateAutoMovieInspectorFinding.d.ts +19 -0
- package/lib/inspector/locateAutoMovieInspectorFinding.js +34 -0
- package/lib/inspector/locateAutoMovieInspectorFinding.js.map +1 -0
- package/lib/inspector/locateAutoMovieInspectorFinding.mjs +37 -0
- package/lib/inspector/locateAutoMovieInspectorFinding.mjs.map +1 -0
- package/lib/inspector/messageOfAutoMovieInspectorError.d.ts +2 -0
- package/lib/inspector/messageOfAutoMovieInspectorError.js +8 -0
- package/lib/inspector/messageOfAutoMovieInspectorError.js.map +1 -0
- package/lib/inspector/messageOfAutoMovieInspectorError.mjs +8 -0
- package/lib/inspector/messageOfAutoMovieInspectorError.mjs.map +1 -0
- package/lib/inspector/mountAutoMovieInspectorPage.d.ts +5 -8
- package/lib/inspector/mountAutoMovieInspectorPage.js +3 -9
- package/lib/inspector/mountAutoMovieInspectorPage.js.map +1 -1
- package/lib/inspector/mountAutoMovieInspectorPage.mjs +4 -9
- package/lib/inspector/mountAutoMovieInspectorPage.mjs.map +1 -1
- package/lib/inspector/mountAutoMovieInspectorScene.d.ts +55 -12
- package/lib/inspector/mountAutoMovieInspectorScene.js +238 -164
- package/lib/inspector/mountAutoMovieInspectorScene.js.map +1 -1
- package/lib/inspector/mountAutoMovieInspectorScene.mjs +223 -149
- package/lib/inspector/mountAutoMovieInspectorScene.mjs.map +1 -1
- package/lib/inspector/placeAutoMovieInspectorLabels.d.ts +29 -0
- package/lib/inspector/placeAutoMovieInspectorLabels.js +33 -0
- package/lib/inspector/placeAutoMovieInspectorLabels.js.map +1 -0
- package/lib/inspector/placeAutoMovieInspectorLabels.mjs +32 -0
- package/lib/inspector/placeAutoMovieInspectorLabels.mjs.map +1 -0
- package/lib/inspector/readAutoMovieInspectorAddress.d.ts +8 -11
- package/lib/inspector/readAutoMovieInspectorAddress.js +8 -11
- package/lib/inspector/readAutoMovieInspectorAddress.js.map +1 -1
- package/lib/inspector/readAutoMovieInspectorAddress.mjs +8 -11
- package/lib/inspector/readAutoMovieInspectorAddress.mjs.map +1 -1
- package/lib/inspector/readAutoMovieInspectorFacts.d.ts +17 -0
- package/lib/inspector/readAutoMovieInspectorFacts.js +34 -0
- package/lib/inspector/readAutoMovieInspectorFacts.js.map +1 -0
- package/lib/inspector/readAutoMovieInspectorFacts.mjs +28 -0
- package/lib/inspector/readAutoMovieInspectorFacts.mjs.map +1 -0
- package/lib/inspector/readsAutoMovieInspectorPlacedScene.d.ts +9 -0
- package/lib/inspector/readsAutoMovieInspectorPlacedScene.js +14 -0
- package/lib/inspector/readsAutoMovieInspectorPlacedScene.js.map +1 -0
- package/lib/inspector/readsAutoMovieInspectorPlacedScene.mjs +14 -0
- package/lib/inspector/readsAutoMovieInspectorPlacedScene.mjs.map +1 -0
- package/lib/inspector/reduceAutoMovieInspectorState.d.ts +10 -10
- package/lib/inspector/reduceAutoMovieInspectorState.js +17 -11
- package/lib/inspector/reduceAutoMovieInspectorState.js.map +1 -1
- package/lib/inspector/reduceAutoMovieInspectorState.mjs +16 -11
- package/lib/inspector/reduceAutoMovieInspectorState.mjs.map +1 -1
- package/lib/inspector/releaseAutoMovieInspectorSteps.d.ts +6 -0
- package/lib/inspector/releaseAutoMovieInspectorSteps.js +23 -0
- package/lib/inspector/releaseAutoMovieInspectorSteps.js.map +1 -0
- package/lib/inspector/releaseAutoMovieInspectorSteps.mjs +19 -0
- package/lib/inspector/releaseAutoMovieInspectorSteps.mjs.map +1 -0
- package/lib/inspector/reportAutoMovieInspectorLabels.d.ts +21 -0
- package/lib/inspector/reportAutoMovieInspectorLabels.js +27 -0
- package/lib/inspector/reportAutoMovieInspectorLabels.js.map +1 -0
- package/lib/inspector/reportAutoMovieInspectorLabels.mjs +30 -0
- package/lib/inspector/reportAutoMovieInspectorLabels.mjs.map +1 -0
- package/lib/inspector/resolveAutoMovieInspectorCamera.d.ts +22 -0
- package/lib/inspector/resolveAutoMovieInspectorCamera.js +34 -0
- package/lib/inspector/resolveAutoMovieInspectorCamera.js.map +1 -0
- package/lib/inspector/resolveAutoMovieInspectorCamera.mjs +34 -0
- package/lib/inspector/resolveAutoMovieInspectorCamera.mjs.map +1 -0
- package/lib/inspector/showAutoMovieInspectorFinding.d.ts +25 -0
- package/lib/inspector/showAutoMovieInspectorFinding.js +26 -0
- package/lib/inspector/showAutoMovieInspectorFinding.js.map +1 -0
- package/lib/inspector/showAutoMovieInspectorFinding.mjs +26 -0
- package/lib/inspector/showAutoMovieInspectorFinding.mjs.map +1 -0
- package/lib/inspector/stopAutoMovieInspectorTime.d.ts +11 -0
- package/lib/inspector/stopAutoMovieInspectorTime.js +17 -0
- package/lib/inspector/stopAutoMovieInspectorTime.js.map +1 -0
- package/lib/inspector/stopAutoMovieInspectorTime.mjs +18 -0
- package/lib/inspector/stopAutoMovieInspectorTime.mjs.map +1 -0
- package/lib/inspector/writeAutoMovieInspectorInspection.d.ts +6 -0
- package/lib/inspector/writeAutoMovieInspectorInspection.js +12 -0
- package/lib/inspector/writeAutoMovieInspectorInspection.js.map +1 -0
- package/lib/inspector/writeAutoMovieInspectorInspection.mjs +12 -0
- package/lib/inspector/writeAutoMovieInspectorInspection.mjs.map +1 -0
- package/lib/internal.d.ts +7 -0
- package/lib/internal.js +25 -0
- package/lib/internal.js.map +1 -0
- package/lib/internal.mjs +8 -0
- package/lib/mountViewer.d.ts +16 -10
- package/lib/mountViewer.js +17 -14
- package/lib/mountViewer.js.map +1 -1
- package/lib/mountViewer.mjs +18 -12
- package/lib/mountViewer.mjs.map +1 -1
- package/lib/publishViewerCompletedFrame.d.ts +12 -10
- package/lib/publishViewerCompletedFrame.js +11 -9
- package/lib/publishViewerCompletedFrame.js.map +1 -1
- package/lib/publishViewerCompletedFrame.mjs +11 -9
- package/lib/publishViewerCompletedFrame.mjs.map +1 -1
- package/lib/redrawViewerCompletedFrame.d.ts +2 -10
- package/lib/redrawViewerCompletedFrame.js +4 -12
- package/lib/redrawViewerCompletedFrame.js.map +1 -1
- package/lib/redrawViewerCompletedFrame.mjs +3 -11
- package/lib/redrawViewerCompletedFrame.mjs.map +1 -1
- package/lib/releaseMountedViewer.d.ts +5 -9
- package/lib/releaseMountedViewer.js +5 -9
- package/lib/releaseMountedViewer.js.map +1 -1
- package/lib/releaseMountedViewer.mjs +5 -9
- package/lib/releaseMountedViewer.mjs.map +1 -1
- package/lib/transport/AutoMovieViewerTransport.d.ts +13 -122
- package/lib/transport/AutoMovieViewerTransport.js +10 -74
- package/lib/transport/AutoMovieViewerTransport.js.map +1 -1
- package/lib/transport/AutoMovieViewerTransport.mjs +10 -65
- package/lib/transport/AutoMovieViewerTransport.mjs.map +1 -1
- package/lib/transport/readAutoMovieReviewInterval.d.ts +3 -10
- package/lib/transport/readAutoMovieReviewInterval.js +11 -16
- package/lib/transport/readAutoMovieReviewInterval.js.map +1 -1
- package/lib/transport/readAutoMovieReviewInterval.mjs +8 -14
- package/lib/transport/readAutoMovieReviewInterval.mjs.map +1 -1
- package/package.json +12 -8
- package/src/IAutoMovieViewerCompletedFrame.ts +21 -11
- package/src/IAutoMovieViewerDisplayMetadata.ts +0 -5
- package/src/IAutoMovieViewerHandle.ts +3 -25
- package/src/IMountViewerOptions.ts +24 -38
- package/src/IViewerCameraStateSnapshot.ts +0 -5
- package/src/IViewerFrameTransfer.ts +13 -0
- package/src/applyCaptureCanvasSize.ts +9 -18
- package/src/audio/IAutoMovieAudioCue.ts +3 -8
- package/src/audio/planAutoMovieAudioPlayback.ts +9 -23
- package/src/audio/playAutoMovieAudioCues.ts +4 -11
- package/src/createViewerCameraState.ts +119 -175
- package/src/createViewerDisplayClock.ts +4 -12
- package/src/createViewerDisplayPublication.ts +7 -15
- package/src/createViewerDisplaySave.ts +8 -16
- package/src/createViewerFrameControl.ts +16 -24
- package/src/createViewerViewportResize.ts +7 -23
- package/src/index.ts +1 -0
- package/src/inspector/AutoMovieInspector.tsx +183 -20
- package/src/inspector/AutoMovieInspectorBeauty.ts +89 -0
- package/src/inspector/AutoMovieInspectorDiagnosticLog.ts +235 -0
- package/src/inspector/AutoMovieInspectorDiagnosticsPanel.tsx +118 -0
- package/src/inspector/AutoMovieInspectorMarksPanel.tsx +26 -34
- package/src/inspector/AutoMovieInspectorPlayhead.ts +53 -110
- package/src/inspector/AutoMovieInspectorRequestPanel.tsx +57 -29
- package/src/inspector/AutoMovieInspectorSelectionPanel.tsx +0 -8
- package/src/inspector/AutoMovieInspectorShadePanel.tsx +24 -29
- package/src/inspector/AutoMovieInspectorTimePanel.tsx +0 -8
- package/src/inspector/AutoMovieInspectorTimeReadout.tsx +4 -10
- package/src/inspector/AutoMovieInspectorTransition.ts +178 -0
- package/src/inspector/AutoMovieInspectorViewPanel.tsx +0 -8
- package/src/inspector/IAutoMovieInspectorAction.ts +57 -94
- package/src/inspector/IAutoMovieInspectorLive.ts +62 -0
- package/src/inspector/IAutoMovieInspectorPathNode.ts +14 -9
- package/src/inspector/IAutoMovieInspectorProps.ts +4 -14
- package/src/inspector/IAutoMovieInspectorScene.ts +104 -99
- package/src/inspector/IAutoMovieInspectorSceneHost.ts +43 -102
- package/src/inspector/IAutoMovieInspectorState.ts +6 -7
- package/src/inspector/assertAutoMovieInspectorRaster.ts +23 -0
- package/src/inspector/buildAutoMovieInspectorPathTree.ts +9 -10
- package/src/inspector/changesAutoMovieObservedScene.ts +30 -0
- package/src/inspector/createAutoMovieInspectorAddressWriter.ts +13 -11
- package/src/inspector/createAutoMovieInspectorCanvasHost.ts +14 -12
- package/src/inspector/createAutoMovieInspectorState.ts +3 -9
- package/src/inspector/firstAutoMovieInspectorSecond.ts +13 -0
- package/src/inspector/followAutoMovieInspectorSize.ts +32 -0
- package/src/inspector/formatAutoMovieInspectorAddress.ts +15 -11
- package/src/inspector/formatAutoMovieInspectorCommand.ts +44 -15
- package/src/inspector/handleAutoMovieInspectorKey.ts +27 -16
- package/src/inspector/index.ts +5 -0
- package/src/inspector/inspectAutoMovieInspectorRequest.ts +37 -0
- package/src/inspector/installAutoMovieInspectorRequest.ts +50 -0
- package/src/inspector/locateAutoMovieInspectorFinding.ts +40 -0
- package/src/inspector/messageOfAutoMovieInspectorError.ts +4 -0
- package/src/inspector/mountAutoMovieInspectorPage.tsx +7 -8
- package/src/inspector/mountAutoMovieInspectorScene.ts +290 -232
- package/src/inspector/placeAutoMovieInspectorLabels.ts +53 -0
- package/src/inspector/readAutoMovieInspectorAddress.ts +8 -11
- package/src/inspector/readAutoMovieInspectorFacts.ts +50 -0
- package/src/inspector/readsAutoMovieInspectorPlacedScene.ts +16 -0
- package/src/inspector/reduceAutoMovieInspectorState.ts +17 -11
- package/src/inspector/releaseAutoMovieInspectorSteps.ts +19 -0
- package/src/inspector/reportAutoMovieInspectorLabels.ts +45 -0
- package/src/inspector/resolveAutoMovieInspectorCamera.ts +50 -0
- package/src/inspector/showAutoMovieInspectorFinding.ts +40 -0
- package/src/inspector/stopAutoMovieInspectorTime.ts +19 -0
- package/src/inspector/writeAutoMovieInspectorInspection.ts +12 -0
- package/src/internal.ts +9 -0
- package/src/mountViewer.ts +17 -14
- package/src/publishViewerCompletedFrame.ts +14 -10
- package/src/redrawViewerCompletedFrame.ts +3 -12
- package/src/releaseMountedViewer.ts +5 -9
- package/src/transport/AutoMovieViewerTransport.ts +17 -144
- package/src/transport/readAutoMovieReviewInterval.ts +15 -16
package/README.md
CHANGED
|
@@ -1,98 +1,19 @@
|
|
|
1
1
|
# @automovie/viewer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Play and inspect AutoMovie subjects in a browser. Use the inspector for a production view or the imperative mount to build your own controls.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Start
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Use ESM in your browser host and keep it on the same Three.js version as the viewer. The inspector uses React 19.
|
|
8
8
|
|
|
9
|
-
```
|
|
10
|
-
npm install @automovie/viewer @automovie/render @
|
|
9
|
+
```powershell
|
|
10
|
+
npm install @automovie/viewer @automovie/render react@19 react-dom@19
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
`react` and `react-dom` 19 are peer dependencies, needed only by a host that renders the inspector. Both the inspector and `mountViewer` need a browser.
|
|
14
|
-
|
|
15
|
-
The package publishes CommonJS (`lib/*.js`) and ES modules (`lib/*.mjs`), chosen by the `import` condition, and Node hosts need Node.js 22.23.2 or later. Keep the host, the viewer and any Three.js addons on one `three` installation, or constructors and shared uniforms stop matching. A CommonJS host loads `require("three")`, which three.js warns about with `THREE_CJS_DEPRECATED` and which can leave the ES-module addons on a second `three`, so import the package as ESM.
|
|
16
|
-
|
|
17
13
|
## Inspector page
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
import type { IAutoMovieDrawSubject } from "@automovie/render";
|
|
23
|
-
import { mountAutoMovieInspectorPage } from "@automovie/viewer";
|
|
24
|
-
|
|
25
|
-
declare const subjects: Readonly<Record<string, IAutoMovieDrawSubject>>;
|
|
26
|
-
|
|
27
|
-
mountAutoMovieInspectorPage({ root: document.getElementById("root")!, subjects, location, history });
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
`subjects` is the record of subjects by name that a draw page's subject module gives, described in render's [draw-only page](../render/README.md#the-draw-only-page), so the page that inspects and the page that draws offer the same subjects. Create the record once: the canvas mount is keyed on the chosen subject object, and a new object for the same name builds the scene again.
|
|
31
|
-
|
|
32
|
-
The page's state is one capture request. Every panel (time, selection, marks, shade, view and the request text) edits it, the canvas draws it through render's three.js scene, and the request panel shows the `automovie capture` command that repeats the picture. The address's query is that request, written with the request keys of render's [inspection](../render/README.md#inspection) and [capture](../render/README.md#capture) grammar, so a link reopens the same picture and the same text works on the command line. An address the grammar refuses, such as one with an unknown key, opens the request that asks for nothing and shows the refusal.
|
|
33
|
-
|
|
34
|
-
`location` and `history` are passed in, and the viewer reads no other global: the query is read once at mount, and each change of the request replaces the current history entry. `unmount` on the returned handle releases the scene, its renderer and its frame loop.
|
|
35
|
-
|
|
36
|
-
### The component
|
|
37
|
-
|
|
38
|
-
A host that builds its own page renders `AutoMovieInspector` directly:
|
|
39
|
-
|
|
40
|
-
```tsx
|
|
41
|
-
import type { IAutoMovieDrawSubject } from "@automovie/render";
|
|
42
|
-
import { AutoMovieInspector, createAutoMovieInspectorAddressWriter } from "@automovie/viewer";
|
|
43
|
-
import { createRoot } from "react-dom/client";
|
|
44
|
-
|
|
45
|
-
declare const subjects: Readonly<Record<string, IAutoMovieDrawSubject>>;
|
|
46
|
-
|
|
47
|
-
createRoot(document.getElementById("root")!).render(
|
|
48
|
-
<AutoMovieInspector
|
|
49
|
-
subjects={subjects}
|
|
50
|
-
initialText={location.search}
|
|
51
|
-
onRequestChange={createAutoMovieInspectorAddressWriter({ location, history })}
|
|
52
|
-
/>,
|
|
53
|
-
);
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
`initialText` is read once. `onRequestChange` receives the request's address text after every change; `createAutoMovieInspectorAddressWriter` gives the listener that writes it into the query through the injected `history`, keeping the path and fragment and adding no history entry. Without a listener the inspector leaves the address alone.
|
|
57
|
-
|
|
58
|
-
## Imperative mount
|
|
59
|
-
|
|
60
|
-
`mountViewer` stays for hosts without React: it drives a render loop over a scene and camera you build.
|
|
61
|
-
|
|
62
|
-
```ts
|
|
63
|
-
import { buildModel } from "@automovie/render";
|
|
64
|
-
import { mountViewer } from "@automovie/viewer";
|
|
65
|
-
import type { IAutoMovieModel } from "@automovie/interface";
|
|
66
|
-
import * as THREE from "three";
|
|
67
|
-
|
|
68
|
-
declare const model: IAutoMovieModel;
|
|
69
|
-
declare const canvas: HTMLCanvasElement;
|
|
70
|
-
|
|
71
|
-
const scene = new THREE.Scene();
|
|
72
|
-
scene.add(buildModel(model).object);
|
|
73
|
-
scene.add(new THREE.HemisphereLight(0xffffff, 0x9aa3b2, 1.1));
|
|
74
|
-
|
|
75
|
-
const camera = new THREE.PerspectiveCamera(40, 1, 0.05, 100);
|
|
76
|
-
camera.position.set(0, 1, 3.8);
|
|
77
|
-
|
|
78
|
-
const viewer = mountViewer(canvas, scene, camera, (elapsedSeconds) => {
|
|
79
|
-
// advance an AutoMoviePlayer or apply a pose here
|
|
80
|
-
});
|
|
81
|
-
// viewer.stop() ends the loop and releases the renderer.
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Entry points
|
|
85
|
-
|
|
86
|
-
- Inspector: `mountAutoMovieInspectorPage`, `AutoMovieInspector`, `createAutoMovieInspectorAddressWriter`.
|
|
87
|
-
- Imperative display: `mountViewer`, `releaseMountedViewer`, `createViewerDisplaySave`.
|
|
88
|
-
- Audio and transport: `playAutoMovieAudioCues`, `AutoMovieViewerTransport`.
|
|
89
|
-
|
|
90
|
-
Units and the owner of each returned object are in the JSDoc.
|
|
91
|
-
|
|
92
|
-
## Ownership
|
|
93
|
-
|
|
94
|
-
The viewer releases what it creates and leaves alone what you pass in. Render's `dispose` functions free the geometry, materials, textures and render targets they built, never your renderer, scene or source data. Parts of one built model that use the same joints share a skeleton, so dispose of a model through render's `collectAutoMovieOwnedResources`, which lists each shared resource once.
|
|
15
|
+
Call `mountAutoMovieInspectorPage` with a root element and the same subject record you give the capture host. The URL records the inspection request. The inspector displays the capture command that repeats it.
|
|
95
16
|
|
|
96
|
-
|
|
17
|
+
Use `AutoMovieInspector` to embed the component in a React application. Use `mountViewer` for a canvas and playback handles without React controls.
|
|
97
18
|
|
|
98
|
-
|
|
19
|
+
See [the generated entry point](https://github.com/samchon/automovie/blob/master/packages/template/scaffold/production/src/main.ts) and the [capture request reference](https://github.com/samchon/automovie/blob/master/packages/render/docs/capture-requests.md).
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import type * as THREE from "three";
|
|
2
|
+
import type { IViewerFrameTransfer } from "./IViewerFrameTransfer.js";
|
|
2
3
|
/**
|
|
3
|
-
* The original scene/camera at an owning producer's completed draw boundary.
|
|
4
|
-
*
|
|
4
|
+
* The original scene/camera at an owning producer's completed draw boundary. A
|
|
5
|
+
* controller, when supplied, owns typed state capture/restoration. Consumers
|
|
5
6
|
* observe synchronously and must not treat requested state as rendered facts.
|
|
6
|
-
*
|
|
7
|
-
* @evidence contracts/development/design.md#principled-representation Carries original draw-completion scene/camera/pass and optional observed clock, with an application-owned state controller for capture, restoration, explicit redraw and clock freezing; composite layer facts remain separate from original native objects.
|
|
8
|
-
* @evidence contracts/development/design.md#minimal-and-owned-surface The producer publishes one completion record while numerical application admission and transport consumers retain their own responsibilities; optional fields distinguish unavailable observations from false or zero values.
|
|
9
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts Requested state never substitutes for completed rendering; changed=false preserves idle facts, absent changed preserves eager saving and application-document changes still require fresh display facts.
|
|
10
|
-
* @evidence contracts/development/common.md#meaningful-documentation Defines native versus composite objects, optional time semantics, numerical application prerequisite, idle/change classification and controller ownership.
|
|
11
7
|
*/
|
|
12
8
|
export interface IAutoMovieViewerCompletedFrame {
|
|
13
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Native camera used by the original draw; composite layer cameras belong in
|
|
11
|
+
* facts.
|
|
12
|
+
*/
|
|
14
13
|
camera: THREE.Camera;
|
|
15
14
|
/** Original drawn scene; composite facts retain each layer's observed objects. */
|
|
16
15
|
scene: THREE.Scene;
|
|
@@ -36,9 +35,9 @@ export interface IAutoMovieViewerCompletedFrame {
|
|
|
36
35
|
/** Actual application controller; its state is serialized only by its owner. */
|
|
37
36
|
control?: {
|
|
38
37
|
/** Capture application-owned state corresponding to the live completed view. */
|
|
39
|
-
capture: () =>
|
|
40
|
-
/** Restore
|
|
41
|
-
restore: (state:
|
|
38
|
+
capture: () => IViewerFrameTransfer;
|
|
39
|
+
/** Restore a state this controller captured. */
|
|
40
|
+
restore: (state: IViewerFrameTransfer) => void;
|
|
42
41
|
/** Synchronously redraw through the original producer or report failure. */
|
|
43
42
|
redraw?: () => void;
|
|
44
43
|
/**
|
|
@@ -49,3 +48,12 @@ export interface IAutoMovieViewerCompletedFrame {
|
|
|
49
48
|
freeze?: () => () => void;
|
|
50
49
|
};
|
|
51
50
|
}
|
|
51
|
+
declare global {
|
|
52
|
+
interface HTMLElementEventMap {
|
|
53
|
+
/**
|
|
54
|
+
* A frame the viewer completed, sent to a canvas whose
|
|
55
|
+
* `data-automovie-frame-observer` attribute is `on`.
|
|
56
|
+
*/
|
|
57
|
+
"automovie:completed-frame": CustomEvent<IAutoMovieViewerCompletedFrame>;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
* Facts from the owner of an actually completed interactive display.
|
|
3
3
|
* Application identity and requested values remain separate from observations.
|
|
4
4
|
* This transport record establishes no review acceptance.
|
|
5
|
-
*
|
|
6
|
-
* @evidence contracts/development/design.md#principled-representation Records loaded revision, actual native renderer and completed display address/camera as observations, keeping application requests separate from the facts of a drawn viewport.
|
|
7
|
-
* @evidence contracts/development/design.md#minimal-and-owned-surface Required provenance fields give the display transport a shared minimum while the unknown-valued index signature permits application-owned facts without pretending they are a universal schema.
|
|
8
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts Metadata cannot substitute requested camera or document state for completed observations and makes no visual-review acceptance claim.
|
|
9
|
-
* @evidence contracts/development/common.md#meaningful-documentation Identifies actual loaded source, native device, displayed application identity, observed camera and the distinction between transport facts and review acceptance.
|
|
10
5
|
*/
|
|
11
6
|
export interface IAutoMovieViewerDisplayMetadata {
|
|
12
7
|
/** Actual loaded application source identity. */
|
|
@@ -2,41 +2,19 @@ import type * as THREE from "three";
|
|
|
2
2
|
/**
|
|
3
3
|
* Handle returned by {@link mountViewer}; call `stop()` to end the loop and
|
|
4
4
|
* release the renderer, including any dissolve GPU state the frames created.
|
|
5
|
-
*
|
|
6
|
-
* @evidence contracts/development/design.md#principled-representation Pairs the mount-owned renderer with original external-draw completion and complete loop/resource shutdown, allowing explicit host draws to publish actual frame time without inventing a second render owner.
|
|
7
|
-
* @evidence contracts/development/design.md#minimal-and-owned-surface The handle exposes only renderer access, completion publication and lifecycle end; mountViewer retains loop timing, camera transfer and observer details.
|
|
8
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts Completion follows the original draw rather than an extra capture-only render, and guide redraws preserve the last completed clock when no new time is supplied.
|
|
9
|
-
* @evidence contracts/development/common.md#meaningful-documentation Documents mount-owned renderer, external draw-completion ordering, optional playback seconds and failure-propagating cleanup categories.
|
|
10
5
|
*/
|
|
11
6
|
export interface IAutoMovieViewerHandle {
|
|
12
|
-
/**
|
|
13
|
-
* Renderer allocated by this mount and shared with the host's explicit draws.
|
|
14
|
-
*/
|
|
7
|
+
/** Renderer allocated by this mount and shared with the host's explicit draws. */
|
|
15
8
|
renderer: THREE.WebGLRenderer;
|
|
16
9
|
/**
|
|
17
10
|
* Publish immediately after this handle's original external draw completes.
|
|
18
11
|
* Optional seconds are that draw's actual playback time; a guide redraw
|
|
19
12
|
* preserves the completed clock when no new time is supplied.
|
|
20
|
-
*
|
|
21
|
-
* @evidence contracts/development/implementation.md#principled-implementation Notifies observers immediately after an original external draw, using supplied actual seconds or the preserved completed clock rather than advancing playback for a guide capture.
|
|
22
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure External producers call the mount's existing completion path so handled and ordinary frames share timing and state transfer.
|
|
23
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Publication does not replace WebGLRenderer.render or create a synthetic verification draw; the calling original producer owns completion truth.
|
|
24
|
-
* @evidence contracts/development/common.md#meaningful-documentation States draw-before-publication ordering and optional time meaning for seek versus guide redraw.
|
|
25
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Completion records and synchronous subscriber delivery have cost proportional to observer work, without walking scene meshes or reading pixels in this callback.
|
|
26
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Explicit original draws remain meaningful events even when state facts match, so completion effects are not shared blindly.
|
|
27
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Completion publication borrows current scene and camera and starts no new renderer or animation task.
|
|
28
13
|
*/
|
|
29
14
|
completeFrame: (elapsedSeconds?: number) => void;
|
|
30
15
|
/**
|
|
31
|
-
* Stop the mounted loop and attempt each owned shadow, compositor and
|
|
32
|
-
*
|
|
33
|
-
* @evidence contracts/development/implementation.md#principled-implementation Ends the mount's loop and delegates independent scene-shadow, compositor and renderer retirement to releaseMountedViewer, preserving cleanup causes after all owners are attempted.
|
|
34
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One stop callback is the mount lifetime boundary; resource-specific disposal remains with the existing release helpers.
|
|
35
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A throwing listener cannot certify successful shutdown or authorize disposing caller-owned scene model materials.
|
|
36
|
-
* @evidence contracts/development/common.md#meaningful-documentation Names the loop, shadow, compositor and renderer retirement obligations and failure propagation.
|
|
37
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Retirement scans scene shadow lights and a fixed number of renderer/compositor owners, without rebuilding or resampling scene geometry.
|
|
38
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work The mount's sticky synchronous restoration guard starts stop once and preserves its original failure for repeated callers; renderer-specific compositor guards own their separate retirement outcomes.
|
|
39
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Stops scheduling mounted work and attempts owned native release while leaving model-resource lifetime with the host; a failed retirement remains a reported uncertainty.
|
|
16
|
+
* Stop the mounted loop and attempt each owned shadow, compositor and
|
|
17
|
+
* renderer retirement; cleanup failures propagate.
|
|
40
18
|
*/
|
|
41
19
|
stop: () => void;
|
|
42
20
|
}
|
|
@@ -1,61 +1,47 @@
|
|
|
1
1
|
import type { IAutoMovieViewerCompletedFrame } from "./IAutoMovieViewerCompletedFrame.js";
|
|
2
2
|
/**
|
|
3
|
-
* Context creation and original-producer completion settings for one mounted
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @evidence contracts/development/design.md#minimal-and-owned-surface One options shape keeps native context settings separate from the mount's loop and the producer's actual completed-frame observation.
|
|
7
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts Disabling antialiasing avoids blended structural boundaries but is not a claim of GPU-independent output; handled draws need original completion rather than an invented verification render.
|
|
8
|
-
* @evidence contracts/development/common.md#meaningful-documentation Members describe defaults, creation-only settings, output sizing and required handled-frame completion/redraw ownership.
|
|
3
|
+
* Context creation and original-producer completion settings for one mounted
|
|
4
|
+
* viewer. These values configure output conditions; they do not independently
|
|
5
|
+
* certify cross-hardware pixel equality or actual rendered appearance.
|
|
9
6
|
*/
|
|
10
7
|
export interface IMountViewerOptions {
|
|
11
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Creation-time multisample antialiasing, true by default; false avoids
|
|
10
|
+
* segment-edge blending without proving cross-GPU byte equality.
|
|
11
|
+
*/
|
|
12
12
|
antialias?: boolean;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Fixed canvas pixel ratio; absence follows the current device ratio. Capture
|
|
15
|
+
* hosts pin one for fixed output dimensions. CSS layout owns the logical
|
|
16
|
+
* canvas dimensions.
|
|
17
|
+
*/
|
|
14
18
|
pixelRatio?: number;
|
|
15
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Creation-time native buffer preservation, false by default; an explicit
|
|
21
|
+
* readback host must choose its required lifetime.
|
|
22
|
+
*/
|
|
16
23
|
preserveDrawingBuffer?: boolean;
|
|
17
24
|
/**
|
|
18
|
-
* Return the original handled producer's completed scene/camera/pass, or
|
|
19
|
-
*
|
|
20
|
-
* @evidence contracts/development/implementation.md#principled-implementation The hook exposes the producer's actual completed draw rather than a requested display state or nominal scene passed to mount.
|
|
21
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Handled composites retain completion ownership while mount attaches its clock/control to the supplied record.
|
|
22
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An absent handled completion is not replaced with a fabricated ordinary beauty observation.
|
|
23
|
-
* @evidence contracts/development/common.md#meaningful-documentation The member documents original-producer facts and explicit unavailable observation.
|
|
24
|
-
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms This observation capability selects no scene rendering or composition algorithm.
|
|
25
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Record identity suppresses idle ordinary publication in mount but is not by itself canonical pixel/source equivalence.
|
|
26
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The hook borrows producer state; the mounted owner retains its callback for that mount's lifetime.
|
|
25
|
+
* Return the original handled producer's completed scene/camera/pass, or
|
|
26
|
+
* undefined when it has no completed observation.
|
|
27
27
|
*/
|
|
28
28
|
completedFrame?: () => Omit<IAutoMovieViewerCompletedFrame, "control"> | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* Redraw the handled frame at the requested seconds through its original
|
|
31
31
|
* producer and complete that draw synchronously. Restore supplies the saved
|
|
32
32
|
* production time; ordinary redraw supplies the last completed time. Refusal
|
|
33
|
-
* throws. Call completeFrame after the draw, or expose a distinct new
|
|
34
|
-
* record through completedFrame; retaining the previous record is
|
|
35
|
-
*
|
|
36
|
-
* @evidence contracts/development/implementation.md#principled-implementation Explicit redraw delegates the requested completed seconds to the same producer that owns the handled frame and mount checks that a completion was published. A producer with its own clock restores that clock before drawing.
|
|
37
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The mount supplies preserved clock/control while the producer retains its composite render sequence.
|
|
38
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Redraw does not substitute the nominal scene for an unobserved composite or relabel a previous producer record. Explicit completion or a newly exposed producer record must attest the requested time; refusal throws.
|
|
39
|
-
* @evidence contracts/development/common.md#meaningful-documentation The member states original-producer redraw, requested seconds for restoration versus ordinary redraw, and synchronous completion responsibility.
|
|
40
|
-
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms This redraw capability chooses no multipass or guide rendering strategy.
|
|
41
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Redraw is an individual render effect under the current completed clock and cannot be cached by matching options.
|
|
42
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The callback borrows its producer's resources; that producer owns pass restoration and mount owns renderer/loop lifetime.
|
|
33
|
+
* throws. Call completeFrame after the draw, or expose a distinct new
|
|
34
|
+
* producer record through completedFrame; retaining the previous record is
|
|
35
|
+
* not completion.
|
|
43
36
|
*/
|
|
44
37
|
redrawCompleted?: (elapsedSeconds: number) => void;
|
|
45
38
|
/**
|
|
46
39
|
* Pause an independently owned producer clock/audio for the outermost freeze.
|
|
47
40
|
* Return synchronous cleanup: resume=true on the last normal release and
|
|
48
41
|
* resume=false when the mount stops. Nested freezes share this lease. The
|
|
49
|
-
* mount suppresses animation ticks while frozen; explicit redraw/restore
|
|
50
|
-
* completes through the original producer. A throwing acquisition owns
|
|
51
|
-
*
|
|
52
|
-
* @evidence contracts/development/implementation.md#principled-implementation Delegates independent clock/audio pause to their actual producer owner and distinguishes resumption from terminal release; mount keeps nested lease accounting and animation suppression.
|
|
53
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One optional producer lease complements original redraw ownership without making Viewer own media playback or a production clock.
|
|
54
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Ordinary mount-clock producers need no callback; independently advancing state is paused through its owner rather than a substituted time argument.
|
|
55
|
-
* @evidence contracts/development/common.md#meaningful-documentation States outermost acquisition, final and terminal release flags, synchronous ownership, nested behavior, explicit draws and failed-acquisition rollback.
|
|
56
|
-
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms This callback type performs no playback calculation itself.
|
|
57
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The controller shares the outer producer lease; this declaration retains no cache.
|
|
58
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources A mounted controller retains at most one acquired producer cleanup and consumes it on final release or terminal disposal; the producer owns any async tasks it starts during resumption.
|
|
42
|
+
* mount suppresses animation ticks while frozen; explicit redraw/restore
|
|
43
|
+
* still completes through the original producer. A throwing acquisition owns
|
|
44
|
+
* rollback.
|
|
59
45
|
*/
|
|
60
46
|
freezeCompleted?: () => (resume: boolean) => void;
|
|
61
47
|
}
|
|
@@ -2,11 +2,6 @@ import type * as THREE from "three";
|
|
|
2
2
|
/**
|
|
3
3
|
* Detached native camera state admitted by createViewerCameraState.restore.
|
|
4
4
|
* Vectors and lens values are local native camera data, not a world hierarchy.
|
|
5
|
-
*
|
|
6
|
-
* @evidence contracts/development/design.md#principled-representation The record contains copied native lens, TRS, layers and projection state for detached auto-updating PerspectiveCamera or OrthographicCamera. Unknown restore input is checked against a native candidate; this interface itself performs no runtime admission.
|
|
7
|
-
* @evidence contracts/development/design.md#minimal-and-owned-surface One named transfer record exposes the existing camera payload so another exported transfer can name its return type. It introduces no alternate camera solver or new fields.
|
|
8
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts Lens discriminants retain the two supported native classes; projection arrays are not accepted as a shortcut around lens parity, and parent relationships are not guessed.
|
|
9
|
-
* @evidence contracts/development/common.md#meaningful-documentation Fields state local vector and quaternion order, metre/millimetre/degree units, layer mask and view offset optionality. The comment identifies the runtime admission owner.
|
|
10
5
|
*/
|
|
11
6
|
export interface IViewerCameraStateSnapshot {
|
|
12
7
|
/** Native camera class identity; restore requires the same current class. */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IViewerCameraStateSnapshot } from "./IViewerCameraStateSnapshot.js";
|
|
2
|
+
/**
|
|
3
|
+
* A mounted frame's transfer state, captured and restored by its frame
|
|
4
|
+
* controller: the native camera and the scene time it was drawn at.
|
|
5
|
+
*/
|
|
6
|
+
export interface IViewerFrameTransfer {
|
|
7
|
+
/** Native camera state of the completed view. */
|
|
8
|
+
camera: IViewerCameraStateSnapshot;
|
|
9
|
+
/** Scene seconds of the completed view, finite and nonnegative. */
|
|
10
|
+
elapsedSeconds: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IViewerFrameTransfer.js","sourceRoot":"","sources":["../src/IViewerFrameTransfer.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Set a capture canvas's CSS width and height to the supplied finite positive
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Performs two finite-positive checks and at most two style writes, with constant time and temporary string storage independent of frame pixel count.
|
|
9
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Creates no derived raster or cache; repeated writes target the same mutable DOM style and have no stored equivalence key.
|
|
10
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows the canvas during the call and retains no DOM reference, observer, renderer or task; installed CSS values remain owned by the host element.
|
|
2
|
+
* Set a capture canvas's CSS width and height to the supplied finite positive
|
|
3
|
+
* dimensions. Invalid dimensions leave both current styles unchanged, allowing
|
|
4
|
+
* an untouched interactive canvas to keep its responsive CSS. This adapter does
|
|
5
|
+
* not set the backing raster, device pixel ratio, screenshot bounds or encoded
|
|
6
|
+
* video size; the rendering and capture hosts own their agreement with these
|
|
7
|
+
* CSS dimensions.
|
|
11
8
|
*/
|
|
12
|
-
export declare const applyCaptureCanvasSize: (canvas:
|
|
9
|
+
export declare const applyCaptureCanvasSize: (canvas: {
|
|
10
|
+
style: Pick<HTMLCanvasElement["style"], "width" | "height">;
|
|
11
|
+
}, width: number, height: number) => void;
|
|
@@ -2,21 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.applyCaptureCanvasSize = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Set a capture canvas's CSS width and height to the supplied finite positive
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Performs two finite-positive checks and at most two style writes, with constant time and temporary string storage independent of frame pixel count.
|
|
12
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Creates no derived raster or cache; repeated writes target the same mutable DOM style and have no stored equivalence key.
|
|
13
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows the canvas during the call and retains no DOM reference, observer, renderer or task; installed CSS values remain owned by the host element.
|
|
5
|
+
* Set a capture canvas's CSS width and height to the supplied finite positive
|
|
6
|
+
* dimensions. Invalid dimensions leave both current styles unchanged, allowing
|
|
7
|
+
* an untouched interactive canvas to keep its responsive CSS. This adapter does
|
|
8
|
+
* not set the backing raster, device pixel ratio, screenshot bounds or encoded
|
|
9
|
+
* video size; the rendering and capture hosts own their agreement with these
|
|
10
|
+
* CSS dimensions.
|
|
14
11
|
*/
|
|
15
12
|
const applyCaptureCanvasSize = (canvas, width, height) => {
|
|
16
|
-
if (
|
|
17
|
-
width <= 0 ||
|
|
18
|
-
!Number.isFinite(height) ||
|
|
19
|
-
height <= 0)
|
|
13
|
+
if (width <= 0 || height <= 0)
|
|
20
14
|
return;
|
|
21
15
|
canvas.style.width = `${width}px`;
|
|
22
16
|
canvas.style.height = `${height}px`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyCaptureCanvasSize.js","sourceRoot":"","sources":["../src/applyCaptureCanvasSize.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"applyCaptureCanvasSize.js","sourceRoot":"","sources":["../src/applyCaptureCanvasSize.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACI,MAAM,sBAAsB,GAIvB,CACV,MAAuE,EACvE,KAAa,EACb,MAAc,EACR,EAAE;IACR,IAAI,KAAK,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC;QAAE,OAAO;IACtC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC;AACtC,CAAC,CAAC;AAZW,QAAA,sBAAsB,GAAtB,sBAAsB,CAYjC"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
// src/applyCaptureCanvasSize.ts
|
|
2
2
|
/**
|
|
3
|
-
* Set a capture canvas's CSS width and height to the supplied finite positive
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Performs two finite-positive checks and at most two style writes, with constant time and temporary string storage independent of frame pixel count.
|
|
10
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Creates no derived raster or cache; repeated writes target the same mutable DOM style and have no stored equivalence key.
|
|
11
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows the canvas during the call and retains no DOM reference, observer, renderer or task; installed CSS values remain owned by the host element.
|
|
3
|
+
* Set a capture canvas's CSS width and height to the supplied finite positive
|
|
4
|
+
* dimensions. Invalid dimensions leave both current styles unchanged, allowing
|
|
5
|
+
* an untouched interactive canvas to keep its responsive CSS. This adapter does
|
|
6
|
+
* not set the backing raster, device pixel ratio, screenshot bounds or encoded
|
|
7
|
+
* video size; the rendering and capture hosts own their agreement with these
|
|
8
|
+
* CSS dimensions.
|
|
12
9
|
*/
|
|
13
10
|
const applyCaptureCanvasSize = (canvas, width, height) => {
|
|
14
|
-
if (
|
|
11
|
+
if (width <= 0 || height <= 0) return;
|
|
15
12
|
canvas.style.width = `${width}px`;
|
|
16
13
|
canvas.style.height = `${height}px`;
|
|
17
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyCaptureCanvasSize.mjs","names":[],"sources":["../src/applyCaptureCanvasSize.ts"],"sourcesContent":["/**\n * Set a capture canvas's CSS width and height to the supplied finite positive dimensions. Invalid dimensions leave both current styles unchanged, allowing an untouched interactive canvas to keep its responsive CSS. This adapter does not set the backing raster, device pixel ratio, screenshot bounds or encoded video size; the rendering and capture hosts own their agreement with these
|
|
1
|
+
{"version":3,"file":"applyCaptureCanvasSize.mjs","names":[],"sources":["../src/applyCaptureCanvasSize.ts"],"sourcesContent":["/**\n * Set a capture canvas's CSS width and height to the supplied finite positive\n * dimensions. Invalid dimensions leave both current styles unchanged, allowing\n * an untouched interactive canvas to keep its responsive CSS. This adapter does\n * not set the backing raster, device pixel ratio, screenshot bounds or encoded\n * video size; the rendering and capture hosts own their agreement with these\n * CSS dimensions.\n */\nexport const applyCaptureCanvasSize: (\n canvas: { style: Pick<HTMLCanvasElement[\"style\"], \"width\" | \"height\"> },\n width: number,\n height: number,\n) => void = (\n canvas: { style: Pick<HTMLCanvasElement[\"style\"], \"width\" | \"height\"> },\n width: number,\n height: number,\n): void => {\n if (width <= 0 || height <= 0) return;\n canvas.style.width = `${width}px`;\n canvas.style.height = `${height}px`;\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,0BAKX,QACA,OACA,WACS;CACT,IAAI,SAAS,KAAK,UAAU,GAAG;CAC/B,OAAO,MAAM,QAAQ,GAAG,MAAM;CAC9B,OAAO,MAAM,SAAS,GAAG,OAAO;AAClC"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* One placed audio source excerpt on the film clock
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (One placed audio source excerpt on the film clock, the same shape the Render mixer (`mixAutoMovieAudioPcm`) sums, so Viewer playback and the exported soundtrack read one cue list) and documents 7 documented members as stated in this comment.
|
|
7
|
-
* @evidence contracts/development/design.md#principled-representation Represents One placed audio source excerpt on the film clock, the same shape the Render mixer (`mixAutoMovieAudioPcm`) sums, so Viewer playback and the exported soundtrack read one cue list: interface of 7 members (`asset`, `seconds`, `gain`, `pan`, `offsetSeconds`, `durationSeconds`, ...); units and frames named in its text: seconds, second. Optional members `pan`, `offsetSeconds`, `durationSeconds`, `rate` express documented absence, and the ranges its member docs state are left to runtime validation.
|
|
8
|
-
* @evidence contracts/development/design.md#minimal-and-owned-surface Owned by the module that declares `IAutoMovieAudioCue` in packages/viewer/src/audio/IAutoMovieAudioCue.ts; its surface is the 7 members listed and the text shows 6 other files naming it, mostly packages/interface (3), packages/viewer (3), so no member is declared for a presumed future need.
|
|
9
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts Scanning the declaration finds no `any`, no `unknown`, no index signature and no cast; 4 optional members (`pan`, `offsetSeconds`, `durationSeconds`, `rate`) are independent fields rather than alternatives of one another as far as their docs state; it duplicates no type that another owner declares as far as a name search shows.
|
|
2
|
+
* One placed audio source excerpt on the film clock. A film's master comes only
|
|
3
|
+
* from engine's `renderProductionSound`; to hear what the delivery encodes,
|
|
4
|
+
* play the film's mixed soundtrack as one cue at second 0 and unit gain.
|
|
10
5
|
*/
|
|
11
6
|
export interface IAutoMovieAudioCue {
|
|
12
7
|
/** Source id. */
|
|
@@ -2,34 +2,21 @@ import type { IAutoMovieAudioCue } from "./IAutoMovieAudioCue.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Which cues sound when playback starts at a film instant and runs at a
|
|
4
4
|
* transport rate, and how each is started: a cue already sounding starts at
|
|
5
|
-
* once part-way into its excerpt, a later cue after its film delay divided
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* once part-way into its excerpt, a later cue after its film delay divided by
|
|
6
|
+
* the transport rate, and an ended cue not at all. Source offsets advance by
|
|
7
|
+
* the cue's own rate times the elapsed film seconds, and the playback rate
|
|
8
|
+
* multiplies the cue rate by the transport rate. Pure, so a seek and a resume
|
|
9
|
+
* plan the same playback from the same instant.
|
|
10
10
|
*
|
|
11
11
|
* @param cues The cue list.
|
|
12
12
|
* @param seconds The film instant playback starts from.
|
|
13
13
|
* @param rate Film seconds per wall second; positive.
|
|
14
|
-
* @param lengths Source length in seconds by asset, for cues without a
|
|
14
|
+
* @param lengths Source length in seconds by asset, for cues without a
|
|
15
|
+
* duration.
|
|
15
16
|
* @returns One start per sounding cue, in cue order.
|
|
16
|
-
* @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Which cues sound when playback starts at a film instant and runs at a transport rate, and how each is started: a cue already sounding starts at once part-way into its excerpt, a later cue after its film delay divided by the transport rate, and an ended cue not at all) and documents parameters `cues`, `seconds`, `rate`, `lengths`, the returned value as stated in this comment.
|
|
17
|
-
* @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Which cues sound when playback starts at a film instant and runs at a transport rate, and how each is started: a cue already sounding starts at once part-way into its excerpt, a later cue after its film delay divided by the transport rate, and an ended cue not at all) directly over its typed inputs (`cues`, `seconds`, `rate`, `lengths`) as a single pass (for-of over cues), delegating to `Number.isFinite`, `Math.max`, `starts.push`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (2 throw sites). Apart from structural 0, 1 and 2 the body uses no numeric literal.
|
|
18
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 25 lines and 4 top-level statements that reuses `Number.isFinite`, `Math.max`, `starts.push` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.
|
|
19
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Scanning the body finds no `any`, type assertion, non-null assertion, suppression directive or TODO, and no branch keyed on a consumer, fixture or expected answer; values come from its parameters.
|
|
20
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `cues`, `seconds`, `rate`, `lengths`; the dominant cost is a single pass (for-of over cues), performed once per call with 4 allocation sites (literals and constructed values). No speedup is claimed and none is measured.
|
|
21
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.
|
|
22
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 4 allocation sites become the returned value or die with the call, so nothing grows.
|
|
23
17
|
*/
|
|
24
18
|
export declare function planAutoMovieAudioPlayback(cues: readonly IAutoMovieAudioCue[], seconds: number, rate: number, lengths: Readonly<Record<string, number>>): planAutoMovieAudioPlayback.IStart[];
|
|
25
|
-
/**
|
|
26
|
-
* Companion types of {@link planAutoMovieAudioPlayback}.
|
|
27
|
-
*
|
|
28
|
-
* @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Companion types of ) and documents 1 documented member as stated in this comment.
|
|
29
|
-
* @evidence contracts/development/design.md#principled-representation Represents Companion types of : companion namespace of 1 member (`IStart`); units and frames named in its text: seconds, second. It has no optional member, so no absent-value state combines with another.
|
|
30
|
-
* @evidence contracts/development/design.md#minimal-and-owned-surface Owned by the module that declares `planAutoMovieAudioPlayback` in packages/viewer/src/audio/planAutoMovieAudioPlayback.ts; its surface is the 1 member listed and the text shows 3 other files naming it, mostly packages/viewer (2), test (1), so no member is declared for a presumed future need.
|
|
31
|
-
* @evidence contracts/development/design.md#prohibited-design-shortcuts Scanning the declaration finds no `any`, no `unknown`, no index signature and no cast; it duplicates no type that another owner declares as far as a name search shows.
|
|
32
|
-
*/
|
|
19
|
+
/** Companion types of {@link planAutoMovieAudioPlayback}. */
|
|
33
20
|
export declare namespace planAutoMovieAudioPlayback {
|
|
34
21
|
/** One planned source start. */
|
|
35
22
|
interface IStart {
|
|
@@ -4,27 +4,21 @@ exports.planAutoMovieAudioPlayback = planAutoMovieAudioPlayback;
|
|
|
4
4
|
/**
|
|
5
5
|
* Which cues sound when playback starts at a film instant and runs at a
|
|
6
6
|
* transport rate, and how each is started: a cue already sounding starts at
|
|
7
|
-
* once part-way into its excerpt, a later cue after its film delay divided
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* once part-way into its excerpt, a later cue after its film delay divided by
|
|
8
|
+
* the transport rate, and an ended cue not at all. Source offsets advance by
|
|
9
|
+
* the cue's own rate times the elapsed film seconds, and the playback rate
|
|
10
|
+
* multiplies the cue rate by the transport rate. Pure, so a seek and a resume
|
|
11
|
+
* plan the same playback from the same instant.
|
|
12
12
|
*
|
|
13
13
|
* @param cues The cue list.
|
|
14
14
|
* @param seconds The film instant playback starts from.
|
|
15
15
|
* @param rate Film seconds per wall second; positive.
|
|
16
|
-
* @param lengths Source length in seconds by asset, for cues without a
|
|
16
|
+
* @param lengths Source length in seconds by asset, for cues without a
|
|
17
|
+
* duration.
|
|
17
18
|
* @returns One start per sounding cue, in cue order.
|
|
18
|
-
* @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Which cues sound when playback starts at a film instant and runs at a transport rate, and how each is started: a cue already sounding starts at once part-way into its excerpt, a later cue after its film delay divided by the transport rate, and an ended cue not at all) and documents parameters `cues`, `seconds`, `rate`, `lengths`, the returned value as stated in this comment.
|
|
19
|
-
* @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Which cues sound when playback starts at a film instant and runs at a transport rate, and how each is started: a cue already sounding starts at once part-way into its excerpt, a later cue after its film delay divided by the transport rate, and an ended cue not at all) directly over its typed inputs (`cues`, `seconds`, `rate`, `lengths`) as a single pass (for-of over cues), delegating to `Number.isFinite`, `Math.max`, `starts.push`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (2 throw sites). Apart from structural 0, 1 and 2 the body uses no numeric literal.
|
|
20
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 25 lines and 4 top-level statements that reuses `Number.isFinite`, `Math.max`, `starts.push` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.
|
|
21
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Scanning the body finds no `any`, type assertion, non-null assertion, suppression directive or TODO, and no branch keyed on a consumer, fixture or expected answer; values come from its parameters.
|
|
22
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `cues`, `seconds`, `rate`, `lengths`; the dominant cost is a single pass (for-of over cues), performed once per call with 4 allocation sites (literals and constructed values). No speedup is claimed and none is measured.
|
|
23
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.
|
|
24
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 4 allocation sites become the returned value or die with the call, so nothing grows.
|
|
25
19
|
*/
|
|
26
20
|
function planAutoMovieAudioPlayback(cues, seconds, rate, lengths) {
|
|
27
|
-
if (!(rate > 0)
|
|
21
|
+
if (!(rate > 0))
|
|
28
22
|
throw new Error("Invalid audio playback instant or rate");
|
|
29
23
|
const starts = [];
|
|
30
24
|
for (const cue of cues) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planAutoMovieAudioPlayback.js","sourceRoot":"","sources":["../../src/audio/planAutoMovieAudioPlayback.ts"],"names":[],"mappings":";;;AAEA
|
|
1
|
+
{"version":3,"file":"planAutoMovieAudioPlayback.js","sourceRoot":"","sources":["../../src/audio/planAutoMovieAudioPlayback.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;GAeG;AACH,oCACE,IAAmC,EACnC,OAAe,EACf,IAAY,EACZ,OAAyC;IAEzC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC3E,MAAM,MAAM,GAAwC,EAAE,CAAC;IACvD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,KAAK,GAAW,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC;QACpC,MAAM,MAAM,GAAW,GAAG,CAAC,aAAa,IAAI,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAuB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtD,IAAI,MAAM,KAAK,SAAS;YACtB,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;QACtD,MAAM,QAAQ,GAAW,GAAG,CAAC,eAAe,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;QAC1E,MAAM,OAAO,GAAW,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3D,IAAI,OAAO,IAAI,QAAQ;YAAE,SAAS;QAClC,MAAM,CAAC,IAAI,CAAC;YACV,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,IAAI;YAChD,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK;YAChC,QAAQ,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,IAAI;YACrC,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;YACjB,YAAY,EAAE,KAAK,GAAG,IAAI;SAC3B,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|