Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

Multiple canvases being rendered in my Pixi app

$
0
0

I have a strange issue with my canvas elements.

I had been developing a Pixi.js project in isolation, then decided to embed it in my React app. 

I have been able to place the Pixi project within a component and have it compile and build along with the React app from the jump, but when I visit the PIxi game, instead of one canvas being rendered, immediately 2 canvases render. And then if I update the code with this browser open, multiple canvases keep getting added to the dom.

Note: this only happens when I run an 'unoptimized' `npm start`. When I do `serve build`, then only one canvas is rendered-but this build does not allow for me to hot-reload so I cannot develop my app like that. I at least need a build that will allow me to see my progress in real time and not make me restart my server every time.

1963381053_Screenshot2022-11-15at8_37_11AM.thumb.png.197129f0cf7c5758043789250210dbe7.png

Any ideas?


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>