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

Pixi Viewport 5 no longer has divWheel Viewport Option #450

Open jasonsturges opened 1 year ago

jasonsturges commented 1 year ago

Unless I'm mistaken, IViewportOptions no longer contains divWheel as per the current documentation:

https://davidfig.github.io/pixi-viewport/jsdoc/Viewport.html#Viewport

image

Was this feature intentionally removed and the documentation now stale?

If it was removed, what replaces this functionality?

image

Latest v5.0.1

SamHope1992 commented 7 months ago

Unless I'm mistaken, IViewportOptions no longer contains divWheel as per the current documentation:

https://davidfig.github.io/pixi-viewport/jsdoc/Viewport.html#Viewport image

Was this feature intentionally removed and the documentation now stale?

If it was removed, what replaces this functionality?

image

Latest v5.0.1

Did you ever find a solution to this?

jasonsturges commented 7 months ago

@SamHope1992

With Pixi v7, I use:

events: app.renderer.events,

Wth Pixi v6, I use:

  divWheel: app.view,
  interaction: app.renderer.plugins.interaction,

I don't recall a solution for v5.

In retrospect, I imagine it was typing a issue where ICanvas interface didn't fulfill the Element type.

Probably should have been:

  divWheel: app.view as HTMLCanvasElement