Erase Canvas Texture

The objects are mixed up.

// CanvasTexture
this.textures1 = this.textures.get('canvastextures1');

// CanvasRenderingContext2D
var ctx = this.textures1.getContext();

ctx.globalCompositeOperation = 'destination-out';
ctx.beginPath();
ctx.arc(420, 50, 180, 0, Math.PI * 2, false);
ctx.closePath();
ctx.fill();

this.textures1.refresh();
1 Like