Closed navigator117 closed 6 years ago
Hmm...was the follow box near the edge? if bounce and follow are both on then it will cause shaking when near the edges since it doesn't know how to handle that condition.
If that's not it, can you share a video?
It's not bounce. I tried turn it off. It seems all the squares on the stage were shaking. when you zoom the stage to small square, your were find the stage is shake too.
Do you have any plugins turned on except follow? Like decelerate? I'm trying to narrow down the problem. I've seen something similar in the past but I haven't had time to track it down.
@davidfig I think this is what @navigator117 is getting at.
https://gfycat.com/GargantuanZigzagCottontail
I don't think it's related to just follow, but is especially noticeable on zooming. I don't use pixi-viewport but I wrote my own similar solution and have the same effect with PIXI in my app. Perhaps it's some sort of rounding issue? I have roundPixels
turned off in my app and it still happens though.
@jondum is bounce enabled on that gif? I don't see that when I'm zooming normally. It looks like the viewport is trying to keep the box in the center of the screen.
I used the default settings. Looks like bounce is indeed set on default so then yes, bounce was set in that gif.
Tried it again with it off and I didn't see any of that jankiness. Weird.
Were you using the mouse wheel to zoom? That would cause the jankiness with bounce since it fights you when you're not actively turning the wheel. There's less fighting between bounce and zoom when you pinch to zoom.
@navigator117 - closing this issue. Feel free to reopen it if you're still seeing this problem and can provide more details. Thanks!
I found squares in this live example shaked in my chrome browser with 'follow' option check on, but yy-viewport's demo seems work fine and smooth.