-
Notifications
You must be signed in to change notification settings - Fork 2
/
types.ts
54 lines (49 loc) 路 1.25 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { CheerioAPI } from 'cheerio';
import { Hash } from '../player';
import { ISkinContextOptions } from './';
/**
* Skin model type
*/
export enum Model {
UNKNOWN = 'unknown',
CLASSIC = 'classic',
SLIM = 'slim'
}
export type ModelUnion = `${Model}`;
/**
* Skin transformation type
*/
export enum Transformation {
GRAYSCALE = 'grayscale',
INVERT = 'invert',
ROTATE_HUE_180 = 'rotate-hue-180',
ROTATE_HEAD_LEFT = 'rotate-head-left',
ROTATE_HEAD_RIGHT = 'rotate-head-right',
HAT_PUMPKIN_MASK_1 = 'hat-pumpkin-mask-1',
HAT_PUMPKIN_MASK_2 = 'hat-pumpkin-mask-2',
HAT_PUMPKIN_MASK_3 = 'hat-pumpkin-mask-3',
HAT_PUMPKIN_MASK_4 = 'hat-pumpkin-mask-4',
HAT_PUMPKIN = 'hat-pumpkin',
HAT_PUMPKIN_CREEPER = 'hat-pumpkin-creeper',
HAT_SANTA = 'hat-santa'
}
export type TransformationUnion = `${Transformation}`;
export interface ITransformSkinOptions {
/**
* Skin id
*/
skin: Hash;
/**
* Skin transformation type
*/
transformation?: Transformation | TransformationUnion;
/**
* Skin model
*/
model?: Model | ModelUnion;
}
export interface IParseSkinOptions<E extends boolean = boolean> {
$?: CheerioAPI;
data?: ISkinContextOptions['data'];
isExtended?: E;
}