Phaser API Documentation

  Version: 
clear([x], [y], [width], [height])

Description:

Clears a portion or everything from this Dynamic Texture by erasing it and resetting it back to a blank, transparent, texture. To clear an area, specify the x, y, width and height.

Parameters:

name type arguments Default description
x number <optional> 0

The left coordinate of the fill rectangle.

y number <optional> 0

The top coordinate of the fill rectangle.

width number <optional> this.width

The width of the fill rectangle.

height number <optional> this.height

The height of the fill rectangle.

Returns:
Description:

This Dynamic Texture instance.

Since: 3.2.0