two.js icon indicating copy to clipboard operation
two.js copied to clipboard

Any performance test?

Open caracal7 opened this issue 7 years ago • 8 comments

It will be very good to have something like bunnymark and direct comparison with Pixi and other WebGL wrappers....

caracal7 avatar Jan 31 '18 01:01 caracal7

That would be great to have. The closest thing to this would be the Particle Sandbox. You can add the FPS meter on top. Full disclosure for doing applications in the way bunnymark example works then Pixi has far faster performance than Two.js.

Two.js is better suited for dynamically creating and modifying vector shapes in real-time.

jonobr1 avatar Jan 31 '18 02:01 jonobr1

I think bunnymark analog can be implemented in few lines of code. Maybe I will make it if I will have free time) But I agree with you what Two.js is not a sprite engine and direct comparison with Pixi is not correct. But any way Two.js in my project show very good performance with several thousands of rectangles.👍

caracal7 avatar Jan 31 '18 15:01 caracal7

Indeed! That being said.., Two.js now does support bitmap images so it should be quite straightforward to make a bunnymark example. I'll add this to my list of examples when I finish up the final changes to v0.7.0. Thanks for reporting!

jonobr1 avatar Jan 31 '18 15:01 jonobr1

For reference: http://pixijs.io/bunny-mark/

jonobr1 avatar Mar 26 '18 16:03 jonobr1

image

http://bl.ocks.org/darosh/raw/65f9046bcb91c5f516a1

nowox avatar Aug 02 '18 20:08 nowox

This is awesome @nowox. Thanks for sharing. What version of Two.js is this? Also, what is two-tweak? What did you tweak?

jonobr1 avatar Aug 02 '18 21:08 jonobr1

This is based on v0.5.0. Curious to see how it runs on ~v0.7.0. Now in 2019 the performance has improved without doing anything specifically:

Screen Shot 2019-03-28 at 8 42 18 AM

I also, now see what tweaks can be made in the Two.Matrix class to speed things up. Thanks!

jonobr1 avatar Mar 28 '19 07:03 jonobr1

These diagnostics are nice, thank you. It would be nice to see similar benchmarks of the same project implemented in SVG.js, and vanilla js, shown in a side by side comparison.

NWTM avatar Oct 21 '19 02:10 NWTM