Function: property()
property<
Ext,Int>(opts?): (target,propertyKey) =>void
Defined in: attributes/properties/decorator.ts:64
Legacy property decorator (experimentalDecorators: true) that registers
a reactive property on a SceneNode subclass.
Type Parameters
Ext
Ext = any
Int
Int = Ext
Parameters
opts?
default?
Ext
mapper?
(ext, prev?) => Int
tween?
TweenFn<Int>
Returns
(target, propertyKey) => void
Example
@property({ default: 0 }) declare x: number;
@property({ mapper: resolveFillArray, tween: FillRegistry.lerpArray })
declare fill: FillResolved[];
The default value is used when the corresponding key is absent from the
constructor props object. The mapper / tween options are forwarded
directly to applyProp().