Documentation / Momentum / localMomentumLayer
localMomentumLayer()
ts
function localMomentumLayer<Animating>(friction, pixelsPerUnit): MomentumLayer<Animating>;Defined in: ../../extensions/src/momentum.ts:143
Creates a momentum layer which will allow starting a glide for an animation. Works in n-dimensions on the topmost slice of the mounted animatable (see SlicedAnimatable).
Type Parameters
Animating
Animating extends Animatable<unknown>
Parameters
friction
number
friction coefficient
pixelsPerUnit
number
number of pixels in one animation unit
Returns
MomentumLayer<Animating>