@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,23 +1,16 @@
|
|
|
1
|
+
import { AutoMovieThreeKind } from "@automovie/render";
|
|
1
2
|
import * as THREE from "three";
|
|
2
3
|
// src/createViewerCameraState.ts
|
|
3
4
|
/**
|
|
4
5
|
* Transfer detached, auto-updating Perspective/Orthographic cameras through
|
|
5
6
|
* their public native lens/transform API, including film and view offsets.
|
|
6
7
|
* Parented, manual-matrix and custom-projection cameras are explicitly refused:
|
|
7
|
-
* another owner must transfer those relationships rather than guess them.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @evidence contracts/development/implementation.md#principled-implementation Captures native detached auto-updating lens/TRS/view state and admits unknown input on a temporary camera clone, requiring finite dimensions, nondegenerate transforms and exact native projection parity before copy; custom/manual/parented cameras refuse, while non-unit quaternions are not normalized and only resulting finite invertibility is tested.
|
|
11
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps capture and restore with the same native camera/lens owner, preserving view offsets/film settings instead of applying an unexplained raw matrix snapshot; a named transfer record describes existing fields without another projection solver.
|
|
12
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses actual native projection recomputation and exact parity rather than fixture lens defaults, patched matrix methods or tolerance-based acceptance of an unsupported custom projection.
|
|
13
|
-
* @evidence contracts/development/common.md#meaningful-documentation States detached/auto-updating supported classes, refused custom state and admission-before-mutation; the transfer record's field docs give vector/matrix conventions, layer mask and lens/view units.
|
|
14
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Each capture/restore reads fixed-size lens/vector/matrix state and one temporary camera clone, constant adapter work/storage; camera.clone is recursive by native default, so a camera with children may additionally clone its child subtree despite parentless admission.
|
|
15
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Capture/restore share native lens semantics and one borrowed camera identity; mutable lens/pose/view input requires new snapshots/candidate validation, with no cached custom projection or alternate math.
|
|
16
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returned closures retain the borrowed camera and each capture transfers copied scalar/array/view state; temporary clones acquire no GPU handle themselves but may retain cloned child references until unreachable. The original camera/children remain host-owned and no task starts.
|
|
8
|
+
* another owner must transfer those relationships rather than guess them. A
|
|
9
|
+
* degenerate state is refused before the original camera is mutated.
|
|
17
10
|
*/
|
|
18
11
|
function createViewerCameraState(camera) {
|
|
19
12
|
const supported = () => {
|
|
20
|
-
if (!(camera
|
|
13
|
+
if (!(AutoMovieThreeKind.isPerspectiveCamera(camera) || AutoMovieThreeKind.isOrthographicCamera(camera)) || camera.parent !== null || !camera.matrixAutoUpdate || !camera.matrixWorldAutoUpdate) throw new Error("Camera transfer requires a detached auto-updating Perspective/Orthographic camera.");
|
|
21
14
|
return camera;
|
|
22
15
|
};
|
|
23
16
|
const capture = () => {
|
|
@@ -34,7 +27,7 @@ function createViewerCameraState(camera) {
|
|
|
34
27
|
layers: owned.layers.mask,
|
|
35
28
|
projection: owned.projectionMatrix.toArray(),
|
|
36
29
|
view: owned.view === null ? null : { ...owned.view },
|
|
37
|
-
lens: owned
|
|
30
|
+
lens: AutoMovieThreeKind.isPerspectiveCamera(owned) ? {
|
|
38
31
|
kind: "perspective",
|
|
39
32
|
fov: owned.fov,
|
|
40
33
|
aspect: owned.aspect,
|
|
@@ -58,104 +51,59 @@ function createViewerCameraState(camera) {
|
|
|
58
51
|
};
|
|
59
52
|
const restore = (state) => {
|
|
60
53
|
const owned = supported();
|
|
61
|
-
if (state
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const position = read("position", 3), quaternion = read("quaternion", 4);
|
|
68
|
-
const scale = read("scale", 3), up = read("up", 3), projection = read("projection", 16);
|
|
69
|
-
const determinant = new THREE.Matrix4().fromArray(projection).determinant();
|
|
70
|
-
if (!(Math.hypot(...quaternion) > 0) || !(Math.hypot(...up) > 0) || scale.some((value) => value === 0) || determinant === 0 || !Number.isFinite(determinant)) throw new Error("Camera transfer has a degenerate pose/projection.");
|
|
71
|
-
const layers = Reflect.get(state, "layers");
|
|
72
|
-
if (typeof layers !== "number" || !Number.isInteger(layers) || layers < -2147483648 || layers > 4294967295) throw new Error("Camera transfer has no valid layer mask.");
|
|
73
|
-
const lens = Reflect.get(state, "lens");
|
|
74
|
-
if (lens === null || typeof lens !== "object") throw new Error("Camera transfer has no lens.");
|
|
75
|
-
const number = (name) => {
|
|
76
|
-
const value = Reflect.get(lens, name);
|
|
77
|
-
if (typeof value !== "number" || !Number.isFinite(value)) throw new Error("Camera transfer has no finite " + name + ".");
|
|
78
|
-
return value;
|
|
79
|
-
};
|
|
54
|
+
if (state.type !== owned.type) throw new Error("Camera transfer changed camera type.");
|
|
55
|
+
const determinant = new THREE.Matrix4().fromArray(state.projection).determinant();
|
|
56
|
+
const turn = Math.hypot(...state.quaternion);
|
|
57
|
+
const volume = state.scale[0] * state.scale[1] * state.scale[2];
|
|
58
|
+
if (!(turn > 0) || turn === Infinity || !(Math.hypot(...state.up) > 0) || volume === 0 || volume === Infinity || volume === -Infinity || determinant === 0 || determinant === Infinity || determinant === -Infinity) throw new Error("Camera transfer has a degenerate pose/projection.");
|
|
59
|
+
if (state.layers < -2147483648 || state.layers > 4294967295) throw new Error("Camera transfer has no valid layer mask.");
|
|
80
60
|
const candidate = owned.clone();
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"aspect",
|
|
86
|
-
"near",
|
|
87
|
-
"far",
|
|
88
|
-
"zoom",
|
|
89
|
-
"filmGauge",
|
|
90
|
-
"filmOffset",
|
|
91
|
-
"focus"
|
|
92
|
-
].map(number);
|
|
93
|
-
if (!(fov > 0 && fov < 180 && aspect > 0 && near > 0 && far > near && zoom > 0 && filmGauge > 0 && focus > 0)) throw new Error("Camera transfer lens is invalid.");
|
|
61
|
+
const lens = state.lens;
|
|
62
|
+
if (AutoMovieThreeKind.isPerspectiveCamera(candidate)) {
|
|
63
|
+
if (lens.kind !== "perspective") throw new Error("Camera transfer changed projection type.");
|
|
64
|
+
if (!(lens.fov > 0 && lens.fov < 180 && lens.aspect > 0 && lens.near > 0 && lens.far > lens.near && lens.zoom > 0 && lens.filmGauge > 0 && lens.focus > 0)) throw new Error("Camera transfer lens is invalid.");
|
|
94
65
|
Object.assign(candidate, {
|
|
95
|
-
fov,
|
|
96
|
-
aspect,
|
|
97
|
-
near,
|
|
98
|
-
far,
|
|
99
|
-
zoom,
|
|
100
|
-
filmGauge,
|
|
101
|
-
filmOffset,
|
|
102
|
-
focus
|
|
66
|
+
fov: lens.fov,
|
|
67
|
+
aspect: lens.aspect,
|
|
68
|
+
near: lens.near,
|
|
69
|
+
far: lens.far,
|
|
70
|
+
zoom: lens.zoom,
|
|
71
|
+
filmGauge: lens.filmGauge,
|
|
72
|
+
filmOffset: lens.filmOffset,
|
|
73
|
+
focus: lens.focus
|
|
103
74
|
});
|
|
104
75
|
} else {
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
"left",
|
|
108
|
-
"right",
|
|
109
|
-
"top",
|
|
110
|
-
"bottom",
|
|
111
|
-
"near",
|
|
112
|
-
"far",
|
|
113
|
-
"zoom"
|
|
114
|
-
].map(number);
|
|
115
|
-
if (!(right > left && top > bottom && near >= 0 && far > near && zoom > 0)) throw new Error("Camera transfer lens is invalid.");
|
|
76
|
+
if (lens.kind !== "orthographic") throw new Error("Camera transfer changed projection type.");
|
|
77
|
+
if (!(lens.right > lens.left && lens.top > lens.bottom && lens.near >= 0 && lens.far > lens.near && lens.zoom > 0)) throw new Error("Camera transfer lens is invalid.");
|
|
116
78
|
Object.assign(candidate, {
|
|
117
|
-
left,
|
|
118
|
-
right,
|
|
119
|
-
top,
|
|
120
|
-
bottom,
|
|
121
|
-
near,
|
|
122
|
-
far,
|
|
123
|
-
zoom
|
|
79
|
+
left: lens.left,
|
|
80
|
+
right: lens.right,
|
|
81
|
+
top: lens.top,
|
|
82
|
+
bottom: lens.bottom,
|
|
83
|
+
near: lens.near,
|
|
84
|
+
far: lens.far,
|
|
85
|
+
zoom: lens.zoom
|
|
124
86
|
});
|
|
125
87
|
}
|
|
126
|
-
const view =
|
|
88
|
+
const view = state.view;
|
|
127
89
|
if (view !== null) {
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"fullWidth",
|
|
132
|
-
"fullHeight",
|
|
133
|
-
"offsetX",
|
|
134
|
-
"offsetY",
|
|
135
|
-
"width",
|
|
136
|
-
"height"
|
|
137
|
-
].map((key) => {
|
|
138
|
-
const value = Reflect.get(view, key);
|
|
139
|
-
if (typeof value !== "number" || !Number.isFinite(value)) throw new Error("Camera transfer has no finite view " + key + ".");
|
|
140
|
-
return value;
|
|
141
|
-
});
|
|
142
|
-
if (typeof enabled !== "boolean" || !(fullWidth > 0 && fullHeight > 0 && width > 0 && height > 0)) throw new Error("Camera transfer view dimensions are invalid.");
|
|
143
|
-
candidate.setViewOffset(fullWidth, fullHeight, offsetX, offsetY, width, height);
|
|
144
|
-
candidate.view.enabled = enabled;
|
|
90
|
+
if (!(view.fullWidth > 0 && view.fullHeight > 0 && view.width > 0 && view.height > 0)) throw new Error("Camera transfer view dimensions are invalid.");
|
|
91
|
+
candidate.setViewOffset(view.fullWidth, view.fullHeight, view.offsetX, view.offsetY, view.width, view.height);
|
|
92
|
+
candidate.view.enabled = view.enabled;
|
|
145
93
|
} else candidate.view = null;
|
|
146
|
-
if (candidate
|
|
94
|
+
if (AutoMovieThreeKind.isPerspectiveCamera(candidate) && lens.kind === "perspective") candidate.aspect = lens.aspect;
|
|
147
95
|
candidate.updateProjectionMatrix();
|
|
148
|
-
if (!candidate.projectionMatrix.elements.every((value, index) => value === projection[index])) throw new Error("The projection does not match the transferred native lens.");
|
|
149
|
-
candidate.position.fromArray(position);
|
|
150
|
-
candidate.quaternion.fromArray(quaternion);
|
|
151
|
-
candidate.scale.fromArray(scale);
|
|
152
|
-
candidate.up.fromArray(up);
|
|
153
|
-
candidate.layers.mask = layers;
|
|
96
|
+
if (!candidate.projectionMatrix.elements.every((value, index) => value === state.projection[index])) throw new Error("The projection does not match the transferred native lens.");
|
|
97
|
+
candidate.position.fromArray(state.position);
|
|
98
|
+
candidate.quaternion.fromArray(state.quaternion);
|
|
99
|
+
candidate.scale.fromArray(state.scale);
|
|
100
|
+
candidate.up.fromArray(state.up);
|
|
101
|
+
candidate.layers.mask = state.layers;
|
|
154
102
|
candidate.updateMatrixWorld(true);
|
|
155
103
|
const worldDeterminant = candidate.matrixWorld.determinant();
|
|
156
|
-
if (
|
|
157
|
-
if (owned
|
|
158
|
-
else if (owned
|
|
104
|
+
if (candidate.matrixWorld.elements.some((value) => value === Infinity || value === -Infinity) || worldDeterminant === 0 || worldDeterminant === Infinity || worldDeterminant === -Infinity) throw new Error("The transferred camera world transform is degenerate.");
|
|
105
|
+
if (AutoMovieThreeKind.isPerspectiveCamera(owned) && AutoMovieThreeKind.isPerspectiveCamera(candidate)) owned.copy(candidate, false);
|
|
106
|
+
else if (AutoMovieThreeKind.isOrthographicCamera(owned) && AutoMovieThreeKind.isOrthographicCamera(candidate)) owned.copy(candidate, false);
|
|
159
107
|
else throw new Error("The validated camera projection changed type.");
|
|
160
108
|
owned.updateMatrixWorld(true);
|
|
161
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createViewerCameraState.mjs","names":[],"sources":["../src/createViewerCameraState.ts"],"sourcesContent":["import * as THREE from \"three\";\n\nimport type { IViewerCameraStateSnapshot } from \"./IViewerCameraStateSnapshot.js\";\n\n/**\n * Transfer detached, auto-updating Perspective/Orthographic cameras through\n * their public native lens/transform API, including film and view offsets.\n * Parented, manual-matrix and custom-projection cameras are explicitly refused:\n * another owner must transfer those relationships rather than guess them.\n * All unknown state is validated before the original camera is mutated.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Captures native detached auto-updating lens/TRS/view state and admits unknown input on a temporary camera clone, requiring finite dimensions, nondegenerate transforms and exact native projection parity before copy; custom/manual/parented cameras refuse, while non-unit quaternions are not normalized and only resulting finite invertibility is tested.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps capture and restore with the same native camera/lens owner, preserving view offsets/film settings instead of applying an unexplained raw matrix snapshot; a named transfer record describes existing fields without another projection solver.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Uses actual native projection recomputation and exact parity rather than fixture lens defaults, patched matrix methods or tolerance-based acceptance of an unsupported custom projection.\n * @evidence contracts/development/common.md#meaningful-documentation States detached/auto-updating supported classes, refused custom state and admission-before-mutation; the transfer record's field docs give vector/matrix conventions, layer mask and lens/view units.\n * @evidence contracts/development/implementation.md#efficient-algorithms Each capture/restore reads fixed-size lens/vector/matrix state and one temporary camera clone, constant adapter work/storage; camera.clone is recursive by native default, so a camera with children may additionally clone its child subtree despite parentless admission.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Capture/restore share native lens semantics and one borrowed camera identity; mutable lens/pose/view input requires new snapshots/candidate validation, with no cached custom projection or alternate math.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returned closures retain the borrowed camera and each capture transfers copied scalar/array/view state; temporary clones acquire no GPU handle themselves but may retain cloned child references until unreachable. The original camera/children remain host-owned and no task starts.\n */\nexport function createViewerCameraState(camera: THREE.Camera): {\n capture: () => IViewerCameraStateSnapshot;\n restore: (state: unknown) => void;\n} {\n const supported: () =>\n | THREE.PerspectiveCamera\n | THREE.OrthographicCamera = ():\n | THREE.PerspectiveCamera\n | THREE.OrthographicCamera => {\n if (\n !(\n camera instanceof THREE.PerspectiveCamera ||\n camera instanceof THREE.OrthographicCamera\n ) ||\n camera.parent !== null ||\n !camera.matrixAutoUpdate ||\n !camera.matrixWorldAutoUpdate\n )\n throw new Error(\n \"Camera transfer requires a detached auto-updating Perspective/Orthographic camera.\",\n );\n return camera;\n };\n const capture: () => IViewerCameraStateSnapshot =\n (): IViewerCameraStateSnapshot => {\n const owned: THREE.PerspectiveCamera | THREE.OrthographicCamera =\n supported();\n const natural: THREE.PerspectiveCamera | THREE.OrthographicCamera =\n owned.clone();\n natural.updateProjectionMatrix();\n if (\n !natural.projectionMatrix.elements.every(\n (value: number, index: number): boolean =>\n value === owned.projectionMatrix.elements[index],\n )\n )\n throw new Error(\n \"A custom projection requires its original projection owner.\",\n );\n return {\n type: owned.type,\n position: owned.position.toArray(),\n quaternion: owned.quaternion.toArray(),\n scale: owned.scale.toArray(),\n up: owned.up.toArray(),\n layers: owned.layers.mask,\n projection: owned.projectionMatrix.toArray(),\n view: owned.view === null ? null : { ...owned.view },\n lens:\n owned instanceof THREE.PerspectiveCamera\n ? {\n kind: \"perspective\",\n fov: owned.fov,\n aspect: owned.aspect,\n near: owned.near,\n far: owned.far,\n zoom: owned.zoom,\n filmGauge: owned.filmGauge,\n filmOffset: owned.filmOffset,\n focus: owned.focus,\n }\n : {\n kind: \"orthographic\",\n left: owned.left,\n right: owned.right,\n top: owned.top,\n bottom: owned.bottom,\n near: owned.near,\n far: owned.far,\n zoom: owned.zoom,\n },\n };\n };\n const restore: (state: unknown) => void = (state: unknown): void => {\n const owned: THREE.PerspectiveCamera | THREE.OrthographicCamera =\n supported();\n if (\n state === null ||\n typeof state !== \"object\" ||\n Reflect.get(state, \"type\") !== owned.type\n )\n throw new Error(\"Camera transfer changed camera type.\");\n const read: (name: string, length: number) => number[] = (\n name: string,\n length: number,\n ): number[] => {\n const value: unknown = Reflect.get(state, name);\n if (\n !Array.isArray(value) ||\n value.length !== length ||\n !value.every(\n (part: unknown): boolean =>\n typeof part === \"number\" && Number.isFinite(part),\n )\n )\n throw new Error(\"Camera transfer has no finite \" + name + \".\");\n return value;\n };\n const position: number[] = read(\"position\", 3),\n quaternion: number[] = read(\"quaternion\", 4);\n const scale: number[] = read(\"scale\", 3),\n up: number[] = read(\"up\", 3),\n projection: number[] = read(\"projection\", 16);\n const determinant: number = new THREE.Matrix4()\n .fromArray(projection)\n .determinant();\n if (\n !(Math.hypot(...quaternion) > 0) ||\n !(Math.hypot(...up) > 0) ||\n scale.some((value: number): boolean => value === 0) ||\n determinant === 0 ||\n !Number.isFinite(determinant)\n )\n throw new Error(\"Camera transfer has a degenerate pose/projection.\");\n const layers: unknown = Reflect.get(state, \"layers\");\n if (\n typeof layers !== \"number\" ||\n !Number.isInteger(layers) ||\n layers < -2147483648 ||\n layers > 4294967295\n )\n throw new Error(\"Camera transfer has no valid layer mask.\");\n const lens: unknown = Reflect.get(state, \"lens\");\n if (lens === null || typeof lens !== \"object\")\n throw new Error(\"Camera transfer has no lens.\");\n const number: (name: string) => number = (name: string): number => {\n const value: unknown = Reflect.get(lens, name);\n if (typeof value !== \"number\" || !Number.isFinite(value))\n throw new Error(\"Camera transfer has no finite \" + name + \".\");\n return value;\n };\n const candidate: THREE.PerspectiveCamera | THREE.OrthographicCamera =\n owned.clone();\n if (candidate instanceof THREE.PerspectiveCamera) {\n if (Reflect.get(lens, \"kind\") !== \"perspective\")\n throw new Error(\"Camera transfer changed projection type.\");\n const [\n fov,\n aspect,\n near,\n far,\n zoom,\n filmGauge,\n filmOffset,\n focus,\n ]: number[] = [\n \"fov\",\n \"aspect\",\n \"near\",\n \"far\",\n \"zoom\",\n \"filmGauge\",\n \"filmOffset\",\n \"focus\",\n ].map(number);\n if (\n !(\n fov > 0 &&\n fov < 180 &&\n aspect > 0 &&\n near > 0 &&\n far > near &&\n zoom > 0 &&\n filmGauge > 0 &&\n focus > 0\n )\n )\n throw new Error(\"Camera transfer lens is invalid.\");\n Object.assign(candidate, {\n fov,\n aspect,\n near,\n far,\n zoom,\n filmGauge,\n filmOffset,\n focus,\n });\n } else {\n if (Reflect.get(lens, \"kind\") !== \"orthographic\")\n throw new Error(\"Camera transfer changed projection type.\");\n const [left, right, top, bottom, near, far, zoom]: number[] = [\n \"left\",\n \"right\",\n \"top\",\n \"bottom\",\n \"near\",\n \"far\",\n \"zoom\",\n ].map(number);\n if (\n !(right > left && top > bottom && near >= 0 && far > near && zoom > 0)\n )\n throw new Error(\"Camera transfer lens is invalid.\");\n Object.assign(candidate, { left, right, top, bottom, near, far, zoom });\n }\n const view: unknown = Reflect.get(state, \"view\");\n if (view !== null) {\n if (typeof view !== \"object\")\n throw new Error(\"Camera transfer has no view offset.\");\n const enabled: unknown = Reflect.get(view, \"enabled\");\n const values: number[] = [\n \"fullWidth\",\n \"fullHeight\",\n \"offsetX\",\n \"offsetY\",\n \"width\",\n \"height\",\n ].map((key: string): number => {\n const value: unknown = Reflect.get(view, key);\n if (typeof value !== \"number\" || !Number.isFinite(value))\n throw new Error(\"Camera transfer has no finite view \" + key + \".\");\n return value;\n });\n const [fullWidth, fullHeight, offsetX, offsetY, width, height]: number[] =\n values;\n if (\n typeof enabled !== \"boolean\" ||\n !(fullWidth > 0 && fullHeight > 0 && width > 0 && height > 0)\n )\n throw new Error(\"Camera transfer view dimensions are invalid.\");\n candidate.setViewOffset(\n fullWidth,\n fullHeight,\n offsetX,\n offsetY,\n width,\n height,\n );\n candidate.view!.enabled = enabled;\n } else candidate.view = null;\n // setViewOffset also writes Perspective.aspect. A later native resize may\n // legitimately have changed that lens while preserving the crop window.\n if (candidate instanceof THREE.PerspectiveCamera)\n candidate.aspect = number(\"aspect\");\n candidate.updateProjectionMatrix();\n if (\n !candidate.projectionMatrix.elements.every(\n (value: number, index: number): boolean => value === projection[index],\n )\n )\n throw new Error(\n \"The projection does not match the transferred native lens.\",\n );\n candidate.position.fromArray(position);\n candidate.quaternion.fromArray(quaternion);\n candidate.scale.fromArray(scale);\n candidate.up.fromArray(up);\n candidate.layers.mask = layers;\n candidate.updateMatrixWorld(true);\n const worldDeterminant: number = candidate.matrixWorld.determinant();\n if (\n !candidate.matrixWorld.elements.every(Number.isFinite) ||\n worldDeterminant === 0 ||\n !Number.isFinite(worldDeterminant)\n )\n throw new Error(\"The transferred camera world transform is degenerate.\");\n if (\n owned instanceof THREE.PerspectiveCamera &&\n candidate instanceof THREE.PerspectiveCamera\n )\n owned.copy(candidate, false);\n else if (\n owned instanceof THREE.OrthographicCamera &&\n candidate instanceof THREE.OrthographicCamera\n )\n owned.copy(candidate, false);\n else throw new Error(\"The validated camera projection changed type.\");\n owned.updateMatrixWorld(true);\n };\n return { capture, restore };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,SAAgB,wBAAwB,QAGtC;CACA,MAAM,kBAI0B;EAC9B,IACE,EACE,kBAAkB,MAAM,qBACxB,kBAAkB,MAAM,uBAE1B,OAAO,WAAW,QAClB,CAAC,OAAO,oBACR,CAAC,OAAO,uBAER,MAAM,IAAI,MACR,oFACF;EACF,OAAO;CACT;CACA,MAAM,gBAC8B;EAChC,MAAM,QACJ,UAAU;EACZ,MAAM,UACJ,MAAM,MAAM;EACd,QAAQ,uBAAuB;EAC/B,IACE,CAAC,QAAQ,iBAAiB,SAAS,OAChC,OAAe,UACd,UAAU,MAAM,iBAAiB,SAAS,MAC9C,GAEA,MAAM,IAAI,MACR,6DACF;EACF,OAAO;GACL,MAAM,MAAM;GACZ,UAAU,MAAM,SAAS,QAAQ;GACjC,YAAY,MAAM,WAAW,QAAQ;GACrC,OAAO,MAAM,MAAM,QAAQ;GAC3B,IAAI,MAAM,GAAG,QAAQ;GACrB,QAAQ,MAAM,OAAO;GACrB,YAAY,MAAM,iBAAiB,QAAQ;GAC3C,MAAM,MAAM,SAAS,OAAO,OAAO,EAAE,GAAG,MAAM,KAAK;GACnD,MACE,iBAAiB,MAAM,oBACnB;IACE,MAAM;IACN,KAAK,MAAM;IACX,QAAQ,MAAM;IACd,MAAM,MAAM;IACZ,KAAK,MAAM;IACX,MAAM,MAAM;IACZ,WAAW,MAAM;IACjB,YAAY,MAAM;IAClB,OAAO,MAAM;GACf,IACA;IACE,MAAM;IACN,MAAM,MAAM;IACZ,OAAO,MAAM;IACb,KAAK,MAAM;IACX,QAAQ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;CAC9B;CACA,OAAO;EAAE;EAAS;CAAQ;AAC5B"}
|
|
1
|
+
{"version":3,"file":"createViewerCameraState.mjs","names":[],"sources":["../src/createViewerCameraState.ts"],"sourcesContent":["import { AutoMovieThreeKind } from \"@automovie/render\";\nimport * as THREE from \"three\";\n\nimport type { IViewerCameraStateSnapshot } from \"./IViewerCameraStateSnapshot.js\";\n\n/**\n * Transfer detached, auto-updating Perspective/Orthographic cameras through\n * their public native lens/transform API, including film and view offsets.\n * Parented, manual-matrix and custom-projection cameras are explicitly refused:\n * another owner must transfer those relationships rather than guess them. A\n * degenerate state is refused before the original camera is mutated.\n */\nexport function createViewerCameraState(camera: THREE.Camera): {\n capture: () => IViewerCameraStateSnapshot;\n restore: (state: IViewerCameraStateSnapshot) => void;\n} {\n const supported: () =>\n | THREE.PerspectiveCamera\n | THREE.OrthographicCamera = ():\n | THREE.PerspectiveCamera\n | THREE.OrthographicCamera => {\n if (\n !(\n AutoMovieThreeKind.isPerspectiveCamera(camera) ||\n AutoMovieThreeKind.isOrthographicCamera(camera)\n ) ||\n camera.parent !== null ||\n !camera.matrixAutoUpdate ||\n !camera.matrixWorldAutoUpdate\n )\n throw new Error(\n \"Camera transfer requires a detached auto-updating Perspective/Orthographic camera.\",\n );\n return camera;\n };\n const capture: () => IViewerCameraStateSnapshot =\n (): IViewerCameraStateSnapshot => {\n const owned: THREE.PerspectiveCamera | THREE.OrthographicCamera =\n supported();\n const natural: THREE.PerspectiveCamera | THREE.OrthographicCamera =\n owned.clone();\n natural.updateProjectionMatrix();\n if (\n !natural.projectionMatrix.elements.every(\n (value: number, index: number): boolean =>\n value === owned.projectionMatrix.elements[index],\n )\n )\n throw new Error(\n \"A custom projection requires its original projection owner.\",\n );\n return {\n type: owned.type,\n position: owned.position.toArray(),\n quaternion: owned.quaternion.toArray(),\n scale: owned.scale.toArray(),\n up: owned.up.toArray(),\n layers: owned.layers.mask,\n projection: owned.projectionMatrix.toArray(),\n view: owned.view === null ? null : { ...owned.view },\n lens: AutoMovieThreeKind.isPerspectiveCamera(owned)\n ? {\n kind: \"perspective\",\n fov: owned.fov,\n aspect: owned.aspect,\n near: owned.near,\n far: owned.far,\n zoom: owned.zoom,\n filmGauge: owned.filmGauge,\n filmOffset: owned.filmOffset,\n focus: owned.focus,\n }\n : {\n kind: \"orthographic\",\n left: owned.left,\n right: owned.right,\n top: owned.top,\n bottom: owned.bottom,\n near: owned.near,\n far: owned.far,\n zoom: owned.zoom,\n },\n };\n };\n const restore: (state: IViewerCameraStateSnapshot) => void = (\n state: IViewerCameraStateSnapshot,\n ): void => {\n const owned: THREE.PerspectiveCamera | THREE.OrthographicCamera =\n supported();\n if (state.type !== owned.type)\n throw new Error(\"Camera transfer changed camera type.\");\n const determinant: number = new THREE.Matrix4()\n .fromArray(state.projection)\n .determinant();\n // The rotation squares the quaternion, so one whose length overflows would\n // turn the world transform into infinities less infinities.\n const turn: number = Math.hypot(...state.quaternion);\n // The world determinant is the scales' product; one that overflows or\n // vanishes leaves no invertible transform.\n const volume: number = state.scale[0] * state.scale[1] * state.scale[2];\n if (\n !(turn > 0) ||\n turn === Infinity ||\n !(Math.hypot(...state.up) > 0) ||\n volume === 0 ||\n volume === Infinity ||\n volume === -Infinity ||\n determinant === 0 ||\n determinant === Infinity ||\n determinant === -Infinity\n )\n throw new Error(\"Camera transfer has a degenerate pose/projection.\");\n if (state.layers < -2147483648 || state.layers > 4294967295)\n throw new Error(\"Camera transfer has no valid layer mask.\");\n const candidate: THREE.PerspectiveCamera | THREE.OrthographicCamera =\n owned.clone();\n const lens: IViewerCameraStateSnapshot[\"lens\"] = state.lens;\n if (AutoMovieThreeKind.isPerspectiveCamera(candidate)) {\n if (lens.kind !== \"perspective\")\n throw new Error(\"Camera transfer changed projection type.\");\n if (\n !(\n lens.fov > 0 &&\n lens.fov < 180 &&\n lens.aspect > 0 &&\n lens.near > 0 &&\n lens.far > lens.near &&\n lens.zoom > 0 &&\n lens.filmGauge > 0 &&\n lens.focus > 0\n )\n )\n throw new Error(\"Camera transfer lens is invalid.\");\n Object.assign(candidate, {\n fov: lens.fov,\n aspect: lens.aspect,\n near: lens.near,\n far: lens.far,\n zoom: lens.zoom,\n filmGauge: lens.filmGauge,\n filmOffset: lens.filmOffset,\n focus: lens.focus,\n });\n } else {\n if (lens.kind !== \"orthographic\")\n throw new Error(\"Camera transfer changed projection type.\");\n if (\n !(\n lens.right > lens.left &&\n lens.top > lens.bottom &&\n lens.near >= 0 &&\n lens.far > lens.near &&\n lens.zoom > 0\n )\n )\n throw new Error(\"Camera transfer lens is invalid.\");\n Object.assign(candidate, {\n left: lens.left,\n right: lens.right,\n top: lens.top,\n bottom: lens.bottom,\n near: lens.near,\n far: lens.far,\n zoom: lens.zoom,\n });\n }\n const view: IViewerCameraStateSnapshot[\"view\"] = state.view;\n if (view !== null) {\n if (\n !(\n view.fullWidth > 0 &&\n view.fullHeight > 0 &&\n view.width > 0 &&\n view.height > 0\n )\n )\n throw new Error(\"Camera transfer view dimensions are invalid.\");\n candidate.setViewOffset(\n view.fullWidth,\n view.fullHeight,\n view.offsetX,\n view.offsetY,\n view.width,\n view.height,\n );\n candidate.view!.enabled = view.enabled;\n } else candidate.view = null;\n // setViewOffset also writes Perspective.aspect. A later native resize may\n // legitimately have changed that lens while preserving the crop window.\n if (\n AutoMovieThreeKind.isPerspectiveCamera(candidate) &&\n lens.kind === \"perspective\"\n )\n candidate.aspect = lens.aspect;\n candidate.updateProjectionMatrix();\n if (\n !candidate.projectionMatrix.elements.every(\n (value: number, index: number): boolean =>\n value === state.projection[index],\n )\n )\n throw new Error(\n \"The projection does not match the transferred native lens.\",\n );\n candidate.position.fromArray(state.position);\n candidate.quaternion.fromArray(state.quaternion);\n candidate.scale.fromArray(state.scale);\n candidate.up.fromArray(state.up);\n candidate.layers.mask = state.layers;\n candidate.updateMatrixWorld(true);\n const worldDeterminant: number = candidate.matrixWorld.determinant();\n if (\n candidate.matrixWorld.elements.some(\n (value: number): boolean => value === Infinity || value === -Infinity,\n ) ||\n worldDeterminant === 0 ||\n worldDeterminant === Infinity ||\n worldDeterminant === -Infinity\n )\n throw new Error(\"The transferred camera world transform is degenerate.\");\n if (\n AutoMovieThreeKind.isPerspectiveCamera(owned) &&\n AutoMovieThreeKind.isPerspectiveCamera(candidate)\n )\n owned.copy(candidate, false);\n else if (\n AutoMovieThreeKind.isOrthographicCamera(owned) &&\n AutoMovieThreeKind.isOrthographicCamera(candidate)\n )\n owned.copy(candidate, false);\n else throw new Error(\"The validated camera projection changed type.\");\n owned.updateMatrixWorld(true);\n };\n return { capture, restore };\n}\n"],"mappings":";;;;;;;;;;AAYA,SAAgB,wBAAwB,QAGtC;CACA,MAAM,kBAI0B;EAC9B,IACE,EACE,mBAAmB,oBAAoB,MAAM,KAC7C,mBAAmB,qBAAqB,MAAM,MAEhD,OAAO,WAAW,QAClB,CAAC,OAAO,oBACR,CAAC,OAAO,uBAER,MAAM,IAAI,MACR,oFACF;EACF,OAAO;CACT;CACA,MAAM,gBAC8B;EAChC,MAAM,QACJ,UAAU;EACZ,MAAM,UACJ,MAAM,MAAM;EACd,QAAQ,uBAAuB;EAC/B,IACE,CAAC,QAAQ,iBAAiB,SAAS,OAChC,OAAe,UACd,UAAU,MAAM,iBAAiB,SAAS,MAC9C,GAEA,MAAM,IAAI,MACR,6DACF;EACF,OAAO;GACL,MAAM,MAAM;GACZ,UAAU,MAAM,SAAS,QAAQ;GACjC,YAAY,MAAM,WAAW,QAAQ;GACrC,OAAO,MAAM,MAAM,QAAQ;GAC3B,IAAI,MAAM,GAAG,QAAQ;GACrB,QAAQ,MAAM,OAAO;GACrB,YAAY,MAAM,iBAAiB,QAAQ;GAC3C,MAAM,MAAM,SAAS,OAAO,OAAO,EAAE,GAAG,MAAM,KAAK;GACnD,MAAM,mBAAmB,oBAAoB,KAAK,IAC9C;IACE,MAAM;IACN,KAAK,MAAM;IACX,QAAQ,MAAM;IACd,MAAM,MAAM;IACZ,KAAK,MAAM;IACX,MAAM,MAAM;IACZ,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AC5B,UAA2B,UAAU,YAAY,UAAU,SAC9D,KACA,qBAAqB,KACrB,qBAAqB,YACrB,qBAAqB,WAErB,MAAM,IAAI,MAAM,uDAAuD;EACzE,IACE,mBAAmB,oBAAoB,KAAK,KAC5C,mBAAmB,oBAAoB,SAAS,GAEhD,MAAM,KAAK,WAAW,KAAK;OACxB,IACH,mBAAmB,qBAAqB,KAAK,KAC7C,mBAAmB,qBAAqB,SAAS,GAEjD,MAAM,KAAK,WAAW,KAAK;OACxB,MAAM,IAAI,MAAM,+CAA+C;EACpE,MAAM,kBAAkB,IAAI;CAC9B;CACA,OAAO;EAAE;EAAS;CAAQ;AAC5B"}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Keep requested draw time separate from the last completed display clock.
|
|
3
|
-
*
|
|
2
|
+
* Keep requested draw time separate from the last completed display clock. A
|
|
3
|
+
* completion inherits its synchronous producer's time; an out-of-loop guide
|
|
4
4
|
* redraw preserves the displayed time unless its producer supplies a new one.
|
|
5
5
|
* Nested redraws restore the enclosing request after completion or refusal.
|
|
6
6
|
* Seconds must be finite and nonnegative before clock state changes.
|
|
7
|
-
*
|
|
8
|
-
* @evidence contracts/development/implementation.md#principled-implementation Separates a validated synchronous producing-time scope from last completed time; completion prefers explicit seconds, then nested producer time, then prior display, and finally restores the enclosing producer clock even after refusal. Async work must complete with explicit time because run's scope is synchronous.
|
|
9
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps two scalar clock states and one admission rule instead of tying requested seek to displayed completion or advancing an accumulator each frame.
|
|
10
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No fixture seek time or dropped-frame estimate advances the display; negative/nonfinite requests refuse before mutation and failed producers do not overwrite the enclosing request state.
|
|
11
|
-
* @evidence contracts/development/common.md#meaningful-documentation Gives requested-versus-completed time, nested scope restoration, finite nonnegative seconds and out-of-loop completion precedence.
|
|
12
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Fixed-count scalar validation/assignment per request/completion, constant retained storage plus the actual synchronous call-stack depth of nested producers.
|
|
13
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses last completed time for out-of-loop redraws without a new authoritative timestamp; effectful producer callbacks are still invoked rather than skipped because their requested seconds match.
|
|
14
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Holds only displayed/producing scalars, borrows each synchronous callback for its invocation and starts no timer, worker or render task; no cancellation/resource handle is acquired.
|
|
15
7
|
*/
|
|
16
8
|
export declare function createViewerDisplayClock(): {
|
|
17
9
|
current: () => number;
|
|
@@ -2,26 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createViewerDisplayClock = createViewerDisplayClock;
|
|
4
4
|
/**
|
|
5
|
-
* Keep requested draw time separate from the last completed display clock.
|
|
6
|
-
*
|
|
5
|
+
* Keep requested draw time separate from the last completed display clock. A
|
|
6
|
+
* completion inherits its synchronous producer's time; an out-of-loop guide
|
|
7
7
|
* redraw preserves the displayed time unless its producer supplies a new one.
|
|
8
8
|
* Nested redraws restore the enclosing request after completion or refusal.
|
|
9
9
|
* Seconds must be finite and nonnegative before clock state changes.
|
|
10
|
-
*
|
|
11
|
-
* @evidence contracts/development/implementation.md#principled-implementation Separates a validated synchronous producing-time scope from last completed time; completion prefers explicit seconds, then nested producer time, then prior display, and finally restores the enclosing producer clock even after refusal. Async work must complete with explicit time because run's scope is synchronous.
|
|
12
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps two scalar clock states and one admission rule instead of tying requested seek to displayed completion or advancing an accumulator each frame.
|
|
13
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No fixture seek time or dropped-frame estimate advances the display; negative/nonfinite requests refuse before mutation and failed producers do not overwrite the enclosing request state.
|
|
14
|
-
* @evidence contracts/development/common.md#meaningful-documentation Gives requested-versus-completed time, nested scope restoration, finite nonnegative seconds and out-of-loop completion precedence.
|
|
15
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Fixed-count scalar validation/assignment per request/completion, constant retained storage plus the actual synchronous call-stack depth of nested producers.
|
|
16
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses last completed time for out-of-loop redraws without a new authoritative timestamp; effectful producer callbacks are still invoked rather than skipped because their requested seconds match.
|
|
17
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Holds only displayed/producing scalars, borrows each synchronous callback for its invocation and starts no timer, worker or render task; no cancellation/resource handle is acquired.
|
|
18
10
|
*/
|
|
19
11
|
function createViewerDisplayClock() {
|
|
20
12
|
let displayed = 0;
|
|
21
13
|
let producing;
|
|
22
14
|
const validate = (seconds) => {
|
|
23
|
-
if (
|
|
24
|
-
throw new Error("A completed display clock requires
|
|
15
|
+
if (seconds < 0)
|
|
16
|
+
throw new Error("A completed display clock requires nonnegative seconds.");
|
|
25
17
|
};
|
|
26
18
|
return {
|
|
27
19
|
current: () => displayed,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createViewerDisplayClock.js","sourceRoot":"","sources":["../src/createViewerDisplayClock.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"createViewerDisplayClock.js","sourceRoot":"","sources":["../src/createViewerDisplayClock.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH;IAKE,IAAI,SAAS,GAAW,CAAC,CAAC;IAC1B,IAAI,SAA6B,CAAC;IAClC,MAAM,QAAQ,GAA8B,CAAC,OAAe,EAAQ,EAAE;QACpE,IAAI,OAAO,GAAG,CAAC;YACb,MAAM,IAAI,KAAK,CACb,yDAAyD,CAC1D,CAAC;IACN,CAAC,CAAC;IACF,OAAO;QACL,OAAO,EAAE,GAAW,EAAE,CAAC,SAAS;QAChC,GAAG,EAAE,CAAC,OAAe,EAAE,OAAmB,EAAQ,EAAE;YAClD,QAAQ,CAAC,OAAO,CAAC,CAAC;YAClB,MAAM,QAAQ,GAAuB,SAAS,CAAC;YAC/C,SAAS,GAAG,OAAO,CAAC;YACpB,IAAI,CAAC;gBACH,OAAO,EAAE,CAAC;YACZ,CAAC;oBAAS,CAAC;gBACT,SAAS,GAAG,QAAQ,CAAC;YACvB,CAAC;QACH,CAAC;QACD,QAAQ,EAAE,CAAC,OAAgB,EAAU,EAAE;YACrC,MAAM,IAAI,GAAW,OAAO,IAAI,SAAS,IAAI,SAAS,CAAC;YACvD,QAAQ,CAAC,IAAI,CAAC,CAAC;YACf,SAAS,GAAG,IAAI,CAAC;YACjB,OAAO,SAAS,CAAC;QACnB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
// src/createViewerDisplayClock.ts
|
|
2
2
|
/**
|
|
3
|
-
* Keep requested draw time separate from the last completed display clock.
|
|
4
|
-
*
|
|
3
|
+
* Keep requested draw time separate from the last completed display clock. A
|
|
4
|
+
* completion inherits its synchronous producer's time; an out-of-loop guide
|
|
5
5
|
* redraw preserves the displayed time unless its producer supplies a new one.
|
|
6
6
|
* Nested redraws restore the enclosing request after completion or refusal.
|
|
7
7
|
* Seconds must be finite and nonnegative before clock state changes.
|
|
8
|
-
*
|
|
9
|
-
* @evidence contracts/development/implementation.md#principled-implementation Separates a validated synchronous producing-time scope from last completed time; completion prefers explicit seconds, then nested producer time, then prior display, and finally restores the enclosing producer clock even after refusal. Async work must complete with explicit time because run's scope is synchronous.
|
|
10
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Keeps two scalar clock states and one admission rule instead of tying requested seek to displayed completion or advancing an accumulator each frame.
|
|
11
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No fixture seek time or dropped-frame estimate advances the display; negative/nonfinite requests refuse before mutation and failed producers do not overwrite the enclosing request state.
|
|
12
|
-
* @evidence contracts/development/common.md#meaningful-documentation Gives requested-versus-completed time, nested scope restoration, finite nonnegative seconds and out-of-loop completion precedence.
|
|
13
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Fixed-count scalar validation/assignment per request/completion, constant retained storage plus the actual synchronous call-stack depth of nested producers.
|
|
14
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Reuses last completed time for out-of-loop redraws without a new authoritative timestamp; effectful producer callbacks are still invoked rather than skipped because their requested seconds match.
|
|
15
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Holds only displayed/producing scalars, borrows each synchronous callback for its invocation and starts no timer, worker or render task; no cancellation/resource handle is acquired.
|
|
16
8
|
*/
|
|
17
9
|
function createViewerDisplayClock() {
|
|
18
10
|
let displayed = 0;
|
|
19
11
|
let producing;
|
|
20
12
|
const validate = (seconds) => {
|
|
21
|
-
if (
|
|
13
|
+
if (seconds < 0) throw new Error("A completed display clock requires nonnegative seconds.");
|
|
22
14
|
};
|
|
23
15
|
return {
|
|
24
16
|
current: () => displayed,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createViewerDisplayClock.mjs","names":[],"sources":["../src/createViewerDisplayClock.ts"],"sourcesContent":["/**\n * Keep requested draw time separate from the last completed display clock
|
|
1
|
+
{"version":3,"file":"createViewerDisplayClock.mjs","names":[],"sources":["../src/createViewerDisplayClock.ts"],"sourcesContent":["/**\n * Keep requested draw time separate from the last completed display clock. A\n * completion inherits its synchronous producer's time; an out-of-loop guide\n * redraw preserves the displayed time unless its producer supplies a new one.\n * Nested redraws restore the enclosing request after completion or refusal.\n * Seconds must be finite and nonnegative before clock state changes.\n */\nexport function createViewerDisplayClock(): {\n current: () => number;\n run: (seconds: number, produce: () => void) => void;\n complete: (seconds?: number) => number;\n} {\n let displayed: number = 0;\n let producing: number | undefined;\n const validate: (seconds: number) => void = (seconds: number): void => {\n if (seconds < 0)\n throw new Error(\n \"A completed display clock requires nonnegative seconds.\",\n );\n };\n return {\n current: (): number => displayed,\n run: (seconds: number, produce: () => void): void => {\n validate(seconds);\n const previous: number | undefined = producing;\n producing = seconds;\n try {\n produce();\n } finally {\n producing = previous;\n }\n },\n complete: (seconds?: number): number => {\n const next: number = seconds ?? producing ?? displayed;\n validate(next);\n displayed = next;\n return displayed;\n },\n };\n}\n"],"mappings":";;;;;;;;AAOA,SAAgB,2BAId;CACA,IAAI,YAAoB;CACxB,IAAI;CACJ,MAAM,YAAuC,YAA0B;EACrE,IAAI,UAAU,GACZ,MAAM,IAAI,MACR,yDACF;CACJ;CACA,OAAO;EACL,eAAuB;EACvB,MAAM,SAAiB,YAA8B;GACnD,SAAS,OAAO;GAChB,MAAM,WAA+B;GACrC,YAAY;GACZ,IAAI;IACF,QAAQ;GACV,UAAU;IACR,YAAY;GACd;EACF;EACA,WAAW,YAA6B;GACtC,MAAM,OAAe,WAAW,aAAa;GAC7C,SAAS,IAAI;GACb,YAAY;GACZ,OAAO;EACT;CACF;AACF"}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Stage an original completed snapshot without publishing its generation.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @evidence contracts/development/implementation.md#principled-implementation Separates successful original bitmap copy from admitted session/generation and subsequent start; failed copy leaves prior identity/preparation intact, while disposal closes authority before releasing pending work. Caller supplies valid identity and transactional copy behavior; start failure occurs after identity commit and is not rolled back.
|
|
11
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One small publication state machine owns preparation/commit/change authority while caller ports own actual pixels, encoding/upload and pending bitmap release.
|
|
12
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Admission is actual copy success rather than a quiet watcher or fixture generation; closed/precommit branches follow lifecycle meaning, with no replacement native methods or fabricated persisted-frame success.
|
|
13
|
-
* @evidence contracts/development/common.md#meaningful-documentation Distinguishes original staging, identity commitment, start side effects, active availability and completed filesystem IO; disposal and failed-copy obligations are explicit.
|
|
14
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Coordinator uses constant scalar state and one optional identity record; real copy/start costs remain accounted by the supplied ports and are not reduced by this wrapper.
|
|
15
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work A successful prepare is reused by the next commit without another copy, while changed copies real current pixels under the committed identity; effectful repeated changes are not cached by identity alone.
|
|
16
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Holds one identity and prepared/closed flags while the caller owns one pending bitmap; dispose marks closed and invokes release once. A release throw is not retried or memoized as a repeated failure by this primitive, so native bitmap release uncertainty remains with its caller port.
|
|
2
|
+
* Stage an original completed snapshot without publishing its generation. The
|
|
3
|
+
* caller's copy port owns one latest bitmap and leaves it intact on a refused
|
|
4
|
+
* copy. Commit admits that prepared snapshot, or copies a direct active
|
|
5
|
+
* display; only then may the start port encode/upload it. Disposal releases the
|
|
6
|
+
* caller's pending bitmap and forbids further publication. The active query
|
|
7
|
+
* reports lifecycle availability, including uncommitted staging; it does not
|
|
8
|
+
* assert an admitted display or completed filesystem IO.
|
|
17
9
|
*/
|
|
18
10
|
export declare function createViewerDisplayPublication(props: {
|
|
19
11
|
copy: () => boolean;
|
|
@@ -2,21 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createViewerDisplayPublication = createViewerDisplayPublication;
|
|
4
4
|
/**
|
|
5
|
-
* Stage an original completed snapshot without publishing its generation.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @evidence contracts/development/implementation.md#principled-implementation Separates successful original bitmap copy from admitted session/generation and subsequent start; failed copy leaves prior identity/preparation intact, while disposal closes authority before releasing pending work. Caller supplies valid identity and transactional copy behavior; start failure occurs after identity commit and is not rolled back.
|
|
14
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One small publication state machine owns preparation/commit/change authority while caller ports own actual pixels, encoding/upload and pending bitmap release.
|
|
15
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Admission is actual copy success rather than a quiet watcher or fixture generation; closed/precommit branches follow lifecycle meaning, with no replacement native methods or fabricated persisted-frame success.
|
|
16
|
-
* @evidence contracts/development/common.md#meaningful-documentation Distinguishes original staging, identity commitment, start side effects, active availability and completed filesystem IO; disposal and failed-copy obligations are explicit.
|
|
17
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Coordinator uses constant scalar state and one optional identity record; real copy/start costs remain accounted by the supplied ports and are not reduced by this wrapper.
|
|
18
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work A successful prepare is reused by the next commit without another copy, while changed copies real current pixels under the committed identity; effectful repeated changes are not cached by identity alone.
|
|
19
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Holds one identity and prepared/closed flags while the caller owns one pending bitmap; dispose marks closed and invokes release once. A release throw is not retried or memoized as a repeated failure by this primitive, so native bitmap release uncertainty remains with its caller port.
|
|
5
|
+
* Stage an original completed snapshot without publishing its generation. The
|
|
6
|
+
* caller's copy port owns one latest bitmap and leaves it intact on a refused
|
|
7
|
+
* copy. Commit admits that prepared snapshot, or copies a direct active
|
|
8
|
+
* display; only then may the start port encode/upload it. Disposal releases the
|
|
9
|
+
* caller's pending bitmap and forbids further publication. The active query
|
|
10
|
+
* reports lifecycle availability, including uncommitted staging; it does not
|
|
11
|
+
* assert an admitted display or completed filesystem IO.
|
|
20
12
|
*/
|
|
21
13
|
function createViewerDisplayPublication(props) {
|
|
22
14
|
let identity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createViewerDisplayPublication.js","sourceRoot":"","sources":["../src/createViewerDisplayPublication.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"createViewerDisplayPublication.js","sourceRoot":"","sources":["../src/createViewerDisplayPublication.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACH,wCAA+C,KAI9C;IAOC,IAAI,QAA6D,CAAC;IAClE,IAAI,QAAQ,GAAY,KAAK,CAAC;IAC9B,IAAI,Q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|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @evidence contracts/development/implementation.md#principled-implementation Separates successful original bitmap copy from admitted session/generation and subsequent start; failed copy leaves prior identity/preparation intact, while disposal closes authority before releasing pending work. Caller supplies valid identity and transactional copy behavior; start failure occurs after identity commit and is not rolled back.
|
|
12
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One small publication state machine owns preparation/commit/change authority while caller ports own actual pixels, encoding/upload and pending bitmap release.
|
|
13
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Admission is actual copy success rather than a quiet watcher or fixture generation; closed/precommit branches follow lifecycle meaning, with no replacement native methods or fabricated persisted-frame success.
|
|
14
|
-
* @evidence contracts/development/common.md#meaningful-documentation Distinguishes original staging, identity commitment, start side effects, active availability and completed filesystem IO; disposal and failed-copy obligations are explicit.
|
|
15
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Coordinator uses constant scalar state and one optional identity record; real copy/start costs remain accounted by the supplied ports and are not reduced by this wrapper.
|
|
16
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work A successful prepare is reused by the next commit without another copy, while changed copies real current pixels under the committed identity; effectful repeated changes are not cached by identity alone.
|
|
17
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Holds one identity and prepared/closed flags while the caller owns one pending bitmap; dispose marks closed and invokes release once. A release throw is not retried or memoized as a repeated failure by this primitive, so native bitmap release uncertainty remains with its caller port.
|
|
3
|
+
* Stage an original completed snapshot without publishing its generation. The
|
|
4
|
+
* caller's copy port owns one latest bitmap and leaves it intact on a refused
|
|
5
|
+
* copy. Commit admits that prepared snapshot, or copies a direct active
|
|
6
|
+
* display; only then may the start port encode/upload it. Disposal releases the
|
|
7
|
+
* caller's pending bitmap and forbids further publication. The active query
|
|
8
|
+
* reports lifecycle availability, including uncommitted staging; it does not
|
|
9
|
+
* assert an admitted display or completed filesystem IO.
|
|
18
10
|
*/
|
|
19
11
|
function createViewerDisplayPublication(props) {
|
|
20
12
|
let identity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createViewerDisplayPublication.mjs","names":[],"sources":["../src/createViewerDisplayPublication.ts"],"sourcesContent":["/**\n * Stage an original completed snapshot without publishing its generation
|
|
1
|
+
{"version":3,"file":"createViewerDisplayPublication.mjs","names":[],"sources":["../src/createViewerDisplayPublication.ts"],"sourcesContent":["/**\n * Stage an original completed snapshot without publishing its generation. The\n * caller's copy port owns one latest bitmap and leaves it intact on a refused\n * copy. Commit admits that prepared snapshot, or copies a direct active\n * display; only then may the start port encode/upload it. Disposal releases the\n * caller's pending bitmap and forbids further publication. The active query\n * reports lifecycle availability, including uncommitted staging; it does not\n * assert an admitted display or completed filesystem IO.\n */\nexport function createViewerDisplayPublication(props: {\n copy: () => boolean;\n start: (session: string, generation: number) => void;\n release: () => void;\n}): {\n active: () => boolean;\n prepare: () => boolean;\n commit: (session: string, generation: number) => boolean;\n changed: () => boolean;\n dispose: () => void;\n} {\n let identity: { session: string; generation: number } | undefined;\n let prepared: boolean = false;\n let disposed: boolean = false;\n return {\n active: (): boolean => !disposed,\n prepare: (): boolean => {\n if (disposed || identity !== undefined) return false;\n const copied: boolean = props.copy();\n if (copied) prepared = true;\n return copied;\n },\n commit: (session: string, generation: number): boolean => {\n if (disposed) return false;\n if (!prepared && !props.copy()) return false;\n identity = { session, generation };\n prepared = false;\n props.start(session, generation);\n return true;\n },\n changed: (): boolean => {\n if (disposed || identity === undefined || !props.copy()) return false;\n props.start(identity.session, identity.generation);\n return true;\n },\n dispose: (): void => {\n if (disposed) return;\n disposed = true;\n props.release();\n },\n };\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,+BAA+B,OAU7C;CACA,IAAI;CACJ,IAAI,WAAoB;CACxB,IAAI,WAAoB;CACxB,OAAO;EACL,cAAuB,CAAC;EACxB,eAAwB;GACtB,IAAI,YAAY,aAAa,KAAA,GAAW,OAAO;GAC/C,MAAM,SAAkB,MAAM,KAAK;GACnC,IAAI,QAAQ,WAAW;GACvB,OAAO;EACT;EACA,SAAS,SAAiB,eAAgC;GACxD,IAAI,UAAU,OAAO;GACrB,IAAI,CAAC,YAAY,CAAC,MAAM,KAAK,GAAG,OAAO;GACvC,WAAW;IAAE;IAAS;GAAW;GACjC,WAAW;GACX,MAAM,MAAM,SAAS,UAAU;GAC/B,OAAO;EACT;EACA,eAAwB;GACtB,IAAI,YAAY,aAAa,KAAA,KAAa,CAAC,MAAM,KAAK,GAAG,OAAO;GAChE,MAAM,MAAM,SAAS,SAAS,SAAS,UAAU;GACjD,OAAO;EACT;EACA,eAAqB;GACnB,IAAI,UAAU;GACd,WAAW;GACX,MAAM,QAAQ;EAChB;CACF;AACF"}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import type { IAutoMovieViewerDisplayMetadata } from "./IAutoMovieViewerDisplayMetadata.js";
|
|
2
2
|
/**
|
|
3
|
-
* Copy a completed display before asynchronously encoding and saving it.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* pending and published frame. Owned superseded surfaces are released.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @evidence contracts/development/implementation.md#principled-implementation Structured-clones completed metadata and copies original canvas pixels before PNG encoding, then posts the committed session/generation and monotone local sequence to the actual /display sink; copied facts/pixels must belong to one completed display, and synchronous success does not certify retain/encode/network completion.
|
|
13
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Owns browser bitmap/encoding/upload lifetime and delegates preparation/commit authority to createViewerDisplayPublication; optional paint and retain ports preserve existing visible-layer and graphics-recovery owners without a parallel render or solver.
|
|
14
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Saves actual copied pixels/metadata rather than a synthetic probe or fixture PNG; refused snapshot preserves the previous pending bitmap, and asynchronous failures are surfaced as AUTOMOVIE display-save warnings instead of a false saved receipt.
|
|
15
|
-
* @evidence contracts/development/common.md#meaningful-documentation Distinguishes provisional copy, committed upload, async failure and independent original-pixel retention; one-running/one-pending population and superseded-surface release are explicit.
|
|
16
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Copy/PNG/base64 serialization are O(frame pixels or encoded bytes plus cloned metadata); one encoder/upload runs while only latest pending bitmap survives, preventing a frame-per-draw backlog. Driver/browser serialization and network costs remain real work.
|
|
17
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Prepared original copy is reused by commit, successive pending copies replace superseded surfaces, and the running result is retained for graphics recovery; different completed pixels/facts require a new original snapshot rather than a metadata-only equivalence claim.
|
|
18
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Owns at most one running surface/blob/data URL and one pending surface/facts, bounded by their raster/encoded sizes. Release discards pending pixels, aborts the owned FileReader and fetch and closes publication authority. Native toBlob cannot be canceled; its callback is awaited without starting later work after disposal.
|
|
3
|
+
* Copy a completed display before asynchronously encoding and saving it. The
|
|
4
|
+
* caller owns completion, facts and commitment. One encoder/upload and one
|
|
5
|
+
* latest pending bitmap bound work; failed snapshots retain the previous
|
|
6
|
+
* pending and published frame. Owned superseded surfaces are released. Prepare
|
|
7
|
+
* copies a provisional visible frame without starting an upload; commit admits
|
|
8
|
+
* the same staged bitmap, or copies a direct active display. Commit/change
|
|
9
|
+
* return whether synchronous copying succeeded; asynchronous encoding or HTTP
|
|
10
|
+
* failures are reported separately and do not certify IO.
|
|
19
11
|
*/
|
|
20
12
|
export declare function createViewerDisplaySave(props: {
|
|
21
13
|
canvas: HTMLCanvasElement;
|
|
@@ -3,22 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createViewerDisplaySave = createViewerDisplaySave;
|
|
4
4
|
const createViewerDisplayPublication_js_1 = require("./createViewerDisplayPublication.js");
|
|
5
5
|
/**
|
|
6
|
-
* Copy a completed display before asynchronously encoding and saving it.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* pending and published frame. Owned superseded surfaces are released.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @evidence contracts/development/implementation.md#principled-implementation Structured-clones completed metadata and copies original canvas pixels before PNG encoding, then posts the committed session/generation and monotone local sequence to the actual /display sink; copied facts/pixels must belong to one completed display, and synchronous success does not certify retain/encode/network completion.
|
|
16
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure Owns browser bitmap/encoding/upload lifetime and delegates preparation/commit authority to createViewerDisplayPublication; optional paint and retain ports preserve existing visible-layer and graphics-recovery owners without a parallel render or solver.
|
|
17
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Saves actual copied pixels/metadata rather than a synthetic probe or fixture PNG; refused snapshot preserves the previous pending bitmap, and asynchronous failures are surfaced as AUTOMOVIE display-save warnings instead of a false saved receipt.
|
|
18
|
-
* @evidence contracts/development/common.md#meaningful-documentation Distinguishes provisional copy, committed upload, async failure and independent original-pixel retention; one-running/one-pending population and superseded-surface release are explicit.
|
|
19
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Copy/PNG/base64 serialization are O(frame pixels or encoded bytes plus cloned metadata); one encoder/upload runs while only latest pending bitmap survives, preventing a frame-per-draw backlog. Driver/browser serialization and network costs remain real work.
|
|
20
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Prepared original copy is reused by commit, successive pending copies replace superseded surfaces, and the running result is retained for graphics recovery; different completed pixels/facts require a new original snapshot rather than a metadata-only equivalence claim.
|
|
21
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Owns at most one running surface/blob/data URL and one pending surface/facts, bounded by their raster/encoded sizes. Release discards pending pixels, aborts the owned FileReader and fetch and closes publication authority. Native toBlob cannot be canceled; its callback is awaited without starting later work after disposal.
|
|
6
|
+
* Copy a completed display before asynchronously encoding and saving it. The
|
|
7
|
+
* caller owns completion, facts and commitment. One encoder/upload and one
|
|
8
|
+
* latest pending bitmap bound work; failed snapshots retain the previous
|
|
9
|
+
* pending and published frame. Owned superseded surfaces are released. Prepare
|
|
10
|
+
* copies a provisional visible frame without starting an upload; commit admits
|
|
11
|
+
* the same staged bitmap, or copies a direct active display. Commit/change
|
|
12
|
+
* return whether synchronous copying succeeded; asynchronous encoding or HTTP
|
|
13
|
+
* failures are reported separately and do not certify IO.
|
|
22
14
|
*/
|
|
23
15
|
function createViewerDisplaySave(props) {
|
|
24
16
|
let sequence = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createViewerDisplaySave.js","sourceRoot":"","sources":["../src/createViewerDisplaySave.ts"],"names":[],"mappings":";;;AACA,2FAAqF;AAErF
|
|
1
|
+
{"version":3,"file":"createViewerDisplaySave.js","sourceRoot":"","sources":["../src/createViewerDisplaySave.ts"],"names":[],"mappings":";;;AACA,2FAAqF;AAErF;;;;;;;;;GASG;AACH,iCAAwC,KAOvC;IAOC,IAAI,QAAQ,GAAW,CAAC,CAAC;IACzB,IAAI,OAAO,GAAY,KAAK,CAAC;IAC7B,MAAM,YAAY,GAAoB,IAAI,eAAe,EAAE,CAAC;IAC5D,IAAI,MAA8B,CAAC;IACnC,MAAM,QAAQ,GAWE,GAWF,EAAE;QACd,MAAM,QAAQ,GACZ,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,IAAI,QAAQ,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QAC7C,MAAM,KAAK,GAAoC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACzE,MAAM,OAAO,GAAsB,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACpE,IAAI,CAAC;YACH,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;gBAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;iBAC/C,CAAC;gBACJ,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;gBACnC,OAA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