yahiko Posted July 6, 2017 Share Posted July 6, 2017 I am wondering what is the recommended coding style for pixi.js applications. Here and there, I can see several possibilities involving a general, centralized PIXI.Application instance or something splitted into a renderer and a stage. I feel that the second option is a bit old and almost deprecated. Am I wrong? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 6, 2017 Share Posted July 6, 2017 Its recommended to have a global object which contains "renderer", "stage", "ticker" and "loader" inside. If you are lazy like us, just take PIXI.Application, its not like its magic: https://github.com/pixijs/pixi.js/blob/dev/src/core/Application.js https://github.com/pixijs/pixi.js/blob/dev/src/loaders/index.js#L46 - there's injection of "loader" into App. However, depending on your task, you can have multiple renderers with same stage or switch between stages with same renderer. yahiko and xwz86 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.