label
Decorator that adds a label to a property in the inspector UI.
| Type | Name | Interface Description |
|---|---|---|
| Functions | label(label: string): (target: any, key: string) => any | • Function: Decorator that adds a label to a property in the inspector UI. This provides a human-readable name for the property field. Parameters • Returns Property decorator function |
Example
@component()
export class LightController extends APJS.BasicScriptComponent {
@serializeProperty()
@label("Light Color")
public color: APJS.Vector3f = new APJS.Vector3f(1, 1, 1);
@serializeProperty()
@label("Intensity (Lux)")
public intensity: number = 100;
@serializeProperty()
@label("Cast Shadows")
public castShadows: boolean = true;
}