@automovie/render 0.2.0 → 0.3.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/lib/IAutoMovieCaptionEntry.d.ts +1 -28
- package/lib/IAutoMovieCaptionSidecar.d.ts +1 -25
- package/lib/IAutoMovieCapturedFrame.d.ts +1 -22
- package/lib/IAutoMovieGuidePassOutput.d.ts +1 -23
- package/lib/IAutoMoviePoseKeypointActor.d.ts +1 -36
- package/lib/IAutoMoviePoseKeypointFrame.d.ts +1 -25
- package/lib/IAutoMoviePoseKeypointSidecar.d.ts +1 -21
- package/lib/IAutoMovieRenderAdapters.d.ts +1 -34
- package/lib/IAutoMovieRenderAndSeeRequest.d.ts +1 -32
- package/lib/IAutoMovieRenderAndSeeResult.d.ts +1 -20
- package/lib/IAutoMovieRenderChunk.d.ts +1 -48
- package/lib/IAutoMovieRenderChunkPlan.d.ts +1 -32
- package/lib/IAutoMovieRenderPassManifest.d.ts +1 -21
- package/lib/IAutoMovieRenderReassembly.d.ts +1 -24
- package/lib/IAutoMovieRenderResult.d.ts +1 -39
- package/lib/IAutoMovieSequenceRenderAdapters.d.ts +1 -36
- package/lib/IAutoMovieSequenceRenderAndSeeRequest.d.ts +1 -36
- package/lib/IAutoMovieSequenceRenderAndSeeResult.d.ts +1 -23
- package/lib/IAutoMovieSequenceRenderFrame.d.ts +1 -41
- package/lib/IAutoMovieSequenceRenderPlan.d.ts +1 -76
- package/lib/IAutoMovieSequenceRenderResult.d.ts +1 -44
- package/lib/IAutoMovieSequenceRenderShotSpan.d.ts +1 -39
- package/lib/IAutoMovieSequenceRenderTransitionSpan.d.ts +1 -39
- package/lib/audio/mixAutoMovieAudioPcm.d.ts +2 -39
- package/lib/audio/mixAutoMovieAudioPcm.js.map +1 -1
- package/lib/audio/mixAutoMovieAudioPcm.mjs.map +1 -1
- package/lib/auditAutoMovieRenderObservation.d.ts +2 -14
- package/lib/auditAutoMovieRenderObservation.js.map +1 -1
- package/lib/auditAutoMovieRenderObservation.mjs.map +1 -1
- package/lib/cache/createAutoMovieHttpArtifactStore.d.ts +1 -1
- package/lib/cache/createAutoMovieHttpArtifactStore.mjs.map +1 -1
- package/lib/caption/IAutoMovieBeatCaption.d.ts +1 -22
- package/lib/caption/beatCaptions.d.ts +1 -2
- package/lib/caption/beatCaptions.js.map +1 -1
- package/lib/caption/beatCaptions.mjs.map +1 -1
- package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.d.ts +1 -12
- package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js.map +1 -1
- package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.mjs.map +1 -1
- package/lib/caption/parseAutoMovieCaptionLanguage.d.ts +1 -14
- package/lib/caption/parseAutoMovieCaptionLanguage.js.map +1 -1
- package/lib/caption/parseAutoMovieCaptionLanguage.mjs.map +1 -1
- package/lib/capture/AutoMovieCaptureFolder.d.ts +3 -13
- package/lib/capture/AutoMovieCaptureFolder.js.map +1 -1
- package/lib/capture/AutoMovieCaptureFolder.mjs.map +1 -1
- package/lib/capture/IAutoMovieCaptureBudget.d.ts +1 -24
- package/lib/capture/IAutoMovieCaptureCell.d.ts +1 -33
- package/lib/capture/IAutoMovieCaptureComparison.d.ts +1 -75
- package/lib/capture/IAutoMovieCaptureDrawing.d.ts +1 -56
- package/lib/capture/IAutoMovieCaptureLayout.d.ts +1 -47
- package/lib/capture/IAutoMovieCapturePlan.d.ts +1 -30
- package/lib/capture/IAutoMovieCapturePlanRequest.d.ts +1 -97
- package/lib/capture/IAutoMovieCaptureRecord.d.ts +1 -134
- package/lib/capture/IAutoMovieCaptureRequestSource.d.ts +1 -36
- package/lib/capture/IAutoMovieCaptureResolution.d.ts +1 -20
- package/lib/capture/IAutoMovieCaptureSelection.d.ts +1 -23
- package/lib/capture/IAutoMovieCaptureStorage.d.ts +1 -76
- package/lib/capture/IAutoMovieCaptureSubject.d.ts +1 -81
- package/lib/capture/IAutoMovieCaptureTime.d.ts +1 -16
- package/lib/capture/IAutoMovieCaptureWindow.d.ts +1 -24
- package/lib/capture/compareAutoMovieCaptureRounds.d.ts +2 -23
- package/lib/capture/compareAutoMovieCaptureRounds.js.map +1 -1
- package/lib/capture/compareAutoMovieCaptureRounds.mjs.map +1 -1
- package/lib/capture/formatAutoMovieCapturePlanRequest.d.ts +1 -1
- package/lib/capture/formatAutoMovieCapturePlanRequest.js.map +1 -1
- package/lib/capture/formatAutoMovieCapturePlanRequest.mjs.map +1 -1
- package/lib/capture/markAutoMovieCaptureCell.d.ts +1 -1
- package/lib/capture/markAutoMovieCaptureCell.mjs.map +1 -1
- package/lib/capture/parseAutoMovieCapturePlanRequest.d.ts +1 -2
- package/lib/capture/parseAutoMovieCapturePlanRequest.js.map +1 -1
- package/lib/capture/parseAutoMovieCapturePlanRequest.mjs.map +1 -1
- package/lib/capture/planAutoMovieCapture.d.ts +2 -11
- package/lib/capture/planAutoMovieCapture.js.map +1 -1
- package/lib/capture/planAutoMovieCapture.mjs.map +1 -1
- package/lib/capture/planAutoMovieCaptureFrames.d.ts +2 -22
- package/lib/capture/planAutoMovieCaptureFrames.js.map +1 -1
- package/lib/capture/planAutoMovieCaptureFrames.mjs.map +1 -1
- package/lib/capture/planAutoMovieCaptureLayout.d.ts +2 -16
- package/lib/capture/planAutoMovieCaptureLayout.js.map +1 -1
- package/lib/capture/planAutoMovieCaptureLayout.mjs.map +1 -1
- package/lib/capture/planAutoMovieVideoFrames.d.ts +2 -8
- package/lib/capture/planAutoMovieVideoFrames.js.map +1 -1
- package/lib/capture/planAutoMovieVideoFrames.mjs.map +1 -1
- package/lib/capture/planAutoMovieVideoSceneCuts.d.ts +2 -8
- package/lib/capture/planAutoMovieVideoSceneCuts.js.map +1 -1
- package/lib/capture/planAutoMovieVideoSceneCuts.mjs.map +1 -1
- package/lib/capture/readAutoMovieVideoSceneCuts.d.ts +2 -6
- package/lib/capture/readAutoMovieVideoSceneCuts.js.map +1 -1
- package/lib/capture/readAutoMovieVideoSceneCuts.mjs.map +1 -1
- package/lib/capture/resolveAutoMovieCapturePatterns.d.ts +2 -10
- package/lib/capture/resolveAutoMovieCapturePatterns.js.map +1 -1
- package/lib/capture/resolveAutoMovieCapturePatterns.mjs.map +1 -1
- package/lib/capture/runAutoMovieCapture.d.ts +2 -21
- package/lib/capture/runAutoMovieCapture.js.map +1 -1
- package/lib/capture/runAutoMovieCapture.mjs.map +1 -1
- package/lib/capture/runAutoMovieVideoCapture.d.ts +2 -20
- package/lib/capture/runAutoMovieVideoCapture.js.map +1 -1
- package/lib/capture/runAutoMovieVideoCapture.mjs.map +1 -1
- package/lib/capture/scaleAutoMovieCaptureLabels.d.ts +2 -5
- package/lib/capture/scaleAutoMovieCaptureLabels.js.map +1 -1
- package/lib/capture/scaleAutoMovieCaptureLabels.mjs.map +1 -1
- package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.d.ts +2 -6
- package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js.map +1 -1
- package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.mjs.map +1 -1
- package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.d.ts +2 -14
- package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js.map +1 -1
- package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.mjs.map +1 -1
- package/lib/delivery/AutoMovieProductionPngRole.d.ts +1 -14
- package/lib/delivery/IAutoMovieProductionPngProfile.d.ts +1 -41
- package/lib/delivery/IAutoMovieProductionVideoProfile.d.ts +1 -46
- package/lib/delivery/assertAutoMovieCaptureClock.d.ts +2 -9
- package/lib/delivery/assertAutoMovieCaptureClock.js.map +1 -1
- package/lib/delivery/assertAutoMovieCaptureClock.mjs.map +1 -1
- package/lib/delivery/assertProductionPngPicture.d.ts +2 -6
- package/lib/delivery/assertProductionPngPicture.js.map +1 -1
- package/lib/delivery/assertProductionPngPicture.mjs.map +1 -1
- package/lib/delivery/assertProductionVideoProfile.d.ts +2 -6
- package/lib/delivery/assertProductionVideoProfile.js.map +1 -1
- package/lib/delivery/assertProductionVideoProfile.mjs.map +1 -1
- package/lib/delivery/auditAutoMovieDecodedFrames.d.ts +2 -35
- package/lib/delivery/auditAutoMovieDecodedFrames.js.map +1 -1
- package/lib/delivery/auditAutoMovieDecodedFrames.mjs.map +1 -1
- package/lib/delivery/auditAutoMovieEncodedPresentation.d.ts +2 -8
- package/lib/delivery/auditAutoMovieEncodedPresentation.js.map +1 -1
- package/lib/delivery/auditAutoMovieEncodedPresentation.mjs.map +1 -1
- package/lib/delivery/planAutoMovieVideoEncoding.d.ts +2 -18
- package/lib/delivery/planAutoMovieVideoEncoding.js.map +1 -1
- package/lib/delivery/planAutoMovieVideoEncoding.mjs.map +1 -1
- package/lib/delivery/productionOpusDescription.d.ts +2 -6
- package/lib/delivery/productionOpusDescription.js.map +1 -1
- package/lib/delivery/productionOpusDescription.mjs.map +1 -1
- package/lib/delivery/resolveProductionPngProfile.d.ts +2 -7
- package/lib/delivery/resolveProductionPngProfile.js.map +1 -1
- package/lib/delivery/resolveProductionPngProfile.mjs.map +1 -1
- package/lib/delivery/resolveProductionVideoProfile.d.ts +2 -7
- package/lib/delivery/resolveProductionVideoProfile.js.map +1 -1
- package/lib/delivery/resolveProductionVideoProfile.mjs.map +1 -1
- package/lib/draw/AutoMovieDrawSession.d.ts +3 -16
- package/lib/draw/AutoMovieDrawSession.js.map +1 -1
- package/lib/draw/AutoMovieDrawSession.mjs.map +1 -1
- package/lib/draw/IAutoMovieDrawCall.d.ts +1 -27
- package/lib/draw/IAutoMovieDrawDescription.d.ts +1 -15
- package/lib/draw/IAutoMovieDrawFunction.d.ts +1 -3
- package/lib/draw/IAutoMovieDrawResult.d.ts +1 -36
- package/lib/draw/IAutoMovieDrawScene.d.ts +9 -2
- package/lib/draw/decodeAutoMovieDrawPixels.d.ts +2 -6
- package/lib/draw/decodeAutoMovieDrawPixels.js.map +1 -1
- package/lib/draw/decodeAutoMovieDrawPixels.mjs.map +1 -1
- package/lib/draw/describeAutoMovieDrawScene.d.ts +4 -4
- package/lib/draw/describeAutoMovieDrawScene.js +10 -4
- package/lib/draw/describeAutoMovieDrawScene.js.map +1 -1
- package/lib/draw/describeAutoMovieDrawScene.mjs +8 -4
- package/lib/draw/describeAutoMovieDrawScene.mjs.map +1 -1
- package/lib/draw/index.d.ts +1 -0
- package/lib/draw/index.js +1 -0
- package/lib/draw/index.js.map +1 -1
- package/lib/draw/index.mjs +2 -1
- package/lib/draw/installAutoMovieDraw.d.ts +6 -6
- package/lib/draw/installAutoMovieDraw.js +18 -23
- package/lib/draw/installAutoMovieDraw.js.map +1 -1
- package/lib/draw/installAutoMovieDraw.mjs +16 -23
- package/lib/draw/installAutoMovieDraw.mjs.map +1 -1
- package/lib/draw/planAutoMovieDrawCall.d.ts +1 -3
- package/lib/draw/planAutoMovieDrawCall.js.map +1 -1
- package/lib/draw/planAutoMovieDrawCall.mjs.map +1 -1
- package/lib/draw/renderAutoMovieDrawnVideo.d.ts +2 -12
- package/lib/draw/renderAutoMovieDrawnVideo.js.map +1 -1
- package/lib/draw/renderAutoMovieDrawnVideo.mjs.map +1 -1
- package/lib/draw/replaceAutoMovieDrawInspection.d.ts +24 -0
- package/lib/draw/replaceAutoMovieDrawInspection.js +29 -0
- package/lib/draw/replaceAutoMovieDrawInspection.js.map +1 -0
- package/lib/draw/replaceAutoMovieDrawInspection.mjs +29 -0
- package/lib/draw/replaceAutoMovieDrawInspection.mjs.map +1 -0
- package/lib/draw/stampAutoMovieDrawLegend.d.ts +2 -4
- package/lib/draw/stampAutoMovieDrawLegend.js.map +1 -1
- package/lib/draw/stampAutoMovieDrawLegend.mjs.map +1 -1
- package/lib/film/AutoMovieOrderedScalar.d.ts +1 -15
- package/lib/film/IAutoMovieProductionAudioAssetIdentity.d.ts +1 -28
- package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.d.ts +1 -29
- package/lib/film/IAutoMovieProductionEncoderIdentity.d.ts +1 -36
- package/lib/film/IAutoMovieProductionRenderChunk.d.ts +1 -39
- package/lib/film/IAutoMovieProductionRenderJobPlan.d.ts +1 -53
- package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.d.ts +1 -31
- package/lib/film/IAutoMovieProductionRenderTier.d.ts +1 -25
- package/lib/film/equalOrderedScalars.d.ts +2 -5
- package/lib/film/equalOrderedScalars.js.map +1 -1
- package/lib/film/equalOrderedScalars.mjs.map +1 -1
- package/lib/film/normalizeAudioAssets.d.ts +1 -1
- package/lib/film/normalizeAudioAssets.js.map +1 -1
- package/lib/film/normalizeAudioAssets.mjs.map +1 -1
- package/lib/film/normalizeRenderTier.d.ts +1 -1
- package/lib/film/normalizeRenderTier.mjs.map +1 -1
- package/lib/film/planProductionRenderJob.d.ts +2 -16
- package/lib/film/planProductionRenderJob.js.map +1 -1
- package/lib/film/planProductionRenderJob.mjs.map +1 -1
- package/lib/film/resolveProductionRenderTierFrameFormat.d.ts +1 -2
- package/lib/film/resolveProductionRenderTierFrameFormat.mjs.map +1 -1
- package/lib/film/validWaveAudioIdentity.d.ts +1 -1
- package/lib/film/validWaveAudioIdentity.mjs.map +1 -1
- package/lib/index.mjs +8 -7
- package/lib/picture/AutoMovieRasterSheet.d.ts +2 -2
- package/lib/picture/AutoMovieRasterSheet.js.map +1 -1
- package/lib/picture/AutoMovieRasterSheet.mjs.map +1 -1
- package/lib/picture/IAutoMovieRasterComparison.d.ts +1 -33
- package/lib/picture/IAutoMovieRasterImage.d.ts +1 -17
- package/lib/picture/compareAutoMovieRasters.d.ts +1 -2
- package/lib/picture/compareAutoMovieRasters.js.map +1 -1
- package/lib/picture/compareAutoMovieRasters.mjs.map +1 -1
- package/lib/picture/decodeAutoMovieRasterPng.d.ts +1 -1
- package/lib/picture/decodeAutoMovieRasterPng.js.map +1 -1
- package/lib/picture/decodeAutoMovieRasterPng.mjs.map +1 -1
- package/lib/picture/encodeAutoMovieRasterPng.d.ts +1 -1
- package/lib/picture/encodeAutoMovieRasterPng.js.map +1 -1
- package/lib/picture/encodeAutoMovieRasterPng.mjs.map +1 -1
- package/lib/picture/hashAutoMovieRasterImage.d.ts +1 -1
- package/lib/picture/hashAutoMovieRasterImage.mjs.map +1 -1
- package/lib/picture/stampAutoMovieRasterLabel.d.ts +2 -5
- package/lib/picture/stampAutoMovieRasterLabel.js.map +1 -1
- package/lib/picture/stampAutoMovieRasterLabel.mjs.map +1 -1
- package/lib/planCaptionSidecar.d.ts +2 -8
- package/lib/planCaptionSidecar.js.map +1 -1
- package/lib/planCaptionSidecar.mjs.map +1 -1
- package/lib/planChunkedSequenceRender.d.ts +2 -9
- package/lib/planChunkedSequenceRender.js.map +1 -1
- package/lib/planChunkedSequenceRender.mjs.map +1 -1
- package/lib/planGuidePassOutputs.d.ts +2 -6
- package/lib/planGuidePassOutputs.js.map +1 -1
- package/lib/planGuidePassOutputs.mjs.map +1 -1
- package/lib/planPoseKeypointSidecar.d.ts +2 -12
- package/lib/planPoseKeypointSidecar.js.map +1 -1
- package/lib/planPoseKeypointSidecar.mjs.map +1 -1
- package/lib/planSequenceRender.d.ts +2 -9
- package/lib/planSequenceRender.js.map +1 -1
- package/lib/planSequenceRender.mjs.map +1 -1
- package/lib/planViewerFrameTimes.d.ts +2 -16
- package/lib/planViewerFrameTimes.js.map +1 -1
- package/lib/planViewerFrameTimes.mjs.map +1 -1
- package/lib/renderAndSee.d.ts +1 -2
- package/lib/renderAndSee.js.map +1 -1
- package/lib/renderAndSee.mjs.map +1 -1
- package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.d.ts +1 -41
- package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.d.ts +1 -53
- package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.d.ts +1 -27
- package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.d.ts +2 -13
- package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js.map +1 -1
- package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.mjs.map +1 -1
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.d.ts +2 -8
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js.map +1 -1
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.mjs.map +1 -1
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.d.ts +1 -1
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js.map +1 -1
- package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.mjs.map +1 -1
- package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.d.ts +1 -2
- package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js.map +1 -1
- package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.mjs.map +1 -1
- package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.d.ts +2 -8
- package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js.map +1 -1
- package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.mjs.map +1 -1
- package/lib/renderCaptionSidecar.d.ts +1 -1
- package/lib/renderCaptionSidecar.mjs.map +1 -1
- package/lib/renderPoseKeypointSidecar.d.ts +1 -1
- package/lib/renderPoseKeypointSidecar.mjs.map +1 -1
- package/lib/renderSequenceAndSee.d.ts +1 -2
- package/lib/renderSequenceAndSee.js.map +1 -1
- package/lib/renderSequenceAndSee.mjs.map +1 -1
- package/lib/renderSequenceVideo.d.ts +1 -3
- package/lib/renderSequenceVideo.js.map +1 -1
- package/lib/renderSequenceVideo.mjs.map +1 -1
- package/lib/renderVideo.d.ts +1 -3
- package/lib/renderVideo.js.map +1 -1
- package/lib/renderVideo.mjs.map +1 -1
- package/lib/scene/AutoMovieFilmBeautyComposition.d.ts +1 -25
- package/lib/scene/AutoMoviePlayer.d.ts +1 -2
- package/lib/scene/AutoMoviePlayer.js.map +1 -1
- package/lib/scene/AutoMoviePlayer.mjs.map +1 -1
- package/lib/scene/IApplyAutoMovieSectionPlanesProps.d.ts +1 -1
- package/lib/scene/IAutoMovieFilmBeautyLayer.d.ts +1 -12
- package/lib/scene/IAutoMovieFormationPoseTake.d.ts +1 -22
- package/lib/scene/IAutoMovieFormationViewerObject.d.ts +1 -2
- package/lib/scene/IAutoMovieRigLocalTransform.d.ts +1 -15
- package/lib/scene/IAutoMovieSpringAxisSettlement.d.ts +2 -2
- package/lib/scene/IBakeFormationCycleProps.d.ts +1 -2
- package/lib/scene/applyAutoMovieRigLocals.d.ts +1 -2
- package/lib/scene/applyAutoMovieRigLocals.js.map +1 -1
- package/lib/scene/applyAutoMovieRigLocals.mjs.map +1 -1
- package/lib/scene/applyAutoMovieSectionPlanes.mjs.map +1 -1
- package/lib/scene/applyFormationCycleCadence.d.ts +1 -1
- package/lib/scene/applyFormationCycleCadence.mjs.map +1 -1
- package/lib/scene/applyPose.d.ts +1 -2
- package/lib/scene/applyPose.js.map +1 -1
- package/lib/scene/applyPose.mjs.map +1 -1
- package/lib/scene/applyRenderMode.js.map +1 -1
- package/lib/scene/applyRenderMode.mjs.map +1 -1
- package/lib/scene/applySampledObjectMotion.d.ts +1 -1
- package/lib/scene/applySampledObjectMotion.mjs.map +1 -1
- package/lib/scene/applySemanticMaskMode.d.ts +1 -1
- package/lib/scene/applySemanticMaskMode.js.map +1 -1
- package/lib/scene/applySemanticMaskMode.mjs.map +1 -1
- package/lib/scene/autoMovieAnalysisRampColor.d.ts +2 -5
- package/lib/scene/autoMovieAnalysisRampColor.js.map +1 -1
- package/lib/scene/autoMovieAnalysisRampColor.mjs.map +1 -1
- package/lib/scene/bakeFormationCycle.d.ts +2 -1
- package/lib/scene/bakeFormationCycle.js +3 -2
- package/lib/scene/bakeFormationCycle.js.map +1 -1
- package/lib/scene/bakeFormationCycle.mjs +3 -2
- package/lib/scene/bakeFormationCycle.mjs.map +1 -1
- package/lib/scene/buildAutoMovieConstruction.d.ts +2 -5
- package/lib/scene/buildAutoMovieConstruction.js.map +1 -1
- package/lib/scene/buildAutoMovieConstruction.mjs.map +1 -1
- package/lib/scene/buildGeometry.d.ts +1 -1
- package/lib/scene/buildGeometry.js.map +1 -1
- package/lib/scene/buildGeometry.mjs.map +1 -1
- package/lib/scene/buildInstancedEffect.js.map +1 -1
- package/lib/scene/buildInstancedEffect.mjs.map +1 -1
- package/lib/scene/buildInstancedFormation.js.map +1 -1
- package/lib/scene/buildInstancedFormation.mjs.map +1 -1
- package/lib/scene/buildSpaceObject.js.map +1 -1
- package/lib/scene/buildSpaceObject.mjs.map +1 -1
- package/lib/scene/createAutoMoviePhysicalPoseAdapter.d.ts +2 -2
- package/lib/scene/createAutoMoviePhysicalPoseAdapter.js.map +1 -1
- package/lib/scene/createAutoMoviePhysicalPoseAdapter.mjs.map +1 -1
- package/lib/scene/describeFormationTextureSources.d.ts +1 -2
- package/lib/scene/describeFormationTextureSources.mjs.map +1 -1
- package/lib/scene/formation/index.d.ts +1 -1
- package/lib/scene/formationCycleCadence.d.ts +1 -1
- package/lib/scene/formationCycleCadence.mjs.map +1 -1
- package/lib/scene/human-polygon/AutoMovieHumanPolygon.d.ts +7 -57
- package/lib/scene/human-polygon/applyHumanPolygonPose.d.ts +2 -2
- package/lib/scene/human-polygon/applyHumanPolygonPose.js.map +1 -1
- package/lib/scene/human-polygon/applyHumanPolygonPose.mjs.map +1 -1
- package/lib/scene/human-polygon/buildHumanPolygon.d.ts +2 -1
- package/lib/scene/human-polygon/buildHumanPolygon.js.map +1 -1
- package/lib/scene/human-polygon/buildHumanPolygon.mjs.map +1 -1
- package/lib/scene/human-polygon/buildHumanPolygonModule.d.ts +2 -2
- package/lib/scene/human-polygon/buildHumanPolygonModule.js.map +1 -1
- package/lib/scene/human-polygon/buildHumanPolygonModule.mjs.map +1 -1
- package/lib/scene/human-polygon/buildHumanPolygonParts.d.ts +2 -2
- package/lib/scene/human-polygon/buildHumanPolygonParts.js.map +1 -1
- package/lib/scene/human-polygon/buildHumanPolygonParts.mjs.map +1 -1
- package/lib/scene/human-polygon/createAutoMovieHumanPolygonFigure.d.ts +3 -2
- package/lib/scene/human-polygon/createAutoMovieHumanPolygonFigure.js.map +1 -1
- package/lib/scene/human-polygon/createAutoMovieHumanPolygonFigure.mjs.map +1 -1
- package/lib/scene/index.d.ts +1 -1
- package/lib/scene/index.js +0 -1
- package/lib/scene/index.js.map +1 -1
- package/lib/scene/index.mjs +6 -6
- package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.d.ts +2 -4
- package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.js.map +1 -1
- package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.mjs.map +1 -1
- package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_PALETTE.d.ts +1 -1
- package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_PALETTE.mjs.map +1 -1
- package/lib/scene/inspection/IApplyAutoMovieInspectionProps.d.ts +2 -3
- package/lib/scene/inspection/IAutoMovieInspectionCamera.d.ts +1 -29
- package/lib/scene/inspection/IAutoMovieInspectionHandle.d.ts +3 -6
- package/lib/scene/inspection/IAutoMovieInspectionKind.d.ts +1 -16
- package/lib/scene/inspection/IAutoMovieInspectionLabel.d.ts +1 -18
- package/lib/scene/inspection/IAutoMovieInspectionLegendEntry.d.ts +1 -22
- package/lib/scene/inspection/IAutoMovieInspectionMarkSet.d.ts +1 -1
- package/lib/scene/inspection/IAutoMovieInspectionMeasured.d.ts +1 -1
- package/lib/scene/inspection/IAutoMovieInspectionRequest.d.ts +1 -99
- package/lib/scene/inspection/IAutoMovieInspectionTrail.d.ts +1 -18
- package/lib/scene/inspection/IAutoMovieInspectionView.d.ts +1 -80
- package/lib/scene/inspection/applyAutoMovieInspection.js.map +1 -1
- package/lib/scene/inspection/applyAutoMovieInspection.mjs.map +1 -1
- package/lib/scene/inspection/applyAutoMovieInspectionSection.d.ts +1 -1
- package/lib/scene/inspection/applyAutoMovieInspectionSection.mjs.map +1 -1
- package/lib/scene/inspection/applyAutoMovieInspectionShade.d.ts +2 -2
- package/lib/scene/inspection/applyAutoMovieInspectionShade.js.map +1 -1
- package/lib/scene/inspection/applyAutoMovieInspectionShade.mjs.map +1 -1
- package/lib/scene/inspection/buildAutoMovieInspectionMarks.mjs.map +1 -1
- package/lib/scene/inspection/chooseAutoMovieInspectionMarks.d.ts +1 -1
- package/lib/scene/inspection/chooseAutoMovieInspectionMarks.mjs.map +1 -1
- package/lib/scene/inspection/colorAutoMovieInspectionObjects.d.ts +3 -3
- package/lib/scene/inspection/colorAutoMovieInspectionObjects.js.map +1 -1
- package/lib/scene/inspection/colorAutoMovieInspectionObjects.mjs.map +1 -1
- package/lib/scene/inspection/expandAutoMovieInspectionSweep.d.ts +2 -17
- package/lib/scene/inspection/expandAutoMovieInspectionSweep.js.map +1 -1
- package/lib/scene/inspection/expandAutoMovieInspectionSweep.mjs.map +1 -1
- package/lib/scene/inspection/focusAutoMovieInspection.d.ts +2 -3
- package/lib/scene/inspection/focusAutoMovieInspection.js.map +1 -1
- package/lib/scene/inspection/focusAutoMovieInspection.mjs.map +1 -1
- package/lib/scene/inspection/formatAutoMovieInspectionCameraView.d.ts +1 -1
- package/lib/scene/inspection/formatAutoMovieInspectionCameraView.js.map +1 -1
- package/lib/scene/inspection/formatAutoMovieInspectionCameraView.mjs.map +1 -1
- package/lib/scene/inspection/formatAutoMovieInspectionRequest.d.ts +1 -1
- package/lib/scene/inspection/formatAutoMovieInspectionRequest.js.map +1 -1
- package/lib/scene/inspection/formatAutoMovieInspectionRequest.mjs.map +1 -1
- package/lib/scene/inspection/formatAutoMovieInspectionView.d.ts +1 -1
- package/lib/scene/inspection/formatAutoMovieInspectionView.js.map +1 -1
- package/lib/scene/inspection/formatAutoMovieInspectionView.mjs.map +1 -1
- package/lib/scene/inspection/legendAutoMovieInspectionMarks.d.ts +2 -6
- package/lib/scene/inspection/legendAutoMovieInspectionMarks.js.map +1 -1
- package/lib/scene/inspection/legendAutoMovieInspectionMarks.mjs.map +1 -1
- package/lib/scene/inspection/listAutoMovieInspectionKinds.d.ts +2 -9
- package/lib/scene/inspection/listAutoMovieInspectionKinds.js.map +1 -1
- package/lib/scene/inspection/listAutoMovieInspectionKinds.mjs.map +1 -1
- package/lib/scene/inspection/markAutoMovieInspectionTrails.d.ts +1 -2
- package/lib/scene/inspection/markAutoMovieInspectionTrails.js.map +1 -1
- package/lib/scene/inspection/markAutoMovieInspectionTrails.mjs.map +1 -1
- package/lib/scene/inspection/measureAutoMovieInspectionDefects.d.ts +1 -1
- package/lib/scene/inspection/measureAutoMovieInspectionDefects.js.map +1 -1
- package/lib/scene/inspection/measureAutoMovieInspectionDefects.mjs.map +1 -1
- package/lib/scene/inspection/measureAutoMovieInspectionEdges.mjs.map +1 -1
- package/lib/scene/inspection/measureAutoMovieInspectionMeshes.d.ts +1 -1
- package/lib/scene/inspection/measureAutoMovieInspectionMeshes.mjs.map +1 -1
- package/lib/scene/inspection/measureAutoMovieInspectionPaths.d.ts +2 -7
- package/lib/scene/inspection/measureAutoMovieInspectionPaths.js.map +1 -1
- package/lib/scene/inspection/measureAutoMovieInspectionPaths.mjs.map +1 -1
- package/lib/scene/inspection/mergeAutoMovieInspectionLegends.d.ts +1 -1
- package/lib/scene/inspection/mergeAutoMovieInspectionLegends.mjs.map +1 -1
- package/lib/scene/inspection/parseAutoMovieInspectionRequest.d.ts +1 -1
- package/lib/scene/inspection/parseAutoMovieInspectionRequest.js.map +1 -1
- package/lib/scene/inspection/parseAutoMovieInspectionRequest.mjs.map +1 -1
- package/lib/scene/inspection/parseAutoMovieInspectionView.d.ts +1 -1
- package/lib/scene/inspection/parseAutoMovieInspectionView.js.map +1 -1
- package/lib/scene/inspection/parseAutoMovieInspectionView.mjs.map +1 -1
- package/lib/scene/inspection/placeAutoMovieInspectionLabels.d.ts +2 -6
- package/lib/scene/inspection/placeAutoMovieInspectionLabels.js.map +1 -1
- package/lib/scene/inspection/placeAutoMovieInspectionLabels.mjs.map +1 -1
- package/lib/scene/inspection/planAutoMovieInspectionTrailTimes.d.ts +2 -9
- package/lib/scene/inspection/planAutoMovieInspectionTrailTimes.js.map +1 -1
- package/lib/scene/inspection/planAutoMovieInspectionTrailTimes.mjs.map +1 -1
- package/lib/scene/inspection/resolveAutoMovieInspectionColors.d.ts +2 -18
- package/lib/scene/inspection/resolveAutoMovieInspectionColors.js.map +1 -1
- package/lib/scene/inspection/resolveAutoMovieInspectionColors.mjs.map +1 -1
- package/lib/scene/inspection/resolveAutoMovieInspectionView.d.ts +1 -2
- package/lib/scene/inspection/resolveAutoMovieInspectionView.js.map +1 -1
- package/lib/scene/inspection/resolveAutoMovieInspectionView.mjs.map +1 -1
- package/lib/scene/inspection/sampleAutoMovieInspectionTrails.d.ts +1 -1
- package/lib/scene/inspection/sampleAutoMovieInspectionTrails.js.map +1 -1
- package/lib/scene/inspection/sampleAutoMovieInspectionTrails.mjs.map +1 -1
- package/lib/scene/matchesAutoMovieShadowTextureProfile.d.ts +1 -1
- package/lib/scene/matchesAutoMovieShadowTextureProfile.mjs.map +1 -1
- package/lib/scene/observeAutoMovieRendererFrame.d.ts +2 -5
- package/lib/scene/observeAutoMovieRendererFrame.js.map +1 -1
- package/lib/scene/observeAutoMovieRendererFrame.mjs.map +1 -1
- package/lib/scene/planAutoMovieShadowTextureTarget.d.ts +1 -1
- package/lib/scene/planAutoMovieShadowTextureTarget.mjs.map +1 -1
- package/lib/scene/readAutoMovieFilmDisplayTextureResidency.d.ts +2 -6
- package/lib/scene/readAutoMovieFilmDisplayTextureResidency.js.map +1 -1
- package/lib/scene/readAutoMovieFilmDisplayTextureResidency.mjs.map +1 -1
- package/lib/scene/readAutoMovieMaterialTextureSources.d.ts +3 -5
- package/lib/scene/readAutoMovieMaterialTextureSources.js.map +1 -1
- package/lib/scene/readAutoMovieMaterialTextureSources.mjs.map +1 -1
- package/lib/scene/readAutoMovieRenderTextureTarget.d.ts +1 -1
- package/lib/scene/readAutoMovieRenderTextureTarget.mjs.map +1 -1
- package/lib/scene/readAutoMovieShadowTextureTargets.d.ts +1 -2
- package/lib/scene/readAutoMovieShadowTextureTargets.js.map +1 -1
- package/lib/scene/readAutoMovieShadowTextureTargets.mjs.map +1 -1
- package/lib/scene/readAutoMovieTextureSource.d.ts +1 -1
- package/lib/scene/readAutoMovieTextureSource.js.map +1 -1
- package/lib/scene/readAutoMovieTextureSource.mjs.map +1 -1
- package/lib/scene/readAutoMovieTransmissionTextureTarget.d.ts +1 -1
- package/lib/scene/readAutoMovieTransmissionTextureTarget.mjs.map +1 -1
- package/lib/scene/resolveAutoMovieFilmBeautyComposition.d.ts +2 -3
- package/lib/scene/resolveAutoMovieFilmBeautyComposition.js.map +1 -1
- package/lib/scene/resolveAutoMovieFilmBeautyComposition.mjs.map +1 -1
- package/lib/scene/semanticMask/IAutoMovieSemanticMaskBinding.d.ts +1 -19
- package/lib/scene/semanticMask/attachAutoMovieSemanticMask.d.ts +1 -1
- package/lib/scene/semanticMask/attachAutoMovieSemanticMask.mjs.map +1 -1
- package/lib/scene/semanticMask/autoMovieSemanticMaskOf.d.ts +1 -1
- package/lib/scene/semanticMask/autoMovieSemanticMaskOf.mjs.map +1 -1
- package/lib/sliceCaptionSidecar.d.ts +1 -1
- package/lib/sliceCaptionSidecar.mjs.map +1 -1
- package/package.json +7 -7
- package/src/IAutoMovieCaptionEntry.ts +1 -32
- package/src/IAutoMovieCaptionSidecar.ts +1 -29
- package/src/IAutoMovieCapturedFrame.ts +1 -24
- package/src/IAutoMovieGuidePassOutput.ts +1 -27
- package/src/IAutoMoviePoseKeypointActor.ts +1 -39
- package/src/IAutoMoviePoseKeypointFrame.ts +1 -28
- package/src/IAutoMoviePoseKeypointSidecar.ts +1 -25
- package/src/IAutoMovieRenderAdapters.ts +1 -39
- package/src/IAutoMovieRenderAndSeeRequest.ts +1 -38
- package/src/IAutoMovieRenderAndSeeResult.ts +1 -23
- package/src/IAutoMovieRenderChunk.ts +1 -62
- package/src/IAutoMovieRenderChunkPlan.ts +1 -40
- package/src/IAutoMovieRenderPassManifest.ts +1 -25
- package/src/IAutoMovieRenderReassembly.ts +1 -28
- package/src/IAutoMovieRenderResult.ts +1 -46
- package/src/IAutoMovieSequenceRenderAdapters.ts +1 -41
- package/src/IAutoMovieSequenceRenderAndSeeRequest.ts +1 -47
- package/src/IAutoMovieSequenceRenderAndSeeResult.ts +1 -23
- package/src/IAutoMovieSequenceRenderFrame.ts +1 -48
- package/src/IAutoMovieSequenceRenderPlan.ts +1 -88
- package/src/IAutoMovieSequenceRenderResult.ts +1 -52
- package/src/IAutoMovieSequenceRenderShotSpan.ts +1 -46
- package/src/IAutoMovieSequenceRenderTransitionSpan.ts +1 -46
- package/src/audio/mixAutoMovieAudioPcm.ts +10 -44
- package/src/auditAutoMovieRenderObservation.ts +5 -14
- package/src/cache/createAutoMovieHttpArtifactStore.ts +1 -1
- package/src/caption/IAutoMovieBeatCaption.ts +1 -23
- package/src/caption/beatCaptions.ts +1 -1
- package/src/caption/inspectAutoMovieCaptionReadabilityWithRuntime.ts +1 -12
- package/src/caption/parseAutoMovieCaptionLanguage.ts +1 -13
- package/src/capture/AutoMovieCaptureFolder.ts +10 -16
- package/src/capture/IAutoMovieCaptureBudget.ts +1 -26
- package/src/capture/IAutoMovieCaptureCell.ts +1 -42
- package/src/capture/IAutoMovieCaptureComparison.ts +1 -96
- package/src/capture/IAutoMovieCaptureDrawing.ts +1 -64
- package/src/capture/IAutoMovieCaptureLayout.ts +1 -51
- package/src/capture/IAutoMovieCapturePlan.ts +1 -36
- package/src/capture/IAutoMovieCapturePlanRequest.ts +1 -117
- package/src/capture/IAutoMovieCaptureRecord.ts +1 -174
- package/src/capture/IAutoMovieCaptureRequestSource.ts +1 -37
- package/src/capture/IAutoMovieCaptureResolution.ts +1 -23
- package/src/capture/IAutoMovieCaptureSelection.ts +1 -28
- package/src/capture/IAutoMovieCaptureStorage.ts +1 -76
- package/src/capture/IAutoMovieCaptureSubject.ts +1 -94
- package/src/capture/IAutoMovieCaptureTime.ts +1 -17
- package/src/capture/IAutoMovieCaptureWindow.ts +1 -29
- package/src/capture/compareAutoMovieCaptureRounds.ts +33 -48
- package/src/capture/formatAutoMovieCapturePlanRequest.ts +7 -3
- package/src/capture/markAutoMovieCaptureCell.ts +1 -1
- package/src/capture/parseAutoMovieCapturePlanRequest.ts +13 -10
- package/src/capture/planAutoMovieCapture.ts +20 -21
- package/src/capture/planAutoMovieCaptureFrames.ts +9 -28
- package/src/capture/planAutoMovieCaptureLayout.ts +8 -21
- package/src/capture/planAutoMovieVideoFrames.ts +5 -10
- package/src/capture/planAutoMovieVideoSceneCuts.ts +5 -10
- package/src/capture/readAutoMovieVideoSceneCuts.ts +5 -7
- package/src/capture/resolveAutoMovieCapturePatterns.ts +11 -14
- package/src/capture/runAutoMovieCapture.ts +19 -33
- package/src/capture/runAutoMovieVideoCapture.ts +13 -32
- package/src/capture/scaleAutoMovieCaptureLabels.ts +5 -2
- package/src/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.ts +5 -6
- package/src/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.ts +17 -27
- package/src/delivery/AutoMovieProductionPngRole.ts +1 -18
- package/src/delivery/IAutoMovieProductionPngProfile.ts +1 -52
- package/src/delivery/IAutoMovieProductionVideoProfile.ts +1 -48
- package/src/delivery/assertAutoMovieCaptureClock.ts +7 -7
- package/src/delivery/assertProductionPngPicture.ts +8 -13
- package/src/delivery/assertProductionVideoProfile.ts +5 -12
- package/src/delivery/auditAutoMovieDecodedFrames.ts +17 -56
- package/src/delivery/auditAutoMovieEncodedPresentation.ts +3 -8
- package/src/delivery/planAutoMovieVideoEncoding.ts +8 -23
- package/src/delivery/productionOpusDescription.ts +9 -15
- package/src/delivery/resolveProductionPngProfile.ts +9 -17
- package/src/delivery/resolveProductionVideoProfile.ts +9 -16
- package/src/draw/AutoMovieDrawSession.ts +19 -18
- package/src/draw/IAutoMovieDrawCall.ts +1 -34
- package/src/draw/IAutoMovieDrawDescription.ts +1 -17
- package/src/draw/IAutoMovieDrawFunction.ts +5 -3
- package/src/draw/IAutoMovieDrawResult.ts +1 -45
- package/src/draw/IAutoMovieDrawScene.ts +10 -2
- package/src/draw/decodeAutoMovieDrawPixels.ts +5 -3
- package/src/draw/describeAutoMovieDrawScene.ts +18 -11
- package/src/draw/index.ts +1 -0
- package/src/draw/installAutoMovieDraw.ts +43 -45
- package/src/draw/planAutoMovieDrawCall.ts +8 -5
- package/src/draw/renderAutoMovieDrawnVideo.ts +6 -9
- package/src/draw/replaceAutoMovieDrawInspection.ts +36 -0
- package/src/draw/stampAutoMovieDrawLegend.ts +7 -5
- package/src/film/AutoMovieOrderedScalar.ts +1 -15
- package/src/film/IAutoMovieProductionAudioAssetIdentity.ts +1 -40
- package/src/film/IAutoMovieProductionAudioAssetIdentityBase.ts +1 -34
- package/src/film/IAutoMovieProductionEncoderIdentity.ts +1 -42
- package/src/film/IAutoMovieProductionRenderChunk.ts +1 -47
- package/src/film/IAutoMovieProductionRenderJobPlan.ts +1 -73
- package/src/film/IAutoMovieProductionRenderRuntimeIdentity.ts +1 -37
- package/src/film/IAutoMovieProductionRenderTier.ts +1 -27
- package/src/film/equalOrderedScalars.ts +10 -10
- package/src/film/normalizeAudioAssets.ts +4 -2
- package/src/film/normalizeRenderTier.ts +1 -1
- package/src/film/planProductionRenderJob.ts +11 -48
- package/src/film/resolveProductionRenderTierFrameFormat.ts +1 -1
- package/src/film/validWaveAudioIdentity.ts +3 -3
- package/src/picture/AutoMovieRasterSheet.ts +7 -3
- package/src/picture/IAutoMovieRasterComparison.ts +1 -33
- package/src/picture/IAutoMovieRasterImage.ts +1 -19
- package/src/picture/compareAutoMovieRasters.ts +4 -2
- package/src/picture/decodeAutoMovieRasterPng.ts +2 -1
- package/src/picture/encodeAutoMovieRasterPng.ts +2 -1
- package/src/picture/hashAutoMovieRasterImage.ts +1 -1
- package/src/picture/stampAutoMovieRasterLabel.ts +5 -2
- package/src/planCaptionSidecar.ts +11 -30
- package/src/planChunkedSequenceRender.ts +15 -26
- package/src/planGuidePassOutputs.ts +10 -16
- package/src/planPoseKeypointSidecar.ts +11 -40
- package/src/planSequenceRender.ts +11 -32
- package/src/planViewerFrameTimes.ts +5 -22
- package/src/renderAndSee.ts +5 -2
- package/src/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.ts +1 -53
- package/src/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.ts +1 -61
- package/src/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.ts +1 -29
- package/src/renderBudgetPreflight/assessAutoMovieRenderBudget.ts +9 -37
- package/src/renderBudgetPreflight/autoMovieRenderBudgetEvidence.ts +11 -15
- package/src/renderBudgetPreflight/autoMovieRenderBudgetRefusal.ts +2 -3
- package/src/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.ts +4 -3
- package/src/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.ts +7 -19
- package/src/renderCaptionSidecar.ts +1 -1
- package/src/renderPoseKeypointSidecar.ts +1 -1
- package/src/renderSequenceAndSee.ts +5 -2
- package/src/renderSequenceVideo.ts +6 -4
- package/src/renderVideo.ts +5 -3
- package/src/scene/AutoMovieFilmBeautyComposition.ts +1 -24
- package/src/scene/AutoMoviePlayer.ts +12 -12
- package/src/scene/IApplyAutoMovieSectionPlanesProps.ts +1 -1
- package/src/scene/IAutoMovieFilmBeautyLayer.ts +1 -12
- package/src/scene/IAutoMovieFormationPoseTake.ts +1 -26
- package/src/scene/IAutoMovieFormationViewerObject.ts +4 -2
- package/src/scene/IAutoMovieRigLocalTransform.ts +1 -16
- package/src/scene/IAutoMovieSpringAxisSettlement.ts +2 -2
- package/src/scene/IBakeFormationCycleProps.ts +4 -2
- package/src/scene/applyAutoMovieRigLocals.ts +4 -2
- package/src/scene/applyAutoMovieSectionPlanes.ts +1 -1
- package/src/scene/applyFormationCycleCadence.ts +1 -1
- package/src/scene/applyPose.ts +2 -5
- package/src/scene/applyRenderMode.ts +5 -5
- package/src/scene/applySampledObjectMotion.ts +1 -1
- package/src/scene/applySemanticMaskMode.ts +1 -1
- package/src/scene/autoMovieAnalysisRampColor.ts +7 -5
- package/src/scene/bakeFormationCycle.ts +4 -3
- package/src/scene/buildAutoMovieConstruction.ts +2 -5
- package/src/scene/buildGeometry.ts +6 -9
- package/src/scene/buildInstancedEffect.ts +6 -6
- package/src/scene/buildInstancedFormation.ts +3 -3
- package/src/scene/buildSpaceObject.ts +7 -3
- package/src/scene/createAutoMoviePhysicalPoseAdapter.ts +4 -4
- package/src/scene/describeFormationTextureSources.ts +2 -2
- package/src/scene/formation/index.ts +1 -1
- package/src/scene/formationCycleCadence.ts +1 -1
- package/src/scene/human-polygon/AutoMovieHumanPolygon.ts +7 -67
- package/src/scene/human-polygon/applyHumanPolygonPose.ts +12 -7
- package/src/scene/human-polygon/buildHumanPolygon.ts +23 -12
- package/src/scene/human-polygon/buildHumanPolygonModule.ts +6 -3
- package/src/scene/human-polygon/buildHumanPolygonParts.ts +10 -6
- package/src/scene/human-polygon/createAutoMovieHumanPolygonFigure.ts +10 -3
- package/src/scene/index.ts +1 -1
- package/src/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.ts +3 -1
- package/src/scene/inspection/AUTO_MOVIE_INSPECTION_PALETTE.ts +1 -1
- package/src/scene/inspection/IApplyAutoMovieInspectionProps.ts +5 -3
- package/src/scene/inspection/IAutoMovieInspectionCamera.ts +1 -38
- package/src/scene/inspection/IAutoMovieInspectionHandle.ts +8 -6
- package/src/scene/inspection/IAutoMovieInspectionKind.ts +1 -18
- package/src/scene/inspection/IAutoMovieInspectionLabel.ts +1 -21
- package/src/scene/inspection/IAutoMovieInspectionLegendEntry.ts +1 -24
- package/src/scene/inspection/IAutoMovieInspectionMarkSet.ts +1 -1
- package/src/scene/inspection/IAutoMovieInspectionMeasured.ts +1 -1
- package/src/scene/inspection/IAutoMovieInspectionRequest.ts +1 -115
- package/src/scene/inspection/IAutoMovieInspectionTrail.ts +1 -21
- package/src/scene/inspection/IAutoMovieInspectionView.ts +1 -92
- package/src/scene/inspection/applyAutoMovieInspection.ts +12 -8
- package/src/scene/inspection/applyAutoMovieInspectionSection.ts +1 -1
- package/src/scene/inspection/applyAutoMovieInspectionShade.ts +2 -2
- package/src/scene/inspection/buildAutoMovieInspectionMarks.ts +1 -1
- package/src/scene/inspection/chooseAutoMovieInspectionMarks.ts +1 -1
- package/src/scene/inspection/colorAutoMovieInspectionObjects.ts +6 -3
- package/src/scene/inspection/expandAutoMovieInspectionSweep.ts +8 -15
- package/src/scene/inspection/focusAutoMovieInspection.ts +6 -4
- package/src/scene/inspection/formatAutoMovieInspectionCameraView.ts +2 -1
- package/src/scene/inspection/formatAutoMovieInspectionRequest.ts +6 -3
- package/src/scene/inspection/formatAutoMovieInspectionView.ts +4 -3
- package/src/scene/inspection/legendAutoMovieInspectionMarks.ts +6 -3
- package/src/scene/inspection/listAutoMovieInspectionKinds.ts +7 -10
- package/src/scene/inspection/markAutoMovieInspectionTrails.ts +4 -2
- package/src/scene/inspection/measureAutoMovieInspectionDefects.ts +5 -5
- package/src/scene/inspection/measureAutoMovieInspectionEdges.ts +1 -1
- package/src/scene/inspection/measureAutoMovieInspectionMeshes.ts +1 -1
- package/src/scene/inspection/measureAutoMovieInspectionPaths.ts +6 -3
- package/src/scene/inspection/mergeAutoMovieInspectionLegends.ts +1 -1
- package/src/scene/inspection/parseAutoMovieInspectionRequest.ts +10 -7
- package/src/scene/inspection/parseAutoMovieInspectionView.ts +6 -4
- package/src/scene/inspection/placeAutoMovieInspectionLabels.ts +6 -7
- package/src/scene/inspection/planAutoMovieInspectionTrailTimes.ts +4 -11
- package/src/scene/inspection/resolveAutoMovieInspectionColors.ts +7 -11
- package/src/scene/inspection/resolveAutoMovieInspectionView.ts +5 -3
- package/src/scene/inspection/sampleAutoMovieInspectionTrails.ts +1 -1
- package/src/scene/matchesAutoMovieShadowTextureProfile.ts +1 -1
- package/src/scene/observeAutoMovieRendererFrame.ts +3 -3
- package/src/scene/planAutoMovieShadowTextureTarget.ts +1 -1
- package/src/scene/readAutoMovieFilmDisplayTextureResidency.ts +3 -12
- package/src/scene/readAutoMovieMaterialTextureSources.ts +5 -3
- package/src/scene/readAutoMovieRenderTextureTarget.ts +1 -1
- package/src/scene/readAutoMovieShadowTextureTargets.ts +5 -5
- package/src/scene/readAutoMovieTextureSource.ts +4 -2
- package/src/scene/readAutoMovieTransmissionTextureTarget.ts +1 -1
- package/src/scene/resolveAutoMovieFilmBeautyComposition.ts +6 -4
- package/src/scene/semanticMask/IAutoMovieSemanticMaskBinding.ts +1 -24
- package/src/scene/semanticMask/attachAutoMovieSemanticMask.ts +1 -1
- package/src/scene/semanticMask/autoMovieSemanticMaskOf.ts +1 -1
- package/src/sliceCaptionSidecar.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeAutoMovieInspectionLabels.mjs","names":[],"sources":["../../../src/scene/inspection/placeAutoMovieInspectionLabels.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"placeAutoMovieInspectionLabels.mjs","names":[],"sources":["../../../src/scene/inspection/placeAutoMovieInspectionLabels.ts"],"sourcesContent":["import type {\n IAutoMovieInspectionLabel,\n IAutoMovieInspectionLabelPlacement,\n IAutoMovieVector3,\n} from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\n/**\n * Place labels on a picture: project each labelled path's centre through the camera into pixels and keep a label only where its box overlaps no label kept before it.\n *\n * Each path is given as its world box, and its label reads the path's last name, `(root)` for the empty path. A label's anchor is the pixel the centre of its box projects to, with the top-left of the picture at (0, 0), x to the right and y down, and its box is the box `stampAutoMovieRasterLabel` stamps at `scale` with its top-left corner on the anchor: `scale * (4 * length + 3)` pixels wide and `9 * scale` high. Labels are taken in the order given; one whose box overlaps a kept box, or whose anchor lies behind the camera or outside the picture, is listed in `dropped` with its projected anchor instead, so a reader knows it was asked for.\n *\n * The camera's world matrix and projection must be current.\n *\n * It throws for a size or scale that is not a positive integer.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the pixel convention, the box and where it comes from, the order and the three reasons a label is dropped, the camera premise and the refusal.\n * @evidence contracts/development/implementation.md#principled-implementation A world point is projected through the camera's view and projection to normalized device coordinates and mapped to pixels with y flipped, three.js's own projection; the box matches the stamp's glyph metrics, so a host that stamps the labels draws them where their overlap was decided.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One projection per box centre, then one greedy pass that keeps a label when it overlaps no kept box.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A label is never moved to make room, so every kept label sits at its own anchor, and none is silently lost.\n * @evidence contracts/development/implementation.md#efficient-algorithms Quadratic in the labels kept, which a legible picture holds tens of.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one camera and one set of anchors.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns fresh records and keeps nothing.\n */\nexport function placeAutoMovieInspectionLabels(props: {\n /** What to label: each path with its world box in metres. */\n boxes: readonly {\n path: string;\n min: IAutoMovieVector3;\n max: IAutoMovieVector3;\n }[];\n\n /** The camera the picture is drawn through. */\n camera: THREE.Camera;\n\n /** Picture width in pixels. */\n width: number;\n\n /** Picture height in pixels. */\n height: number;\n\n /** Size of one font pixel of the stamp, in picture pixels. */\n scale: number;\n}): IAutoMovieInspectionLabelPlacement {\n for (const [name, value] of [\n [\"width\", props.width],\n [\"height\", props.height],\n [\"scale\", props.scale],\n ] as const)\n if (!(Number.isSafeInteger(value) && value > 0))\n throw new Error(`Label ${name} ${value} is not a positive integer`);\n\n const labels: IAutoMovieInspectionLabel[] = [];\n const dropped: IAutoMovieInspectionLabel[] = [];\n const boxes: [number, number, number, number][] = [];\n const point: THREE.Vector3 = new THREE.Vector3();\n for (const box of props.boxes) {\n point\n .set(\n (box.min.x + box.max.x) / 2,\n (box.min.y + box.max.y) / 2,\n (box.min.z + box.max.z) / 2,\n )\n .project(props.camera);\n const label: IAutoMovieInspectionLabel = {\n path: box.path,\n text: box.path.split(\"/\").at(-1) || \"(root)\",\n x: Math.round(((point.x + 1) / 2) * props.width),\n y: Math.round(((1 - point.y) / 2) * props.height),\n };\n const area: [number, number, number, number] = [\n label.x,\n label.y,\n label.x + props.scale * (4 * label.text.length + 3),\n label.y + 9 * props.scale,\n ];\n const visible: boolean =\n Number.isFinite(point.z) &&\n point.z >= -1 &&\n point.z <= 1 &&\n label.x >= 0 &&\n label.x < props.width &&\n label.y >= 0 &&\n label.y < props.height;\n if (\n !visible ||\n boxes.some(\n (kept: [number, number, number, number]): boolean =>\n area[0] < kept[2] &&\n kept[0] < area[2] &&\n area[1] < kept[3] &&\n kept[1] < area[3],\n )\n ) {\n dropped.push(label);\n continue;\n }\n boxes.push(area);\n labels.push(label);\n }\n return { labels, dropped };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA,SAAgB,+BAA+B,OAmBR;CACrC,KAAK,MAAM,CAAC,MAAM,UAAU;EAC1B,CAAC,SAAS,MAAM,KAAK;EACrB,CAAC,UAAU,MAAM,MAAM;EACvB,CAAC,SAAS,MAAM,KAAK;CACvB,GACE,IAAI,EAAE,OAAO,cAAc,KAAK,KAAK,QAAQ,IAC3C,MAAM,IAAI,MAAM,SAAS,KAAK,GAAG,MAAM,2BAA2B;CAEtE,MAAM,SAAsC,CAAC;CAC7C,MAAM,UAAuC,CAAC;CAC9C,MAAM,QAA4C,CAAC;CACnD,MAAM,QAAuB,IAAI,MAAM,QAAQ;CAC/C,KAAK,MAAM,OAAO,MAAM,OAAO;EAC7B,MACG,KACE,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IACzB,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IACzB,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,CAC5B,CAAC,CACA,QAAQ,MAAM,MAAM;EACvB,MAAM,QAAmC;GACvC,MAAM,IAAI;GACV,MAAM,IAAI,KAAK,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK;GACpC,GAAG,KAAK,OAAQ,MAAM,IAAI,KAAK,IAAK,MAAM,KAAK;GAC/C,GAAG,KAAK,OAAQ,IAAI,MAAM,KAAK,IAAK,MAAM,MAAM;EAClD;EACA,MAAM,OAAyC;GAC7C,MAAM;GACN,MAAM;GACN,MAAM,IAAI,MAAM,SAAS,IAAI,MAAM,KAAK,SAAS;GACjD,MAAM,IAAI,IAAI,MAAM;EACtB;EASA,IACE,EARA,OAAO,SAAS,MAAM,CAAC,KACvB,MAAM,KAAK,MACX,MAAM,KAAK,KACX,MAAM,KAAK,KACX,MAAM,IAAI,MAAM,SAChB,MAAM,KAAK,KACX,MAAM,IAAI,MAAM,WAGhB,MAAM,MACH,SACC,KAAK,KAAK,KAAK,MACf,KAAK,KAAK,KAAK,MACf,KAAK,KAAK,KAAK,MACf,KAAK,KAAK,KAAK,EACnB,GACA;GACA,QAAQ,KAAK,KAAK;GAClB;EACF;EACA,MAAM,KAAK,IAAI;EACf,OAAO,KAAK,KAAK;CACnB;CACA,OAAO;EAAE;EAAQ;CAAQ;AAC3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IAutoMoviePlanInspectionTrailTimesProps } from "@automovie/interface";
|
|
2
2
|
/**
|
|
3
3
|
* The seconds a trail is sampled at for one drawn second: a grid of `ticks` per second through the drawn second, reaching `reach` seconds before and after it, clipped to the subject's running time.
|
|
4
4
|
*
|
|
@@ -19,11 +19,4 @@ import type { IAutoMovieInspectionRequest } from "./IAutoMovieInspectionRequest.
|
|
|
19
19
|
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its arguments.
|
|
20
20
|
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh list and keeps nothing.
|
|
21
21
|
*/
|
|
22
|
-
export declare function planAutoMovieInspectionTrailTimes(props:
|
|
23
|
-
/** The request's trail window. */
|
|
24
|
-
request: Pick<IAutoMovieInspectionRequest, "reach" | "ticks">;
|
|
25
|
-
/** The drawn film second. */
|
|
26
|
-
seconds: number;
|
|
27
|
-
/** The subject's running time, seconds. */
|
|
28
|
-
durationSeconds: number;
|
|
29
|
-
}): number[];
|
|
22
|
+
export declare function planAutoMovieInspectionTrailTimes(props: IAutoMoviePlanInspectionTrailTimesProps): number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planAutoMovieInspectionTrailTimes.js","sourceRoot":"","sources":["../../../src/scene/inspection/planAutoMovieInspectionTrailTimes.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,
|
|
1
|
+
{"version":3,"file":"planAutoMovieInspectionTrailTimes.js","sourceRoot":"","sources":["../../../src/scene/inspection/planAutoMovieInspectionTrailTimes.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2CACE,KAA8C;IAE9C,MAAM,KAAK,GAAW,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;IAC1C,MAAM,KAAK,GAAW,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;IAC1C,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC;QACxE,MAAM,IAAI,KAAK,CACb,sBAAsB,KAAK,CAAC,eAAe,sCAAsC,CAClF,CAAC;IACJ,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,eAAe,CAAC;QACjE,MAAM,IAAI,KAAK,CACb,gBAAgB,KAAK,CAAC,OAAO,6BAA6B,KAAK,CAAC,eAAe,UAAU,CAC1F,CAAC;IACJ,IACE,CAAC,CACC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QACtB,KAAK,GAAG,CAAC;QACT,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QACtB,KAAK,GAAG,CAAC,CACV;QAED,MAAM,IAAI,KAAK,CACb,eAAe,KAAK,cAAc,KAAK,kCAAkC,CAC1E,CAAC;IAEJ,8GAA8G;IAC9G,MAAM,IAAI,GAAW,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC;IACtD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAW,CAAC,IAAI,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC;QACzE,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,CAAC,eAAe;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planAutoMovieInspectionTrailTimes.mjs","names":[],"sources":["../../../src/scene/inspection/planAutoMovieInspectionTrailTimes.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"planAutoMovieInspectionTrailTimes.mjs","names":[],"sources":["../../../src/scene/inspection/planAutoMovieInspectionTrailTimes.ts"],"sourcesContent":["import type { IAutoMoviePlanInspectionTrailTimesProps } from \"@automovie/interface\";\n\n/**\n * The seconds a trail is sampled at for one drawn second: a grid of `ticks` per second through the drawn second, reaching `reach` seconds before and after it, clipped to the subject's running time.\n *\n * The drawn second is always one of the times, so `markAutoMovieInspectionTrails` emphasises exactly the place drawn, and every other time is the drawn second plus a whole number of tick intervals. Times are ascending. A host passes them, with the request's `trail` patterns, to `sampleAutoMovieInspectionTrails`.\n *\n * It throws for a drawn second outside `[0, durationSeconds]`, a running time that is not positive and finite, and a reach or tick rate that is not positive and finite.\n *\n * ```ts\n * const times = planAutoMovieInspectionTrailTimes({ request, seconds, durationSeconds });\n * const trails = request.trail.length === 0 ? [] : await sampleAutoMovieInspectionTrails({ scene, pattern, times, seek });\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation States the grid, why it passes through the drawn second, the clipping, the order, how a host uses the times, and the refusals.\n * @evidence contracts/development/implementation.md#principled-implementation Each time is the drawn second plus an integer multiple of `1 / ticks`, computed from the integer rather than accumulated, so the grid has no drift and the drawn second is exact.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Admission, then one loop over the integer offsets within the reach.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The window is the request's stated reach and rate, and a time outside the subject is dropped rather than clamped onto its ends, which would sample one place twice.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the times returned, `2 reach ticks + 1` at most.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its arguments.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh list and keeps nothing.\n */\nexport function planAutoMovieInspectionTrailTimes(\n props: IAutoMoviePlanInspectionTrailTimesProps,\n): number[] {\n const reach: number = props.request.reach;\n const ticks: number = props.request.ticks;\n if (!(Number.isFinite(props.durationSeconds) && props.durationSeconds > 0))\n throw new Error(\n `Trail running time ${props.durationSeconds} is not a positive number of seconds`,\n );\n if (!(props.seconds >= 0 && props.seconds <= props.durationSeconds))\n throw new Error(\n `Trail second ${props.seconds} is outside the subject's ${props.durationSeconds} seconds`,\n );\n if (\n !(\n Number.isFinite(reach) &&\n reach > 0 &&\n Number.isFinite(ticks) &&\n ticks > 0\n )\n )\n throw new Error(\n `Trail reach ${reach} and ticks ${ticks} are not positive finite numbers`,\n );\n\n // Offsets are whole tick counts; the small allowance keeps a reach that is an exact multiple of the interval.\n const span: number = Math.floor(reach * ticks + 1e-9);\n const times: number[] = [];\n for (let k: number = -span; k <= span; k++) {\n const time: number = k === 0 ? props.seconds : props.seconds + k / ticks;\n if (time >= 0 && time <= props.durationSeconds) times.push(time);\n }\n return times;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,SAAgB,kCACd,OACU;CACV,MAAM,QAAgB,MAAM,QAAQ;CACpC,MAAM,QAAgB,MAAM,QAAQ;CACpC,IAAI,EAAE,OAAO,SAAS,MAAM,eAAe,KAAK,MAAM,kBAAkB,IACtE,MAAM,IAAI,MACR,sBAAsB,MAAM,gBAAgB,qCAC9C;CACF,IAAI,EAAE,MAAM,WAAW,KAAK,MAAM,WAAW,MAAM,kBACjD,MAAM,IAAI,MACR,gBAAgB,MAAM,QAAQ,4BAA4B,MAAM,gBAAgB,SAClF;CACF,IACE,EACE,OAAO,SAAS,KAAK,KACrB,QAAQ,KACR,OAAO,SAAS,KAAK,KACrB,QAAQ,IAGV,MAAM,IAAI,MACR,eAAe,MAAM,aAAa,MAAM,iCAC1C;CAGF,MAAM,OAAe,KAAK,MAAM,QAAQ,QAAQ,IAAI;CACpD,MAAM,QAAkB,CAAC;CACzB,KAAK,IAAI,IAAY,CAAC,MAAM,KAAK,MAAM,KAAK;EAC1C,MAAM,OAAe,MAAM,IAAI,MAAM,UAAU,MAAM,UAAU,IAAI;EACnE,IAAI,QAAQ,KAAK,QAAQ,MAAM,iBAAiB,MAAM,KAAK,IAAI;CACjE;CACA,OAAO;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IAutoMovieInspectionKindStyle, IAutoMovieResolveInspectionColorsProps } from "@automovie/interface";
|
|
2
2
|
/**
|
|
3
3
|
* Decide the legend text and colour of every mark kind drawn in one picture, and refuse a picture whose colours would be ambiguous.
|
|
4
4
|
*
|
|
@@ -12,20 +12,4 @@ import type { IAutoMovieMark } from "@automovie/engine";
|
|
|
12
12
|
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one picture's marks.
|
|
13
13
|
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh map and keeps nothing.
|
|
14
14
|
*/
|
|
15
|
-
export declare function resolveAutoMovieInspectionColors(props:
|
|
16
|
-
/** Every mark drawn in the picture. */
|
|
17
|
-
marks: readonly IAutoMovieMark[];
|
|
18
|
-
/** Colours the picture uses for something other than a kind, each with what uses it. */
|
|
19
|
-
reserved: readonly {
|
|
20
|
-
use: string;
|
|
21
|
-
color: number;
|
|
22
|
-
}[];
|
|
23
|
-
/** Colours the request gives kinds for this picture, later entries winning. */
|
|
24
|
-
recolor: readonly {
|
|
25
|
-
pattern: string;
|
|
26
|
-
color: number;
|
|
27
|
-
}[];
|
|
28
|
-
}): Map<string, {
|
|
29
|
-
label: string;
|
|
30
|
-
color: number;
|
|
31
|
-
}>;
|
|
15
|
+
export declare function resolveAutoMovieInspectionColors(props: IAutoMovieResolveInspectionColorsProps): Map<string, IAutoMovieInspectionKindStyle>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAutoMovieInspectionColors.js","sourceRoot":"","sources":["../../../src/scene/inspection/resolveAutoMovieInspectionColors.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"resolveAutoMovieInspectionColors.js","sourceRoot":"","sources":["../../../src/scene/inspection/resolveAutoMovieInspectionColors.ts"],"names":[],"mappings":";;;AAKA,uFAAiF;AAEjF;;;;;;;;;;;;GAYG;AACH,0CACE,KAA6C;IAE7C,MAAM,KAAK,GAAkD,IAAI,GAAG,EAGjE,CAAC;IACJ,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAiD,KAAK,CAAC,GAAG,CACnE,IAAI,CAAC,IAAI,CACV,CAAC;QACF,IAAI,KAAK,KAAK,SAAS;YACrB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;aAC5D,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK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AAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAutoMovieInspectionColors.mjs","names":[],"sources":["../../../src/scene/inspection/resolveAutoMovieInspectionColors.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"resolveAutoMovieInspectionColors.mjs","names":[],"sources":["../../../src/scene/inspection/resolveAutoMovieInspectionColors.ts"],"sourcesContent":["import type {\n IAutoMovieInspectionKindStyle,\n IAutoMovieResolveInspectionColorsProps,\n} from \"@automovie/interface\";\n\nimport { matchAutoMovieInspectionPath } from \"./matchAutoMovieInspectionPath.js\";\n\n/**\n * Decide the legend text and colour of every mark kind drawn in one picture, and refuse a picture whose colours would be ambiguous.\n *\n * A kind takes the label and colour its marks carry, or the colour of the last `recolor` entry whose pattern matches the kind under the path grammar. Two marks of one kind that disagree on either throw, because one kind is then two things. Two kinds that end up in one colour throw naming both, and so does a kind whose colour is one of `reserved`, such as the flag colour or a shade's surface colour, naming the kind and the reserved use. Kinds come in the order their first mark appears.\n *\n * @evidence contracts/development/common.md#meaningful-documentation States where each kind's label and colour come from, the three refusals and what each names, and the order.\n * @evidence contracts/development/implementation.md#principled-implementation A mark is identified in a reduced picture by its colour alone, so a colour may stand for one kind only, and a colour the picture already uses for something else is unavailable.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One pass collecting each kind's entry, one applying the request's colours, then one pass checking colours against a map from colour to its first owner.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A clash is refused, never resolved by picking another colour, so the colour a producer documents, or the request names, is the colour drawn; a requested colour obeys the same law.\n * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the marks plus the kinds times the request's colours, with one hashed lookup each.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of one picture's marks.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Returns a fresh map and keeps nothing.\n */\nexport function resolveAutoMovieInspectionColors(\n props: IAutoMovieResolveInspectionColorsProps,\n): Map<string, IAutoMovieInspectionKindStyle> {\n const kinds: Map<string, { label: string; color: number }> = new Map<\n string,\n { label: string; color: number }\n >();\n for (const mark of props.marks) {\n const known: { label: string; color: number } | undefined = kinds.get(\n mark.kind,\n );\n if (known === undefined)\n kinds.set(mark.kind, { label: mark.label, color: mark.color });\n else if (known.label !== mark.label || known.color !== mark.color)\n throw new Error(\n `Mark kind ${mark.kind} is given two legend entries, \"${known.label}\" #${hex(known.color)} and \"${mark.label}\" #${hex(mark.color)}`,\n );\n }\n\n // The request's colours replace the producers' defaults, the last matching entry winning.\n for (const [kind, entry] of kinds)\n for (const assigned of props.recolor)\n if (matchAutoMovieInspectionPath(kind, assigned.pattern))\n entry.color = assigned.color;\n\n const owners: Map<number, string> = new Map<number, string>(\n props.reserved.map(\n (entry: { use: string; color: number }): [number, string] => [\n entry.color,\n entry.use,\n ],\n ),\n );\n for (const [kind, entry] of kinds) {\n const owner: string | undefined = owners.get(entry.color);\n if (owner !== undefined)\n throw new Error(\n `Mark kind ${kind} and ${owner} share the colour #${hex(entry.color)}`,\n );\n owners.set(entry.color, `mark kind ${kind}`);\n }\n return kinds;\n}\n\n/** Six-digit hex of an sRGB colour. */\nfunction hex(color: number): string {\n return color.toString(16).padStart(6, \"0\");\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,SAAgB,iCACd,OAC4C;CAC5C,MAAM,wBAAuD,IAAI,IAG/D;CACF,KAAK,MAAM,QAAQ,MAAM,OAAO;EAC9B,MAAM,QAAsD,MAAM,IAChE,KAAK,IACP;EACA,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,KAAK,MAAM;GAAE,OAAO,KAAK;GAAO,OAAO,KAAK;EAAM,CAAC;OAC1D,IAAI,MAAM,UAAU,KAAK,SAAS,MAAM,UAAU,KAAK,OAC1D,MAAM,IAAI,MACR,aAAa,KAAK,KAAK,iCAAiC,MAAM,MAAM,KAAK,IAAI,MAAM,KAAK,EAAE,QAAQ,KAAK,MAAM,KAAK,IAAI,KAAK,KAAK,GAClI;CACJ;CAGA,KAAK,MAAM,CAAC,MAAM,UAAU,OAC1B,KAAK,MAAM,YAAY,MAAM,SAC3B,IAAI,6BAA6B,MAAM,SAAS,OAAO,GACrD,MAAM,QAAQ,SAAS;CAE7B,MAAM,SAA8B,IAAI,IACtC,MAAM,SAAS,KACZ,UAA4D,CAC3D,MAAM,OACN,MAAM,GACR,CACF,CACF;CACA,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO;EACjC,MAAM,QAA4B,OAAO,IAAI,MAAM,KAAK;EACxD,IAAI,UAAU,KAAA,GACZ,MAAM,IAAI,MACR,aAAa,KAAK,OAAO,MAAM,qBAAqB,IAAI,MAAM,KAAK,GACrE;EACF,OAAO,IAAI,MAAM,OAAO,aAAa,MAAM;CAC7C;CACA,OAAO;AACT;;AAGA,SAAS,IAAI,OAAuB;CAClC,OAAO,MAAM,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;AAC3C"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type { IAutoMovieInspectionCamera, IAutoMovieInspectionView } from "@automovie/interface";
|
|
1
2
|
import * as THREE from "three";
|
|
2
3
|
import type { IAutoMovieViewerSubjectBounds } from "../subjectViewpoint/IAutoMovieViewerSubjectBounds.js";
|
|
3
|
-
import type { IAutoMovieInspectionCamera } from "./IAutoMovieInspectionCamera.js";
|
|
4
|
-
import type { IAutoMovieInspectionView } from "./IAutoMovieInspectionView.js";
|
|
5
4
|
/**
|
|
6
5
|
* Turn an inspection view into the camera that draws it and the record that repeats it, for a picture of `width` by `height` pixels at film second `seconds`.
|
|
7
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAutoMovieInspectionView.js","sourceRoot":"","sources":["../../../src/scene/inspection/resolveAutoMovieInspectionView.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"resolveAutoMovieInspection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Q,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE;QACzD,MAAM,EAAE,MAAM,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE;QACxD,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE;QACjC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,MAAkC,CAAC,GAAG;QACrE,cAAc,EAAE,YAAY;YAC1B,CAAC,CAAC,CAAE,MAAmC,CAAC,GAAG;gBACtC,MAAmC,CAAC,MAAM,CAAC;gBAC9C,MAAM;YACR,CAAC,CAAC,IAAI;QACR,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,GAAG,EAAE,MAAM,CAAC,GAAG;KAChB,CAAC;AACJ,CAAC;AAED,8BAA8B;AAC9B,SAAS,MAAM,CAAC,MAAyC;IACvD,OAAO,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAutoMovieInspectionView.mjs","names":[],"sources":["../../../src/scene/inspection/resolveAutoMovieInspectionView.ts"],"sourcesContent":["import type { IAutoMovieVector3 } from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport type { IAutoMovieViewerSubjectBounds } from \"../subjectViewpoint/IAutoMovieViewerSubjectBounds.js\";\nimport type { IAutoMovieViewerSubjectPose } from \"../subjectViewpoint/IAutoMovieViewerSubjectPose.js\";\nimport type { IAutoMovieViewerViewpoint } from \"../subjectViewpoint/IAutoMovieViewerViewpoint.js\";\nimport { autoMovieViewerNamedViewpoints } from \"../subjectViewpoint/autoMovieViewerNamedViewpoints.js\";\nimport { frameAutoMovieViewerSubject } from \"../subjectViewpoint/frameAutoMovieViewerSubject.js\";\nimport type { IAutoMovieInspectionCamera } from \"./IAutoMovieInspectionCamera.js\";\nimport type { IAutoMovieInspectionView } from \"./IAutoMovieInspectionView.js\";\n\n/** Smallest half extent a fitted view frames, metres, the framing owner's floor for a box without size. */\nconst FLOOR: number = 0.5;\n\n/**\n * Turn an inspection view into the camera that draws it and the record that repeats it, for a picture of `width` by `height` pixels at film second `seconds`.\n *\n * | View | Camera |\n * | --- | --- |\n * | `film` | The subject's own `camera`, returned unchanged |\n * | Fixed | A perspective camera at the position looking at the target, with the subject camera's field of view and clips, rolled to the view's up when it states one |\n * | Fixed with a scale | An orthographic camera at the position looking at the target, the picture's height spanning the scale times its pixels, with clips at a quarter and three and a half times the eye's distance to the target |\n * | A name the subject's `views` holds | A perspective camera where that view places it at `seconds`, with the subject camera's field of view and clips |\n * | A named viewpoint | A perspective camera from the viewpoint's direction fitted to `bounds` by `frameAutoMovieViewerSubject`, with the subject camera's field of view |\n * | A named viewpoint with `orthographic` | An orthographic camera from the same direction whose frame holds every corner of `bounds`, by the same margin |\n *\n * `bounds` is what the view frames: the host measures it on what is drawn, or on the focus the view names through the inspection handle's `bounds`. A subject's view wins a name over a named viewpoint, because the subject knows its own staging. A vertical named view takes the up direction its viewpoint documents, `-Z` from the top and `+Z` from the bottom; every other view takes `+Y`. The record's `metresPerPixel` is the orthographic frame's height over `height`.\n *\n * `@follow` changes only which seconds a host measures `bounds` over, the drawn second alone, so it resolves as the fit it modifies. A fixed camera with a scale repeats a fitted orthographic view exactly, because that view stands twice its frame's radius from its target with clips at half and seven times the radius.\n *\n * It throws for a size that is not positive, an unknown name with the accepted names listed, a subject view asked to be orthographic, followed or focused, and a fitted view without bounds, which means nothing is drawn to frame.\n *\n * ```ts\n * const { camera, record } = resolveAutoMovieInspectionView({\n * view: parseAutoMovieInspectionView(\"front@ortho\"),\n * text: \"front@ortho\",\n * bounds: inspection.bounds(),\n * camera: production.camera,\n * views: production.views,\n * seconds,\n * width: 960,\n * height: 540,\n * });\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation Tabulates every view with the camera it gives, states where the bounds come from, the precedence of names, the up rule, the scale's derivation and every refusal, and shows the call.\n * @evidence contracts/development/implementation.md#principled-implementation A perspective fit is the framing owner's sphere fit, and an orthographic fit projects the eight corners of the box onto the camera's picture plane and takes the larger of the half height and the half width over the aspect, times the viewpoint's distance factor, so the box lies inside the frame by the same margin; parallel projection makes that frame's height over the pixel height the metres one pixel spans everywhere in the picture.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One branch per view form, each producing a camera and its record through one record helper.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The 0.5 m floor is the framing owner's documented convention, the margin is the viewpoint's own distance factor, and a switch a form cannot honour is refused instead of ignored.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant work: eight corners at most.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Directions are the named viewpoints' own records and the perspective fit is the framing owner's, so every host frames by one rule.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Creates one camera, which the caller owns, except for `film`, which returns the subject's camera; nothing is kept.\n */\nexport function resolveAutoMovieInspectionView(props: {\n /** The view, as `parseAutoMovieInspectionView` read it. */\n view: IAutoMovieInspectionView;\n\n /** The view's text, kept in the record. */\n text: string;\n\n /** World box a fitted view frames, or null when nothing is drawn. */\n bounds: IAutoMovieViewerSubjectBounds | null;\n\n /** The subject's delivery camera: the film view itself, and the field of view and clips the other views take. */\n camera: THREE.PerspectiveCamera;\n\n /** The subject's own views by name, each placing a camera at a second. */\n views?: Readonly<\n Record<\n string,\n (seconds: number) => {\n position: readonly [number, number, number];\n target: readonly [number, number, number];\n }\n >\n >;\n\n /** The film second drawn. */\n seconds: number;\n\n /** Picture width, pixels. */\n width: number;\n\n /** Picture height, pixels. */\n height: number;\n}): {\n camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;\n record: IAutoMovieInspectionCamera;\n} {\n if (\n !(props.width > 0 && Number.isFinite(props.width)) ||\n !(props.height > 0 && Number.isFinite(props.height))\n )\n throw new Error(\n `Inspection picture ${props.width} x ${props.height} is not a positive size`,\n );\n const aspect: number = props.width / props.height;\n const view: IAutoMovieInspectionView = props.view;\n\n // The film camera is drawn as it is.\n if (view.type === \"film\")\n return {\n camera: props.camera,\n record: record(props.text, props.camera, props.height),\n };\n\n // A fixed camera and a subject's view are a position and a target.\n const own:\n | ((seconds: number) => {\n position: readonly [number, number, number];\n target: readonly [number, number, number];\n })\n | undefined =\n view.type === \"named\" &&\n props.views !== undefined &&\n Object.hasOwn(props.views, view.name)\n ? props.views[view.name]\n : undefined;\n if (view.type === \"fixed\" || own !== undefined) {\n if (\n view.type === \"named\" &&\n (view.orthographic || view.follow || view.focus !== null)\n )\n throw new Error(\n `Inspection view \"${props.text}\" is the subject's own view, which takes no switch`,\n );\n const placed: { position: IAutoMovieVector3; target: IAutoMovieVector3 } =\n view.type === \"fixed\"\n ? view\n : ((pose: {\n position: readonly [number, number, number];\n target: readonly [number, number, number];\n }): { position: IAutoMovieVector3; target: IAutoMovieVector3 } => ({\n position: vector(pose.position),\n target: vector(pose.target),\n }))(own!(props.seconds));\n const up: IAutoMovieVector3 =\n view.type === \"fixed\" && view.up !== null\n ? view.up\n : { x: 0, y: 1, z: 0 };\n\n // A fixed orthographic camera: its scale as written, its clips a quarter and three and a half times the eye's distance, a fitted orthographic view's own clips.\n if (view.type === \"fixed\" && view.metresPerPixel !== null) {\n const distance: number = Math.hypot(\n placed.target.x - placed.position.x,\n placed.target.y - placed.position.y,\n placed.target.z - placed.position.z,\n );\n const half: number = (view.metresPerPixel * props.height) / 2;\n const camera: THREE.OrthographicCamera = new THREE.OrthographicCamera(\n -half * aspect,\n half * aspect,\n half,\n -half,\n distance / 4,\n distance * 3.5,\n );\n aim(camera, placed.position, placed.target, up);\n return {\n camera,\n record: record(props.text, camera, props.height, placed.target),\n };\n }\n const camera: THREE.PerspectiveCamera = new THREE.PerspectiveCamera(\n props.camera.fov,\n aspect,\n props.camera.near,\n props.camera.far,\n );\n aim(camera, placed.position, placed.target, up);\n return {\n camera,\n record: record(props.text, camera, props.height, placed.target),\n };\n }\n\n // A named viewpoint is fitted to the bounds.\n const viewpoints: IAutoMovieViewerViewpoint[] =\n autoMovieViewerNamedViewpoints();\n const viewpoint: IAutoMovieViewerViewpoint | undefined = viewpoints.find(\n (candidate: IAutoMovieViewerViewpoint): boolean =>\n candidate.id === view.name,\n );\n if (viewpoint === undefined)\n throw new Error(\n `Inspection view \"${props.text}\" names no view; the names are ${[\n ...Object.keys(props.views ?? {}),\n ...viewpoints.map(\n (candidate: IAutoMovieViewerViewpoint): string => candidate.id,\n ),\n ].join(\", \")}, besides film and x,y,z:tx,ty,tz`,\n );\n if (props.bounds === null)\n throw new Error(\n `Inspection view \"${props.text}\" has nothing to frame: nothing is drawn`,\n );\n const up: IAutoMovieVector3 = upOf(viewpoint);\n if (!view.orthographic) {\n const pose: IAutoMovieViewerSubjectPose = frameAutoMovieViewerSubject(\n props.bounds,\n viewpoint,\n { fovDeg: props.camera.fov, aspect },\n );\n const camera: THREE.PerspectiveCamera = new THREE.PerspectiveCamera(\n props.camera.fov,\n aspect,\n pose.near,\n pose.far,\n );\n aim(camera, pose.position, pose.target, up);\n return {\n camera,\n record: record(props.text, camera, props.height, pose.target),\n };\n }\n\n // Orthographic: stand back along the direction, then fit the frame to the box's corners on the picture plane.\n const min: IAutoMovieVector3 = props.bounds.min;\n const max: IAutoMovieVector3 = props.bounds.max;\n const centre: THREE.Vector3 = new THREE.Vector3(\n (min.x + max.x) / 2,\n (min.y + max.y) / 2,\n (min.z + max.z) / 2,\n );\n const radius: number = Math.max(\n Math.hypot(max.x - min.x, max.y - min.y, max.z - min.z) / 2,\n FLOOR,\n );\n const azimuth: number = THREE.MathUtils.degToRad(viewpoint.azimuthDeg);\n const elevation: number = THREE.MathUtils.degToRad(viewpoint.elevationDeg);\n const direction: THREE.Vector3 = new THREE.Vector3(\n Math.sin(azimuth) * Math.cos(elevation),\n Math.sin(elevation),\n Math.cos(azimuth) * Math.cos(elevation),\n );\n const camera: THREE.OrthographicCamera = new THREE.OrthographicCamera();\n camera.near = radius / 2;\n camera.far = radius * 7;\n aim(\n camera,\n {\n x: centre.x + direction.x * radius * 2,\n y: centre.y + direction.y * radius * 2,\n z: centre.z + direction.z * radius * 2,\n },\n { x: centre.x, y: centre.y, z: centre.z },\n up,\n );\n let half: number = FLOOR;\n const corner: THREE.Vector3 = new THREE.Vector3();\n for (let k: number = 0; k < 8; k++) {\n corner\n .set(\n (k & 1) === 0 ? min.x : max.x,\n (k & 2) === 0 ? min.y : max.y,\n (k & 4) === 0 ? min.z : max.z,\n )\n .applyMatrix4(camera.matrixWorldInverse);\n half = Math.max(half, Math.abs(corner.y), Math.abs(corner.x) / aspect);\n }\n half *= viewpoint.distanceFactor;\n camera.top = half;\n camera.bottom = -half;\n camera.right = half * aspect;\n camera.left = -half * aspect;\n camera.updateProjectionMatrix();\n return {\n camera,\n record: record(props.text, camera, props.height, {\n x: centre.x,\n y: centre.y,\n z: centre.z,\n }),\n };\n}\n\n/** The picture-up a viewpoint documents: `-Z` from the top, `+Z` from the bottom, `+Y` otherwise. */\nfunction upOf(viewpoint: IAutoMovieViewerViewpoint): IAutoMovieVector3 {\n if (Math.abs(viewpoint.elevationDeg) !== 90) return { x: 0, y: 1, z: 0 };\n const sign: number = Math.sign(viewpoint.elevationDeg);\n const azimuth: number = THREE.MathUtils.degToRad(viewpoint.azimuthDeg);\n return { x: -sign * Math.sin(azimuth), y: 0, z: -sign * Math.cos(azimuth) };\n}\n\n/** Place an unparented camera and bring its matrices up to date. */\nfunction aim(\n camera: THREE.Camera,\n position: IAutoMovieVector3,\n target: IAutoMovieVector3,\n up: IAutoMovieVector3,\n): void {\n camera.position.set(position.x, position.y, position.z);\n camera.up.set(up.x, up.y, up.z);\n camera.lookAt(target.x, target.y, target.z);\n if (\n camera instanceof THREE.PerspectiveCamera ||\n camera instanceof THREE.OrthographicCamera\n )\n camera.updateProjectionMatrix();\n camera.updateMatrixWorld(true);\n}\n\n/** The record of a placed camera, its target one metre ahead when the camera was not aimed here. */\nfunction record(\n text: string,\n camera: THREE.PerspectiveCamera | THREE.OrthographicCamera,\n height: number,\n target?: IAutoMovieVector3,\n): IAutoMovieInspectionCamera {\n camera.updateMatrixWorld(true);\n const position: THREE.Vector3 = new THREE.Vector3().setFromMatrixPosition(\n camera.matrixWorld,\n );\n const forward: THREE.Vector3 = camera.getWorldDirection(new THREE.Vector3());\n const ahead: THREE.Vector3 = position.clone().add(forward);\n const up: THREE.Vector3 = new THREE.Vector3(0, 1, 0)\n .transformDirection(camera.matrixWorld)\n .normalize();\n const orthographic: boolean = camera instanceof THREE.OrthographicCamera;\n return {\n view: text,\n projection: orthographic ? \"orthographic\" : \"perspective\",\n position: { x: position.x, y: position.y, z: position.z },\n target: target ?? { x: ahead.x, y: ahead.y, z: ahead.z },\n up: { x: up.x, y: up.y, z: up.z },\n fovDeg: orthographic ? null : (camera as THREE.PerspectiveCamera).fov,\n metresPerPixel: orthographic\n ? ((camera as THREE.OrthographicCamera).top -\n (camera as THREE.OrthographicCamera).bottom) /\n height\n : null,\n near: camera.near,\n far: camera.far,\n };\n}\n\n/** A vector from a triple. */\nfunction vector(triple: readonly [number, number, number]): IAutoMovieVector3 {\n return { x: triple[0], y: triple[1], z: triple[2] };\n}\n"],"mappings":";;;;;AAYA,MAAM,QAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCtB,SAAgB,+BAA+B,OAmC7C;CACA,IACE,EAAE,MAAM,QAAQ,KAAK,OAAO,SAAS,MAAM,KAAK,MAChD,EAAE,MAAM,SAAS,KAAK,OAAO,SAAS,MAAM,MAAM,IAElD,M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;GAAG,GAAG,SAAS;GAAG,GAAG,SAAS;EAAE;EACxD,QAAQ,UAAU;GAAE,GAAG,MAAM;GAAG,GAAG,MAAM;GAAG,GAAG,MAAM;EAAE;EACvD,IAAI;GAAE,GAAG,GAAG;GAAG,GAAG,GAAG;GAAG,GAAG,GAAG;EAAE;EAChC,QAAQ,eAAe,OAAQ,OAAmC;EAClE,gBAAgB,gBACV,OAAoC,MACnC,OAAoC,UACvC,SACA;EACJ,MAAM,OAAO;EACb,KAAK,OAAO;CACd;AACF;;AAGA,SAAS,OAAO,QAA8D;CAC5E,OAAO;EAAE,GAAG,OAAO;EAAI,GAAG,OAAO;EAAI,GAAG,OAAO;CAAG;AACpD"}
|
|
1
|
+
{"version":3,"file":"resolveAutoMovieInspectionView.mjs","names":[],"sources":["../../../src/scene/inspection/resolveAutoMovieInspectionView.ts"],"sourcesContent":["import type {\n IAutoMovieInspectionCamera,\n IAutoMovieInspectionView,\n IAutoMovieVector3,\n} from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport type { IAutoMovieViewerSubjectBounds } from \"../subjectViewpoint/IAutoMovieViewerSubjectBounds.js\";\nimport type { IAutoMovieViewerSubjectPose } from \"../subjectViewpoint/IAutoMovieViewerSubjectPose.js\";\nimport type { IAutoMovieViewerViewpoint } from \"../subjectViewpoint/IAutoMovieViewerViewpoint.js\";\nimport { autoMovieViewerNamedViewpoints } from \"../subjectViewpoint/autoMovieViewerNamedViewpoints.js\";\nimport { frameAutoMovieViewerSubject } from \"../subjectViewpoint/frameAutoMovieViewerSubject.js\";\n\n/** Smallest half extent a fitted view frames, metres, the framing owner's floor for a box without size. */\nconst FLOOR: number = 0.5;\n\n/**\n * Turn an inspection view into the camera that draws it and the record that repeats it, for a picture of `width` by `height` pixels at film second `seconds`.\n *\n * | View | Camera |\n * | --- | --- |\n * | `film` | The subject's own `camera`, returned unchanged |\n * | Fixed | A perspective camera at the position looking at the target, with the subject camera's field of view and clips, rolled to the view's up when it states one |\n * | Fixed with a scale | An orthographic camera at the position looking at the target, the picture's height spanning the scale times its pixels, with clips at a quarter and three and a half times the eye's distance to the target |\n * | A name the subject's `views` holds | A perspective camera where that view places it at `seconds`, with the subject camera's field of view and clips |\n * | A named viewpoint | A perspective camera from the viewpoint's direction fitted to `bounds` by `frameAutoMovieViewerSubject`, with the subject camera's field of view |\n * | A named viewpoint with `orthographic` | An orthographic camera from the same direction whose frame holds every corner of `bounds`, by the same margin |\n *\n * `bounds` is what the view frames: the host measures it on what is drawn, or on the focus the view names through the inspection handle's `bounds`. A subject's view wins a name over a named viewpoint, because the subject knows its own staging. A vertical named view takes the up direction its viewpoint documents, `-Z` from the top and `+Z` from the bottom; every other view takes `+Y`. The record's `metresPerPixel` is the orthographic frame's height over `height`.\n *\n * `@follow` changes only which seconds a host measures `bounds` over, the drawn second alone, so it resolves as the fit it modifies. A fixed camera with a scale repeats a fitted orthographic view exactly, because that view stands twice its frame's radius from its target with clips at half and seven times the radius.\n *\n * It throws for a size that is not positive, an unknown name with the accepted names listed, a subject view asked to be orthographic, followed or focused, and a fitted view without bounds, which means nothing is drawn to frame.\n *\n * ```ts\n * const { camera, record } = resolveAutoMovieInspectionView({\n * view: parseAutoMovieInspectionView(\"front@ortho\"),\n * text: \"front@ortho\",\n * bounds: inspection.bounds(),\n * camera: production.camera,\n * views: production.views,\n * seconds,\n * width: 960,\n * height: 540,\n * });\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation Tabulates every view with the camera it gives, states where the bounds come from, the precedence of names, the up rule, the scale's derivation and every refusal, and shows the call.\n * @evidence contracts/development/implementation.md#principled-implementation A perspective fit is the framing owner's sphere fit, and an orthographic fit projects the eight corners of the box onto the camera's picture plane and takes the larger of the half height and the half width over the aspect, times the viewpoint's distance factor, so the box lies inside the frame by the same margin; parallel projection makes that frame's height over the pixel height the metres one pixel spans everywhere in the picture.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One branch per view form, each producing a camera and its record through one record helper.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The 0.5 m floor is the framing owner's documented convention, the margin is the viewpoint's own distance factor, and a switch a form cannot honour is refused instead of ignored.\n * @evidence contracts/development/implementation.md#efficient-algorithms Constant work: eight corners at most.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Directions are the named viewpoints' own records and the perspective fit is the framing owner's, so every host frames by one rule.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Creates one camera, which the caller owns, except for `film`, which returns the subject's camera; nothing is kept.\n */\nexport function resolveAutoMovieInspectionView(props: {\n /** The view, as `parseAutoMovieInspectionView` read it. */\n view: IAutoMovieInspectionView;\n\n /** The view's text, kept in the record. */\n text: string;\n\n /** World box a fitted view frames, or null when nothing is drawn. */\n bounds: IAutoMovieViewerSubjectBounds | null;\n\n /** The subject's delivery camera: the film view itself, and the field of view and clips the other views take. */\n camera: THREE.PerspectiveCamera;\n\n /** The subject's own views by name, each placing a camera at a second. */\n views?: Readonly<\n Record<\n string,\n (seconds: number) => {\n position: readonly [number, number, number];\n target: readonly [number, number, number];\n }\n >\n >;\n\n /** The film second drawn. */\n seconds: number;\n\n /** Picture width, pixels. */\n width: number;\n\n /** Picture height, pixels. */\n height: number;\n}): {\n camera: THREE.PerspectiveCamera | THREE.OrthographicCamera;\n record: IAutoMovieInspectionCamera;\n} {\n if (\n !(props.width > 0 && Number.isFinite(props.width)) ||\n !(props.height > 0 && Number.isFinite(props.height))\n )\n throw new Error(\n `Inspection picture ${props.width} x ${props.height} is not a positive size`,\n );\n const aspect: number = props.width / props.height;\n const view: IAutoMovieInspectionView = props.view;\n\n // The film camera is drawn as it is.\n if (view.type === \"film\")\n return {\n camera: props.camera,\n record: record(props.text, props.camera, props.height),\n };\n\n // A fixed camera and a subject's view are a position and a target.\n const own:\n | ((seconds: number) => {\n position: readonly [number, number, number];\n target: readonly [number, number, number];\n })\n | undefined =\n view.type === \"named\" &&\n props.views !== undefined &&\n Object.hasOwn(props.views, view.name)\n ? props.views[view.name]\n : undefined;\n if (view.type === \"fixed\" || own !== undefined) {\n if (\n view.type === \"named\" &&\n (view.orthographic || view.follow || view.focus !== null)\n )\n throw new Error(\n `Inspection view \"${props.text}\" is the subject's own view, which takes no switch`,\n );\n const placed: { position: IAutoMovieVector3; target: IAutoMovieVector3 } =\n view.type === \"fixed\"\n ? view\n : ((pose: {\n position: readonly [number, number, number];\n target: readonly [number, number, number];\n }): { position: IAutoMovieVector3; target: IAutoMovieVector3 } => ({\n position: vector(pose.position),\n target: vector(pose.target),\n }))(own!(props.seconds));\n const up: IAutoMovieVector3 =\n view.type === \"fixed\" && view.up !== null\n ? view.up\n : { x: 0, y: 1, z: 0 };\n\n // A fixed orthographic camera: its scale as written, its clips a quarter and three and a half times the eye's distance, a fitted orthographic view's own clips.\n if (view.type === \"fixed\" && view.metresPerPixel !== null) {\n const distance: number = Math.hypot(\n placed.target.x - placed.position.x,\n placed.target.y - placed.position.y,\n placed.target.z - placed.position.z,\n );\n const half: number = (view.metresPerPixel * props.height) / 2;\n const camera: THREE.OrthographicCamera = new THREE.OrthographicCamera(\n -half * aspect,\n half * aspect,\n half,\n -half,\n distance / 4,\n distance * 3.5,\n );\n aim(camera, placed.position, placed.target, up);\n return {\n camera,\n record: record(props.text, camera, props.height, placed.target),\n };\n }\n const camera: THREE.PerspectiveCamera = new THREE.PerspectiveCamera(\n props.camera.fov,\n aspect,\n props.camera.near,\n props.camera.far,\n );\n aim(camera, placed.position, placed.target, up);\n return {\n camera,\n record: record(props.text, camera, props.height, placed.target),\n };\n }\n\n // A named viewpoint is fitted to the bounds.\n const viewpoints: IAutoMovieViewerViewpoint[] =\n autoMovieViewerNamedViewpoints();\n const viewpoint: IAutoMovieViewerViewpoint | undefined = viewpoints.find(\n (candidate: IAutoMovieViewerViewpoint): boolean =>\n candidate.id === view.name,\n );\n if (viewpoint === undefined)\n throw new Error(\n `Inspection view \"${props.text}\" names no view; the names are ${[\n ...Object.keys(props.views ?? {}),\n ...viewpoints.map(\n (candidate: IAutoMovieViewerViewpoint): string => candidate.id,\n ),\n ].join(\", \")}, besides film and x,y,z:tx,ty,tz`,\n );\n if (props.bounds === null)\n throw new Error(\n `Inspection view \"${props.text}\" has nothing to frame: nothing is drawn`,\n );\n const up: IAutoMovieVector3 = upOf(viewpoint);\n if (!view.orthographic) {\n const pose: IAutoMovieViewerSubjectPose = frameAutoMovieViewerSubject(\n props.bounds,\n viewpoint,\n { fovDeg: props.camera.fov, aspect },\n );\n const camera: THREE.PerspectiveCamera = new THREE.PerspectiveCamera(\n props.camera.fov,\n aspect,\n pose.near,\n pose.far,\n );\n aim(camera, pose.position, pose.target, up);\n return {\n camera,\n record: record(props.text, camera, props.height, pose.target),\n };\n }\n\n // Orthographic: stand back along the direction, then fit the frame to the box's corners on the picture plane.\n const min: IAutoMovieVector3 = props.bounds.min;\n const max: IAutoMovieVector3 = props.bounds.max;\n const centre: THREE.Vector3 = new THREE.Vector3(\n (min.x + max.x) / 2,\n (min.y + max.y) / 2,\n (min.z + max.z) / 2,\n );\n const radius: number = Math.max(\n Math.hypot(max.x - min.x, max.y - min.y, max.z - min.z) / 2,\n FLOOR,\n );\n const azimuth: number = THREE.MathUtils.degToRad(viewpoint.azimuthDeg);\n const elevation: number = THREE.MathUtils.degToRad(viewpoint.elevationDeg);\n const direction: THREE.Vector3 = new THREE.Vector3(\n Math.sin(azimuth) * Math.cos(elevation),\n Math.sin(elevation),\n Math.cos(azimuth) * Math.cos(elevation),\n );\n const camera: THREE.OrthographicCamera = new THREE.OrthographicCamera();\n camera.near = radius / 2;\n camera.far = radius * 7;\n aim(\n camera,\n {\n x: centre.x + direction.x * radius * 2,\n y: centre.y + direction.y * radius * 2,\n z: centre.z + direction.z * radius * 2,\n },\n { x: centre.x, y: centre.y, z: centre.z },\n up,\n );\n let half: number = FLOOR;\n const corner: THREE.Vector3 = new THREE.Vector3();\n for (let k: number = 0; k < 8; k++) {\n corner\n .set(\n (k & 1) === 0 ? min.x : max.x,\n (k & 2) === 0 ? min.y : max.y,\n (k & 4) === 0 ? min.z : max.z,\n )\n .applyMatrix4(camera.matrixWorldInverse);\n half = Math.max(half, Math.abs(corner.y), Math.abs(corner.x) / aspect);\n }\n half *= viewpoint.distanceFactor;\n camera.top = half;\n camera.bottom = -half;\n camera.right = half * aspect;\n camera.left = -half * aspect;\n camera.updateProjectionMatrix();\n return {\n camera,\n record: record(props.text, camera, props.height, {\n x: centre.x,\n y: centre.y,\n z: centre.z,\n }),\n };\n}\n\n/** The picture-up a viewpoint documents: `-Z` from the top, `+Z` from the bottom, `+Y` otherwise. */\nfunction upOf(viewpoint: IAutoMovieViewerViewpoint): IAutoMovieVector3 {\n if (Math.abs(viewpoint.elevationDeg) !== 90) return { x: 0, y: 1, z: 0 };\n const sign: number = Math.sign(viewpoint.elevationDeg);\n const azimuth: number = THREE.MathUtils.degToRad(viewpoint.azimuthDeg);\n return { x: -sign * Math.sin(azimuth), y: 0, z: -sign * Math.cos(azimuth) };\n}\n\n/** Place an unparented camera and bring its matrices up to date. */\nfunction aim(\n camera: THREE.Camera,\n position: IAutoMovieVector3,\n target: IAutoMovieVector3,\n up: IAutoMovieVector3,\n): void {\n camera.position.set(position.x, position.y, position.z);\n camera.up.set(up.x, up.y, up.z);\n camera.lookAt(target.x, target.y, target.z);\n if (\n camera instanceof THREE.PerspectiveCamera ||\n camera instanceof THREE.OrthographicCamera\n )\n camera.updateProjectionMatrix();\n camera.updateMatrixWorld(true);\n}\n\n/** The record of a placed camera, its target one metre ahead when the camera was not aimed here. */\nfunction record(\n text: string,\n camera: THREE.PerspectiveCamera | THREE.OrthographicCamera,\n height: number,\n target?: IAutoMovieVector3,\n): IAutoMovieInspectionCamera {\n camera.updateMatrixWorld(true);\n const position: THREE.Vector3 = new THREE.Vector3().setFromMatrixPosition(\n camera.matrixWorld,\n );\n const forward: THREE.Vector3 = camera.getWorldDirection(new THREE.Vector3());\n const ahead: THREE.Vector3 = position.clone().add(forward);\n const up: THREE.Vector3 = new THREE.Vector3(0, 1, 0)\n .transformDirection(camera.matrixWorld)\n .normalize();\n const orthographic: boolean = camera instanceof THREE.OrthographicCamera;\n return {\n view: text,\n projection: orthographic ? \"orthographic\" : \"perspective\",\n position: { x: position.x, y: position.y, z: position.z },\n target: target ?? { x: ahead.x, y: ahead.y, z: ahead.z },\n up: { x: up.x, y: up.y, z: up.z },\n fovDeg: orthographic ? null : (camera as THREE.PerspectiveCamera).fov,\n metresPerPixel: orthographic\n ? ((camera as THREE.OrthographicCamera).top -\n (camera as THREE.OrthographicCamera).bottom) /\n height\n : null,\n near: camera.near,\n far: camera.far,\n };\n}\n\n/** A vector from a triple. */\nfunction vector(triple: readonly [number, number, number]): IAutoMovieVector3 {\n return { x: triple[0], y: triple[1], z: triple[2] };\n}\n"],"mappings":";;;;;AAcA,MAAM,QAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCtB,SAAgB,+BAA+B,OAmC7C;CACA,IACE,EAAE,MAAM,QAAQ,KAAK,OAAO,SAAS,MAAM,KAAK,MAChD,EAAE,MAAM,SAAS,KAAK,OAAO,SAAS,MAAM,MAAM,IAElD,MAAM,IAAI,MACR,sBAAsB,MAAM,MAAM,KAAK,MAAM,OAAO,wBACtD;CACF,MAAM,SAAiB,MAAM,QAAQ,MAAM;CAC3C,MAAM,OAAiC,MAAM;CAG7C,IAAI,KAAK,SAAS,QAChB,OAAO;EACL,QAAQ,MAAM;EACd,QAAQ,OAAO,MAAM,MAAM,MAAM,QAAQ,MAAM,MAAM;CACvD;CAGF,MAAM,MAMJ,KAAK,SAAS,WACd,MAAM,UAAU,KAAA,KAChB,OAAO,OAAO,MAAM,OAAO,KAAK,IAAI,IAChC,MAAM,MAAM,KAAK,QACjB,KAAA;CACN,IAAI,KAAK,SAAS,WAAW,QAAQ,KAAA,GAAW;EAC9C,IACE,KAAK,SAAS,YACb,KAAK,gBAAgB,KAAK,UAAU,KAAK,UAAU,OAEpD,MAAM,IAAI,MACR,oBAAoB,MAAM,KAAK,mDACjC;EACF,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{ IAutoMovieInspectionTrail } from "./IAutoMovieInspectionTrail.js";
|
|
3
3
|
/**
|
|
4
4
|
* Sample where every object a path pattern selects is, at each of a window's seconds, so a still can show the path it travels.
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleAutoMovieInspectionTrails.js","sourceRoot":"","sources":["../../../src/scene/inspection/sampleAutoMovieInspectionTrails.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"sampleAutoMovieInspectionTrails.js","sourceRoot":"","sources":["../../../src/scene/inspection/sampleAutoMovieInspectionTrails.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAY,KAAK,kCAAc;AAE/B,iFAA2E;AAC3E,uFAAiF;AAEjF,qIAAqI;AACrI,MAAM,KAAK,GAAW,IAAI,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACI,KAAK,0CAA0C,KAYrD;IACC,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;QACjE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,MAAM,KAAK,GAAa,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAC3C,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE,CAAC,CAAC,GAAG,CAAC,CACxC,CAAC;IAEF,4DAA4D;IAC5D,MAAM,KAAK,GAAgC,IAAI,GAAG,EAA0B,CAAC;IAC7E,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAsB,EAAQ,EAAE;QACpD,MAAM,IAAI,GAAW,IAAA,wDAAyB,EAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACpE,IAAI,CAAC,KAAK,CAAC,GAAG,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AE,CAAS,EAAQ,EAAE;YACxE,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;YAC5B,SAAS,CAAC,CAAC,CAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAChB,CACE,CAAC,IAAI,CAA2B,EAChC,CAAS,EACkB,EAAE;QAC7B,MAAM,OAAO,GAAa,SAAS,CAAC,CAAC,CAAE,CAAC;QACxC,IAAI,UAAU,GAAY,IAAI,CAAC;QAC/B,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,UAAU,EAAE,CAAC,IAAI,CAAC;YAC9D,UAAU;gBACR,IAAI,CAAC,KAAK,CACR,OAAO,CAAC,CAAC,CAAE,GAAG,OAAO,CAAC,CAAC,CAAE,EACzB,OAAO,CAAC,CAAC,GAAG,CAAC,CAAE,GAAG,OAAO,CAAC,CAAC,CAAE,EAC7B,OAAO,CAAC,CAAC,GAAG,CAAC,CAAE,GAAG,OAAO,CAAC,CAAC,CAAE,CAC9B,IAAI,KAAK,CAAC;QACf,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IACrE,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleAutoMovieInspectionTrails.mjs","names":[],"sources":["../../../src/scene/inspection/sampleAutoMovieInspectionTrails.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"sampleAutoMovieInspectionTrails.mjs","names":[],"sources":["../../../src/scene/inspection/sampleAutoMovieInspectionTrails.ts"],"sourcesContent":["import type { IAutoMovieInspectionTrail } from \"@automovie/interface\";\nimport * as THREE from \"three\";\n\nimport { autoMovieInspectionPathOf } from \"./autoMovieInspectionPathOf.js\";\nimport { matchAutoMovieInspectionPath } from \"./matchAutoMovieInspectionPath.js\";\n\n/** Distance in metres within which every sample of a trail counts as one place: a micrometre, far below anything a picture shows. */\nconst STILL: number = 1e-6;\n\n/**\n * Sample where every object a path pattern selects is, at each of a window's seconds, so a still can show the path it travels.\n *\n * The objects are the scene's objects of any kind, drawn or not, at the shallowest paths the pattern matches: a matched path whose parent path also matches is part of its parent's object. When several objects share a path, the first in scene order stands for it. For each second in `times`, `seek` places the subject and is awaited, so a subject that becomes ready only after an await, such as one loading a texture or a pose, is read once it is placed; then the world position of each object's origin is read, so any moving object is sampled, whatever its kind: a body's root or bone, a prop, a vehicle, a camera.\n *\n * Seconds are taken in ascending order, one seek at a time. The scene is left as the last `seek` placed it, so the caller seeks the second it draws again and awaits that seek before drawing. A trail whose every sample lies within a micrometre of its first is stationary.\n *\n * It rejects when `times` is empty or holds a second that is not finite, when the pattern matches no object, and with the seek's own rejection when a second cannot be placed.\n *\n * ```ts\n * const trails = await sampleAutoMovieInspectionTrails({ scene, pattern: \"hero/*Hand\", times, seek: subject.seek });\n * await subject.seek(seconds);\n * inspection.update([...production.marks?.(seconds) ?? [], ...markAutoMovieInspectionTrails(trails, seconds)]);\n * ```\n *\n * @evidence contracts/development/common.md#meaningful-documentation States which objects are sampled and how shared paths resolve, what is read at each second, the order, the state the scene is left in, the awaited seek, the stationary rule and its tolerance, and the refusals, and shows the sample, seek and draw order.\n * @evidence contracts/development/implementation.md#principled-implementation An object's travel is its origin's world position over time, read after the subject's seek has resolved and three.js has brought world matrices up to date, so the subject only seeks and the sampler needs to know nothing of what moves it or when it is ready.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Resolve the objects once, then one seek and one read per second.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The tolerance is a stated micrometre, below any visible motion, not a value tuned to a case, and an empty match is refused.\n * @evidence contracts/development/implementation.md#efficient-algorithms One scene traversal to resolve paths, then per second one seek, one world-matrix pass and one read per object.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call samples the subject as it moves now.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returns plain numbers; the scene and the seek are borrowed.\n */\nexport async function sampleAutoMovieInspectionTrails(props: {\n /** The scene the subject is built into. */\n scene: THREE.Scene;\n\n /** Path pattern of the objects whose trails are sampled. */\n pattern: string;\n\n /** The film seconds to sample. */\n times: readonly number[];\n\n /** Place the subject at a film second; resolves once the subject is ready to be read there. */\n seek: (seconds: number) => Promise<void>;\n}): Promise<IAutoMovieInspectionTrail[]> {\n if (props.times.length === 0 || !props.times.every(Number.isFinite))\n throw new Error(\"Trail times must be one or more finite seconds\");\n const times: number[] = [...props.times].sort(\n (a: number, b: number): number => a - b,\n );\n\n // The shallowest matched paths, each with its first object.\n const first: Map<string, THREE.Object3D> = new Map<string, THREE.Object3D>();\n props.scene.traverse((object: THREE.Object3D): void => {\n const path: string = autoMovieInspectionPathOf(props.scene, object);\n if (!first.has(path)) first.set(path, object);\n });\n const objects: [string, THREE.Object3D][] = [...first].filter(\n ([path]: [string, THREE.Object3D]): boolean => {\n if (!matchAutoMovieInspectionPath(path, props.pattern)) return false;\n const names: string[] = path === \"\" ? [] : path.split(\"/\");\n for (let depth: number = 0; depth < names.length; depth++)\n if (\n matchAutoMovieInspectionPath(\n names.slice(0, depth).join(\"/\"),\n props.pattern,\n )\n )\n return false;\n return true;\n },\n );\n if (objects.length === 0)\n throw new Error(`Trail pattern \"${props.pattern}\" matches no object`);\n\n const positions: number[][] = objects.map((): number[] => []);\n const at: THREE.Vector3 = new THREE.Vector3();\n for (const seconds of times) {\n await props.seek(seconds);\n props.scene.updateMatrixWorld(true);\n objects.forEach(([, object]: [string, THREE.Object3D], i: number): void => {\n object.getWorldPosition(at);\n positions[i]!.push(at.x, at.y, at.z);\n });\n }\n return objects.map(\n (\n [path]: [string, THREE.Object3D],\n i: number,\n ): IAutoMovieInspectionTrail => {\n const samples: number[] = positions[i]!;\n let stationary: boolean = true;\n for (let k: number = 3; k < samples.length && stationary; k += 3)\n stationary =\n Math.hypot(\n samples[k]! - samples[0]!,\n samples[k + 1]! - samples[1]!,\n samples[k + 2]! - samples[2]!,\n ) <= STILL;\n return { path, times: [...times], positions: samples, stationary };\n },\n );\n}\n"],"mappings":";;;;;AAOA,MAAM,QAAgB;;;;;;;;;;;;;;;;;;;;;;;;AAyBtB,eAAsB,gCAAgC,OAYb;CACvC,IAAI,MAAM,MAAM,WAAW,KAAK,CAAC,MAAM,MAAM,MAAM,OAAO,QAAQ,GAChE,MAAM,IAAI,MAAM,gDAAgD;CAClE,MAAM,QAAkB,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC,MACtC,GAAW,MAAsB,IAAI,CACxC;CAGA,MAAM,wBAAqC,IAAI,IAA4B;CAC3E,MAAM,MAAM,UAAU,WAAiC;EACrD,MAAM,OAAe,0BAA0B,MAAM,OAAO,MAAM;EAClE,IAAI,CAAC,MAAM,IAAI,IAAI,GAAG,MAAM,IAAI,MAAM,MAAM;CAC9C,CAAC;CACD,MAAM,UAAsC,CAAC,GAAG,KAAK,CAAC,CAAC,QACpD,CAAC,UAA6C;EAC7C,IAAI,CAAC,6BAA6B,MAAM,MAAM,OAAO,GAAG,OAAO;EAC/D,MAAM,QAAkB,SAAS,KAAK,CAAC,IAAI,KAAK,MAAM,GAAG;EACzD,KAAK,IAAI,QAAgB,GAAG,QAAQ,MAAM,QAAQ,SAChD,IACE,6BACE,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,KAAK,GAAG,GAC9B,MAAM,OACR,GAEA,OAAO;EACX,OAAO;CACT,CACF;CACA,IAAI,QAAQ,WAAW,GACrB,MAAM,IAAI,MAAM,kBAAkB,MAAM,QAAQ,oBAAoB;CAEtE,MAAM,YAAwB,QAAQ,UAAoB,CAAC,CAAC;CAC5D,MAAM,KAAoB,IAAI,MAAM,QAAQ;CAC5C,KAAK,MAAM,WAAW,OAAO;EAC3B,MAAM,MAAM,KAAK,OAAO;EACxB,MAAM,MAAM,kBAAkB,IAAI;EAClC,QAAQ,SAAS,GAAG,SAAmC,MAAoB;GACzE,OAAO,iBAAiB,EAAE;GAC1B,UAAU,EAAE,CAAE,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;EACrC,CAAC;CACH;CACA,OAAO,QAAQ,KAEX,CAAC,OACD,MAC8B;EAC9B,MAAM,UAAoB,UAAU;EACpC,IAAI,aAAsB;EAC1B,KAAK,IAAI,IAAY,GAAG,IAAI,QAAQ,UAAU,YAAY,KAAK,GAC7D,aACE,KAAK,MACH,QAAQ,KAAM,QAAQ,IACtB,QAAQ,IAAI,KAAM,QAAQ,IAC1B,QAAQ,IAAI,KAAM,QAAQ,EAC5B,KAAK;EACT,OAAO;GAAE;GAAM,OAAO,CAAC,GAAG,KAAK;GAAG,WAAW;GAAS;EAAW;CACnE,CACF;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAutoMovieRenderTextureTarget } from "@automovie/
|
|
1
|
+
import type { IAutoMovieRenderTextureTarget } from "@automovie/interface";
|
|
2
2
|
/**
|
|
3
3
|
* Compare allocation facts while leaving scope, phase and owner labels aside. An identical retained native product already bounds the upcoming factory; a changed representation, extent or attachment requires a separate planned row. No storage is measured and no caller-owned target is changed here.
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchesAutoMovieShadowTextureProfile.mjs","names":[],"sources":["../../src/scene/matchesAutoMovieShadowTextureProfile.ts"],"sourcesContent":["import type { IAutoMovieRenderTextureTarget } from \"@automovie/
|
|
1
|
+
{"version":3,"file":"matchesAutoMovieShadowTextureProfile.mjs","names":[],"sources":["../../src/scene/matchesAutoMovieShadowTextureProfile.ts"],"sourcesContent":["import type { IAutoMovieRenderTextureTarget } from \"@automovie/interface\";\n\n/**\n * Compare allocation facts while leaving scope, phase and owner labels aside. An identical retained native product already bounds the upcoming factory; a changed representation, extent or attachment requires a separate planned row. No storage is measured and no caller-owned target is changed here.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Compares the retained native target's allocation facts against an explicit planned profile, treating an omitted actual face count as one and preserving ordered format equality.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Representation comparison stays separate from light scope labels, profile planning, byte estimates and actual texture allocation.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Matching current facts do not measure physical native storage, and the supported planner supplies an explicit planned face count rather than relying on omitted planned metadata.\n * @evidence contracts/development/common.md#meaningful-documentation Documentation identifies allocation-only comparison, excluded owner labels and no target mutation or native measurement.\n * @evidence contracts/development/implementation.md#efficient-algorithms Fixed scalar checks precede an F-format scan, giving O(F) time and no array copy or retained comparison state.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Only matching representation, extent, attachments and formats permit the retained row to cover the planned factory; equal owner text alone is ignored.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Both metadata rows are borrowed and this read creates no target, attachment, texture or ownership record.\n */\nexport const matchesAutoMovieShadowTextureProfile: (\n actual: IAutoMovieRenderTextureTarget,\n planned: IAutoMovieRenderTextureTarget,\n) => boolean = (\n actual: IAutoMovieRenderTextureTarget,\n planned: IAutoMovieRenderTextureTarget,\n): boolean =>\n actual.width === planned.width &&\n actual.height === planned.height &&\n (actual.faces ?? 1) === planned.faces &&\n actual.samples === planned.samples &&\n actual.mipmapped === planned.mipmapped &&\n actual.depthBytesPerTexel === planned.depthBytesPerTexel &&\n actual.depthTexture === planned.depthTexture &&\n actual.formats.length === planned.formats.length &&\n actual.formats.every(\n (\n format: IAutoMovieRenderTextureTarget[\"formats\"][number],\n index: number,\n ): boolean => format === planned.formats[index],\n );\n"],"mappings":";;;;;;;;;;;;AAaA,MAAa,wCAIX,QACA,YAEA,OAAO,UAAU,QAAQ,SACzB,OAAO,WAAW,QAAQ,WACzB,OAAO,SAAS,OAAO,QAAQ,SAChC,OAAO,YAAY,QAAQ,WAC3B,OAAO,cAAc,QAAQ,aAC7B,OAAO,uBAAuB,QAAQ,sBACtC,OAAO,iBAAiB,QAAQ,gBAChC,OAAO,QAAQ,WAAW,QAAQ,QAAQ,UAC1C,OAAO,QAAQ,OAEX,QACA,UACY,WAAW,QAAQ,QAAQ,MAC3C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IAutoMovieObservedRenderResult } from "@automovie/interface";
|
|
2
2
|
import type * as THREE from "three";
|
|
3
3
|
/**
|
|
4
4
|
* Draw one complete frame while measuring renderer-confirmed submissions.
|
|
@@ -15,7 +15,4 @@ import type * as THREE from "three";
|
|
|
15
15
|
* @evidence contracts/development/implementation.md#reuse-equivalent-work One counter-reset epoch aggregates every synchronous source/composite draw in the requested frame; another frame must reset anew and cannot reuse older submission counts.
|
|
16
16
|
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The renderer is borrowed, no GPU owner is acquired and autoReset is restored after reset/draw completion or failure; caller must keep the SDK info object live and writable throughout the scope.
|
|
17
17
|
*/
|
|
18
|
-
export declare const observeAutoMovieRendererFrame: <Output>(renderer: THREE.WebGLRenderer, draw: () => Output) =>
|
|
19
|
-
output: Output;
|
|
20
|
-
observed: IAutoMovieRenderObservation;
|
|
21
|
-
};
|
|
18
|
+
export declare const observeAutoMovieRendererFrame: <Output>(renderer: THREE.WebGLRenderer, draw: () => Output) => IAutoMovieObservedRenderResult<Output>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observeAutoMovieRendererFrame.js","sourceRoot":"","sources":["../../src/scene/observeAutoMovieRendererFrame.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;;GAcG;AACI,MAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"observeAutoMovieRendererFrame.js","sourceRoot":"","sources":["../../src/scene/observeAutoMovieRendererFrame.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;;GAcG;AACI,MAAM,6BAA6B,GAGI,CAC5C,QAA6B,EAC7B,IAAkB,EACsB,EAAE;IAC1C,MAAM,iBAAiB,GAAY,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;IAC3D,QAAQ,CAAC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IAChC,IAAI,CAAC;QACH,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QACtB,MAAM,MAAM,GAAW,IAAI,EAAE,CAAC;QAC9B,OAAO;YACL,MAAM;YACN,QAAQ,EAAE;gBACR,MAAM,EAAE,IAAI;gBACZ,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;gBACrC,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS;gBACzC,SAAS,EAAE,IAAI;gBACf,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,IAAI;gBACZ,UAAU,EAAE,IAAI;gBAChB,aAAa,EAAE,IAAI;aACpB;SACF,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,QAAQ,CAAC,IAAI,CAAC,SAAS,GAAG,iBAAiB,CAAC;IAC9C,CAAC;AACH,CAAC,CAAC;AA5BW,QAAA,6BAA6B,GAA7B,6BAA6B,CA4BxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observeAutoMovieRendererFrame.mjs","names":[],"sources":["../../src/scene/observeAutoMovieRendererFrame.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"observeAutoMovieRendererFrame.mjs","names":[],"sources":["../../src/scene/observeAutoMovieRendererFrame.ts"],"sourcesContent":["import type { IAutoMovieObservedRenderResult } from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\n/**\n * Draw one complete frame while measuring renderer-confirmed submissions.\n *\n * `WebGLRenderer.info` is the authority for calls and triangles because it is updated after camera layers, frustum culling, geometry groups, draw ranges, and material visibility have selected the work that reaches the renderer. Disabling its per-render reset makes the measurement frame-wide: a dissolve therefore includes the outgoing draw, incoming draw, and composite pass.\n *\n * The remaining budget dimensions deliberately stay `null`. Three exposes renderer-lifetime allocations for some of them and no post-culling frame count for the rest; a scene traversal would be an estimate, not an observation.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Resets actual renderer submission counters once, disables automatic per-render reset and immediately samples calls/triangles after the supplied synchronous frame draw, restoring its original autoReset flag in finally.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Submission observation stays separate from geometry budget estimates and draw ownership; unobservable post-culling dimensions remain explicitly null.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Scene traversal is not substituted for submitted work, counters are not claimed as pixels or GPU allocations and asynchronous draw completion is outside this immediate sampling contract.\n * @evidence contracts/development/common.md#meaningful-documentation Documents frame-wide multi-draw aggregation, nullable dimensions, live writable SDK-info premise and draw-failure/reset restoration; prior counters are intentionally replaced rather than restored.\n * @evidence contracts/development/implementation.md#efficient-algorithms Coordinator work is fixed around the actual draw and counter reads, allocating one small record without an extra scene or pixel scan.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work One counter-reset epoch aggregates every synchronous source/composite draw in the requested frame; another frame must reset anew and cannot reuse older submission counts.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The renderer is borrowed, no GPU owner is acquired and autoReset is restored after reset/draw completion or failure; caller must keep the SDK info object live and writable throughout the scope.\n */\nexport const observeAutoMovieRendererFrame: <Output>(\n renderer: THREE.WebGLRenderer,\n draw: () => Output,\n) => IAutoMovieObservedRenderResult<Output> = <Output>(\n renderer: THREE.WebGLRenderer,\n draw: () => Output,\n): IAutoMovieObservedRenderResult<Output> => {\n const previousAutoReset: boolean = renderer.info.autoReset;\n renderer.info.autoReset = false;\n try {\n renderer.info.reset();\n const output: Output = draw();\n return {\n output,\n observed: {\n meshes: null,\n drawCalls: renderer.info.render.calls,\n triangles: renderer.info.render.triangles,\n materials: null,\n textures: null,\n lights: null,\n shadowMaps: null,\n instanceSlots: null,\n },\n };\n } finally {\n renderer.info.autoReset = previousAutoReset;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,MAAa,iCAIX,UACA,SAC2C;CAC3C,MAAM,oBAA6B,SAAS,KAAK;CACjD,SAAS,KAAK,YAAY;CAC1B,IAAI;EACF,SAAS,KAAK,MAAM;EAEpB,OAAO;GACL,QAFqB,KAEhB;GACL,UAAU;IACR,QAAQ;IACR,WAAW,SAAS,KAAK,OAAO;IAChC,WAAW,SAAS,KAAK,OAAO;IAChC,WAAW;IACX,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,eAAe;GACjB;EACF;CACF,UAAU;EACR,SAAS,KAAK,YAAY;CAC5B;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAutoMovieRenderTextureTarget } from "@automovie/
|
|
1
|
+
import type { IAutoMovieRenderTextureTarget } from "@automovie/interface";
|
|
2
2
|
import type * as THREE from "three";
|
|
3
3
|
/**
|
|
4
4
|
* Describe Three r186's next native map or VSM blur attachment factory. WebGLShadowMap multiplies mapSize by public frame extents and clamps each viewport to floor(maxTextureSize / extent). Point cubes use the resulting x-edge for both dimensions and six faces, regardless of mapSize.y. Its PCF map constructor retains default RGBA8 color plus unsigned-int depth; VSM requests RG half-float color plus float depth. The VSM blur target uses RG half-float color and the default D24 renderbuffer. These are constructor representation facts, not a second texture byte or allocation-count formula. The caller admits point/filter compatibility through the Engine profile. This creates no target and does not mutate the light's requested mapSize.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planAutoMovieShadowTextureTarget.mjs","names":[],"sources":["../../src/scene/planAutoMovieShadowTextureTarget.ts"],"sourcesContent":["import type { IAutoMovieRenderTextureTarget } from \"@automovie/
|
|
1
|
+
{"version":3,"file":"planAutoMovieShadowTextureTarget.mjs","names":[],"sources":["../../src/scene/planAutoMovieShadowTextureTarget.ts"],"sourcesContent":["import type { IAutoMovieRenderTextureTarget } from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\n/**\n * Describe Three r186's next native map or VSM blur attachment factory. WebGLShadowMap multiplies mapSize by public frame extents and clamps each viewport to floor(maxTextureSize / extent). Point cubes use the resulting x-edge for both dimensions and six faces, regardless of mapSize.y. Its PCF map constructor retains default RGBA8 color plus unsigned-int depth; VSM requests RG half-float color plus float depth. The VSM blur target uses RG half-float color and the default D24 renderbuffer. These are constructor representation facts, not a second texture byte or allocation-count formula. The caller admits point/filter compatibility through the Engine profile. This creates no target and does not mutate the light's requested mapSize.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Projects installed Three r186's public frame extents/mapSize clamp and native PCF/VSM constructors into representation metadata, with point cubes using the x edge and six faces.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure This planner supplies one required factory row while Engine profile admission and byte/accounting aggregation remain separate owners.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No native target is allocated or light mapSize mutated, compatibility is admitted by the caller and constructor metadata is not a measured physical allocation count.\n * @evidence contracts/development/common.md#meaningful-documentation Documentation identifies the installed allocator family, depth/colour attachments, point dimensions and supported-profile premises.\n * @evidence contracts/development/implementation.md#efficient-algorithms Fixed extent arithmetic and constructing one metadata row take constant work, independent of scene nodes or shadow pixel count.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work The retained-target comparator uses these exact planned representation facts to avoid a duplicate planned row only when current allocation metadata matches.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Public shadow/capability facts are borrowed and the returned row owns no texture, framebuffer or depth attachment.\n */\nexport const planAutoMovieShadowTextureTarget: (\n scope: string,\n light: string,\n shadow: THREE.LightShadow,\n point: boolean,\n filter: \"pcf\" | \"vsm\",\n role: \"map\" | \"blur\",\n maxTextureSize: number,\n) => IAutoMovieRenderTextureTarget = (\n scope: string,\n light: string,\n shadow: THREE.LightShadow,\n point: boolean,\n filter: \"pcf\" | \"vsm\",\n role: \"map\" | \"blur\",\n maxTextureSize: number,\n): IAutoMovieRenderTextureTarget => {\n const extents: THREE.Vector2 = shadow.getFrameExtents();\n const width: number = Math.floor(\n Math.min(shadow.mapSize.x, Math.floor(maxTextureSize / extents.x)) *\n extents.x,\n );\n const height: number = point\n ? width\n : Math.floor(\n Math.min(shadow.mapSize.y, Math.floor(maxTextureSize / extents.y)) *\n extents.y,\n );\n return {\n owner: `shadow-target:${JSON.stringify([scope, light, role, \"planned\"])}`,\n shadow: { scope, light, role },\n width,\n height,\n faces: point ? 6 : 1,\n formats: [filter === \"vsm\" ? \"rg16f\" : \"rgba8\"],\n mipmapped: false,\n samples: 0,\n depthBytesPerTexel: 4,\n depthTexture: role === \"map\",\n };\n};\n"],"mappings":";;;;;;;;;;;;AAcA,MAAa,oCASX,OACA,OACA,QACA,OACA,QACA,MACA,mBACkC;CAClC,MAAM,UAAyB,OAAO,gBAAgB;CACtD,MAAM,QAAgB,KAAK,MACzB,KAAK,IAAI,OAAO,QAAQ,GAAG,KAAK,MAAM,iBAAiB,QAAQ,CAAC,CAAC,IAC/D,QAAQ,CACZ;CACA,MAAM,SAAiB,QACnB,QACA,KAAK,MACH,KAAK,IAAI,OAAO,QAAQ,GAAG,KAAK,MAAM,iBAAiB,QAAQ,CAAC,CAAC,IAC/D,QAAQ,CACZ;CACJ,OAAO;EACL,OAAO,iBAAiB,KAAK,UAAU;GAAC;GAAO;GAAO;GAAM;EAAS,CAAC;EACtE,QAAQ;GAAE;GAAO;GAAO;EAAK;EAC7B;EACA;EACA,OAAO,QAAQ,IAAI;EACnB,SAAS,CAAC,WAAW,QAAQ,UAAU,OAAO;EAC9C,WAAW;EACX,SAAS;EACT,oBAAoB;EACpB,cAAc,SAAS;CACzB;AACF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IAutoMovieFilmDisplayTextureResidency } from "@automovie/interface";
|
|
1
2
|
import type * as THREE from "three";
|
|
2
3
|
/**
|
|
3
4
|
* Current renderer-owned beauty compositor storage for render-budget hosts.
|
|
@@ -12,9 +13,4 @@ import type * as THREE from "three";
|
|
|
12
13
|
* @evidence contracts/development/implementation.md#reuse-equivalent-work Only actual per-renderer owner state is reused; querying does not create an unused compositor or infer storage from arbitrary source sampling settings.
|
|
13
14
|
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returned rows are owned scalar copies and acquire no resource; the renderer-keyed compositor owns retained copies and sticky failure, and successful owner disposal removes its map entry.
|
|
14
15
|
*/
|
|
15
|
-
export declare const readAutoMovieFilmDisplayTextureResidency: (renderer: THREE.WebGLRenderer) => Array<
|
|
16
|
-
owner: "film-fade" | "film-dissolve";
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
copies: 3;
|
|
20
|
-
}>;
|
|
16
|
+
export declare const readAutoMovieFilmDisplayTextureResidency: (renderer: THREE.WebGLRenderer) => Array<IAutoMovieFilmDisplayTextureResidency>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readAutoMovieFilmDisplayTextureResidency.js","sourceRoot":"","sources":["../../src/scene/readAutoMovieFilmDisplayTextureResidency.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"readAutoMovieFilmDisplayTextureResidency.js","sourceRoot":"","sources":["../../src/scene/readAutoMovieFilmDisplayTextureResidency.ts"],"names":[],"mappings":";;;AAGA,+FAAyF;AACzF,uFAAiF;AAEjF;;;;;;;;;;;;GAYG;AACI,MAAM,wCAAwC,GAED,CAClD,QAA6B,EACiB,EAAE;IAChD,MAAM,IAAI,GAKL,EAAE,CAAC;IACR,MAAM,IAAI,GACR,8DAA4B,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,QAAQ,GACZ,sEAAgC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAI,IAAI,KAAK,SAAS;QACpB,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAC;IACxE,IAAI,QAAQ,KAAK,SAAS;QACxB,IAAI,CAAC,IAAI,CAAC;YACR,KAAK,EAAE,eAAe;YACtB,GAAG,QAAQ,CAAC,wBAAwB,EAAE;SACvC,CAAC,CAAC;IACL,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAvBW,QAAA,wCAAwC,GAAxC,wCAAwC,CAuBnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readAutoMovieFilmDisplayTextureResidency.mjs","names":[],"sources":["../../src/scene/readAutoMovieFilmDisplayTextureResidency.ts"],"sourcesContent":["import type * as THREE from \"three\";\n\nimport { AutoMovieDissolveCompositorState } from \"./AutoMovieDissolveCompositorState.js\";\nimport { AutoMovieFadeCompositorState } from \"./AutoMovieFadeCompositorState.js\";\n\n/**\n * Current renderer-owned beauty compositor storage for render-budget hosts.\n *\n * Only acquired lifetimes appear. Each row bounds its three RGBA8/no-mipmap display copies; source sampling state or scene assets do not change that extent. Successful release removes its row; a failed terminal compositor remains reachable through its renderer key with the retained extent and original failure. These rows bound retained copy extents and do not prove freed native bytes. Returned records are owned copies.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Reads the renderer-keyed fade/dissolve owners and copies each current width/height/copies3 extent, including failed terminal owners still retained by their state maps.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure This metadata projection follows existing compositor ownership and leaves draw, resize and disposal behavior with those owners.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Failed disposal is not treated as freed storage: its extent remains reachable with the original cause until the renderer key is unreachable; reported rows are potential copy bounds rather than actual GLuint or freed-byte proof.\n * @evidence contracts/development/common.md#meaningful-documentation Documents actual acquired lifetimes, three RGBA8/no-mipmap copies, success-only row removal and failure retention.\n * @evidence contracts/development/implementation.md#efficient-algorithms Two WeakMap lookups and at most two fixed-size copied rows are constant work independent of scene and pixel population.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Only actual per-renderer owner state is reused; querying does not create an unused compositor or infer storage from arbitrary source sampling settings.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returned rows are owned scalar copies and acquire no resource; the renderer-keyed compositor owns retained copies and sticky failure, and successful owner disposal removes its map entry.\n */\nexport const readAutoMovieFilmDisplayTextureResidency: (\n renderer: THREE.WebGLRenderer,\n) => Array<
|
|
1
|
+
{"version":3,"file":"readAutoMovieFilmDisplayTextureResidency.mjs","names":[],"sources":["../../src/scene/readAutoMovieFilmDisplayTextureResidency.ts"],"sourcesContent":["import type { IAutoMovieFilmDisplayTextureResidency } from \"@automovie/interface\";\nimport type * as THREE from \"three\";\n\nimport { AutoMovieDissolveCompositorState } from \"./AutoMovieDissolveCompositorState.js\";\nimport { AutoMovieFadeCompositorState } from \"./AutoMovieFadeCompositorState.js\";\n\n/**\n * Current renderer-owned beauty compositor storage for render-budget hosts.\n *\n * Only acquired lifetimes appear. Each row bounds its three RGBA8/no-mipmap display copies; source sampling state or scene assets do not change that extent. Successful release removes its row; a failed terminal compositor remains reachable through its renderer key with the retained extent and original failure. These rows bound retained copy extents and do not prove freed native bytes. Returned records are owned copies.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Reads the renderer-keyed fade/dissolve owners and copies each current width/height/copies3 extent, including failed terminal owners still retained by their state maps.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure This metadata projection follows existing compositor ownership and leaves draw, resize and disposal behavior with those owners.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Failed disposal is not treated as freed storage: its extent remains reachable with the original cause until the renderer key is unreachable; reported rows are potential copy bounds rather than actual GLuint or freed-byte proof.\n * @evidence contracts/development/common.md#meaningful-documentation Documents actual acquired lifetimes, three RGBA8/no-mipmap copies, success-only row removal and failure retention.\n * @evidence contracts/development/implementation.md#efficient-algorithms Two WeakMap lookups and at most two fixed-size copied rows are constant work independent of scene and pixel population.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Only actual per-renderer owner state is reused; querying does not create an unused compositor or infer storage from arbitrary source sampling settings.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Returned rows are owned scalar copies and acquire no resource; the renderer-keyed compositor owns retained copies and sticky failure, and successful owner disposal removes its map entry.\n */\nexport const readAutoMovieFilmDisplayTextureResidency: (\n renderer: THREE.WebGLRenderer,\n) => Array<IAutoMovieFilmDisplayTextureResidency> = (\n renderer: THREE.WebGLRenderer,\n): Array<IAutoMovieFilmDisplayTextureResidency> => {\n const rows: Array<{\n owner: \"film-fade\" | \"film-dissolve\";\n width: number;\n height: number;\n copies: 3;\n }> = [];\n const fade: ReturnType<typeof AutoMovieFadeCompositorState.get> =\n AutoMovieFadeCompositorState.get(renderer);\n const dissolve: ReturnType<typeof AutoMovieDissolveCompositorState.get> =\n AutoMovieDissolveCompositorState.get(renderer);\n if (fade !== undefined)\n rows.push({ owner: \"film-fade\", ...fade.describeTextureResidency() });\n if (dissolve !== undefined)\n rows.push({\n owner: \"film-dissolve\",\n ...dissolve.describeTextureResidency(),\n });\n return rows;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,MAAa,4CAGX,aACiD;CACjD,MAAM,OAKD,CAAC;CACN,MAAM,OACJ,6BAA6B,IAAI,QAAQ;CAC3C,MAAM,WACJ,iCAAiC,IAAI,QAAQ;CAC/C,IAAI,SAAS,KAAA,GACX,KAAK,KAAK;EAAE,OAAO;EAAa,GAAG,KAAK,yBAAyB;CAAE,CAAC;CACtE,IAAI,aAAa,KAAA,GACf,KAAK,KAAK;EACR,OAAO;EACP,GAAG,SAAS,yBAAyB;CACvC,CAAC;CACH,OAAO;AACT"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { IAutoMovieRenderTextureResidency } from "@automovie/
|
|
1
|
+
import type { IAutoMovieRenderTextureResidency } from "@automovie/interface";
|
|
2
2
|
import * as THREE from "three";
|
|
3
|
-
type RuntimeSource = NonNullable<IAutoMovieRenderTextureResidency["runtimeTextures"]>[number];
|
|
4
3
|
/**
|
|
5
4
|
* Read actual implicit material and area-light lookup objects for one scope. Shader factories publish the same Texture reference they bind. The area pair follows WebGLLights' real extension choice without initializing tables. Caller-retained rows belong to this same renderer, survive material removal, and are dropped only after actual texture/context release. Current scope use labels are replaced on each observation; obsolete rows remain retained-only. Each row follows an actual Texture wrapper, not mutable UUIDs. Distinct wrappers retain their own current upload keys; the engine shares equivalent Source/key pairs. Reobserving one wrapper replaces its old state, matching native cache-key reference retirement after upload. This is a reachable current-state bound; a host requiring upload-transition peak storage supplies the previous phase separately until that phase's native release is observed. These are reachable-storage bounds, never a claim of current GLuint count. No shader, texture state or GPU lifetime is changed by the observation.
|
|
6
5
|
*
|
|
@@ -18,6 +17,5 @@ export declare function readAutoMovieMaterialTextureSources(props: {
|
|
|
18
17
|
extensions: Pick<THREE.WebGLRenderer["extensions"], "has">;
|
|
19
18
|
};
|
|
20
19
|
scene: THREE.Scene;
|
|
21
|
-
retained?: readonly
|
|
22
|
-
}):
|
|
23
|
-
export {};
|
|
20
|
+
retained?: readonly NonNullable<IAutoMovieRenderTextureResidency["runtimeTextures"]>[number][];
|
|
21
|
+
}): NonNullable<IAutoMovieRenderTextureResidency["runtimeTextures"]>[number][];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readAutoMovieMaterialTextureSources.js","sourceRoot":"","sources":["../../src/scene/readAutoMovieMaterialTextureSources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAY,KAAK,kCAAc;AAE/B,mFAA6E;AAQ7E;;;;;;;;;;GAUG;AACH,6CAAoD,
|
|
1
|
+
{"version":3,"file":"readAutoMovieMaterialTextureSources.js","sourceRoot":"","sources":["../../src/scene/readAutoMovieMaterialTextureSources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAY,KAAK,kCAAc;AAE/B,mFAA6E;AAQ7E;;;;;;;;;;GAUG;AACH,6CAAoD,KAOnD;IACC,MAAM,IAAI,GAA4B,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAC9D,CAAC,GAAkB,EAAyB,EAAE,CAAC,CAAC;QAC9C,GAAG,GAAG;QACN,SAAS,EAAE,CAAC,GAAG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