IParallaxLayerRegistry
interface
Motion & Parallax
Internal layer descriptor registered into the parent OrigamParallax via provide/inject. The parent reads speed, offsetX and offsetY to compute the per-frame transform, then applies it to the shared target HTMLElement.
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.
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.
- idrequissymbol
- Unique symbol identifier for the layer. Used to register and unregister the layer in the parent context.
- speedrequisnumber
- Parallax speed multiplier. 0 = fixed, 0.5 = half scroll speed, 1 = neutral, >1 = faster than scroll. Negative values reverse direction.
- offsetXrequisnumber
- Static X-axis offset (px) applied on top of the parallax translation.
- offsetYrequisnumber
- Static Y-axis offset (px) applied on top of the parallax translation.
- targetrequisHTMLElement
- Reference to the DOM element that receives the per-frame CSS transform.
Écosystème
Utilisé par
Composants et composables qui étendent ou consomment cette interface.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Using IParallaxLayerRegistry in a custom layer