A
A
Anna Bakurova2015-05-27 20:55:56
JavaScript
Anna Bakurova, 2015-05-27 20:55:56

Canvas animation performance?

We made an animation on js that changes the css properties after a certain time (gsap was used)
Due to the fact that large pictures (as compressed as possible) are animated in the animation, the animation is terribly slow.
They suggested doing it on canvas (a friend told the manager that canvas is better because it rasterizes images), I sit and think what it means to rasterize, than it is faster than the usual css js change. And is Canvas really going to be faster.
Animation when switching circles test.cuberto.ru/Neemble/#business_type - chrome support.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Taratin, 2015-05-27
@Libris

UPD The
previous answer is not valid.
Here's an easier option, but you just need to bring it to mind so that it doesn't slide down
https://jsfiddle.net/QW01_01/0p9uz4bq/2/

C
copal, 2015-05-27
@copal

I agree with the previous speakers, but in part. requestAnimationFrame is good, but as far as I know, it cannot be replaced with a polyfill, since it must be synchronized at the engine level.
When it is native, it's good, but not completely, because it only guarantees execution at the moment of entering the frame. And as you know, the execution of a frame can delay a terribly unoptimized code, and indeed any trifle, up to the included Skype.
Here it is necessary to smooth out the time delta. And I have not seen such anti-aliasing in pixi. Although I generally did not see this out of the box at the level of frameworks.
And pixi is a gpu renderer, which is not for beginners. You should not promote it at all in the web-jquery environment.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question