aboutsummaryrefslogtreecommitdiffstats
path: root/bench
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2017-07-25 14:19:49 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2017-07-25 14:19:49 +0200
commitee0b340bfeb2430767d4a2850413f864c42e5405 (patch)
tree7cb4fe28d59643b2054edd6ae5c33ed8d2b33987 /bench
parentd6d389133409b315bc1b74752f58ef2647033bb9 (diff)
downloadsvg.js-ee0b340bfeb2430767d4a2850413f864c42e5405.tar.gz
svg.js-ee0b340bfeb2430767d4a2850413f864c42e5405.zip
add new default constructor (#714)
Diffstat (limited to 'bench')
-rw-r--r--bench/runner.html4
-rw-r--r--bench/tests/10000-rects.js8
2 files changed, 6 insertions, 6 deletions
diff --git a/bench/runner.html b/bench/runner.html
index 4bf447c..965a884 100644
--- a/bench/runner.html
+++ b/bench/runner.html
@@ -40,11 +40,11 @@
<script src="../dist/svg.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js"></script>
<script src="svg.bench.js"></script>
- <!-- <script src="tests/10000-each.js"></script>
+ <!--<script src="tests/10000-each.js"></script> -->
<script src="tests/10000-rects.js"></script>
<script src="tests/10000-circles.js"></script>
<script src="tests/10000-paths.js"></script>
- <script src="tests/10000-boxes.js"></script>-->
+ <script src="tests/10000-boxes.js"></script>
<script src="tests/10000-pointArray-bbox.js"></script>
<script>
SVG.bench.run()
diff --git a/bench/tests/10000-rects.js b/bench/tests/10000-rects.js
index aea0c79..98b7ac9 100644
--- a/bench/tests/10000-rects.js
+++ b/bench/tests/10000-rects.js
@@ -65,10 +65,10 @@ SVG.bench.describe('Generate 10000 rects with position and fill', function(bench
SVG.bench.describe('Generate 10000 rects with gradient fill', function(bench) {
bench.test('using SVG.js v2.5.3', function() {
for (var i = 0; i < 10000; i++) {
- var g = bench.draw.gradient('linear', function(stop) {
- stop.at(0, '#000')
- stop.at(0.25, '#f00')
- stop.at(1, '#fff')
+ var g = bench.draw.gradient('linear', function(add) {
+ add.stop(0, '#000')
+ add.stop(0.25, '#f00')
+ add.stop(1, '#fff')
})
bench.draw.rect(100,100).fill(g)