forked from rlottie/rlottie.github.io
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlayernode.js
39 lines (39 loc) · 784 Bytes
/
layernode.js
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
class LayerNode {
constructor(keypath, name, type, id, commonId) {
this.id = id;
this.commonId = commonId;
this.keypath = keypath;
this.name = name;
this.type = type;
this.visible = true;
this.selected = false;
this.opacity = 100;
this.beforeOpacity = 100;
this.strokeWidth = Number();
this.color = {
alpha: Number(),
hex: String(),
hexa: String(),
hsla: {
h: Number(),
s: Number(),
l: Number(),
a: Number(),
},
hsva: {
h: Number(),
s: Number(),
v: Number(),
a: Number(),
},
hue: Number(),
rgba: {
r: Number(),
g: Number(),
b: Number(),
a: Number()
}
}
this.child = []
}
}