set_material_diffuse
Assign RGB color values to the diffuse property of a material in PlayCanvas Editor by specifying an asset ID and a color array.
Instructions
Set diffuse property on a material
Input Schema
Name | Required | Description | Default |
---|---|---|---|
assetId | Yes | An asset ID. | |
color | Yes | A 3-channel RGB color |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"assetId": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "An asset ID."
},
"color": {
"description": "A 3-channel RGB color",
"items": [
{
"description": "Red",
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"description": "Green",
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"description": "Blue",
"maximum": 1,
"minimum": 0,
"type": "number"
}
],
"maxItems": 3,
"minItems": 3,
"type": "array"
}
},
"required": [
"assetId",
"color"
],
"type": "object"
}