IParallaxProvide

interface
Motion & Parallax

Provide context exposed by OrigamParallax to its OrigamParallaxElement children via Vue inject. Carries reactive refs for audio data, pointer event position, movement state, easing and container shape.

TypeScript

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

audioData
requis
Ref<any>
Reactive audio analysis data (frequency/amplitude array) when the parallax is driven by audio input.
eventData
requis
Ref<TPoint>
Reactive current pointer/mouse position as a normalised TPoint { x, y }.
movement
requis
Ref<{ x: number, y: number, target?: IBox | DOMRect }>
Reactive current movement vector plus optional target bounding box. Consumed by OrigamParallaxElement to compute transforms.
isMoving
requis
Ref<boolean>
True while a pointer/scroll movement is in progress.
event
requis
Ref<TParallaxEvent>
The active event type (scroll | move | audio…) driving this parallax instance.
duration
requis
Ref<number>
Transition duration (ms) shared with all children for interpolation.
easing
requis
Ref<string>
CSS timing-function string shared with children for transition easing.
shape
requis
Ref<IBox | null>
Bounding box of the host parallax container, updated on resize. Null before mount.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Injecting the parallax context in a child component

typescript