cocos_add_spot_light
Add a cone-shaped spot light to a Cocos Creator scene node to simulate focused illumination like torches or stage lighting.
Instructions
Attach cc.SpotLight — cone-shaped light (torch, stage spot).
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_spot_light"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| color_r | No | ||
| color_g | No | ||
| color_b | No | ||
| color_a | No | ||
| size | No | ||
| luminance | No | ||
| light_range | No | ||
| spot_angle | No | ||
| angle_attenuation_strength | No | ||
| term | No | ||
| shadow_enabled | No | ||
| shadow_pcf | No | ||
| use_color_temperature | No | ||
| color_temperature | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |