Skip to content

Add "tint" to the scene.make.image, scene.make.sprite config param (maybe others?) #5609

@micsun-al

Description

@micsun-al

This doesn't seem to tint the image:

const particle = scene.make.image({ key: "blah", tint: 0xff0000 })

This seems to work properly:

const particle = scene.make.image({ key: "blah" })
  .setTint(0xff0000)

... should the top one work?
Inside https://github.com/photonstorm/phaser/blob/v3.51.0/src/gameobjects/image/ImageCreator.js#L12 ...
After var image = new Image(this.scene, 0, 0, key, frame) ...
... maybe add image.setTint(GetAdvancedValue(config, 'tint', null)) ...?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions