-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathassets.js
More file actions
400 lines (352 loc) · 11.1 KB
/
Copy pathassets.js
File metadata and controls
400 lines (352 loc) · 11.1 KB
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
/*
* Copyright (c) 2020 Moddable Tech, Inc.
*
* This file is part of the Moddable SDK.
*
* This work is licensed under the
* Creative Commons Attribution 4.0 International License.
* To view a copy of this license, visit
* <http://creativecommons.org/licenses/by/4.0>
* or send a letter to Creative Commons, PO Box 1866,
* Mountain View, CA 94042, USA.
*
*/
const TRANSPARENT = "transparent";
const WHITE = "#ffffff";
const BLACK = "black";
const RED = "#bc2f1e";
const RED2 = "#e96757";
const YELLOW = "#f8d600";
const YELLOW2 = "#ffe456";
const GREEN = "#95d472";
const GREEN2 = "#8bd463";
const BLUE = "#426dc8";
const SETTINGS_GRAY = "#f1f2eb";
const LIGHTEST_GRAY = "#cacaca";
const GRAY = "#a6a8ab";
const MED_GRAY = "#616161";
const DARK_GRAY = "#979797";
const OpenSans12 = Style.template({ font:"open-sans-reg-12", color: BLACK });
const WhiteSkin = Skin.template({ fill: [WHITE, TRANSPARENT] });
const BlackSkin = Skin.template({ fill: [BLACK, TRANSPARENT] });
const RedSkin = Skin.template({ fill: [RED, TRANSPARENT] });
const YellowSkin = Skin.template({ fill: [YELLOW, TRANSPARENT] });
const GreenSkin = Skin.template({ fill: [GREEN2, TRANSPARENT] });
const BlueSkin = Skin.template({ fill: [BLUE, TRANSPARENT] });
const LightestGraySkin = Skin.template({ fill: [LIGHTEST_GRAY, TRANSPARENT] });
const SettingsGraySkin = Skin.template({ fill: [SETTINGS_GRAY, TRANSPARENT] });
const MediumGraySkin = Skin.template({ fill: [MED_GRAY, TRANSPARENT] });
const DarkGraySkin = Skin.template({ fill: [DARK_GRAY, TRANSPARENT] });
const ControlIconTexture = Texture.template({ path: "control-icon.png" });
const ControlIconSkin = Skin.template({
Texture: ControlIconTexture,
color: [WHITE, TRANSPARENT],
width: 80, height: 92,
});
const DemoIconTexture = Texture.template({ path: "demo-icon.png" });
const DemoIconSkin = Skin.template({
Texture: DemoIconTexture,
color: [WHITE, TRANSPARENT],
width: 90, height: 90,
});
const PresetsIconTexture = Texture.template({ path: "presets-icon.png" });
const PresetsIconSkin = Skin.template({
Texture: PresetsIconTexture,
color: [BLACK, TRANSPARENT],
width: 79, height: 96,
});
const SettingsIconTexture = Texture.template({ path: "settings-icon.png" });
const SettingsIconSkin = Skin.template({
Texture: SettingsIconTexture,
color: [DARK_GRAY, TRANSPARENT],
width: 72, height: 59,
});
const DemoHeaderIconTexture = Texture.template({ path: "demo-header-icon.png" });
const DemoHeaderIconSkin = Skin.template({
Texture: DemoHeaderIconTexture,
color: [WHITE, TRANSPARENT],
width: 64, height: 30,
});
const ControlHeaderIconTexture = Texture.template({ path: "control-header-icon.png" });
const ControlHeaderIconSkin = Skin.template({
Texture: ControlHeaderIconTexture,
color: [WHITE, TRANSPARENT],
width: 85, height: 25,
});
const PresetsHeaderIconTexture = Texture.template({ path: "preset-header-icon.png" });
const PresetsHeaderIconSkin = Skin.template({
Texture: PresetsHeaderIconTexture,
color: [WHITE, TRANSPARENT],
width: 40, height: 19,
});
const SettingsHeaderIconTexture = Texture.template({ path: "settings-header-icon.png" });
const SettingsHeaderIconSkin = Skin.template({
Texture: SettingsHeaderIconTexture,
color: [WHITE, TRANSPARENT],
width: 36, height: 29,
});
const BackButtonTexture = Texture.template({ path: "back-arrow.png" });
const BackButtonSkin = Skin.template({
Texture: BackButtonTexture,
color: [WHITE, TRANSPARENT],
width: 14, height: 24,
});
const PauseButtonTexture = Texture.template({ path: "pause.png" });
const PauseButtonSkin = Skin.template({
Texture: PauseButtonTexture,
color: [WHITE, TRANSPARENT],
width: 20, height: 32,
});
const PlayButtonTexture = Texture.template({ path: "play.png" });
const PlayButtonSkin = Skin.template({
Texture: PlayButtonTexture,
color: [WHITE, TRANSPARENT],
width: 32, height: 34,
});
const ControlHandTexture = Texture.template({ path: "control-hand.png" });
const ControlHandSkin = Skin.template({
Texture: ControlHandTexture,
color: [WHITE, TRANSPARENT],
width: 125, height: 163,
});
const ThumbTexture = Texture.template({ path: "thumb-hl.png" });
const ThumbSkin = Skin.template({
Texture: ThumbTexture,
color: [RED2, TRANSPARENT],
width: 38, height: 72,
});
const IndexTexture = Texture.template({ path: "index-hl.png" });
const IndexSkin = Skin.template({
Texture: IndexTexture,
color: [GREEN, TRANSPARENT],
width: 29, height: 75,
});
const FingersTexture = Texture.template({ path: "fingers-hl.png" });
const FingersSkin = Skin.template({
Texture: FingersTexture,
color: [YELLOW2, TRANSPARENT],
width: 68, height: 94,
});
const RoundedBackgroundTexture = Texture.template({ path: "setting-scrubber-center.png" });
const RoundedBackgroundSkin = Skin.template({
Texture: RoundedBackgroundTexture,
color: [RED2, YELLOW2, GREEN],
width: 20, height: 26, tiles: { top: 5, bottom: 5, left: 5, right: 5 }
});
const SettingsSliderTexture = Texture.template({ path: "scrubber.png" });
const SettingsSliderSkin = Skin.template({
Texture: RoundedBackgroundTexture,
color: MED_GRAY,
width: 20, height: 26, tiles: { top: 5, bottom: 5, left: 5, right: 5 }
});
const SlowTexture = Texture.template({ path: "slow.png" });
const SlowSkin = Skin.template({
Texture: SlowTexture,
color: [MED_GRAY, TRANSPARENT],
width: 30, height: 18
});
const FastTexture = Texture.template({ path: "fast.png" });
const FastSkin = Skin.template({
Texture: FastTexture,
color: [MED_GRAY, TRANSPARENT],
width: 28, height: 20
});
/* ================================================================= */
/* ========================= Hand gestures ========================= */
/* ================================================================= */
const GestureColors = ["#ffffff00", WHITE, BLACK, TRANSPARENT];
const PointThumbOutTexture = Texture.template({ path: "point-thumb-out.png" });
const PointThumbOutSkin = Skin.template({
Texture: PointThumbOutTexture,
color: GestureColors,
width: 70, height: 120,
});
const PointThumbInTexture = Texture.template({ path: "point-thumb-in.png" });
const PointThumbInSkin = Skin.template({
Texture: PointThumbInTexture,
color: GestureColors,
width: 56, height: 120,
});
const FistTexture = Texture.template({ path: "fist.png" });
const FistSkin = Skin.template({
Texture: FistTexture,
color: GestureColors,
width: 74, height: 120,
});
const ThumbUpTexture = Texture.template({ path: "thumb-up.png" });
const ThumbUpSkin = Skin.template({
Texture: ThumbUpTexture,
color: GestureColors,
width: 120, height: 104,
});
const OpenHandThumbOutTexture = Texture.template({ path: "open-hand-thumb-out.png" });
const OpenHandThumbOutSkin = Skin.template({
Texture: OpenHandThumbOutTexture,
color: GestureColors,
width: 70, height: 121,
});
const OpenHandThumbInTexture = Texture.template({ path: "open-hand-thumb-in.png" });
const OpenHandThumbInSkin = Skin.template({
Texture: OpenHandThumbInTexture,
color: GestureColors,
width: 60, height: 120,
});
const GraspTexture = Texture.template({ path: "grasp.png" });
const GraspSkin = Skin.template({
Texture: GraspTexture,
color: GestureColors,
width: 68, height: 120,
});
const PinchTexture = Texture.template({ path: "pinch.png" });
const PinchSkin = Skin.template({
Texture: PinchTexture,
color: GestureColors,
width: 48, height: 120,
});
const MedPointThumbOutTexture = Texture.template({ path: "point-thumb-out-med.png" });
const MedPointThumbOutSkin = Skin.template({
Texture: MedPointThumbOutTexture,
color: GestureColors,
width: 48, height: 80,
});
const MedPointThumbInTexture = Texture.template({ path: "point-thumb-in-med.png" });
const MedPointThumbInSkin = Skin.template({
Texture: MedPointThumbInTexture,
color: GestureColors,
width: 38, height: 80,
});
const MedFistTexture = Texture.template({ path: "fist-med.png" });
const MedFistSkin = Skin.template({
Texture: MedFistTexture,
color: GestureColors,
width: 40, height: 66,
});
const MedThumbUpTexture = Texture.template({ path: "thumb-up-med.png" });
const MedThumbUpSkin = Skin.template({
Texture: MedThumbUpTexture,
color: GestureColors,
width: 68, height: 58,
});
const MedOpenHandThumbOutTexture = Texture.template({ path: "open-hand-thumb-out-med.png" });
const MedOpenHandThumbOutSkin = Skin.template({
Texture: MedOpenHandThumbOutTexture,
color: GestureColors,
width: 48, height: 80,
});
const MedOpenHandThumbInTexture = Texture.template({ path: "open-hand-thumb-in-med.png" });
const MedOpenHandThumbInSkin = Skin.template({
Texture: MedOpenHandThumbInTexture,
color: GestureColors,
width: 40, height: 80,
});
const MedGraspTexture = Texture.template({ path: "grasp-med.png" });
const MedGraspSkin = Skin.template({
Texture: MedGraspTexture,
color: GestureColors,
width: 42, height: 74,
});
const MedPinchTexture = Texture.template({ path: "pinch-med.png" });
const MedPinchSkin = Skin.template({
Texture: MedPinchTexture,
color: GestureColors,
width: 32, height: 80,
});
const TapTexture = Texture.template({ path: "index-tap-strip.png" });
const TapSkin = Skin.template({
Texture: TapTexture,
color: GestureColors,
width: 47, height: 80,
variants: 47
});
const ThumbsUpTexture = Texture.template({ path: "thumbs-up-strip-02.png" });
const ThumbsUpSkin = Skin.template({
Texture: ThumbsUpTexture,
color: GestureColors,
width: 68, height: 57,
variants: 68,// variants: 57,
});
const DottedLineTexture = Texture.template({ path: "dotted-line.png" });
const DottedLineSkin = Skin.template({
Texture: DottedLineTexture,
color: [LIGHTEST_GRAY, TRANSPARENT],
width: 214, height: 3,
});
const SmallHandTexture = Texture.template({ path: "hand-sm.png" });
const SmallHandSkin = Skin.template({
Texture: SmallHandTexture,
color: [LIGHTEST_GRAY, TRANSPARENT],
width: 37, height: 47,
});
const SmallThumbTexture = Texture.template({ path: "thumb-sm.png" });
const SmallThumbSkin = Skin.template({
Texture: SmallThumbTexture,
color: [MED_GRAY, TRANSPARENT],
width: 11, height: 21,
});
const SmallIndexTexture = Texture.template({ path: "index-sm.png" });
const SmallIndexSkin = Skin.template({
Texture: SmallIndexTexture,
color: [MED_GRAY, TRANSPARENT],
width: 8, height: 22,
});
const SmallOtherTexture = Texture.template({ path: "other-fingers-sm.png" });
const SmallOtherSkin = Skin.template({
Texture: SmallOtherTexture,
color: [MED_GRAY, TRANSPARENT],
width: 20, height: 27,
});
export default {
OpenSans12,
WhiteSkin,
BlackSkin,
RedSkin,
YellowSkin,
GreenSkin,
BlueSkin,
LightestGraySkin,
SettingsGraySkin,
MediumGraySkin,
DarkGraySkin,
ControlIconSkin,
DemoIconSkin,
PresetsIconSkin,
SettingsIconSkin,
DemoHeaderIconSkin,
PresetsHeaderIconSkin,
SettingsHeaderIconSkin,
ControlHeaderIconSkin,
BackButtonSkin,
PauseButtonSkin,
PlayButtonSkin,
ControlHandSkin,
ThumbSkin,
IndexSkin,
FingersSkin,
RoundedBackgroundSkin,
SettingsSliderSkin,
SlowSkin,
FastSkin,
DottedLineSkin,
PointThumbOutSkin,
PointThumbInSkin,
FistSkin,
ThumbUpSkin,
OpenHandThumbOutSkin,
OpenHandThumbInSkin,
GraspSkin,
PinchSkin,
MedPointThumbOutSkin,
MedPointThumbInSkin,
MedFistSkin,
MedThumbUpSkin,
MedOpenHandThumbOutSkin,
MedOpenHandThumbInSkin,
MedGraspSkin,
MedPinchSkin,
TapSkin,
ThumbsUpSkin,
SmallHandSkin,
SmallThumbSkin,
SmallIndexSkin,
SmallOtherSkin,
}