gabrielflorit / script-8.github.io

A JavaScript-based (React + Redux) fantasy computer for making, sharing, and playing tiny retro-looking games.
https://script-8.github.io/
MIT License
646 stars 35 forks source link

mouse position display #227

Closed Kethku closed 5 years ago

Kethku commented 5 years ago

Adds the mouse pixel position to the stats display for debugging purposes.

image

This is useful for locating exactly where you want a sprite to go on the screen. Instead of fiddling with the values, you can place your mouse where you want it and use the reported values.

Kethku commented 5 years ago

This does not take into account the current camera position, and will always output the mouse position in pixel coordinates. Up to you which would be more useful, or even if you want to merge this, I just found it useful when tracking down the getPixel bug.

gabrielflorit commented 5 years ago

I do see the value in this - but somehow I feel like it's not the right thing for SCRIPT-8. It's just a feeling though, and I may be wrong (this happens a lot!). Closing for now.

Kethku commented 5 years ago

Completely understandable. I made the PR on a take it or leave it basis.