davidfig / pixi-viewport

A highly configurable viewport/2D camera designed to work with pixi.js
https://davidfig.github.io/pixi-viewport/
MIT License
1.04k stars 174 forks source link

Incompatibility with viewport.drag() in pixi.js v5.0.2 #458

Closed tzy502 closed 1 year ago

tzy502 commented 1 year ago

When using version 5.0.2, the code viewport.drag().pinch().wheel().decelerate() in the demo does not enable dragging functionality. I had to roll back to version 5.0.1 in order to make it work properly.

blnvdanil commented 1 year ago

Which version of a pixijs are you using?

tzy502 commented 1 year ago

7.1.4

blnvdanil commented 1 year ago

It seems to be related to the changes which were made in pixijs 7.2, where displayObject.interactive = true was deprecated, and 5.2 version of this library is transfered from displayObject.interactive = true to displayObject.eventMode = "static", which means that if you are using pixijs < 7.2 and viewport 5.2 interaction won't work properly

blnvdanil commented 1 year ago

You can see those changes listed here

https://github.com/pixijs/pixijs/releases/tag/v7.2.0

tzy502 commented 1 year ago

thank you