UNPKG

1.46 kBTypeScriptView Raw
1import { AnimationClip } from "./AnimationClip.js";
2
3declare function convertArray(array: any, type: any, forceClone: boolean): any;
4
5declare function isTypedArray(object: any): boolean;
6
7declare function getKeyframeOrder(times: number[]): number[];
8
9declare function sortedArray(values: any[], stride: number, order: number[]): any[];
10
11declare function flattenJSON(jsonKeys: string[], times: any[], values: any[], valuePropertyName: string): void;
12
13/**
14 * @param sourceClip
15 * @param name
16 * @param startFrame
17 * @param endFrame
18 * @param [fps=30]
19 */
20declare function subclip(
21 sourceClip: AnimationClip,
22 name: string,
23 startFrame: number,
24 endFrame: number,
25 fps?: number,
26): AnimationClip;
27
28/**
29 * @param targetClip
30 * @param [referenceFrame=0]
31 * @param [referenceClip=targetClip]
32 * @param [fps=30]
33 */
34declare function makeClipAdditive(
35 targetClip: AnimationClip,
36 referenceFrame?: number,
37 referenceClip?: AnimationClip,
38 fps?: number,
39): AnimationClip;
40
41declare const AnimationUtils: {
42 convertArray: typeof convertArray;
43 isTypedArray: typeof isTypedArray;
44 getKeyframeOrder: typeof getKeyframeOrder;
45 sortedArray: typeof sortedArray;
46 flattenJSON: typeof flattenJSON;
47 subclip: typeof subclip;
48 makeClipAdditive: typeof makeClipAdditive;
49};
50
51export {
52 AnimationUtils,
53 convertArray,
54 flattenJSON,
55 getKeyframeOrder,
56 isTypedArray,
57 makeClipAdditive,
58 sortedArray,
59 subclip,
60};