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
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- idrequiredsymbol
- Unique symbol identifier for the layer. Used to register and unregister the layer in the parent context.
- speedrequirednumber
- Parallax speed multiplier. 0 = fixed, 0.5 = half scroll speed, 1 = neutral, >1 = faster than scroll. Negative values reverse direction.
- offsetXrequirednumber
- Static X-axis offset (px) applied on top of the parallax translation.
- offsetYrequirednumber
- Static Y-axis offset (px) applied on top of the parallax translation.
- targetrequiredHTMLElement
- Reference to the DOM element that receives the per-frame CSS transform.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Using IParallaxLayerRegistry in a custom layer