Change .1 to .5 since we figured out that it doesnt matter and .5 seems less arbitrary

This commit is contained in:
DD 2017-12-22 17:30:05 -05:00
parent db5ddcbe87
commit 801fc926a0

View file

@ -85,7 +85,7 @@ class ModeTools extends React.Component {
// Direction is average of normal at the point and direction to prev point, using the
// normal that points out from the convex side
// Lenth is curve length * HANDLE_RATIO
const convexity = prev.getCurve().getCurvatureAtTime(.1) < 0 ? -1 : 1;
const convexity = prev.getCurve().getCurvatureAtTime(.5) < 0 ? -1 : 1;
point.handleIn = (prev.getCurve().getNormalAtTime(1)
.multiply(convexity)
.add(prev.point.subtract(point.point).normalize()))
@ -96,7 +96,7 @@ class ModeTools extends React.Component {
// Direction is average of normal at the point and direction to prev point, using the
// normal that points out from the convex side
// Lenth is curve length * HANDLE_RATIO
const convexity = point.getCurve().getCurvatureAtTime(.1) < 0 ? -1 : 1;
const convexity = point.getCurve().getCurvatureAtTime(.5) < 0 ? -1 : 1;
point.handleOut = (point.getCurve().getNormalAtTime(0)
.multiply(convexity)
.add(next.point.subtract(point.point).normalize()))