diff --git a/README.md b/README.md index 063bed30..dd8563cf 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,9 @@ Fabric.js started as a foundation for design editor on [printio.ru](http://print - [Main demo](http://kangax.github.com/fabric.js/test/demo/) - [Benchmark (quantity)](http://kangax.github.com/fabric.js/test/benchmarks/quantity.html) - [Benchmark (animation)](http://kangax.github.com/fabric.js/test/benchmarks/animation.html) +- [Benchmark (Raphael vs. Fabric; simple shapes)](http://kangax.github.com/fabric.js/test/raphael_vs_fabric/simple_shapes.html) +- [Benchmark (Raphael vs. Fabric; complex shape 1)](http://kangax.github.com/fabric.js/test/raphael_vs_fabric/complex_shape.html) +- [Benchmark (Raphael vs. Fabric; complex shape 2)](http://kangax.github.com/fabric.js/test/raphael_vs_fabric/complex_shape_2.html) ### Documentation diff --git a/test/raphael_vs_fabric/simple_shapes.html b/test/raphael_vs_fabric/simple_shapes.html index a51e3bef..f26fc8cb 100644 --- a/test/raphael_vs_fabric/simple_shapes.html +++ b/test/raphael_vs_fabric/simple_shapes.html @@ -11,6 +11,7 @@ border: 1px solid #000; position: relative; } + ul, ul li { display: inline-block; } @@ -19,7 +20,7 @@ return Math.random() * (max - min) + min; } - var numObjects = 200, + var numObjects = parseInt(document.location.search.slice(1), 10) || 200, radius = 20, width = 500, height = 500; @@ -28,9 +29,11 @@ var logEl = document.getElementById('log'); + document.getElementById('numshapes').innerHTML = numObjects; + (function testRaphael() { - var paper = Raphael(550, 50, width, height), + var paper = Raphael(550, 57, width, height), startTime = new Date(), circle; @@ -86,10 +89,25 @@ })(); }; + + function reload(num) { + document.location.href = document.location.href.replace(/\?\d+$/, '?' + num); + } -

Rendering a large number of simple shapes

+
+ Rendering a large number () of simple shapes + +
+