Skip to content

Clears

The clear() function is used to clear all paths.

Example

ts
update: function (dt) {
    const ctx = node.getComponent(Graphics);
    ctx.clear();
    ctx.circle(200,200, 200);
    ctx.stroke();
}

Return to the Graphics Component Reference documentation.