dist/joint.nowrap.js
function(t) {

            var start = this.start;
            var control1 = this.controlPoint1;
            var control2 = this.controlPoint2;
            var end = this.end;

            // shortcuts for `t` values that are out of range
            if (t <= 0) {
                return {
                    startControlPoint1: start.clone(),
                    startControlPoint2: start.clone(),
                    divider: start.clone(),
                    dividerControlPoint1: control1.clone(),
                    dividerControlPoint2: control2.clone()
                };
            }

            if (t >= 1) {
                return {
                    startControlPoint1: control1.clone(),
                    startControlPoint2: control2.clone(),
                    divider: end.clone(),
                    dividerControlPoint1: end.clone(),
                    dividerControlPoint2: end.clone()
                };
            }

            var midpoint1 = (new Line(start, control1)).pointAt(t);
            var midpoint2 = (new Line(control1, control2)).pointAt(t);
            var midpoint3 = (new Line(control2, end)).pointAt(t);

            var subControl1 = (new Line(midpoint1, midpoint2)).pointAt(t);
            var subControl2 = (new Line(midpoint2, midpoint3)).pointAt(t);

            var divider = (new Line(subControl1, subControl2)).pointAt(t);

            var output = {
                startControlPoint1: midpoint1,
                startControlPoint2: subControl1,
                divider: divider,
                dividerControlPoint1: subControl2,
                dividerControlPoint2: midpoint3
            };

            return output;
        }
function(t) {

            var start = this.start;
            var control1 = this.controlPoint1;
            var control2 = this.controlPoint2;
            var end = this.end;

            // shortcuts for `t` values that are out of range
            if (t <= 0) {
                return {
                    startControlPoint1: start.clone(),
                    startControlPoint2: start.clone(),
                    divider: start.clone(),
                    dividerControlPoint1: control1.clone(),
                    dividerControlPoint2: control2.clone()
                };
            }

            if (t >= 1) {
                return {
                    startControlPoint1: control1.clone(),
                    startControlPoint2: control2.clone(),
                    divider: end.clone(),
                    dividerControlPoint1: end.clone(),
                    dividerControlPoint2: end.clone()
                };
            }

            var midpoint1 = (new Line(start, control1)).pointAt(t);
            var midpoint2 = (new Line(control1, control2)).pointAt(t);
            var midpoint3 = (new Line(control2, end)).pointAt(t);

            var subControl1 = (new Line(midpoint1, midpoint2)).pointAt(t);
            var subControl2 = (new Line(midpoint2, midpoint3)).pointAt(t);

            var divider = (new Line(subControl1, subControl2)).pointAt(t);

            var output = {
                startControlPoint1: midpoint1,
                startControlPoint2: subControl1,
                divider: divider,
                dividerControlPoint1: subControl2,
                dividerControlPoint2: midpoint3
            };

            return output;
        }
function ( t ) { var start = this . start ; var control1 = this . controlPoint1 ; var control2 = this . controlPoint2 ; var end = this . end ; // shortcuts for `t` values that are out of range if ( t <= 0 ) { return { startControlPoint1 : start . clone ( ) , startControlPoint2 : start . clone ( ) , divider : start . clone ( ) , dividerControlPoint1 : control1 . clone ( ) , dividerControlPoint2 : control2 . clone ( ) } ; } if ( t >= 1 ) { return { startControlPoint1 : control1 . clone ( ) , startControlPoint2 : control2 . clone ( ) , divider : end . clone ( ) , dividerControlPoint1 : end . clone ( ) , dividerControlPoint2 : end . clone ( ) } ; } var midpoint1 = ( new Line ( start , control1 ) ) . pointAt ( t ) ; var midpoint2 = ( new Line ( control1 , control2 ) ) . pointAt ( t ) ; var midpoint3 = ( new Line ( control2 , end ) ) . pointAt ( t ) ; var subControl1 = ( new Line ( midpoint1 , midpoint2 ) ) . pointAt ( t ) ; var subControl2 = ( new Line ( midpoint2 , midpoint3 ) ) . pointAt ( t ) ; var divider = ( new Line ( subControl1 , subControl2 ) ) . pointAt ( t ) ; var output = { startControlPoint1 : midpoint1 , startControlPoint2 : subControl1 , divider : divider , dividerControlPoint1 : subControl2 , dividerControlPoint2 : midpoint3 } ; return output ; }
Returns five helper points necessary for curve division.
Returns five helper points necessary for curve division .