signals
import {...} from "@motion-canvas/core/lib/signals";
Value wrappers for easy dependency tracking and cache invalidation.
Classes
CompoundSignalContext
ComputedContext
DeferredEffectContext
DependencyContext
EffectContext
SignalContext
Vector2SignalContext
Interfaces
Computed
PromiseHandle
Signal
SignalExtensions
SignalGetter
SignalSetter
SignalTween
Vector2Edit
Vector2Operation
Vector2SignalHelpers
Type Aliases
CompoundSignal
type CompoundSignalTSetterValueTValue extends TSetterValueTKeys extends keyof TValue = keyof TValueTOwner = voidTContext = CompoundSignalContextTSetterValueTValueTKeysTOwner = SignalTSetterValueTValueTOwnerTContext[K in TKeys]: SignalTValue[K]TValue[K]TOwner extends void ? CompoundSignalTSetterValueTValueTKeysTOwnerTContext : TOwner
Type Parameters
TSetterValue
TValue extends TSetterValue
TKeys extends keyof TValue = keyof TValue
TOwner = void
TContext = CompoundSignalContextTSetterValueTValueTKeysTOwner
SignalGenerator
type SignalGeneratorTSetterValueTValue extends TSetterValue = ThreadGeneratorback: time: numbertimingFunction?: TimingFunctioninterpolationFunction?: InterpolationFunctionTValue => SignalGeneratorTSetterValueTValuedo: callback: () => void => SignalGeneratorTSetterValueTValuerun: task: ThreadGenerator => SignalGeneratorTSetterValueTValueto: SignalTweenTSetterValueTValuewait: duration: number => SignalGeneratorTSetterValueTValue
Type Parameters
TSetterValue
TValue extends TSetterValue
SignalValue
Type Parameters
SimpleSignal
Type Parameters
Vector2Signal
type Vector2SignalTOwner = voidTContext = Vector2SignalContextTOwner = CompoundSignalPossibleVector2Vector2'x''y'TOwnerTContextVector2SignalHelpersTOwner
Type Parameters
TOwner = void
TContext = Vector2SignalContextTOwner
Variables
DEFAULT
Functions
createComputed
Type Parameters
Parameters
createComputedAsync
Type Parameters
Parameters
createDeferredEffect
public createDeferredEffectcallback: () => void: () => void
Invoke the callback at the end of each frame if any of its dependencies changed.
Parameters
callback: () => void
The callback to invoke.
createEffect
public createEffectcallback: () => void: () => void
Invoke the callback immediately after any of its dependencies change.
Parameters
callback: () => void
The callback to invoke.
createSignal
public createSignalTValueTOwner = voidinitial?: SignalValueTValueinterpolation: InterpolationFunctionTValueany[] = deepLerpowner?: TOwner: SimpleSignalTValueTOwner
Type Parameters
Parameters
initial?: SignalValueTValue
interpolation: InterpolationFunctionTValueany[] = deepLerp
owner?: TOwner
isReactive
public isReactiveTvalue: SignalValueT: value is () => T
Type Parameters
Parameters
modify
public modifyTFromTTovalue: SignalValueTFrommodification: value: TFrom => TTo: SignalValueTTo
Type Parameters
Parameters
unwrap
public unwrapTvalue: SignalValueT: T