API Reference / @gtkx/animated / Globals / AnimatedGlobals
Interface: AnimatedGlobals
Properties
batchedUpdates?
optionalbatchedUpdates?: (cb) =>void
Event props are called with batchedUpdates to reduce extraneous renders
Parameters
cb
() => void
Returns
void
colors?
optionalcolors?: {[key:string]:number; } |null
Provide custom color names for interpolation
createStringInterpolator?
optionalcreateStringInterpolator?: (config) => (input) =>string
Provide custom logic for string interpolation
Parameters
config
InterpolatorConfig<string>
Returns
(input) => string
frameLoop?
optionalframeLoop?:"always"|"demand"
sets the global frameLoop setting for the global raf instance
now?
optionalnow?: () =>number
Used to measure frame length. Read more here
Returns
number
onDemand?
optionalonDemand?: () =>void
Called in demand mode when rafz has frame work pending. Targets that let a host drive the frameloop (e.g. @react-spring/three) wire this to request the next frame so animations don't stall between host-rendered frames.
Returns
void
requestAnimationFrame?
optionalrequestAnimationFrame?: (cb) =>void
Schedule a function to run on the next frame
Parameters
cb
() => void
Returns
void
skipAnimation?
optionalskipAnimation?:boolean
Make all animations instant and skip the frameloop entirely
to?
optionalto?: <Input,Output>(source,args) =>FluidValue<Output>
Returns a new Interpolation object
Type Parameters
Input
Input
Output
Output
Parameters
source
OneOrMore<FluidValue<any, any>>
args
InterpolatorArgs<Input, Output>
Returns
FluidValue<Output>
willAdvance?
optionalwillAdvance?: (animation) =>void
Internal
Exposed for testing purposes
Parameters
animation
OpaqueAnimation
Returns
void