H
H
hadaev_ivan2016-11-28 15:17:48
JavaScript
hadaev_ivan, 2016-11-28 15:17:48

DIVs, SVGs or Canvas. What to choose for music visualization (in terms of eating resources)?

In my free time, I'm working on a chrome extension ( link to the extension for anyone interested ), which processes music in VK using the Web Audio API, one of the features of which is a music visualizer (frequency bar graph). In short, this is a thing that has an array of numbers as input, and must draw a number of rectangles as output, the height of which corresponds to the numbers from the array. You need to draw quickly, 30-60 times per second.
Actually the question is what to choose for the implementation of such a thing? It is important to eat as few resources as possible and still work quickly. I looked at css transform for a long time, I looked at canvas optimizations for a long time, but I can’t make a final decision. Help, please, who has experience with this)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2016-11-28
@xmoonlight

Canvas+asm.js
Faster on the web - no native options at all.

G
GreatRash, 2016-11-28
@GreatRash

I would take Pixi.js - rendering using WebGL, which means on a video. How much faster.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question