jh13 Posted June 11, 2019 Share Posted June 11, 2019 I need some direction on something I am a little unclear about. In my hello-world Pixi.js app I create a basic Graphics object, draw a polygon, and add it to the stage. I then call Application.renderer.render(myApp.stage) to render what I have just drawn. But, even with just this one call to render, how is the screen updated via events like Graphics.mouseover? For example: region.mouseover = function(){ region.tint = 0x000; } Even though I have no game loop to redraw this Graphics object, triggering this event that updates the tint will update the graphics object on the screen. My assumption is that internally Pixi.js has a separate "layer" for tinting and just redraws automatically when the tint is updated. Any clarification on this would be fantastic, I just want to be throughout in my understanding. Thank you! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 11, 2019 Share Posted June 11, 2019 PixiJS Application class is for hello-worldies. I congratulate you! You passed to the next step - you have to create your own app and gameloop: https://github.com/pixijs/pixi.js/wiki/v5-Custom-Application-GameLoop I hope that article explains everything. Well, except interaction. Interaction currently is inside Renderer as a plugin, `renderer.plugins.interaction` and i dont know if it runs on app ticker or pixi shader ticker or pixi global ticker (yeah, there are THREE tickers) jh13 1 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.