import type * as spec from '@galacean/effects-specification'; import { Vector2 } from '@galacean/effects-math/es/core/vector2'; import { Vector3 } from '@galacean/effects-math/es/core/vector3'; import { Quaternion } from '@galacean/effects-math/es/core/quaternion'; export declare class BezierLengthData { points: Array<{ partialLength: number; point: Vector3; }>; totalLength: number; constructor(points: Array<{ partialLength: number; point: Vector3; }>, totalLength: number); } export declare const BezierMap: Record; export declare const BezierDataMap: Record; /** * @param p1 起始点 * @param p2 终点 * @param p3 起始控制点 * @param p4 终止控制点 * @returns */ export declare function buildBezierData(p1: Vector3, p2: Vector3, p3: Vector3, p4: Vector3): { data: BezierLengthData; interval: Vector3; }; export declare class BezierPath { p1: Vector3; p2: Vector3; p3: Vector3; p4: Vector3; readonly lengthData: BezierLengthData; readonly interval: Vector3; readonly totalLength: number; private catching; constructor(p1: Vector3, p2: Vector3, p3: Vector3, p4: Vector3); /** * 获取路径在指定比例长度上点的坐标 * @param percent 路径长度的比例 */ getPointInPercent(percent: number): Vector3; } export declare class BezierQuat { p1: Quaternion; p2: Quaternion; p3: Quaternion; p4: Quaternion; private temp; readonly totalLength: number; constructor(p1: Quaternion, p2: Quaternion, p3: Quaternion, p4: Quaternion); /** * 获取路径在指定比例长度上点的坐标 * @param percent 路径长度的比例 */ getPointInPercent(percent: number): Quaternion; } export declare class BezierEasing { private precomputed; private mSampleValues; private control1; private control2; private weighted; private isConstant; constructor(); constructor(control1: number, control2: number); constructor(control1X: number, control1Y: number, control2X: number, control2Y: number); getValue(x: number): number; private bezierInterpolate; private calcSampleValues; private getTForX; private precompute; } export declare function buildEasingCurve(leftKeyframe: spec.BezierKeyframeValue, rightKeyframe: spec.BezierKeyframeValue): { points: Vector2[]; timeInterval: number; valueInterval: number; curve: BezierEasing; }; /** * 根据关键帧类型获取贝塞尔曲线上的关键点 */ export declare function getControlPoints(leftKeyframe: spec.BezierKeyframeValue, rightKeyframe: spec.BezierKeyframeValue, lineToBezier: boolean): ({ type: 'ease'; p0: Vector2; p1: Vector2; p2: Vector2; p3: Vector2; isHold?: boolean; leftHoldLine?: boolean; rightHoldLine?: boolean; } | { type: 'line'; p0: Vector2; p1: Vector2; p2?: Vector2; p3?: Vector2; isHold?: boolean; leftHoldLine?: boolean; rightHoldLine?: boolean; });