For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.
Class Transitionable<Props>
Type Parameters
- Props
Constructors
constructor
- new Transitionable<Props>(
properties: Properties<Props>,
rootKey: string,
globalState: Record<string, any>,
): Transitionable<Props>Type Parameters
- Props
Parameters
- properties: Properties<Props>
- rootKey: string
- globalState: Record<string, any>
Returns Transitionable<Props>
Methods
applyGlobalStateChange
- applyGlobalStateChange(
refs: string[],
priorGlobalState: Record<string, any>,
transitioning: Transitioning<Props>,
parameters: TransitionParameters,
): Transitioning<Props>Reads every value that reads one of
refsagain and transitions it from whattransitioningshows.Parameters
- refs: string[]
- priorGlobalState: Record<string, any>
- transitioning: Transitioning<Props>
- parameters: TransitionParameters
Returns Transitioning<Props>
getTransition
Type Parameters
- S extends string | number | symbol
Parameters
- name: S
Returns void | TransitionSpecification
getValue
Type Parameters
- S extends string | number | symbol
- T
Parameters
- name: S
Returns void | PropertyValueSpecification<T>
hasProperty
Parameters
- name: string
Returns boolean
retainPriorGlobalState
- retainPriorGlobalState(
refs: string[],
priorGlobalState: Record<string, any>,
transitioning: Transitioning<Props>,
): voidKeeps the transitions running in
transitioningonpriorGlobalStatewhere they read one ofrefslive.Parameters
- refs: string[]
- priorGlobalState: Record<string, any>
- transitioning: Transitioning<Props>
Returns void
serialize
Returns any
setTransition
- setTransition<S extends string | number | symbol>(
name: S,
value: void | TransitionSpecification,
): voidType Parameters
- S extends string | number | symbol
Parameters
- name: S
- value: void | TransitionSpecification
Returns void
setValue
- setValue<S extends string | number | symbol, T>(
name: S,
value: void | PropertyValueSpecification<T>,
): voidType Parameters
- S extends string | number | symbol
- T
Parameters
- name: S
- value: void | PropertyValueSpecification<T>
Returns void
setValues
Applies a whole spec, skipping the values we already hold so they do not transition.
Parameters
- values: { [name: string]: unknown }
Returns void
transitioned
Parameters
- parameters: TransitionParameters
- prior: Transitioning<Props>
Returns Transitioning<Props>
untransitioned
Returns Transitioning<Props>
Internal
Transitionablestores a map of all (property name,TransitionablePropertyValue) pairs for paint properties of a given layer type. It can calculate theTransitioningPropertyValues for all of them at once, producing aTransitioninginstance for the same set of properties.