reacthub-pixitweenjs 0.3.0-alpha.5 → 0.3.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.
Files changed (72) hide show
  1. package/LICENSE +17 -9
  2. package/LICENSE.md +15 -103
  3. package/README.md +4 -18
  4. package/dist/components/AepComposition/AepComposition.d.ts +2 -1
  5. package/dist/components/AepComposition/AepTransitionContext.d.ts +16 -0
  6. package/dist/components/AepComposition/AepTransitionLayer.d.ts +7 -0
  7. package/dist/components/AepComposition/AepTransitionMesh.d.ts +7 -0
  8. package/dist/components/AepComposition/index.d.ts +8 -0
  9. package/dist/components/AepComposition/model3d/Pixi3DModelLayer.d.ts +1 -1
  10. package/dist/components/AepComposition/transitionEase.d.ts +2 -0
  11. package/dist/components/AepComposition/useAepTransitionClock.d.ts +2 -0
  12. package/dist/components/PixiAnimatedSprite/PixiAnimatedSprite.d.ts +1 -1
  13. package/dist/components/PixiAudioSprite/PixiAudioSprite.d.ts +1 -1
  14. package/dist/components/PixiCaptionsTrack/PixiCaptionsTrack.d.ts +1 -1
  15. package/dist/components/PixiGifSprite/PixiGifGsapSync.d.ts +1 -1
  16. package/dist/components/PixiGlTransition/GlTransitionRegistry.d.ts +9 -0
  17. package/dist/components/PixiGlTransition/GlTransitionRegistryContext.d.ts +10 -0
  18. package/dist/components/PixiGlTransition/PixiElementTransition.d.ts +2 -0
  19. package/dist/components/PixiGlTransition/PixiGlTransition.d.ts +7 -0
  20. package/dist/components/PixiGlTransition/PixiSceneTransition.d.ts +2 -0
  21. package/dist/components/PixiGlTransition/TransitionMeshLayer.d.ts +10 -0
  22. package/dist/components/PixiGlTransition/index.d.ts +7 -0
  23. package/dist/components/PixiGlTransition/sequenceTransitions.d.ts +32 -0
  24. package/dist/components/PixiGlTransition/transitionTypes.d.ts +28 -0
  25. package/dist/components/PixiGlTransition/useGsapTransitionClock.d.ts +2 -0
  26. package/dist/components/PixiGlTransition/useTransitionEndpoints.d.ts +6 -0
  27. package/dist/components/PixiGsapAnims/FadeIn.d.ts +1 -1
  28. package/dist/components/PixiGsapAnims/PixiFlipContainer.d.ts +1 -1
  29. package/dist/components/PixiImageSprite/PixiImageSprite.d.ts +1 -1
  30. package/dist/components/PixiLottieSprite/PixiLottieSprite.d.ts +1 -1
  31. package/dist/components/PixiNullObject/PixiNullObject.d.ts +1 -1
  32. package/dist/components/PixiPreComp/PixiPreComp.d.ts +1 -1
  33. package/dist/components/PixiRemotionSprite/PixiRemotionGifSprite.d.ts +1 -1
  34. package/dist/components/PixiRemotionSprite/PixiRemotionImageSprite.d.ts +1 -1
  35. package/dist/components/PixiRemotionSprite/PixiRemotionSprite.d.ts +1 -1
  36. package/dist/components/PixiRemotionSprite/PixiRemotionVideoCanvaSprite.d.ts +1 -1
  37. package/dist/components/PixiSVGSprite/PixiMorphSvgSprite.d.ts +1 -1
  38. package/dist/components/PixiSVGSprite/PixiSvgImageSprite.d.ts +1 -1
  39. package/dist/components/PixiSVGSprite/PixiSvgPathSprite.d.ts +1 -1
  40. package/dist/components/PixiSVGSprite/PixiSvgRawSprite.d.ts +1 -1
  41. package/dist/components/PixiSequence/PixiSequence.d.ts +9 -1
  42. package/dist/components/PixiShapeLayer/PixiShapeLayer.d.ts +1 -1
  43. package/dist/components/PixiTextSprite/PixiTextSprite.d.ts +1 -1
  44. package/dist/components/PixiThreeSprite/PixiThreeModelSprite.d.ts +1 -1
  45. package/dist/components/PixiVideoSprite/PixiVideoCanvasSync.d.ts +1 -1
  46. package/dist/components/PixiVideoSprite/PixiVideoSprite.d.ts +1 -1
  47. package/dist/components/index.d.ts +1 -0
  48. package/dist/hocs/AbstractContainer.d.ts +1 -1
  49. package/dist/hocs/BorderMaskContainer.d.ts +1 -1
  50. package/dist/hocs/OverlayTilingSprite.d.ts +2 -1
  51. package/dist/hooks/glTransitions/useGLTransitionMesh.d.ts +34 -0
  52. package/dist/hooks/index.d.ts +2 -0
  53. package/dist/importers/aep/index.d.ts +1 -0
  54. package/dist/importers/aep/transitionLint.d.ts +3 -0
  55. package/dist/index.es.js +9709 -8539
  56. package/dist/index.umd.js +109 -65
  57. package/dist/providers/AudioContextProvider.d.ts +1 -1
  58. package/dist/types/aep/composition.d.ts +4 -1
  59. package/dist/types/aep/index.d.ts +1 -0
  60. package/dist/types/aep/transition.d.ts +107 -0
  61. package/dist/types/glTransition.d.ts +33 -0
  62. package/dist/types/index.d.ts +1 -0
  63. package/dist/utils/ContextBridge.d.ts +1 -1
  64. package/dist/utils/glTransitions/buildFragment.d.ts +14 -0
  65. package/dist/utils/glTransitions/capture.d.ts +26 -0
  66. package/dist/utils/glTransitions/catalog.d.ts +124 -0
  67. package/dist/utils/glTransitions/createGLTransitionShader.d.ts +20 -0
  68. package/dist/utils/glTransitions/index.d.ts +8 -0
  69. package/dist/utils/glTransitions/nameMap.d.ts +1 -0
  70. package/dist/utils/glTransitions/resolve.d.ts +9 -0
  71. package/dist/utils/index.d.ts +1 -0
  72. package/package.json +8 -3
@@ -9,4 +9,4 @@ export declare const WebAudioContext: React.Context<WebAudioContextType>;
9
9
  export type AudioContextProviderProps = {
10
10
  children: React.ReactNode;
11
11
  };
12
- export declare const AudioContextProvider: ({ children, }: AudioContextProviderProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const AudioContextProvider: ({ children, }: AudioContextProviderProps) => React.JSX.Element;
@@ -3,8 +3,10 @@ import { AepLayer } from './layer';
3
3
  import { AepAssetMap } from './asset';
4
4
  import { AepPostFx } from './postFx';
5
5
  import { AepThemeMap } from './theme';
6
- export declare const AEP_SCHEMA_VERSION = "1.9.0";
6
+ import { AepTransition } from './transition';
7
+ export declare const AEP_SCHEMA_VERSION = "1.10.0";
7
8
  export declare const AEP_SCHEMA_MAJOR = 1;
9
+ export declare const TRANSITIONS_MIN_VERSION = "1.10.0";
8
10
  declare const aepFontSchema: z.ZodObject<{
9
11
  family: z.ZodString;
10
12
  src: z.ZodOptional<z.ZodString>;
@@ -76,6 +78,7 @@ export interface AepCompositionJson {
76
78
  precomps?: Record<string, AepCompositionJson>;
77
79
  postFx?: AepPostFx[];
78
80
  theme?: AepThemeMap;
81
+ transitions?: AepTransition[];
79
82
  meta?: Record<string, unknown>;
80
83
  }
81
84
  export declare const aepCompositionSchema: z.ZodType<AepCompositionJson>;
@@ -9,6 +9,7 @@ export * from './light';
9
9
  export * from './text-animator';
10
10
  export * from './text-runs';
11
11
  export * from './theme';
12
+ export * from './transition';
12
13
  export * from './layer';
13
14
  export * from './composition';
14
15
  export * from './parse';
@@ -0,0 +1,107 @@
1
+ import { z } from 'zod';
2
+ import { GlTransitionParams } from '../glTransition';
3
+ export declare const aepTransitionSchema: z.ZodEffects<z.ZodObject<{
4
+ id: z.ZodString;
5
+ kind: z.ZodEnum<["element", "scene"]>;
6
+ name: z.ZodString;
7
+ from: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
8
+ to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
9
+ startFrame: z.ZodNumber;
10
+ durationFrames: z.ZodNumber;
11
+ ease: z.ZodOptional<z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodString]>>;
12
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodNumber, "many">]>>>;
13
+ region: z.ZodOptional<z.ZodObject<{
14
+ x: z.ZodNumber;
15
+ y: z.ZodNumber;
16
+ width: z.ZodNumber;
17
+ height: z.ZodNumber;
18
+ }, "strict", z.ZodTypeAny, {
19
+ x: number;
20
+ y: number;
21
+ height: number;
22
+ width: number;
23
+ }, {
24
+ x: number;
25
+ y: number;
26
+ height: number;
27
+ width: number;
28
+ }>>;
29
+ includeShared: z.ZodOptional<z.ZodBoolean>;
30
+ }, "strict", z.ZodTypeAny, {
31
+ name: string;
32
+ id: string;
33
+ kind: "scene" | "element";
34
+ from: string | string[];
35
+ to: string | string[];
36
+ startFrame: number;
37
+ durationFrames: number;
38
+ ease?: string | [number, number, number, number] | undefined;
39
+ params?: Record<string, number | boolean | number[]> | undefined;
40
+ region?: {
41
+ x: number;
42
+ y: number;
43
+ height: number;
44
+ width: number;
45
+ } | undefined;
46
+ includeShared?: boolean | undefined;
47
+ }, {
48
+ name: string;
49
+ id: string;
50
+ kind: "scene" | "element";
51
+ from: string | string[];
52
+ to: string | string[];
53
+ startFrame: number;
54
+ durationFrames: number;
55
+ ease?: string | [number, number, number, number] | undefined;
56
+ params?: Record<string, number | boolean | number[]> | undefined;
57
+ region?: {
58
+ x: number;
59
+ y: number;
60
+ height: number;
61
+ width: number;
62
+ } | undefined;
63
+ includeShared?: boolean | undefined;
64
+ }>, {
65
+ name: string;
66
+ id: string;
67
+ kind: "scene" | "element";
68
+ from: string | string[];
69
+ to: string | string[];
70
+ startFrame: number;
71
+ durationFrames: number;
72
+ ease?: string | [number, number, number, number] | undefined;
73
+ params?: Record<string, number | boolean | number[]> | undefined;
74
+ region?: {
75
+ x: number;
76
+ y: number;
77
+ height: number;
78
+ width: number;
79
+ } | undefined;
80
+ includeShared?: boolean | undefined;
81
+ }, {
82
+ name: string;
83
+ id: string;
84
+ kind: "scene" | "element";
85
+ from: string | string[];
86
+ to: string | string[];
87
+ startFrame: number;
88
+ durationFrames: number;
89
+ ease?: string | [number, number, number, number] | undefined;
90
+ params?: Record<string, number | boolean | number[]> | undefined;
91
+ region?: {
92
+ x: number;
93
+ y: number;
94
+ height: number;
95
+ width: number;
96
+ } | undefined;
97
+ includeShared?: boolean | undefined;
98
+ }>;
99
+ export type AepTransition = z.infer<typeof aepTransitionSchema>;
100
+ export interface AepTransitionOverride {
101
+ name?: string;
102
+ params?: GlTransitionParams;
103
+ durationFrames?: number;
104
+ disabled?: boolean;
105
+ }
106
+ export type AepTransitionOverrideMap = Record<string, AepTransitionOverride>;
107
+ export declare const transitionLayerIds: (value: AepTransition["from"] | AepTransition["to"]) => string[];
@@ -0,0 +1,33 @@
1
+ import { default as React } from 'react';
2
+ import type * as PIXI from "pixi.js";
3
+ export type GlTransitionParam = number | boolean | number[];
4
+ export type GlTransitionParams = Record<string, GlTransitionParam>;
5
+ export interface GlTransitionConfig {
6
+ type: string;
7
+ name: string;
8
+ duration: number;
9
+ ease: string;
10
+ params: GlTransitionParams;
11
+ }
12
+ export interface TransitionTiming {
13
+ start: number;
14
+ end: number;
15
+ duration: number;
16
+ }
17
+ /** The part of a transition every pipeline supplies: identity, shader and timing. */
18
+ export interface TransitionPairBase {
19
+ pairId: string;
20
+ config: GlTransitionConfig;
21
+ timing: TransitionTiming;
22
+ }
23
+ export interface ElementTransitionPair extends TransitionPairBase {
24
+ fromElementId: string;
25
+ toElementId: string;
26
+ }
27
+ export interface SceneTransitionPair extends TransitionPairBase {
28
+ fromSceneId: string;
29
+ toSceneId: string;
30
+ }
31
+ export type TransitionPair = ElementTransitionPair | SceneTransitionPair;
32
+ export type ContainerRefValue = React.RefObject<PIXI.Container | null> | PIXI.Container | null;
33
+ export type ContainerRefsMap = React.MutableRefObject<Record<string, ContainerRefValue>> | null | undefined;
@@ -4,5 +4,6 @@ export * from './BlendModes';
4
4
  export * from './OverlayTypes';
5
5
  export * from './transformation';
6
6
  export * from './MaskTypes';
7
+ export * from './glTransition';
7
8
  export * from './CropTypes';
8
9
  export * from './aep';
@@ -3,5 +3,5 @@ declare const ContextBridge: <T>({ children, Context, render, }: {
3
3
  children: React.ReactNode;
4
4
  Context: React.Context<T>;
5
5
  render: (children: React.ReactNode) => React.JSX.Element;
6
- }) => import("react/jsx-runtime").JSX.Element;
6
+ }) => React.JSX.Element;
7
7
  export default ContextBridge;
@@ -0,0 +1,14 @@
1
+ import { GlTransitionParam, GlTransitionParams } from '../../types/glTransition';
2
+ export declare const VERTEX = "in vec2 aPosition;\nin vec2 aUV;\nout vec2 vTextureCoord;\n\nuniform mat3 uProjectionMatrix;\nuniform mat3 uWorldTransformMatrix;\nuniform mat3 uTransformMatrix;\n\nvoid main(void) {\n mat3 mvp = uProjectionMatrix * uWorldTransformMatrix * uTransformMatrix;\n gl_Position = vec4((mvp * vec3(aPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aUV;\n}\n";
3
+ export declare const FALLBACK_FRAGMENT = "precision highp float;\nin vec2 vTextureCoord;\nout vec4 finalColor;\nuniform sampler2D uFromTexture;\nuniform sampler2D uToTexture;\nuniform float progress;\nvoid main(void) {\n finalColor = mix(texture(uFromTexture, vTextureCoord), texture(uToTexture, vTextureCoord), progress);\n}\n";
4
+ export declare const extractExistingUniforms: (glsl: string) => Set<string>;
5
+ export declare const extractUniformTypes: (glsl: string) => Map<string, string>;
6
+ export interface UniformDef {
7
+ value: number | Float32Array | Int32Array;
8
+ type: string;
9
+ }
10
+ export declare const uniformFromGlslType: (glslType: string, value: GlTransitionParam) => UniformDef | null;
11
+ export declare const glslDecl: (key: string, value: GlTransitionParam) => string;
12
+ export declare const stripInParamQualifier: (glsl: string) => string;
13
+ export declare const buildFragment: (rawTransitionGLSL: string, allParams: GlTransitionParams) => string;
14
+ export declare const uniformEntry: (value: GlTransitionParam) => UniformDef;
@@ -0,0 +1,26 @@
1
+ import { Container, Geometry, Renderer, RenderTexture } from 'pixi.js';
2
+ export interface TransitionLayer {
3
+ container: Container;
4
+ zIndex: number;
5
+ }
6
+ export interface TransitionRegion {
7
+ x: number;
8
+ y: number;
9
+ width: number;
10
+ height: number;
11
+ }
12
+ export interface MutableContainerRef {
13
+ current: Container | null;
14
+ }
15
+ /** gl-transitions shaders are GLSL, so only the WebGL renderer can run them. */
16
+ export declare const isWebGLRenderer: (renderer: Pick<Renderer, "type"> | null | undefined) => boolean;
17
+ /** Default cap on capture size; larger regions render at reduced resolution. */
18
+ export declare const DEFAULT_MAX_REGION_PIXELS: number;
19
+ /** Render-texture resolution (<= 1) that keeps a region within `maxPixels`. */
20
+ export declare const regionResolution: (region: Pick<TransitionRegion, "width" | "height">, maxPixels?: number) => number;
21
+ export declare const isPlaceholderSprite: (container: Container) => boolean;
22
+ export declare const withForcedVisible: (container: Container) => (() => void);
23
+ export declare const renderLayersIntoRT: (renderer: Renderer, tempContainerRef: MutableContainerRef, layers: TransitionLayer[], renderTexture: RenderTexture, offsetX?: number, offsetY?: number) => void;
24
+ export declare const makeFullScreenQuad: () => Geometry;
25
+ export declare const getContainerRegion: (container: Container) => TransitionRegion;
26
+ export declare const unionRegion: (regions: Array<TransitionRegion | null | undefined>) => TransitionRegion | null;
@@ -0,0 +1,124 @@
1
+ /**
2
+ * GL Transition types based on gl-transitions library
3
+ * @see https://github.com/gl-transitions/gl-transitions/tree/master/transitions
4
+ */
5
+ export declare const Transitions: {
6
+ readonly NONE: "none";
7
+ readonly FADE: "fade";
8
+ readonly DISSOLVE: "dissolve";
9
+ readonly WIPE: "wipe";
10
+ readonly WIPE_LEFT: "wipeLeft";
11
+ readonly WIPE_RIGHT: "wipeRight";
12
+ readonly WIPE_UP: "wipeUp";
13
+ readonly WIPE_DOWN: "wipeDown";
14
+ readonly DIRECTIONAL: "directional";
15
+ readonly DIRECTIONAL_EASING: "directional-easing";
16
+ readonly DIRECTIONAL_SCALED: "directionalScaled";
17
+ readonly DIRECTIONAL_WARP: "directionalwarp";
18
+ readonly DIRECTIONAL_WIPE: "directionalwipe";
19
+ readonly LEFT_RIGHT: "leftRight";
20
+ readonly TOP_BOTTOM: "topBottom";
21
+ readonly CROSS_ZOOM: "crossZoom";
22
+ readonly SIMPLE_ZOOM: "simpleZoom";
23
+ readonly SIMPLE_ZOOM_OUT: "simpleZoomOut";
24
+ readonly ZOOM_IN_CIRCLES: "zoomInCircles";
25
+ readonly ZOOM_LEFT_WIPE: "zoomLeftWipe";
26
+ readonly ZOOM_RIGHT_WIPE: "zoomRigthWipe";
27
+ readonly SCALE_IN: "scale-in";
28
+ readonly CIRCLE: "circle";
29
+ readonly CIRCLE_OPEN: "circleopen";
30
+ readonly CIRCLE_CROP: "circleCrop";
31
+ readonly RECTANGLE: "rectangle";
32
+ readonly RECTANGLE_CROP: "rectangleCrop";
33
+ readonly HEART: "heart";
34
+ readonly HEXAGONALIZE: "hexagonalize";
35
+ readonly POLKA_DOTS_CURTAIN: "polkaDotsCurtain";
36
+ readonly RANDOM_SQUARES: "randomsquares";
37
+ readonly SQUARES_WIRE: "squareswire";
38
+ readonly ANGULAR: "angular";
39
+ readonly CUBE: "cube";
40
+ readonly ROTATE_SCALE_FADE: "rotate_scale_fade";
41
+ readonly ROTATE_SCALE_VANISH: "rotateScaleVanish";
42
+ readonly ROTATE_TRANSITION: "rotateTransition";
43
+ readonly BOOK_FLIP: "bookFlip";
44
+ readonly PAGE_CURL: "pageCurl";
45
+ readonly INVERTED_PAGE_CURL: "invertedPageCurl";
46
+ readonly BOW_TIE_HORIZONTAL: "bowTieHorizontal";
47
+ readonly BOW_TIE_VERTICAL: "bowTieVertical";
48
+ readonly BOW_TIE_WITH_PARAMETER: "bowTieWithParameter";
49
+ readonly HORIZONTAL_OPEN: "horizontalOpen";
50
+ readonly HORIZONTAL_CLOSE: "horizontalClose";
51
+ readonly VERTICAL_OPEN: "verticalOpen";
52
+ readonly VERTICAL_CLOSE: "verticalClose";
53
+ readonly LINEAR_BLUR: "linearBlur";
54
+ readonly DREAMY: "dreamy";
55
+ readonly DREAMY_ZOOM: "dreamyZoom";
56
+ readonly SWIRL: "swirl";
57
+ readonly RIPPLE: "ripple";
58
+ readonly WIND: "wind";
59
+ readonly WATER_DROP: "waterDrop";
60
+ readonly DISPLACEMENT: "displacement";
61
+ readonly SQUEEZE: "squeeze";
62
+ readonly GLITCH_DISPLACE: "glitchDisplace";
63
+ readonly GLITCH_MEMORIES: "glitchMemories";
64
+ readonly TV_STATIC: "tvStatic";
65
+ readonly STATIC_FADE: "staticFade";
66
+ readonly STATIC_WIPE: "static_wipe";
67
+ readonly PARAMETRIC_GLITCH: "parametric_glitch";
68
+ readonly BURN: "burn";
69
+ readonly FILM_BURN: "filmBurn";
70
+ readonly UNDULATING_BURN_OUT: "undulatingBurnOut";
71
+ readonly DOOM_SCREEN_TRANSITION: "doomScreenTransition";
72
+ readonly OVEREXPOSURE: "overexposure";
73
+ readonly FADE_COLOR: "fadecolor";
74
+ readonly FADE_GRAYSCALE: "fadegrayscale";
75
+ readonly COLOR_PHASE: "colorphase";
76
+ readonly COLOUR_DISTANCE: "colourDistance";
77
+ readonly MULTIPLY_BLEND: "multiply_blend";
78
+ readonly GRID_FLIP: "gridFlip";
79
+ readonly MOSAIC: "mosaic";
80
+ readonly MOSAIC_TRANSITION: "mosaic_transition";
81
+ readonly PIXELIZE: "pixelize";
82
+ readonly CROSSHATCH: "crosshatch";
83
+ readonly WINDOW_BLINDS: "windowblinds";
84
+ readonly WINDOW_SLICE: "windowslice";
85
+ readonly MORPH: "morph";
86
+ readonly SWAP: "swap";
87
+ readonly CROSSWARP: "crosswarp";
88
+ readonly POLAR_FUNCTION: "polar_function";
89
+ readonly COORD_FROM_IN: "coord-from-in";
90
+ readonly KALEIDOSCOPE: "kaleidoscope";
91
+ readonly POWER_KALEIDO: "powerKaleido";
92
+ readonly PINWHEEL: "pinwheel";
93
+ readonly FLYEYE: "flyeye";
94
+ readonly STEREO_VIEWER: "stereoViewer";
95
+ readonly PERLIN: "perlin";
96
+ readonly RANDOM_NOISEX: "randomNoisex";
97
+ readonly TANGENT_MOTION_BLUR: "tangentMotionBlur";
98
+ readonly LUMA: "luma";
99
+ readonly LUMINANCE_MELT: "luminance_melt";
100
+ readonly BOUNCE: "bounce";
101
+ readonly BUTTERFLY_WAVE_SCRAWLER: "butterflyWaveScrawler";
102
+ readonly CRAZY_PARAMETRIC_FUN: "crazyParametricFun";
103
+ readonly CANNABIS_LEAF: "cannabisleaf";
104
+ readonly RADIAL: "radial";
105
+ readonly ROLLS: "rolls";
106
+ readonly SLIDES: "slides";
107
+ readonly DOORWAY: "doorway";
108
+ readonly EDGE_TRANSITION: "edgeTransition";
109
+ readonly X_AXIS_TRANSLATION: "x_axis_translation";
110
+ readonly SIMPLE_FLIP: "simpleFlip";
111
+ readonly HSV_FADE: "hsvfade";
112
+ readonly FOLD: "fold";
113
+ readonly BLOCK_DISSOLVE: "blockDissolve";
114
+ readonly ADVANCED_MOSAIC: "advancedMosaic";
115
+ readonly DEFOCUS_BLUR: "defocusBlur";
116
+ readonly PUZZLE_RIGHT: "puzzleRight";
117
+ readonly TILES_WAVE: "tilesWave";
118
+ readonly STAR_WIPE: "starWipe";
119
+ readonly CHESSBOARD: "chessboard";
120
+ readonly BURN_EFFECT: "burn0";
121
+ readonly FRAGMENT: "fragment";
122
+ readonly ZOOM_IN_OUT: "zoomInOut";
123
+ };
124
+ export type TransitionKey = keyof typeof Transitions;
@@ -0,0 +1,20 @@
1
+ import { Shader, RenderTexture, TextureSource } from 'pixi.js';
2
+ import { GlTransitionParams } from '../../types/glTransition';
3
+ export interface CreateGLTransitionShaderOptions {
4
+ width?: number;
5
+ height?: number;
6
+ params?: GlTransitionParams;
7
+ }
8
+ type BindableTexture = RenderTexture | {
9
+ source?: TextureSource;
10
+ } | null | undefined;
11
+ export interface GLTransitionShader {
12
+ shader: Shader;
13
+ resolvedName: string | null;
14
+ setProgress: (progress: number) => void;
15
+ setTextures: (fromTexture: BindableTexture, toTexture: BindableTexture) => void;
16
+ clearTextures: () => void;
17
+ destroy: () => void;
18
+ }
19
+ export declare const createGLTransitionShader: (transitionName: string, options?: CreateGLTransitionShaderOptions) => GLTransitionShader;
20
+ export {};
@@ -0,0 +1,8 @@
1
+ export { Transitions } from './catalog';
2
+ export type { TransitionKey } from './catalog';
3
+ export { getTransitionShader, transitionExists, getAvailableTransitions, getTransitionInfo, listGlTransitionNames, } from './resolve';
4
+ export { createGLTransitionShader } from './createGLTransitionShader';
5
+ export type { CreateGLTransitionShaderOptions, GLTransitionShader, } from './createGLTransitionShader';
6
+ export type { Transition as GlTransition } from 'gl-transitions';
7
+ export type { TransitionRegion } from './capture';
8
+ export { DEFAULT_MAX_REGION_PIXELS } from './capture';
@@ -0,0 +1 @@
1
+ export declare const TRANSITION_NAME_MAP: Record<string, string>;
@@ -0,0 +1,9 @@
1
+ import { Transition as GlTransition } from 'gl-transitions';
2
+ export declare const getTransitionShader: (transitionName: string | null | undefined) => GlTransition | null;
3
+ export declare const transitionExists: (transitionName: string | null | undefined) => boolean;
4
+ export declare const getAvailableTransitions: () => string[];
5
+ export declare const getTransitionInfo: (transitionName: string | null | undefined) => GlTransition | null;
6
+ export declare const listGlTransitionNames: () => string[];
7
+ export declare const warnUnknownTransitionOnce: (name: string) => void;
8
+ /** Test helper that resets warning deduplication without changing lookup behavior. */
9
+ export declare const _clearUnknownTransitionWarnings: () => void;
@@ -1,4 +1,5 @@
1
1
  export { isExternalUrl } from './isExternalUrl';
2
+ export * from './glTransitions';
2
3
  export { loadSpriteTexture, type LoadSpriteTextureOptions, } from './loadSpriteTexture';
3
4
  export { areSpritePropsEqual, SPRITE_REF_PROP_NAMES, } from './areSpritePropsEqual';
4
5
  export { resolveTextRuns, resolveTextRunsWithWarnings, } from './text/resolveTextRuns';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reacthub-pixitweenjs",
3
- "version": "0.3.0-alpha.5",
3
+ "version": "0.3.1",
4
4
  "description": "reacthub-pixitweenjs is a library that provides a powerful combination of React, PixiJS, GSAP, and image manipulation capabilities in a timeline sequence. With this library, you can easily create stunning animations and interactive graphics for your React applications",
5
5
  "author": "khanzzirfan <reacthub.ai@gmail.com>",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  "url": "https://github.com/khanzzirfan/reacthub-pixitweenjs"
33
33
  },
34
34
  "homepage": "https://pixitweenjs.xyz",
35
- "license": "SEE LICENSE IN LICENSE.md",
35
+ "license": "MIT",
36
36
  "scripts": {
37
37
  "dev": "vite",
38
38
  "build": "tsc && vite build",
@@ -110,10 +110,14 @@
110
110
  "eslint": "^8.45.0",
111
111
  "eslint-config-airbnb": "^19.0.4",
112
112
  "eslint-config-airbnb-typescript": "^17.1.0",
113
+ "eslint-plugin-import": "^2.25.3",
114
+ "eslint-plugin-jsx-a11y": "^6.5.1",
115
+ "eslint-plugin-react": "^7.28.0",
113
116
  "eslint-plugin-react-hooks": "^4.6.0",
114
117
  "eslint-plugin-react-refresh": "^0.3.5",
115
118
  "eslint-plugin-storybook": "^10.4.0",
116
119
  "framer-motion": "^12.0.0",
120
+ "gl-transitions": "^1.67.0",
117
121
  "gsap": "^3.15.0",
118
122
  "jest": "^29.7.0",
119
123
  "jest-image-snapshot": "^6.4.0",
@@ -138,7 +142,7 @@
138
142
  "typescript-plugin-css-modules": "^5.0.1",
139
143
  "vite": "^7.0.0",
140
144
  "vite-plugin-dts": "^5.0.0",
141
- "vite-plugin-environment": "^1.1.3",
145
+ "vite-plugin-environment": "1.1.3",
142
146
  "vitest": "^4.0.0"
143
147
  },
144
148
  "dependencies": {
@@ -154,6 +158,7 @@
154
158
  "@react-three/fiber": "^9.6.1",
155
159
  "@react-three/postprocessing": "^3.0.4",
156
160
  "audiomotion-analyzer": "^4.3.0",
161
+ "gl-transitions": "^1.67.0",
157
162
  "gsap": "^3.15.0",
158
163
  "lottie-web": "^5.10.2",
159
164
  "pixi-filters": "^6.1.5",