Material.custom()¶
Description¶
A user-defined material with a specified color.
Syntax¶
Parameters¶
| Parameter | Type | Default Value | Optional | Description | 
|---|---|---|---|---|
| color | color | Qt.red | ❌ | Material color. | 
Return value¶
| Type | Description | 
|---|---|
| CustomMaterial | Object of type CustomMaterial. | 
Example¶
JS
linenums="1"
let m1 = Material.custom()
console.info(m1) // output: Custom, color #ff0000
let m2 = Material.custom(Qt.green)
console.info(m2) // output: Custom, color #00ff00
See also