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

Question: how can i use custom zoom level? #446

Open Connorthe1 opened 1 year ago

Connorthe1 commented 1 year ago

Hello, thank for a great plugin, can you help me for creating zoom levels instead of wheel percent value? For example i need array of levels [1, 5, 10, 15, 20] (in percents) and wheel event can only switch between this values. How can I make it? The only thing I found was a percentage change in wheel() which results in (1.99999999) values and depending on the mouse settings in windows this percentage can be different, which does not quite work for me