phaserjs / phaserjs/phaser

NineSlice setFrame() doesnt work when updateSize is false

Open
#7,110 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
40.3k
Forks
7.2k
PR merge metrics
No merged PRs in 30d

Description

Version

  • Phaser Version:
    3.88.2
  • Operating system:
    macOS 15.3.1
  • Browser:
    Google Chrome

Description

When setFrame() is called on a NineSlice game object, and the updateSize parameter is set to false, the frame does not appear to update.

Example Test Code

https://phaser.io/sandbox/3r6cWwMn

Additional Information

In the above sandbox, there is one normal image and one nineslice, both with the same texture and frame. Both have the exact same interactive and listeners set to them, where the frame changes on pointerover and on pointerout. However, only the normal image appears to have its frame changed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Phaser sandbox and inspect NineSlice.setFrame() when updateSize is false, comparing it with the normal image and the pointerover/pointerout transitions. Done means the NineSlice frame visibly changes in both transitions without changing its size.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.