PDA

View Full Version : HTML5 Canvas speed vs using <img>



dracule
August 23rd, 2009, 06:45 PM
Hello,

I have something implemented currently in pyglet where I have a bunch of particles flying around and they do a bunch of cool stuff.

I made a real quick mock up using HTML5 canvas drawing circles for the particles using processing.js

i got to about 1500 particles before i hit slow down and things went to about 10-15 FPS (it ran pretty smooth at lower levels)

well my friend copied what I did after I showed him a video and he made his using png images and then jQuery to move them around. well he showed me his at around 3000 particles and it was going about 10fps.

so I am wondering should i even use canvas, or should i use img tags? like i havent optimize my code at all so it should get somewhat faster but then again i dont know.