Table of contents

Public class

Signature
class CubicSpline2d extends Geometry2d {}
References

Geometry2d

Source

packages/editor/src/lib/primitives/geometry/CubicSpline2d.ts


Constructor

Public constructor

Constructs a new instance of the CubicSpline2d class

Parameters
NameDescription

config

Omit<
  Geometry2dOptions,
  'isClosed' | 'isFilled'
> & {
  points: Vec[]
}
References

Vec


Properties



length

Public readonly property

Signature
get length(): number

points

Public property

Signature
points: Vec[]
References

Vec


segments

Public readonly property

Signature
get segments(): CubicBezier2d[]
References

CubicBezier2d


Methods

getVertices()

Public method

Signature
getVertices(): Vec[]
References

Vec


hitTestLineSegment()

Public method

Signature
hitTestLineSegment(A: Vec, B: Vec, zoom: number): boolean
Parameters
NameDescription

A

Vec

B

Vec

zoom

number
Returns
boolean
References

Vec


nearestPoint()

Public method

Signature
nearestPoint(A: Vec): Vec
Parameters
NameDescription

A

Vec
Returns
Vec
References

Vec


CubicBezier2ddataUrlToFile