FloatInput
A numeric input field. The inspector renders a number input that the user can type into or scrub with a drag.
Runtime value: number

Declaration
ts
import { Behaviour, type FloatInput } from "@relu-interactives/spatial-ecs";
export default class Demo extends Behaviour {
data = {
speed: 1 as FloatInput,
mass: 0.5 as FloatInput,
};
}Runtime usage
Use the value directly as a number:
ts
onUpdate() {
this.transform.rotation.y += this.data.speed * this.deltaTime;
}Notes
- Supports any finite
number— positive, negative, or fractional. - Use
SliderInputwhen you want to clamp the value to a min/max range.

