skinview3d-node 3.4.2-node.1
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/LICENSE +22 -0
- package/README.md +210 -0
- package/assets/minecraft.woff2 +0 -0
- package/libs/animation.d.ts +469 -0
- package/libs/model.d.ts +76 -0
- package/libs/nametag.d.ts +89 -0
- package/libs/skinview3d.cjs +2922 -0
- package/libs/skinview3d.d.ts +4 -0
- package/libs/skinview3d.mjs +2898 -0
- package/libs/utils/index.d.ts +3 -0
- package/libs/utils/load-image.d.ts +7 -0
- package/libs/utils/process.d.ts +7 -0
- package/libs/utils/types.d.ts +5 -0
- package/libs/viewer.d.ts +328 -0
- package/package.json +78 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2018 Kent Rasmussen
|
|
4
|
+
Copyright (c) 2017-2022 Haowei Wen, Sean Boult and contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
skinview3d
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
> Fork note / 分支说明
|
|
5
|
+
>
|
|
6
|
+
> English:
|
|
7
|
+
> This fork is adapted from upstream `skinview3d` for server-side and offscreen rendering in Node.js. Compared with upstream, it replaces the browser-oriented rendering path with a backend-friendly implementation based on `skia-canvas` and headless WebGL, adds image/buffer export helpers for single-frame and animation rendering, and includes example pages plus a Vite plugin endpoint for testing backend rendering from the browser.
|
|
8
|
+
>
|
|
9
|
+
> 中文:
|
|
10
|
+
> 这个 fork 基于上游 `skinview3d`,主要改造成适用于 Node.js 的后端/离屏渲染版本。相对上游,它将原本面向浏览器的渲染链路适配为基于 `skia-canvas` 和 headless WebGL 的后端实现,增加了单帧与动画的图片/缓冲区导出能力,并提供了可通过 Vite 接口在浏览器中测试后端渲染的示例页面。
|
|
11
|
+
|
|
12
|
+
[](https://github.com/bs-community/skinview3d/actions?query=workflow:CI)
|
|
13
|
+
[](https://www.npmjs.com/package/skinview3d)
|
|
14
|
+
[](https://github.com/bs-community/skinview3d/blob/master/LICENSE)
|
|
15
|
+
[](https://gitter.im/skinview3d/Lobby)
|
|
16
|
+
|
|
17
|
+
Three.js powered Minecraft skin viewer.
|
|
18
|
+
|
|
19
|
+
# Features
|
|
20
|
+
|
|
21
|
+
* 1.8 Skins
|
|
22
|
+
* HD Skins
|
|
23
|
+
* Capes
|
|
24
|
+
* Ears
|
|
25
|
+
* Elytras
|
|
26
|
+
* Slim Arms
|
|
27
|
+
* Automatic model detection (Slim / Default)
|
|
28
|
+
* FXAA (fast approximate anti-aliasing)
|
|
29
|
+
|
|
30
|
+
# Usage
|
|
31
|
+
|
|
32
|
+
This fork is intended for Node.js backend rendering rather than direct browser embedding.
|
|
33
|
+
|
|
34
|
+
Install:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install skinview3d-node
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Render a single PNG frame:
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
import { writeFileSync } from 'node:fs';
|
|
44
|
+
import { Vector3 } from 'three';
|
|
45
|
+
import { SkinViewer, WalkingAnimation } from 'skinview3d-node';
|
|
46
|
+
import gl from 'gl'
|
|
47
|
+
|
|
48
|
+
const glContext = gl(width, height, { preserveDrawingBuffer: true })
|
|
49
|
+
const width = 300
|
|
50
|
+
const height = 300
|
|
51
|
+
const mockCanvas = {
|
|
52
|
+
width,
|
|
53
|
+
height,
|
|
54
|
+
style: {},
|
|
55
|
+
addEventListener: () => {},
|
|
56
|
+
removeEventListener: () => {},
|
|
57
|
+
getContext: () => glContext
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const skinViewer = new SkinViewer({
|
|
61
|
+
canvas: mockCanvas as any,
|
|
62
|
+
width,
|
|
63
|
+
height,
|
|
64
|
+
skin: './skin.png',
|
|
65
|
+
cape: './cape.png',
|
|
66
|
+
fov: 65,
|
|
67
|
+
zoom: 0.8,
|
|
68
|
+
pixelRatio: 1,
|
|
69
|
+
preserveDrawingBuffer: true,
|
|
70
|
+
animation: new WalkingAnimation()
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
await skinViewer.ready;
|
|
74
|
+
|
|
75
|
+
skinViewer.camera.position.set(25, 22, 25);
|
|
76
|
+
skinViewer.camera.lookAt(new Vector3(0, 5, 0));
|
|
77
|
+
|
|
78
|
+
writeFileSync('out.png', viewer.renderAnimationFrame(progress,true)());
|
|
79
|
+
skinViewer.dispose();
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Render animation frames:
|
|
83
|
+
|
|
84
|
+
```js
|
|
85
|
+
import { writeFileSync } from 'node:fs';
|
|
86
|
+
import { SkinViewer, WalkAnimation } from 'skinview3d-node';
|
|
87
|
+
import gl from 'gl'
|
|
88
|
+
|
|
89
|
+
const glContext = gl(width, height, { preserveDrawingBuffer: true })
|
|
90
|
+
const width = 300
|
|
91
|
+
const height = 300
|
|
92
|
+
const mockCanvas = {
|
|
93
|
+
width,
|
|
94
|
+
height,
|
|
95
|
+
style: {},
|
|
96
|
+
addEventListener: () => {},
|
|
97
|
+
removeEventListener: () => {},
|
|
98
|
+
getContext: () => glContext
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const skinViewer = new SkinViewer({
|
|
102
|
+
canvas: mockCanvas as any,
|
|
103
|
+
width,
|
|
104
|
+
height,
|
|
105
|
+
skin: './skin.png',
|
|
106
|
+
animation: new SwimAnimation(),
|
|
107
|
+
preserveDrawingBuffer: true
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
await skinViewer.ready;
|
|
111
|
+
|
|
112
|
+
const frames = skinViewer.renderAnimationLoop(60);
|
|
113
|
+
const arr: Uint8Array[] = [];
|
|
114
|
+
frames.forEach((frame, i) => {
|
|
115
|
+
const buffer = frame();
|
|
116
|
+
arr.push(buffer);
|
|
117
|
+
// writeFileSync(`out/frame-${i}.png`, buffer)
|
|
118
|
+
});
|
|
119
|
+
const tmpgif = './output.gif' //path.join(os.tmpdir(), 'skinview3d_tmp.gif');
|
|
120
|
+
await framesToGif({
|
|
121
|
+
width,
|
|
122
|
+
height,
|
|
123
|
+
frames: arr,
|
|
124
|
+
outputPath: tmpgif,
|
|
125
|
+
delay: WalkAnimation!.params.delay.value
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
skinViewer.dispose();
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
For local testing, this repository also provides an example Vite page at `examples/offscreen-render.html`.
|
|
132
|
+
It calls a Vite plugin endpoint to render single frames or full animations on the backend and preview the result in the browser.
|
|
133
|
+
|
|
134
|
+
## Lighting
|
|
135
|
+
|
|
136
|
+
By default, there are two lights on the scene. One is an ambient light, and the other is a point light from the camera.
|
|
137
|
+
|
|
138
|
+
To change the light intensity:
|
|
139
|
+
|
|
140
|
+
```js
|
|
141
|
+
skinViewer.cameraLight.intensity = 0.6;
|
|
142
|
+
skinViewer.globalLight.intensity = 3;
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Setting `globalLight.intensity` to `3.0` and `cameraLight.intensity` to `0.0`
|
|
146
|
+
will completely disable shadows.
|
|
147
|
+
|
|
148
|
+
## Ears
|
|
149
|
+
|
|
150
|
+
skinview3d supports two types of ear texture:
|
|
151
|
+
|
|
152
|
+
* `standalone`: 14x7 image that contains the ear ([example](https://github.com/bs-community/skinview3d/blob/master/examples/public/img/ears.png))
|
|
153
|
+
* `skin`: Skin texture that contains the ear (e.g. [deadmau5's skin](https://minecraft.wiki/w/Easter_eggs#deadmau5's_ears))
|
|
154
|
+
|
|
155
|
+
Usage:
|
|
156
|
+
|
|
157
|
+
```js
|
|
158
|
+
// You can specify ears in the constructor:
|
|
159
|
+
new skinview3d.SkinViewer({
|
|
160
|
+
skin: "img/deadmau5.png",
|
|
161
|
+
|
|
162
|
+
// Use ears drawn on the current skin (img/deadmau5.png)
|
|
163
|
+
ears: "current-skin",
|
|
164
|
+
|
|
165
|
+
// Or use ears from other textures
|
|
166
|
+
ears: {
|
|
167
|
+
textureType: "standalone", // "standalone" or "skin"
|
|
168
|
+
source: "img/ears.png"
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
// Show ears when loading skins:
|
|
173
|
+
skinViewer.loadSkin("img/deadmau5.png", { ears: true });
|
|
174
|
+
|
|
175
|
+
// Use ears from other textures:
|
|
176
|
+
skinViewer.loadEars("img/ears.png", { textureType: "standalone" });
|
|
177
|
+
skinViewer.loadEars("img/deadmau5.png", { textureType: "skin" });
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Name Tag
|
|
181
|
+
|
|
182
|
+
Usage:
|
|
183
|
+
|
|
184
|
+
```js
|
|
185
|
+
// Name tag with text "hello"
|
|
186
|
+
skinViewer.nameTag = "hello";
|
|
187
|
+
|
|
188
|
+
// Specify the text color
|
|
189
|
+
skinViewer.nameTag = new skinview3d.NameTagObject("hello", { textStyle: "yellow" });
|
|
190
|
+
|
|
191
|
+
// Unset the name tag
|
|
192
|
+
skinViewer.nameTag = null;
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
In order to display name tags correctly, you need the `Minecraft` font from
|
|
196
|
+
[South-Paw/typeface-minecraft](https://github.com/South-Paw/typeface-minecraft).
|
|
197
|
+
This font is available at [`assets/minecraft.woff2`](assets/minecraft.woff2).
|
|
198
|
+
|
|
199
|
+
To load this font, please add the `@font-face` rule to your CSS:
|
|
200
|
+
|
|
201
|
+
```css
|
|
202
|
+
@font-face {
|
|
203
|
+
font-family: 'Minecraft';
|
|
204
|
+
src: url('/path/to/minecraft.woff2') format('woff2');
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
# Build
|
|
209
|
+
|
|
210
|
+
`npm run build`
|
|
Binary file
|
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
import { PlayerObject } from './model.js';
|
|
2
|
+
type Params = Record<string, {
|
|
3
|
+
value: number | string | boolean;
|
|
4
|
+
desc: string;
|
|
5
|
+
choices?: string[];
|
|
6
|
+
}> & {
|
|
7
|
+
multiple: {
|
|
8
|
+
value: number;
|
|
9
|
+
desc: string;
|
|
10
|
+
};
|
|
11
|
+
delay: {
|
|
12
|
+
value: number;
|
|
13
|
+
desc: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
type ExtractValueType<T> = T extends {
|
|
17
|
+
value: infer V;
|
|
18
|
+
} ? V : never;
|
|
19
|
+
type ParamsValues<T extends Params> = {
|
|
20
|
+
[K in keyof T]: ExtractValueType<T[K]>;
|
|
21
|
+
};
|
|
22
|
+
export declare abstract class PlayerAnimation {
|
|
23
|
+
static params: {
|
|
24
|
+
multiple: {
|
|
25
|
+
value: number;
|
|
26
|
+
desc: string;
|
|
27
|
+
};
|
|
28
|
+
delay: {
|
|
29
|
+
value: number;
|
|
30
|
+
desc: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* 渲染某一帧的姿态
|
|
35
|
+
* @param player 播放器对象
|
|
36
|
+
* @param progress 动画进度,范围 [0, 1]。0代表起点,1代表终点(或循环回起点)
|
|
37
|
+
*/
|
|
38
|
+
protected abstract animate(player: PlayerObject, progress: number): void;
|
|
39
|
+
render(player: PlayerObject, progress: number): void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A class that helps you create an animation from a function.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* To create an animation that rotates the player:
|
|
46
|
+
* ```
|
|
47
|
+
* new FunctionAnimation((player, progress) => player.rotation.y = progress)
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare class FunctionAnimation extends PlayerAnimation {
|
|
51
|
+
static title: string;
|
|
52
|
+
static params: {
|
|
53
|
+
multiple: {
|
|
54
|
+
value: number;
|
|
55
|
+
desc: string;
|
|
56
|
+
};
|
|
57
|
+
delay: {
|
|
58
|
+
value: number;
|
|
59
|
+
desc: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
params: ParamsValues<{
|
|
63
|
+
multiple: {
|
|
64
|
+
value: number;
|
|
65
|
+
desc: string;
|
|
66
|
+
};
|
|
67
|
+
delay: {
|
|
68
|
+
value: number;
|
|
69
|
+
desc: string;
|
|
70
|
+
};
|
|
71
|
+
}>;
|
|
72
|
+
fn: (player: PlayerObject, progress: number) => void;
|
|
73
|
+
constructor(fn: (player: PlayerObject, progress: number) => void);
|
|
74
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
75
|
+
}
|
|
76
|
+
export declare class IdleAnimation extends PlayerAnimation {
|
|
77
|
+
static title: string;
|
|
78
|
+
static params: {
|
|
79
|
+
multiple: {
|
|
80
|
+
value: number;
|
|
81
|
+
desc: string;
|
|
82
|
+
};
|
|
83
|
+
delay: {
|
|
84
|
+
value: number;
|
|
85
|
+
desc: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
params: ParamsValues<{
|
|
89
|
+
multiple: {
|
|
90
|
+
value: number;
|
|
91
|
+
desc: string;
|
|
92
|
+
};
|
|
93
|
+
delay: {
|
|
94
|
+
value: number;
|
|
95
|
+
desc: string;
|
|
96
|
+
};
|
|
97
|
+
}>;
|
|
98
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
99
|
+
}
|
|
100
|
+
export declare class WalkingAnimation extends PlayerAnimation {
|
|
101
|
+
/**
|
|
102
|
+
* Whether to shake head when walking.
|
|
103
|
+
*
|
|
104
|
+
* @defaultValue `true`
|
|
105
|
+
*/
|
|
106
|
+
static title: string;
|
|
107
|
+
static params: {
|
|
108
|
+
headBobbing: {
|
|
109
|
+
value: boolean;
|
|
110
|
+
desc: string;
|
|
111
|
+
};
|
|
112
|
+
multiple: {
|
|
113
|
+
value: number;
|
|
114
|
+
desc: string;
|
|
115
|
+
};
|
|
116
|
+
delay: {
|
|
117
|
+
value: number;
|
|
118
|
+
desc: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
params: ParamsValues<{
|
|
122
|
+
headBobbing: {
|
|
123
|
+
value: boolean;
|
|
124
|
+
desc: string;
|
|
125
|
+
};
|
|
126
|
+
multiple: {
|
|
127
|
+
value: number;
|
|
128
|
+
desc: string;
|
|
129
|
+
};
|
|
130
|
+
delay: {
|
|
131
|
+
value: number;
|
|
132
|
+
desc: string;
|
|
133
|
+
};
|
|
134
|
+
}>;
|
|
135
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
136
|
+
}
|
|
137
|
+
export declare class RunningAnimation extends PlayerAnimation {
|
|
138
|
+
static title: string;
|
|
139
|
+
static params: {
|
|
140
|
+
multiply: {
|
|
141
|
+
value: number;
|
|
142
|
+
desc: string;
|
|
143
|
+
};
|
|
144
|
+
multiple: {
|
|
145
|
+
value: number;
|
|
146
|
+
desc: string;
|
|
147
|
+
};
|
|
148
|
+
delay: {
|
|
149
|
+
value: number;
|
|
150
|
+
desc: string;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
params: ParamsValues<{
|
|
154
|
+
multiply: {
|
|
155
|
+
value: number;
|
|
156
|
+
desc: string;
|
|
157
|
+
};
|
|
158
|
+
multiple: {
|
|
159
|
+
value: number;
|
|
160
|
+
desc: string;
|
|
161
|
+
};
|
|
162
|
+
delay: {
|
|
163
|
+
value: number;
|
|
164
|
+
desc: string;
|
|
165
|
+
};
|
|
166
|
+
}>;
|
|
167
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
168
|
+
}
|
|
169
|
+
export declare class FlyingAnimation extends PlayerAnimation {
|
|
170
|
+
static title: string;
|
|
171
|
+
static params: {
|
|
172
|
+
multiple: {
|
|
173
|
+
value: number;
|
|
174
|
+
desc: string;
|
|
175
|
+
};
|
|
176
|
+
delay: {
|
|
177
|
+
value: number;
|
|
178
|
+
desc: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
params: ParamsValues<{
|
|
182
|
+
multiple: {
|
|
183
|
+
value: number;
|
|
184
|
+
desc: string;
|
|
185
|
+
};
|
|
186
|
+
delay: {
|
|
187
|
+
value: number;
|
|
188
|
+
desc: string;
|
|
189
|
+
};
|
|
190
|
+
}>;
|
|
191
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
192
|
+
}
|
|
193
|
+
export declare class WaveAnimation extends PlayerAnimation {
|
|
194
|
+
static title: string;
|
|
195
|
+
static params: {
|
|
196
|
+
whichArm: {
|
|
197
|
+
value: "left" | "right" | "both";
|
|
198
|
+
desc: string;
|
|
199
|
+
choices: string[];
|
|
200
|
+
};
|
|
201
|
+
sameDirection: {
|
|
202
|
+
value: boolean;
|
|
203
|
+
desc: string;
|
|
204
|
+
};
|
|
205
|
+
multiple: {
|
|
206
|
+
value: number;
|
|
207
|
+
desc: string;
|
|
208
|
+
};
|
|
209
|
+
delay: {
|
|
210
|
+
value: number;
|
|
211
|
+
desc: string;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
params: ParamsValues<{
|
|
215
|
+
whichArm: {
|
|
216
|
+
value: "left" | "right" | "both";
|
|
217
|
+
desc: string;
|
|
218
|
+
choices: string[];
|
|
219
|
+
};
|
|
220
|
+
sameDirection: {
|
|
221
|
+
value: boolean;
|
|
222
|
+
desc: string;
|
|
223
|
+
};
|
|
224
|
+
multiple: {
|
|
225
|
+
value: number;
|
|
226
|
+
desc: string;
|
|
227
|
+
};
|
|
228
|
+
delay: {
|
|
229
|
+
value: number;
|
|
230
|
+
desc: string;
|
|
231
|
+
};
|
|
232
|
+
}>;
|
|
233
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
234
|
+
}
|
|
235
|
+
export declare class CrouchAnimation extends PlayerAnimation {
|
|
236
|
+
static title: string;
|
|
237
|
+
static params: {
|
|
238
|
+
showProgress: {
|
|
239
|
+
value: boolean;
|
|
240
|
+
desc: string;
|
|
241
|
+
};
|
|
242
|
+
isStatic: {
|
|
243
|
+
value: boolean;
|
|
244
|
+
desc: string;
|
|
245
|
+
};
|
|
246
|
+
isRunningHitAnimation: {
|
|
247
|
+
value: boolean;
|
|
248
|
+
desc: string;
|
|
249
|
+
};
|
|
250
|
+
hitCycles: {
|
|
251
|
+
value: number;
|
|
252
|
+
desc: string;
|
|
253
|
+
};
|
|
254
|
+
multiple: {
|
|
255
|
+
value: number;
|
|
256
|
+
desc: string;
|
|
257
|
+
};
|
|
258
|
+
delay: {
|
|
259
|
+
value: number;
|
|
260
|
+
desc: string;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
params: ParamsValues<{
|
|
264
|
+
showProgress: {
|
|
265
|
+
value: boolean;
|
|
266
|
+
desc: string;
|
|
267
|
+
};
|
|
268
|
+
isStatic: {
|
|
269
|
+
value: boolean;
|
|
270
|
+
desc: string;
|
|
271
|
+
};
|
|
272
|
+
isRunningHitAnimation: {
|
|
273
|
+
value: boolean;
|
|
274
|
+
desc: string;
|
|
275
|
+
};
|
|
276
|
+
hitCycles: {
|
|
277
|
+
value: number;
|
|
278
|
+
desc: string;
|
|
279
|
+
};
|
|
280
|
+
multiple: {
|
|
281
|
+
value: number;
|
|
282
|
+
desc: string;
|
|
283
|
+
};
|
|
284
|
+
delay: {
|
|
285
|
+
value: number;
|
|
286
|
+
desc: string;
|
|
287
|
+
};
|
|
288
|
+
}>;
|
|
289
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
290
|
+
}
|
|
291
|
+
export declare class HitAnimation extends PlayerAnimation {
|
|
292
|
+
static title: string;
|
|
293
|
+
static params: {
|
|
294
|
+
multiple: {
|
|
295
|
+
value: number;
|
|
296
|
+
desc: string;
|
|
297
|
+
};
|
|
298
|
+
delay: {
|
|
299
|
+
value: number;
|
|
300
|
+
desc: string;
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
params: ParamsValues<{
|
|
304
|
+
multiple: {
|
|
305
|
+
value: number;
|
|
306
|
+
desc: string;
|
|
307
|
+
};
|
|
308
|
+
delay: {
|
|
309
|
+
value: number;
|
|
310
|
+
desc: string;
|
|
311
|
+
};
|
|
312
|
+
}>;
|
|
313
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
314
|
+
}
|
|
315
|
+
export declare class SwimAnimation extends PlayerAnimation {
|
|
316
|
+
static title: string;
|
|
317
|
+
static params: {
|
|
318
|
+
multiple: {
|
|
319
|
+
value: number;
|
|
320
|
+
desc: string;
|
|
321
|
+
};
|
|
322
|
+
delay: {
|
|
323
|
+
value: number;
|
|
324
|
+
desc: string;
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
params: ParamsValues<{
|
|
328
|
+
multiple: {
|
|
329
|
+
value: number;
|
|
330
|
+
desc: string;
|
|
331
|
+
};
|
|
332
|
+
delay: {
|
|
333
|
+
value: number;
|
|
334
|
+
desc: string;
|
|
335
|
+
};
|
|
336
|
+
}>;
|
|
337
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
338
|
+
}
|
|
339
|
+
export declare class SpinUpAnimation extends PlayerAnimation {
|
|
340
|
+
static title: string;
|
|
341
|
+
static params: {
|
|
342
|
+
maxHeight: {
|
|
343
|
+
value: number;
|
|
344
|
+
desc: string;
|
|
345
|
+
};
|
|
346
|
+
rotationTurns: {
|
|
347
|
+
value: number;
|
|
348
|
+
desc: string;
|
|
349
|
+
};
|
|
350
|
+
/**分头行动 */
|
|
351
|
+
headOff: {
|
|
352
|
+
value: boolean;
|
|
353
|
+
desc: string;
|
|
354
|
+
};
|
|
355
|
+
multiple: {
|
|
356
|
+
value: number;
|
|
357
|
+
desc: string;
|
|
358
|
+
};
|
|
359
|
+
delay: {
|
|
360
|
+
value: number;
|
|
361
|
+
desc: string;
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
params: ParamsValues<{
|
|
365
|
+
maxHeight: {
|
|
366
|
+
value: number;
|
|
367
|
+
desc: string;
|
|
368
|
+
};
|
|
369
|
+
rotationTurns: {
|
|
370
|
+
value: number;
|
|
371
|
+
desc: string;
|
|
372
|
+
};
|
|
373
|
+
/**分头行动 */
|
|
374
|
+
headOff: {
|
|
375
|
+
value: boolean;
|
|
376
|
+
desc: string;
|
|
377
|
+
};
|
|
378
|
+
multiple: {
|
|
379
|
+
value: number;
|
|
380
|
+
desc: string;
|
|
381
|
+
};
|
|
382
|
+
delay: {
|
|
383
|
+
value: number;
|
|
384
|
+
desc: string;
|
|
385
|
+
};
|
|
386
|
+
}>;
|
|
387
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
388
|
+
}
|
|
389
|
+
export declare class RotateAnimation extends PlayerAnimation {
|
|
390
|
+
static title: string;
|
|
391
|
+
static params: {
|
|
392
|
+
multiple: {
|
|
393
|
+
value: number;
|
|
394
|
+
desc: string;
|
|
395
|
+
};
|
|
396
|
+
delay: {
|
|
397
|
+
value: number;
|
|
398
|
+
desc: string;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
params: ParamsValues<{
|
|
402
|
+
multiple: {
|
|
403
|
+
value: number;
|
|
404
|
+
desc: string;
|
|
405
|
+
};
|
|
406
|
+
delay: {
|
|
407
|
+
value: number;
|
|
408
|
+
desc: string;
|
|
409
|
+
};
|
|
410
|
+
}>;
|
|
411
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
412
|
+
}
|
|
413
|
+
export declare class NodAnimation extends PlayerAnimation {
|
|
414
|
+
static title: string;
|
|
415
|
+
static params: {
|
|
416
|
+
delay: {
|
|
417
|
+
value: number;
|
|
418
|
+
desc: string;
|
|
419
|
+
};
|
|
420
|
+
amp: {
|
|
421
|
+
value: number;
|
|
422
|
+
desc: string;
|
|
423
|
+
};
|
|
424
|
+
multiple: {
|
|
425
|
+
value: number;
|
|
426
|
+
desc: string;
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
params: ParamsValues<{
|
|
430
|
+
delay: {
|
|
431
|
+
value: number;
|
|
432
|
+
desc: string;
|
|
433
|
+
};
|
|
434
|
+
amp: {
|
|
435
|
+
value: number;
|
|
436
|
+
desc: string;
|
|
437
|
+
};
|
|
438
|
+
multiple: {
|
|
439
|
+
value: number;
|
|
440
|
+
desc: string;
|
|
441
|
+
};
|
|
442
|
+
}>;
|
|
443
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
444
|
+
}
|
|
445
|
+
export declare class FlailAnimation extends PlayerAnimation {
|
|
446
|
+
static title: string;
|
|
447
|
+
static params: {
|
|
448
|
+
multiple: {
|
|
449
|
+
value: number;
|
|
450
|
+
desc: string;
|
|
451
|
+
};
|
|
452
|
+
delay: {
|
|
453
|
+
value: number;
|
|
454
|
+
desc: string;
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
params: ParamsValues<{
|
|
458
|
+
multiple: {
|
|
459
|
+
value: number;
|
|
460
|
+
desc: string;
|
|
461
|
+
};
|
|
462
|
+
delay: {
|
|
463
|
+
value: number;
|
|
464
|
+
desc: string;
|
|
465
|
+
};
|
|
466
|
+
}>;
|
|
467
|
+
protected animate(player: PlayerObject, progress: number): void;
|
|
468
|
+
}
|
|
469
|
+
export {};
|