Skip to main content
POST
/
material
/
set
set material properties on an entity
curl --request POST \
  --url http://localhost:3917/material/set \
  --header 'Content-Type: application/json' \
  --data '
{
  "entity_id": 1,
  "albedo": [
    123
  ],
  "alpha_mode": "<string>",
  "emissive": [
    123
  ],
  "metallic": 123,
  "roughness": 123
}
'
{
  "ok": true,
  "message": "<string>"
}

Body

application/json
entity_id
integer<int32>
required
Required range: x >= 0
albedo
number<float>[] | null

Albedo color as [r, g, b, a]

alpha_mode
string | null

Alpha mode: "opaque", "blend", or "mask:0.5"

emissive
number<float>[] | null

Emissive color as [r, g, b]

metallic
number<float> | null

Metallic factor (0.0 - 1.0)

roughness
number<float> | null

Roughness factor (0.0 - 1.0)

Response

200 - application/json

Material updated on the entity (component created if absent); ok is false with a message when the entity is not found.

ok
boolean
required
message
string | null