David Figatner

Results 213 comments of David Figatner

Try something like this: ```js function round() { viewport.x = Math.round(viewport.x) viewport.y = Math.round(viewport.y) viewport.width = Math.round(viewport.width) viewport.height = Math.round(viewport.height) } viewport.on('moved-end', round) viewport.on('zoomed-end', round) ```

Hmmm...I checked the code, and I think the issue is with Math.round and the precision of rounding floating numbers. If you add a console.log at the start and end of...

Ah, that may be a problem. worldScreenWidth is calculated, not directly set: ```js get worldScreenWidth { return this.screenWidth / this.scale.x } ``` You can reverse it and solve for this.scale.x...

I'm not sure I follow. The viewport is over the entire map. Why would its float value impact the locations of the sprites within containers within the viewport? Just a...

Can you provide details? The acceleration needs to be relatively small (like 0.1) for it to noticeable. I made this note to myself a while ago, and I can't seem...

This looks correct. Where's your follow command?

I'm not sure how pixi-cull would impact the follow. All pixi-cull does it change the visible flag, which pixi-viewport does not use. Hmm....can you console.log both the viewport.position (or viewport.center)...

Does pinch work? Likely something is capturing the pointerdown event before it reaches the canvas element.

Ok, let me know if you continue to have this problem or how you resolved it so that others can benefit.

I haven't seen any. If you mock up something in jsfiddle or the like, I can try to debug it.