@pixerate/flair 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +44 -8
  3. package/dist/catalog/index.d.ts +5 -4
  4. package/dist/catalog/index.js +12 -4
  5. package/dist/{chunk-3FAUZOGL.js → chunk-FIJOMGPG.js} +2 -2
  6. package/dist/{chunk-JWZCPMFG.js → chunk-GL37YCCM.js} +134 -680
  7. package/dist/chunk-GL37YCCM.js.map +1 -0
  8. package/dist/{chunk-UQQNZSYL.js → chunk-GTIAOYOK.js} +211 -7
  9. package/dist/chunk-GTIAOYOK.js.map +1 -0
  10. package/dist/{chunk-MWVTQFV5.js → chunk-IWKM5FJK.js} +410 -59
  11. package/dist/chunk-IWKM5FJK.js.map +1 -0
  12. package/dist/{chunk-HKXOHRCD.js → chunk-VA74HBPK.js} +2 -2
  13. package/dist/chunk-WAMA45G3.js +998 -0
  14. package/dist/chunk-WAMA45G3.js.map +1 -0
  15. package/dist/{chunk-J55UBNAT.js → chunk-WC3VADZC.js} +42 -36
  16. package/dist/chunk-WC3VADZC.js.map +1 -0
  17. package/dist/cli.js +12 -11
  18. package/dist/cli.js.map +1 -1
  19. package/dist/{controls-DdXMbovi.d.ts → controls-Syr6drzO.d.ts} +4 -3
  20. package/dist/editor/index.d.ts +12 -8
  21. package/dist/editor/index.js +26 -16
  22. package/dist/editor/index.js.map +1 -1
  23. package/dist/{export-FEBPEEO7.js → export-DH2HMACO.js} +4 -3
  24. package/dist/index.d.ts +193 -17
  25. package/dist/index.js +69 -33
  26. package/dist/index.js.map +1 -1
  27. package/dist/node.d.ts +1 -1
  28. package/dist/node.js +2 -2
  29. package/dist/recorder-KEX3U35D.js +10 -0
  30. package/dist/{renderer-Oyynz-fs.d.ts → renderer-DtnFkpkf.d.ts} +7 -3
  31. package/dist/types-CsFUZZIv.d.ts +102 -0
  32. package/package.json +1 -1
  33. package/dist/chunk-36DTNSHU.js +0 -160
  34. package/dist/chunk-36DTNSHU.js.map +0 -1
  35. package/dist/chunk-J55UBNAT.js.map +0 -1
  36. package/dist/chunk-JWZCPMFG.js.map +0 -1
  37. package/dist/chunk-MWVTQFV5.js.map +0 -1
  38. package/dist/chunk-UQQNZSYL.js.map +0 -1
  39. package/dist/recorder-WJTWMEQN.js +0 -10
  40. package/dist/types-CkKkavvB.d.ts +0 -71
  41. /package/dist/{chunk-3FAUZOGL.js.map → chunk-FIJOMGPG.js.map} +0 -0
  42. /package/dist/{chunk-HKXOHRCD.js.map → chunk-VA74HBPK.js.map} +0 -0
  43. /package/dist/{export-FEBPEEO7.js.map → export-DH2HMACO.js.map} +0 -0
  44. /package/dist/{recorder-WJTWMEQN.js.map → recorder-KEX3U35D.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { C as ControlValue, a as ControlDef } from './controls-DdXMbovi.js';
2
- export { c as ControlCheck, b as ControlType, T as TextureSettings, d as checkControlValue, e as coerceControlValue, f as componentCount, g as controlValue, h as describeValue, i as hexToRgb, j as humanise, k as imageUrls, l as isImageUrl, p as parseControls, r as rgbToHex } from './controls-DdXMbovi.js';
3
- export { B as BUILTIN_UNIFORMS, C as CompileError, b as CompileResult, a as CompileStatus, c as CompiledShader, F as FrameState, I as ImageLoadError, R as RendererStats, S as SVG_EDGE, d as ShaderCompileError, e as ShaderRenderer, T as TextureCache, f as TextureSource, V as VERTEX_SOURCE, g as applyTextureSettings, h as compileShader, i as createContext, j as drawFrame, k as formatCompileError, l as isSvgUrl, m as loadImage, p as parseCompileLog, n as preloadImages, r as releaseImages, o as resetGlCaches, s as sizeSvg, w as wrapSource } from './renderer-Oyynz-fs.js';
1
+ import { C as ControlValue, a as ControlDef } from './controls-Syr6drzO.js';
2
+ export { c as ControlCheck, b as ControlType, T as TextureSettings, d as checkControlValue, e as coerceControlValue, f as componentCount, g as controlValue, h as describeValue, i as hexToRgb, j as humanise, k as imageUrls, l as isImageUrl, p as parseControls, r as rgbToHex } from './controls-Syr6drzO.js';
3
+ export { B as BUILTIN_UNIFORMS, C as CompileError, b as CompileResult, a as CompileStatus, c as CompiledShader, F as FrameState, I as ImageLoadError, R as RendererStats, S as SVG_EDGE, d as ShaderCompileError, e as ShaderRenderer, T as TextureCache, f as TextureSource, V as VERTEX_SOURCE, g as applyTextureSettings, h as compileShader, i as createContext, j as drawFrame, k as formatCompileError, l as isSvgUrl, m as loadImage, p as parseCompileLog, n as preloadImages, r as releaseImages, o as resetGlCaches, s as sizeSvg, w as wrapSource } from './renderer-DtnFkpkf.js';
4
4
  import { C as Clock } from './clock-BhdXWH-n.js';
5
5
  export { M as ManualClock, j as jitter, p as pageHidden, r as realClock } from './clock-BhdXWH-n.js';
6
6
  export { D as DataKey, E as EASES, a as EaseName, b as STEP_MS, c as SVG_PICTURE, d as SvgAnimation, e as SvgBox, f as SvgElementFrame, S as SvgMotion, g as defaultDataKey, l as lerpAttr, h as lerpData, s as stepData, i as stepProgress, j as stepStart, k as svgFrame, m as svgMotionIssues, n as svgOpeningTag } from './motion-D0TVv2CF.js';
@@ -649,11 +649,42 @@ interface Stage {
649
649
  }
650
650
  declare const DEFAULT_STAGE: Stage;
651
651
  declare const CAMERA_MS = 600;
652
- /** Camera view into the scene: drawn at (point + scroll) × zoom. */
653
- interface View {
652
+ /**
653
+ * How the camera is turned in 3D, in degrees: the board is drawn flat (see
654
+ * {@link View}), then turned round the middle of the stage and seen in
655
+ * perspective. Each is optional and 0 (flat) by default.
656
+ */
657
+ interface CameraAngle {
658
+ /** Tips the board back round its horizontal axis (CSS `rotateX`): positive leans the top away, like a desk seen from above. −75 to 75. */
659
+ tilt?: number;
660
+ /** Swings the board round its vertical axis (CSS `rotateY`): positive brings the left side nearer. −75 to 75. */
661
+ turn?: number;
662
+ /** Rolls the board round the line of sight (CSS `rotateZ`), clockwise. −180 to 180. */
663
+ roll?: number;
664
+ /** How far the lens sits from the board, as a multiple of the stage width (default {@link DEFAULT_PERSPECTIVE}); smaller is more dramatic. */
665
+ perspective?: number;
666
+ }
667
+ /** The camera's default distance from the board, as a multiple of the stage width. */
668
+ declare const DEFAULT_PERSPECTIVE = 1.2;
669
+ /** The largest tilt or turn, in degrees: past this the board is seen edge-on. */
670
+ declare const MAX_TILT = 75;
671
+ /**
672
+ * Camera view into the scene: drawn at (point + scroll) × zoom, then turned
673
+ * by its {@link CameraAngle} (see {@link cameraTransform}) and blurred by
674
+ * `blur` while the camera moves.
675
+ */
676
+ interface View extends CameraAngle {
654
677
  zoom: number;
655
678
  scrollX: number;
656
679
  scrollY: number;
680
+ /** Motion blur in stage pixels, set while the camera moves (see `ShotCamera.motionBlur`); 0 or absent when still. */
681
+ blur?: number;
682
+ /**
683
+ * The direction the picture streaks in, in degrees on screen (0 is
684
+ * horizontal, 90 vertical), when the move is mostly a pan; absent when it
685
+ * blurs every way (a zoom or a turn).
686
+ */
687
+ blurAngle?: number;
657
688
  }
658
689
  declare const boardHeight: (stage: Stage) => number;
659
690
  /** View with `(cx, cy)` in the middle of the board at `zoom`. */
@@ -675,11 +706,56 @@ interface FramingOptions {
675
706
  * while preserving the stage aspect ratio and applying optional margin padding.
676
707
  */
677
708
  declare function calculateFramingRect(elements: readonly SceneElement[], stage: Stage, options?: FramingOptions): Rect;
709
+ /** Whether a view is turned in 3D at all. */
710
+ declare function isAngled(view: CameraAngle): boolean;
711
+ /** The view's angle with each part clamped to its range (see {@link CameraAngle}); flat parts are left out. */
712
+ declare function cameraAngle(view: CameraAngle): CameraAngle;
678
713
  /**
679
714
  * The view part-way (`t` from 0 to 1) from one view to another.
680
- * Centre moves linearly and zoom scales exponentially for smooth motion.
715
+ * Centre moves linearly and zoom scales exponentially for smooth motion;
716
+ * angles and perspective move linearly.
681
717
  */
682
718
  declare function between(from: View, to: View, t: number, stage: Stage): View;
719
+ /**
720
+ * The CSS `transform` that turns a board layer (a box the stage's size,
721
+ * with `transform-origin` in its middle) to the view's angle, or "none" when
722
+ * the view is flat. Zoom and scroll are not in it: draw them inside the
723
+ * layer, as for a flat view. `width` is the layer's width on screen in CSS
724
+ * pixels (default: the stage width).
725
+ */
726
+ declare function cameraTransform(view: View, stage: Stage, width?: number): string;
727
+ /**
728
+ * The view's motion blur as standard deviations along the board layer's own
729
+ * x and y axes, in CSS pixels at a layer `width` wide: for an SVG
730
+ * `<feGaussianBlur stdDeviation="x y">`, so a pan streaks along its
731
+ * direction (CSS `blur()` can only blur every way). The layer is turned
732
+ * after it is blurred, so the direction is taken back through its roll.
733
+ * [0, 0] when still.
734
+ */
735
+ declare function cameraBlur(view: View, stage: Stage, width?: number): [number, number];
736
+ /** The CSS `filter` for the view's motion blur at a layer `width` CSS pixels wide (the same every way; see {@link cameraBlur} for a streak), or "none". */
737
+ declare function cameraFilter(view: View, stage: Stage, width?: number): string;
738
+ /**
739
+ * Where a scene point lands on screen, in stage pixels from the top left of
740
+ * the board: drawn by the view's zoom and scroll, then turned and seen in
741
+ * perspective as {@link cameraTransform} does. Null when the point is
742
+ * behind the camera.
743
+ */
744
+ declare function projectPoint(view: View, stage: Stage, [x, y]: readonly [number, number]): [number, number] | null;
745
+ /**
746
+ * Motion blur for one step of a camera move, in stage pixels: how far the
747
+ * picture moves on screen between two views (centre, zoom and angle), times
748
+ * `strength` (`ShotCamera.motionBlur`), capped at 40.
749
+ */
750
+ declare function motionBlur(from: View, to: View, stage: Stage, strength: number): number;
751
+ /**
752
+ * The direction a step of a camera move streaks in, in degrees on screen
753
+ * (0 to 180, 0 horizontal), when most of it is a pan; undefined when it is
754
+ * mostly zooming or turning, which blurs every way.
755
+ */
756
+ declare function motionBlurAngle(from: View, to: View, stage: Stage): number | undefined;
757
+ /** The blur fields of a step of a camera move with this strength: `{ blur, blurAngle }`, or nothing when still. */
758
+ declare function moveBlur(from: View, to: View, stage: Stage, strength: number): Pick<View, 'blur' | 'blurAngle'>;
683
759
  /** The part of the scene the camera currently shows. */
684
760
  declare function visibleRect(view: View, stage: Stage): Rect;
685
761
  /** Smooth cubic ease in / ease out. */
@@ -952,14 +1028,32 @@ interface DynamicFraming {
952
1028
  /** Minimum height in scene units. */
953
1029
  minHeight?: number;
954
1030
  }
955
- type ShotCamera = Rect | DynamicFraming;
1031
+ /**
1032
+ * A shot's camera beyond its framing: its 3D angle (see `CameraAngle`) and
1033
+ * how much it blurs while moving into the shot. A part left out keeps the
1034
+ * value the camera already has, so set `tilt: 0` to come back flat.
1035
+ */
1036
+ interface CameraLens extends CameraAngle {
1037
+ /**
1038
+ * Motion blur while the camera moves into this shot: 0 (the default) for
1039
+ * none, 1 for natural, up to 3 for a whip. The blur follows the move's
1040
+ * speed, so it peaks mid-move and is gone when the camera settles.
1041
+ */
1042
+ motionBlur?: number;
1043
+ }
1044
+ /**
1045
+ * Where the camera goes for a shot: a framing box, a dynamic framing, or
1046
+ * neither (only a new angle or blur, keeping the framing), with any
1047
+ * {@link CameraLens} fields alongside: `{ "frame": ["chart"], "tilt": 30 }`.
1048
+ */
1049
+ type ShotCamera = (Rect | DynamicFraming | Record<never, never>) & CameraLens;
956
1050
  /** One beat of a scene: camera framing, title, narration/caption, commands, and procedural effects. */
957
1051
  interface Shot {
958
1052
  /** Narration / caption spoken or displayed during this beat. */
959
1053
  caption?: string;
960
1054
  /** High-level title or callout displayed on screen. */
961
1055
  title?: string;
962
- /** Camera framing box in scene units, or dynamic auto-framing target. */
1056
+ /** Camera framing box in scene units or dynamic auto-framing target, with an optional 3D angle and motion blur. */
963
1057
  camera?: ShotCamera;
964
1058
  /** Pause/dwell duration after this shot's actions run (in milliseconds). Default: 800ms. */
965
1059
  hold?: number;
@@ -987,6 +1081,53 @@ interface Scene {
987
1081
  shots: Shot[];
988
1082
  }
989
1083
 
1084
+ /** The camera through one shot, timed as `playScene` plays it: a move from `from` to `to`, then a hold. */
1085
+ interface CameraShot {
1086
+ shot: Shot;
1087
+ index: number;
1088
+ /** When the shot starts on the scene's timeline, in ms. */
1089
+ startMs: number;
1090
+ /** How long the camera moves at the start of the shot (0 when it cuts or stays). */
1091
+ moveMs: number;
1092
+ /** How long the shot holds after the move. */
1093
+ holdMs: number;
1094
+ from: View;
1095
+ to: View;
1096
+ /** The shot's `camera.motionBlur` (0 for none). */
1097
+ motionBlur: number;
1098
+ /** The elements on stage once the shot's commands have run. */
1099
+ elements: SceneElement[];
1100
+ }
1101
+ /** The scene's stage with defaults filled in. */
1102
+ declare function sceneStage(scene: Scene): Stage;
1103
+ /**
1104
+ * The camera through every shot of a scene, worked out the way `playScene`
1105
+ * moves it, for exporters and players that lay a scene out on a timeline:
1106
+ * each shot's move (framing, angle and blur strength) and hold.
1107
+ */
1108
+ declare function cameraTrack(scene: Scene): CameraShot[];
1109
+ /** The time the player waits between steps of a camera move, in ms (its blur is measured over one). */
1110
+ declare const CAMERA_STEP_MS: number;
1111
+ /**
1112
+ * The camera `ms` into a shot: part-way through its move (eased, with its
1113
+ * motion blur) or settled.
1114
+ */
1115
+ declare function cameraAt(entry: CameraShot, ms: number, stage: Stage): View;
1116
+ /** The camera at one frame of a scene's timeline. */
1117
+ interface CameraSample {
1118
+ frame: number;
1119
+ view: View;
1120
+ /** The shot (0-based) the frame is in. */
1121
+ shot: number;
1122
+ }
1123
+ /**
1124
+ * The camera sampled for a timeline at `frameRate`: every `every` frames
1125
+ * during each move (so an editor's straight-line interpolation follows the
1126
+ * eased path and perspective), and once where each move settles. Views
1127
+ * include the move's motion blur.
1128
+ */
1129
+ declare function cameraSamples(scene: Scene, frameRate: number, every?: number): CameraSample[];
1130
+
990
1131
  interface ShotCheck {
991
1132
  /** Elements this shot drew or changed that the camera frame leaves out ("outside") or cuts ("cut"). */
992
1133
  framing: {
@@ -1016,7 +1157,17 @@ declare const NO_CHECK: ShotCheck;
1016
1157
  declare const SMALL_TEXT_PX = 24;
1017
1158
  declare function titleBox(title: string, stage: Stage): Rect;
1018
1159
  declare function touchedIds(shot: Shot): string[];
1019
- /** Evaluates the elements on stage against the current camera view and shot settings. */
1160
+ /**
1161
+ * Where a scene box lands on screen (stage pixels from the board's top
1162
+ * left), turned and in perspective as the view draws it: the bounds of its
1163
+ * four corners. Null when part of it is behind the camera.
1164
+ */
1165
+ declare function screenBox(box: Rect, view: View, stage: Stage): Rect | null;
1166
+ /**
1167
+ * Evaluates the elements on stage against the current camera view and shot
1168
+ * settings. Framing, edges, text size and the title are judged on screen,
1169
+ * where the view (its angle included) puts each element.
1170
+ */
1020
1171
  declare function checkShot(shot: Shot, elements: readonly SceneElement[], view: View, stage: Stage, title?: string): ShotCheck;
1021
1172
 
1022
1173
  interface SceneIssue {
@@ -1076,6 +1227,14 @@ declare class MemorySceneBoard implements SceneBoard {
1076
1227
  setCaption(text: string): void;
1077
1228
  setEffects(effects: readonly RunningEffect[]): void;
1078
1229
  }
1230
+ /**
1231
+ * The view a shot's camera moves to: its framing (a box, or the elements it
1232
+ * frames, from the board or the shot's own commands) at its angle, zoomed
1233
+ * out when angled so the framed box still fits. Framing
1234
+ * or angle parts the camera leaves out keep `current`'s. Undefined when the
1235
+ * shot has no camera.
1236
+ */
1237
+ declare function shotView(shot: Shot, elements: readonly SceneElement[], stage: Stage, current: View): View | undefined;
1079
1238
  interface PlayOptions {
1080
1239
  check?: boolean;
1081
1240
  afterShot?: (log: ShotLog) => void | Promise<void>;
@@ -1103,8 +1262,9 @@ declare function simulateScene(scene: Scene, options?: {
1103
1262
 
1104
1263
  /**
1105
1264
  * Generates a self-contained, standalone HTML player for an animated scene.
1106
- * Includes interactive playback controls, camera panning/zooming, title and caption rendering,
1107
- * and embedded WebGL fragment shaders for bespoke motion graphics.
1265
+ * Includes interactive playback controls, camera moves (panning, zooming,
1266
+ * 3D angles and motion blur), title and caption rendering, and embedded
1267
+ * WebGL fragment shaders for bespoke motion graphics.
1108
1268
  */
1109
1269
  declare function standaloneSceneHtml(scene: Scene): string;
1110
1270
 
@@ -1277,7 +1437,9 @@ interface MotnExportOptions {
1277
1437
  frameRate?: number;
1278
1438
  }
1279
1439
  /**
1280
- * Serializes a Flair Scene into Apple Motion ozml 4.0 XML document format (.motn).
1440
+ * Serializes a Flair Scene into Apple Motion ozml 4.0 XML document format
1441
+ * (.motn). A scene with a camera puts its shots in a "Camera" group that
1442
+ * moves, zooms and turns as the camera does.
1281
1443
  */
1282
1444
  declare function exportMotn(scene: Scene, options?: MotnExportOptions): string;
1283
1445
 
@@ -1315,7 +1477,11 @@ interface LottieTransform {
1315
1477
  p: LottieAnimatable<[number, number, number], [number, number, number]>;
1316
1478
  a: LottieAnimatable<[number, number, number], [number, number, number]>;
1317
1479
  s: LottieAnimatable<[number, number, number], [number, number, number]>;
1318
- r: LottieAnimatable<number, [number]>;
1480
+ r?: LottieAnimatable<number, [number]>;
1481
+ or?: LottieAnimatable<[number, number, number]>;
1482
+ rx?: LottieAnimatable<number, [number]>;
1483
+ ry?: LottieAnimatable<number, [number]>;
1484
+ rz?: LottieAnimatable<number, [number]>;
1319
1485
  o: LottieAnimatable<number, [number]>;
1320
1486
  }
1321
1487
  interface LottieShapeItem {
@@ -1328,6 +1494,10 @@ interface LottieLayer {
1328
1494
  ind: number;
1329
1495
  ty: number;
1330
1496
  nm: string;
1497
+ /** Index of the parent layer: element layers hang off the camera rig. */
1498
+ parent?: number;
1499
+ /** Camera layers: perspective (the AE camera's zoom), in px. */
1500
+ pe?: LottieAnimatable<number, [number]>;
1331
1501
  sr: number;
1332
1502
  ks: LottieTransform;
1333
1503
  ao: 0 | 1;
@@ -1348,7 +1518,7 @@ interface LottieAnimation {
1348
1518
  w: number;
1349
1519
  h: number;
1350
1520
  nm: string;
1351
- ddd: 0;
1521
+ ddd: 0 | 1;
1352
1522
  assets: unknown[];
1353
1523
  layers: LottieLayer[];
1354
1524
  }
@@ -1366,7 +1536,9 @@ declare function createLottieEase(durationFrames: number, deltaVal: number, outE
1366
1536
  };
1367
1537
  };
1368
1538
  /**
1369
- * Serializes a Flair Scene into standard Lottie JSON animation.
1539
+ * Serializes a Flair Scene into standard Lottie JSON animation. A scene
1540
+ * with a camera gets a camera rig the element layers hang off, in 3D (with
1541
+ * an AE camera) when the camera is angled.
1370
1542
  */
1371
1543
  declare function exportLottie(scene: Scene, options?: LottieExportOptions): LottieAnimation;
1372
1544
 
@@ -1419,13 +1591,17 @@ declare function framesToTimecode(frame: number, timebase?: number, dropFrame?:
1419
1591
  declare function timecodeToFrames(timecode: string, timebase?: number, dropFrame?: boolean): number;
1420
1592
  /**
1421
1593
  * Serializes a Flair Scene into Apple Final Cut Pro 7 XML Interchange Format (xmeml v4).
1422
- * Compatible with Premiere Pro, DaVinci Resolve, and Final Cut Pro.
1594
+ * Compatible with Premiere Pro, DaVinci Resolve, and Final Cut Pro. Each
1595
+ * shot's camera (zoom, pan and 3D angle) is a keyframed Distort corner pin
1596
+ * on its clip, with Motion Blur when the shot's move blurs.
1423
1597
  */
1424
1598
  declare function exportFcp7Xml(scene: Scene, options?: Fcp7ExportOptions): string;
1425
1599
  /**
1426
1600
  * Serializes a Flair Scene into standard CMX 3600 Edit Decision List (EDL).
1601
+ * The format has no transforms, so each shot's camera is written as a
1602
+ * `* CAMERA:` comment.
1427
1603
  * Fully readable by DaVinci Resolve, Premiere Pro, Avid, and Lightworks.
1428
1604
  */
1429
1605
  declare function exportCmx3600Edl(scene: Scene, options?: EdlExportOptions): string;
1430
1606
 
1431
- export { ALL_BLEND_MODES, ALL_TRANSITION_TYPES, type AgentToolDefinition, type AscCdl, type BatchCommand, type BatchExecutionResult, type BatchExecutionStepResult, type Behavior, type BehaviorBase, type BlendMode, type BlockDissolveOptions, type BlurEffect, type BurstEffect, CAMERA_MS, COMMON_FRAME_RATES, type ClearCommand, Clock, type ColorRGB, type ColorRGBA, type ColorRgba, type ColorSpace, ControlDef, ControlValue, type CounterEffect, type CrossZoomOptions, type CustomCommand, DEFAULT_STAGE, type DeleteCommand, type DynamicFraming, EASY_EASE, EFFECT_FADE_MS, EFFECT_TYPES, type EasingCurve, type EdlExportOptions, type Effect, type EffectBase, type ElementCommand, FLAIR_AGENT_TOOLS, type Fcp7ExportOptions, type FlowEffect, type FramingOptions, type GifOptions, type GlassWipeOptions, type GlowEffect, type GradientEffect, type GridWipeOptions, type HighlightEffect, type KeyframeEase, type LiftGammaGain, type LightLeakOptions, type LinearWipeOptions, type LottieAnimatable, type LottieAnimation, type LottieExportOptions, type LottieKeyframe, type LottieLayer, type LottieShapeItem, type LottieTransform, type MediaEffect, MemorySceneBoard, type MotnExportOptions, NO_CHECK, type OscillateBehavior, type OvershootBehavior, type PathWaypoint, type PlayOptions, type PlayResult, type Point, type PopupWidget, type RadialIrisOptions, type RampBehavior, type RateBehavior, type RationalFrameRate, type Rect, type RenderOptions, type ReplicatorConfig, type ReplicatorPattern, type ReplicatorSequence, type Review, type ReviewOptions, type RigWidget, type RippleEffect, type RunningEffect, SMALL_TEXT_PX, type SMPTEFields, type Scene, type SceneBoard, type SceneCommand, type SceneElement, type SceneIssue, type SceneMedia, type SceneRig, type SceneToolResult, ShaderFrames, type ShaderFramesOptions, type ShimmerEffect, type Shot, type ShotCamera, type ShotCheck, type ShotLog, type ShotTiming, type SliderSnapshot, type SliderWidget, type SpatialMotionPath, type SpatialPathSample, type SpotlightEffect, type Stage, type StandaloneOptions, type StandardFrameRateKey, type ThrowBehavior, type ThumbnailHandle, ThumbnailPool, type ThumbnailPoolOptions, type TimerEffect, type ToggleWidget, type TransitionOptions, type TransitionSample, type TransitionType, type TwisterOptions, type UpdateCommand, type Vec2, type Vec3, type View, type WriggleBehavior, applyAscCdl, applyLiftGammaGain, applyRig, applySceneBatch, applySceneTool, applyVibrance, areaOf, between, bez1d, bez1dDerivative, blendRgba, blendTransitionPixel, boardHeight, boundsOf, calculateFramingRect, calculateShotTimings, centreOf, checkShot, convertColorSpace, createFrameRate, createLottieEase, createMotionPath, easeInOutCubic, easeProgress, effectGone, effectOpacity, evaluateBehavior, evaluateKeyframeSegment, expandReplicator, exportCmx3600Edl, exportFcp7Xml, exportLottie, exportMotn, formatTimecode, fractalWiggle, frame, framesToSMPTE, framesToTimecode, getColorGradingGLSL, getDropFrameCount, getGlslBlendFunction, getOklabGLSL, getTimecodeBase, getTransitionGLSL, getWhiteBalanceGains, hash64, holdTime, interpolateOklab, interpolateOklch, isDeleteCommand, isElementCommand, isUpdateCommand, linearRgbToSrgb, linearSrgbToOklab, linearToSrgb, loopTime, mixSeeds, noise1d, noise3d, oklabToLinearSrgb, oklabToOklch, oklabToSrgb, oklchToOklab, overlapArea, parseTimecode, pingPongTime, playScene, quinticFade, recordGif, registerThumbnail, reviewScene, sampleMotionPath, sampleMotionPathAtTime, sampleTransition, setRigWidget, sharedThumbnailPool, simulateScene, smpteToFrames, solveBezierU, speedRampTime, srgbToLinear, srgbToLinearRgb, srgbToOklab, standaloneHtml, standaloneSceneHtml, strobeTime, substituteVariables, supportsDropFrame, timecodeToFrames, titleBox, touchedIds, unitFloat, validateScene, viewAt, visibleRect };
1607
+ export { ALL_BLEND_MODES, ALL_TRANSITION_TYPES, type AgentToolDefinition, type AscCdl, type BatchCommand, type BatchExecutionResult, type BatchExecutionStepResult, type Behavior, type BehaviorBase, type BlendMode, type BlockDissolveOptions, type BlurEffect, type BurstEffect, CAMERA_MS, CAMERA_STEP_MS, COMMON_FRAME_RATES, type CameraAngle, type CameraLens, type CameraSample, type CameraShot, type ClearCommand, Clock, type ColorRGB, type ColorRGBA, type ColorRgba, type ColorSpace, ControlDef, ControlValue, type CounterEffect, type CrossZoomOptions, type CustomCommand, DEFAULT_PERSPECTIVE, DEFAULT_STAGE, type DeleteCommand, type DynamicFraming, EASY_EASE, EFFECT_FADE_MS, EFFECT_TYPES, type EasingCurve, type EdlExportOptions, type Effect, type EffectBase, type ElementCommand, FLAIR_AGENT_TOOLS, type Fcp7ExportOptions, type FlowEffect, type FramingOptions, type GifOptions, type GlassWipeOptions, type GlowEffect, type GradientEffect, type GridWipeOptions, type HighlightEffect, type KeyframeEase, type LiftGammaGain, type LightLeakOptions, type LinearWipeOptions, type LottieAnimatable, type LottieAnimation, type LottieExportOptions, type LottieKeyframe, type LottieLayer, type LottieShapeItem, type LottieTransform, MAX_TILT, type MediaEffect, MemorySceneBoard, type MotnExportOptions, NO_CHECK, type OscillateBehavior, type OvershootBehavior, type PathWaypoint, type PlayOptions, type PlayResult, type Point, type PopupWidget, type RadialIrisOptions, type RampBehavior, type RateBehavior, type RationalFrameRate, type Rect, type RenderOptions, type ReplicatorConfig, type ReplicatorPattern, type ReplicatorSequence, type Review, type ReviewOptions, type RigWidget, type RippleEffect, type RunningEffect, SMALL_TEXT_PX, type SMPTEFields, type Scene, type SceneBoard, type SceneCommand, type SceneElement, type SceneIssue, type SceneMedia, type SceneRig, type SceneToolResult, ShaderFrames, type ShaderFramesOptions, type ShimmerEffect, type Shot, type ShotCamera, type ShotCheck, type ShotLog, type ShotTiming, type SliderSnapshot, type SliderWidget, type SpatialMotionPath, type SpatialPathSample, type SpotlightEffect, type Stage, type StandaloneOptions, type StandardFrameRateKey, type ThrowBehavior, type ThumbnailHandle, ThumbnailPool, type ThumbnailPoolOptions, type TimerEffect, type ToggleWidget, type TransitionOptions, type TransitionSample, type TransitionType, type TwisterOptions, type UpdateCommand, type Vec2, type Vec3, type View, type WriggleBehavior, applyAscCdl, applyLiftGammaGain, applyRig, applySceneBatch, applySceneTool, applyVibrance, areaOf, between, bez1d, bez1dDerivative, blendRgba, blendTransitionPixel, boardHeight, boundsOf, calculateFramingRect, calculateShotTimings, cameraAngle, cameraAt, cameraBlur, cameraFilter, cameraSamples, cameraTrack, cameraTransform, centreOf, checkShot, convertColorSpace, createFrameRate, createLottieEase, createMotionPath, easeInOutCubic, easeProgress, effectGone, effectOpacity, evaluateBehavior, evaluateKeyframeSegment, expandReplicator, exportCmx3600Edl, exportFcp7Xml, exportLottie, exportMotn, formatTimecode, fractalWiggle, frame, framesToSMPTE, framesToTimecode, getColorGradingGLSL, getDropFrameCount, getGlslBlendFunction, getOklabGLSL, getTimecodeBase, getTransitionGLSL, getWhiteBalanceGains, hash64, holdTime, interpolateOklab, interpolateOklch, isAngled, isDeleteCommand, isElementCommand, isUpdateCommand, linearRgbToSrgb, linearSrgbToOklab, linearToSrgb, loopTime, mixSeeds, motionBlur, motionBlurAngle, moveBlur, noise1d, noise3d, oklabToLinearSrgb, oklabToOklch, oklabToSrgb, oklchToOklab, overlapArea, parseTimecode, pingPongTime, playScene, projectPoint, quinticFade, recordGif, registerThumbnail, reviewScene, sampleMotionPath, sampleMotionPathAtTime, sampleTransition, sceneStage, screenBox, setRigWidget, sharedThumbnailPool, shotView, simulateScene, smpteToFrames, solveBezierU, speedRampTime, srgbToLinear, srgbToLinearRgb, srgbToOklab, standaloneHtml, standaloneSceneHtml, strobeTime, substituteVariables, supportsDropFrame, timecodeToFrames, titleBox, touchedIds, unitFloat, validateScene, viewAt, visibleRect };
package/dist/index.js CHANGED
@@ -19,39 +19,18 @@ import {
19
19
  } from "./chunk-G5FNZDTA.js";
20
20
  import {
21
21
  ALL_BLEND_MODES,
22
- EFFECT_FADE_MS,
23
- EFFECT_TYPES,
24
- MemorySceneBoard,
25
- NO_CHECK,
26
- SMALL_TEXT_PX,
27
22
  ShaderFrames,
28
23
  ShaderRenderer,
29
24
  ThumbnailPool,
30
25
  blendRgba,
31
- checkShot,
32
- effectGone,
33
- effectOpacity,
34
- evaluateBehavior,
35
- fractalWiggle,
36
26
  getGlslBlendFunction,
37
- hash64,
38
- mixSeeds,
39
- noise1d,
40
- noise3d,
41
- playScene,
42
- quinticFade,
43
27
  recordGif,
44
28
  registerThumbnail,
45
- reviewScene,
46
29
  sharedThumbnailPool,
47
- simulateScene,
48
30
  standaloneHtml,
49
31
  standaloneSceneHtml,
50
- titleBox,
51
- touchedIds,
52
- unitFloat,
53
32
  validateScene
54
- } from "./chunk-JWZCPMFG.js";
33
+ } from "./chunk-GL37YCCM.js";
55
34
  import {
56
35
  BUILTIN_UNIFORMS,
57
36
  ImageLoadError,
@@ -91,19 +70,13 @@ import {
91
70
  srgbToLinearRgb,
92
71
  srgbToOklab,
93
72
  wrapSource
94
- } from "./chunk-HKXOHRCD.js";
73
+ } from "./chunk-VA74HBPK.js";
95
74
  import {
96
75
  ALL_TRANSITION_TYPES,
97
76
  blendTransitionPixel,
98
77
  getTransitionGLSL,
99
78
  sampleTransition
100
79
  } from "./chunk-EHDJ3CPJ.js";
101
- import {
102
- ManualClock,
103
- jitter,
104
- pageHidden,
105
- realClock
106
- } from "./chunk-WMZQCUFJ.js";
107
80
  import {
108
81
  calculateShotTimings,
109
82
  createLottieEase,
@@ -113,25 +86,70 @@ import {
113
86
  exportMotn,
114
87
  framesToTimecode,
115
88
  timecodeToFrames
116
- } from "./chunk-UQQNZSYL.js";
89
+ } from "./chunk-GTIAOYOK.js";
117
90
  import {
118
91
  CAMERA_MS,
92
+ CAMERA_STEP_MS,
93
+ DEFAULT_PERSPECTIVE,
119
94
  DEFAULT_STAGE,
95
+ EFFECT_FADE_MS,
96
+ EFFECT_TYPES,
97
+ MAX_TILT,
98
+ MemorySceneBoard,
99
+ NO_CHECK,
100
+ SMALL_TEXT_PX,
120
101
  areaOf,
121
102
  between,
122
103
  boardHeight,
123
104
  boundsOf,
124
105
  calculateFramingRect,
106
+ cameraAngle,
107
+ cameraAt,
108
+ cameraBlur,
109
+ cameraFilter,
110
+ cameraSamples,
111
+ cameraTrack,
112
+ cameraTransform,
125
113
  centreOf,
114
+ checkShot,
126
115
  easeInOutCubic,
116
+ effectGone,
117
+ effectOpacity,
118
+ evaluateBehavior,
119
+ fractalWiggle,
127
120
  frame,
121
+ hash64,
122
+ isAngled,
128
123
  isDeleteCommand,
129
124
  isElementCommand,
130
125
  isUpdateCommand,
126
+ mixSeeds,
127
+ motionBlur,
128
+ motionBlurAngle,
129
+ moveBlur,
130
+ noise1d,
131
+ noise3d,
131
132
  overlapArea,
133
+ playScene,
134
+ projectPoint,
135
+ quinticFade,
136
+ reviewScene,
137
+ sceneStage,
138
+ screenBox,
139
+ shotView,
140
+ simulateScene,
141
+ titleBox,
142
+ touchedIds,
143
+ unitFloat,
132
144
  viewAt,
133
145
  visibleRect
134
- } from "./chunk-36DTNSHU.js";
146
+ } from "./chunk-WAMA45G3.js";
147
+ import {
148
+ ManualClock,
149
+ jitter,
150
+ pageHidden,
151
+ realClock
152
+ } from "./chunk-WMZQCUFJ.js";
135
153
  import {
136
154
  checkControlValue,
137
155
  coerceControlValue,
@@ -144,7 +162,7 @@ import {
144
162
  isImageUrl,
145
163
  parseControls,
146
164
  rgbToHex
147
- } from "./chunk-J55UBNAT.js";
165
+ } from "./chunk-WC3VADZC.js";
148
166
 
149
167
  // src/time/retiming.ts
150
168
  function loopTime(t, duration, start = 0) {
@@ -814,7 +832,7 @@ var FLAIR_AGENT_TOOLS = [
814
832
  properties: {
815
833
  scene: {
816
834
  type: "object",
817
- description: "Full Scene object with name, stage, media, and shots."
835
+ description: "Full Scene object with name, stage, media, and shots. A shot camera frames a box {x, y, width, height} or elements {frame: [ids]}, and may add tilt, turn, roll (degrees, tilt/turn up to 75), perspective (default 1.2) and motionBlur (0-3, 1 natural); angles persist until changed."
818
836
  }
819
837
  },
820
838
  required: ["scene"],
@@ -1103,7 +1121,9 @@ export {
1103
1121
  ALL_TRANSITION_TYPES,
1104
1122
  BUILTIN_UNIFORMS,
1105
1123
  CAMERA_MS,
1124
+ CAMERA_STEP_MS,
1106
1125
  COMMON_FRAME_RATES,
1126
+ DEFAULT_PERSPECTIVE,
1107
1127
  DEFAULT_STAGE,
1108
1128
  EASES,
1109
1129
  EASY_EASE,
@@ -1111,6 +1131,7 @@ export {
1111
1131
  EFFECT_TYPES,
1112
1132
  FLAIR_AGENT_TOOLS,
1113
1133
  ImageLoadError,
1134
+ MAX_TILT,
1114
1135
  ManualClock,
1115
1136
  MemorySceneBoard,
1116
1137
  NO_CHECK,
@@ -1142,6 +1163,13 @@ export {
1142
1163
  boundsOf,
1143
1164
  calculateFramingRect,
1144
1165
  calculateShotTimings,
1166
+ cameraAngle,
1167
+ cameraAt,
1168
+ cameraBlur,
1169
+ cameraFilter,
1170
+ cameraSamples,
1171
+ cameraTrack,
1172
+ cameraTransform,
1145
1173
  centreOf,
1146
1174
  checkControlValue,
1147
1175
  checkShot,
@@ -1188,6 +1216,7 @@ export {
1188
1216
  imageUrls,
1189
1217
  interpolateOklab,
1190
1218
  interpolateOklch,
1219
+ isAngled,
1191
1220
  isDeleteCommand,
1192
1221
  isElementCommand,
1193
1222
  isImageUrl,
@@ -1202,6 +1231,9 @@ export {
1202
1231
  loadImage,
1203
1232
  loopTime,
1204
1233
  mixSeeds,
1234
+ motionBlur,
1235
+ motionBlurAngle,
1236
+ moveBlur,
1205
1237
  noise1d,
1206
1238
  noise3d,
1207
1239
  oklabToLinearSrgb,
@@ -1217,6 +1249,7 @@ export {
1217
1249
  pingPongTime,
1218
1250
  playScene,
1219
1251
  preloadImages,
1252
+ projectPoint,
1220
1253
  quinticFade,
1221
1254
  realClock,
1222
1255
  recordGif,
@@ -1228,8 +1261,11 @@ export {
1228
1261
  sampleMotionPath,
1229
1262
  sampleMotionPathAtTime,
1230
1263
  sampleTransition,
1264
+ sceneStage,
1265
+ screenBox,
1231
1266
  setRigWidget,
1232
1267
  sharedThumbnailPool,
1268
+ shotView,
1233
1269
  simulateScene,
1234
1270
  sizeSvg,
1235
1271
  smpteToFrames,