cocos_add_mask
Attach a mask component to nodes in Cocos Creator scenes to define visible areas using rectangle, ellipse, or stencil shapes for visual effects.
Instructions
Attach cc.Mask. mask_type: 0=RECT, 1=ELLIPSE, 2=GRAPHICS_STENCIL, 3=SPRITE_STENCIL.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scene_path": "<scene_path>",
"node_id": "<node_id>"
},
"name": "cocos_add_mask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| mask_type | No | ||
| inverted | No | ||
| segments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |