kopia lustrzana https://github.com/backface/turtlestitch
1 wiersz
11 KiB
XML
1 wiersz
11 KiB
XML
<blocks app="Snap! 5.0, http://snap.berkeley.edu" version="1"><block-definition s="multiline %'text'" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%code"></input></inputs><script><block s="doReport"><block var="text"/></block></script></block-definition><block-definition s="set pen to crayon %'which'" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%n"><options>grays={
0 black #000000=0
1 gray7 #121212=1
2 gray14 #242424=2
3 gray21 #363636=3
4 gray28 #484848=4
5 gray36 #5c5c5c=5
6 gray43 #6d6d6d=6
7 gray50 #7f7f7f=7
8 gray57 #919191=8
9 gray64 #a3a3a3=9
10 gray71 #b5b5b5=10
11 gray78 #c8c8c8=11
12 gray85 #dadada=12
13 gray92 #ececec=13
14 white #ffffff=14
}
pinks={
15 deep pink #ff1493=15
16 hot pink #ff69b4=16
17 bright pink #ff007f=17
18 raspberry #e30b5d=18
19 amaranth #e52b50=19
}
reds={
20 red #ff0000=20
21 burgundy #900020=21
22 cherry #990000=22
23 dark candy apple red #a40000=23
24 sanguine #c00000=24
25 maroon #800000=25
26 crimson #c90016=26
27 Lists #d94d11=27
28 candy apple red #ff0800=28
29 coquelicot #ff3800=29
}
browns={
30 saddle brown #8b4513=30
31 chocolate #7b3f00=31
32 kobicha #6b4423=32
33 sepia #704214=33
34 chestnut #954535=34
35 dark brown #654321=35
36 brown #964b00=36
37 golden brown #996515=37
38 copper #b87333=38
39 cinnamon #d2691e=39
}
oranges={
40 orange #ff7f00=40
41 Pantone orange #ff5800=41
42 pumpkin #ff7518=42
43 Variables #f3761d=43
44 Spanish orange #e86100=44
45 burnt orange #cc5500=45
46 sinopia #cb410b=46
47 ochre #cc7722=47
48 carrot #ed9121=48
49 tangerine #f28500=49
}
yellows={
50 yellow #ffff00=50
51 Control #e6a822=51
52 dark goldenrod #b8860b=52
53 goldenrod #daa520=53
54 saffron #f4c430=55
55 sandstorm #ecd540=55
56 mustard #ffdb58=56
57 gold #ffd700=57
58 egg yolk #fee33e=58
59 rubber duck #fbe108=59
}
greens={
60 lime #00ff00=60
61 apple green #8db600=61
62 Operators #62c213=62
63 forest green #228b22=63
64 green #008000=64
65 dark green #006400=65
66 dark pastel green #03c03c=66
67 emerald #50c878=67
68 mint #3eb489=68
69 Pen #00a178=69
}
cyans={
70 aqua (cyan) #00ffff=70
71 dark cyan #008b8b=71
72 cerulean #007ba7=72
73 iceberg #71a6d2=73
74 Sensing #0494dc=74
75 teal #008080=75
76 light sky blue #87cefa=76
77 deep sky blue #00bfff=77
78 dodger blue #1e90ff=78
79 azure #007fff=79
}
blues={
80 blue #0000ff=80
81 midnight blue #191970=81
82 dark powder blue #003399=82
83 cobalt #0047ab=83
84 denim #1560bd=84
85 navy blue #000080=85
86 steel blue #4682b4=86
87 Motion #4a6cd4=87
88 cornflower #6495ed=88
89 slate blue #6a5acd=89
}
violets={
90 violet #8f00ff=90
91 Looks #8f56e3=91
92 grape #6f2da8=92
93 indigo #4b0082=93
94 x11 purple #a020f0=94
95 magenta (fuchia) #ff00ff=95
96 dark orchid #9932cc=96
97 Sound #cf4ad9=97
98 purple #7f007f=98
99 dark magenta #8b008b=99
}</options></input></inputs><script><block s="doDeclareVariables"><list><l>colors</l><l>color</l></list></block><block s="doSetVar"><l>colors</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportTextSplit"><l></l><l>,</l></block></autolambda><list></list></block><block s="reportTextSplit"><custom-block s="multiline %code"><l>0,0,0
18,18,18
36,36,36
54,54,54
72,72,72
92,92,92
109,109,109
127,127,127
145,145,145
163,163,163
181,181,181
200,200,200
218,218,218
236,236,236
255,255,255
255,20,147
255,105,180
255,0,127
227,11,93
229,43,80
255,0,0
144,0,32
153,0,0
164,0,0
192,0,0
128,0,0
201,0,22
217,77,17
255,8,0
255,56,0
139,69,19
123,63,0
107,68,35
112,66,20
149,69,53
101,67,33
150,75,0
153,101,21
184,115,51
210,105,30
255,127,0
255,88,0
255,117,24
243,118,29
232,97,0
204,85,0
203,65,11
204,119,34
237,145,33
242,133,0
255,255,0
230,168,34
184,134,11
218,165,32
244,196,48
236,213,64
255,219,88
255,215,0
254,227,62
251,225,8
0,255,0
141,182,0
98,194,19
34,139,34
0,128,0
0,100,0
3,192,60
80,200,120
62,180,137
0,161,120
0,255,255
0,139,139
0,123,167
113,166,210
4,148,220
0,128,128
135,206,250
0,191,255
30,144,255
0,127,255
0,0,255
25,25,112
0,51,153
0,71,171
21,96,189
0,0,128
70,130,180
74,108,212
100,149,237
106,90,205
143,0,255
143,86,227
111,45,168
75,0,130
160,32,240
255,0,255
153,50,204
207,74,217
127,0,127
139,0,139</l></custom-block><l><option>line</option></l></block></block></block><block s="doSetVar"><l>color</l><block s="reportListItem"><block s="reportSum"><block s="reportModulus"><block var="which"/><l>100</l></block><l>1</l></block><block var="colors"/></block></block><custom-block s="set pen color to r: %n g: %n b: %n"><block s="reportListItem"><l>1</l><block var="color"/></block><block s="reportListItem"><l>2</l><block var="color"/></block><block s="reportListItem"><l>3</l><block var="color"/></block></custom-block></script></block-definition><block-definition s="nearest crayon to %'old color'" type="reporter" category="pen"><header></header><code></code><translations></translations><inputs><input type="%l"></input></inputs><script><block s="doDeclareVariables"><list><l>colors</l><l>min value</l><l>min index</l><l>index</l><l>distance</l><l>color</l></list></block><block s="doSetVar"><l>min value</l><l>1000</l></block><block s="doSetVar"><l>min index</l><l>-1</l></block><block s="doSetVar"><l>index</l><l>1</l></block><block s="doSetVar"><l>colors</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportTextSplit"><l></l><l>,</l></block></autolambda><list></list></block><block s="reportTextSplit"><custom-block s="multiline %code"><l>0,0,0
18,18,18
36,36,36
54,54,54
72,72,72
92,92,92
109,109,109
127,127,127
145,145,145
163,163,163
181,181,181
200,200,200
218,218,218
236,236,236
255,255,255
255,20,147
255,105,180
255,0,127
227,11,93
229,43,80
255,0,0
144,0,32
153,0,0
164,0,0
192,0,0
128,0,0
201,0,22
217,77,17
255,8,0
255,56,0
139,69,19
123,63,0
107,68,35
112,66,20
149,69,53
101,67,33
150,75,0
153,101,21
184,115,51
210,105,30
255,127,0
255,88,0
255,117,24
243,118,29
232,97,0
204,85,0
203,65,11
204,119,34
237,145,33
242,133,0
255,255,0
230,168,34
184,134,11
218,165,32
244,196,48
236,213,64
255,219,88
255,215,0
254,227,62
251,225,8
0,255,0
141,182,0
98,194,19
34,139,34
0,128,0
0,100,0
3,192,60
80,200,120
62,180,137
0,161,120
0,255,255
0,139,139
0,123,167
113,166,210
4,148,220
0,128,128
135,206,250
0,191,255
30,144,255
0,127,255
0,0,255
25,25,112
0,51,153
0,71,171
21,96,189
0,0,128
70,130,180
74,108,212
100,149,237
106,90,205
143,0,255
143,86,227
111,45,168
75,0,130
160,32,240
255,0,255
153,50,204
207,74,217
127,0,127
139,0,139</l></custom-block><l><option>line</option></l></block></block></block><block s="doWarp"><script><block s="doRepeat"><l>100</l><script><block s="doSetVar"><l>color</l><block s="reportListItem"><block var="index"/><block var="colors"/></block></block><block s="doIf"><block s="reportEquals"><block var="color"/><block var="old color"/></block><script><block s="doReport"><block s="reportDifference"><block var="index"/><l>1</l></block></block></script></block><block s="doSetVar"><l>distance</l><block s="reportSum"><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="reportListItem"><l>1</l><block var="color"/></block><block s="reportListItem"><l>1</l><block var="old color"/></block></block></block><block s="reportSum"><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="reportListItem"><l>2</l><block var="color"/></block><block s="reportListItem"><l>2</l><block var="old color"/></block></block></block><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="reportListItem"><l>3</l><block var="color"/></block><block s="reportListItem"><l>3</l><block var="old color"/></block></block></block></block></block></block><block s="doIf"><block s="reportLessThan"><block var="distance"/><block var="min value"/></block><script><block s="doSetVar"><l>min value</l><block var="distance"/></block><block s="doSetVar"><l>min index</l><block var="index"/></block></script></block><block s="doChangeVar"><l>index</l><l>1</l></block></script></block><block s="doReport"><block s="reportDifference"><block var="min index"/><l>1</l></block></block></script></block></script></block-definition><block-definition s="set pen color to r: %'r' g: %'g' b: %'b'" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%n">255</input><input type="%n">0</input><input type="%n">0</input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>r</l><l>g</l><l>b</l></list><l>this.setColor(new Color(r, g, b));</l></block><list><block var="r"/><block var="g"/><block var="b"/></list></block></script></block-definition><block-definition s="RGB color" type="reporter" category="pen"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l></l></list><l>return new List([this.color.r, this.color.g, this.color.b]);</l></block><list></list></block></block></script></block-definition><block-definition s="change crayon by %'diff'" type="command" category="pen"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><custom-block s="set pen to crayon %n"><block s="reportSum"><custom-block s="nearest crayon to %l"><custom-block s="RGB color"></custom-block></custom-block><block var="diff"/></block></custom-block></script></block-definition></blocks> |