NineSlice setFrame() doesnt work when updateSize is false
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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