question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Graphics.beginTextureFill repeats texture on desktop but not on mobile

See original GitHub issue

Expected Behavior

When rendering a texture that is smaller the the shape of PIXI.Graphics, mobile and desktop should render the texture consistently.

Current Behavior

On desktop the texture is repeated:

Screen Shot 2022-07-29 at 1 43 05 PM

On mobile the texture is not:

IMG_2926

Steps to Reproduce

I tried this on Windows, Mac, iOS, and Android. Desktop consistently rendered as repeat but mobile did not.

See https://www.pixiplayground.com/#/edit/Te4e3aETnRB5LvSe0shGf

Environment

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
davidyecommented, Jul 30, 2022

OK - forcing webgl2 did fix this. There still appears a bug with mobile detection though since I see comments that iPhones should be defaulting to WebGL2 but definitely possible to work around this. Thanks!

0reactions
bigtimebuddycommented, Aug 10, 2022

This will be resolved by #7974 in coming v7.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BeginTextureFill - Pixi.js - HTML5 Game Devs Forum
Since graphic sprites have no anchors, the only way to position a texture used with BeginTextureFill is the defaultAnchor of the texture.
Read more >
PIXI.js how to stop PIXI.Graphics being blurry? - Stack Overflow
Okay, I figure it out! I have to add this line : slotTexture.texture.baseTexture.scaleMode = PIXI.SCALE_MODES.NEAREST;.
Read more >
PIXI.Graphics - PixiJS API Documentation
Begin the texture fill. Note: The wrap mode of the texture is forced to REPEAT on render. Name, Type, Attributes, Default, Description ...
Read more >
[Re:PixiJS - Day21] 畫漸層填色、材質重複填滿會遇到的問題
U tried repeat nPOT textures, that supports only in WebGL 2, IE doesn't support WebGL 2. Same problem on mobile, because pixi force...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found