cocos_drag_preview
Simulate mouse drag interactions in Cocos Creator to test UI elements like sliders or draggable cards by specifying start and end coordinates with adjustable motion steps.
Instructions
Drag the mouse from (from_x, from_y) to (to_x, to_y).
steps is the number of intermediate move events — bump it if
Cocos isn't picking up the drag (some handlers need minimum
motion per frame). 5 is enough for a typical slider or card move.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| from_x | Yes | ||
| from_y | Yes | ||
| to_x | Yes | ||
| to_y | Yes | ||
| steps | No | ||
| button | No | left | |
| wait_ms | No | ||
| viewport_width | No | ||
| viewport_height | No | ||
| timeout_ms | No |