reacthub-pixitweenjs 0.2.109-alpha.7 → 0.3.0-alpha.4
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/LICENSE +8 -16
- package/LICENSE.md +79 -239
- package/README.md +253 -106
- package/dist/components/AepComposition/Aep3DPostFx.d.ts +7 -0
- package/dist/components/AepComposition/Aep3DPrecompPlane.d.ts +9 -0
- package/dist/components/AepComposition/Aep3DScene.d.ts +14 -0
- package/dist/components/AepComposition/Aep3DShapeMesh.d.ts +13 -0
- package/dist/components/AepComposition/Aep3DTextMesh.d.ts +17 -0
- package/dist/components/AepComposition/AepAssetResolver.d.ts +13 -0
- package/dist/components/AepComposition/AepAudioLayer.d.ts +34 -0
- package/dist/components/AepComposition/AepComposition.d.ts +18 -0
- package/dist/components/AepComposition/AepLayerProvider.d.ts +30 -0
- package/dist/components/AepComposition/AepLayerRouter.d.ts +5 -0
- package/dist/components/AepComposition/AepMsdfTextMesh.d.ts +17 -0
- package/dist/components/AepComposition/AepPrecompRenderContext.d.ts +23 -0
- package/dist/components/AepComposition/AepPrecompRenderer.d.ts +8 -0
- package/dist/components/AepComposition/AepTextOverrideContext.d.ts +8 -0
- package/dist/components/AepComposition/AepThemeContext.d.ts +8 -0
- package/dist/components/AepComposition/AudioPlaybackManager.d.ts +38 -0
- package/dist/components/AepComposition/composeTransform3D.d.ts +27 -0
- package/dist/components/AepComposition/index.d.ts +42 -0
- package/dist/components/AepComposition/matteSourceIds.d.ts +2 -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/AepComposition/msdfAtlasRegistry.d.ts +16 -0
- package/dist/components/AepComposition/pathToThreeShape.d.ts +4 -0
- package/dist/components/AepComposition/resolveParentChain.d.ts +3 -0
- package/dist/components/AepComposition/resolvePostFxList.d.ts +2 -0
- package/dist/components/AepComposition/shouldSplitText.d.ts +26 -0
- package/dist/components/AepComposition/threeTextureFromPixi.d.ts +8 -0
- package/dist/components/AepComposition/useAepLayerTransform.d.ts +18 -0
- package/dist/components/AepComposition/useAepLayerTransform3D.d.ts +8 -0
- package/dist/components/AepComposition/useMsdfAtlasRegistry.d.ts +6 -0
- package/dist/components/AepComposition/usePixiRenderTexture.d.ts +14 -0
- package/dist/components/AepComposition/useResolveAsset.d.ts +8 -0
- package/dist/components/AepMask/AepMaskContainer.d.ts +9 -0
- package/dist/components/AepMask/PixiTrackMatte.d.ts +10 -0
- package/dist/components/AepMask/drawAepMask.d.ts +3 -0
- package/dist/components/AepMask/index.d.ts +5 -0
- package/dist/components/PixiAudioSprite/HowlerAudioSprite.d.ts +12 -8
- package/dist/components/PixiAudioSprite/PixiAudioSprite.d.ts +43 -3
- package/dist/components/PixiAudioSprite/index.d.ts +3 -0
- package/dist/components/PixiAudioSprite/useAudioVisualizer.d.ts +30 -15
- package/dist/components/PixiAudioSprite/wave-config.d.ts +0 -1
- 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/PixiGifSprite/PixiGifGsapSync.d.ts +11 -10
- package/dist/components/PixiImageSprite/PixiImageSprite.d.ts +28 -2
- package/dist/components/PixiLottieSprite/PixiLottieSprite.d.ts +5 -2
- package/dist/components/PixiNullObject/PixiNullObject.d.ts +25 -0
- package/dist/components/PixiNullObject/index.d.ts +2 -0
- package/dist/components/PixiPreComp/PixiPreComp.d.ts +29 -0
- package/dist/components/PixiPreComp/index.d.ts +3 -0
- package/dist/components/PixiPreComp/validatePrecompDepth.d.ts +2 -0
- package/dist/components/PixiRemotionSprite/PixiRemotionGifSprite.d.ts +24 -0
- package/dist/components/PixiRemotionSprite/PixiRemotionImageSprite.d.ts +18 -0
- package/dist/components/PixiRemotionSprite/PixiRemotionSprite.d.ts +5 -2
- package/dist/components/PixiRemotionSprite/PixiRemotionVideoCanvaSprite.d.ts +20 -0
- package/dist/components/PixiRemotionSprite/index.d.ts +4 -0
- package/dist/components/PixiSVGSprite/PixiMorphSvgSprite.d.ts +35 -0
- package/dist/components/PixiSVGSprite/PixiSvgImageSprite.d.ts +35 -0
- package/dist/components/PixiSVGSprite/PixiSvgPathSprite.d.ts +21 -4
- package/dist/components/PixiSVGSprite/PixiSvgRawSprite.d.ts +30 -0
- package/dist/components/PixiSVGSprite/index.d.ts +5 -0
- package/dist/components/PixiSequence/PixiSequence.d.ts +29 -5
- package/dist/components/PixiShapeLayer/PixiShapeLayer.d.ts +43 -0
- package/dist/components/PixiShapeLayer/drawShape.d.ts +20 -0
- package/dist/components/PixiShapeLayer/index.d.ts +4 -0
- package/dist/components/PixiShapeLayer/samplePath.d.ts +5 -0
- package/dist/components/PixiTextSprite/PixiTextSplit.d.ts +26 -0
- package/dist/components/PixiTextSprite/PixiTextSprite.d.ts +42 -5
- package/dist/components/PixiTextSprite/index.d.ts +3 -0
- package/dist/components/PixiTextSprite/resolveTextSplitFills.d.ts +27 -0
- package/dist/components/PixiTextSprite/textAnimator.d.ts +22 -0
- package/dist/components/PixiThreeSprite/PixiThreeModelSprite.d.ts +23 -0
- package/dist/components/PixiThreeSprite/PixiThreeSprite.d.ts +14 -0
- package/dist/components/PixiThreeSprite/index.d.ts +4 -0
- package/dist/components/PixiUnifiedTransformer/PixiUnifiedTransformer.d.ts +20 -8
- package/dist/components/PixiVideoSprite/PixiVideoCanvasSync.d.ts +3 -1
- package/dist/components/PixiVideoSprite/PixiVideoSprite.d.ts +31 -2
- package/dist/components/index.d.ts +7 -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/events/Events.d.ts +0 -1
- 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 +8 -1
- package/dist/hocs/BorderMaskContainer.d.ts +43 -0
- package/dist/hocs/OverlayTilingSprite.d.ts +3 -3
- package/dist/hocs/drawMaskShape.d.ts +7 -0
- package/dist/hocs/index.d.ts +5 -0
- package/dist/hooks/aep/buildAudioLevelTimeline.d.ts +7 -0
- package/dist/hooks/aep/buildBezierPathTimeline.d.ts +13 -0
- package/dist/hooks/aep/buildColorValueTimeline.d.ts +24 -0
- package/dist/hooks/aep/buildLayerTimeline.d.ts +20 -0
- package/dist/hooks/aep/buildScalarValueTimeline.d.ts +6 -0
- package/dist/hooks/aep/buildVec2ValueTimeline.d.ts +17 -0
- package/dist/hooks/aep/easeCache.d.ts +3 -0
- package/dist/hooks/aep/effectRegistry.d.ts +5 -0
- package/dist/hooks/aep/effects/brightnessContrast.d.ts +2 -0
- package/dist/hooks/aep/effects/dropShadow.d.ts +2 -0
- package/dist/hooks/aep/effects/fastBoxBlur.d.ts +2 -0
- package/dist/hooks/aep/effects/gaussianBlur.d.ts +2 -0
- package/dist/hooks/aep/effects/glow.d.ts +2 -0
- package/dist/hooks/aep/effects/hueSaturation.d.ts +2 -0
- package/dist/hooks/aep/effects/index.d.ts +9 -0
- package/dist/hooks/aep/effects/levels.d.ts +2 -0
- package/dist/hooks/aep/effects/tint.d.ts +2 -0
- package/dist/hooks/aep/effects/types.d.ts +8 -0
- package/dist/hooks/aep/index.d.ts +22 -0
- package/dist/hooks/aep/interpolateBezierPath.d.ts +3 -0
- package/dist/hooks/aep/sampleAnimatable.d.ts +13 -0
- package/dist/hooks/aep/useAepBezierPathAnimator.d.ts +12 -0
- package/dist/hooks/aep/useAepColorAnimator.d.ts +11 -0
- package/dist/hooks/aep/useAepCurrentFrame.d.ts +1 -0
- package/dist/hooks/aep/useAepEffectKeyframes.d.ts +4 -0
- package/dist/hooks/aep/useAepEffects.d.ts +3 -0
- package/dist/hooks/aep/useAepKeyframes.d.ts +15 -0
- package/dist/hooks/aep/useAepTextLayout.d.ts +12 -0
- package/dist/hooks/aep/useAepValueAnimator.d.ts +2 -0
- package/dist/hooks/aep/useAepVec2Animator.d.ts +10 -0
- package/dist/hooks/aep/useTypefaceMetrics.d.ts +2 -0
- package/dist/hooks/index.d.ts +12 -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 +81 -0
- 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 +325 -4
- package/dist/hooks/withFiltersHook.d.ts +104 -38
- package/dist/importers/aep/bodymovin-color-controls.d.ts +23 -0
- package/dist/importers/aep/bodymovin-color.d.ts +1 -0
- package/dist/importers/aep/bodymovin-keyframe.d.ts +42 -0
- package/dist/importers/aep/bodymovin-layer.d.ts +84 -0
- package/dist/importers/aep/bodymovin-transform.d.ts +12 -0
- package/dist/importers/aep/bodymovin.d.ts +7 -0
- package/dist/importers/aep/bodymovinCameras.d.ts +34 -0
- package/dist/importers/aep/bodymovinExtensions.d.ts +3 -0
- package/dist/importers/aep/bodymovinTextRuns.d.ts +13 -0
- package/dist/importers/aep/index.d.ts +7 -0
- package/dist/importers/aep/lottieLint.d.ts +23 -0
- package/dist/importers/aep/lottieLint.rules.d.ts +6 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +76991 -30787
- package/dist/index.umd.js +5621 -1699
- package/dist/lib/pixi-essentials/bounds/AxisAlignedBounds.d.ts +121 -0
- package/dist/lib/pixi-essentials/bounds/OrientedBounds.d.ts +103 -0
- package/dist/lib/pixi-essentials/bounds/index.d.ts +2 -0
- package/dist/lib/pixi-essentials/index.d.ts +6 -0
- package/dist/lib/pixi-essentials/object-pool/AverageProvider.d.ts +28 -0
- package/dist/lib/pixi-essentials/object-pool/ObjectPool.d.ts +103 -0
- package/dist/lib/pixi-essentials/object-pool/ObjectPoolFactory.d.ts +40 -0
- package/dist/lib/pixi-essentials/object-pool/index.d.ts +2 -0
- package/dist/lib/pixi-essentials/react-bindings/Transformer.d.ts +74 -0
- package/dist/lib/pixi-essentials/react-bindings/index.d.ts +3 -0
- package/dist/lib/pixi-essentials/react-bindings/utils/applyEventProps.d.ts +13 -0
- package/dist/lib/pixi-essentials/transformer/Transformer.d.ts +728 -0
- package/dist/lib/pixi-essentials/transformer/TransformerHandle.d.ts +142 -0
- package/dist/lib/pixi-essentials/transformer/TransformerWireframe.d.ts +54 -0
- package/dist/lib/pixi-essentials/transformer/index.d.ts +5 -0
- package/dist/lib/pixi-essentials/transformer/utils/decomposeTransform.d.ts +11 -0
- package/dist/lib/pixi-essentials/transformer/utils/distanceToLine.d.ts +7 -0
- package/dist/lib/pixi-essentials/transformer/utils/multiplyTransform.d.ts +17 -0
- package/dist/lib/pixi-essentials/transformer/utils/skewTransform.d.ts +13 -0
- package/dist/providers/GsapPixieContextProvider.d.ts +7 -0
- package/dist/types/BaseProps.d.ts +51 -16
- package/dist/types/CropTypes.d.ts +12 -0
- package/dist/types/Effects.d.ts +674 -13
- package/dist/types/MaskTypes.d.ts +10 -0
- package/dist/types/OverlayTypes.d.ts +9 -0
- package/dist/types/aep/asset.d.ts +43 -0
- package/dist/types/aep/camera.d.ts +778 -0
- package/dist/types/aep/composition.d.ts +82 -0
- package/dist/types/aep/effect.d.ts +137 -0
- package/dist/types/aep/index.d.ts +14 -0
- package/dist/types/aep/layer.d.ts +26546 -0
- package/dist/types/aep/light.d.ts +781 -0
- package/dist/types/aep/mask.d.ts +193 -0
- package/dist/types/aep/parse.d.ts +11 -0
- package/dist/types/aep/postFx.d.ts +107 -0
- package/dist/types/aep/text-animator.d.ts +687 -0
- package/dist/types/aep/text-runs.d.ts +234 -0
- package/dist/types/aep/theme.d.ts +72 -0
- package/dist/types/aep/transform.d.ts +285 -0
- package/dist/types/aep/transform3D.d.ts +171 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/utils/AppStateProvider.d.ts +1 -0
- package/dist/utils/AppWrapper.d.ts +3 -0
- package/dist/utils/ContextBridge.d.ts +1 -1
- package/dist/utils/GsapAnims.d.ts +0 -1
- package/dist/utils/InteractionManager.d.ts +1 -10
- package/dist/utils/PixiSelector.d.ts +17 -0
- package/dist/utils/aeMath/zoomToFov.d.ts +1 -0
- package/dist/utils/areSpritePropsEqual.d.ts +8 -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/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 +31 -0
- package/dist/utils/isExternalUrl.d.ts +1 -0
- package/dist/utils/loadSpriteTexture.d.ts +39 -0
- package/dist/utils/msdf/computeInstanceMatrix.d.ts +18 -0
- package/dist/utils/msdf/index.d.ts +4 -0
- package/dist/utils/msdf/loadMsdfAtlas.d.ts +9 -0
- package/dist/utils/msdf/msdfShader.d.ts +2 -0
- package/dist/utils/msdf/types.d.ts +49 -0
- package/dist/utils/pixiExtend.d.ts +0 -0
- 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/text/resolveTextRuns.d.ts +8 -0
- package/dist/utils/textLayout/alignLines.d.ts +15 -0
- package/dist/utils/textLayout/applyVerticals.d.ts +14 -0
- package/dist/utils/textLayout/breakLines.d.ts +14 -0
- package/dist/utils/textLayout/canvasMetricsProvider.d.ts +6 -0
- package/dist/utils/textLayout/index.d.ts +7 -0
- package/dist/utils/textLayout/layoutText.d.ts +7 -0
- package/dist/utils/textLayout/metricsCache.d.ts +9 -0
- package/dist/utils/textLayout/pixiCanvasMetricsProvider.d.ts +6 -0
- package/dist/utils/textLayout/shapeRuns.d.ts +18 -0
- package/dist/utils/textLayout/typefaceMetricsProvider.d.ts +19 -0
- package/dist/utils/textLayout/types.d.ts +61 -0
- package/dist/utils/textLayout/unicode.d.ts +2 -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 +74 -54
- package/dist/assets/icon/transformericons/icons.d.ts +0 -8
- package/dist/components/PixiAudioSprite/PixiAudioSprite.stories.d.ts +0 -12
- package/dist/components/PixiGifSprite/PixiGifSprite.stories.d.ts +0 -163
- package/dist/components/PixiImageSprite/PixiImageSprite.stories.d.ts +0 -150
- package/dist/components/PixiLottieSprite/PixiLottieSprite.stories.d.ts +0 -159
- package/dist/components/PixiSVGSprite/PixiSvgPathSprite.stories.d.ts +0 -131
- package/dist/components/PixiSequence/PixiSequence.stories.d.ts +0 -33
- package/dist/components/PixiTextSprite/PixiTextSprite.stories.d.ts +0 -140
- package/dist/components/PixiVideoSprite/PixiVideoSprite.stories.d.ts +0 -146
- package/dist/favicon.svg +0 -41
- package/dist/pixitweenjs-logo-dark.svg +0 -98
- package/dist/pixitweenjs-logo.svg +0 -97
- package/dist/stories/Features/TestHowlerAudioFiles.d.ts +0 -2
- package/dist/stories/Features/TimelineAnimations.d.ts +0 -15
- package/dist/stories/Features/TimelineTest.d.ts +0 -15
- package/dist/stories/Features/TimelineTest.stories.d.ts +0 -23
- package/dist/stories/Features/TimelineTestAudios.d.ts +0 -15
- package/dist/stories/Features/TimelineTestWithVideos.d.ts +0 -15
- package/dist/stories/Features/TimelineWithGif.d.ts +0 -21
- package/dist/stories/Features/common.tests.d.ts +0 -411
- /package/dist/{.gitkeep → utils/gsapEffects/index.d.ts} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AepBezierPath, AepKeyframe } from '../../types/aep';
|
|
2
|
+
export interface AepBezierPathTimelineBuild {
|
|
3
|
+
timeline: gsap.core.Timeline;
|
|
4
|
+
hasAnimation: boolean;
|
|
5
|
+
initial: AepBezierPath;
|
|
6
|
+
}
|
|
7
|
+
export type AepAnimatableBezier = AepBezierPath | AepKeyframe<AepBezierPath>[];
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated AEP bezier-path animation now flows via React-side
|
|
10
|
+
* `sampleAnimatedBezier`. Preserved for downstream GSAP consumers and
|
|
11
|
+
* the internal `useAepBezierPathAnimator` (also deprecated).
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildBezierPathTimeline(field: AepAnimatableBezier | undefined, fps: number, inPointFrames: number, onPath: (path: AepBezierPath) => void): AepBezierPathTimelineBuild;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AepAnimatable } from '../../types/aep';
|
|
2
|
+
export interface RgbaColor {
|
|
3
|
+
r: number;
|
|
4
|
+
g: number;
|
|
5
|
+
b: number;
|
|
6
|
+
a: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function parseHexColor(hex: string): RgbaColor;
|
|
9
|
+
export declare function rgbaToHex(c: RgbaColor): string;
|
|
10
|
+
export interface AepColorTimelineBuild {
|
|
11
|
+
timeline: gsap.core.Timeline;
|
|
12
|
+
hasAnimation: boolean;
|
|
13
|
+
target: RgbaColor;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Color → gsap subtimeline. Each segment tweens RGBA floats; the
|
|
17
|
+
* consumer reads `target` inside onUpdate and recomposes to a hex
|
|
18
|
+
* string for the renderer.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated AEP color animation now flows via React-side
|
|
21
|
+
* `sampleColor`. Preserved for downstream GSAP consumers and the
|
|
22
|
+
* internal `useAepColorAnimator` (also deprecated).
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildColorValueTimeline(field: AepAnimatable<string> | undefined, fps: number, inPointFrames: number): AepColorTimelineBuild;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AepLayer, AepTransform } from '../../types/aep';
|
|
2
|
+
export type AepTweenTarget = Record<string, unknown>;
|
|
3
|
+
export interface AepBuiltSegment {
|
|
4
|
+
at: number;
|
|
5
|
+
op: "to" | "set";
|
|
6
|
+
vars: Record<string, unknown>;
|
|
7
|
+
props: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare function planPropSegments(prop: keyof AepTransform, field: unknown, fps: number, inPointFrames: number): AepBuiltSegment[];
|
|
10
|
+
export interface AepLayerTimelineBuild {
|
|
11
|
+
timeline: gsap.core.Timeline;
|
|
12
|
+
segments: AepBuiltSegment[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated The AEP runtime no longer builds GSAP sub-timelines for
|
|
16
|
+
* layer transforms — `useAepLayerTransform` samples them directly
|
|
17
|
+
* from `ctx.currentFrame`. Preserved for parity with downstream
|
|
18
|
+
* consumers and the existing vitest coverage of segment planning.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildLayerTimeline(layer: AepLayer, target: AepTweenTarget, fps: number): AepLayerTimelineBuild;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AepAnimatable } from '../../types/aep';
|
|
2
|
+
export interface AepScalarTimelineBuild {
|
|
3
|
+
timeline: gsap.core.Timeline;
|
|
4
|
+
hasAnimation: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function buildScalarValueTimeline(field: AepAnimatable<number> | undefined, fps: number, inPointFrames: number, target: Record<string, number>, prop: string): AepScalarTimelineBuild;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AepAnimatable } from '../../types/aep';
|
|
2
|
+
export interface AepVec2TimelineBuild {
|
|
3
|
+
timeline: gsap.core.Timeline;
|
|
4
|
+
hasAnimation: boolean;
|
|
5
|
+
target: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
type Vec2 = [number, number];
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated AEP vec2 animation now flows via React-side `sampleVec2`.
|
|
13
|
+
* Preserved for downstream GSAP consumers and the internal
|
|
14
|
+
* `useAepVec2Animator` (also deprecated).
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildVec2ValueTimeline(field: AepAnimatable<Vec2> | undefined, fps: number, inPointFrames: number): AepVec2TimelineBuild;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AepEffectHandler } from './effects/types';
|
|
2
|
+
export declare function getEffectHandler(name: string): AepEffectHandler | undefined;
|
|
3
|
+
export declare function registerEffectHandler(handler: AepEffectHandler): void;
|
|
4
|
+
export declare function _resetEffectRegistry(): void;
|
|
5
|
+
export declare function _listEffectHandlers(): string[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { gaussianBlurHandler } from './gaussianBlur';
|
|
2
|
+
export { dropShadowHandler } from './dropShadow';
|
|
3
|
+
export { glowHandler } from './glow';
|
|
4
|
+
export { hueSaturationHandler } from './hueSaturation';
|
|
5
|
+
export { levelsHandler } from './levels';
|
|
6
|
+
export { tintHandler } from './tint';
|
|
7
|
+
export { brightnessContrastHandler } from './brightnessContrast';
|
|
8
|
+
export { fastBoxBlurHandler } from './fastBoxBlur';
|
|
9
|
+
export { staticParam, type AepEffectHandler, type AepEffectParamSnapshot } from './types';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Filter } from 'pixi.js';
|
|
2
|
+
export type AepEffectParamSnapshot = Record<string, unknown>;
|
|
3
|
+
export interface AepEffectHandler {
|
|
4
|
+
name: string;
|
|
5
|
+
build(snapshot: AepEffectParamSnapshot): Filter;
|
|
6
|
+
apply(filter: Filter, snapshot: AepEffectParamSnapshot): void;
|
|
7
|
+
}
|
|
8
|
+
export declare function staticParam<T = unknown>(snapshot: AepEffectParamSnapshot, key: string, fallback: T): T;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { easeNameFor } from './easeCache';
|
|
2
|
+
export { buildLayerTimeline, planPropSegments, } from './buildLayerTimeline';
|
|
3
|
+
export type { AepBuiltSegment, AepLayerTimelineBuild, AepTweenTarget, } from './buildLayerTimeline';
|
|
4
|
+
export { useAepKeyframes } from './useAepKeyframes';
|
|
5
|
+
export { useAepCurrentFrame } from './useAepCurrentFrame';
|
|
6
|
+
export { useAepTextLayout } from './useAepTextLayout';
|
|
7
|
+
export { useTypefaceMetrics } from './useTypefaceMetrics';
|
|
8
|
+
export { sampleAnimatable, sampleScalar, sampleVec2, sampleColor, sampleAnimatedBezier, cubicBezierEase, lerpNumber, lerpVec2, lerpColor, } from './sampleAnimatable';
|
|
9
|
+
export { useAepEffects } from './useAepEffects';
|
|
10
|
+
export { useAepEffectKeyframes } from './useAepEffectKeyframes';
|
|
11
|
+
export { useAepValueAnimator } from './useAepValueAnimator';
|
|
12
|
+
export { useAepColorAnimator } from './useAepColorAnimator';
|
|
13
|
+
export { useAepBezierPathAnimator } from './useAepBezierPathAnimator';
|
|
14
|
+
export { useAepVec2Animator } from './useAepVec2Animator';
|
|
15
|
+
export { buildVec2ValueTimeline, type AepVec2TimelineBuild, } from './buildVec2ValueTimeline';
|
|
16
|
+
export { buildBezierPathTimeline, type AepAnimatableBezier, type AepBezierPathTimelineBuild, } from './buildBezierPathTimeline';
|
|
17
|
+
export { interpolateBezierPath, clonePath, } from './interpolateBezierPath';
|
|
18
|
+
export { buildScalarValueTimeline, type AepScalarTimelineBuild, } from './buildScalarValueTimeline';
|
|
19
|
+
export { buildColorValueTimeline, parseHexColor, rgbaToHex, type AepColorTimelineBuild, type RgbaColor, } from './buildColorValueTimeline';
|
|
20
|
+
export { getEffectHandler, registerEffectHandler, _listEffectHandlers, } from './effectRegistry';
|
|
21
|
+
export * from './effects';
|
|
22
|
+
export { buildAudioLevelTimeline, type AepAudioLevelBuild, type AudioLevelTarget, } from './buildAudioLevelTimeline';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AepAnimatable, AepBezierPath, AepEaseHandle } from '../../types/aep';
|
|
2
|
+
export declare function cubicBezierEase(handles: AepEaseHandle, x: number): number;
|
|
3
|
+
export declare function sampleAnimatable<T>(field: AepAnimatable<T> | undefined, fallback: T, frame: number, lerp: (a: T, b: T, k: number) => T): T;
|
|
4
|
+
export declare const lerpNumber: (a: number, b: number, k: number) => number;
|
|
5
|
+
export declare const lerpVec2: (a: [number, number], b: [number, number], k: number) => [number, number];
|
|
6
|
+
export declare const lerpVec3: (a: [number, number, number], b: [number, number, number], k: number) => [number, number, number];
|
|
7
|
+
export declare function sampleScalar(field: AepAnimatable<number> | undefined, fallback: number, frame: number): number;
|
|
8
|
+
export declare function sampleVec2(field: AepAnimatable<[number, number]> | undefined, fallback: [number, number], frame: number): [number, number];
|
|
9
|
+
export declare function sampleVec3(field: AepAnimatable<[number, number, number]> | undefined, fallback: [number, number, number], frame: number): [number, number, number];
|
|
10
|
+
export declare const sampleEuler: typeof sampleVec3;
|
|
11
|
+
export declare const lerpColor: (a: string, b: string, k: number) => string;
|
|
12
|
+
export declare function sampleColor(field: AepAnimatable<string> | undefined, fallback: string, frame: number): string;
|
|
13
|
+
export declare function sampleAnimatedBezier(field: AepAnimatable<AepBezierPath> | undefined, fallback: AepBezierPath, frame: number): AepBezierPath;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AepBezierPath } from '../../types/aep';
|
|
2
|
+
import { AepAnimatableBezier } from './buildBezierPathTimeline';
|
|
3
|
+
/**
|
|
4
|
+
* Drive an animatable bezier path through the master timeline. Fires
|
|
5
|
+
* `onChange(path)` per onUpdate, plus once at mount with the initial
|
|
6
|
+
* (keyframe-0) value. Static fields emit once and return.
|
|
7
|
+
*
|
|
8
|
+
* @deprecated AEP shape + mask paths now sample directly from
|
|
9
|
+
* `ctx.currentFrame` (see `sampleAnimatedBezier`). This hook is
|
|
10
|
+
* preserved for downstream consumers driving non-AEP path tweens.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useAepBezierPathAnimator(field: AepAnimatableBezier | undefined, fps: number, inPointFrames: number, onChange: (path: AepBezierPath) => void): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AepAnimatable } from '../../types/aep';
|
|
2
|
+
/**
|
|
3
|
+
* Drive an animatable hex-color field via a GSAP sub-timeline that
|
|
4
|
+
* interpolates RGBA floats and fires `onChange(hex)` per tick.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated AEP shape fills / stroke colors / effect colors now
|
|
7
|
+
* sample directly from `ctx.currentFrame` (see `sampleColor`). This
|
|
8
|
+
* hook is preserved for downstream consumers driving non-AEP color
|
|
9
|
+
* tweens through the master timeline.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useAepColorAnimator(field: AepAnimatable<string> | undefined, fps: number, inPointFrames: number, onChange: (hex: string) => void): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useAepCurrentFrame(fps: number): number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AepLayer } from '../../types/aep';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import type * as PIXI from "pixi.js";
|
|
4
|
+
/**
|
|
5
|
+
* Drives the layer's keyframe animation by attaching a GSAP sub-timeline
|
|
6
|
+
* to the master `tl.current` at `layer.inPoint / fps` seconds. Cleans up
|
|
7
|
+
* on unmount or when the layer / target ref changes.
|
|
8
|
+
*
|
|
9
|
+
* @deprecated Internal AEP rendering now samples transform keyframes
|
|
10
|
+
* from `ctx.currentFrame` directly (see `useAepLayerTransform`). This
|
|
11
|
+
* hook is preserved for downstream consumers that drive Pixi
|
|
12
|
+
* containers via GSAP outside the AEP composition pipeline. For new
|
|
13
|
+
* code, prefer `sampleScalar` / `sampleVec2` from `hooks/aep`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useAepKeyframes(layer: AepLayer, targetRef: React.RefObject<PIXI.Container | null>, fps: number, readyKey?: unknown): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AepLayer, AepThemeMap } from '../../types/aep';
|
|
2
|
+
import { AepTextLayoutResult, AepTextMetricsProvider } from '../../utils/textLayout';
|
|
3
|
+
type AepTextLayer = Extract<AepLayer, {
|
|
4
|
+
kind: "text";
|
|
5
|
+
}>;
|
|
6
|
+
interface UseAepTextLayoutOptions {
|
|
7
|
+
boxWidth?: number;
|
|
8
|
+
metrics?: AepTextMetricsProvider;
|
|
9
|
+
theme?: AepThemeMap;
|
|
10
|
+
}
|
|
11
|
+
export declare function useAepTextLayout(layer: AepTextLayer, currentFrame: number, options?: UseAepTextLayoutOptions): AepTextLayoutResult;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AepAnimatable } from '../../types/aep';
|
|
2
|
+
/**
|
|
3
|
+
* Animatable [x, y] field driver. Fires `onChange(x, y)` per onUpdate
|
|
4
|
+
* and once at mount with the keyframe-0 value.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated AEP effect-param vec2s now sample directly from
|
|
7
|
+
* `ctx.currentFrame` (see `sampleVec2`). This hook is preserved for
|
|
8
|
+
* downstream consumers driving non-AEP vec2 tweens.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useAepVec2Animator(field: AepAnimatable<[number, number]> | undefined, fps: number, inPointFrames: number, onChange: (x: number, y: number) => void): void;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
1
|
export * from './useGsapEffect';
|
|
2
|
+
export * from './useSpriteFilters';
|
|
3
|
+
export * from './aep';
|
|
4
|
+
export { default as usePixiAnimation } from './usePixiAnimation';
|
|
5
|
+
export { useVideoTexture } from './video/useVideoTexture';
|
|
6
|
+
export { useVideoLifecycle } from './video/useVideoLifecycle';
|
|
7
|
+
export { useVideoTimelineSync } from './video/useVideoTimelineSync';
|
|
8
|
+
export { withFiltersHook } from './withFiltersHook';
|
|
9
|
+
export { withEffectsHook, useEffects, getEffectFilter } from './withEffectsHook';
|
|
10
|
+
export { fromMultiplierColorCorrection, type SpriteColorCorrection, type SpriteEffectsInput } from './useSpriteFilters';
|
|
11
|
+
export { useSvgTexture, type UseSvgTextureOptions } from './useSvgTexture';
|
|
12
|
+
export { useDebouncedValue } from './useDebouncedValue';
|
|
13
|
+
export { useFontEpoch } from './useFontEpoch';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PixiBlendModeString } from '../utils/blendMode';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the editor's numeric blend-mode code (from `transformation.blendMode`)
|
|
4
|
+
* to the PIXI v8 string value expected by `Container.blendMode` / `Sprite.blendMode`.
|
|
5
|
+
*
|
|
6
|
+
* PIXI v8 replaced the old numeric `BLEND_MODES` enum with a string union
|
|
7
|
+
* ('normal' | 'multiply' | 'darken' | ...). Photoshop-style modes (Overlay,
|
|
8
|
+
* Darken, Lighten, Color Dodge/Burn, Hard/Soft Light) additionally require the
|
|
9
|
+
* `pixi.js/advanced-blend-modes` side-effect module to be imported once at app
|
|
10
|
+
* bootstrap (see src/index.tsx) — without it those string values are inert and
|
|
11
|
+
* the renderer silently falls back to 'normal'.
|
|
12
|
+
*
|
|
13
|
+
* Callers set the returned string directly on a Container/Sprite's `blendMode`
|
|
14
|
+
* prop — no filter needed for this to take effect.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useBlendFilter: (blendMode?: number) => PixiBlendModeString;
|
|
17
|
+
export default useBlendFilter;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `value`, but only after it has stopped changing for `delayMs`.
|
|
3
|
+
*
|
|
4
|
+
* A single timer is restarted on every change and cleared on cleanup, so only the FINAL value
|
|
5
|
+
* of a burst is ever published, never an intermediate one. (`delayMs <= 0` publishes on the
|
|
6
|
+
* next effect tick.) The first value is returned immediately.
|
|
7
|
+
*
|
|
8
|
+
* Used by `useSvgTexture` / `PixiSvgRawSprite` so dragging a resize handle re-rasterises once.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useDebouncedValue<T>(value: T, delayMs: number): T;
|
|
11
|
+
export default useDebouncedValue;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A counter that increments every time fonts finish loading (`Events.FONTS_LOADED`).
|
|
3
|
+
*
|
|
4
|
+
* Put it in any memo/effect dependency list that builds a `TextStyle` or a text layout, so it
|
|
5
|
+
* re-runs against the real font instead of the fallback it measured with before the load.
|
|
6
|
+
* On each event it also flushes both measurement caches:
|
|
7
|
+
* - Pixi's `CanvasTextMetrics` (keyed by font string)
|
|
8
|
+
* - this engine's default layout metrics provider
|
|
9
|
+
*/
|
|
10
|
+
export declare function useFontEpoch(): number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* usePixiAnimation
|
|
3
|
+
*
|
|
4
|
+
* Drives entrance/exit animations by creating a child timeline and adding it
|
|
5
|
+
* to the parent GSAP timeline. Follows the same pattern as PixiSequence for
|
|
6
|
+
* consistent timeline nesting behavior.
|
|
7
|
+
*
|
|
8
|
+
* @param {Object} config - Animation configuration
|
|
9
|
+
* @param {React.RefObject} config.targetRef - Reference to the PIXI container
|
|
10
|
+
* @param {Object} config.transformation - Transformation properties
|
|
11
|
+
* @param {number} config.start - Element start time in seconds
|
|
12
|
+
* @param {number} config.end - Element end time in seconds
|
|
13
|
+
* @param {Object} [config.effectOptions] - Additional options for GSAP effects
|
|
14
|
+
*/
|
|
15
|
+
declare const usePixiAnimation: ({ targetRef, transformation, start, end, effectOptions }: {
|
|
16
|
+
targetRef: any;
|
|
17
|
+
transformation: any;
|
|
18
|
+
start: any;
|
|
19
|
+
end: any;
|
|
20
|
+
effectOptions?: {} | undefined;
|
|
21
|
+
}) => {
|
|
22
|
+
childTimelineRef: import('react').RefObject<null>;
|
|
23
|
+
};
|
|
24
|
+
export default usePixiAnimation;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Effects } from '../types/Effects';
|
|
2
|
+
import type * as PIXI from "pixi.js";
|
|
3
|
+
/**
|
|
4
|
+
* Colour correction in SLIDER units (ported from the Clippy editor).
|
|
5
|
+
*
|
|
6
|
+
* brightness, contrast, saturation, red, green, blue,
|
|
7
|
+
* temperature, tint, highlights, shadows, exposure, vibrance : -100..100, 0 = no change
|
|
8
|
+
* hue : -180..180 degrees
|
|
9
|
+
* sharpness, blurRadius, vignette, noise, edgeFeather : 0..100
|
|
10
|
+
* gamma, alpha : 1 = no change
|
|
11
|
+
*
|
|
12
|
+
* This replaces the earlier multiplier convention (neutral = 1). To convert old
|
|
13
|
+
* values use `fromMultiplierColorCorrection`.
|
|
14
|
+
*/
|
|
15
|
+
export interface SpriteColorCorrection {
|
|
16
|
+
enabled?: boolean;
|
|
17
|
+
brightness?: number;
|
|
18
|
+
contrast?: number;
|
|
19
|
+
saturation?: number;
|
|
20
|
+
red?: number;
|
|
21
|
+
green?: number;
|
|
22
|
+
blue?: number;
|
|
23
|
+
gamma?: number;
|
|
24
|
+
alpha?: number;
|
|
25
|
+
temperature?: number;
|
|
26
|
+
tint?: number;
|
|
27
|
+
hue?: number;
|
|
28
|
+
highlights?: number;
|
|
29
|
+
shadows?: number;
|
|
30
|
+
exposure?: number;
|
|
31
|
+
vibrance?: number;
|
|
32
|
+
sharpness?: number;
|
|
33
|
+
blurRadius?: number;
|
|
34
|
+
vignette?: number;
|
|
35
|
+
noise?: number;
|
|
36
|
+
edgeFeather?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface SpriteEffectsInput {
|
|
39
|
+
name?: Effects | string;
|
|
40
|
+
/** 0..100. Defaults to 100 for any real effect, 0 for "None". */
|
|
41
|
+
intensity?: number;
|
|
42
|
+
params?: Record<string, unknown>;
|
|
43
|
+
}
|
|
44
|
+
export type PlateKeyInput = boolean | string | {
|
|
45
|
+
color?: string;
|
|
46
|
+
tolerance?: number;
|
|
47
|
+
} | null;
|
|
48
|
+
export interface UseSpriteFiltersProps {
|
|
49
|
+
colorCorrection?: SpriteColorCorrection;
|
|
50
|
+
effects?: SpriteEffectsInput;
|
|
51
|
+
neonColor?: number | string | null;
|
|
52
|
+
/** `transformation.blendMode` (numeric code). Appended as the LAST filter when others exist. */
|
|
53
|
+
blendMode?: number;
|
|
54
|
+
/** Key a flat background plate out of the image. `true` = default cream plate. */
|
|
55
|
+
plateKey?: PlateKeyInput;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Convert the old multiplier-style correction (neutral = 1: `contrast: 2`) to the
|
|
59
|
+
* slider scale (neutral = 0: `contrast: 100`). Fields that were not multipliers
|
|
60
|
+
* (hue, temperature, sharpness, blurRadius, vignette, noise, gamma, alpha) pass
|
|
61
|
+
* through unchanged. Only the six multiplier fields are rescaled.
|
|
62
|
+
*/
|
|
63
|
+
export declare const fromMultiplierColorCorrection: (old: Record<string, number | undefined> | null | undefined) => SpriteColorCorrection;
|
|
64
|
+
/**
|
|
65
|
+
* One ordered filter array for a sprite: plate-key -> colour correction ->
|
|
66
|
+
* effect preset(s) -> blur/vignette/noise -> blend composite (last).
|
|
67
|
+
*
|
|
68
|
+
* Ported from the Clippy editor, with two deliberate differences:
|
|
69
|
+
* - colour-correction fields are read individually so the memo only re-runs when a
|
|
70
|
+
* value changes, not whenever the caller passes a fresh `{}`
|
|
71
|
+
* - the filters this hook created are destroyed when they are replaced or on
|
|
72
|
+
* unmount (Clippy leaks them)
|
|
73
|
+
*
|
|
74
|
+
* Time-varying effects (VHS, glitch, godray...) are driven from the master GSAP
|
|
75
|
+
* timeline via `registerTimeUpdateListener`, so they follow the playhead: animate
|
|
76
|
+
* while playing, jump on seek, freeze when paused. Deterministic for export.
|
|
77
|
+
*
|
|
78
|
+
* Returns `[]` (never null) when no filter applies, so it is safe to pass straight
|
|
79
|
+
* to `<pixiSprite filters={...}>`.
|
|
80
|
+
*/
|
|
81
|
+
export declare const useSpriteFilters: ({ colorCorrection, effects, neonColor, blendMode, plateKey, }: UseSpriteFiltersProps) => PIXI.Filter[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as PIXI from "pixi.js";
|
|
2
|
+
export interface UseSvgTextureOptions {
|
|
3
|
+
src?: string;
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
stroke?: string;
|
|
7
|
+
strokeWidth?: number;
|
|
8
|
+
/** Render multiplier. 2 gives crisp results without devicePixelRatio jitter. */
|
|
9
|
+
resolution?: number;
|
|
10
|
+
/** ms to wait after the LAST width/height change before re-rasterising. Default 120. */
|
|
11
|
+
resizeDebounceMs?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface UseSvgTextureResult {
|
|
14
|
+
texture: PIXI.Texture | null;
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Rasterise an SVG (with optional stroke override) to a PIXI.Texture at
|
|
19
|
+
* `width x height x resolution`. Non-SVG sources fall back to the regular texture loader.
|
|
20
|
+
* Ported from the Clippy editor's `useSvgTexture`, with these fixes:
|
|
21
|
+
*
|
|
22
|
+
* - The previous texture (and its canvas) is DESTROYED when a new one replaces it and on
|
|
23
|
+
* unmount. Clippy leaked one CanvasSource per re-raster.
|
|
24
|
+
* - width/height changes are debounced, so dragging a resize handle re-rasterises once
|
|
25
|
+
* after the drag settles instead of on every pointer move.
|
|
26
|
+
* - Inline `data:image/svg+xml` sources are rasterised too (Clippy only matched `.svg` URLs).
|
|
27
|
+
* - A failed fetch (HTTP error) yields `null` instead of rasterising an error page.
|
|
28
|
+
*/
|
|
29
|
+
export declare function useSvgTexture({ src, width, height, stroke, strokeWidth, resolution, resizeDebounceMs, }: UseSvgTextureOptions): UseSvgTextureResult;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface VideoLifecycleState {
|
|
2
|
+
isPlaying: boolean;
|
|
3
|
+
progress: number;
|
|
4
|
+
isMuted: boolean;
|
|
5
|
+
isWaiting: boolean;
|
|
6
|
+
isStalled: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* useVideoLifecycle
|
|
10
|
+
*
|
|
11
|
+
* Attaches DOM event listeners to track waiting / stalled / loaded state
|
|
12
|
+
* on the underlying HTMLVideoElement. Returns a mutable state ref the caller
|
|
13
|
+
* can read inside GSAP callbacks (without triggering React re-renders).
|
|
14
|
+
*
|
|
15
|
+
* Also keeps `muted` and `playbackRate` in sync with props via dedicated
|
|
16
|
+
* effects — each prop change touches only the relevant attribute.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useVideoLifecycle({ getVideo, ready, muted, playbackRate, }: {
|
|
19
|
+
getVideo: () => HTMLVideoElement | null | undefined;
|
|
20
|
+
ready: boolean;
|
|
21
|
+
muted: boolean;
|
|
22
|
+
playbackRate: number;
|
|
23
|
+
}): React.MutableRefObject<VideoLifecycleState>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
interface UseVideoTextureOptions {
|
|
3
|
+
src: string;
|
|
4
|
+
uniqueId: string;
|
|
5
|
+
frameStartAt: number;
|
|
6
|
+
fps?: number;
|
|
7
|
+
isRemotion?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface UseVideoTextureResult {
|
|
10
|
+
texture: PIXI.Texture | null;
|
|
11
|
+
videoElement: HTMLVideoElement | null;
|
|
12
|
+
isLoaded: boolean;
|
|
13
|
+
error: Error | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* useVideoTexture (v8, scrub model)
|
|
17
|
+
*
|
|
18
|
+
* Builds a PixiJS v8 video texture. Mirrors the proven pixi-test-v1 reference:
|
|
19
|
+
*
|
|
20
|
+
* - MP4: `PIXI.Assets.load({ src, data: { autoPlay:false, autoUpdate:false, ... } })`.
|
|
21
|
+
* The Assets video loader buffers the full file and resolves decode-ready,
|
|
22
|
+
* so the per-frame seeks the timeline drives return frames for EVERY clip.
|
|
23
|
+
* (A lazily-built VideoSource from a raw <video> only buffers ~2 of N collage
|
|
24
|
+
* clips in time, leaving the rest black.)
|
|
25
|
+
* - Other containers (.mov/.avi/...): manual <video> wrapped in a VideoSource.
|
|
26
|
+
* (HLS is intentionally not ported — add hls.js + a branch here if needed.)
|
|
27
|
+
*
|
|
28
|
+
* `source.autoUpdate = false` — GSAP is the clock (useVideoTimelineSync scrubs
|
|
29
|
+
* currentTime + calls source.update()). We never call play(), to dodge the
|
|
30
|
+
* browser's concurrent-video hardware-decode cap (~2-4) that blacks out extra
|
|
31
|
+
* clips. First frame is painted via a one-shot seeked/loadeddata → update().
|
|
32
|
+
*/
|
|
33
|
+
export declare function useVideoTexture({ src, uniqueId, frameStartAt, fps: _fps, isRemotion: _isRemotion, }: UseVideoTextureOptions): UseVideoTextureResult;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { VideoLifecycleState } from './useVideoLifecycle';
|
|
2
|
+
import * as PIXI from 'pixi.js';
|
|
3
|
+
interface UseVideoTimelineSyncOptions {
|
|
4
|
+
textureRef: React.MutableRefObject<PIXI.Texture | null>;
|
|
5
|
+
stateRef: React.MutableRefObject<VideoLifecycleState>;
|
|
6
|
+
ready: boolean;
|
|
7
|
+
start: number;
|
|
8
|
+
end: number;
|
|
9
|
+
frameStartAt: number;
|
|
10
|
+
uniqueId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* useVideoTimelineSync (v8 scrub model)
|
|
14
|
+
*
|
|
15
|
+
* GSAP is the clock. Every tick maps timeline time → source time, seeks the
|
|
16
|
+
* element, and flags a GPU re-upload via `source.update()` (the AEP
|
|
17
|
+
* registerVideoSync model). While paused/scrubbing we only seek (no play()),
|
|
18
|
+
* keeping the concurrent-video hardware-decode cap (~2-4 clips) in check.
|
|
19
|
+
* During real playback (Events.RESUME) the active clip's element is also
|
|
20
|
+
* play()'d so its audio track is audible — drift correction still runs via
|
|
21
|
+
* the currentTime check below.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useVideoTimelineSync({ textureRef, stateRef, ready, start, end, frameStartAt, uniqueId, }: UseVideoTimelineSyncOptions): import('react').RefObject<gsap.core.Tween | null>;
|
|
24
|
+
export {};
|