The usage of Phaser.GameObjects.Extern

this is a new game object, from the source code, it shows this game object only breaks the batch drawing… expcet this, I can’t figure out what is the other situation to use this game object, anyone has some tips on this?

Your observation is correct. The Extern cleans up the state of the renderer and runs your own rendering function, after which it restores all state needed by Phaser. Its purpose is to delegate rendering to another library and allow it to do anything with the WebGL context without confusing the Phaser renderer. This is how Spine objects are implemented. It’s also possible to use, for example, three.js for 3D rendering.

3 Likes

this does make sense! thank you so much @Telinc1