@tldraw/primitives
Advanced tools
Comparing version 2.0.0-canary.21cefc77f51c to 2.0.0-canary.2239f16aa2fe
@@ -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"); |
@@ -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
723839
11078
+ Added@tldraw/state@2.0.0-canary.2239f16aa2fe(transitive)
+ Added@tldraw/store@2.0.0-canary.2239f16aa2fe(transitive)
+ Added@tldraw/tlschema@2.0.0-canary.2239f16aa2fe(transitive)
+ Added@tldraw/utils@2.0.0-canary.2239f16aa2fe(transitive)
+ Added@tldraw/validate@2.0.0-canary.2239f16aa2fe(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedreact@18.3.1(transitive)
- Removed@tldraw/store@2.0.0-canary.21cefc77f51c(transitive)
- Removed@tldraw/tlschema@2.0.0-canary.21cefc77f51c(transitive)
- Removed@tldraw/utils@2.0.0-canary.21cefc77f51c(transitive)
- Removed@tldraw/validate@2.0.0-canary.21cefc77f51c(transitive)
- Removedsignia@0.1.5(transitive)