@@ -42,15 +42,12 @@ THREE.Path.prototype.fromPoints = function ( vectors ) {
42
42
43
43
THREE . Path . prototype . moveTo = function ( x , y ) {
44
44
45
- var args = Array . prototype . slice . call ( arguments ) ;
46
- this . actions . push ( { action : 'moveTo' , args : args } ) ;
45
+ this . actions . push ( { action : 'moveTo' , args : [ x , y ] } ) ;
47
46
48
47
} ;
49
48
50
49
THREE . Path . prototype . lineTo = function ( x , y ) {
51
50
52
- var args = Array . prototype . slice . call ( arguments ) ;
53
-
54
51
var lastargs = this . actions [ this . actions . length - 1 ] . args ;
55
52
56
53
var x0 = lastargs [ lastargs . length - 2 ] ;
@@ -59,14 +56,12 @@ THREE.Path.prototype.lineTo = function ( x, y ) {
59
56
var curve = new THREE . LineCurve ( new THREE . Vector2 ( x0 , y0 ) , new THREE . Vector2 ( x , y ) ) ;
60
57
this . curves . push ( curve ) ;
61
58
62
- this . actions . push ( { action : 'lineTo' , args : args } ) ;
59
+ this . actions . push ( { action : 'lineTo' , args : [ x , y ] } ) ;
63
60
64
61
} ;
65
62
66
63
THREE . Path . prototype . quadraticCurveTo = function ( aCPx , aCPy , aX , aY ) {
67
64
68
- var args = Array . prototype . slice . call ( arguments ) ;
69
-
70
65
var lastargs = this . actions [ this . actions . length - 1 ] . args ;
71
66
72
67
var x0 = lastargs [ lastargs . length - 2 ] ;
@@ -80,14 +75,12 @@ THREE.Path.prototype.quadraticCurveTo = function( aCPx, aCPy, aX, aY ) {
80
75
81
76
this . curves . push ( curve ) ;
82
77
83
- this . actions . push ( { action : 'quadraticCurveTo' , args : args } ) ;
78
+ this . actions . push ( { action : 'quadraticCurveTo' , args : [ aCPx , aCPy , aX , aY ] } ) ;
84
79
85
80
} ;
86
81
87
82
THREE . Path . prototype . bezierCurveTo = function ( aCP1x , aCP1y , aCP2x , aCP2y , aX , aY ) {
88
83
89
- var args = Array . prototype . slice . call ( arguments ) ;
90
-
91
84
var lastargs = this . actions [ this . actions . length - 1 ] . args ;
92
85
93
86
var x0 = lastargs [ lastargs . length - 2 ] ;
@@ -102,13 +95,14 @@ THREE.Path.prototype.bezierCurveTo = function( aCP1x, aCP1y, aCP2x, aCP2y, aX, a
102
95
103
96
this . curves . push ( curve ) ;
104
97
105
- this . actions . push ( { action : 'bezierCurveTo' , args : args } ) ;
98
+ this . actions . push ( { action : 'bezierCurveTo' , args : [ aCP1x , aCP1y , aCP2x , aCP2y , aX , aY ] } ) ;
106
99
107
100
} ;
108
101
109
102
THREE . Path . prototype . splineThru = function ( pts /*Array of Vector*/ ) {
110
103
111
104
var args = Array . prototype . slice . call ( arguments ) ;
105
+
112
106
var lastargs = this . actions [ this . actions . length - 1 ] . args ;
113
107
114
108
var x0 = lastargs [ lastargs . length - 2 ] ;
0 commit comments