pixi-viewport
pixi-viewport copied to clipboard
Mouse edge distance fix
The wrong variable was used, causing strange behavior when using MouseEdge with distance, for Right and Bottom.
This issue was mentioned here: https://github.com/davidfig/pixi-viewport/issues/263
@davidfig
@davidfig Anything I need to do in order to get this looked over? Thanks!
@davidfig Anything I need to do in order to get this looked over? Thanks!
Totally need this feature in <3 GL
👀 🙏 👀
@davidfig I would also love to see this in! I will build a workaround now (reinitialize the plugin on resize with overwriting worldScreen* in viewport) @kurtwaldowski-echelon thank you for digging deeper into this!
@AjayKoenigArcurve @kurtwaldowski-echelon :
There is a nice workaround (worldScreenX = screenX * scale):
// workaround until https://github.com/davidfig/pixi-viewport/pull/373 is merged
const oldScale = {x: viewport.scale.x, y: viewport.scale.y}
viewport.scale = {x: 1, y: 1}
viewport.plugins.get('mouse-edges')?.resize()
viewport.scale = oldScale
@ribx Thanks for the workaround, I forked but may run with this instead for now!
@ribx Thanks for the workaround, I forked but may run with this instead for now!
Confirmed it works on my end as well, thanks for this for the time being.
Thanks!