Skip to content

API Reference / @gtkx/animated / Globals / AnimatedGlobals

Interface: AnimatedGlobals

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:122

Properties

batchedUpdates?

optional batchedUpdates?: (cb) => void

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:136

Event props are called with batchedUpdates to reduce extraneous renders

Parameters

cb

() => void

Returns

void


colors?

optional colors?: {[key: string]: number; } | null

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:128

Provide custom color names for interpolation


createStringInterpolator?

optional createStringInterpolator?: (config) => (input) => string

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:132

Provide custom logic for string interpolation

Parameters

config

InterpolatorConfig<string>

Returns

(input) => string


frameLoop?

optional frameLoop?: "always" | "demand"

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:140

sets the global frameLoop setting for the global raf instance


now?

optional now?: () => number

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:126

Used to measure frame length. Read more here

Returns

number


onDemand?

optional onDemand?: () => void

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:146

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?

optional requestAnimationFrame?: (cb) => void

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:134

Schedule a function to run on the next frame

Parameters

cb

() => void

Returns

void


skipAnimation?

optional skipAnimation?: boolean

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:130

Make all animations instant and skip the frameloop entirely


to?

optional to?: <Input, Output>(source, args) => FluidValue<Output>

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:124

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?

optional willAdvance?: (animation) => void

Defined in: node_modules/.pnpm/@react-spring+shared@10.1.2_react@19.2.8/node_modules/@react-spring/shared/dist/react-spring_shared.modern.d.mts:138

Internal

Exposed for testing purposes

Parameters

animation

OpaqueAnimation

Returns

void

Released under the MPL-2.0 License.