Comparing version 1.13.2 to 1.14.0
@@ -150,3 +150,3 @@ "use strict"; | ||
// Find the intersection between the entering vector and the exiting vector | ||
const maxRelativeLength = 1.7; | ||
const maxRelativeLength = 2.4; | ||
const segmentStart = this.buffer[0]; | ||
@@ -172,14 +172,7 @@ const segmentEnd = newPoint.pos; | ||
} | ||
// No intersection? | ||
if (!controlPoint) { | ||
// Estimate the control point position based on the entering tangent line | ||
controlPoint = segmentStart | ||
.lerp(segmentEnd, 0.5) | ||
.lerp(segmentStart.plus(enteringVec.times(startEndDist)), 0.25); | ||
} | ||
// Equal to an endpoint? | ||
else if (segmentStart.eq(controlPoint) || segmentEnd.eq(controlPoint)) { | ||
// No intersection or the intersection is one of the end points? | ||
if (!controlPoint || segmentStart.eq(controlPoint) || segmentEnd.eq(controlPoint)) { | ||
// Position the control point closer to the first -- the connecting | ||
// segment will be roughly a line. | ||
controlPoint = segmentStart.plus(enteringVec.times(startEndDist / 5)); | ||
controlPoint = segmentStart.plus(enteringVec.times(startEndDist / 4)); | ||
} | ||
@@ -186,0 +179,0 @@ console.assert(!segmentStart.eq(controlPoint, 1e-11), 'Start and control points are equal!'); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = { | ||
number: '1.13.2', | ||
number: '1.14.0', | ||
}; |
{ | ||
"name": "js-draw", | ||
"version": "1.13.2", | ||
"version": "1.14.0", | ||
"description": "Draw pictures using a pen, touchscreen, or mouse! JS-draw is a drawing library for JavaScript and TypeScript. ", | ||
@@ -89,3 +89,3 @@ "types": "./dist/mjs/lib.d.ts", | ||
], | ||
"gitHead": "9a48e4d746783977e2b2808be9d97f3521fb830f" | ||
"gitHead": "6870036bd8c8160dcb00ded1a4e13b3d9b75071a" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3894376
53332