slider
Decorator that creates a slider control for numeric properties in the inspector.
| Type | Name | Interface Description |
|---|---|---|
| Functions | slider(min: number, max: number, step?: number): (target: any, key: string) => any | • Function: Decorator that creates a slider control for numeric properties in the inspector. Provides a visual slider for adjusting values within a specified range. Parameters • • • Returns Property decorator function |
Example
@component()
export class CameraSettings extends APJS.BasicScriptComponent {
@serializeProperty()
@slider(0, 180, 1)
public fov: number = 60;
@serializeProperty()
@slider(0.1, 10, 0.1)
public exposure: number = 1;
@serializeProperty()
@slider(0, 1, 0.01)
public bloomIntensity: number = 0.5;
}