phaserjs / phaserjs/phaser

[4.2.0] Can't put StencilReference into Layer game object

Open Beginner friendly
#7,326 0 comments 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: v4.2.0
  • Operating system:
  • Browser:

Description

Stencil is extended from container and it can be put into Layer game object.
StencilReference does not have setAlpha method, the LayerWebGLRenderer will throw error. Add an empty setAlpha method could fix it.

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 in src/gameobjects/layer/LayerWebGLRenderer.js at the referenced line where StencilReference is handled. Check the StencilReference game object API and verify that placing it in a Layer no longer throws when the renderer calls setAlpha; add or update focused coverage if the surrounding tests identify a suitable location.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.