pixi-effects 0.1.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.
@@ -0,0 +1,79 @@
1
+ import { I as ImageSequenceSpec } from './Movie-Bp66rkaC.cjs';
2
+ export { A as AssetSpec, a as AudioSequenceSpec, C as ChromaKeyFilterSpec, b as CircleShapeSpec, c as CompositionSequenceSpec, d as CompositionSpec, e as CrossfadeTransition, f as CustomFilterSpec, D as DipTransition, g as DissolveTransition, E as EllipseShapeSpec, h as Expr, F as FilterSpec, i as FrameEvent, j as IrisTransition, K as Keyframe, L as LineShapeSpec, M as Movie, k as MovieOptions, P as PathShapeSpec, l as PolygonShapeSpec, m as ProgressEvent, n as PropValue, o as Props, R as RectShapeSpec, p as RenderOptions, S as SequenceCommon, q as SequenceSpec, r as ShapeSequenceSpec, s as SlideTransition, T as TextSequenceSpec, t as TransitionCommon, u as TransitionSpec, V as VideoSequenceSpec, W as WipeTransition, Z as ZoomTransition } from './Movie-Bp66rkaC.cjs';
3
+ import 'pixi.js';
4
+ import 'gsap';
5
+
6
+ /**
7
+ * Ken Burns preset for a single image. Returns an `ImageSequenceSpec` ready
8
+ * to drop into a composition's `sequences[]`.
9
+ *
10
+ * Four motion modes:
11
+ * - `still` : just sit at the canvas centre, fitted but unanimated.
12
+ * - `scale` : zoom in or out around an arbitrary 9-point pivot.
13
+ * - `rotation` : gentle rotation while keeping the image filling the
14
+ * canvas (the scale is over-set so even at the steepest
15
+ * rotation the bounding box still covers).
16
+ * - `position` : pan the image between two points within its over-scaled
17
+ * bounds (corner-to-corner by default).
18
+ *
19
+ * The image fits the canvas by `cover` (default) or `contain` — both
20
+ * computed at runtime from the texture's intrinsic size, so you don't pass
21
+ * `imageWidth` / `imageHeight`. Position keyframes assume the image is
22
+ * anchored at its centre (anchor 0.5/0.5).
23
+ *
24
+ * Note: this preset emits no fade keyframes; pair it with `crossfade` /
25
+ * `dip` / etc. transitions to chain images.
26
+ */
27
+ type KenBurnsOptions = KenBurnsBase & ({
28
+ motion: 'still';
29
+ } | KenBurnsScale | KenBurnsRotation | KenBurnsPosition);
30
+ interface KenBurnsBase {
31
+ /** Image asset name (registered via `Movie.init({ assets })`). */
32
+ asset: string;
33
+ /** Optional sequence name for transitions / addressing. */
34
+ name?: string;
35
+ /** Start time in seconds (parent-relative). */
36
+ at?: number;
37
+ /** Length of the animation in seconds. Required. */
38
+ duration: number;
39
+ /** How the image fills the canvas. Default `'cover'`. */
40
+ fit?: 'cover' | 'contain';
41
+ /** GSAP easing name. Default `'sine.inOut'`. */
42
+ ease?: string;
43
+ }
44
+ interface KenBurnsScale {
45
+ motion: 'scale';
46
+ /**
47
+ * Pivot point inside the image, in [0..1] coords. The pivot stays pinned
48
+ * to the canvas while the rest of the image zooms around it. Default
49
+ * `[0.5, 0.5]` (centre). The original Yajima-Motion convention uses the
50
+ * 9-point grid `0.25 / 0.5 / 0.75`.
51
+ */
52
+ origin?: [number, number];
53
+ /** Zoom factor relative to the fitted base. Default 1.15. */
54
+ zoom?: number;
55
+ /** `'in'`: 1 → zoom (default). `'out'`: zoom → 1. */
56
+ direction?: 'in' | 'out';
57
+ }
58
+ interface KenBurnsRotation {
59
+ motion: 'rotation';
60
+ /** Total rotation in degrees. Default 8. Capped at 30. */
61
+ angle?: number;
62
+ /** `'cw'`: 0 → +angle (default). `'ccw'`: 0 → -angle. Either way it pivots through 0. */
63
+ direction?: 'cw' | 'ccw' | 'through';
64
+ }
65
+ interface KenBurnsPosition {
66
+ motion: 'position';
67
+ /**
68
+ * Pan start/end in [0..1] of the over-scaled bounds. `[0, 0]` = look at
69
+ * top-left, `[1, 1]` = look at bottom-right. Defaults to diagonal
70
+ * `[0.25, 0.25]` → `[0.75, 0.75]` (matches the Yajima-Motion preset).
71
+ */
72
+ from?: [number, number];
73
+ to?: [number, number];
74
+ /** Over-scale factor. Must be > 1 for any pan to be visible. Default 1.15. */
75
+ zoom?: number;
76
+ }
77
+ declare function kenBurns(opts: KenBurnsOptions): ImageSequenceSpec;
78
+
79
+ export { ImageSequenceSpec, type KenBurnsOptions, kenBurns };
@@ -0,0 +1,79 @@
1
+ import { I as ImageSequenceSpec } from './Movie-Bp66rkaC.js';
2
+ export { A as AssetSpec, a as AudioSequenceSpec, C as ChromaKeyFilterSpec, b as CircleShapeSpec, c as CompositionSequenceSpec, d as CompositionSpec, e as CrossfadeTransition, f as CustomFilterSpec, D as DipTransition, g as DissolveTransition, E as EllipseShapeSpec, h as Expr, F as FilterSpec, i as FrameEvent, j as IrisTransition, K as Keyframe, L as LineShapeSpec, M as Movie, k as MovieOptions, P as PathShapeSpec, l as PolygonShapeSpec, m as ProgressEvent, n as PropValue, o as Props, R as RectShapeSpec, p as RenderOptions, S as SequenceCommon, q as SequenceSpec, r as ShapeSequenceSpec, s as SlideTransition, T as TextSequenceSpec, t as TransitionCommon, u as TransitionSpec, V as VideoSequenceSpec, W as WipeTransition, Z as ZoomTransition } from './Movie-Bp66rkaC.js';
3
+ import 'pixi.js';
4
+ import 'gsap';
5
+
6
+ /**
7
+ * Ken Burns preset for a single image. Returns an `ImageSequenceSpec` ready
8
+ * to drop into a composition's `sequences[]`.
9
+ *
10
+ * Four motion modes:
11
+ * - `still` : just sit at the canvas centre, fitted but unanimated.
12
+ * - `scale` : zoom in or out around an arbitrary 9-point pivot.
13
+ * - `rotation` : gentle rotation while keeping the image filling the
14
+ * canvas (the scale is over-set so even at the steepest
15
+ * rotation the bounding box still covers).
16
+ * - `position` : pan the image between two points within its over-scaled
17
+ * bounds (corner-to-corner by default).
18
+ *
19
+ * The image fits the canvas by `cover` (default) or `contain` — both
20
+ * computed at runtime from the texture's intrinsic size, so you don't pass
21
+ * `imageWidth` / `imageHeight`. Position keyframes assume the image is
22
+ * anchored at its centre (anchor 0.5/0.5).
23
+ *
24
+ * Note: this preset emits no fade keyframes; pair it with `crossfade` /
25
+ * `dip` / etc. transitions to chain images.
26
+ */
27
+ type KenBurnsOptions = KenBurnsBase & ({
28
+ motion: 'still';
29
+ } | KenBurnsScale | KenBurnsRotation | KenBurnsPosition);
30
+ interface KenBurnsBase {
31
+ /** Image asset name (registered via `Movie.init({ assets })`). */
32
+ asset: string;
33
+ /** Optional sequence name for transitions / addressing. */
34
+ name?: string;
35
+ /** Start time in seconds (parent-relative). */
36
+ at?: number;
37
+ /** Length of the animation in seconds. Required. */
38
+ duration: number;
39
+ /** How the image fills the canvas. Default `'cover'`. */
40
+ fit?: 'cover' | 'contain';
41
+ /** GSAP easing name. Default `'sine.inOut'`. */
42
+ ease?: string;
43
+ }
44
+ interface KenBurnsScale {
45
+ motion: 'scale';
46
+ /**
47
+ * Pivot point inside the image, in [0..1] coords. The pivot stays pinned
48
+ * to the canvas while the rest of the image zooms around it. Default
49
+ * `[0.5, 0.5]` (centre). The original Yajima-Motion convention uses the
50
+ * 9-point grid `0.25 / 0.5 / 0.75`.
51
+ */
52
+ origin?: [number, number];
53
+ /** Zoom factor relative to the fitted base. Default 1.15. */
54
+ zoom?: number;
55
+ /** `'in'`: 1 → zoom (default). `'out'`: zoom → 1. */
56
+ direction?: 'in' | 'out';
57
+ }
58
+ interface KenBurnsRotation {
59
+ motion: 'rotation';
60
+ /** Total rotation in degrees. Default 8. Capped at 30. */
61
+ angle?: number;
62
+ /** `'cw'`: 0 → +angle (default). `'ccw'`: 0 → -angle. Either way it pivots through 0. */
63
+ direction?: 'cw' | 'ccw' | 'through';
64
+ }
65
+ interface KenBurnsPosition {
66
+ motion: 'position';
67
+ /**
68
+ * Pan start/end in [0..1] of the over-scaled bounds. `[0, 0]` = look at
69
+ * top-left, `[1, 1]` = look at bottom-right. Defaults to diagonal
70
+ * `[0.25, 0.25]` → `[0.75, 0.75]` (matches the Yajima-Motion preset).
71
+ */
72
+ from?: [number, number];
73
+ to?: [number, number];
74
+ /** Over-scale factor. Must be > 1 for any pan to be visible. Default 1.15. */
75
+ zoom?: number;
76
+ }
77
+ declare function kenBurns(opts: KenBurnsOptions): ImageSequenceSpec;
78
+
79
+ export { ImageSequenceSpec, type KenBurnsOptions, kenBurns };