Skip to content

Utilities

A few odds and ends are exported under the Utils object.

Rotations

๐Ÿ”—

Utils.eulerToCssTransform() and Utils.quaternionToCssTransform() convert a rotation object or tuple to a CSS transform string.

The <RotationEuler> and <RotationQuaternion> examples demonstrate these functions in action.

Tween Functions

๐Ÿ”—

The Utils.cubicBezierToEaseFunction() creates easing functions from cubic bezier values that are ready for use with Svelteโ€™s tween stores and related animation systems.

The <CubicBezier> example demonstrates this function in action.