reacthub-pixitweenjs 0.3.0-alpha.3 → 0.3.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -16
- package/dist/components/AepComposition/AepAudioLayer.d.ts +6 -0
- package/dist/components/AepComposition/AepComposition.d.ts +2 -0
- package/dist/components/AepComposition/AudioPlaybackManager.d.ts +38 -0
- package/dist/components/AepComposition/index.d.ts +3 -0
- package/dist/components/AepComposition/model3d/Pixi3DModelLayer.d.ts +9 -0
- package/dist/components/AepComposition/model3d/ThreeOffscreenRenderer.d.ts +49 -0
- package/dist/components/AepComposition/model3d/framing.d.ts +30 -0
- package/dist/components/AepComposition/model3d/geometry.d.ts +27 -0
- package/dist/components/AepComposition/model3d/index.d.ts +14 -0
- package/dist/components/AepComposition/model3d/lighting.d.ts +40 -0
- package/dist/components/AepComposition/model3d/readiness.d.ts +17 -0
- package/dist/components/AepComposition/model3d/sampleModel3D.d.ts +40 -0
- package/dist/components/PixiAudioSprite/HowlerAudioSprite.d.ts +8 -2
- package/dist/components/PixiAudioSprite/PixiAudioSprite.d.ts +37 -1
- package/dist/components/PixiAudioSprite/index.d.ts +3 -0
- package/dist/components/PixiAudioSprite/useAudioVisualizer.d.ts +30 -15
- package/dist/components/PixiCaptionsTrack/PixiCaptionsTrack.d.ts +86 -0
- package/dist/components/PixiCaptionsTrack/index.d.ts +5 -0
- package/dist/components/PixiCaptionsTrack/useCaptionPlayhead.d.ts +31 -0
- package/dist/components/PixiCaptionsTrack/useCaptionStyles.d.ts +45 -0
- package/dist/components/PixiCaptionsTrack/useEmojiTextures.d.ts +8 -0
- package/dist/components/PixiImageSprite/PixiImageSprite.d.ts +17 -0
- package/dist/components/PixiSVGSprite/PixiSvgImageSprite.d.ts +35 -0
- package/dist/components/PixiSVGSprite/PixiSvgPathSprite.d.ts +10 -0
- package/dist/components/PixiSVGSprite/PixiSvgRawSprite.d.ts +30 -0
- package/dist/components/PixiSVGSprite/index.d.ts +4 -0
- package/dist/components/PixiSequence/PixiSequence.d.ts +29 -5
- package/dist/components/PixiTextSprite/PixiTextSplit.d.ts +1 -1
- package/dist/components/PixiTextSprite/PixiTextSprite.d.ts +25 -0
- package/dist/components/PixiThreeSprite/PixiThreeModelSprite.d.ts +23 -0
- package/dist/components/PixiThreeSprite/index.d.ts +2 -0
- package/dist/components/PixiVideoSprite/PixiVideoSprite.d.ts +26 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/constants/animation.d.ts +232 -0
- package/dist/constants/animationConstants.d.ts +90 -0
- package/dist/constants/elementNames.d.ts +4 -0
- package/dist/filters/animated-vfx/AnimatedVfxFilter.d.ts +19 -0
- package/dist/filters/animated-vfx/composeShader.d.ts +2 -0
- package/dist/filters/animated-vfx/index.d.ts +14 -0
- package/dist/filters/animated-vfx/registry/animatedVfxRegistry.d.ts +65 -0
- package/dist/filters/animated-vfx/registry/waveTearVariants.d.ts +14 -0
- package/dist/filters/animated-vfx/toStrength.d.ts +1 -0
- package/dist/filters/animated-vfx/types.d.ts +18 -0
- package/dist/filters/animatedVfxFilters.d.ts +1 -0
- package/dist/filters/blend-mode/createBlendCompositeFilter.d.ts +26 -0
- package/dist/filters/edge-feather/EdgeFeatherFilter.d.ts +19 -0
- package/dist/filters/plate-key/PlateKeyFilter.d.ts +29 -0
- package/dist/hocs/AbstractContainer.d.ts +5 -0
- package/dist/hocs/BorderMaskContainer.d.ts +23 -8
- package/dist/hocs/drawMaskShape.d.ts +6 -2
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/useBlendFilter.d.ts +17 -0
- package/dist/hooks/useDebouncedValue.d.ts +11 -0
- package/dist/hooks/useFontEpoch.d.ts +10 -0
- package/dist/hooks/usePixiAnimation.d.ts +24 -0
- package/dist/hooks/useSpriteFilters.d.ts +54 -12
- package/dist/hooks/useSvgTexture.d.ts +29 -0
- package/dist/hooks/video/useVideoLifecycle.d.ts +23 -0
- package/dist/hooks/video/useVideoTexture.d.ts +34 -0
- package/dist/hooks/video/useVideoTimelineSync.d.ts +24 -0
- package/dist/hooks/withEffectsHook.d.ts +326 -0
- package/dist/hooks/withFiltersHook.d.ts +104 -38
- package/dist/index.es.js +29296 -60769
- package/dist/index.umd.js +1367 -4362
- package/dist/providers/GsapPixieContextProvider.d.ts +7 -0
- package/dist/types/BaseProps.d.ts +41 -14
- package/dist/types/CropTypes.d.ts +12 -0
- package/dist/types/Effects.d.ts +674 -13
- package/dist/types/aep/asset.d.ts +7 -7
- package/dist/types/aep/camera.d.ts +64 -64
- package/dist/types/aep/composition.d.ts +1 -1
- package/dist/types/aep/effect.d.ts +2 -2
- package/dist/types/aep/layer.d.ts +11733 -6766
- package/dist/types/aep/light.d.ts +80 -80
- package/dist/types/aep/postFx.d.ts +2 -2
- package/dist/types/aep/text-animator.d.ts +6 -6
- package/dist/types/aep/transform.d.ts +14 -14
- package/dist/types/aep/transform3D.d.ts +18 -18
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/PixiSelector.d.ts +17 -0
- package/dist/utils/assetRefCount.d.ts +20 -0
- package/dist/utils/audio/audioRegistry.d.ts +51 -0
- package/dist/utils/audio/audioSync.d.ts +98 -0
- package/dist/utils/audio/gainEnvelope.d.ts +162 -0
- package/dist/utils/audio/useAudioRegistry.d.ts +10 -0
- package/dist/utils/blendMode.d.ts +21 -0
- package/dist/utils/captions/captionClock.d.ts +17 -0
- package/dist/utils/captions/captionDisplay.d.ts +57 -0
- package/dist/utils/captions/captionPose.d.ts +107 -0
- package/dist/utils/captions/captionVisual.d.ts +32 -0
- package/dist/utils/captions/captionWordLayout.d.ts +67 -0
- package/dist/utils/captions/groupSegments.d.ts +20 -0
- package/dist/utils/captions/index.d.ts +10 -0
- package/dist/utils/captions/parseSubtitles.d.ts +25 -0
- package/dist/utils/captions/sampleCaption.d.ts +25 -0
- package/dist/utils/captions/timeBase.d.ts +34 -0
- package/dist/utils/captions/types.d.ts +279 -0
- package/dist/utils/entranceOverlap.d.ts +37 -0
- package/dist/utils/fonts/fontLoader.d.ts +33 -0
- package/dist/utils/fonts/fontSpec.d.ts +16 -0
- package/dist/utils/fonts/googleFonts.d.ts +9 -0
- package/dist/utils/gifTiming.d.ts +22 -0
- package/dist/utils/gsapEffects/animationConfigs.d.ts +3802 -0
- package/dist/utils/gsapEffects/backEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/bounceEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/effectGenerator.d.ts +3 -0
- package/dist/utils/gsapEffects/effectTarget.d.ts +11 -0
- package/dist/utils/gsapEffects/fadeEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/flipEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/generalEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/index.d.ts +0 -0
- package/dist/utils/gsapEffects/lightSpeedEffect.d.ts +1 -0
- package/dist/utils/gsapEffects/logoRevealEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/registerEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/riseEffect.d.ts +1 -0
- package/dist/utils/gsapEffects/rollEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/rotateEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/slideEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/staggerTextEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/textUnitEffects.d.ts +1 -0
- package/dist/utils/gsapEffects/textUnitMask.d.ts +1 -0
- package/dist/utils/gsapEffects/textUnits.d.ts +172 -0
- package/dist/utils/gsapEffects/typewriterEffect.d.ts +1 -0
- package/dist/utils/gsapEffects/wipeEffect.d.ts +1 -0
- package/dist/utils/gsapEffects/zoomEffects.d.ts +1 -0
- package/dist/utils/index.d.ts +25 -0
- package/dist/utils/loadSpriteTexture.d.ts +33 -4
- package/dist/utils/sanitizeCanvasText.d.ts +12 -0
- package/dist/utils/sanitizeImageSrc.d.ts +7 -0
- package/dist/utils/svgRaster.d.ts +47 -0
- package/dist/utils/textLayout/index.d.ts +1 -1
- package/dist/utils/textLayout/layoutText.d.ts +5 -0
- package/dist/utils/textStyle.d.ts +81 -0
- package/dist/utils/textStyleV8.d.ts +62 -0
- package/dist/utils/threeModel.d.ts +55 -0
- package/dist/utils/videoAssetCache.d.ts +4 -0
- package/dist/utils/videoReadiness.d.ts +13 -0
- package/package.json +12 -13
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CaptionRenderMode, CaptionSegment } from '../../utils/captions';
|
|
2
|
+
import * as PIXI from "pixi.js";
|
|
3
|
+
export interface CaptionStyleInput {
|
|
4
|
+
fontFamily: string;
|
|
5
|
+
fontWeight: string | number;
|
|
6
|
+
fontSize: number;
|
|
7
|
+
fill: string;
|
|
8
|
+
align: string;
|
|
9
|
+
wordWrapWidth: number;
|
|
10
|
+
padding: number;
|
|
11
|
+
stroke: string | number | null;
|
|
12
|
+
strokeWidth: number;
|
|
13
|
+
dropShadow: boolean;
|
|
14
|
+
dropShadowColor: string | number;
|
|
15
|
+
dropShadowBlur: number;
|
|
16
|
+
dropShadowAlpha: number;
|
|
17
|
+
dropShadowAngle: number;
|
|
18
|
+
dropShadowDistance: number;
|
|
19
|
+
highlightColor: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Every TextStyle and filter the caption modes draw with.
|
|
23
|
+
*
|
|
24
|
+
* Fonts usually arrive after the first draw. Pixi caches font metrics per font string and keeps
|
|
25
|
+
* the fallback-font texture, so on `FONTS_LOADED` (via `useFontEpoch`) the metrics cache is
|
|
26
|
+
* flushed and the styles are rebuilt. Filters are destroyed when replaced and on unmount
|
|
27
|
+
* (Clippy leaked them).
|
|
28
|
+
*
|
|
29
|
+
* NOTE: `trim` is deliberately NOT set. In v8 trim shrinks the rendered texture, so an
|
|
30
|
+
* `anchor: 0.5` pivots on a trimmed size that varies per word (ascenders, descenders, shadow
|
|
31
|
+
* bleed) and words float at different baselines.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useCaptionStyles(input: CaptionStyleInput, mode: CaptionRenderMode, segments: ReadonlyArray<CaptionSegment>): {
|
|
34
|
+
base: PIXI.TextStyle;
|
|
35
|
+
active: PIXI.TextStyle;
|
|
36
|
+
inactive: PIXI.TextStyle;
|
|
37
|
+
colour: Record<string, PIXI.TextStyle>;
|
|
38
|
+
vhs: {
|
|
39
|
+
cyan: PIXI.TextStyle;
|
|
40
|
+
magenta: PIXI.TextStyle;
|
|
41
|
+
} | null;
|
|
42
|
+
glowPopBlur: PIXI.BlurFilter;
|
|
43
|
+
springPopBlur: PIXI.BlurFilter;
|
|
44
|
+
bloomBlur: PIXI.BlurFilter;
|
|
45
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CaptionSegment } from '../../utils/captions';
|
|
2
|
+
import * as PIXI from "pixi.js";
|
|
3
|
+
/**
|
|
4
|
+
* Textures for the emoji drawn above words in glow-pop. They come from the pinned Noto PNGs (or
|
|
5
|
+
* a word's own `emojiSrc`), not a system emoji font, so the editor and a server render draw the
|
|
6
|
+
* same glyph. Textures belong to Pixi's Assets cache and are not destroyed here.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useEmojiTextures(segments: ReadonlyArray<CaptionSegment>, enabled: boolean): Record<string, PIXI.Texture>;
|
|
@@ -9,7 +9,24 @@ type PixiImageSpriteProps = PixiBaseSpriteProps & {
|
|
|
9
9
|
isDragging?: boolean;
|
|
10
10
|
} | null;
|
|
11
11
|
};
|
|
12
|
+
/** Cleared when the sprite unmounts, so a host's hover state never points at a dead node. */
|
|
13
|
+
mouseOverSpriteRef?: {
|
|
14
|
+
current?: unknown;
|
|
15
|
+
};
|
|
12
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* PixiImageSprite — an image on the Pixi canvas.
|
|
19
|
+
*
|
|
20
|
+
* Uplifted from the Clippy editor:
|
|
21
|
+
* - `src` is sanitised (a CDN origin wrongly prepended to a data: URI is stripped)
|
|
22
|
+
* - extensionless URLs load (forced texture parser)
|
|
23
|
+
* - the texture is cleared on `src` change / error / unmount instead of leaving a stale image
|
|
24
|
+
* - the cancel race is gone (the load handle is created synchronously)
|
|
25
|
+
* - width/height of 0 fall back to the texture's native size
|
|
26
|
+
* - `crop`, `effects: {name, intensity, params}`, `neonColor` and `plateKey` are supported,
|
|
27
|
+
* and `blendMode` goes through `useSpriteFilters` (a raw sprite blendMode is ignored in
|
|
28
|
+
* Pixi v8 once the sprite has filters)
|
|
29
|
+
*/
|
|
13
30
|
declare const PixiImageSpriteInner: ({ ref, ...props }: PixiImageSpriteProps & {
|
|
14
31
|
ref?: React.Ref<ForwardedRefResponse | null>;
|
|
15
32
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PixiBaseSpriteProps, ForwardedRefResponse } from '../../types/BaseProps';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as PIXI from "pixi.js";
|
|
4
|
+
export interface PixiSvgImageSpriteProps extends PixiBaseSpriteProps {
|
|
5
|
+
/** SVG URL, `data:image/svg+xml` URI, or any raster image URL. */
|
|
6
|
+
src: string;
|
|
7
|
+
transformation: PixiBaseSpriteProps["transformation"] & {
|
|
8
|
+
/** Tint colour (any CSS colour). Applied live, with no re-rasterisation. */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Alias for `color`. */
|
|
11
|
+
fill?: string;
|
|
12
|
+
stroke?: string;
|
|
13
|
+
/** Alias for `stroke` (used by templates). */
|
|
14
|
+
strokeColor?: string;
|
|
15
|
+
strokeWidth?: number;
|
|
16
|
+
};
|
|
17
|
+
mouseOverSpriteRef?: {
|
|
18
|
+
current?: unknown;
|
|
19
|
+
};
|
|
20
|
+
onContainerRefReady?: (uniqueId: string, ref: React.MutableRefObject<PIXI.Container | null>) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* PixiSvgImageSprite — a TINTABLE svg: art drawn in white (e.g. an icon set) is rasterised
|
|
24
|
+
* once at `width x height x resolution` and recoloured with a sprite tint, so changing the
|
|
25
|
+
* colour never re-rasterises. Ported from the Clippy editor.
|
|
26
|
+
*
|
|
27
|
+
* The sprite stays mounted with `Texture.EMPTY` + alpha 0 until the raster is ready, so the
|
|
28
|
+
* transformer keeps a stable node and there is no remount flash on load or recolour.
|
|
29
|
+
* Resizing re-rasterises once, after the drag settles (see useSvgTexture).
|
|
30
|
+
*/
|
|
31
|
+
declare const PixiSvgImageSpriteInner: ({ ref, ...props }: PixiSvgImageSpriteProps & {
|
|
32
|
+
ref?: React.Ref<ForwardedRefResponse | null>;
|
|
33
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
declare const PixiSvgImageSprite: typeof PixiSvgImageSpriteInner;
|
|
35
|
+
export default PixiSvgImageSprite;
|
|
@@ -5,8 +5,11 @@ import * as React from "react";
|
|
|
5
5
|
import * as PIXI from "pixi.js";
|
|
6
6
|
export interface PixiSvgPathSpriteProps extends PixiBaseSpriteProps {
|
|
7
7
|
uniqueId: string;
|
|
8
|
+
/** A single path `d` attribute. */
|
|
8
9
|
path?: string;
|
|
10
|
+
/** Raw SVG markup. Overrides `path`. */
|
|
9
11
|
svg?: string;
|
|
12
|
+
/** SVG URL / data URI. Rendered through the multi-colour svg pipeline (`PixiSvgRawSprite`). */
|
|
10
13
|
startAt: number;
|
|
11
14
|
endAt: number;
|
|
12
15
|
transformation: {
|
|
@@ -67,6 +70,13 @@ export interface PixiSvgPathSpriteProps extends PixiBaseSpriteProps {
|
|
|
67
70
|
onContainerRefReady?: (uniqueId: string, ref: React.MutableRefObject<PIXI.Container | null>) => void;
|
|
68
71
|
onSpriteRefReady?: (uniqueId: string, ref: React.MutableRefObject<PIXI.Container | null>) => void;
|
|
69
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* `src` -> delegate to PixiSvgRawSprite (fetch + bake with the original viewBox).
|
|
75
|
+
* `path` / `svg` -> inline geometry, baked here.
|
|
76
|
+
*
|
|
77
|
+
* Kept as one public component because the AEP router and existing stories pass any of the
|
|
78
|
+
* three. The split is a thin switch so each branch keeps its own hooks.
|
|
79
|
+
*/
|
|
70
80
|
declare const PixiSvgPathSprite: ({ ref, ...props }: PixiSvgPathSpriteProps & {
|
|
71
81
|
ref?: React.Ref<ForwardedRefResponse | null>;
|
|
72
82
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PixiBaseSpriteProps, ForwardedRefResponse } from '../../types/BaseProps';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as PIXI from "pixi.js";
|
|
4
|
+
export interface PixiSvgRawSpriteProps extends PixiBaseSpriteProps {
|
|
5
|
+
src: string;
|
|
6
|
+
transformation: PixiBaseSpriteProps["transformation"] & {
|
|
7
|
+
fill?: string;
|
|
8
|
+
stroke?: string;
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
};
|
|
11
|
+
mouseOverSpriteRef?: {
|
|
12
|
+
current?: unknown;
|
|
13
|
+
};
|
|
14
|
+
onContainerRefReady?: (uniqueId: string, ref: React.MutableRefObject<PIXI.Container | null>) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* PixiSvgRawSprite — an svg that is NOT tintable (multi-colour art). Fill/stroke overrides
|
|
18
|
+
* are written onto the SVG root and the document is baked through `Graphics.svg()` into a
|
|
19
|
+
* texture. Paths that inherit fill/stroke pick the override up; per-path fills and gradients
|
|
20
|
+
* are left alone. For gradient-faithful backgrounds use a plain image/svg URL instead.
|
|
21
|
+
*
|
|
22
|
+
* Ported from the Clippy editor. Fixes: the original viewBox is preserved (Clippy forced
|
|
23
|
+
* `0 0 w h`, distorting non-square art), the baked texture AND the throwaway Graphics are
|
|
24
|
+
* always destroyed, and resizes are debounced.
|
|
25
|
+
*/
|
|
26
|
+
declare const PixiSvgRawSpriteInner: ({ ref, ...props }: PixiSvgRawSpriteProps & {
|
|
27
|
+
ref?: React.Ref<ForwardedRefResponse | null>;
|
|
28
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare const PixiSvgRawSprite: typeof PixiSvgRawSpriteInner;
|
|
30
|
+
export default PixiSvgRawSprite;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export { default as PixiSvgPathSprite } from './PixiSvgPathSprite';
|
|
2
|
+
export { default as PixiSvgImageSprite } from './PixiSvgImageSprite';
|
|
3
|
+
export type { PixiSvgImageSpriteProps } from './PixiSvgImageSprite';
|
|
4
|
+
export { default as PixiSvgRawSprite } from './PixiSvgRawSprite';
|
|
5
|
+
export type { PixiSvgRawSpriteProps } from './PixiSvgRawSprite';
|
|
2
6
|
export { default as PixiMorphSvgSprite } from './PixiMorphSvgSprite';
|
|
@@ -1,11 +1,35 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
export interface PixiSequenceProps {
|
|
3
|
-
children
|
|
3
|
+
children?: React.ReactNode;
|
|
4
4
|
/** start time of the sequence in seconds */
|
|
5
|
-
startAt
|
|
5
|
+
startAt?: number;
|
|
6
6
|
/** end time of the sequence in seconds */
|
|
7
|
-
endAt
|
|
7
|
+
endAt?: number;
|
|
8
8
|
/** unique id */
|
|
9
9
|
uniqueId?: string;
|
|
10
|
+
/** Hide the element on exit (used with hideStart/hideEnd for transition hand-offs). */
|
|
11
|
+
hideOnExit?: boolean;
|
|
12
|
+
hideOnEntry?: boolean;
|
|
13
|
+
/** Seconds. Clamped to the sequence bounds. */
|
|
14
|
+
hideStart?: number;
|
|
15
|
+
hideEnd?: number;
|
|
16
|
+
zIndex?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Entrance overlap (crossfade at hard cuts), stamped by `applyEntranceOverlaps`.
|
|
19
|
+
* The visibility window opens this many seconds before `startAt`.
|
|
20
|
+
*/
|
|
21
|
+
entranceOverlapSec?: number;
|
|
10
22
|
}
|
|
11
|
-
|
|
23
|
+
/**
|
|
24
|
+
* PixiSequence - Unified timeline with alpha-based visibility control
|
|
25
|
+
*
|
|
26
|
+
* Props:
|
|
27
|
+
* - startAt: Sequence start time
|
|
28
|
+
* - endAt: Sequence end time
|
|
29
|
+
* - uniqueId: Unique identifier
|
|
30
|
+
* - hideOnExit: Boolean flag for exit hiding
|
|
31
|
+
* - hideOnEntry: Boolean flag for entry hiding
|
|
32
|
+
* - hideStart: Start time to hide (will be clamped to sequence bounds)
|
|
33
|
+
* - hideEnd: End time to hide (will be clamped to sequence bounds)
|
|
34
|
+
*/
|
|
35
|
+
export declare const PixiSequence: ({ children, startAt, endAt, uniqueId, hideOnExit, hideOnEntry, hideStart, hideEnd, zIndex, entranceOverlapSec, }: PixiSequenceProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,6 +21,6 @@ export declare class TextStyleCache {
|
|
|
21
21
|
get(key: string, build: () => PIXI.TextStyle): PIXI.TextStyle;
|
|
22
22
|
get hitRate(): number;
|
|
23
23
|
}
|
|
24
|
-
export declare function _textSplitStyleKey(glyph: AepTextLayoutGlyph, color: string): string;
|
|
24
|
+
export declare function _textSplitStyleKey(glyph: AepTextLayoutGlyph, color: string, styleSig?: string): string;
|
|
25
25
|
export declare const PixiTextSplit: React.FC<PixiTextSplitProps>;
|
|
26
26
|
export {};
|
|
@@ -44,8 +44,27 @@ export interface PixiTextSpriteProps extends Omit<PixiBaseSpriteProps, "transfor
|
|
|
44
44
|
blurEnabled?: boolean;
|
|
45
45
|
blurRadius?: number;
|
|
46
46
|
fill: string | number;
|
|
47
|
+
/** Two or more colours -> linear gradient fill (overrides `fill`). */
|
|
48
|
+
gradientColors?: (string | number)[];
|
|
49
|
+
gradientStops?: number[];
|
|
50
|
+
/** 0 = vertical (default), 1 = horizontal. */
|
|
51
|
+
gradientType?: 0 | 1;
|
|
47
52
|
stroke?: string | number;
|
|
53
|
+
/** v8 name; `strokeThickness` (v7) is still accepted. */
|
|
54
|
+
strokeWidth?: number;
|
|
48
55
|
strokeThickness?: number;
|
|
56
|
+
dropShadowAlpha?: number;
|
|
57
|
+
/** Radians. */
|
|
58
|
+
dropShadowAngle?: number;
|
|
59
|
+
dropShadowDistance?: number;
|
|
60
|
+
/**
|
|
61
|
+
* `"box"` (default) keeps the legacy behaviour: the background fills the sprite's
|
|
62
|
+
* `width x height`. `"hug"` sizes it to the measured text plus `backgroundPadding`.
|
|
63
|
+
*/
|
|
64
|
+
backgroundFit?: "box" | "hug";
|
|
65
|
+
backgroundPadding?: number;
|
|
66
|
+
/** Background corner radius, px. */
|
|
67
|
+
backgroundRadius?: number;
|
|
49
68
|
zIndex?: number;
|
|
50
69
|
align?: string;
|
|
51
70
|
textBaseline?: string;
|
|
@@ -78,6 +97,12 @@ export interface PixiTextSpriteProps extends Omit<PixiBaseSpriteProps, "transfor
|
|
|
78
97
|
scaleInput?: number;
|
|
79
98
|
};
|
|
80
99
|
effect?: Effects;
|
|
100
|
+
effects?: {
|
|
101
|
+
name?: Effects | string;
|
|
102
|
+
intensity?: number;
|
|
103
|
+
params?: Record<string, unknown>;
|
|
104
|
+
};
|
|
105
|
+
neonColor?: number | string | null;
|
|
81
106
|
};
|
|
82
107
|
pointerdown?: () => void;
|
|
83
108
|
pointerup?: () => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PixiBaseSpriteProps, ForwardedRefResponse } from '../../types/BaseProps';
|
|
2
|
+
import { ThreeDParams } from '../../utils/threeModel';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as PIXI from "pixi.js";
|
|
5
|
+
export interface PixiThreeModelSpriteProps extends PixiBaseSpriteProps {
|
|
6
|
+
uniqueId: string;
|
|
7
|
+
/** GLB/GLTF URL. Omit for the procedural torus-knot. */
|
|
8
|
+
src?: string;
|
|
9
|
+
/** Relative path -> absolute URL map for glTF sidecar textures/buffers. */
|
|
10
|
+
resources?: Record<string, string>;
|
|
11
|
+
startAt: number;
|
|
12
|
+
endAt: number;
|
|
13
|
+
threeD?: ThreeDParams;
|
|
14
|
+
locked?: boolean;
|
|
15
|
+
pointerdown?: () => void;
|
|
16
|
+
applyTransformer?: boolean;
|
|
17
|
+
onContainerRefReady?: (uniqueId: string, ref: React.MutableRefObject<PIXI.Container | null>) => void;
|
|
18
|
+
onSpriteRefReady?: (uniqueId: string, ref: React.MutableRefObject<PIXI.Container | null>) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const PixiThreeModelSprite: React.MemoExoticComponent<({ ref, ...props }: PixiThreeModelSpriteProps & {
|
|
21
|
+
ref?: React.Ref<ForwardedRefResponse | null>;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
23
|
+
export default PixiThreeModelSprite;
|
|
@@ -4,9 +4,18 @@ import * as PIXI from "pixi.js";
|
|
|
4
4
|
export interface PixiVideoSpriteProps extends PixiBaseSpriteProps {
|
|
5
5
|
uniqueId: string;
|
|
6
6
|
src: string;
|
|
7
|
+
/** Source in-point in seconds (where in the file this clip starts). */
|
|
7
8
|
frameStartAt: number;
|
|
9
|
+
/**
|
|
10
|
+
* Source out-point in seconds. Kept for API compatibility; the clip length on
|
|
11
|
+
* the timeline is `endAt - startAt`, which is what drives playback.
|
|
12
|
+
*/
|
|
8
13
|
frameEndAt: number;
|
|
9
14
|
mute: boolean;
|
|
15
|
+
/** 0..1. Applied to the underlying element. Default 1. */
|
|
16
|
+
volume?: number;
|
|
17
|
+
/** Playback rate applied to the element (audio clock). Default 1. */
|
|
18
|
+
speed?: number;
|
|
10
19
|
locked: boolean;
|
|
11
20
|
pointerdown?: () => void;
|
|
12
21
|
pointerup?: () => void;
|
|
@@ -17,10 +26,27 @@ export interface PixiVideoSpriteProps extends PixiBaseSpriteProps {
|
|
|
17
26
|
mouseout?: () => void;
|
|
18
27
|
applyTransformer?: boolean;
|
|
19
28
|
onAnchorTransformationEnd?: (endData: any) => void;
|
|
29
|
+
/** Accepted for API compatibility. Frames are pulled by the timeline, not a ticker. */
|
|
20
30
|
fps?: number;
|
|
21
31
|
onContainerRefReady?: (uniqueId: string, ref: React.MutableRefObject<PIXI.Container | null>) => void;
|
|
22
32
|
onSpriteRefReady?: (uniqueId: string, ref: React.MutableRefObject<PIXI.Container | null>) => void;
|
|
23
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* PixiVideoSprite — video on the Pixi v8 canvas, driven by the master GSAP
|
|
36
|
+
* timeline (scrub model, ported from the Clippy editor).
|
|
37
|
+
*
|
|
38
|
+
* useVideoTexture Assets.load (mp4/webm) or a manual <video> fallback
|
|
39
|
+
* (.mov/.avi...). Ref-counted per URL, 5s load timeout.
|
|
40
|
+
* useVideoLifecycle waiting/stalled state, muted + playbackRate sync.
|
|
41
|
+
* useVideoTimelineSync GSAP dummy tween maps timeline time -> currentTime and
|
|
42
|
+
* calls source.update(). Never play()s while scrubbing,
|
|
43
|
+
* which keeps the browser's concurrent hardware-decode
|
|
44
|
+
* cap (~2-4 videos) from blacking clips out. During real
|
|
45
|
+
* playback (Events.RESUME) the active clip is play()'d so
|
|
46
|
+
* audio is audible.
|
|
47
|
+
*
|
|
48
|
+
* Trimming `frameStartAt` does NOT reload the texture (it is read through a ref).
|
|
49
|
+
*/
|
|
24
50
|
declare const PixiVideoSprite: ({ ref, ...props }: PixiVideoSpriteProps & {
|
|
25
51
|
ref?: React.Ref<ForwardedRefResponse | null>;
|
|
26
52
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,9 @@ export * from './PixiImageSprite';
|
|
|
2
2
|
export * from './PixiSVGSprite';
|
|
3
3
|
export * from './PixiAudioSprite';
|
|
4
4
|
export * from './PixiGifSprite';
|
|
5
|
+
export * from './PixiThreeSprite';
|
|
5
6
|
export * from './PixiTextSprite';
|
|
7
|
+
export * from './PixiCaptionsTrack';
|
|
6
8
|
export * from './PixiVideoSprite';
|
|
7
9
|
export * from './PixiAnimatedSprite';
|
|
8
10
|
export * from './PixiSequence';
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animation System Constants
|
|
3
|
+
*
|
|
4
|
+
* UPPER_SNAKE_CASE names match GSAP effect names in utils/gsapEffects.
|
|
5
|
+
* Use these values for transformation.animationIn.name / animationOut.name.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ANIMATION_TIMING: {
|
|
8
|
+
/** Default animation duration in milliseconds */
|
|
9
|
+
DEFAULT_DURATION_MS: number;
|
|
10
|
+
/** Default animation duration in seconds */
|
|
11
|
+
DEFAULT_DURATION_SEC: number;
|
|
12
|
+
/** Minimum animation duration in seconds */
|
|
13
|
+
MIN_DURATION_SEC: number;
|
|
14
|
+
/** Maximum animation duration in seconds */
|
|
15
|
+
MAX_DURATION_SEC: number;
|
|
16
|
+
/**
|
|
17
|
+
* Entrance overlap at hard cuts (seconds). When element B starts exactly
|
|
18
|
+
* where element A ends AND A has an animationOut AND B has an animationIn,
|
|
19
|
+
* B's entrance begins this long BEFORE B.start so the cut crossfades
|
|
20
|
+
* instead of blinking through a near-black frame (A faded to 0 + B still
|
|
21
|
+
* at scale 0). Clamped per element to its animationIn duration and length.
|
|
22
|
+
* Must match the nodejs renderer (ENTRANCE_OVERLAP_SEC) frame-exactly.
|
|
23
|
+
*/
|
|
24
|
+
ENTRANCE_OVERLAP_SEC: number;
|
|
25
|
+
/** Default speed for loop animations (e.g. SPIN_360), in full rotations per second.
|
|
26
|
+
* 0.25 = one full turn every 4s — a slow, product-turntable-style spin. */
|
|
27
|
+
DEFAULT_LOOP_ROTATIONS_PER_SEC: number; /** Loop animation speed bounds, in rotations per second. */
|
|
28
|
+
MIN_LOOP_ROTATIONS_PER_SEC: number;
|
|
29
|
+
MAX_LOOP_ROTATIONS_PER_SEC: number;
|
|
30
|
+
};
|
|
31
|
+
export declare const CANVAS_DEFAULTS: {
|
|
32
|
+
WIDTH: number;
|
|
33
|
+
HEIGHT: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const ANIMATIONS_WITHOUT_ALPHA: Set<string>;
|
|
36
|
+
export declare const SPECIAL_ANIMATIONS: Set<string>;
|
|
37
|
+
export declare const LOOP_ANIMATIONS: Set<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Check if an animation name is a continuous loop animation (as opposed to
|
|
40
|
+
* an entrance/exit gsap.effects animation).
|
|
41
|
+
* @param {string} animationName
|
|
42
|
+
* @returns {boolean}
|
|
43
|
+
*/
|
|
44
|
+
export declare function isLoopAnimation(animationName: any): boolean;
|
|
45
|
+
export declare const ANIMATION: {
|
|
46
|
+
NONE: string;
|
|
47
|
+
BOUNCE: string;
|
|
48
|
+
FLASH: string;
|
|
49
|
+
PULSE: string;
|
|
50
|
+
RUBBER_BAND: string;
|
|
51
|
+
SHAKE_X: string;
|
|
52
|
+
SHAKE_Y: string;
|
|
53
|
+
HEAD_SHAKE: string;
|
|
54
|
+
SWING: string;
|
|
55
|
+
TADA: string;
|
|
56
|
+
WOBBLE: string;
|
|
57
|
+
JELLO: string;
|
|
58
|
+
HEART_BEAT: string;
|
|
59
|
+
BACK_IN_DOWN: string;
|
|
60
|
+
BACK_IN_LEFT: string;
|
|
61
|
+
BACK_IN_RIGHT: string;
|
|
62
|
+
BACK_IN_UP: string;
|
|
63
|
+
BACK_OUT_DOWN: string;
|
|
64
|
+
BACK_OUT_LEFT: string;
|
|
65
|
+
BACK_OUT_RIGHT: string;
|
|
66
|
+
BACK_OUT_UP: string;
|
|
67
|
+
BOUNCE_IN: string;
|
|
68
|
+
BOUNCE_IN_DOWN: string;
|
|
69
|
+
BOUNCE_IN_LEFT: string;
|
|
70
|
+
BOUNCE_IN_RIGHT: string;
|
|
71
|
+
BOUNCE_IN_UP: string;
|
|
72
|
+
BOUNCE_OUT: string;
|
|
73
|
+
BOUNCE_OUT_DOWN: string;
|
|
74
|
+
BOUNCE_OUT_LEFT: string;
|
|
75
|
+
BOUNCE_OUT_RIGHT: string;
|
|
76
|
+
BOUNCE_OUT_UP: string;
|
|
77
|
+
FADE_IN: string;
|
|
78
|
+
FADE_IN_DOWN: string;
|
|
79
|
+
FADE_IN_DOWN_BIG: string;
|
|
80
|
+
FADE_IN_LEFT: string;
|
|
81
|
+
FADE_IN_LEFT_BIG: string;
|
|
82
|
+
FADE_IN_RIGHT: string;
|
|
83
|
+
FADE_IN_RIGHT_BIG: string;
|
|
84
|
+
FADE_IN_UP: string;
|
|
85
|
+
FADE_IN_UP_BIG: string;
|
|
86
|
+
FADE_IN_TOP_LEFT: string;
|
|
87
|
+
FADE_IN_TOP_RIGHT: string;
|
|
88
|
+
FADE_IN_BOTTOM_LEFT: string;
|
|
89
|
+
FADE_IN_BOTTOM_RIGHT: string;
|
|
90
|
+
FADE_OUT: string;
|
|
91
|
+
FADE_OUT_DOWN: string;
|
|
92
|
+
FADE_OUT_DOWN_BIG: string;
|
|
93
|
+
FADE_OUT_LEFT: string;
|
|
94
|
+
FADE_OUT_LEFT_BIG: string;
|
|
95
|
+
FADE_OUT_RIGHT: string;
|
|
96
|
+
FADE_OUT_RIGHT_BIG: string;
|
|
97
|
+
FADE_OUT_UP: string;
|
|
98
|
+
FADE_OUT_UP_BIG: string;
|
|
99
|
+
FADE_OUT_TOP_LEFT: string;
|
|
100
|
+
FADE_OUT_TOP_RIGHT: string;
|
|
101
|
+
FADE_OUT_BOTTOM_RIGHT: string;
|
|
102
|
+
FADE_OUT_BOTTOM_LEFT: string;
|
|
103
|
+
FLIP: string;
|
|
104
|
+
FLIP_IN_X: string;
|
|
105
|
+
FLIP_IN_Y: string;
|
|
106
|
+
FLIP_OUT_X: string;
|
|
107
|
+
FLIP_OUT_Y: string;
|
|
108
|
+
LIGHT_SPEED_IN_RIGHT: string;
|
|
109
|
+
LIGHT_SPEED_IN_LEFT: string;
|
|
110
|
+
LIGHT_SPEED_OUT_RIGHT: string;
|
|
111
|
+
LIGHT_SPEED_OUT_LEFT: string;
|
|
112
|
+
ROTATE_IN: string;
|
|
113
|
+
ROTATE_IN_DOWN_LEFT: string;
|
|
114
|
+
ROTATE_IN_DOWN_RIGHT: string;
|
|
115
|
+
ROTATE_IN_UP_LEFT: string;
|
|
116
|
+
ROTATE_IN_UP_RIGHT: string;
|
|
117
|
+
ROTATE_OUT: string;
|
|
118
|
+
ROTATE_OUT_DOWN_LEFT: string;
|
|
119
|
+
ROTATE_OUT_DOWN_RIGHT: string;
|
|
120
|
+
ROTATE_OUT_UP_LEFT: string;
|
|
121
|
+
ROTATE_OUT_UP_RIGHT: string;
|
|
122
|
+
HINGE: string;
|
|
123
|
+
JACK_IN_THE_BOX: string;
|
|
124
|
+
ROLL_IN: string;
|
|
125
|
+
ROLL_OUT: string;
|
|
126
|
+
ZOOM_IN: string;
|
|
127
|
+
ZOOM_IN_DOWN: string;
|
|
128
|
+
ZOOM_IN_LEFT: string;
|
|
129
|
+
ZOOM_IN_RIGHT: string;
|
|
130
|
+
ZOOM_IN_UP: string;
|
|
131
|
+
ZOOM_OUT: string;
|
|
132
|
+
ZOOM_OUT_DOWN: string;
|
|
133
|
+
ZOOM_OUT_LEFT: string;
|
|
134
|
+
ZOOM_OUT_RIGHT: string;
|
|
135
|
+
ZOOM_OUT_UP: string;
|
|
136
|
+
SLIDE_IN_DOWN: string;
|
|
137
|
+
SLIDE_IN_LEFT: string;
|
|
138
|
+
SLIDE_IN_RIGHT: string;
|
|
139
|
+
SLIDE_IN_UP: string;
|
|
140
|
+
SLIDE_OUT_DOWN: string;
|
|
141
|
+
SLIDE_OUT_LEFT: string;
|
|
142
|
+
SLIDE_OUT_RIGHT: string;
|
|
143
|
+
SLIDE_OUT_UP: string;
|
|
144
|
+
SPIN_360: string;
|
|
145
|
+
SCALE_POP: string;
|
|
146
|
+
WIPE_LEFT_RIGHT: string;
|
|
147
|
+
WIPE_RADIAL: string;
|
|
148
|
+
MASK_PAINT_ON: string;
|
|
149
|
+
TYPEWRITER: string;
|
|
150
|
+
RISE: string;
|
|
151
|
+
STAGGER_FADE_UP_TEXT: string;
|
|
152
|
+
STAGGER_FADE_TEXT: string;
|
|
153
|
+
STAGGER_FADE_UP: string;
|
|
154
|
+
STAGGER_FADE: string;
|
|
155
|
+
TEXT_CASCADE: string;
|
|
156
|
+
TEXT_SPOTLIGHT: string;
|
|
157
|
+
TEXT_BLINDS: string;
|
|
158
|
+
TEXT_POPCORN: string;
|
|
159
|
+
TEXT_RIPPLE: string;
|
|
160
|
+
TEXT_SHUFFLE: string;
|
|
161
|
+
TEXT_DOMINO: string;
|
|
162
|
+
TEXT_PENDULUM: string;
|
|
163
|
+
TEXT_SLIDE_REVEAL: string;
|
|
164
|
+
TEXT_SLOT: string;
|
|
165
|
+
TEXT_CURTAIN: string;
|
|
166
|
+
LIGHT_SPEED_IN: string;
|
|
167
|
+
LIGHT_SPEED_OUT: string;
|
|
168
|
+
ROATATE_IN_DOWN_LEFT: string;
|
|
169
|
+
ROATATE_IN_DOWN_RIGHT: string;
|
|
170
|
+
ROATATE_IN_UP_LEFT: string;
|
|
171
|
+
ROATATE_IN_UP_RIGHT: string;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Convert a camelCase animation name to UPPER_SNAKE_CASE.
|
|
175
|
+
* Uses explicit map first, then regex fallback.
|
|
176
|
+
* Already-UPPER_SNAKE_CASE names pass through unchanged.
|
|
177
|
+
*
|
|
178
|
+
* @param {string} name - Animation name in any format
|
|
179
|
+
* @returns {string} UPPER_SNAKE_CASE animation name
|
|
180
|
+
*/
|
|
181
|
+
export declare function camelToUpperSnake(name: any): any;
|
|
182
|
+
/**
|
|
183
|
+
* Normalize animation config from various input formats.
|
|
184
|
+
* @param {string|object|null} anim - Animation name or config object
|
|
185
|
+
* @returns {{ name: string, durationSec: number }}
|
|
186
|
+
*/
|
|
187
|
+
interface AnimationConfig {
|
|
188
|
+
name?: string;
|
|
189
|
+
duration?: number;
|
|
190
|
+
}
|
|
191
|
+
interface NormalizedAnimation {
|
|
192
|
+
name: string;
|
|
193
|
+
durationSec: number;
|
|
194
|
+
}
|
|
195
|
+
export declare function normalizeAnimation(anim: string | AnimationConfig | null | undefined): NormalizedAnimation;
|
|
196
|
+
interface LoopAnimationConfig {
|
|
197
|
+
name?: string;
|
|
198
|
+
rotationsPerSecond?: number;
|
|
199
|
+
direction?: 1 | -1;
|
|
200
|
+
}
|
|
201
|
+
interface NormalizedLoopAnimation {
|
|
202
|
+
name: string;
|
|
203
|
+
rotationsPerSecond: number;
|
|
204
|
+
direction: 1 | -1;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Normalize a loop-animation config from various input formats.
|
|
208
|
+
* Mirrors normalizeAnimation() but for `transformation.animationLoop`
|
|
209
|
+
* (continuous animations — see LOOP_ANIMATIONS).
|
|
210
|
+
* @param {string|object|null} anim - Loop animation name or config object
|
|
211
|
+
* @returns {{ name: string, rotationsPerSecond: number, direction: 1|-1 }}
|
|
212
|
+
*/
|
|
213
|
+
export declare function normalizeLoopAnimation(anim: string | LoopAnimationConfig | null | undefined): NormalizedLoopAnimation;
|
|
214
|
+
/**
|
|
215
|
+
* Check if an animation affects the alpha/opacity of the target.
|
|
216
|
+
* @param {string} animationName - The animation name
|
|
217
|
+
* @returns {boolean}
|
|
218
|
+
*/
|
|
219
|
+
export declare function animationAffectsAlpha(animationName: string): boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Check if an animation requires special handling.
|
|
222
|
+
* @param {string} animationName - The animation name
|
|
223
|
+
* @returns {boolean}
|
|
224
|
+
*/
|
|
225
|
+
export declare function isSpecialAnimation(animationName: string): boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Check if an animation name is valid (exists as GSAP effect).
|
|
228
|
+
* @param {string} animationName - The animation name
|
|
229
|
+
* @returns {boolean}
|
|
230
|
+
*/
|
|
231
|
+
export declare function isValidAnimation(animationName: string): boolean;
|
|
232
|
+
export {};
|