David Figatner
David Figatner
It's easiest to copy the wheel plugin from `/src/plugins/wheel.js`. You'll want to override `wheel()` (which handles the `wheel`) event, and optionally `update()`, which handles smoothing the zoom. Some of the...
There's no built in function, but you can use the code from ensureVisible (https://davidfig.github.io/pixi-viewport/jsdoc/src_viewport.js.html#line1023) to calculate the values you need to plug into the animate function (https://davidfig.github.io/pixi-viewport/jsdoc/Viewport.html#animate). I'd be willing...
Hmm...probably a findEnsureVisible() that returns an object with x,y,[width,height]. Or something like that. Haven't really thought about it.
are you asking about the minimap dragging? everything the viewport is capable of doing everything in the demo out of the box (except for the parallax and minimap, which requires...
Ah. yup, I see it. The problem is that pixi-viewport uses pixi's interaction for move events. Once you leave the displayobject, the pointer events are no longer issued. The way...
Similar issue to your other problem. ensureVisible works properly in my tests. How did you initialize the viewport?
I just released 4.7.0 that includes an option to change the scale: `ensureVisible(x, y, width, height, resizeToFit: boolean)`. To use it, just call add a true as the last parameter:...
@ShukantPal To get this working we'd need to move to pixi's new interaction system? This seems a really good optimization.
Is this for Mac or PC trackpads? Have you tried viewport.wheel() for the zoom? (I expect it won't work but worth a try.)
It is possible. I don’t think it’s currently supported. I’ll see if I can get it working.