@mocanvas/editor · class
declare class CubicBezier2d extends Geometry2dA single cubic bézier segment: start → end, shaped by the two control
points cp1 and cp2. Shapes drawn as one wire (a connector, a pipeline
link) return this from getGeometry.
Methods · 9
get c1(): VecThe first control point, under the name a spline segment gives it.
get c2(): VecThe second control point, under the name a spline segment gives it.
constructor(config: Flags & {static GetAtT(segment: {The point at t on the bézier defined by segment.
getPointAt(t: number): VecThe point at t ∈ [0, 1] along the curve.
getVertices(): Vec[]get p0(): VecThe start point, under the name a spline segment gives it.
get p1(): VecThe end point, under the name a spline segment gives it.
toPathWords(): number[]Properties · 5
readonly cp1: Vecreadonly cp2: Vecreadonly end: Vecreadonly resolution: numberHow many samples the flattened outline uses.
readonly start: Vecmocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.