Regentix Posted March 3, 2018 Share Posted March 3, 2018 Hello, i am new to using Phaser, and i would love to know if i am able to use DOM elements within my Phaser stage (canvas). I have a div which is styled to look like a ball and i would like to use this ball in the phaser game to physicly bounce on any of the ledges i will define in the future. My question: can i use this DOM element to do so? Or should i use a sprite/image? Because whenever the ball hits any of the ledges, i want it to change color. (I know this is possible with sprites and sprite recoloring) Greetings, Regentix Link to comment Share on other sites More sharing options...
oplayer Posted March 3, 2018 Share Posted March 3, 2018 Briefly, you can't Link to comment Share on other sites More sharing options...
casey Posted March 3, 2018 Share Posted March 3, 2018 It's better to use Phaser sprites for that kind of thing. You can use DOM elements, and some people use it for UI and other static elements, but it makes more sense to use sprites for moving objects and items going on inside your game. Link to comment Share on other sites More sharing options...
Recommended Posts