Socket
Socket
Sign inDemoInstall

js-draw

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-draw - npm Package Compare versions

Comparing version 1.13.2 to 1.14.0

15

dist/cjs/components/util/StrokeSmoother.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc