Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TilingSprite not working with PIXI v5 #118

Closed
hoeugene opened this issue Jun 10, 2019 · 3 comments · Fixed by #123
Closed

TilingSprite not working with PIXI v5 #118

hoeugene opened this issue Jun 10, 2019 · 3 comments · Fixed by #123
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@hoeugene
Copy link

Description

"TypeError: Cannot read property 'TilingSprite' of undefined" when using TilingSprite.
This should be caused by TilingSprite rendering from PIXI.extras.TilingSprite, which has been deprecated in v5 of pixi. I've been able to fix this by rendering from PIXI.TilingSprite

Additional info

  • react-pixi-fiber version: 0.8.1
  • React version: 16.8.6
  • ReactDOM version: 16.8.6
  • PixiJS version: 5.0.4
@michalochman
Copy link
Owner

Hi @hoeugene, I would suggest creating Custom Component which creates an instance of PIXI.TilingSprite, something like:

const TilingSprite = CustomPIXIComponent({
  customDisplayObject: props => new PIXI.TilingSprite(props),
}, "TilingSprite");

I will need to address PixiJS v4 and v5 compatibility some way.

@michalochman michalochman added bug Something isn't working enhancement New feature or request labels Jun 10, 2019
@michalochman michalochman self-assigned this Jun 10, 2019
@dmythro
Copy link

dmythro commented Jun 19, 2019

Yeah, the same with ParticleContainer.

Here's a migration guide, but apparently it doesn't cover everything step-by-step.

@michalochman
Copy link
Owner

@hoeugene @Z-AX this should be fixed in next version – v0.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants