mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Update Path Length tests.
This commit is contained in:
parent
7c51369426
commit
438df42b7c
1 changed files with 4 additions and 1 deletions
|
@ -18,11 +18,14 @@ test('path.length', function() {
|
||||||
// 5: 172.1100076851322
|
// 5: 172.1100076851322
|
||||||
compareNumbers(length, 172.10122680664062);
|
compareNumbers(length, 172.10122680664062);
|
||||||
|
|
||||||
|
var curve = path.curves[0];
|
||||||
var t = Date.now(), c = 1000;
|
var t = Date.now(), c = 1000;
|
||||||
for (var i = 0; i < c; i++) {
|
for (var i = 0; i < c; i++) {
|
||||||
var param = path.curves[0].getParameter(length / 4);
|
var param = curve.getParameter(length / 4);
|
||||||
}
|
}
|
||||||
window.console.log(Date.now() - t, param);
|
window.console.log(Date.now() - t, param);
|
||||||
|
|
||||||
|
var param = curve.getParameter(length / 4);
|
||||||
// ai: 0.2255849553116685
|
// ai: 0.2255849553116685
|
||||||
// 8: 0.22558507711602457
|
// 8: 0.22558507711602457
|
||||||
// 5: 0.22558507714028128
|
// 5: 0.22558507714028128
|
||||||
|
|
Loading…
Reference in a new issue