@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
|
@@ -1,66 +1,103 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
IAutoMovieCapturePlanRequest,
|
|
3
|
-
|
|
4
|
-
IAutoMovieInspectionView,
|
|
3
|
+
IAutoMovieInspectionDiagnostics,
|
|
5
4
|
} from "@automovie/interface";
|
|
6
5
|
import {
|
|
7
|
-
type IApplyAutoMovieInspectionProps,
|
|
8
6
|
type IAutoMovieDrawScene,
|
|
9
7
|
type IAutoMovieDrawSubject,
|
|
10
8
|
type IAutoMovieInspectionHandle,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
autoMovieViewerNamedViewpoints,
|
|
14
|
-
formatAutoMovieInspectionRequest,
|
|
15
|
-
listAutoMovieInspectionPaths,
|
|
16
|
-
parseAutoMovieInspectionView,
|
|
17
|
-
resolveAutoMovieInspectionView,
|
|
9
|
+
createAutoMovieInspectionDiagnosticOverlay,
|
|
10
|
+
observeAutoMoviePlacedInspection,
|
|
18
11
|
} from "@automovie/render";
|
|
19
12
|
import type * as THREE from "three";
|
|
20
13
|
|
|
14
|
+
import { AutoMovieInspectorBeauty } from "./AutoMovieInspectorBeauty.js";
|
|
15
|
+
import { AutoMovieInspectorDiagnosticLog } from "./AutoMovieInspectorDiagnosticLog.js";
|
|
21
16
|
import type { AutoMovieInspectorPlayhead } from "./AutoMovieInspectorPlayhead.js";
|
|
17
|
+
import { AutoMovieInspectorTransition } from "./AutoMovieInspectorTransition.js";
|
|
18
|
+
import type { IAutoMovieInspectorLive } from "./IAutoMovieInspectorLive.js";
|
|
22
19
|
import type { IAutoMovieInspectorScene } from "./IAutoMovieInspectorScene.js";
|
|
23
20
|
import type { IAutoMovieInspectorSceneHost } from "./IAutoMovieInspectorSceneHost.js";
|
|
21
|
+
import { assertAutoMovieInspectorRaster } from "./assertAutoMovieInspectorRaster.js";
|
|
22
|
+
import { changesAutoMovieObservedScene } from "./changesAutoMovieObservedScene.js";
|
|
23
|
+
import { firstAutoMovieInspectorSecond } from "./firstAutoMovieInspectorSecond.js";
|
|
24
|
+
import { followAutoMovieInspectorSize } from "./followAutoMovieInspectorSize.js";
|
|
25
|
+
import { inspectAutoMovieInspectorRequest } from "./inspectAutoMovieInspectorRequest.js";
|
|
26
|
+
import { installAutoMovieInspectorRequest } from "./installAutoMovieInspectorRequest.js";
|
|
27
|
+
import { messageOfAutoMovieInspectorError } from "./messageOfAutoMovieInspectorError.js";
|
|
24
28
|
import { readAutoMovieInspectorAddress } from "./readAutoMovieInspectorAddress.js";
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
applied: IAutoMovieCapturePlanRequest;
|
|
32
|
-
frame: number | undefined;
|
|
33
|
-
lastMs: number | undefined;
|
|
34
|
-
drawn: AutoMovieInspectorPlayhead.ISnapshot | undefined;
|
|
35
|
-
size: IAutoMovieInspectorSceneHost.ISize | undefined;
|
|
36
|
-
dirty: boolean;
|
|
37
|
-
seeking: boolean;
|
|
38
|
-
error: string | null;
|
|
39
|
-
labelled: boolean;
|
|
40
|
-
}
|
|
29
|
+
import { readAutoMovieInspectorFacts } from "./readAutoMovieInspectorFacts.js";
|
|
30
|
+
import { readsAutoMovieInspectorPlacedScene } from "./readsAutoMovieInspectorPlacedScene.js";
|
|
31
|
+
import { releaseAutoMovieInspectorSteps } from "./releaseAutoMovieInspectorSteps.js";
|
|
32
|
+
import { reportAutoMovieInspectorLabels } from "./reportAutoMovieInspectorLabels.js";
|
|
33
|
+
import { resolveAutoMovieInspectorCamera } from "./resolveAutoMovieInspectorCamera.js";
|
|
34
|
+
import { writeAutoMovieInspectorInspection } from "./writeAutoMovieInspectorInspection.js";
|
|
41
35
|
|
|
42
36
|
/**
|
|
43
|
-
* Mount a subject on the inspector's canvas: build an instance, apply the
|
|
37
|
+
* Mount a subject on the inspector's canvas: build an instance, apply the
|
|
38
|
+
* request's inspection, and draw it every animation frame at the playhead's
|
|
39
|
+
* second through the request's first view.
|
|
40
|
+
*
|
|
41
|
+
* The instance is created at once and arrives later. When it arrives the mount
|
|
42
|
+
* checks its clock and raster, seeks it to the request's first second and waits
|
|
43
|
+
* until it is ready there, lists its paths and the marks of its first second,
|
|
44
|
+
* applies the inspection of the newest request (or, when the scene refuses it,
|
|
45
|
+
* of the request that asks for nothing, reported through `refused`), sets the
|
|
46
|
+
* playhead's duration and second, reports `ready` and schedules the first
|
|
47
|
+
* frame. Each frame advances a playing playhead by the wall time since the last
|
|
48
|
+
* frame, follows the host's size, and redraws when the playhead's snapshot or
|
|
49
|
+
* the request changed: place the instance and, once it is ready, run the
|
|
50
|
+
* subject's `beforeDraw` on a WebGL renderer, as the draw host does, so its
|
|
51
|
+
* surface feeds show the second drawn with the scene's own materials, then
|
|
52
|
+
* update the inspection with the second's marks, resolve the view and render.
|
|
53
|
+
* An inspection that changes the scene's materials or layers is lifted around
|
|
54
|
+
* the seek of a subject with `beforeDraw` or `inspectPlaced` and applied again
|
|
55
|
+
* after them. Beauty pictures draw through `AutoMovieInspectorBeauty`, the
|
|
56
|
+
* subject's optics and indirect shading as delivery draws one sample. While a
|
|
57
|
+
* seek is pending no other is started, and the next frame seeks the newest
|
|
58
|
+
* second, so a slow subject drops intermediate seconds instead of queueing
|
|
59
|
+
* them. A drawing error pauses playback and is reported once until a frame
|
|
60
|
+
* draws again.
|
|
44
61
|
*
|
|
45
|
-
* The
|
|
62
|
+
* The picture's aspect is the subject's raster, not the canvas's, so a view
|
|
63
|
+
* frames what a capture of the same subject frames; the page gives the canvas
|
|
64
|
+
* that aspect. The mount adds no listener and holds at most one pending frame,
|
|
65
|
+
* so a mount, dispose and mount again on one canvas, as React's StrictMode runs
|
|
66
|
+
* an effect, leaves one renderer and one frame loop; a mount disposed before
|
|
67
|
+
* its instance arrives or is ready disposes the instance then and creates no
|
|
68
|
+
* renderer, and a seek that resolves after dispose draws nothing.
|
|
46
69
|
*
|
|
47
|
-
*
|
|
70
|
+
* An opted-in subject is observed at the second actually placed, before the
|
|
71
|
+
* inspection changes the scene: an inspection that changes layers, materials,
|
|
72
|
+
* mark geometry or clipping is restored before the seek and re-applied after
|
|
73
|
+
* the observation, while one that changes none of them, as the default request,
|
|
74
|
+
* stays applied and only updates its marks, as for any subject. Its findings
|
|
75
|
+
* reach the report and the diagnostic log with the playhead's playing flag and
|
|
76
|
+
* jump count, so uninterrupted playback can join painted samples into an
|
|
77
|
+
* observed span. Its witness cubes are drawn under the beauty shade unless
|
|
78
|
+
* `overlay(false)` hid them; hiding them stops no check and no report.
|
|
48
79
|
*
|
|
49
|
-
*
|
|
80
|
+
* `AutoMovieInspectorTransition` places the subject, the shown shot last, so
|
|
81
|
+
* diagnostics, marks, camera and inspection pictures follow it as in the draw
|
|
82
|
+
* page; a plain beauty transition paints and holds its other layers first and
|
|
83
|
+
* composites them by their `playbackLayersAt` weights, under the witness cubes
|
|
84
|
+
* at full strength, so a dissolve and a fade match delivery.
|
|
50
85
|
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The mount owns one instance, one renderer, one applied inspection and at most one pending frame, released by `dispose` in reverse order, each attempted even when another fails; the playhead is borrowed and gains no listener.
|
|
86
|
+
* The page draws the first view and the first pass of the request; the capture
|
|
87
|
+
* command draws them all. While paused, the labels the request asks for are
|
|
88
|
+
* placed by the inspection on the picture's pixels, with the stamp's font pixel
|
|
89
|
+
* at least one CSS pixel of the canvas as a capture keeps it at least one sheet
|
|
90
|
+
* pixel, and reported in CSS pixels; a named view with a focus is framed on
|
|
91
|
+
* what the focus selects.
|
|
58
92
|
*/
|
|
59
93
|
export function mountAutoMovieInspectorScene(props: {
|
|
60
94
|
/** The subject to build. */
|
|
61
95
|
subject: IAutoMovieDrawSubject;
|
|
62
96
|
|
|
63
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* The subject's name, as the request's `subject` key and the refusals name
|
|
99
|
+
* it.
|
|
100
|
+
*/
|
|
64
101
|
name: string;
|
|
65
102
|
|
|
66
103
|
/** The request in force when the mount starts. */
|
|
@@ -76,9 +113,15 @@ export function mountAutoMovieInspectorScene(props: {
|
|
|
76
113
|
report: IAutoMovieInspectorScene.IReport;
|
|
77
114
|
}): IAutoMovieInspectorScene {
|
|
78
115
|
const { host, playhead, report } = props;
|
|
116
|
+
const diagnosticLog: AutoMovieInspectorDiagnosticLog =
|
|
117
|
+
new AutoMovieInspectorDiagnosticLog(report);
|
|
118
|
+
const witnessCubes: ReturnType<
|
|
119
|
+
typeof createAutoMovieInspectionDiagnosticOverlay
|
|
120
|
+
> = createAutoMovieInspectionDiagnosticOverlay();
|
|
79
121
|
let disposed: boolean = false;
|
|
122
|
+
let witnesses: boolean = true;
|
|
80
123
|
let wanted: IAutoMovieCapturePlanRequest = props.request;
|
|
81
|
-
let live:
|
|
124
|
+
let live: IAutoMovieInspectorLive | undefined;
|
|
82
125
|
|
|
83
126
|
// The instance arrives later; one that arrives after dispose is released at once.
|
|
84
127
|
props.subject
|
|
@@ -88,29 +131,23 @@ export function mountAutoMovieInspectorScene(props: {
|
|
|
88
131
|
else await arrive(instance);
|
|
89
132
|
})
|
|
90
133
|
.catch((error: unknown): void => {
|
|
91
|
-
if (!disposed) report.error(
|
|
134
|
+
if (!disposed) report.error(messageOfAutoMovieInspectorError(error));
|
|
92
135
|
});
|
|
93
136
|
|
|
94
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* Take an arrived instance into use once it is ready at its first second,
|
|
139
|
+
* releasing it if anything fails.
|
|
140
|
+
*/
|
|
95
141
|
async function arrive(instance: IAutoMovieDrawScene): Promise<void> {
|
|
96
142
|
let seconds: number;
|
|
97
143
|
try {
|
|
98
|
-
|
|
99
|
-
["duration", instance.durationSeconds],
|
|
100
|
-
["fps", instance.fps],
|
|
101
|
-
["width", instance.width],
|
|
102
|
-
["height", instance.height],
|
|
103
|
-
] as const)
|
|
104
|
-
if (!(Number.isFinite(value) && value > 0))
|
|
105
|
-
throw new Error(
|
|
106
|
-
`Subject "${props.name}" ${name} ${value} is not positive`,
|
|
107
|
-
);
|
|
144
|
+
assertAutoMovieInspectorRaster(props.name, instance);
|
|
108
145
|
playhead.setDuration(instance.durationSeconds);
|
|
109
|
-
playhead.seek(
|
|
146
|
+
playhead.seek(firstAutoMovieInspectorSecond(wanted));
|
|
110
147
|
seconds = playhead.getSnapshot().seconds;
|
|
111
148
|
await instance.seek(seconds);
|
|
112
149
|
} catch (error) {
|
|
113
|
-
if (!disposed) report.error(
|
|
150
|
+
if (!disposed) report.error(messageOfAutoMovieInspectorError(error));
|
|
114
151
|
instance.dispose();
|
|
115
152
|
return;
|
|
116
153
|
}
|
|
@@ -122,64 +159,48 @@ export function mountAutoMovieInspectorScene(props: {
|
|
|
122
159
|
}
|
|
123
160
|
const held: (() => void)[] = [(): void => instance.dispose()];
|
|
124
161
|
try {
|
|
125
|
-
//
|
|
126
|
-
const
|
|
127
|
-
instance
|
|
128
|
-
const
|
|
129
|
-
paths: [
|
|
130
|
-
...listAutoMovieInspectionPaths(instance.scene).map(
|
|
131
|
-
({ path }: { path: string }): string => path,
|
|
132
|
-
),
|
|
133
|
-
...marks.map(({ path }: { path: string }): string => path),
|
|
134
|
-
],
|
|
135
|
-
marks,
|
|
162
|
+
// Facts are read before the inspection adds its own objects to the scene.
|
|
163
|
+
const facts: IAutoMovieInspectorScene.IFacts =
|
|
164
|
+
readAutoMovieInspectorFacts({ instance, seconds });
|
|
165
|
+
const { marks } = facts;
|
|
136
166
|
|
|
137
|
-
|
|
138
|
-
...Object.keys(instance.views ?? {}),
|
|
139
|
-
...autoMovieViewerNamedViewpoints().map(
|
|
140
|
-
({ id }: IAutoMovieViewerViewpoint): string => id,
|
|
141
|
-
),
|
|
142
|
-
],
|
|
143
|
-
width: instance.width,
|
|
144
|
-
height: instance.height,
|
|
145
|
-
durationSeconds: instance.durationSeconds,
|
|
146
|
-
fps: instance.fps,
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
const renderer: IAutoMovieInspectorSceneHost.IRenderer =
|
|
167
|
+
const { renderer, compositor }: IAutoMovieInspectorSceneHost.ICreated =
|
|
150
168
|
host.createRenderer();
|
|
151
169
|
held.push((): void => renderer.dispose());
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
):
|
|
157
|
-
applyAutoMovieInspection({
|
|
158
|
-
scene: instance.scene,
|
|
159
|
-
request: request.inspection,
|
|
160
|
-
renderer,
|
|
161
|
-
marks,
|
|
162
|
-
});
|
|
170
|
+
const beauty: AutoMovieInspectorBeauty = new AutoMovieInspectorBeauty();
|
|
171
|
+
held.push((): void => beauty.dispose());
|
|
172
|
+
const transition: AutoMovieInspectorTransition =
|
|
173
|
+
new AutoMovieInspectorTransition();
|
|
174
|
+
held.push((): void => transition.dispose());
|
|
163
175
|
|
|
164
176
|
// The newest request, or the one that asks for nothing when the scene refuses it.
|
|
165
177
|
let applied: IAutoMovieCapturePlanRequest = wanted;
|
|
166
178
|
let inspection: IAutoMovieInspectionHandle;
|
|
167
179
|
let refusal: string | null = null;
|
|
168
180
|
try {
|
|
169
|
-
inspection =
|
|
181
|
+
inspection = inspectAutoMovieInspectorRequest({
|
|
182
|
+
...{ instance, renderer, marks },
|
|
183
|
+
request: applied,
|
|
184
|
+
});
|
|
170
185
|
} catch (error) {
|
|
171
|
-
refusal =
|
|
186
|
+
refusal = messageOfAutoMovieInspectorError(error);
|
|
172
187
|
applied = {
|
|
173
188
|
...readAutoMovieInspectorAddress(""),
|
|
174
189
|
subject: wanted.subject,
|
|
175
190
|
};
|
|
176
|
-
inspection =
|
|
191
|
+
inspection = inspectAutoMovieInspectorRequest({
|
|
192
|
+
...{ instance, renderer, marks },
|
|
193
|
+
request: applied,
|
|
194
|
+
});
|
|
177
195
|
}
|
|
178
196
|
held.push((): void => inspection.restore());
|
|
179
197
|
wanted = applied;
|
|
180
198
|
live = {
|
|
181
199
|
instance,
|
|
182
200
|
renderer,
|
|
201
|
+
compositor,
|
|
202
|
+
beauty,
|
|
203
|
+
transition,
|
|
183
204
|
inspection,
|
|
184
205
|
applied,
|
|
185
206
|
frame: undefined,
|
|
@@ -197,14 +218,17 @@ export function mountAutoMovieInspectorScene(props: {
|
|
|
197
218
|
live.frame = host.requestFrame(frame);
|
|
198
219
|
} catch (error) {
|
|
199
220
|
live = undefined;
|
|
200
|
-
report.error(
|
|
201
|
-
|
|
221
|
+
report.error(messageOfAutoMovieInspectorError(error));
|
|
222
|
+
releaseAutoMovieInspectorSteps(held.reverse());
|
|
202
223
|
}
|
|
203
224
|
}
|
|
204
225
|
|
|
205
|
-
/**
|
|
226
|
+
/**
|
|
227
|
+
* One animation frame: advance, follow the size, redraw when something
|
|
228
|
+
* changed, schedule the next.
|
|
229
|
+
*/
|
|
206
230
|
function frame(nowMs: number): void {
|
|
207
|
-
const now:
|
|
231
|
+
const now: IAutoMovieInspectorLive | undefined = live;
|
|
208
232
|
if (disposed || now === undefined) return;
|
|
209
233
|
now.frame = undefined;
|
|
210
234
|
const wall: number =
|
|
@@ -212,22 +236,7 @@ export function mountAutoMovieInspectorScene(props: {
|
|
|
212
236
|
now.lastMs = nowMs;
|
|
213
237
|
playhead.advance(wall);
|
|
214
238
|
|
|
215
|
-
const
|
|
216
|
-
const drawable: boolean = [size.width, size.height, size.pixelRatio].every(
|
|
217
|
-
(value: number): boolean => Number.isFinite(value) && value > 0,
|
|
218
|
-
);
|
|
219
|
-
if (
|
|
220
|
-
drawable &&
|
|
221
|
-
(now.size === undefined ||
|
|
222
|
-
now.size.width !== size.width ||
|
|
223
|
-
now.size.height !== size.height ||
|
|
224
|
-
now.size.pixelRatio !== size.pixelRatio)
|
|
225
|
-
) {
|
|
226
|
-
now.renderer.setPixelRatio(size.pixelRatio);
|
|
227
|
-
now.renderer.setSize(size.width, size.height, false);
|
|
228
|
-
now.size = size;
|
|
229
|
-
now.dirty = true;
|
|
230
|
-
}
|
|
239
|
+
const drawable: boolean = followAutoMovieInspectorSize(now, host.size());
|
|
231
240
|
|
|
232
241
|
const snapshot: AutoMovieInspectorPlayhead.ISnapshot =
|
|
233
242
|
playhead.getSnapshot();
|
|
@@ -236,9 +245,12 @@ export function mountAutoMovieInspectorScene(props: {
|
|
|
236
245
|
now.frame = host.requestFrame(frame);
|
|
237
246
|
}
|
|
238
247
|
|
|
239
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* Place one second and draw it once the subject is ready there; frames skip
|
|
250
|
+
* drawing while a placement is pending.
|
|
251
|
+
*/
|
|
240
252
|
function draw(
|
|
241
|
-
now:
|
|
253
|
+
now: IAutoMovieInspectorLive,
|
|
242
254
|
snapshot: AutoMovieInspectorPlayhead.ISnapshot,
|
|
243
255
|
): void {
|
|
244
256
|
now.dirty = false;
|
|
@@ -246,7 +258,22 @@ export function mountAutoMovieInspectorScene(props: {
|
|
|
246
258
|
now.seeking = true;
|
|
247
259
|
let ready: Promise<void>;
|
|
248
260
|
try {
|
|
249
|
-
|
|
261
|
+
// An observation and the subject's feeds read the scene as placed, without what the inspection changed.
|
|
262
|
+
if (
|
|
263
|
+
readsAutoMovieInspectorPlacedScene(now.instance) &&
|
|
264
|
+
changesAutoMovieObservedScene(now.applied.inspection)
|
|
265
|
+
)
|
|
266
|
+
now.inspection.restore();
|
|
267
|
+
// A transition's other layers are placed, painted and held, and the shot the picture shows most of is placed last.
|
|
268
|
+
ready = now.transition.place({
|
|
269
|
+
name: props.name,
|
|
270
|
+
instance: now.instance,
|
|
271
|
+
request: now.applied.inspection,
|
|
272
|
+
compositor: now.compositor,
|
|
273
|
+
seconds: snapshot.seconds,
|
|
274
|
+
paint: (): void =>
|
|
275
|
+
beauty(now, filmCamera(now, snapshot.seconds), snapshot.seconds),
|
|
276
|
+
});
|
|
250
277
|
} catch (error) {
|
|
251
278
|
ready = Promise.reject(
|
|
252
279
|
error instanceof Error ? error : new Error(String(error)),
|
|
@@ -263,43 +290,68 @@ export function mountAutoMovieInspectorScene(props: {
|
|
|
263
290
|
});
|
|
264
291
|
}
|
|
265
292
|
|
|
266
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* Draw the second the subject is now at through the applied request's first
|
|
295
|
+
* view.
|
|
296
|
+
*/
|
|
267
297
|
function paint(
|
|
268
|
-
now:
|
|
298
|
+
now: IAutoMovieInspectorLive,
|
|
269
299
|
snapshot: AutoMovieInspectorPlayhead.ISnapshot,
|
|
270
300
|
): void {
|
|
271
301
|
const { instance } = now;
|
|
272
302
|
try {
|
|
273
|
-
|
|
303
|
+
const diagnostics: IAutoMovieInspectionDiagnostics | undefined =
|
|
304
|
+
observeAutoMoviePlacedInspection(
|
|
305
|
+
instance,
|
|
306
|
+
snapshot.seconds,
|
|
307
|
+
"viewer",
|
|
308
|
+
undefined,
|
|
309
|
+
now.transition.byShot,
|
|
310
|
+
);
|
|
311
|
+
// The subject's render-target work, such as surface feeds, runs once on the placed scene's own materials before any shade applies, as the draw host runs it; only a WebGL renderer has render targets.
|
|
312
|
+
if (now.compositor !== null)
|
|
313
|
+
instance.beforeDraw?.(now.compositor, snapshot.seconds);
|
|
314
|
+
// Re-apply only an inspection that was restored for the scene's readers or changed; otherwise update its marks.
|
|
315
|
+
if (
|
|
316
|
+
readsAutoMovieInspectorPlacedScene(instance) &&
|
|
317
|
+
(changesAutoMovieObservedScene(now.applied.inspection) ||
|
|
318
|
+
changesAutoMovieObservedScene(wanted.inspection) ||
|
|
319
|
+
writeAutoMovieInspectorInspection(wanted) !==
|
|
320
|
+
writeAutoMovieInspectorInspection(now.applied))
|
|
321
|
+
) {
|
|
322
|
+
now.inspection.restore();
|
|
323
|
+
if (installInspection(now, wanted, snapshot.seconds))
|
|
324
|
+
now.applied = wanted;
|
|
325
|
+
} else now.inspection.update(instance.marks?.(snapshot.seconds));
|
|
274
326
|
|
|
275
|
-
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
if (
|
|
296
|
-
|
|
297
|
-
report.
|
|
298
|
-
now.labelled = true;
|
|
299
|
-
} else if (now.labelled) {
|
|
300
|
-
report.labels({ labels: [], lineHeight: 0, dropped: 0 });
|
|
301
|
-
now.labelled = false;
|
|
327
|
+
const camera: THREE.Camera = filmCamera(now, snapshot.seconds);
|
|
328
|
+
const shaded: boolean = now.applied.inspection.shade === "beauty";
|
|
329
|
+
const shown: () => void = (): void =>
|
|
330
|
+
beauty(now, camera, snapshot.seconds);
|
|
331
|
+
// A composited transition takes its witness cubes over the composite, at full strength.
|
|
332
|
+
const composited: boolean = shaded && now.transition.finish(shown);
|
|
333
|
+
const diagnosticLegend: ReturnType<typeof witnessCubes.render> =
|
|
334
|
+
witnessCubes.render({
|
|
335
|
+
scene: composited ? now.transition.overlay : instance.scene,
|
|
336
|
+
diagnostics: witnesses && shaded ? diagnostics : undefined,
|
|
337
|
+
render: (): void => {
|
|
338
|
+
// The beauty shade shows the delivered picture: the subject's optics, through the stage delivery draws with.
|
|
339
|
+
if (composited) now.transition.over(camera);
|
|
340
|
+
else if (shaded) shown();
|
|
341
|
+
else now.renderer.render(instance.scene, camera);
|
|
342
|
+
},
|
|
343
|
+
width: now.size!.width,
|
|
344
|
+
height: now.size!.height,
|
|
345
|
+
stroke: now.applied.inspection.stroke,
|
|
346
|
+
});
|
|
347
|
+
if (diagnostics !== undefined) {
|
|
348
|
+
diagnosticLog.observe(diagnostics, snapshot);
|
|
349
|
+
report.diagnostics?.(diagnostics);
|
|
302
350
|
}
|
|
351
|
+
reportAutoMovieInspectorLabels({
|
|
352
|
+
...{ now, report, camera, diagnosticLegend },
|
|
353
|
+
playing: snapshot.playing,
|
|
354
|
+
});
|
|
303
355
|
if (now.error !== null) {
|
|
304
356
|
now.error = null;
|
|
305
357
|
report.error(null);
|
|
@@ -309,133 +361,139 @@ export function mountAutoMovieInspectorScene(props: {
|
|
|
309
361
|
}
|
|
310
362
|
}
|
|
311
363
|
|
|
312
|
-
/**
|
|
364
|
+
/** The applied view's camera at a placed second. */
|
|
365
|
+
function filmCamera(
|
|
366
|
+
now: IAutoMovieInspectorLive,
|
|
367
|
+
seconds: number,
|
|
368
|
+
): THREE.Camera {
|
|
369
|
+
return resolveAutoMovieInspectorCamera({
|
|
370
|
+
instance: now.instance,
|
|
371
|
+
text: now.applied.views[0]!,
|
|
372
|
+
inspection: now.inspection,
|
|
373
|
+
seconds,
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Paint the placed scene's beauty picture through the stages delivery draws
|
|
379
|
+
* one sample with.
|
|
380
|
+
*/
|
|
381
|
+
function beauty(
|
|
382
|
+
now: IAutoMovieInspectorLive,
|
|
383
|
+
camera: THREE.Camera,
|
|
384
|
+
seconds: number,
|
|
385
|
+
): void {
|
|
386
|
+
now.beauty.draw({
|
|
387
|
+
renderer: now.renderer,
|
|
388
|
+
instance: now.instance,
|
|
389
|
+
camera,
|
|
390
|
+
seconds,
|
|
391
|
+
width: Math.floor(now.size!.width * now.size!.pixelRatio),
|
|
392
|
+
height: Math.floor(now.size!.height * now.size!.pixelRatio),
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Report a drawing error once until a frame draws again, and stop playback on
|
|
398
|
+
* it.
|
|
399
|
+
*/
|
|
313
400
|
function fail(
|
|
314
|
-
now:
|
|
401
|
+
now: IAutoMovieInspectorLive,
|
|
315
402
|
snapshot: AutoMovieInspectorPlayhead.ISnapshot,
|
|
316
403
|
error: unknown,
|
|
317
404
|
): void {
|
|
318
405
|
if (snapshot.playing) playhead.pause();
|
|
319
|
-
const message: string =
|
|
406
|
+
const message: string = messageOfAutoMovieInspectorError(error);
|
|
320
407
|
if (message !== now.error) {
|
|
321
408
|
now.error = message;
|
|
322
409
|
report.error(message);
|
|
323
410
|
}
|
|
324
411
|
}
|
|
325
412
|
|
|
413
|
+
/**
|
|
414
|
+
* Install a request on the live subject; on refusal keep the applied one in
|
|
415
|
+
* force and report the refusal.
|
|
416
|
+
*/
|
|
417
|
+
function installInspection(
|
|
418
|
+
now: IAutoMovieInspectorLive,
|
|
419
|
+
request: IAutoMovieCapturePlanRequest,
|
|
420
|
+
seconds: number,
|
|
421
|
+
): boolean {
|
|
422
|
+
return installAutoMovieInspectorRequest({
|
|
423
|
+
...{ now, request, seconds },
|
|
424
|
+
refused: (error: unknown): void => {
|
|
425
|
+
wanted = now.applied;
|
|
426
|
+
report.refused(now.applied, messageOfAutoMovieInspectorError(error));
|
|
427
|
+
},
|
|
428
|
+
});
|
|
429
|
+
}
|
|
326
430
|
return {
|
|
327
431
|
apply: (request: IAutoMovieCapturePlanRequest): void => {
|
|
328
432
|
if (disposed || request === wanted) return;
|
|
329
433
|
wanted = request;
|
|
330
|
-
const now:
|
|
434
|
+
const now: IAutoMovieInspectorLive | undefined = live;
|
|
331
435
|
if (now === undefined) return;
|
|
332
436
|
|
|
333
|
-
//
|
|
334
|
-
if (
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
)
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
437
|
+
// Opted-in subjects apply each request only after the current settled scene is observed.
|
|
438
|
+
if (now.instance.inspectPlaced !== undefined) {
|
|
439
|
+
if (
|
|
440
|
+
firstAutoMovieInspectorSecond(request) !==
|
|
441
|
+
firstAutoMovieInspectorSecond(now.applied)
|
|
442
|
+
)
|
|
443
|
+
playhead.seek(firstAutoMovieInspectorSecond(request));
|
|
444
|
+
now.dirty = true;
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// A generic subject keeps its inspection until its request changes.
|
|
449
|
+
if (
|
|
450
|
+
writeAutoMovieInspectorInspection(request) !==
|
|
451
|
+
writeAutoMovieInspectorInspection(now.applied)
|
|
452
|
+
) {
|
|
347
453
|
now.inspection.restore();
|
|
348
|
-
|
|
349
|
-
now
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
454
|
+
const accepted: boolean = installInspection(
|
|
455
|
+
now,
|
|
456
|
+
request,
|
|
457
|
+
playhead.getSnapshot().seconds,
|
|
458
|
+
);
|
|
459
|
+
if (!accepted) {
|
|
353
460
|
now.dirty = true;
|
|
354
|
-
report.refused(now.applied, messageOf(error));
|
|
355
461
|
return;
|
|
356
462
|
}
|
|
357
463
|
report.legend([...now.inspection.legend]);
|
|
358
464
|
}
|
|
359
|
-
if (
|
|
360
|
-
|
|
465
|
+
if (
|
|
466
|
+
firstAutoMovieInspectorSecond(request) !==
|
|
467
|
+
firstAutoMovieInspectorSecond(now.applied)
|
|
468
|
+
)
|
|
469
|
+
playhead.seek(firstAutoMovieInspectorSecond(request));
|
|
361
470
|
now.applied = request;
|
|
362
471
|
now.dirty = true;
|
|
363
472
|
},
|
|
473
|
+
overlay: (show: boolean): void => {
|
|
474
|
+
if (disposed || show === witnesses) return;
|
|
475
|
+
witnesses = show;
|
|
476
|
+
if (live !== undefined) live.dirty = true;
|
|
477
|
+
},
|
|
364
478
|
dispose: (): void => {
|
|
365
479
|
if (disposed) return;
|
|
366
480
|
disposed = true;
|
|
367
|
-
const now:
|
|
481
|
+
const now: IAutoMovieInspectorLive | undefined = live;
|
|
368
482
|
live = undefined;
|
|
369
483
|
if (now === undefined) return;
|
|
370
|
-
|
|
484
|
+
releaseAutoMovieInspectorSteps([
|
|
371
485
|
(): void => {
|
|
372
486
|
if (now.frame !== undefined) host.cancelFrame(now.frame);
|
|
373
487
|
now.frame = undefined;
|
|
374
488
|
},
|
|
375
489
|
(): void => now.inspection.restore(),
|
|
490
|
+
(): void => now.transition.dispose(),
|
|
491
|
+
(): void => now.beauty.dispose(),
|
|
376
492
|
(): void => now.renderer.dispose(),
|
|
377
493
|
(): void => now.instance.dispose(),
|
|
494
|
+
(): void => diagnosticLog.dispose(),
|
|
495
|
+
(): void => witnessCubes.dispose(),
|
|
378
496
|
]);
|
|
379
497
|
},
|
|
380
498
|
};
|
|
381
499
|
}
|
|
382
|
-
|
|
383
|
-
/** The labels of a paused picture in CSS pixels of the canvas. */
|
|
384
|
-
function place(
|
|
385
|
-
now: ILive,
|
|
386
|
-
camera: THREE.Camera,
|
|
387
|
-
): IAutoMovieInspectorScene.ILabels {
|
|
388
|
-
const { width, height } = now.instance;
|
|
389
|
-
const shown: IAutoMovieInspectorSceneHost.ISize = now.size!;
|
|
390
|
-
|
|
391
|
-
// The stamp's font pixel stays at least one CSS pixel, as a capture keeps it at least one sheet pixel.
|
|
392
|
-
const scale: number = Math.max(1, Math.ceil(height / shown.height));
|
|
393
|
-
const placed: ReturnType<IAutoMovieInspectionHandle["labels"]> =
|
|
394
|
-
now.inspection.labels(camera, width, height, scale);
|
|
395
|
-
return {
|
|
396
|
-
labels: placed.labels.map(
|
|
397
|
-
(
|
|
398
|
-
label: IAutoMovieInspectionLabel,
|
|
399
|
-
): IAutoMovieInspectorScene.ILabels["labels"][number] => ({
|
|
400
|
-
path: label.path,
|
|
401
|
-
text: label.text,
|
|
402
|
-
left: (label.x * shown.width) / width,
|
|
403
|
-
top: (label.y * shown.height) / height,
|
|
404
|
-
}),
|
|
405
|
-
),
|
|
406
|
-
// The stamp's box is nine font pixels high.
|
|
407
|
-
lineHeight: (9 * scale * shown.height) / height,
|
|
408
|
-
dropped: placed.dropped.length,
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
/** The first second a request draws: its first explicit second, or the start of its sampling. */
|
|
413
|
-
function firstSecond(request: IAutoMovieCapturePlanRequest): number {
|
|
414
|
-
return request.sampling.kind === "at"
|
|
415
|
-
? request.sampling.seconds[0]!
|
|
416
|
-
: request.sampling.from;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
/** A request's inspection as the text it writes, the identity an applied inspection is reused by. */
|
|
420
|
-
function written(request: IAutoMovieCapturePlanRequest): string {
|
|
421
|
-
return JSON.stringify(formatAutoMovieInspectionRequest(request.inspection));
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/** Run every step, then throw every failure together. */
|
|
425
|
-
function release(steps: readonly (() => void)[]): void {
|
|
426
|
-
const failures: unknown[] = [];
|
|
427
|
-
for (const step of steps)
|
|
428
|
-
try {
|
|
429
|
-
step();
|
|
430
|
-
} catch (error) {
|
|
431
|
-
failures.push(error);
|
|
432
|
-
}
|
|
433
|
-
if (failures.length === 1) throw failures[0];
|
|
434
|
-
if (failures.length > 1)
|
|
435
|
-
throw new AggregateError(failures, "The inspector mount failed to release");
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
/** The text of a thrown value. */
|
|
439
|
-
function messageOf(error: unknown): string {
|
|
440
|
-
return error instanceof Error ? error.message : String(error);
|
|
441
|
-
}
|