Answer the question
In order to leave comments, you need to log in
Why is it that if you move an element in the Canvas, it moves at conditional 60fps, but if it is inside a DIV, then there are brakes?
Why is it that if you move an element in the Canvas, it moves at conditional 60fps, but if it is inside a DIV, then there are brakes?
It slows down performance, and it's not clear why, even if you place the DIV on the canvas, and moving the DIV to move the element on the canvas, the canvas element moves quickly and smoothly, and the DIV is very slow and slow.
Are there ways to cure this?
Answer the question
In order to leave comments, you need to log in
Canvas and html tags are completely different things in terms of logic and structure. Html tags never implied dynamic movement, change, and the creation of DOM elements did not seem to be something necessary before. This has now changed, but echoes of this live on now due to backward compatibility. These are bricks that just have to stand.
The simplest and most performant option for tags is CSS transforms. You won't do anything else. Or, draw everything on canvas
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question