spinBox
Decorator that creates a spin box control for numeric properties in the inspector.
| Type | Name | Interface Description |
|---|---|---|
| Functions | spinBox(min: number, max: number, step?: number): (target: any, key: string) => any | • Function: Decorator that creates a spin box control for numeric properties in the inspector. Provides up/down arrows for adjusting numeric values with optional constraints. Parameters • • • Returns Property decorator function |
Example
@component()
export class GridSettings extends APJS.BasicScriptComponent {
@serializeProperty()
@spinBox(1, 100, 1)
public gridSize: number = 10;
@serializeProperty()
@spinBox(0, 360, 15)
public snapAngle: number = 45;
@serializeProperty()
@spinBox(0.01, 2, 0.01)
public timeScale: number = 1;
}