@zyzgroup/core-web 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zyzgroup_core_web.iife.js +2 -2
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +5419 -761
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +2 -2
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +5 -2
- package/types/UPNG.d.ts +143 -0
- package/types/UPNG.d.ts.map +1 -0
- package/types/animate.d.ts +4 -0
- package/types/animate.d.ts.map +1 -0
- package/types/dom.d.ts +2 -0
- package/types/dom.d.ts.map +1 -1
- package/types/file.d.ts +0 -4
- package/types/file.d.ts.map +1 -1
- package/types/image.d.ts +67 -3
- package/types/image.d.ts.map +1 -1
- package/types/index.d.ts +3 -3
- package/types/index.d.ts.map +1 -1
- package/types/microTask.d.ts.map +1 -1
- package/types/onDocumentReady.d.ts.map +1 -1
- package/types/{mvvm.d.ts → reactive.d.ts} +1 -1
- package/types/reactive.d.ts.map +1 -0
- package/types/tween/Easing.d.ts +63 -0
- package/types/tween/Easing.d.ts.map +1 -0
- package/types/tween/Group.d.ts +11 -0
- package/types/tween/Group.d.ts.map +1 -0
- package/types/tween/Interpolation.d.ts +14 -0
- package/types/tween/Interpolation.d.ts.map +1 -0
- package/types/tween/Now.d.ts +3 -0
- package/types/tween/Now.d.ts.map +1 -0
- package/types/tween/Sequence.d.ts +5 -0
- package/types/tween/Sequence.d.ts.map +1 -0
- package/types/tween/Tween.d.ts +69 -0
- package/types/tween/Tween.d.ts.map +1 -0
- package/types/tween/index.d.ts +88 -0
- package/types/tween/index.d.ts.map +1 -0
- package/types/tween/mainGroup.d.ts +3 -0
- package/types/tween/mainGroup.d.ts.map +1 -0
- package/types/Canvas2Image.d.ts +0 -13
- package/types/Canvas2Image.d.ts.map +0 -1
- package/types/canvas.d.ts +0 -2
- package/types/canvas.d.ts.map +0 -1
- package/types/mvvm.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zyzgroup/core-web",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/zyzgroup_core_web.umd.cjs",
|
|
7
7
|
"module": "dist/zyzgroup_core_web.js",
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
"clear:type": "rimraf ./types"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
+
"@types/node": "^20.7.1",
|
|
32
|
+
"pako": "^2.1.0",
|
|
31
33
|
"rimraf": "^5.0.5",
|
|
32
|
-
"typescript": "^5.2.2"
|
|
34
|
+
"typescript": "^5.2.2",
|
|
35
|
+
"uzip": "^0.20201231.0"
|
|
33
36
|
}
|
|
34
37
|
}
|
package/types/UPNG.d.ts
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export default UPNG;
|
|
2
|
+
declare namespace UPNG {
|
|
3
|
+
function toRGBA8(out: any): ArrayBufferLike[];
|
|
4
|
+
namespace toRGBA8 {
|
|
5
|
+
function decodeImage(data: any, w: any, h: any, out: any): Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
function decode(buff: any): {
|
|
8
|
+
tabs: {};
|
|
9
|
+
frames: never[];
|
|
10
|
+
};
|
|
11
|
+
namespace decode {
|
|
12
|
+
function _decompress(out: any, dd: any, w: any, h: any): any;
|
|
13
|
+
function _inflate(data: any, buff: any): any;
|
|
14
|
+
function _readInterlace(data: any, out: any): Uint8Array;
|
|
15
|
+
function _getBPP(out: any): number;
|
|
16
|
+
function _filterZero(data: any, out: any, off: any, w: any, h: any): any;
|
|
17
|
+
function _paeth(a: any, b: any, c: any): any;
|
|
18
|
+
function _IHDR(data: any, offset: any, out: any): void;
|
|
19
|
+
}
|
|
20
|
+
function inflateRaw(N: any, W: any): any;
|
|
21
|
+
namespace _bin {
|
|
22
|
+
function nextZero(data: any, p: any): any;
|
|
23
|
+
function readUshort(buff: any, p: any): number;
|
|
24
|
+
function writeUshort(buff: any, p: any, n: any): void;
|
|
25
|
+
function readUint(buff: any, p: any): number;
|
|
26
|
+
function writeUint(buff: any, p: any, n: any): void;
|
|
27
|
+
function readASCII(buff: any, p: any, l: any): string;
|
|
28
|
+
function writeASCII(data: any, p: any, s: any): void;
|
|
29
|
+
function readBytes(buff: any, p: any, l: any): any[];
|
|
30
|
+
function pad(n: any): any;
|
|
31
|
+
function readUTF8(buff: any, p: any, l: any): string;
|
|
32
|
+
}
|
|
33
|
+
function _copyTile(sb: any, sw: any, sh: any, tb: any, tw: any, th: any, xoff: any, yoff: any, mode: any): boolean;
|
|
34
|
+
function encode(bufs: any, w: any, h: any, ps: any, dels: any, tabs: any, forbidPlte: any): ArrayBufferLike;
|
|
35
|
+
namespace encode {
|
|
36
|
+
function _main(nimg: any, w: any, h: any, dels: any, tabs: any): ArrayBufferLike;
|
|
37
|
+
function compressPNG(out: any, filter: any, levelZero: any): void;
|
|
38
|
+
function compress(bufs: any, w: any, h: any, ps: any, prms: any): {
|
|
39
|
+
ctype: number;
|
|
40
|
+
depth: number;
|
|
41
|
+
plte: any[];
|
|
42
|
+
frames: {
|
|
43
|
+
rect: {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
width: any;
|
|
47
|
+
height: any;
|
|
48
|
+
};
|
|
49
|
+
img: Uint8Array;
|
|
50
|
+
blend: number;
|
|
51
|
+
dispose: number;
|
|
52
|
+
}[];
|
|
53
|
+
};
|
|
54
|
+
function framize(bufs: any, w: any, h: any, alwaysBlend: any, evenCrd: any, forbidPrev: any): {
|
|
55
|
+
rect: {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
width: any;
|
|
59
|
+
height: any;
|
|
60
|
+
};
|
|
61
|
+
img: Uint8Array;
|
|
62
|
+
blend: number;
|
|
63
|
+
dispose: number;
|
|
64
|
+
}[];
|
|
65
|
+
function _updateFrame(bufs: any, w: any, h: any, frms: any, i: any, r: any, evenCrd: any): void;
|
|
66
|
+
function _prepareDiff(cimg: any, w: any, h: any, nimg: any, rec: any): void;
|
|
67
|
+
function _filterZero(img: any, h: any, bpp: any, bpl: any, data: any, filter: any, levelZero: any): any;
|
|
68
|
+
function _filterLine(data: any, img: any, y: any, bpl: any, bpp: any, type: any): void;
|
|
69
|
+
function concatRGBA(bufs: any): ArrayBufferLike;
|
|
70
|
+
}
|
|
71
|
+
function encodeLL(bufs: any, w: any, h: any, cc: any, ac: any, depth: any, dels: any, tabs: any): ArrayBufferLike;
|
|
72
|
+
namespace crc {
|
|
73
|
+
export let table: Uint32Array;
|
|
74
|
+
export function update(c: any, buf: any, off: any, len: any): any;
|
|
75
|
+
export function crc_1(b: any, o: any, l: any): number;
|
|
76
|
+
export { crc_1 as crc };
|
|
77
|
+
}
|
|
78
|
+
function quantize(abuf: any, ps: any): {
|
|
79
|
+
abuf: ArrayBufferLike;
|
|
80
|
+
inds: Uint8Array;
|
|
81
|
+
plte: {
|
|
82
|
+
i0: number;
|
|
83
|
+
i1: any;
|
|
84
|
+
bst: null;
|
|
85
|
+
est: null;
|
|
86
|
+
tdst: number;
|
|
87
|
+
left: null;
|
|
88
|
+
right: null;
|
|
89
|
+
} | {
|
|
90
|
+
i0: number;
|
|
91
|
+
i1: any;
|
|
92
|
+
bst: null;
|
|
93
|
+
est: null;
|
|
94
|
+
tdst: number;
|
|
95
|
+
left: null;
|
|
96
|
+
right: null;
|
|
97
|
+
}[];
|
|
98
|
+
};
|
|
99
|
+
namespace quantize {
|
|
100
|
+
function getKDtree(nimg: any, ps: any, err: any): ({
|
|
101
|
+
i0: number;
|
|
102
|
+
i1: any;
|
|
103
|
+
bst: null;
|
|
104
|
+
est: null;
|
|
105
|
+
tdst: number;
|
|
106
|
+
left: null;
|
|
107
|
+
right: null;
|
|
108
|
+
} | {
|
|
109
|
+
i0: number;
|
|
110
|
+
i1: any;
|
|
111
|
+
bst: null;
|
|
112
|
+
est: null;
|
|
113
|
+
tdst: number;
|
|
114
|
+
left: null;
|
|
115
|
+
right: null;
|
|
116
|
+
}[])[];
|
|
117
|
+
function getNearest(nd: any, r: any, g: any, b: any, a: any): any;
|
|
118
|
+
function planeDst(est: any, r: any, g: any, b: any, a: any): number;
|
|
119
|
+
function dist(q: any, r: any, g: any, b: any, a: any): number;
|
|
120
|
+
function splitPixels(nimg: any, nimg32: any, i0: any, i1: any, e: any, eMq: any): any;
|
|
121
|
+
function vecDot(nimg: any, i: any, e: any): number;
|
|
122
|
+
function stats(nimg: any, i0: any, i1: any): {
|
|
123
|
+
R: number[];
|
|
124
|
+
m: number[];
|
|
125
|
+
N: number;
|
|
126
|
+
};
|
|
127
|
+
function estats(stats: any): {
|
|
128
|
+
Cov: number[];
|
|
129
|
+
q: number[];
|
|
130
|
+
e: number[];
|
|
131
|
+
L: number;
|
|
132
|
+
eMq255: number;
|
|
133
|
+
eMq: number;
|
|
134
|
+
rgba: number;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
namespace M4 {
|
|
138
|
+
function multVec(m: any, v: any): number[];
|
|
139
|
+
function dot(x: any, y: any): number;
|
|
140
|
+
function sml(a: any, y: any): number[];
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=UPNG.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UPNG.d.ts","sourceRoot":"","sources":["../src/UPNG.js"],"names":[],"mappings":";;IAKA,8CAgCC;;QACD,sEA4LC;;IAED;;;MAkKC;;QAED,6DAUC;QAED,6CAMC;QA+VD,yDAqEC;QAED,mCAGC;QAED,yEA4CC;QAED,6CAQC;QAED,uDAgBC;;IA/eC,yCA+GC;;QAmYS,0CAGT;QACW,+CAEX;QACY,sDAGZ;QACS,6CAKT;QACU,oDAKV;QACU,sDAIV;QACW,qDAEX;QACU,qDAIV;QACI,0BAEJ;QACS,qDAWT;;IAEH,mHAyEC;IAED,4GAcC;;QA2BD,iFAmLC;QAED,kEAgBC;QAED;;;;;;;;;;;;;;;UA+IC;QACD;;;;;;;;;;YAgHC;QACD,gGAiDC;QACD,4EAEC;QAED,wGAwBC;QACD,uFAgDC;QA+TD,gDAsBC;;IAr7BD,kHAuBC;;;QAwlBS,kEAIP;QACI,sDAEJ;;;IAGH;;;;;;;;;;;;;;;;;;;;MA0CC;;QAED;;;;;;;;;;;;;;;;eA6EC;QAED,kEAkBC;QACD,oEAGC;QACD,8DAMC;QAED,sFAkBC;QACD,mDAOC;QACD;;;;UAiCC;QACD;;;;;;;;UA6DC;;;QAEU,2CAOR;QACI,qCAEJ;QACI,uCAEJ"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const animateInWeb: (render: (durationTime: number) => void) => void;
|
|
2
|
+
export declare const animateCanvas: (canvasID: string, render: (ctx: CanvasRenderingContext2D, durationTime: number) => void) => void;
|
|
3
|
+
export declare const animateTWEEN: () => void;
|
|
4
|
+
//# sourceMappingURL=animate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animate.d.ts","sourceRoot":"","sources":["../src/animate.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,YAAY,0BAA2B,MAAM,KAAK,IAAI,SAMlE,CAAC;AAEF,eAAO,MAAM,aAAa,aACd,MAAM,gBACF,wBAAwB,gBAAgB,MAAM,KAAK,IAAI,SAQtE,CAAC;AAGF,eAAO,MAAM,YAAY,YAExB,CAAC"}
|
package/types/dom.d.ts
CHANGED
|
@@ -16,5 +16,7 @@ export function siblings(ele: any): never[];
|
|
|
16
16
|
export function isTabInView(): boolean;
|
|
17
17
|
export function navigateBack(): void;
|
|
18
18
|
export function navigateBack2(): void;
|
|
19
|
+
export function getTextWidth(text: any, fontSize: any, fontWeight?: number): number;
|
|
20
|
+
export function getFixedWidthText(text: any, width: any, fontSize?: number, fontWeight?: number, isNeedEllipsis?: boolean): string;
|
|
19
21
|
export function waitForStyleSheetsLoaded(document: any): Promise<any>;
|
|
20
22
|
//# sourceMappingURL=dom.d.ts.map
|
package/types/dom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../src/dom.js"],"names":[],"mappings":"AAiBA,2CAQC;
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../src/dom.js"],"names":[],"mappings":"AAiBA,2CAQC;AAoFD,mEAiBC;AAED,iDAcC;AAED,uDAuBC;AAED,8EAWC;AAED,iFAQC;AAED,kDAMC;AAED,iDAMC;AAED,2CAEC;AAED,kDAUC;AAED,mDAOC;AAvOM,0DAAqE;AAErE,0CAA8D;AAG9D,2CAAuD;AAGvD,4CACkE;AAGlE,uCAA0C;AAE1C,qCAAyC;AACzC,sCAA0C;AAkB1C,oFAaN;AAUM,mIAwCN;AAyIM,sEAmBH"}
|
package/types/file.d.ts
CHANGED
|
@@ -16,8 +16,4 @@ export declare const isJsonDocument: (file: File) => boolean;
|
|
|
16
16
|
export declare const isXmlDocument: (file: File) => boolean;
|
|
17
17
|
export declare function getFileType(file: File): Promise<unknown>;
|
|
18
18
|
export declare function fn2ObjectURL(fn: (...args: any[]) => any): string;
|
|
19
|
-
export declare function file2Image(file: File, options?: {
|
|
20
|
-
width?: number;
|
|
21
|
-
height?: number;
|
|
22
|
-
}): HTMLImageElement | undefined;
|
|
23
19
|
//# sourceMappingURL=file.d.ts.map
|
package/types/file.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AAUA,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,gBAAgB,EACpB,EAAE,EAAE,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,KAAK,GAAG,QASpC;AAED,wBAAgB,sBA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AE,CA8ChB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,SAAS,uDACP,WAAW,eAsBzB,CAAC;AAQF,eAAO,MAAM,gBAAgB,SAAU,IAAI,GAAG,MAAM,KAAG,MAQtD,CAAC;AAEF,eAAO,MAAM,OAAO,SAAU,IAAI,KAAG,OAEpC,CAAC;AAEF,eAAO,MAAM,OAAO,SAAU,IAAI,KAAG,OAEpC,CAAC;AAEF,eAAO,MAAM,OAAO,SAAU,IAAI,KAAG,OAEpC,CAAC;AAEF,eAAO,MAAM,cAAc,SAAU,IAAI,KAAG,OAI3C,CAAC;AAEF,eAAO,MAAM,eAAe,SAAU,IAAI,KAAG,OAI5C,CAAC;AAEF,eAAO,MAAM,oBAAoB,SAAU,IAAI,KAAG,OAIjD,CAAC;AAEF,eAAO,MAAM,cAAc,SAAU,IAAI,KAAG,OAE3C,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,IAAI,KAAG,OAE1C,CAAC;AAOF,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,oBA+BrC;AAKD,wBAAgB,YAAY,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,UAMvD"}
|
package/types/image.d.ts
CHANGED
|
@@ -1,4 +1,68 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export interface ImgInfo {
|
|
2
|
+
name: string;
|
|
3
|
+
fileType: string;
|
|
4
|
+
size: number;
|
|
5
|
+
imgUrl: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
imageData: ImageData;
|
|
9
|
+
blob: Blob;
|
|
10
|
+
}
|
|
11
|
+
export declare const getRawImgInfo: (imgUrl: string, cb: (err: any, rawInfo: Pick<ImgInfo, "width" | "height"> | null) => void) => void;
|
|
12
|
+
export declare const getImgInfo: (files: FileList, callback: (err: any, imgInfo: ImgInfo | null) => void) => void;
|
|
13
|
+
export declare const getImageType: (buffer: ArrayBuffer) => string;
|
|
14
|
+
export declare const fileOrBlobToDataURL: (obj: File | Blob, cb: (err: any, result: string | null) => void) => void;
|
|
15
|
+
export declare const getCanvasImgData: (imgUrl: string, width: number, height: number) => ImageData | null;
|
|
16
|
+
export declare const getCanvasImgDataByVideo: (video: HTMLVideoElement, width?: number, height?: number) => ImageData | null;
|
|
17
|
+
export declare const getCanvasImgDataByBitmap: (imageBitmap: ImageBitmap, width?: number, height?: number) => ImageData | null;
|
|
18
|
+
export declare const imageDataToBitmap: (imageData: ImageData) => string;
|
|
19
|
+
export declare const imageDataToDataURL: (imageData: ImageData) => string | null;
|
|
20
|
+
export declare const imageDataToBlob: (imageData: ImageData, exportImageType: string | undefined, cb: (err: any, blob: Blob | null) => void) => void;
|
|
21
|
+
export declare const blobToImage: (blob: Blob, cb: (err: any) => void) => void;
|
|
22
|
+
export declare const blobToExport: (blob: Blob, imgName: string) => void;
|
|
23
|
+
export declare function loadImage(url: string, cb: (err: any, image: HTMLImageElement | null) => void): void;
|
|
24
|
+
export declare function lazyloadImages(): () => void;
|
|
25
|
+
export declare function getImageMainColor(imgUrl: string, cb: (err: any, rgb: string | null) => void): void;
|
|
26
|
+
export declare const flipSideToSide: (imageData: ImageData) => ImageData | null;
|
|
27
|
+
export declare const flipUpsideDown: (imageData: ImageData) => ImageData | null;
|
|
28
|
+
export declare const leftRotate: (imageData: ImageData) => ImageData | null;
|
|
29
|
+
export declare const rightRotate: (imageData: ImageData) => ImageData | null;
|
|
30
|
+
export declare const toGrey: (imageData: ImageData) => ImageData | null;
|
|
31
|
+
export declare const toBlackAndWhite: (imageData: ImageData) => ImageData | null;
|
|
32
|
+
export declare const toOpposite: (imageData: ImageData) => ImageData | null;
|
|
33
|
+
export declare const toRed: (imageData: ImageData) => ImageData | null;
|
|
34
|
+
export declare const toGreen: (imageData: ImageData) => ImageData | null;
|
|
35
|
+
export declare const toBlue: (imageData: ImageData) => ImageData | null;
|
|
36
|
+
export declare const toRedAndGreen: (imageData: ImageData) => ImageData | null;
|
|
37
|
+
export declare const toRedAndBlue: (imageData: ImageData) => ImageData | null;
|
|
38
|
+
export declare const toBlueAndGreen: (imageData: ImageData) => ImageData | null;
|
|
39
|
+
export declare const toRedAndGrey: (imageData: ImageData) => ImageData | null;
|
|
40
|
+
export declare const toGreenAndGrey: (imageData: ImageData) => ImageData | null;
|
|
41
|
+
export declare const toBlueAndGrey: (imageData: ImageData) => ImageData | null;
|
|
42
|
+
export declare const sharpen: (imageData: ImageData) => ImageData | null;
|
|
43
|
+
export declare const marginSharpen: (imageData: ImageData) => ImageData | null;
|
|
44
|
+
export declare const jpgToPng: (imageData: ImageData) => ImageData | null;
|
|
45
|
+
export declare const pngToJpg: (imageData: ImageData) => ImageData | null;
|
|
46
|
+
export declare const rectClip: (imageData: ImageData, newWidth: number, newHeight: number, top: number, left: number, retainOriginalSize?: boolean, imageType?: string) => ImageData | null;
|
|
47
|
+
export declare const radiusClip: (imageData: ImageData, borderRadius: number, imageType: string, jpgToPNG?: boolean) => ImageData | null;
|
|
48
|
+
export declare const changeSize: (imgUrl: string, width: number, height: number, newWidth: number, newHeight: number, maxWidthHeight?: number) => ImageData | null;
|
|
49
|
+
export declare const changeBrightness: (imageData: ImageData, changeNum: number) => ImageData | null;
|
|
50
|
+
export declare const changeDiaphaneity: (imageData: ImageData, value: number, fixedDiaphaneity?: boolean) => ImageData | null;
|
|
51
|
+
export declare const addWatermark: (imageData: ImageData, watermarkImageData: ImageData, top: number, left: number) => ImageData | null;
|
|
52
|
+
export declare const mosaic: (imageData: ImageData, mosaicWidth: number, mosaicHeight: number, top: number, left: number, mosaicSize?: number) => ImageData | null;
|
|
53
|
+
export declare const compression: (imageUrl: string | ImageData, width: number, height: number, imageType: string, compressionDegree: number, cb: (blob: Blob | null) => void) => Promise<void>;
|
|
54
|
+
export declare const getImageDataByAIData: (originalImageData: ImageData, AIImageData: ImageData, options?: {
|
|
55
|
+
backgroundColor: {
|
|
56
|
+
r: number;
|
|
57
|
+
g: number;
|
|
58
|
+
b: number;
|
|
59
|
+
a: number;
|
|
60
|
+
};
|
|
61
|
+
changeIntoColor: {
|
|
62
|
+
r: number;
|
|
63
|
+
g: number;
|
|
64
|
+
b: number;
|
|
65
|
+
a: number;
|
|
66
|
+
};
|
|
67
|
+
}) => ImageData | null;
|
|
4
68
|
//# sourceMappingURL=image.d.ts.map
|
package/types/image.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../src/image.
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../src/image.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,eAAO,MAAM,aAAa,WAChB,MAAM,YACJ,GAAG,WAAW,KAAK,OAAO,EAAE,OAAO,GAAG,QAAQ,CAAC,GAAG,IAAI,KAAK,IAAI,SAU1E,CAAC;AAGF,eAAO,MAAM,UAAU,UACd,QAAQ,kBACC,GAAG,WAAW,OAAO,GAAG,IAAI,KAAK,IAAI,SAsDtD,CAAC;AAGF,eAAO,MAAM,YAAY,WAAY,WAAW,WA8B/C,CAAC;AAGF,eAAO,MAAM,mBAAmB,QACzB,IAAI,GAAG,IAAI,YACN,GAAG,UAAU,MAAM,GAAG,IAAI,KAAK,IAAI,SAe9C,CAAC;AAGF,eAAO,MAAM,gBAAgB,WACnB,MAAM,SACP,MAAM,UACL,MAAM,qBAcf,CAAC;AAGF,eAAO,MAAM,uBAAuB,UAC3B,gBAAgB,s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GAAG,IAAI,KAAK,IAAI,kBAiChC,CAAC;AAGF,eAAO,MAAM,oBAAoB,sBACZ,SAAS,eACf,SAAS,YACb;IACP,eAAe,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,eAAe,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjE,qBA2CF,CAAC"}
|
package/types/index.d.ts
CHANGED
|
@@ -13,11 +13,11 @@ export * from "./url";
|
|
|
13
13
|
export * from "./theme";
|
|
14
14
|
export * from "./DOMKeyboardKeyCode";
|
|
15
15
|
export * from "./dom";
|
|
16
|
-
export * from "./
|
|
16
|
+
export * from "./animate";
|
|
17
17
|
export * from "./image";
|
|
18
|
-
export * from "./Canvas2Image";
|
|
19
18
|
export * from "./fetch";
|
|
20
19
|
export * from "./localstorage";
|
|
21
20
|
export * from "./scroll";
|
|
22
|
-
export * from "./
|
|
21
|
+
export * from "./reactive";
|
|
22
|
+
export * from "./tween";
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,OAAO,CAAC;AACtB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
package/types/microTask.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"microTask.d.ts","sourceRoot":"","sources":["../src/microTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"microTask.d.ts","sourceRoot":"","sources":["../src/microTask.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,IAAI,QAYvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onDocumentReady.d.ts","sourceRoot":"","sources":["../src/onDocumentReady.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"onDocumentReady.d.ts","sourceRoot":"","sources":["../src/onDocumentReady.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,IAAI,QAU7C"}
|
|
@@ -10,4 +10,4 @@ export declare function watchEffect(effect: Effect): void;
|
|
|
10
10
|
export declare function reactiveVue2(raw: Target): Target;
|
|
11
11
|
export declare function reactiveVue3(raw: Target): Target;
|
|
12
12
|
export {};
|
|
13
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=reactive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactive.d.ts","sourceRoot":"","sources":["../src/reactive.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAClC,KAAK,MAAM,GAAG,MAAM,IAAI,CAAC;AAoBzB,qBAAa,GAAG;IACd,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;;IAMzB,MAAM;IAMN,MAAM;CAGP;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,QAKzC;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,UAkBvC;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,UAgBvC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export type EasingFunction = (amount: number) => number;
|
|
2
|
+
export declare const Easing: {
|
|
3
|
+
Linear: {
|
|
4
|
+
None: (amount: number) => number;
|
|
5
|
+
};
|
|
6
|
+
Quadratic: {
|
|
7
|
+
In: (amount: number) => number;
|
|
8
|
+
Out: (amount: number) => number;
|
|
9
|
+
InOut: (amount: number) => number;
|
|
10
|
+
};
|
|
11
|
+
Cubic: {
|
|
12
|
+
In: (amount: number) => number;
|
|
13
|
+
Out: (amount: number) => number;
|
|
14
|
+
InOut: (amount: number) => number;
|
|
15
|
+
};
|
|
16
|
+
Quartic: {
|
|
17
|
+
In: (amount: number) => number;
|
|
18
|
+
Out: (amount: number) => number;
|
|
19
|
+
InOut: (amount: number) => number;
|
|
20
|
+
};
|
|
21
|
+
Quintic: {
|
|
22
|
+
In: (amount: number) => number;
|
|
23
|
+
Out: (amount: number) => number;
|
|
24
|
+
InOut: (amount: number) => number;
|
|
25
|
+
};
|
|
26
|
+
Sinusoidal: {
|
|
27
|
+
In: (amount: number) => number;
|
|
28
|
+
Out: (amount: number) => number;
|
|
29
|
+
InOut: (amount: number) => number;
|
|
30
|
+
};
|
|
31
|
+
Exponential: {
|
|
32
|
+
In: (amount: number) => number;
|
|
33
|
+
Out: (amount: number) => number;
|
|
34
|
+
InOut: (amount: number) => number;
|
|
35
|
+
};
|
|
36
|
+
Circular: {
|
|
37
|
+
In: (amount: number) => number;
|
|
38
|
+
Out: (amount: number) => number;
|
|
39
|
+
InOut: (amount: number) => number;
|
|
40
|
+
};
|
|
41
|
+
Elastic: {
|
|
42
|
+
In: (amount: number) => number;
|
|
43
|
+
Out: (amount: number) => number;
|
|
44
|
+
InOut: (amount: number) => number;
|
|
45
|
+
};
|
|
46
|
+
Back: {
|
|
47
|
+
In: (amount: number) => number;
|
|
48
|
+
Out: (amount: number) => number;
|
|
49
|
+
InOut: (amount: number) => number;
|
|
50
|
+
};
|
|
51
|
+
Bounce: {
|
|
52
|
+
In: (amount: number) => number;
|
|
53
|
+
Out: (amount: number) => number;
|
|
54
|
+
InOut: (amount: number) => number;
|
|
55
|
+
};
|
|
56
|
+
generatePow: (power?: number) => {
|
|
57
|
+
In(amount: number): number;
|
|
58
|
+
Out(amount: number): number;
|
|
59
|
+
InOut(amount: number): number;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export default Easing;
|
|
63
|
+
//# sourceMappingURL=Easing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Easing.d.ts","sourceRoot":"","sources":["../../src/tween/Easing.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;AAExD,eAAO,MAAM,MAAM;;uBAGS,MAAM,KAAG,MAAM;;;qBAMjB,MAAM,KAAG,MAAM;sBAGd,MAAM,KAAG,MAAM;wBAGb,MAAM,KAAG,MAAM;;;qBASlB,MAAM,KAAG,MAAM;sBAGd,MAAM,KAAG,MAAM;wBAGb,MAAM,KAAG,MAAM;;;qBASlB,MAAM,KAAG,MAAM;sBAGd,MAAM,KAAG,MAAM;wBAGb,MAAM,KAAG,MAAM;;;qBASlB,MAAM,KAAG,MAAM;sBAGd,MAAM,KAAG,MAAM;wBAGb,MAAM,KAAG,MAAM;;;qBASlB,MAAM,KAAG,MAAM;sBAGd,MAAM,KAAG,MAAM;wBAGb,MAAM,KAAG,MAAM;;;qBAMlB,MAAM,KAAG,MAAM;sBAGd,MAAM,KAAG,MAAM;wBAGb,MAAM,KAAG,MAAM;;;qBAelB,MAAM,KAAG,MAAM;sBAGd,MAAM,KAAG,MAAM;wBAGb,MAAM,KAAG,MAAM;;;qBASlB,MAAM,KAAG,MAAM;sBAWd,MAAM,KAAG,MAAM;wBAWb,MAAM,KAAG,MAAM;;;qBAyBlB,MAAM,KAAG,MAAM;sBAId,MAAM,KAAG,MAAM;wBAIb,MAAM,KAAG,MAAM;;;qBAUlB,MAAM,KAAG,MAAM;sBAGd,MAAM,KAAG,MAAM;wBAWb,MAAM,KAAG,MAAM;;;mBAQ7B,MAAM,GAAG,MAAM;oBACd,MAAM,GAAG,MAAM;sBACb,MAAM,GAAG,MAAM;;CAmBhC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Tween, UnknownProps } from "./Tween";
|
|
2
|
+
export default class Group {
|
|
3
|
+
private _tweens;
|
|
4
|
+
private _tweensAddedDuringUpdate;
|
|
5
|
+
getAll(): Array<Tween<UnknownProps>>;
|
|
6
|
+
removeAll(): void;
|
|
7
|
+
add(tween: Tween<UnknownProps>): void;
|
|
8
|
+
remove(tween: Tween<UnknownProps>): void;
|
|
9
|
+
update(time?: number, preserve?: boolean): boolean;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../src/tween/Group.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQnD,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,OAAO,CAAC,OAAO,CAER;IAEP,OAAO,CAAC,wBAAwB,CAEzB;IAEP,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAMpC,SAAS,IAAI,IAAI;IAIjB,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI;IAKrC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI;IAKxC,MAAM,CAAC,IAAI,GAAE,MAAc,EAAE,QAAQ,UAAQ,GAAG,OAAO;CAkBxD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type InterpolationFunction = (targetValue: number[], easingResult: number) => number;
|
|
2
|
+
export declare const Interpolation: {
|
|
3
|
+
Linear: (v: number[], k: number) => number;
|
|
4
|
+
Bezier: (v: number[], k: number) => number;
|
|
5
|
+
CatmullRom: (v: number[], k: number) => number;
|
|
6
|
+
Utils: {
|
|
7
|
+
Linear: (p0: number, p1: number, t: number) => number;
|
|
8
|
+
Bernstein: (n: number, i: number) => number;
|
|
9
|
+
Factorial: (n: number) => number;
|
|
10
|
+
CatmullRom: (p0: number, p1: number, p2: number, p3: number, t: number) => number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default Interpolation;
|
|
14
|
+
//# sourceMappingURL=Interpolation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Interpolation.d.ts","sourceRoot":"","sources":["../../src/tween/Interpolation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,CAClC,WAAW,EAAE,MAAM,EAAE,EACrB,YAAY,EAAE,MAAM,KACjB,MAAM,CAAC;AAEZ,eAAO,MAAM,aAAa;gBACH,MAAM,EAAE,KAAK,MAAM,KAAG,MAAM;gBAc5B,MAAM,EAAE,KAAK,MAAM,KAAG,MAAM;oBAWxB,MAAM,EAAE,KAAK,MAAM,KAAG,MAAM;;qBAkC7B,MAAM,MAAM,MAAM,KAAK,MAAM,KAAG,MAAM;uBAGpC,MAAM,KAAK,MAAM,KAAG,MAAM;uBAM5B,MAAM,KAAG,MAAM;yBAa/B,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,KACP,MAAM,KACR,MAAM;;CAaZ,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Now.d.ts","sourceRoot":"","sources":["../../src/tween/Now.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,GAAG,EAAE,MAAM,MAAM,CAAC;AA+BtB,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sequence.d.ts","sourceRoot":"","sources":["../../src/tween/Sequence.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,QAAQ;IAC3B,OAAO,CAAC,MAAM,CAAC,OAAO,CAAK;IAE3B,MAAM,CAAC,MAAM,IAAI,MAAM;CAGxB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { EasingFunction } from "./Easing";
|
|
2
|
+
import type { InterpolationFunction } from "./Interpolation";
|
|
3
|
+
import type Group from "./Group";
|
|
4
|
+
export type UnknownProps = Record<string, any>;
|
|
5
|
+
export declare class Tween<T extends UnknownProps> {
|
|
6
|
+
private _object;
|
|
7
|
+
private _group;
|
|
8
|
+
private _id;
|
|
9
|
+
private _isPlaying;
|
|
10
|
+
private _startTime;
|
|
11
|
+
private _delayTime;
|
|
12
|
+
private _duration;
|
|
13
|
+
private _isPaused;
|
|
14
|
+
private _pauseStart;
|
|
15
|
+
private _valuesStart;
|
|
16
|
+
private _valuesEnd;
|
|
17
|
+
private _valuesStartRepeat;
|
|
18
|
+
private _initialRepeat;
|
|
19
|
+
private _repeat;
|
|
20
|
+
private _repeatDelayTime?;
|
|
21
|
+
private _yoyo;
|
|
22
|
+
private _reversed;
|
|
23
|
+
private _easingFunction;
|
|
24
|
+
private _interpolationFunction;
|
|
25
|
+
private _chainedTweens;
|
|
26
|
+
private _isChainStopped;
|
|
27
|
+
private _onStartCallback?;
|
|
28
|
+
private _onStartCallbackFired;
|
|
29
|
+
private _onEveryStartCallback?;
|
|
30
|
+
private _onEveryStartCallbackFired;
|
|
31
|
+
private _onUpdateCallback?;
|
|
32
|
+
private _onRepeatCallback?;
|
|
33
|
+
private _onCompleteCallback?;
|
|
34
|
+
private _onStopCallback?;
|
|
35
|
+
private _goToEnd;
|
|
36
|
+
constructor(_object: T, _group?: Group | false);
|
|
37
|
+
getId(): number;
|
|
38
|
+
isPlaying(): boolean;
|
|
39
|
+
isPaused(): boolean;
|
|
40
|
+
to(properties: UnknownProps, duration?: number): this;
|
|
41
|
+
duration(d?: number): this;
|
|
42
|
+
start(time?: number): this;
|
|
43
|
+
private _setupProperties;
|
|
44
|
+
stop(): this;
|
|
45
|
+
end(): this;
|
|
46
|
+
pause(time?: number): this;
|
|
47
|
+
resume(time?: number): this;
|
|
48
|
+
stopChainedTweens(): this;
|
|
49
|
+
group(group?: Group): this;
|
|
50
|
+
delay(amount?: number): this;
|
|
51
|
+
repeat(times?: number): this;
|
|
52
|
+
repeatDelay(amount?: number): this;
|
|
53
|
+
yoyo(yoyo?: boolean): this;
|
|
54
|
+
easing(easingFunction?: EasingFunction): this;
|
|
55
|
+
interpolation(interpolationFunction?: InterpolationFunction): this;
|
|
56
|
+
chain(...tweens: Array<Tween<any>>): this;
|
|
57
|
+
onStart(callback?: (object: T) => void): this;
|
|
58
|
+
onEveryStart(callback?: (object: T) => void): this;
|
|
59
|
+
onUpdate(callback?: (object: T, elapsed: number) => void): this;
|
|
60
|
+
onRepeat(callback?: (object: T) => void): this;
|
|
61
|
+
onComplete(callback?: (object: T) => void): this;
|
|
62
|
+
onStop(callback?: (object: T) => void): this;
|
|
63
|
+
update(time?: number, autoStart?: boolean): boolean;
|
|
64
|
+
private _updateProperties;
|
|
65
|
+
private _handleRelativeValue;
|
|
66
|
+
private _swapEndStartRepeatValues;
|
|
67
|
+
}
|
|
68
|
+
export default Tween;
|
|
69
|
+
//# sourceMappingURL=Tween.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tween.d.ts","sourceRoot":"","sources":["../../src/tween/Tween.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE/C,qBAAa,KAAK,CAAC,CAAC,SAAS,YAAY;IA+D3B,OAAO,CAAC,OAAO;IAAK,OAAO,CAAC,MAAM;IA7D9C,OAAO,CAAC,GAAG,CAAqB;IAGhC,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,UAAU,CAAK;IAEvB,OAAO,CAAC,UAAU,CAAK;IAEvB,OAAO,CAAC,SAAS,CAAQ;IAGzB,OAAO,CAAC,SAAS,CAAS;IAE1B,OAAO,CAAC,WAAW,CAAK;IAGxB,OAAO,CAAC,YAAY,CAAoB;IAExC,OAAO,CAAC,UAAU,CAAuC;IACzD,OAAO,CAAC,kBAAkB,CAAoB;IAG9C,OAAO,CAAC,cAAc,CAAK;IAE3B,OAAO,CAAC,OAAO,CAAK;IAEpB,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAElC,OAAO,CAAC,KAAK,CAAS;IAEtB,OAAO,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IAAI;IAKxB,MAAM,CAAC,cAAc,GAAE,cAAmC,GAAG,IAAI;IAKjE,aAAa,CACX,qBAAqB,GAAE,qBAA4C,GAClE,IAAI;IAKP,KAAK,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI;IAKzC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAK7C,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAKlD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAK/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAK9C,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAKhD,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAQ5C,MAAM,CAAC,IAAI,SAAQ,EAAE,SAAS,UAAO,GAAG,OAAO;IAuF/C,OAAO,CAAC,iBAAiB;IAmCzB,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,yBAAyB;CAWlC;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import Group from "./Group";
|
|
2
|
+
import Sequence from "./Sequence";
|
|
3
|
+
import Tween from "./Tween";
|
|
4
|
+
export declare const TWEEN: {
|
|
5
|
+
Easing: {
|
|
6
|
+
Linear: {
|
|
7
|
+
None: (amount: number) => number;
|
|
8
|
+
};
|
|
9
|
+
Quadratic: {
|
|
10
|
+
In: (amount: number) => number;
|
|
11
|
+
Out: (amount: number) => number;
|
|
12
|
+
InOut: (amount: number) => number;
|
|
13
|
+
};
|
|
14
|
+
Cubic: {
|
|
15
|
+
In: (amount: number) => number;
|
|
16
|
+
Out: (amount: number) => number;
|
|
17
|
+
InOut: (amount: number) => number;
|
|
18
|
+
};
|
|
19
|
+
Quartic: {
|
|
20
|
+
In: (amount: number) => number;
|
|
21
|
+
Out: (amount: number) => number;
|
|
22
|
+
InOut: (amount: number) => number;
|
|
23
|
+
};
|
|
24
|
+
Quintic: {
|
|
25
|
+
In: (amount: number) => number;
|
|
26
|
+
Out: (amount: number) => number;
|
|
27
|
+
InOut: (amount: number) => number;
|
|
28
|
+
};
|
|
29
|
+
Sinusoidal: {
|
|
30
|
+
In: (amount: number) => number;
|
|
31
|
+
Out: (amount: number) => number;
|
|
32
|
+
InOut: (amount: number) => number;
|
|
33
|
+
};
|
|
34
|
+
Exponential: {
|
|
35
|
+
In: (amount: number) => number;
|
|
36
|
+
Out: (amount: number) => number;
|
|
37
|
+
InOut: (amount: number) => number;
|
|
38
|
+
};
|
|
39
|
+
Circular: {
|
|
40
|
+
In: (amount: number) => number;
|
|
41
|
+
Out: (amount: number) => number;
|
|
42
|
+
InOut: (amount: number) => number;
|
|
43
|
+
};
|
|
44
|
+
Elastic: {
|
|
45
|
+
In: (amount: number) => number;
|
|
46
|
+
Out: (amount: number) => number;
|
|
47
|
+
InOut: (amount: number) => number;
|
|
48
|
+
};
|
|
49
|
+
Back: {
|
|
50
|
+
In: (amount: number) => number;
|
|
51
|
+
Out: (amount: number) => number;
|
|
52
|
+
InOut: (amount: number) => number;
|
|
53
|
+
};
|
|
54
|
+
Bounce: {
|
|
55
|
+
In: (amount: number) => number;
|
|
56
|
+
Out: (amount: number) => number;
|
|
57
|
+
InOut: (amount: number) => number;
|
|
58
|
+
};
|
|
59
|
+
generatePow: (power?: number) => {
|
|
60
|
+
In(amount: number): number;
|
|
61
|
+
Out(amount: number): number;
|
|
62
|
+
InOut(amount: number): number;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
Group: typeof Group;
|
|
66
|
+
Interpolation: {
|
|
67
|
+
Linear: (v: number[], k: number) => number;
|
|
68
|
+
Bezier: (v: number[], k: number) => number;
|
|
69
|
+
CatmullRom: (v: number[], k: number) => number;
|
|
70
|
+
Utils: {
|
|
71
|
+
Linear: (p0: number, p1: number, t: number) => number;
|
|
72
|
+
Bernstein: (n: number, i: number) => number;
|
|
73
|
+
Factorial: (n: number) => number;
|
|
74
|
+
CatmullRom: (p0: number, p1: number, p2: number, p3: number, t: number) => number;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
now: () => number;
|
|
78
|
+
Sequence: typeof Sequence;
|
|
79
|
+
nextId: typeof Sequence.nextId;
|
|
80
|
+
Tween: typeof Tween;
|
|
81
|
+
getAll: () => Tween<import("./Tween").UnknownProps>[];
|
|
82
|
+
removeAll: () => void;
|
|
83
|
+
add: (tween: Tween<import("./Tween").UnknownProps>) => void;
|
|
84
|
+
remove: (tween: Tween<import("./Tween").UnknownProps>) => void;
|
|
85
|
+
update: (time?: number, preserve?: boolean) => boolean;
|
|
86
|
+
};
|
|
87
|
+
export default TWEEN;
|
|
88
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tween/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,SAAS,CAAC;AAG5B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,MAAM,SAAS,CAAC;AAe5B,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAajB,CAAC;AACF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mainGroup.d.ts","sourceRoot":"","sources":["../../src/tween/mainGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,eAAO,MAAM,SAAS,OAAc,CAAC"}
|