New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tldraw/primitives

Package Overview
Dependencies
Maintainers
4
Versions
461
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tldraw/primitives - npm Package Compare versions

Comparing version 2.0.0-canary.21cefc77f51c to 2.0.0-canary.2239f16aa2fe

1

dist-cjs/index.js

@@ -115,3 +115,2 @@ "use strict";

var import_setStrokePointRadii = require("./lib/freehand/setStrokePointRadii");
var import_types = require("./lib/freehand/types");
var import_intersect = require("./lib/intersect");

@@ -118,0 +117,0 @@ var import_polygon_helpers = require("./lib/polygon-helpers");

4

dist-cjs/lib/CubicSegment2d.js

@@ -44,2 +44,6 @@ "use strict";

const { a, b, c, d } = this.values;
if (t <= 0)
return import_Vec2d.Vec2d.From(a);
if (t >= 1)
return import_Vec2d.Vec2d.From(d);
return new import_Vec2d.Vec2d(

@@ -46,0 +50,0 @@ (1 - t) * (1 - t) * (1 - t) * a.x + 3 * ((1 - t) * (1 - t)) * t * b.x + 3 * (1 - t) * (t * t) * c.x + t * t * t * d.x,

@@ -56,2 +56,6 @@ "use strict";

const { a, b } = this.values;
if (t <= 0)
return import_Vec2d.Vec2d.From(a);
if (t >= 1)
return import_Vec2d.Vec2d.From(b);
return import_Vec2d.Vec2d.Lrp(a, b, t);

@@ -58,0 +62,0 @@ }

{
"name": "@tldraw/primitives",
"description": "A tiny little drawing app (primitives).",
"version": "2.0.0-canary.21cefc77f51c",
"version": "2.0.0-canary.2239f16aa2fe",
"packageManager": "yarn@3.5.0",

@@ -45,3 +45,3 @@ "author": {

"dependencies": {
"@tldraw/tlschema": "2.0.0-canary.21cefc77f51c"
"@tldraw/tlschema": "2.0.0-canary.2239f16aa2fe"
},

@@ -48,0 +48,0 @@ "jest": {

@@ -34,5 +34,5 @@ import { CubicSegment2d } from './CubicSegment2d'

it(`has the expected normals`, () => {
expect(b.getNormal(0)).toMatchObject({ x: -1, y: -0 })
expect(b.getNormal(0)).toMatchObject({ x: -1, y: 0 })
expect(b.getNormal(0.5)).toMatchObject({ x: -0, y: 1 })
expect(b.getNormal(1)).toMatchObject({ x: 1, y: -0 })
expect(b.getNormal(1)).toMatchObject({ x: 1, y: 0 })
})

@@ -39,0 +39,0 @@

@@ -37,2 +37,5 @@ import { BaseSegment2d } from './BaseSegment2d'

if (t <= 0) return Vec2d.From(a)
if (t >= 1) return Vec2d.From(d)
return new Vec2d(

@@ -39,0 +42,0 @@ (1 - t) * (1 - t) * (1 - t) * a.x +

@@ -50,2 +50,5 @@ import { BaseSegment2d } from './BaseSegment2d'

if (t <= 0) return Vec2d.From(a)
if (t >= 1) return Vec2d.From(b)
return Vec2d.Lrp(a, b, t)

@@ -52,0 +55,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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