cyclicMovement

Commons
stable

Computes a sinusoidal parallax offset (x, y) from a reference position relative to a shape or the viewport. Used by the parallax system to create cyclic, depth-driven motion.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

cycleData
requis
IParallaxElementCicle
Configuration object: referencePosition (current pointer/scroll position), shape (bounding rect of the element), event type ('scroll' | 'mousemove'), cycles (frequency multiplier), and strength (amplitude factor).

API

Valeur de retour

La valeur retournée par cet util.

A { x, y } point representing the computed CSS transform offset in pixels.

Usage

Exemples

Extraits de code prêts à coller.

Used internally by OrigamParallaxElement

typescript