float
Float/Double parameter
The float type represents a floating-point parameter that can be exposed in the user interface.
It allows for configuring numeric inputs with options like sliders and value constraints.
Shader Equivalent
Example
{
"type": "float",
"name": "my_float_value",
"label": "My float",
"slider": true,
"min": 0,
"max": 2,
"default": 1,
"step": 0.01
}
Properties
Property |
Type | Required | If absent | Description |
|---|---|---|---|---|
default |
number | Yes | - | - |
name |
string | Yes | - | Name of the field. It must be the same as the associated variable in the shader. |
type |
enum (string) | Yes | - | - |
description |
string | No | - | Description of the field. It will be shown in the UI. |
devmode |
boolean | No | false |
If set to true, this field will only be available in the property UI if the developer mode is active. |
label |
string | No | "Same as name" |
The label of the field in the UI. If not set, the name will be used. |
max |
number | No | 100 |
Maximum value of the parameter |
min |
number | No | 0 |
Minimum value of the parameter |
slider |
boolean | No | false |
Show a slider in the UI |
step |
number | No | 0.01 |
Smaller step allowed |