-
-
Notifications
You must be signed in to change notification settings - Fork 962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line drawing quality during animation #1902
Comments
会不会跟屏幕的刷新率存在关系? 我尝试使用requestAnimationFrame来执行动画 有不错的回应。 |
No, even after changing to requestAnimationFrame it still happens. Maybe it's a little less noticeable but I can still see the smudges |
我在以前也做过跟你视频中类似的功能,konva中的公共API Rect在执行动画会变粗,我的解决方案是自定义一个Rect,您可以尝试下我的解决方案 import Konva from "konva"; export interface Props extends ShapeConfig { const getOffsetFromWidth = (width: number) => { export class RectBorderNode extends Konva.Shape {
}
` |
Is there a way to display lines on Windows & chrome without blurring during animation?
When zooming in / out the top and bottom lines are displayed thicker. when the animation stops the line renders correctly as 1px.
I gave parseInt() on the dimensions so that the lines were rendered precisely to a full pixel, but despite this the result on MS Windows is the same as in the movie. The problem does not occur on Mac OS.
preview.mp4
codesandbox:
https://codesandbox.io/p/devbox/konva-todataurl-performance-bug-forked-7jpkqh?workspaceId=ws_JhD6GMpzZ1BnQrCspH8pgU
The text was updated successfully, but these errors were encountered: