-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsettings.ts
144 lines (141 loc) · 3.61 KB
/
settings.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
import { createNodeCompoundProgram } from 'sigma/rendering/webgl/programs/common/node';
import NodePointProgram from 'sigma/rendering/webgl/programs/node.point';
import NodePointWithBorderProgram from '@yomguithereal/sigma-experiments-renderers/node/node.point.border';
import NodeHaloProgram from "./node.halo";
import getNodeProgramImage from "./node.image";
import { drawLabel, drawHover } from './node.label';
const startYear = 1939,
curYear = (new Date).getFullYear(),
totalYears = curYear - startYear + 1,
picturesLoadingDelay = 1500,
playComicsDelay = 1500,
creatorsRoles = {
writer: "#234fac",
artist: "#2b6718",
both: "#d4a129"
},
clusters = {
creators: {
"Silver Age": {
match: ["Stan Lee", "Steve Ditko", "Jack Kirby"],
color: "#DDDDDD"
},
"Bronze Age": {
match: ["Chris Claremont", "John Byrne", "Jim Starlin"],
color: "#ff993e"
},
"Modern Age": {
match: ["Jeph Loeb", "Kurt Busiek", "Peter David", "Mark Waid"],
color: "#bce25b"
},
"Millenium Age": {
match: ["Kelly Thompson", "Brian Michael Bendis", "Dan Slott"],
color: "#5fb1ff"
}
},
characters: {
"Avengers": {
match: ["Avengers"],
color: "#57b23d"
},
"X-Men": {
match: ["X-Men"],
color: "#d4a129"
},
"Spider-Man & Marvel Knights": {
match: ["Spider-Man (Peter Parker)"],
color: "#822e23"
},
"Ultimate Universe": {
match: ["Ultimates"],
color: "#b2ff9d"
},
"Fantastic Four & Cosmic heroes": {
match: ["Fantastic Four"],
color: "#234fac"
},
"Alpha Flight": {
match: ["Alpha Flight"],
hide: true,
color: "#8d32a7"
},
"Starjammers": {
match: ["Corsair"],
hide: true,
color: "#bce25b"
},
"Heroes for Hire": {
match: ["Fat Cobra"],
hide: true,
color: "#c45ecf"
},
"Diverse Heroes": {
match: ["Gorilla Man"],
hide: true,
color: "#bce25b"
},
"New Mutants & Young X-Men": {
match: ["Rockslide"],
hide: true,
color: "#ff993e"
},
"X-Statix": {
match: ["Dead Girl"],
hide: true,
color: "#5fb1ff"
}
}
},
extraPalette = [
"#bce25b",
"#0051c4",
"#d52f3f",
"#ded03f",
"#2cc143",
"#8b4a98",
"#5fb1ff",
"#ff993e",
"#904f13",
"#c45ecf"
],
smallScreen = Math.min(window.innerWidth, window.innerHeight) < 600,
NodeProgramImage = getNodeProgramImage(smallScreen ? 96 : 192),
sigmaSettings = {
maxCameraRatio: 75,
defaultEdgeColor: '#000',
labelRenderer: drawLabel,
labelFont: '"DejaVu Sans Mono", "DejaVuSansMono", monospace',
labelColor: {color: '#AAA'},
labelWeight: 'bold',
labelDensity: 0.5,
labelGridCellSize: 300,
hoverRenderer: drawHover,
zoomToSizeRatioFunction: ratio => Math.pow(ratio, 0.75),
nodeProgramClasses: {
circle: createNodeCompoundProgram([
NodeHaloProgram,
NodePointProgram
]),
image: createNodeCompoundProgram([
NodeHaloProgram,
NodePointWithBorderProgram,
NodeProgramImage
])
},
nodeHoverProgramClasses: {
circle: createNodeCompoundProgram([
NodePointProgram
]),
image: createNodeCompoundProgram([
NodePointWithBorderProgram,
NodeProgramImage
])
}
};
export {
startYear, curYear, totalYears,
picturesLoadingDelay, playComicsDelay,
creatorsRoles, clusters,
extraPalette,
sigmaSettings
};