pixi-viewport icon indicating copy to clipboard operation
pixi-viewport copied to clipboard

Add minimap feature

Open moljac024 opened this issue 5 years ago • 3 comments

How hard would it be to add a minimap feature, like seen here:

http://www.kaleadis.de/lab/04-pixi-cam/

That demo uses an old library that doesn't work with current pixi.js versions and it actually recommends this project :)

moljac024 avatar May 04 '19 06:05 moljac024

I've created a few minimaps in the past with pixi-viewport. It's relatively straightforward. You need to map the coordinates system between the two. Everything else is project-specific (since in most cases you do not want to rerender the world stage in at a smaller scale for performance reasons).

Good luck and let me know if you need any assistance!

davidfig avatar May 04 '19 23:05 davidfig

I'm very new to game programming and cameras and all that jazz so I don't even know where to start right now :)

I was thinking more along the line of that generic minimap, which would just show the whole stage with the size and position of the viewport inside it and would let you drag it to re-position. No re-rendering of the whole stage etc. Just rectangles. Would it be possible to have an example up with that functionality? It would be immensely useful.

I could make a PR when I figure it out though :)

moljac024 avatar May 05 '19 08:05 moljac024

As this post appears higher on Google, here is a link that's worth attaching: https://github.com/davidfig/pixi-viewport/issues/305

spaquet avatar Mar 19 '22 16:03 spaquet