File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,9 +31,11 @@ var CubicBezierCurve = new Class({
3131 this . p3 = p3 ;
3232 } ,
3333
34- getStartPoint : function ( )
34+ getStartPoint : function ( out )
3535 {
36- return this . p0 ;
36+ if ( out === undefined ) { out = new Vector2 ( ) ; }
37+
38+ return out . copy ( this . p0 ) ;
3739 } ,
3840
3941 getResolution : function ( divisions )
Original file line number Diff line number Diff line change @@ -42,9 +42,11 @@ var EllipseCurve = new Class({
4242 this . _startPoint = this . getPoint ( 0 ) ;
4343 } ,
4444
45- getStartPoint : function ( )
45+ getStartPoint : function ( out )
4646 {
47- return this . _startPoint ;
47+ if ( out === undefined ) { out = new Vector2 ( ) ; }
48+
49+ return out . copy ( this . _startPoint ) ;
4850 } ,
4951
5052 getResolution : function ( divisions )
Original file line number Diff line number Diff line change @@ -29,9 +29,11 @@ var LineCurve = new Class({
2929 this . p1 = p1 ;
3030 } ,
3131
32- getStartPoint : function ( )
32+ getStartPoint : function ( out )
3333 {
34- return this . p0 ;
34+ if ( out === undefined ) { out = new Vector2 ( ) ; }
35+
36+ return out . copy ( this . p0 ) ;
3537 } ,
3638
3739 getResolution : function ( )
Original file line number Diff line number Diff line change @@ -32,9 +32,11 @@ var SplineCurve = new Class({
3232 return vec ;
3333 } ,
3434
35- getStartPoint : function ( )
35+ getStartPoint : function ( out )
3636 {
37- return this . points [ 0 ] ;
37+ if ( out === undefined ) { out = new Vector2 ( ) ; }
38+
39+ return out . copy ( this . points [ 0 ] ) ;
3840 } ,
3941
4042 getResolution : function ( divisions )
You can’t perform that action at this time.
0 commit comments