@vosjs/studio-core 0.24.0 → 0.24.1
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/dist/index.d.ts +33 -1
- package/dist/index.js +125 -30
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -2960,6 +2960,18 @@ declare const PIN_GAP = 24;
|
|
|
2960
2960
|
/** Design px the layer keeps from the frame's edge. */
|
|
2961
2961
|
declare const PIN_MARGIN = 24;
|
|
2962
2962
|
type PinSideResolved = Exclude<PinSide, 'auto'>;
|
|
2963
|
+
/**
|
|
2964
|
+
* A referent the POINTER carries: a slider thumb, a scrubber, a card being
|
|
2965
|
+
* dragged. Its rect was measured at the press; through the drag it sits
|
|
2966
|
+
* wherever the pointer has taken it, and it stays at the release. SOURCE
|
|
2967
|
+
* seconds; `x0`/`y0` the press in normalised video fractions.
|
|
2968
|
+
*/
|
|
2969
|
+
interface PinCarry {
|
|
2970
|
+
t0: number;
|
|
2971
|
+
t1: number;
|
|
2972
|
+
x0: number;
|
|
2973
|
+
y0: number;
|
|
2974
|
+
}
|
|
2963
2975
|
/** The referent's rect in normalised video fractions, and how it was found. */
|
|
2964
2976
|
interface PinReferent {
|
|
2965
2977
|
rect: Rect;
|
|
@@ -2968,6 +2980,8 @@ interface PinReferent {
|
|
|
2968
2980
|
step?: StepSpan;
|
|
2969
2981
|
/** SOURCE second the referent was measured at (a step's start, the press). */
|
|
2970
2982
|
at: number | null;
|
|
2983
|
+
/** Set when the press began a drag: the referent moves with the pointer. */
|
|
2984
|
+
carry?: PinCarry;
|
|
2971
2985
|
}
|
|
2972
2986
|
/**
|
|
2973
2987
|
* Find a pin's referent in the recording. A `step` reads the step's own
|
|
@@ -3009,7 +3023,25 @@ interface PinPlacementInput {
|
|
|
3009
3023
|
base: readonly number[];
|
|
3010
3024
|
/** The clip's own motion track, for scale, rotation and opacity. */
|
|
3011
3025
|
motion?: KeyframeTrack<number[]> | null;
|
|
3026
|
+
/**
|
|
3027
|
+
* A carried referent (a drag): the rect is offset by the pointer's
|
|
3028
|
+
* displacement at each sample's SOURCE moment, read from `cursor` in
|
|
3029
|
+
* `space` through `rated` (output → source).
|
|
3030
|
+
*/
|
|
3031
|
+
carry?: PinCarry | null;
|
|
3032
|
+
cursor?: CursorTrack;
|
|
3033
|
+
space?: {
|
|
3034
|
+
w: number;
|
|
3035
|
+
h: number;
|
|
3036
|
+
};
|
|
3037
|
+
rated?: readonly Segment[];
|
|
3012
3038
|
}
|
|
3039
|
+
/**
|
|
3040
|
+
* The referent's rect at OUTPUT time t: the measured rect, moved by where
|
|
3041
|
+
* the pointer has carried it when the press began a drag (held at the
|
|
3042
|
+
* release; nothing before the press).
|
|
3043
|
+
*/
|
|
3044
|
+
declare function pinReferentAt(referent: Rect, t: number, input: Pick<PinPlacementInput, 'carry' | 'cursor' | 'space' | 'rated'>): Rect;
|
|
3013
3045
|
interface PinPlacement {
|
|
3014
3046
|
side: PinSideResolved;
|
|
3015
3047
|
/** Clip-local [x, y, scale, rotation, opacity] in frame fractions. */
|
|
@@ -4662,4 +4694,4 @@ declare function rejectSpan(rejected: RejectedSpan[] | undefined, lane: Rejected
|
|
|
4662
4694
|
anchor?: StepAnchor;
|
|
4663
4695
|
}, note?: string): RejectedSpan;
|
|
4664
4696
|
|
|
4665
|
-
export { ASPECT_RATIOS, AUDIO_PLAN_STEP, type AnchorKind, type Anim, type AnimKind, type AnimSide, type AnimStep, type AppliedTemplate, type ApplyTemplateOptions, type AspectRatioOption, type AudioClip, type AudioPlanPoint, type AudioPlanTrack, BACKGROUND_Z, BASE_FRAME_STYLE, type Backdrop, type BackgroundMedia, type BakedText3dAsset, type BakedText3dMaterial, type BrowserBarStyle, type BuildDigestInput, CAMERA_CENTRE_RAMP, CAMERA_COVER_MIN, CAMERA_FAR, CAMERA_NEAR, CAM_CHAIN_GAP, CAM_EASE, CAM_PAN, CAM_PAN_EASE, CAM_RAMP_IN, CAM_RAMP_OUT, CAM_SIZE_MAX, CAM_SIZE_MIN, CAM_SPAN_MIN, CAPTURE_COVERAGE_MIN, CARD_EDGE_OVERDRAW, CARD_ENTER_KINDS, CARD_EXIT_KINDS, CARD_FADE_SECONDS, CARD_FOV, CARD_Z, CHANNEL_SPECS_HASH, CHANNEL_SPECS_VERIFIED, CLICK_FX_INTENSITY, CLICK_FX_PRE, CLICK_HIGHLIGHT_FADE, CLICK_PAIR_MAX, CLICK_PULSE_DUR, CLICK_RECT_MAX_FRAC, CLICK_RIPPLE_DUR, CLICK_SYNTH_RELEASE, CROP_MAX_PX, CROP_MIN_FRAC, CROP_MIN_PX, CROP_PAD, CURSOR_IDLE_EPS_FRAC, CURSOR_IDLE_FADE_IN, CURSOR_IDLE_FADE_OUT, CURSOR_IDLE_HOLD, type CamBubbleRect, type CamPoseSpan, type CamStyle, type CameraModel, type CaptureNormalization, type CardLayout, type ClickFxStyle, type CopiedLayout, type CopyLayoutOptions, type CopyStyleOptions, type CursorEvent, type CursorFadeKey, type CursorIdleOptions, type CursorStyle, type CursorTrack, DARK_GROUND, DEFAULT_BROWSER_BAR, DEFAULT_CAM_POSE, DEFAULT_CAM_STYLE, DEFAULT_CLICK_FX, DEFAULT_CURSOR_STYLE, DEFAULT_DUCK, DEFAULT_FRAME_STYLE, DEFAULT_SPEED_PARAMS, DEFAULT_TILT_POSE, DEFAULT_ZOOM_LEVEL, DEFAULT_ZOOM_STYLE, DESIGN_FRAME_WIDTH, DESTINATIONS, DIGEST_CROP_MAX, DIGEST_FULL_MAX, DIGEST_VERSION, DOC_SCHEMA_VERSION, DRAG_FIT_LEVEL, DRAG_MIN_S, DRAG_MIN_TRAVEL_FRAC, type Destination, type Digest, type DigestImageRef, type DigestPlan, type DigestTakeFacts, type DocSegment, type Drag, type DuckOptions, END_CARD_FROM, END_CARD_RECEDE, END_CARD_SECONDS, ENTRANCE_SECONDS, EXPORT_RESOLUTION_OPTIONS, EXPORT_SHORT_EDGE, type EndCard, type EnvelopePoint, type ExportResolution, type ExtractClickOptions, FOLLOW_RECENTER, FOLLOW_SAFE_RATIO, FRAME_BORDER_COLOR_DEFAULT, FRAME_BORDER_DEFAULT, FRAME_BORDER_WIDTH_DEFAULT, FREEZE_DEFAULT_SECONDS, FREEZE_SECONDS_MAX, FREEZE_SECONDS_MIN, type FocusBounds, type FollowEvent, type FollowOptions, type FrameEntrance, type FrameGeometry, type FrameStyle, type FreezeExtent, type FreezeSpan, HOUSE_GRADIENT, HTML_LAYER_FOREIGN_FIELDS, HTML_LAYER_MAX_BYTES, HTML_LAYER_SVG_CODE, HTML_LAYER_WARN_BYTES, HTML_STARTERS, type HtmlLayerFace, type HtmlLayerInlineFace, type HtmlLayerPayload, type HtmlLayerProblem, type HtmlLayerProblemCode, type HtmlLayerSource, type HtmlOverlayClip, type HtmlOverlayFont, type HtmlStarter, IDLE_KINDS, type IdleKind, type IngestOptions, LAYER_CARD_SHADOW, LAYOUT_FRAME_FIELDS, LOOK_KINDS, type LayerCard, type LayoutParts, type Look, type LookBrand, type LookKind, type LookPlacement, type LowerProgramOptions, type LoweredAudioClip, type LoweredClick, type LoweredComposition, type LoweredZoomSpan, MEDIA_ENTER_KINDS, MEDIA_EXIT_KINDS, MEDIA_FRAME_KEYS, MEDIA_KEY_PREFIX, MINIMAL_BAR_THEMES, MOTION_DELTA, MOTION_EASE, type Media, type MediaFrame, type MediaFrameKey, type MediaOverlayClip, type MediaSegment, type MicRms, type MinimalBarTheme, type Moment, type MomentKind, type MomentsOptions, type MotionKey, type MotionPose, type MotionPose3D, type MusicBedInput, type NormRect, OBJECT_DEFAULT_SCALE, OVERLAY_FONT_FACES, OVERLAY_LINE_HEIGHT, OVERLAY_MEDIA_DEFAULT_RADIUS, OVERLAY_MEDIA_DEFAULT_WIDTH, OVERLAY_MIN_DURATION, OVERLAY_SCALE_MAX, OVERLAY_SIZE_MAX, OVERLAY_SIZE_MIN, OVERLAY_TRANSITION_DUR, OVERLAY_Z, type ObjectAnimation, type ObjectAsset, type ObjectClip, type ObjectPrimitiveShape, type OverlayClip, type OverlayFontFace, type OverlayKind, type OverlayPin, type OverlayPresetStyle, type OverlayRect, type OverlayTransform, type OverlayTransition, PIN_GAP, PIN_MARGIN, PLATE_GROUND, PLAYBACK_ACTIVITY, PRIMARY_MEDIA, PROGRAM_RETIME, type PinMark, type PinPlacement, type PinPlacementInput, type PinReferent, type PinSide, type PinSideResolved, type PlanOptions, type PlanTiltOptions, type PlaneSize, type ProgramAnchorDoc, type ProgramTweenEdit, type ProjectDoc, type PxRect, REJECT_OVERLAP, REST_TILT_ID, type RecordingArtifact, type RecordingMeta, type Rect, type RejectedLane, type RejectedSpan, type ResolvedOverlayBox, type ResolvedOverlayStyle, SCENE_MOTION, SCENE_QUIET, SEGMENT_ENTER_KINDS, SEGMENT_EXIT_KINDS, SPEED_RATE_MAX, SPEED_RATE_MIN, SPEED_SPAN_MIN, STAGE_CLIP_PREFIX, STILL_DEFAULT, STUDIO_ENTRY_ID, STYLE_FIELDS, type SegmentExtent, type SmoothOptions, type SmoothPoint, type SpeedParams, type SpeedSpan, type StepAnchor, type StepSpan, type StudioAudioPlan, type StudioDoc, type StudioEntry, type StyleField, TEXT3D_DEPTH_DEFAULT, TEXT3D_DEPTH_MAX, TEXT3D_DEPTH_MIN, TEXT_ENTER_KINDS, TEXT_EXIT_KINDS, TEXT_PRESETS, TILT_AUTO_DEAD_ZONE, TILT_AUTO_MIN, TILT_CHAIN_GAP, TILT_DEG_MAX, TILT_EASE, TILT_INTENSITY_MAX, TILT_PAN, TILT_PAN_EASE, TILT_RAMP_IN, TILT_RAMP_OUT, TILT_SPAN_MIN, TILT_UI_DEG_MAX, TRANSITION_SECONDS, TRANSITION_SECONDS_MAX, TRANSITION_SECONDS_MIN, TRANSITION_SPEED_MULT, type TemplateAnchor, type Text3dMaterial, type TextFxDirection, type TextFxKind, type TextFxSpec, type TextFxUnit, type TextOverlayBox, type TextOverlayClip, type TextOverlayPreset, type TextOverlayStroke, type TiltPersonality, type TiltSpan, type TiltStyleName, type TranscriptSegment, type Transition, type TransitionKind, type TransitionMove, type TransitionOut, type TransitionSpeed, WINDOW_FOCUS_MIN, ZOOM_CHAIN_GAP, ZOOM_EASE, ZOOM_LEVELS, ZOOM_LEVEL_MAX, ZOOM_LEVEL_MIN, ZOOM_PAN, ZOOM_PAN_EASE, ZOOM_RAMP_IN, ZOOM_RAMP_IN_OVERLAP, ZOOM_RAMP_OUT, ZOOM_SPAN_MIN, ZOOM_STYLES, ZOOM_STYLE_OPTIONS, type ZoomSpan, type ZoomStyleName, type ZoomStyleParams, type ZoomView, type ZoomWindow, anchorKindOf, anchorSourceDuration, animStep, applyLook, applyTemplate, aspectRatioValue, audioLane, backdropMedia, buildDigest, camBubbleRect, camBubbleRectAt, camLane, camMoveLane, camRectFromPose, camRestPose, camTrackFromDoc, cameraCentring, cameraModel, cardEnter, cardExit, cardFields, cardInset, cardPointToScreen, cardPoseTrack, clampCamFrac, clampCamSize, clampFocus, clampFreezeSeconds, clampSpeedRate, clampTiltDeg, clampZoomLevel, clipEnvelope, clipLength, clipsFrom, computeCardLayout, computeMicRms, computePeaks, copyLayout, copyStyle, cropBox, cssFamilies, cssWeights, cursorIdleFade, deriveViewportCrop, destinationById, destinationsForChannel, docCardLayout, docFreezes, docMediaList, docOutputDuration, docRestTime, docStillTime, docToCropSpace, docToFullSpace, docTransitions, docZoomTrack, dragsFromTrack, dropTemplate, duckCurve, effectiveSegments, endCardClips, enterKey, enterOf, entranceSeconds, envelopeAt, envelopeValueAt, exitKey, exitOf, exitSeconds, expandEndCard, expectedFrameSize, exportSizeFor, extractClicks, findStep, focusBounds, focusForViewportCentre, followFocusEvents, frameGeometry, freezeLane, freezeOutputExtents, hexToRgbTriplet, houseLook, htmlLayerBleed, htmlLayerBleedFor, htmlLayerFaces, htmlLayerKey, htmlLayerLabel, htmlLayerPayload, htmlLayerPictureBox, htmlLayerProblems, htmlLayerSvg, htmlLayerText, htmlLayerUnhostedFamilies, htmlLayerWidth, htmlStarterClip, idleGaps, idleKey, isKeyedOverlay, isLookKind, isMusicBed, isPlayback, isProgramDoc, isRecordingDoc, isRejected, isStageClip, isUnitStep, lastLayerEnd, layerMedia, layoutOf, levelForFocusFraction, lookFromBrand, lookKindForGround, lowerProgramDoc, lowerStudioDoc, lowerToComposition, mediaAtOutput, mediaDuration, mediaFrame, mediaKey, mediaRef, mediaRefId, mediaSource, micLane, migrateHostedDoc, migrateMotion, momentsFromDoc, motionTrack, musicBedClip, nextMediaId, normalizeCaptureSpace, objectMotionBase, objectMotionPoseAt, objectsLane, outputDurationOf, outputEnd, outputRangeToSource, overlapFraction, overlayFaceFor, overlayFontFaces, overlayFontString, overlayFxSpec, overlayHit, overlayLines, overlayMotionBase, overlayMotionPoseAt, overlayPinPoseAt, overlayRect, overlaysLane, ownFreezes, pageDisplayUrl, parsePoseId, pickStyle, pinBox, pinPlacement, pinRectOnScreen, pinReferent, placeFreezes, planAutoSpeed, planAutoTilt, planAutoZoom, planForDigest, planeSizeAtDepth, platformBarKind, programDuration, projectFromArtifact, ratedSegments, recommendedExportResolution, refillAudioBeds, rejectSpan, removeSourceRange, removeSpeedInRange, resolveExportSize, resolveOverlayBox, resolveOverlayStyle, resolvePins, resolveText3dAsset, resolveZoomStyle, restLeanOf, restSpansThroughTransitions, sameMedia, sceneChanges, scrollRuns, segmentOutputExtents, outputLen as segmentOutputLen, segmentStarts, setSpeedInRange, slideSide, smoothCursor, spanOutputExtent, speedLane, studioAudioPlan, studioEntry, studioLayerData, tiltLane, tiltTrackFromDoc, transitionMult, transitionSeconds, videoLane, voiceKey, wellFormedXml, withBackdrop, withFreezes, withHolds, withoutRejected, wrapProgramLength, zoomCoversRect, zoomLane, zoomSpanForRange, zoomTrackFromDoc, zoomView, zoomViewport, zoomWindow };
|
|
4697
|
+
export { ASPECT_RATIOS, AUDIO_PLAN_STEP, type AnchorKind, type Anim, type AnimKind, type AnimSide, type AnimStep, type AppliedTemplate, type ApplyTemplateOptions, type AspectRatioOption, type AudioClip, type AudioPlanPoint, type AudioPlanTrack, BACKGROUND_Z, BASE_FRAME_STYLE, type Backdrop, type BackgroundMedia, type BakedText3dAsset, type BakedText3dMaterial, type BrowserBarStyle, type BuildDigestInput, CAMERA_CENTRE_RAMP, CAMERA_COVER_MIN, CAMERA_FAR, CAMERA_NEAR, CAM_CHAIN_GAP, CAM_EASE, CAM_PAN, CAM_PAN_EASE, CAM_RAMP_IN, CAM_RAMP_OUT, CAM_SIZE_MAX, CAM_SIZE_MIN, CAM_SPAN_MIN, CAPTURE_COVERAGE_MIN, CARD_EDGE_OVERDRAW, CARD_ENTER_KINDS, CARD_EXIT_KINDS, CARD_FADE_SECONDS, CARD_FOV, CARD_Z, CHANNEL_SPECS_HASH, CHANNEL_SPECS_VERIFIED, CLICK_FX_INTENSITY, CLICK_FX_PRE, CLICK_HIGHLIGHT_FADE, CLICK_PAIR_MAX, CLICK_PULSE_DUR, CLICK_RECT_MAX_FRAC, CLICK_RIPPLE_DUR, CLICK_SYNTH_RELEASE, CROP_MAX_PX, CROP_MIN_FRAC, CROP_MIN_PX, CROP_PAD, CURSOR_IDLE_EPS_FRAC, CURSOR_IDLE_FADE_IN, CURSOR_IDLE_FADE_OUT, CURSOR_IDLE_HOLD, type CamBubbleRect, type CamPoseSpan, type CamStyle, type CameraModel, type CaptureNormalization, type CardLayout, type ClickFxStyle, type CopiedLayout, type CopyLayoutOptions, type CopyStyleOptions, type CursorEvent, type CursorFadeKey, type CursorIdleOptions, type CursorStyle, type CursorTrack, DARK_GROUND, DEFAULT_BROWSER_BAR, DEFAULT_CAM_POSE, DEFAULT_CAM_STYLE, DEFAULT_CLICK_FX, DEFAULT_CURSOR_STYLE, DEFAULT_DUCK, DEFAULT_FRAME_STYLE, DEFAULT_SPEED_PARAMS, DEFAULT_TILT_POSE, DEFAULT_ZOOM_LEVEL, DEFAULT_ZOOM_STYLE, DESIGN_FRAME_WIDTH, DESTINATIONS, DIGEST_CROP_MAX, DIGEST_FULL_MAX, DIGEST_VERSION, DOC_SCHEMA_VERSION, DRAG_FIT_LEVEL, DRAG_MIN_S, DRAG_MIN_TRAVEL_FRAC, type Destination, type Digest, type DigestImageRef, type DigestPlan, type DigestTakeFacts, type DocSegment, type Drag, type DuckOptions, END_CARD_FROM, END_CARD_RECEDE, END_CARD_SECONDS, ENTRANCE_SECONDS, EXPORT_RESOLUTION_OPTIONS, EXPORT_SHORT_EDGE, type EndCard, type EnvelopePoint, type ExportResolution, type ExtractClickOptions, FOLLOW_RECENTER, FOLLOW_SAFE_RATIO, FRAME_BORDER_COLOR_DEFAULT, FRAME_BORDER_DEFAULT, FRAME_BORDER_WIDTH_DEFAULT, FREEZE_DEFAULT_SECONDS, FREEZE_SECONDS_MAX, FREEZE_SECONDS_MIN, type FocusBounds, type FollowEvent, type FollowOptions, type FrameEntrance, type FrameGeometry, type FrameStyle, type FreezeExtent, type FreezeSpan, HOUSE_GRADIENT, HTML_LAYER_FOREIGN_FIELDS, HTML_LAYER_MAX_BYTES, HTML_LAYER_SVG_CODE, HTML_LAYER_WARN_BYTES, HTML_STARTERS, type HtmlLayerFace, type HtmlLayerInlineFace, type HtmlLayerPayload, type HtmlLayerProblem, type HtmlLayerProblemCode, type HtmlLayerSource, type HtmlOverlayClip, type HtmlOverlayFont, type HtmlStarter, IDLE_KINDS, type IdleKind, type IngestOptions, LAYER_CARD_SHADOW, LAYOUT_FRAME_FIELDS, LOOK_KINDS, type LayerCard, type LayoutParts, type Look, type LookBrand, type LookKind, type LookPlacement, type LowerProgramOptions, type LoweredAudioClip, type LoweredClick, type LoweredComposition, type LoweredZoomSpan, MEDIA_ENTER_KINDS, MEDIA_EXIT_KINDS, MEDIA_FRAME_KEYS, MEDIA_KEY_PREFIX, MINIMAL_BAR_THEMES, MOTION_DELTA, MOTION_EASE, type Media, type MediaFrame, type MediaFrameKey, type MediaOverlayClip, type MediaSegment, type MicRms, type MinimalBarTheme, type Moment, type MomentKind, type MomentsOptions, type MotionKey, type MotionPose, type MotionPose3D, type MusicBedInput, type NormRect, OBJECT_DEFAULT_SCALE, OVERLAY_FONT_FACES, OVERLAY_LINE_HEIGHT, OVERLAY_MEDIA_DEFAULT_RADIUS, OVERLAY_MEDIA_DEFAULT_WIDTH, OVERLAY_MIN_DURATION, OVERLAY_SCALE_MAX, OVERLAY_SIZE_MAX, OVERLAY_SIZE_MIN, OVERLAY_TRANSITION_DUR, OVERLAY_Z, type ObjectAnimation, type ObjectAsset, type ObjectClip, type ObjectPrimitiveShape, type OverlayClip, type OverlayFontFace, type OverlayKind, type OverlayPin, type OverlayPresetStyle, type OverlayRect, type OverlayTransform, type OverlayTransition, PIN_GAP, PIN_MARGIN, PLATE_GROUND, PLAYBACK_ACTIVITY, PRIMARY_MEDIA, PROGRAM_RETIME, type PinCarry, type PinMark, type PinPlacement, type PinPlacementInput, type PinReferent, type PinSide, type PinSideResolved, type PlanOptions, type PlanTiltOptions, type PlaneSize, type ProgramAnchorDoc, type ProgramTweenEdit, type ProjectDoc, type PxRect, REJECT_OVERLAP, REST_TILT_ID, type RecordingArtifact, type RecordingMeta, type Rect, type RejectedLane, type RejectedSpan, type ResolvedOverlayBox, type ResolvedOverlayStyle, SCENE_MOTION, SCENE_QUIET, SEGMENT_ENTER_KINDS, SEGMENT_EXIT_KINDS, SPEED_RATE_MAX, SPEED_RATE_MIN, SPEED_SPAN_MIN, STAGE_CLIP_PREFIX, STILL_DEFAULT, STUDIO_ENTRY_ID, STYLE_FIELDS, type SegmentExtent, type SmoothOptions, type SmoothPoint, type SpeedParams, type SpeedSpan, type StepAnchor, type StepSpan, type StudioAudioPlan, type StudioDoc, type StudioEntry, type StyleField, TEXT3D_DEPTH_DEFAULT, TEXT3D_DEPTH_MAX, TEXT3D_DEPTH_MIN, TEXT_ENTER_KINDS, TEXT_EXIT_KINDS, TEXT_PRESETS, TILT_AUTO_DEAD_ZONE, TILT_AUTO_MIN, TILT_CHAIN_GAP, TILT_DEG_MAX, TILT_EASE, TILT_INTENSITY_MAX, TILT_PAN, TILT_PAN_EASE, TILT_RAMP_IN, TILT_RAMP_OUT, TILT_SPAN_MIN, TILT_UI_DEG_MAX, TRANSITION_SECONDS, TRANSITION_SECONDS_MAX, TRANSITION_SECONDS_MIN, TRANSITION_SPEED_MULT, type TemplateAnchor, type Text3dMaterial, type TextFxDirection, type TextFxKind, type TextFxSpec, type TextFxUnit, type TextOverlayBox, type TextOverlayClip, type TextOverlayPreset, type TextOverlayStroke, type TiltPersonality, type TiltSpan, type TiltStyleName, type TranscriptSegment, type Transition, type TransitionKind, type TransitionMove, type TransitionOut, type TransitionSpeed, WINDOW_FOCUS_MIN, ZOOM_CHAIN_GAP, ZOOM_EASE, ZOOM_LEVELS, ZOOM_LEVEL_MAX, ZOOM_LEVEL_MIN, ZOOM_PAN, ZOOM_PAN_EASE, ZOOM_RAMP_IN, ZOOM_RAMP_IN_OVERLAP, ZOOM_RAMP_OUT, ZOOM_SPAN_MIN, ZOOM_STYLES, ZOOM_STYLE_OPTIONS, type ZoomSpan, type ZoomStyleName, type ZoomStyleParams, type ZoomView, type ZoomWindow, anchorKindOf, anchorSourceDuration, animStep, applyLook, applyTemplate, aspectRatioValue, audioLane, backdropMedia, buildDigest, camBubbleRect, camBubbleRectAt, camLane, camMoveLane, camRectFromPose, camRestPose, camTrackFromDoc, cameraCentring, cameraModel, cardEnter, cardExit, cardFields, cardInset, cardPointToScreen, cardPoseTrack, clampCamFrac, clampCamSize, clampFocus, clampFreezeSeconds, clampSpeedRate, clampTiltDeg, clampZoomLevel, clipEnvelope, clipLength, clipsFrom, computeCardLayout, computeMicRms, computePeaks, copyLayout, copyStyle, cropBox, cssFamilies, cssWeights, cursorIdleFade, deriveViewportCrop, destinationById, destinationsForChannel, docCardLayout, docFreezes, docMediaList, docOutputDuration, docRestTime, docStillTime, docToCropSpace, docToFullSpace, docTransitions, docZoomTrack, dragsFromTrack, dropTemplate, duckCurve, effectiveSegments, endCardClips, enterKey, enterOf, entranceSeconds, envelopeAt, envelopeValueAt, exitKey, exitOf, exitSeconds, expandEndCard, expectedFrameSize, exportSizeFor, extractClicks, findStep, focusBounds, focusForViewportCentre, followFocusEvents, frameGeometry, freezeLane, freezeOutputExtents, hexToRgbTriplet, houseLook, htmlLayerBleed, htmlLayerBleedFor, htmlLayerFaces, htmlLayerKey, htmlLayerLabel, htmlLayerPayload, htmlLayerPictureBox, htmlLayerProblems, htmlLayerSvg, htmlLayerText, htmlLayerUnhostedFamilies, htmlLayerWidth, htmlStarterClip, idleGaps, idleKey, isKeyedOverlay, isLookKind, isMusicBed, isPlayback, isProgramDoc, isRecordingDoc, isRejected, isStageClip, isUnitStep, lastLayerEnd, layerMedia, layoutOf, levelForFocusFraction, lookFromBrand, lookKindForGround, lowerProgramDoc, lowerStudioDoc, lowerToComposition, mediaAtOutput, mediaDuration, mediaFrame, mediaKey, mediaRef, mediaRefId, mediaSource, micLane, migrateHostedDoc, migrateMotion, momentsFromDoc, motionTrack, musicBedClip, nextMediaId, normalizeCaptureSpace, objectMotionBase, objectMotionPoseAt, objectsLane, outputDurationOf, outputEnd, outputRangeToSource, overlapFraction, overlayFaceFor, overlayFontFaces, overlayFontString, overlayFxSpec, overlayHit, overlayLines, overlayMotionBase, overlayMotionPoseAt, overlayPinPoseAt, overlayRect, overlaysLane, ownFreezes, pageDisplayUrl, parsePoseId, pickStyle, pinBox, pinPlacement, pinRectOnScreen, pinReferent, pinReferentAt, placeFreezes, planAutoSpeed, planAutoTilt, planAutoZoom, planForDigest, planeSizeAtDepth, platformBarKind, programDuration, projectFromArtifact, ratedSegments, recommendedExportResolution, refillAudioBeds, rejectSpan, removeSourceRange, removeSpeedInRange, resolveExportSize, resolveOverlayBox, resolveOverlayStyle, resolvePins, resolveText3dAsset, resolveZoomStyle, restLeanOf, restSpansThroughTransitions, sameMedia, sceneChanges, scrollRuns, segmentOutputExtents, outputLen as segmentOutputLen, segmentStarts, setSpeedInRange, slideSide, smoothCursor, spanOutputExtent, speedLane, studioAudioPlan, studioEntry, studioLayerData, tiltLane, tiltTrackFromDoc, transitionMult, transitionSeconds, videoLane, voiceKey, wellFormedXml, withBackdrop, withFreezes, withHolds, withoutRejected, wrapProgramLength, zoomCoversRect, zoomLane, zoomSpanForRange, zoomTrackFromDoc, zoomView, zoomViewport, zoomWindow };
|
package/dist/index.js
CHANGED
|
@@ -3058,7 +3058,7 @@ function round2(v) {
|
|
|
3058
3058
|
}
|
|
3059
3059
|
|
|
3060
3060
|
// src/lower/pin.ts
|
|
3061
|
-
import { lerpArray, sample } from "@vosjs/timeline";
|
|
3061
|
+
import { lerpArray, mapTime, sample } from "@vosjs/timeline";
|
|
3062
3062
|
var PIN_GAP = 24;
|
|
3063
3063
|
var PIN_MARGIN = 24;
|
|
3064
3064
|
var PIN_SAMPLE_HZ = 30;
|
|
@@ -3077,19 +3077,27 @@ function pinReferent(doc, pin) {
|
|
|
3077
3077
|
if (pin.step !== void 0) {
|
|
3078
3078
|
const step = findStep(meta.steps ?? [], pin.step);
|
|
3079
3079
|
if (!step || step.skipped) return null;
|
|
3080
|
+
const carry = dragCarry(doc, step.tStart - 0.05, step.tEnd + 0.05);
|
|
3080
3081
|
if (step.rect && validRect(step.rect) && w > 0 && h > 0) {
|
|
3081
3082
|
return {
|
|
3082
3083
|
rect: normRect(step.rect, w, h),
|
|
3083
3084
|
by: "step",
|
|
3084
3085
|
step,
|
|
3085
|
-
at: step.tStart
|
|
3086
|
+
at: step.tStart,
|
|
3087
|
+
...carry ? { carry } : {}
|
|
3086
3088
|
};
|
|
3087
3089
|
}
|
|
3088
3090
|
const union = unionRects(
|
|
3089
3091
|
pressRects(doc, step.tStart - 0.05, step.tEnd + 0.05)
|
|
3090
3092
|
);
|
|
3091
3093
|
if (!union || w <= 0 || h <= 0) return null;
|
|
3092
|
-
return {
|
|
3094
|
+
return {
|
|
3095
|
+
rect: normRect(union, w, h),
|
|
3096
|
+
by: "step",
|
|
3097
|
+
step,
|
|
3098
|
+
at: step.tStart,
|
|
3099
|
+
...carry ? { carry } : {}
|
|
3100
|
+
};
|
|
3093
3101
|
}
|
|
3094
3102
|
if (pin.press !== void 0 && Number.isFinite(pin.press)) {
|
|
3095
3103
|
let best = null;
|
|
@@ -3101,10 +3109,42 @@ function pinReferent(doc, pin) {
|
|
|
3101
3109
|
if (!best || d < Math.abs(best.t - pin.press)) best = { t, rect: e.rect };
|
|
3102
3110
|
}
|
|
3103
3111
|
if (!best || w <= 0 || h <= 0) return null;
|
|
3104
|
-
|
|
3112
|
+
const carry = dragCarry(doc, best.t - 0.01, best.t + 0.01);
|
|
3113
|
+
return {
|
|
3114
|
+
rect: normRect(best.rect, w, h),
|
|
3115
|
+
by: "press",
|
|
3116
|
+
at: best.t,
|
|
3117
|
+
...carry ? { carry } : {}
|
|
3118
|
+
};
|
|
3105
3119
|
}
|
|
3106
3120
|
return null;
|
|
3107
3121
|
}
|
|
3122
|
+
function dragCarry(doc, from, to) {
|
|
3123
|
+
const meta = doc.source.meta;
|
|
3124
|
+
if (!(meta.width > 0) || !(meta.height > 0)) return null;
|
|
3125
|
+
const d = dragsFromTrack(doc.source.cursor, meta.width, meta.height).find(
|
|
3126
|
+
(g) => g.t0 >= from && g.t0 <= to
|
|
3127
|
+
);
|
|
3128
|
+
if (!d) return null;
|
|
3129
|
+
return { t0: d.t0, t1: d.t1, x0: d.nx, y0: d.ny };
|
|
3130
|
+
}
|
|
3131
|
+
function cursorAt(cursor, t, space) {
|
|
3132
|
+
let prev = null;
|
|
3133
|
+
for (const e of cursor) {
|
|
3134
|
+
if (e.type !== "move" && e.type !== "down" && e.type !== "up") continue;
|
|
3135
|
+
const cur = { t: e.t / 1e3, nx: e.x / space.w, ny: e.y / space.h };
|
|
3136
|
+
if (cur.t >= t) {
|
|
3137
|
+
if (!prev) return { nx: cur.nx, ny: cur.ny };
|
|
3138
|
+
const k = cur.t > prev.t ? (t - prev.t) / (cur.t - prev.t) : 1;
|
|
3139
|
+
return {
|
|
3140
|
+
nx: prev.nx + (cur.nx - prev.nx) * k,
|
|
3141
|
+
ny: prev.ny + (cur.ny - prev.ny) * k
|
|
3142
|
+
};
|
|
3143
|
+
}
|
|
3144
|
+
prev = cur;
|
|
3145
|
+
}
|
|
3146
|
+
return prev ? { nx: prev.nx, ny: prev.ny } : null;
|
|
3147
|
+
}
|
|
3108
3148
|
function findStep(steps, ref) {
|
|
3109
3149
|
const byId = steps.find((s) => s.id !== void 0 && s.id === ref);
|
|
3110
3150
|
if (byId) return byId;
|
|
@@ -3188,6 +3228,20 @@ function pinRectOnScreen(rect, t, layout, camera, zoomTrack) {
|
|
|
3188
3228
|
const b = map(rect.x + rect.w, rect.y + rect.h);
|
|
3189
3229
|
return { x: a.x, y: a.y, w: b.x - a.x, h: b.y - a.y };
|
|
3190
3230
|
}
|
|
3231
|
+
function pinReferentAt(referent, t, input) {
|
|
3232
|
+
const { carry, cursor, space, rated } = input;
|
|
3233
|
+
if (!carry || !cursor || !space || !rated) return referent;
|
|
3234
|
+
const s = mapTime(rated, t);
|
|
3235
|
+
const sc = Math.max(carry.t0, Math.min(carry.t1, s));
|
|
3236
|
+
const p = cursorAt(cursor, sc, space);
|
|
3237
|
+
if (!p) return referent;
|
|
3238
|
+
return {
|
|
3239
|
+
x: referent.x + (p.nx - carry.x0),
|
|
3240
|
+
y: referent.y + (p.ny - carry.y0),
|
|
3241
|
+
w: referent.w,
|
|
3242
|
+
h: referent.h
|
|
3243
|
+
};
|
|
3244
|
+
}
|
|
3191
3245
|
function pinPlacement(input) {
|
|
3192
3246
|
const { clip, referent, layout, camera, zoomTrack, base, motion } = input;
|
|
3193
3247
|
const dur = Math.max(1e-3, clip.duration);
|
|
@@ -3195,7 +3249,13 @@ function pinPlacement(input) {
|
|
|
3195
3249
|
const box = pinBox(clip, layout);
|
|
3196
3250
|
const W = layout.W;
|
|
3197
3251
|
const H = layout.H;
|
|
3198
|
-
const refAt = (local) => pinRectOnScreen(
|
|
3252
|
+
const refAt = (local) => pinRectOnScreen(
|
|
3253
|
+
pinReferentAt(referent, clip.start + local, input),
|
|
3254
|
+
clip.start + local,
|
|
3255
|
+
layout,
|
|
3256
|
+
camera,
|
|
3257
|
+
zoomTrack
|
|
3258
|
+
);
|
|
3199
3259
|
const centreFor = (r, side2) => {
|
|
3200
3260
|
switch (side2) {
|
|
3201
3261
|
case "right":
|
|
@@ -6670,6 +6730,15 @@ var ON_FRAME = `(ctx, content, dt) => {
|
|
|
6670
6730
|
if (pn.dur - pnT < 0.35) { var pnV = (pn.dur - pnT) / 0.35; pnA = Math.min(pnA, 1 - Math.pow(1 - pnV, 3)) }
|
|
6671
6731
|
if (pnA <= 0.004) continue
|
|
6672
6732
|
var pnX = dx + pn.x * dw, pnY = dy + pn.y * dh, pnW = pn.w * dw, pnH = pn.h * dh
|
|
6733
|
+
// a carried referent (a drag): moved by where the pointer has taken
|
|
6734
|
+
// it at the on-screen source moment, held at the release
|
|
6735
|
+
if (pn.carry) {
|
|
6736
|
+
var pcC = (actM ? actM.cursor : d.cursor) || []
|
|
6737
|
+
var pcT = Math.max(pn.carry.t0, Math.min(pn.carry.t1, srcT))
|
|
6738
|
+
var pcx = -1, pcy = -1
|
|
6739
|
+
for (var pk = 0; pk < pcC.length; pk++) { if (pcC[pk].t <= pcT) { pcx = pcC[pk].x; pcy = pcC[pk].y } }
|
|
6740
|
+
if (pcx >= 0) { pnX += (pcx / (space.w || vw) - pn.carry.x0) * dw; pnY += (pcy / (space.h || vh) - pn.carry.y0) * dh }
|
|
6741
|
+
}
|
|
6673
6742
|
var pnLw = 2 * s2 / ceZs, pnPad = 6 * s2 / ceZs
|
|
6674
6743
|
var pnCol = pn.color || 'rgba(255,255,255,0.95)'
|
|
6675
6744
|
c.save()
|
|
@@ -6839,6 +6908,15 @@ var ON_FRAME = `(ctx, content, dt) => {
|
|
|
6839
6908
|
// the referent's corners in frame space under the live camera
|
|
6840
6909
|
var pqAx = dx + pq.x * dw, pqAy = dy + pq.y * dh
|
|
6841
6910
|
var pqBx = dx + (pq.x + pq.w) * dw, pqBy = dy + (pq.y + pq.h) * dh
|
|
6911
|
+
if (pq.carry) {
|
|
6912
|
+
var pqcT = Math.max(pq.carry.t0, Math.min(pq.carry.t1, srcT))
|
|
6913
|
+
var pqcx = -1, pqcy = -1
|
|
6914
|
+
for (var pqk = 0; pqk < cur.length; pqk++) { if (cur[pqk].t <= pqcT) { pqcx = cur[pqk].x; pqcy = cur[pqk].y } }
|
|
6915
|
+
if (pqcx >= 0) {
|
|
6916
|
+
var pqOx = (pqcx / (space.w || vw) - pq.carry.x0) * dw, pqOy = (pqcy / (space.h || vh) - pq.carry.y0) * dh
|
|
6917
|
+
pqAx += pqOx; pqBx += pqOx; pqAy += pqOy; pqBy += pqOy
|
|
6918
|
+
}
|
|
6919
|
+
}
|
|
6842
6920
|
if (lvl > 1.001 && !d.zoomSuppressed) {
|
|
6843
6921
|
if (camStage) {
|
|
6844
6922
|
pqAx = W / 2 + (pqAx - wcx) * lvl; pqAy = H / 2 + (pqAy - wcy) * lvl
|
|
@@ -7423,6 +7501,8 @@ function docZoomTrack(input) {
|
|
|
7423
7501
|
}
|
|
7424
7502
|
function resolvePins(doc, layout, camera, zoomTrack) {
|
|
7425
7503
|
const out = /* @__PURE__ */ new Map();
|
|
7504
|
+
const rated = ratedSegments(doc);
|
|
7505
|
+
const space = { w: doc.source.meta.width, h: doc.source.meta.height };
|
|
7426
7506
|
for (const o of doc.overlays ?? []) {
|
|
7427
7507
|
if (!o.pin) continue;
|
|
7428
7508
|
const ref = pinReferent(doc, o.pin);
|
|
@@ -7442,7 +7522,11 @@ function resolvePins(doc, layout, camera, zoomTrack) {
|
|
|
7442
7522
|
camera,
|
|
7443
7523
|
zoomTrack,
|
|
7444
7524
|
base,
|
|
7445
|
-
motion
|
|
7525
|
+
motion,
|
|
7526
|
+
carry: ref.carry ?? null,
|
|
7527
|
+
cursor: doc.source.cursor,
|
|
7528
|
+
space,
|
|
7529
|
+
rated
|
|
7446
7530
|
})
|
|
7447
7531
|
);
|
|
7448
7532
|
}
|
|
@@ -7484,6 +7568,16 @@ function pinsDataOf(doc, pins) {
|
|
|
7484
7568
|
mark,
|
|
7485
7569
|
leader: !!p.leader,
|
|
7486
7570
|
...p.color ? { color: p.color } : {},
|
|
7571
|
+
// A carried referent (a drag): ON_FRAME moves the mark and the
|
|
7572
|
+
// leader's end with the pointer through [t0, t1], source seconds.
|
|
7573
|
+
...ref.carry ? {
|
|
7574
|
+
carry: {
|
|
7575
|
+
t0: round7(ref.carry.t0),
|
|
7576
|
+
t1: round7(ref.carry.t1),
|
|
7577
|
+
x0: round43(ref.carry.x0),
|
|
7578
|
+
y0: round43(ref.carry.y0)
|
|
7579
|
+
}
|
|
7580
|
+
} : {},
|
|
7487
7581
|
enter: enterKey(o),
|
|
7488
7582
|
tip: placed.tip
|
|
7489
7583
|
});
|
|
@@ -8439,12 +8533,12 @@ function round10(v) {
|
|
|
8439
8533
|
}
|
|
8440
8534
|
|
|
8441
8535
|
// src/timeline/rangeActions.ts
|
|
8442
|
-
import { mapTime } from "@vosjs/timeline";
|
|
8536
|
+
import { mapTime as mapTime2 } from "@vosjs/timeline";
|
|
8443
8537
|
function outputRangeToSource(doc, t0, t1) {
|
|
8444
8538
|
const rated = ratedSegments(doc);
|
|
8445
8539
|
return {
|
|
8446
|
-
srcIn:
|
|
8447
|
-
srcOut:
|
|
8540
|
+
srcIn: mapTime2(rated, Math.max(0, t0)),
|
|
8541
|
+
srcOut: mapTime2(rated, Math.max(0, t1))
|
|
8448
8542
|
};
|
|
8449
8543
|
}
|
|
8450
8544
|
var EPS = 1e-6;
|
|
@@ -9209,7 +9303,7 @@ function applyLook(frame, look, size, video, placement) {
|
|
|
9209
9303
|
|
|
9210
9304
|
// src/timeline/lanes.ts
|
|
9211
9305
|
import {
|
|
9212
|
-
mapTime as
|
|
9306
|
+
mapTime as mapTime3,
|
|
9213
9307
|
removeSegment,
|
|
9214
9308
|
segmentRate as segmentRate3,
|
|
9215
9309
|
sourceToTimeline as sourceToTimeline2,
|
|
@@ -9277,7 +9371,7 @@ var videoLane = {
|
|
|
9277
9371
|
index === 0 || !contiguous(segments, index)
|
|
9278
9372
|
);
|
|
9279
9373
|
const anchorOut = sourceToTimeline2(fullMap, Math.min(edgeSrc, sourceDuration)) ?? edgeSrc;
|
|
9280
|
-
const sourceT =
|
|
9374
|
+
const sourceT = mapTime3(fullMap, anchorOut + (g.t - edgeOutNow));
|
|
9281
9375
|
const next = trimSegment(
|
|
9282
9376
|
segments,
|
|
9283
9377
|
index,
|
|
@@ -9313,7 +9407,7 @@ var videoLane = {
|
|
|
9313
9407
|
return null;
|
|
9314
9408
|
}
|
|
9315
9409
|
const sourceT = round12(
|
|
9316
|
-
|
|
9410
|
+
mapTime3(segmentPieces(s, speeds, freezes, leading), local)
|
|
9317
9411
|
);
|
|
9318
9412
|
if (sourceT - s.in < 0.05 || s.out - sourceT < 0.05) return null;
|
|
9319
9413
|
const next = [
|
|
@@ -9403,7 +9497,7 @@ var freezeLane = {
|
|
|
9403
9497
|
if (g.t >= m.t - 1e-9 && g.t <= m.t + m.duration + 1e-9) return null;
|
|
9404
9498
|
}
|
|
9405
9499
|
if (g.t > totalDuration7(rated) + 1e-9) return null;
|
|
9406
|
-
const srcT = round12(
|
|
9500
|
+
const srcT = round12(mapTime3(rated, Math.max(0, g.t)));
|
|
9407
9501
|
if (!kept(srcT) || !clear(srcT)) return null;
|
|
9408
9502
|
const id = nextFreezeId(doc);
|
|
9409
9503
|
const mediaHere = mediaAtOutput(rated, Math.max(0, g.t));
|
|
@@ -9446,7 +9540,7 @@ var freezeLane = {
|
|
|
9446
9540
|
const mine = marks.get(f.id);
|
|
9447
9541
|
const endOut = mine ? mine.t + mine.duration : null;
|
|
9448
9542
|
const srcT = round12(
|
|
9449
|
-
Math.min(sourceDuration,
|
|
9543
|
+
Math.min(sourceDuration, mapTime3(base, Math.max(0, g.t)))
|
|
9450
9544
|
);
|
|
9451
9545
|
if (!kept(srcT) || !clear(srcT, f.id)) return null;
|
|
9452
9546
|
return (d) => {
|
|
@@ -9517,7 +9611,7 @@ var zoomLane = {
|
|
|
9517
9611
|
const rated = ratedSegments(doc);
|
|
9518
9612
|
const sourceDuration = anchorSourceDuration(doc);
|
|
9519
9613
|
if (g.type === "create") {
|
|
9520
|
-
const srcT =
|
|
9614
|
+
const srcT = mapTime3(rated, Math.max(0, g.t));
|
|
9521
9615
|
const mediaHere = mediaAtOutput(rated, Math.max(0, g.t));
|
|
9522
9616
|
const here = spans.filter((z) => (z.media ?? "") === mediaHere);
|
|
9523
9617
|
const mediaLen = mediaDuration(mediaSource(doc, mediaHere) ?? doc.source);
|
|
@@ -9551,7 +9645,7 @@ var zoomLane = {
|
|
|
9551
9645
|
const len = sp.out - sp.in;
|
|
9552
9646
|
let newIn = clampToKept(
|
|
9553
9647
|
effectiveSegments(doc),
|
|
9554
|
-
|
|
9648
|
+
mapTime3(rated, Math.max(0, g.t)),
|
|
9555
9649
|
len
|
|
9556
9650
|
);
|
|
9557
9651
|
for (const o of others) {
|
|
@@ -9581,7 +9675,7 @@ var zoomLane = {
|
|
|
9581
9675
|
sourceDuration,
|
|
9582
9676
|
...others.filter((o) => o.in >= sp.out).map((o) => o.in)
|
|
9583
9677
|
);
|
|
9584
|
-
const sourceT =
|
|
9678
|
+
const sourceT = mapTime3(rated, Math.max(0, g.t));
|
|
9585
9679
|
const minSrc = Math.min(
|
|
9586
9680
|
ZOOM_SPAN_MIN * rateAt(rated, sp.in),
|
|
9587
9681
|
sp.out - sp.in
|
|
@@ -9646,7 +9740,7 @@ var tiltLane = {
|
|
|
9646
9740
|
const rated = ratedSegments(doc);
|
|
9647
9741
|
const sourceDuration = anchorSourceDuration(doc);
|
|
9648
9742
|
if (g.type === "create") {
|
|
9649
|
-
const srcT =
|
|
9743
|
+
const srcT = mapTime3(rated, Math.max(0, g.t));
|
|
9650
9744
|
const mediaHere = mediaAtOutput(rated, Math.max(0, g.t));
|
|
9651
9745
|
const here = spans.filter((z) => (z.media ?? "") === mediaHere);
|
|
9652
9746
|
const mediaLen = mediaDuration(mediaSource(doc, mediaHere) ?? doc.source);
|
|
@@ -9678,7 +9772,7 @@ var tiltLane = {
|
|
|
9678
9772
|
const len = sp.out - sp.in;
|
|
9679
9773
|
let newIn = clampToKept(
|
|
9680
9774
|
effectiveSegments(doc),
|
|
9681
|
-
|
|
9775
|
+
mapTime3(rated, Math.max(0, g.t)),
|
|
9682
9776
|
len
|
|
9683
9777
|
);
|
|
9684
9778
|
for (const o of others) {
|
|
@@ -9708,7 +9802,7 @@ var tiltLane = {
|
|
|
9708
9802
|
sourceDuration,
|
|
9709
9803
|
...others.filter((o) => o.in >= sp.out).map((o) => o.in)
|
|
9710
9804
|
);
|
|
9711
|
-
const sourceT =
|
|
9805
|
+
const sourceT = mapTime3(rated, Math.max(0, g.t));
|
|
9712
9806
|
const minSrc = Math.min(
|
|
9713
9807
|
TILT_SPAN_MIN * rateAt(rated, sp.in),
|
|
9714
9808
|
sp.out - sp.in
|
|
@@ -9764,7 +9858,7 @@ var camMoveLane = {
|
|
|
9764
9858
|
const sourceDuration = anchorSourceDuration(doc);
|
|
9765
9859
|
if (g.type === "create") {
|
|
9766
9860
|
if (!doc.source.camKey) return null;
|
|
9767
|
-
const srcT =
|
|
9861
|
+
const srcT = mapTime3(rated, Math.max(0, g.t));
|
|
9768
9862
|
if (spans.some((z) => srcT >= z.in && srcT < z.out)) return null;
|
|
9769
9863
|
const next = spans.filter((z) => z.in > srcT).sort((a, b) => a.in - b.in).at(0);
|
|
9770
9864
|
const limit = Math.min(sourceDuration, next ? next.in : sourceDuration);
|
|
@@ -9791,7 +9885,7 @@ var camMoveLane = {
|
|
|
9791
9885
|
const len = sp.out - sp.in;
|
|
9792
9886
|
let newIn = clampToKept(
|
|
9793
9887
|
effectiveSegments(doc),
|
|
9794
|
-
|
|
9888
|
+
mapTime3(rated, Math.max(0, g.t)),
|
|
9795
9889
|
len
|
|
9796
9890
|
);
|
|
9797
9891
|
for (const o of others) {
|
|
@@ -9821,7 +9915,7 @@ var camMoveLane = {
|
|
|
9821
9915
|
sourceDuration,
|
|
9822
9916
|
...others.filter((o) => o.in >= sp.out).map((o) => o.in)
|
|
9823
9917
|
);
|
|
9824
|
-
const sourceT =
|
|
9918
|
+
const sourceT = mapTime3(rated, Math.max(0, g.t));
|
|
9825
9919
|
const minSrc = Math.min(
|
|
9826
9920
|
CAM_SPAN_MIN * rateAt(rated, sp.in),
|
|
9827
9921
|
sp.out - sp.in
|
|
@@ -9895,7 +9989,7 @@ var camLane = {
|
|
|
9895
9989
|
if (!seg) return null;
|
|
9896
9990
|
const clipSrcStart = Math.max(seg.in, Math.max(current.in, first.in));
|
|
9897
9991
|
const span = Math.max(0.05, current.out - current.in);
|
|
9898
|
-
const delta =
|
|
9992
|
+
const delta = mapTime3(rated, Math.max(0, g.t)) - clipSrcStart;
|
|
9899
9993
|
const base = Math.max(first.in, current.in);
|
|
9900
9994
|
const newIn = Math.min(
|
|
9901
9995
|
Math.max(first.in, base + delta),
|
|
@@ -9911,7 +10005,7 @@ var camLane = {
|
|
|
9911
10005
|
})).filter((x) => x.len > 1e-6);
|
|
9912
10006
|
const edgeIdx = g.edge === "start" ? overlapping.at(0)?.i : overlapping.at(-1)?.i;
|
|
9913
10007
|
if (edgeIdx === void 0 || g.id !== `cam-${edgeIdx}`) return null;
|
|
9914
|
-
const sourceT = Math.min(Math.max(
|
|
10008
|
+
const sourceT = Math.min(Math.max(mapTime3(rated, g.t), 0), sourceDuration);
|
|
9915
10009
|
const next = g.edge === "start" ? { in: Math.min(sourceT, current.out - 0.05), out: current.out } : { in: current.in, out: Math.max(sourceT, current.in + 0.05) };
|
|
9916
10010
|
return (d) => {
|
|
9917
10011
|
d.cam.window = {
|
|
@@ -10005,7 +10099,7 @@ var speedLane = {
|
|
|
10005
10099
|
const rated = ratedSegments(doc);
|
|
10006
10100
|
const sourceDuration = anchorSourceDuration(doc);
|
|
10007
10101
|
if (g.type === "create") {
|
|
10008
|
-
const srcT =
|
|
10102
|
+
const srcT = mapTime3(rated, Math.max(0, g.t));
|
|
10009
10103
|
if (spans.some((s) => srcT >= s.in && srcT < s.out)) return null;
|
|
10010
10104
|
const next = spans.filter((s) => s.in > srcT).sort((a, b) => a.in - b.in).at(0);
|
|
10011
10105
|
const limit = Math.min(sourceDuration, next ? next.in : sourceDuration);
|
|
@@ -10035,7 +10129,7 @@ var speedLane = {
|
|
|
10035
10129
|
const len = sp.out - sp.in;
|
|
10036
10130
|
let newIn = clampToKept(
|
|
10037
10131
|
effectiveSegments(doc),
|
|
10038
|
-
|
|
10132
|
+
mapTime3(base, Math.max(0, g.t)),
|
|
10039
10133
|
len
|
|
10040
10134
|
);
|
|
10041
10135
|
for (const o of others) {
|
|
@@ -10064,7 +10158,7 @@ var speedLane = {
|
|
|
10064
10158
|
const minSrc = Math.min(SPEED_SPAN_MIN * sp.rate, sp.out - sp.in);
|
|
10065
10159
|
let next;
|
|
10066
10160
|
if (g.edge === "start") {
|
|
10067
|
-
const sourceT =
|
|
10161
|
+
const sourceT = mapTime3(base, Math.max(0, g.t));
|
|
10068
10162
|
next = {
|
|
10069
10163
|
in: Math.min(Math.max(lo, sourceT), sp.out - minSrc),
|
|
10070
10164
|
out: sp.out
|
|
@@ -10432,7 +10526,7 @@ function computePeaks(channels, buckets) {
|
|
|
10432
10526
|
}
|
|
10433
10527
|
|
|
10434
10528
|
// src/lower/duckCurve.ts
|
|
10435
|
-
import { mapTime as
|
|
10529
|
+
import { mapTime as mapTime4 } from "@vosjs/timeline";
|
|
10436
10530
|
var DEFAULT_DUCK = {
|
|
10437
10531
|
threshold: 0.02,
|
|
10438
10532
|
duckTo: 0.25,
|
|
@@ -10468,7 +10562,7 @@ function duckCurve(rms, segments, durationSec2, opts = DEFAULT_DUCK) {
|
|
|
10468
10562
|
const steps = Math.ceil(durationSec2 * opts.gridHz);
|
|
10469
10563
|
for (let i = 0; i <= steps; i++) {
|
|
10470
10564
|
const t = Math.min(durationSec2, i * dt);
|
|
10471
|
-
const srcT =
|
|
10565
|
+
const srcT = mapTime4(segments, t);
|
|
10472
10566
|
const w = Math.min(
|
|
10473
10567
|
rms.values.length - 1,
|
|
10474
10568
|
Math.max(0, Math.floor(srcT * rms.rate))
|
|
@@ -10855,6 +10949,7 @@ export {
|
|
|
10855
10949
|
pinPlacement,
|
|
10856
10950
|
pinRectOnScreen,
|
|
10857
10951
|
pinReferent,
|
|
10952
|
+
pinReferentAt,
|
|
10858
10953
|
placeFreezes,
|
|
10859
10954
|
planAutoSpeed,
|
|
10860
10955
|
planAutoTilt,
|