Phaser API Documentation

  Version: 
stamp(key, [frame], [x], [y], [config])

Description:

Takes the given texture key and frame and then stamps it at the given x and y coordinates. You can use the optional 'config' argument to provide lots more options about how the stamp is applied, including the alpha, tint, angle, scale and origin.

By default, the frame will stamp on the x/y coordinates based on its center.

If you wish to stamp from the top-left, set the config originX and originY properties both to zero.

Parameters:

name type arguments description
key string

The key of the texture to be used, as stored in the Texture Manager.

frame string | number <optional>

The name or index of the frame within the Texture. Set to null to skip this argument if not required.

x number <optional>

The x position to draw the frame at.

y number <optional>

The y position to draw the frame at.

config Phaser.Types.Textures.StampConfig <optional>

The stamp configuration object, allowing you to set the alpha, tint, angle, scale and origin of the stamp.

Returns:
Description:

This Render Texture instance.