UNPKG

1.38 kBJavaScriptView Raw
1/**
2 * Test glyphs/borders/colors rendering
3 */
4const setup = require('./')
5
6
7setup({
8 positions: [.5,.5, 1.5,.5, 2.5,.5, 3.5,.5, 4.5,.5, 5.5,.5, 6.5,.5, 7.5,.5, 8.5,.5, 9.5,.5,
9 .5,1.5, 1.5,1.5, 2.5,1.5,
10 .5,2.5, 1.5,2.5, 2.5,2.5,
11 .5,3.5, 1.5,3.5, 2.5,3.5, 3.5,3.5, 4.5,3.5, 5.5,3.5],
12 sizes: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100,
13 25, 30, 35,
14 40, 45, 50,
15 1, 5, 20, 50, 120, 150],
16 colors: [0,0,0,1, .1,0,0,1, .2,0,0,1, .3,0,0,1, .4,0,0,1, .5,0,0,1, .6,0,0,1, .7,0,0,1, .8,0,0,1, .9,0,0,1,
17 1,0,0,1, 0,1,0,1, 0,0,1,1,
18 0,0,0,.2, 0,0,0,.5, 0,0,0,.8,
19 0,0,1,1, 0,0,1,1, 0,0,1,1, 0,0,1,1, 0,0,1,1, 0,0,1,1],
20 glyphs: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
21 '•', '+', '#',
22 'E', '=', 'mc²',
23 '●', '●', '●', '●', '●', '●'],
24 borderWidths: [1,1,1,1,1,1,1,1,1,1,
25 2,2,2,
26 0,0,0,
27 .5, .5, .5, .5, .5, .5],
28 borderColors: [0,0,1,1, 0,0,1,.9, 0,0,1,.8, 0,0,1,.7, 0,0,1,.6, 0,0,1,.5, 0,0,1,.4, 0,0,1,.3, 0,0,1,.2, 0,0,1,.1,
29 0,1,0,1, 0,0,1,1, 1,0,0,1,
30 0,0,0,1, 0,0,0,1, 0,0,0,1,
31 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1],
32})
33