UNPKG

@zxh19890103/wik

Version:

The world-class JavaScript library for building large-scale digital warehouse both on 2D and 3D.

50 lines (49 loc) 1.34 kB
import { LatLngVector2D } from '../../interfaces'; import { LineBuilder } from './Line'; export declare class CubicBezierCurve implements LineBuilder<L.LatLngLiteral> { p0: L.LatLngLiteral; p1: L.LatLngLiteral; p2: L.LatLngLiteral; p3: L.LatLngLiteral; /** * * @param p0 start * @param p1 control#1 * @param p2 control#2 * @param p3 end */ constructor(...p: L.LatLngLiteral[]); /** * * @param at range of [0, 1] * @returns */ at(t: number): L.LatLngLiteral; diff(t0: number, t1: number): L.LatLngLiteral; /** * measure the distance between two points. * @param t0 [0-1] * @param t1 [0-1] * @param n integer * @returns */ measure(t0: number, t1: number, n?: number): number; /** * * @param s percent [0 - 1] * @param e percent [0 - 1] * @param n samples */ sample(s: number, e: number, n?: number): import("leaflet").LatLngLiteral[]; /** * returns the normal vector respresents the direction forward at distance of t. */ dir(t: number): L.LatLngLiteral; /** * get tangent line at t distance with length specified. * @param t [0-1] * @param length mm default is 1. * @returns */ tangentAt(t: number, length?: number): LatLngVector2D; }