-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdemoProps.js
149 lines (135 loc) · 2.51 KB
/
demoProps.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
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
145
146
147
148
149
const BODY_COLOR = '#e84393'
const COG_COLOR = '#32ff7e'
const LEG_COLOR = '#FF5722'
const PAPER_BG_COLOR = '#17212B'
const GROUND_COLOR = '#0e2845'
const POINT_SIZE = 30
const LINE_SIZE = 25
const container = {
color: PAPER_BG_COLOR,
opacity: 1.0,
xRange: 1000,
yRange: 1000
}
const jointsFemur = {
x: [-166, -235, -166, 166, 235, 166],
y: [161, 0, -161, -161, 0, 161],
color: LEG_COLOR,
opacity: 1.0,
size: POINT_SIZE,
type: 'points',
id: 'joint-femur'
}
const centerPoint = {
x: [0],
y: [-20],
color: COG_COLOR,
opacity: 1.0,
size: 1.5 * POINT_SIZE,
type: 'points',
id: 'center'
}
const headPoint = {
x: [0],
y: [-120],
color: BODY_COLOR,
opacity: 1.0,
size: 1.5 * POINT_SIZE,
type: 'points',
id: 'head'
}
const jointsTibia = {
x: [-269, -355, -269, 269, 335, 269],
y: [224, 0, -224, -224, 0, 224],
color: LEG_COLOR,
opacity: 1.0,
size: POINT_SIZE,
type: 'points',
id: 'joint-tibia'
}
const vertices = {
x: [-90, -145, -90, 90, 145, 90],
y: [115, -20, -115, -115, -20, 115],
color: BODY_COLOR,
opacity: 1.0,
size: POINT_SIZE,
type: 'points',
id: 'body-vertices'
}
const legs = {
x0: [-90, -145, -90, 90, 145, 90],
y0: [115, -20, -115, -115, -20, 115],
x1: [-269, -355, -269, 269, 335, 269],
y1: [224, 0, -224, -224, 0, 224],
color: LEG_COLOR,
opacity: 0.9,
size: LINE_SIZE,
type: 'lines',
id: 'six-legs'
}
const body = {
x: [-90, -145, -90, 90, 145, 90],
y: [115, -20, -115, -115, -20, 115],
fillColor: BODY_COLOR,
fillOpacity: 0.5,
borderColor: BODY_COLOR,
borderOpacity: 1.0,
borderSize: LINE_SIZE,
type: 'polygon',
id: 'body'
}
const hexagon = {
x: [-228, -230, -99, 229, 230, 99],
y: [107, -91, -236, -107, 91, 236],
fillColor: GROUND_COLOR,
fillOpacity: 1.0,
borderColor: GROUND_COLOR,
borderOpacity: 0,
borderSize: 0,
type: 'polygon',
id: 'blue-hexagon'
}
const ellipse1 = {
cx: 400,
cy: -150,
rx: 25,
ry: 45,
theta: 45,
fillColor: COG_COLOR,
fillOpacity: 0.5,
borderColor: COG_COLOR,
borderOpacity: 1,
borderSize: 5,
type: 'ellipse',
id: 'sampleEllipse'
}
const ellipse2 = {
cx: 360,
cy: -150,
rx: 25,
ry: 45,
theta: -45,
fillColor: COG_COLOR,
fillOpacity: 0.5,
borderColor: COG_COLOR,
borderOpacity: 1.0,
borderSize: 5,
type: 'ellipse',
id: 'sampleEllipse2'
}
const props = {
container,
data: [
hexagon,
jointsFemur,
jointsTibia,
headPoint,
ellipse1,
ellipse2,
legs,
body,
vertices,
centerPoint
]
}
export default props