@automovie/viewer 0.3.4 → 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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { IAutoMovieInspectionLabel } from "@automovie/interface";
|
|
2
|
+
import type { IAutoMovieInspectionHandle } from "@automovie/render";
|
|
3
|
+
import type * as THREE from "three";
|
|
4
|
+
|
|
5
|
+
import type { IAutoMovieInspectorScene } from "./IAutoMovieInspectorScene.js";
|
|
6
|
+
import type { IAutoMovieInspectorSceneHost } from "./IAutoMovieInspectorSceneHost.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Place a paused picture's labels and convert them to CSS pixels of the canvas.
|
|
10
|
+
*
|
|
11
|
+
* The inspection places labels on the subject's raster. Positions and the line
|
|
12
|
+
* height scale by the ratio of the canvas's size to that raster, and the
|
|
13
|
+
* stamp's font pixel stays at least one CSS pixel, as a capture keeps it at
|
|
14
|
+
* least one sheet pixel.
|
|
15
|
+
*
|
|
16
|
+
* @param props The applied inspection, the camera drawn through, the subject's
|
|
17
|
+
* raster and the canvas size shown.
|
|
18
|
+
* @returns The kept labels, their line height and the number dropped.
|
|
19
|
+
*/
|
|
20
|
+
export function placeAutoMovieInspectorLabels(props: {
|
|
21
|
+
/** The inspection applied to the picture. */
|
|
22
|
+
inspection: IAutoMovieInspectionHandle;
|
|
23
|
+
|
|
24
|
+
/** The camera the picture was drawn through. */
|
|
25
|
+
camera: THREE.Camera;
|
|
26
|
+
|
|
27
|
+
/** The subject's raster in pixels. */
|
|
28
|
+
raster: { width: number; height: number };
|
|
29
|
+
|
|
30
|
+
/** The canvas as laid out. */
|
|
31
|
+
shown: IAutoMovieInspectorSceneHost.ISize;
|
|
32
|
+
}): IAutoMovieInspectorScene.ILabels {
|
|
33
|
+
const { width, height } = props.raster;
|
|
34
|
+
const { shown } = props;
|
|
35
|
+
const scale: number = Math.max(1, Math.ceil(height / shown.height));
|
|
36
|
+
const placed: ReturnType<IAutoMovieInspectionHandle["labels"]> =
|
|
37
|
+
props.inspection.labels(props.camera, width, height, scale);
|
|
38
|
+
return {
|
|
39
|
+
labels: placed.labels.map(
|
|
40
|
+
(
|
|
41
|
+
label: IAutoMovieInspectionLabel,
|
|
42
|
+
): IAutoMovieInspectorScene.ILabels["labels"][number] => ({
|
|
43
|
+
path: label.path,
|
|
44
|
+
text: label.text,
|
|
45
|
+
left: (label.x * shown.width) / width,
|
|
46
|
+
top: (label.y * shown.height) / height,
|
|
47
|
+
}),
|
|
48
|
+
),
|
|
49
|
+
// The stamp's box is nine font pixels high.
|
|
50
|
+
lineHeight: (9 * scale * shown.height) / height,
|
|
51
|
+
dropped: placed.dropped.length,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -2,23 +2,20 @@ import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
|
|
|
2
2
|
import { parseAutoMovieCapturePlanRequest } from "@automovie/render";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Read the request an address names: its query text, with or without the
|
|
5
|
+
* Read the request an address names: its query text, with or without the
|
|
6
|
+
* leading `?`, through the capture plan grammar.
|
|
6
7
|
*
|
|
7
|
-
* The text is decoded by `URLSearchParams`, so `+` reads as a space and percent
|
|
8
|
+
* The text is decoded by `URLSearchParams`, so `+` reads as a space and percent
|
|
9
|
+
* escapes as their characters, and the parameters go to
|
|
10
|
+
* `parseAutoMovieCapturePlanRequest` as they are. The empty text is the request
|
|
11
|
+
* that asks for nothing.
|
|
8
12
|
*
|
|
9
|
-
* It throws the grammar's `Error`, which names the key, for an unknown key, a
|
|
13
|
+
* It throws the grammar's `Error`, which names the key, for an unknown key, a
|
|
14
|
+
* key given twice or a value the grammar refuses.
|
|
10
15
|
*
|
|
11
16
|
* ```ts
|
|
12
17
|
* const request = readAutoMovieInspectorAddress(location.search);
|
|
13
18
|
* ```
|
|
14
|
-
*
|
|
15
|
-
* @evidence contracts/development/common.md#meaningful-documentation States the accepted text, how it is decoded, what empty text gives and what a refusal names.
|
|
16
|
-
* @evidence contracts/development/implementation.md#principled-implementation `URLSearchParams` is the browser's own query decoder and satisfies the grammar's source as it is, so the page maps its address and parses nothing itself.
|
|
17
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Strip one `?`, decode, read.
|
|
18
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refusal reaches the caller; nothing falls back to a default request here.
|
|
19
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Linear in the text.
|
|
20
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure conversion of one text.
|
|
21
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh request and keeps nothing.
|
|
22
19
|
*/
|
|
23
20
|
export function readAutoMovieInspectorAddress(
|
|
24
21
|
text: string,
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type IApplyAutoMovieInspectionProps,
|
|
3
|
+
type IAutoMovieDrawScene,
|
|
4
|
+
type IAutoMovieViewerViewpoint,
|
|
5
|
+
autoMovieViewerNamedViewpoints,
|
|
6
|
+
listAutoMovieInspectionPaths,
|
|
7
|
+
} from "@automovie/render";
|
|
8
|
+
|
|
9
|
+
import type { IAutoMovieInspectorScene } from "./IAutoMovieInspectorScene.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* What the inspector learns from a subject placed at its first second: the
|
|
13
|
+
* paths of its scene and of the marks it supplies there, those marks, the kinds
|
|
14
|
+
* it declares, its own views and the viewer's named viewpoints, and its raster
|
|
15
|
+
* and clock.
|
|
16
|
+
*
|
|
17
|
+
* Paths are listed before any inspection adds its own objects to the scene, so
|
|
18
|
+
* the caller reads the facts before applying one.
|
|
19
|
+
*/
|
|
20
|
+
export function readAutoMovieInspectorFacts(props: {
|
|
21
|
+
/** The created subject, placed at `seconds`. */
|
|
22
|
+
instance: IAutoMovieDrawScene;
|
|
23
|
+
|
|
24
|
+
/** The placed second. */
|
|
25
|
+
seconds: number;
|
|
26
|
+
}): IAutoMovieInspectorScene.IFacts {
|
|
27
|
+
const { instance }: typeof props = props;
|
|
28
|
+
const marks: NonNullable<IApplyAutoMovieInspectionProps["marks"]> =
|
|
29
|
+
instance.marks?.(props.seconds) ?? [];
|
|
30
|
+
return {
|
|
31
|
+
paths: [
|
|
32
|
+
...listAutoMovieInspectionPaths(instance.scene).map(
|
|
33
|
+
({ path }: { path: string }): string => path,
|
|
34
|
+
),
|
|
35
|
+
...marks.map(({ path }: { path: string }): string => path),
|
|
36
|
+
],
|
|
37
|
+
marks,
|
|
38
|
+
markKinds: instance.markKinds ?? [],
|
|
39
|
+
views: [
|
|
40
|
+
...Object.keys(instance.views ?? {}),
|
|
41
|
+
...autoMovieViewerNamedViewpoints().map(
|
|
42
|
+
({ id }: IAutoMovieViewerViewpoint): string => id,
|
|
43
|
+
),
|
|
44
|
+
],
|
|
45
|
+
width: instance.width,
|
|
46
|
+
height: instance.height,
|
|
47
|
+
durationSeconds: instance.durationSeconds,
|
|
48
|
+
fps: instance.fps,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IAutoMovieDrawScene } from "@automovie/render";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Whether a subject reads its placed scene before each picture, so the
|
|
5
|
+
* inspector must lift an inspection that changes the scene around the seek: a
|
|
6
|
+
* subject that observes its placed scene (`inspectPlaced`), or one whose
|
|
7
|
+
* render-target work (`beforeDraw`), such as surface feeds, draws the scene
|
|
8
|
+
* with its own materials.
|
|
9
|
+
*/
|
|
10
|
+
export function readsAutoMovieInspectorPlacedScene(
|
|
11
|
+
instance: Pick<IAutoMovieDrawScene, "inspectPlaced" | "beforeDraw">,
|
|
12
|
+
): boolean {
|
|
13
|
+
return (
|
|
14
|
+
instance.inspectPlaced !== undefined || instance.beforeDraw !== undefined
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -19,17 +19,17 @@ const LISTS: Record<IAutoMovieInspectorAction.IToggle["type"], string> = {
|
|
|
19
19
|
/**
|
|
20
20
|
* Apply one edit to the inspector's request, the only way its request changes.
|
|
21
21
|
*
|
|
22
|
-
* The request is written as named text values by
|
|
22
|
+
* The request is written as named text values by
|
|
23
|
+
* `formatAutoMovieCapturePlanRequest`, the action changes the text of the key
|
|
24
|
+
* or keys the `IAutoMovieInspectorAction` table names, and the values are read
|
|
25
|
+
* back by `parseAutoMovieCapturePlanRequest`. The result has the request read
|
|
26
|
+
* and no error. When the reader refuses, the result keeps the previous request
|
|
27
|
+
* beside the reader's message, which names the key, so a mistyped address or a
|
|
28
|
+
* refused value never replaces the picture.
|
|
23
29
|
*
|
|
24
|
-
* A `text` action replaces every key with the address text's; a `restore`
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @evidence contracts/development/implementation.md#principled-implementation Editing the grammar's own text and reading it back means every control goes through the one reader the address and the command use, so the reducer restates no default, no validation and no member of the typed request; a key the reader adds starts working without a change here.
|
|
28
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Write, edit the keys of one action in one switch, read; list and colour edits share two small helpers.
|
|
29
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A refusal is reported, never patched by dropping the offending key, and the time edit removes the sampling keys `at` excludes instead of letting the reader refuse the mix.
|
|
30
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms One write and one read of the request, linear in its text, per dispatched edit; playback dispatches none.
|
|
31
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one state and one action.
|
|
32
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh state and keeps nothing.
|
|
30
|
+
* A `text` action replaces every key with the address text's; a `restore`
|
|
31
|
+
* action sets the scene's request and reason without reading anything. An edit
|
|
32
|
+
* that leaves the text unchanged returns an equal request.
|
|
33
33
|
*/
|
|
34
34
|
export function reduceAutoMovieInspectorState(
|
|
35
35
|
state: IAutoMovieInspectorState,
|
|
@@ -84,9 +84,12 @@ export function reduceAutoMovieInspectorState(
|
|
|
84
84
|
values.set("views", action.view);
|
|
85
85
|
break;
|
|
86
86
|
case "time":
|
|
87
|
+
case "locate":
|
|
87
88
|
// `at` excludes an even sampling, so its keys go.
|
|
88
89
|
for (const key of ["from", "to", "rate"]) values.delete(key);
|
|
89
90
|
values.set("at", String(action.seconds));
|
|
91
|
+
if (action.type === "locate")
|
|
92
|
+
edit(values, "label", (): string[] => [...action.label]);
|
|
90
93
|
break;
|
|
91
94
|
case "subject":
|
|
92
95
|
if (action.name === null) values.delete("subject");
|
|
@@ -100,7 +103,10 @@ export function reduceAutoMovieInspectorState(
|
|
|
100
103
|
);
|
|
101
104
|
}
|
|
102
105
|
|
|
103
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* The state a reading gives: its request, or the previous request with the
|
|
108
|
+
* refusal.
|
|
109
|
+
*/
|
|
104
110
|
function read(
|
|
105
111
|
state: IAutoMovieInspectorState,
|
|
106
112
|
reading: () => IAutoMovieCapturePlanRequest,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run every release step of an inspector mount in order, then throw every
|
|
3
|
+
* failure together: the one failure as it was, several as one `AggregateError`,
|
|
4
|
+
* so a failed step never keeps a later resource alive.
|
|
5
|
+
*/
|
|
6
|
+
export function releaseAutoMovieInspectorSteps(
|
|
7
|
+
steps: readonly (() => void)[],
|
|
8
|
+
): void {
|
|
9
|
+
const failures: unknown[] = [];
|
|
10
|
+
for (const step of steps)
|
|
11
|
+
try {
|
|
12
|
+
step();
|
|
13
|
+
} catch (error) {
|
|
14
|
+
failures.push(error);
|
|
15
|
+
}
|
|
16
|
+
if (failures.length === 1) throw failures[0];
|
|
17
|
+
if (failures.length > 1)
|
|
18
|
+
throw new AggregateError(failures, "The inspector mount failed to release");
|
|
19
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { IAutoMovieInspectionLegendEntry } from "@automovie/interface";
|
|
2
|
+
import type * as THREE from "three";
|
|
3
|
+
|
|
4
|
+
import type { IAutoMovieInspectorLive } from "./IAutoMovieInspectorLive.js";
|
|
5
|
+
import type { IAutoMovieInspectorScene } from "./IAutoMovieInspectorScene.js";
|
|
6
|
+
import { placeAutoMovieInspectorLabels } from "./placeAutoMovieInspectorLabels.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Report a painted picture's legend and labels: while paused, the inspection's
|
|
10
|
+
* legend with the witness legend and the labels placed on the picture's pixels;
|
|
11
|
+
* while playing, no labels, cleared once when the picture had some.
|
|
12
|
+
*/
|
|
13
|
+
export function reportAutoMovieInspectorLabels(props: {
|
|
14
|
+
/** The mount's live state, whose `labelled` flag this keeps. */
|
|
15
|
+
now: IAutoMovieInspectorLive;
|
|
16
|
+
|
|
17
|
+
/** Where the mount reports. */
|
|
18
|
+
report: IAutoMovieInspectorScene.IReport;
|
|
19
|
+
|
|
20
|
+
/** The camera the picture was drawn through. */
|
|
21
|
+
camera: THREE.Camera;
|
|
22
|
+
|
|
23
|
+
/** The witness cubes' legend of this picture. */
|
|
24
|
+
diagnosticLegend: readonly IAutoMovieInspectionLegendEntry[];
|
|
25
|
+
|
|
26
|
+
/** Whether the playhead is playing. */
|
|
27
|
+
playing: boolean;
|
|
28
|
+
}): void {
|
|
29
|
+
const { now, report }: typeof props = props;
|
|
30
|
+
if (!props.playing) {
|
|
31
|
+
report.legend([...now.inspection.legend, ...props.diagnosticLegend]);
|
|
32
|
+
report.labels(
|
|
33
|
+
placeAutoMovieInspectorLabels({
|
|
34
|
+
inspection: now.inspection,
|
|
35
|
+
camera: props.camera,
|
|
36
|
+
raster: now.instance,
|
|
37
|
+
shown: now.size!,
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
40
|
+
now.labelled = true;
|
|
41
|
+
} else if (now.labelled) {
|
|
42
|
+
report.labels({ labels: [], lineHeight: 0, dropped: 0 });
|
|
43
|
+
now.labelled = false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { IAutoMovieInspectionView } from "@automovie/interface";
|
|
2
|
+
import {
|
|
3
|
+
type IAutoMovieDrawScene,
|
|
4
|
+
type IAutoMovieInspectionHandle,
|
|
5
|
+
parseAutoMovieInspectionView,
|
|
6
|
+
resolveAutoMovieInspectionView,
|
|
7
|
+
} from "@automovie/render";
|
|
8
|
+
import type * as THREE from "three";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The camera the inspector draws a placed second through: the request's view,
|
|
12
|
+
* written as `text`, resolved against the subject's delivery camera and named
|
|
13
|
+
* views at `seconds`, a named view with a focus framed on what the inspection
|
|
14
|
+
* selects.
|
|
15
|
+
*
|
|
16
|
+
* The delivery camera first takes the subject raster's aspect, as a capture of
|
|
17
|
+
* the subject sets it, so a view frames what a capture of the same view frames
|
|
18
|
+
* whatever the canvas's shape.
|
|
19
|
+
*/
|
|
20
|
+
export function resolveAutoMovieInspectorCamera(props: {
|
|
21
|
+
/** The created subject, placed at `seconds`. */
|
|
22
|
+
instance: IAutoMovieDrawScene;
|
|
23
|
+
|
|
24
|
+
/** The view's text, the request's first view. */
|
|
25
|
+
text: string;
|
|
26
|
+
|
|
27
|
+
/** The applied inspection, whose bounds frame a focused named view. */
|
|
28
|
+
inspection: IAutoMovieInspectionHandle;
|
|
29
|
+
|
|
30
|
+
/** The placed second. */
|
|
31
|
+
seconds: number;
|
|
32
|
+
}): THREE.Camera {
|
|
33
|
+
const { instance, text }: typeof props = props;
|
|
34
|
+
const aspect: number = instance.width / instance.height;
|
|
35
|
+
if (instance.camera.aspect !== aspect) {
|
|
36
|
+
instance.camera.aspect = aspect;
|
|
37
|
+
instance.camera.updateProjectionMatrix();
|
|
38
|
+
}
|
|
39
|
+
const view: IAutoMovieInspectionView = parseAutoMovieInspectionView(text);
|
|
40
|
+
return resolveAutoMovieInspectionView({
|
|
41
|
+
view,
|
|
42
|
+
text,
|
|
43
|
+
bounds: view.type === "named" ? props.inspection.bounds(view.focus) : null,
|
|
44
|
+
camera: instance.camera,
|
|
45
|
+
...(instance.views === undefined ? {} : { views: instance.views }),
|
|
46
|
+
seconds: props.seconds,
|
|
47
|
+
width: instance.width,
|
|
48
|
+
height: instance.height,
|
|
49
|
+
}).camera;
|
|
50
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { IAutoMovieInspectionDiagnostics } from "@automovie/interface";
|
|
2
|
+
|
|
3
|
+
import type { AutoMovieInspectorPlayhead } from "./AutoMovieInspectorPlayhead.js";
|
|
4
|
+
import type { IAutoMovieInspectorAction } from "./IAutoMovieInspectorAction.js";
|
|
5
|
+
import { locateAutoMovieInspectorFinding } from "./locateAutoMovieInspectorFinding.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Stop the inspector at one finding's witness: move the playhead there, stop
|
|
9
|
+
* it, and locate the request there.
|
|
10
|
+
*
|
|
11
|
+
* Stopping playback makes the time readout write the stopped second into the
|
|
12
|
+
* request, so the playhead is moved to the witness before it stops: the stopped
|
|
13
|
+
* second and the located second are then the same, whichever edit the reducer
|
|
14
|
+
* receives last.
|
|
15
|
+
*
|
|
16
|
+
* @param props The witness, the drawn paths, the playhead and the request's
|
|
17
|
+
* dispatch.
|
|
18
|
+
*/
|
|
19
|
+
export function showAutoMovieInspectorFinding(props: {
|
|
20
|
+
/** The witness to show. */
|
|
21
|
+
observation: IAutoMovieInspectionDiagnostics.IObservation;
|
|
22
|
+
|
|
23
|
+
/** The identity paths the scene draws. */
|
|
24
|
+
paths: readonly string[];
|
|
25
|
+
|
|
26
|
+
/** The inspector's playhead. */
|
|
27
|
+
playhead: AutoMovieInspectorPlayhead;
|
|
28
|
+
|
|
29
|
+
/** Where the request edit goes. */
|
|
30
|
+
dispatch: (action: IAutoMovieInspectorAction) => void;
|
|
31
|
+
}): void {
|
|
32
|
+
const action: IAutoMovieInspectorAction.ILocate =
|
|
33
|
+
locateAutoMovieInspectorFinding(props.observation, props.paths);
|
|
34
|
+
props.playhead.seek(action.seconds);
|
|
35
|
+
props.playhead.pause();
|
|
36
|
+
props.dispatch({
|
|
37
|
+
...action,
|
|
38
|
+
seconds: props.playhead.getSnapshot().seconds,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AutoMovieInspectorPlayhead } from "./AutoMovieInspectorPlayhead.js";
|
|
2
|
+
import type { IAutoMovieInspectorAction } from "./IAutoMovieInspectorAction.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The request edit a playhead change implies: when playback stops, by a pause
|
|
6
|
+
* or at the end, the stopped second becomes the request's.
|
|
7
|
+
*
|
|
8
|
+
* @param playing Whether the playhead played at the previous snapshot.
|
|
9
|
+
* @param snapshot The current snapshot.
|
|
10
|
+
* @returns The `time` edit for a stop, or null when playback did not stop.
|
|
11
|
+
*/
|
|
12
|
+
export function stopAutoMovieInspectorTime(
|
|
13
|
+
playing: boolean,
|
|
14
|
+
snapshot: AutoMovieInspectorPlayhead.ISnapshot,
|
|
15
|
+
): IAutoMovieInspectorAction.ITime | null {
|
|
16
|
+
return playing && !snapshot.playing
|
|
17
|
+
? { type: "time", seconds: snapshot.seconds }
|
|
18
|
+
: null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IAutoMovieCapturePlanRequest } from "@automovie/interface";
|
|
2
|
+
import { formatAutoMovieInspectionRequest } from "@automovie/render";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A request's inspection as the text it writes: the identity by which the
|
|
6
|
+
* inspector reuses an applied inspection instead of applying it again.
|
|
7
|
+
*/
|
|
8
|
+
export function writeAutoMovieInspectorInspection(
|
|
9
|
+
request: Pick<IAutoMovieCapturePlanRequest, "inspection">,
|
|
10
|
+
): string {
|
|
11
|
+
return JSON.stringify(formatAutoMovieInspectionRequest(request.inspection));
|
|
12
|
+
}
|
package/src/internal.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// The applied-inspection and canvas helpers the test programme reads directly. They are not part of the public surface: a host reaches them through the inspector and the mount of the main entry.
|
|
2
|
+
|
|
3
|
+
export * from "./applyCaptureCanvasSize.js";
|
|
4
|
+
export * from "./inspector/assertAutoMovieInspectorRaster.js";
|
|
5
|
+
export * from "./inspector/changesAutoMovieObservedScene.js";
|
|
6
|
+
export * from "./inspector/firstAutoMovieInspectorSecond.js";
|
|
7
|
+
export * from "./inspector/messageOfAutoMovieInspectorError.js";
|
|
8
|
+
export * from "./inspector/readsAutoMovieInspectorPlacedScene.js";
|
|
9
|
+
export * from "./inspector/writeAutoMovieInspectorInspection.js";
|
package/src/mountViewer.ts
CHANGED
|
@@ -23,17 +23,23 @@ type ViewerFrameProducer =
|
|
|
23
23
|
| ((elapsedSeconds: number) => void);
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* Mount a render loop onto a canvas: create a `WebGLRenderer`, drive
|
|
26
|
+
* Mount a render loop onto a canvas: create a `WebGLRenderer`, drive
|
|
27
|
+
* `onFrame(elapsedSeconds)` each animation frame, then render `scene` from
|
|
28
|
+
* `camera`.
|
|
27
29
|
*
|
|
28
|
-
* This is the one browser-only entry point. `onFrame` is where a
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
30
|
+
* This is the one browser-only entry point. `onFrame` is where a
|
|
31
|
+
* {@link AutoMoviePlayer} advances: the viewer stays a thin shell around the
|
|
32
|
+
* deterministic engine. `elapsedSeconds` is measured from the first frame. If
|
|
33
|
+
* `onFrame` returns `true` it has **already drawn** the frame itself (e.g. a
|
|
34
|
+
* multi-pass cross-dissolve composite), so the loop skips its own default
|
|
35
|
+
* `render`; returning `undefined`/`false` keeps the plain single-pass render.
|
|
36
|
+
* External seek/guide producers call the returned `completeFrame` immediately
|
|
37
|
+
* after their original draw, before an unpreserved native buffer can clear. A
|
|
38
|
+
* manual guide retains the completed clock; a seek supplies its own seconds.
|
|
39
|
+
* Freezes suppress animation producer calls; explicit redraw/restoration still
|
|
40
|
+
* uses the original producer. Independently advancing source clocks or audio
|
|
41
|
+
* supply `freezeCompleted` and restore their source time through
|
|
42
|
+
* `redrawCompleted`.
|
|
37
43
|
*/
|
|
38
44
|
export const mountViewer: (
|
|
39
45
|
canvas: HTMLCanvasElement,
|
|
@@ -64,10 +70,7 @@ export const mountViewer: (
|
|
|
64
70
|
canvas.clientWidth || 1,
|
|
65
71
|
canvas.clientHeight || 1,
|
|
66
72
|
options?.pixelRatio ??
|
|
67
|
-
(
|
|
68
|
-
window.devicePixelRatio > 0
|
|
69
|
-
? window.devicePixelRatio
|
|
70
|
-
: 1),
|
|
73
|
+
(window.devicePixelRatio > 0 ? window.devicePixelRatio : 1),
|
|
71
74
|
);
|
|
72
75
|
synchronizeViewport();
|
|
73
76
|
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import type { IAutoMovieViewerCompletedFrame } from "./IAutoMovieViewerCompletedFrame.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Notify a supported canvas subscriber from the actual draw-completion owner.
|
|
4
|
+
* Notify a supported canvas subscriber from the actual draw-completion owner.
|
|
5
|
+
* The application explicitly subscribes with the public canvas attribute;
|
|
6
|
+
* ordinary unobserved renders allocate no event. Native synchronous DOM
|
|
7
|
+
* delivery avoids SDK replacements and also works across separately bundled
|
|
8
|
+
* consumers. An explicit original redraw is meaningful even when camera, clock
|
|
9
|
+
* and model facts match the preceding frame: graphics recovery still needs new
|
|
10
|
+
* pixels. Ordinary producers retain their supplied idle/change classification.
|
|
5
11
|
*
|
|
6
|
-
*
|
|
12
|
+
* A canvas's own `dispatchEvent` serves, and its listeners receive the event
|
|
13
|
+
* typed through `HTMLElementEventMap`.
|
|
7
14
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An unobserved canvas creates no event and no imaginary pixels; caller-supplied facts and explicitDraw must describe its completed draw, and synchronous DOM delivery is not asynchronous capture settlement proof.
|
|
11
|
-
* @evidence contracts/development/common.md#meaningful-documentation Documents opt-in subscription, handled draw responsibility, explicit redraw meaning and absence of validation/delivery gates in this publisher.
|
|
12
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Coordination is fixed except consumer DOM dispatch work; explicit redraw makes one shallow detail copy, and no scene traversal or pixel read occurs.
|
|
13
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Ordinary producer idle/change classification is preserved; explicit redraw intentionally publishes a new completed effect instead of treating equal metadata as pixel equivalence.
|
|
14
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The publisher retains no listener or frame after dispatch; event detail is borrowed or shallow-copied, and subscribers own any retained capture work and withdrawal.
|
|
15
|
+
* Completion belongs to the original draw producer. This publisher contributes
|
|
16
|
+
* capture authority without implementing validation or delivery gates.
|
|
15
17
|
*/
|
|
16
18
|
export function publishViewerCompletedFrame(
|
|
17
19
|
canvas: {
|
|
18
20
|
getAttribute?: (name: string) => string | null;
|
|
19
|
-
dispatchEvent?: (
|
|
21
|
+
dispatchEvent?: (
|
|
22
|
+
event: HTMLElementEventMap["automovie:completed-frame"],
|
|
23
|
+
) => boolean;
|
|
20
24
|
},
|
|
21
25
|
frame: IAutoMovieViewerCompletedFrame,
|
|
22
26
|
explicitDraw: boolean = false,
|
|
@@ -2,18 +2,10 @@ import type { IAutoMovieViewerCompletedFrame } from "./IAutoMovieViewerCompleted
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Admit an original synchronous redraw only from a new completed observation.
|
|
5
|
-
* Explicit completion is preferred. A legacy void callback may instead expose
|
|
6
|
-
*
|
|
5
|
+
* Explicit completion is preferred. A legacy void callback may instead expose a
|
|
6
|
+
* new completed-frame record; an unchanged prior record cannot attest a draw.
|
|
7
7
|
* An absent record time inherits the requested original-producer time, while a
|
|
8
8
|
* supplied time must agree exactly. The producer must throw on refusal.
|
|
9
|
-
*
|
|
10
|
-
* @evidence contracts/development/implementation.md#principled-implementation Compares the completed revision around the original producer call; explicit completion must report requested seconds. Without explicit completion, only a distinct newly supplied producer record can be published, and its declared clock must match. No previous observation is relabeled as a new draw.
|
|
11
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Extracts mountViewer's actual redraw-admission boundary while leaving rendering, source admission and completion publication with their existing owners.
|
|
12
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Fulfilled void remains supported and thrown refusal propagates unchanged; stale or mismatched records cannot become successful requested frames. Record freshness is producer attestation, not independent pixel or physical-admission proof.
|
|
13
|
-
* @evidence contracts/development/common.md#meaningful-documentation States explicit and legacy completion paths, exact clock agreement, absent-clock inheritance and original-producer refusal responsibility.
|
|
14
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Fixed-count revision/record/clock reads and one original producer invocation use O(1) coordination without traversing scenes or reading pixels.
|
|
15
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses the original completed observation but never reuses an old record to stand in for a new effect; distinct requested redraws invoke the producer separately.
|
|
16
|
-
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Borrows callbacks and frame records only for this synchronous invocation and acquires no task, renderer or resource lease.
|
|
17
9
|
*/
|
|
18
10
|
export function redrawViewerCompletedFrame(
|
|
19
11
|
seconds: number,
|
|
@@ -35,8 +27,7 @@ export function redrawViewerCompletedFrame(
|
|
|
35
27
|
) => void;
|
|
36
28
|
},
|
|
37
29
|
): void {
|
|
38
|
-
if (
|
|
39
|
-
throw new Error("A redraw requires finite nonnegative seconds.");
|
|
30
|
+
if (seconds < 0) throw new Error("A redraw requires nonnegative seconds.");
|
|
40
31
|
const before: number = options.completedCount();
|
|
41
32
|
const previous: Omit<IAutoMovieViewerCompletedFrame, "control"> | undefined =
|
|
42
33
|
options.readFrame();
|
|
@@ -6,15 +6,11 @@ import {
|
|
|
6
6
|
import type * as THREE from "three";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* End a mounted loop, its native scene shadow products and owned renderer. Stop
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @evidence contracts/development/common.md#meaningful-documentation Documents shutdown ordering, borrowed model ownership, shadow exclusive-context/external-borrower boundary and independent failure handling.
|
|
15
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Fixed owner coordination delegates scene shadow traversal and distinct target retirement plus fixed compositor/renderer disposal; it adds no per-pixel work.
|
|
16
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work The mount terminal guard owns one sticky shutdown attempt; this lower-level release composition itself performs requested cleanup rather than memoizing arbitrary repeated native disposal.
|
|
17
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources No new resource is acquired; scheduling withdrawal precedes resource release, each owner gets an attempt and failure remains explicit rather than certifying freed native storage.
|
|
9
|
+
* End a mounted loop, its native scene shadow products and owned renderer. Stop
|
|
10
|
+
* scheduling first; shadow retirement still needs the live renderer's context
|
|
11
|
+
* before renderer disposal. Geometry/materials remain caller-owned. These
|
|
12
|
+
* owners release independently even when another listener fails. The shadow
|
|
13
|
+
* owner enforces its exclusive-context and external-borrower boundary.
|
|
18
14
|
*/
|
|
19
15
|
export const releaseMountedViewer: (
|
|
20
16
|
renderer: THREE.WebGLRenderer,
|