mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Improve performance of Path.Line() constructor.
Passing an array is much faster than using arguments directly.
This commit is contained in:
parent
bf50bd649a
commit
49801e4b8b
1 changed files with 2 additions and 2 deletions
|
@ -73,10 +73,10 @@ Path.inject({ statics: new function() {
|
|||
* });
|
||||
*/
|
||||
Line: function(/* from, to */) {
|
||||
return new Path(
|
||||
return new Path([
|
||||
Point.readNamed(arguments, 'from'),
|
||||
Point.readNamed(arguments, 'to')
|
||||
).set(Base.getNamed(arguments));
|
||||
]).set(Base.getNamed(arguments));
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue