The goal : when the player moves , the black space must be smoothly clearing, and map under it showing. ( as it in Warcraft game )
I have tried many ways, but unsuccessful. I did it with mask which put multiple circles all the way player moves. But it overloads computer resources - when it put more than 1000 circles , program begins work slow.
Can somebody offer ways to solve this problem ?
Or I need somehow set a circle alpha inside a rectangle. Like a hole in the rectangle. Without mask and without creating many circles.
I am not really sure on the best way to handle this, but what you are referring to is commonly called “fog of war”. You may be able to find some resources or tutorials on the best way to handle it using that in your search.
Thanks, i searched for it, but haven’t found good examples or solutions for phaser 3. Here man describes same problem with drawing many circles and losing performance from 60 to 40-50 fps: http://www.html5gamedevs.com/topic/38537-fog-of-war-performance/