kopia lustrzana https://github.com/backface/turtlestitch
1 wiersz
14 KiB
XML
1 wiersz
14 KiB
XML
<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="set pen to crayon %'which'" type="command" category="pen"><comment w="297.3333333333333" collapsed="false">Sets the pen color 
to one of 100 preselected colors, like a box of 100 crayons.
The colors have names that are meant to be evocative.
They are organized in families, more or less corresponding
to spectral (rainbow) colors; the input slot has a two-level menu
in which you can hover over a family name to see the colors
of that family, each including a crayon number and an RGB value. 
See Appendix A of the Snap! Reference Manual for more details.</comment><header></header><code></code><translations>ca:fixa el llapis de color _
</translations><inputs><input type="%s"><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 cinnamon #b87333=38
39 copper #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=54
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
}
purples={
90 violet #8000ff=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>color</l></list></block><custom-block s="✐ initialize variables"></custom-block><block s="doIfElse"><block s="reportIsA"><block var="which"/><l><option>text</option></l></block><script><block s="doSetVar"><l>color</l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportEquals"><block s="reportListItem"><l>4</l><l/></block><block var="which"/></block></autolambda><list></list></block><block var="✐ crayon colors"/></block></block><block s="doIfElse"><block s="reportNotEquals"><block var="color"/><l></l></block><script><block s="doSetVar"><l>✐ last crayon</l><block s="reportListItem"><l>5</l><block var="color"/></block></block></script><script><custom-block s="error %txt"><block s="reportJoinWords"><list><l>No such crayon: </l><block var="which"/></list></block></custom-block></script></block></script><script><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="✐ crayon colors"/></block></block><block s="doSetVar"><l>✐ last crayon</l><block s="reportModulus"><block var="which"/><l>100</l></block></block></script></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="set pen color to r: %'r' g: %'g' b: %'b'" type="command" category="pen" helper="true"><comment x="0" y="0" w="220.66666666666666" collapsed="false">Takes three inputs for red, green, and blue
values, each between 0 and 255. 0,0,0 is black; 255,255,255 is white. 255,255,0 is yellow, and so on.

The SET PEN block in this library lets you set individual red, green, or blue without changing the others, lets you provide a list of three RGB color components, and lets you provide a six-digit hexadecimal number, the form in which RGB color values are usually found online.

See Appendix A of the Snap! Reference Manual for details.</comment><header></header><code></code><translations>pt:altera a cor da tua caneta para vermelho _ , verde _ e azul _ (0 a 255)
</translations><inputs><input type="%n">255</input><input type="%n">0</input><input type="%n">0</input></inputs><script><block s="doApplyExtension"><l>clr_setpen(clr)</l><list><block s="reportApplyExtension"><l>clr_rgba(r, g, b, a)</l><list><block var="r"/><block var="g"/><block var="b"/><block s="reportApplyExtension"><l>clr_channel(clr, rgba)</l><list><block s="reportApplyExtension"><l>clr_pen</l><list></list></block><l>a</l></list></block></list></block></list></block></script></block-definition><block-definition s="✐ initialize variables" type="command" category="pen" helper="true"><comment x="0" y="0" w="180" collapsed="false">Creates a bunch of global variables.
For internal use by Color library.</comment><header></header><code></code><translations></translations><inputs></inputs><script><block s="doIf"><custom-block s="does var %s exist?"><l>✐ last crayon</l></custom-block><script><block s="doStopThis"><l><option>this block</option></l></block></script></block><custom-block s="create %s var %mult%txt"><l>global</l><list><l>✐ last crayon</l><l>✐ crayon colors</l></list></custom-block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="✐ crayon colors"/><l><option>list</option></l></block></block><script><block s="doSetVar"><l>✐ crayon colors</l><block s="reportTextSplit"><custom-block s="multiline %mlt"><l>0,0,0,black,0
18,18,18,gray7,1
36,36,36,gray14,2
54,54,54,gray21,3
72,72,72,gray28,4
92,92,92,gray36,5
109,109,109,gray43,6
127,127,127,gray50,7
145,145,145,gray57,8
163,163,163,gray64,9
181,181,181,gray71,10
200,200,200,gray78,11
218,218,218,gray85,12
236,236,236,gray92,13
255,255,255,white,14
255,20,147,deep pink,15
255,105,180,hot pink,16
255,0,127,bright pink,17
227,11,93,raspberry,18
229,43,80,amaranth,19
255,0,0,red,20
144,0,32,burgundy,21
153,0,0,cherry,22
164,0,0,dark candy apple red,23
192,0,0,sanguine,24
128,0,0,maroon,25
201,0,22,crimson,26
217,77,17,Lists,27
255,8,0,candy apple red,28
255,56,0,coquelicot,29
139,69,19,saddle brown,30
123,63,0,chocolate,31
107,68,35,kobicha,32
112,66,20,sepia,33
149,69,53,chestnut,34
101,67,33,dark brown,35
150,75,0,brown,36
153,101,21,golden brown,37
184,115,51,cinnamon,38
210,105,30,copper,39
255,127,0,orange,40
255,88,0,Pantone orange,41
255,117,24,pumpkin,42
243,118,29,Variables,43
232,97,0,Spanish orange,44
204,85,0,burnt orange,45
203,65,11,sinopia,46
204,119,34,ochre,47
237,145,33,carrot,48
242,133,0,tangerine,49
255,255,0,yellow,50
230,168,34,Control,51
184,134,11,dark goldenrod,52
218,165,32,goldenrod,53
244,196,48,saffron,54
236,213,64,sandstorm,55
255,219,88,mustard,56
255,215,0,gold,57
254,227,62,egg yolk,58
251,225,8,rubber duck,59
0,255,0,lime,60
141,182,0,apple green,61
98,194,19,Operators,62
34,139,34,forest green,63
0,128,0,green,64
0,100,0,dark green,65
3,192,60,dark pastel green,66
80,200,120,emerald,67
62,180,137,mint,68
0,161,120,Pen,69
0,255,255,aqua,70
0,139,139,dark cyan,71
0,123,167,cerulean,72
113,166,210,iceberg,73
4,148,220,Sensing,74
0,128,128,teal,75
135,206,250,light sky blue,76
0,191,255,deep sky blue,77
30,144,255,dodger blue,78
0,127,255,azure,79
0,0,255,blue,80
25,25,112,midnight blue,81
0,51,153,dark powder blue,82
0,71,171,cobalt,83
21,96,189,denim,84
0,0,128,navy blue,85
70,130,180,steel blue,86
74,108,212,Motion,87
100,149,237,cornflower,88
106,90,205,slate blue,89
128,0,255,violet,90
143,86,227,Looks,91
111,45,168,grape,92
75,0,130,indigo,93
160,32,240,x11 purple,94
255,0,255,magenta,95
153,50,204,dark orchid,96
207,74,217,Sound,97
127,0,127,purple,98
139,0,139,dark magenta,99
0,255,255,cyan,100
255,0,255,fuchia,101
18,18,18,grey7,102
36,36,36,grey14,103
54,54,54,grey21,104
72,72,72,grey28,105
92,92,92,grey36,106
109,109,109,grey43,107
127,127,127,grey50,108
145,145,145,grey57,109
163,163,163,grey64,110
181,181,181,grey71,111
200,200,200,grey78,112
218,218,218,grey85,113
236,236,236,grey92,114</l></custom-block><l><option>csv</option></l></block></block></script></block></script></block-definition><block-definition s="change crayon by %'amount'" type="command" category="pen"><header></header><code></code><translations>ca:canvia de llapis de color saltant _
</translations><inputs><input type="%n"></input></inputs><script><custom-block s="set pen to crayon %s"><block s="reportSum"><block var="✐ last crayon"/><block var="amount"/></block></custom-block></script></block-definition><block-definition s="error %'msg'" type="command" category="control" helper="true"><header></header><code></code><translations>pt:lança o erro _
</translations><inputs><input type="%txt"></input></inputs><script><block s="doApplyExtension"><l>err_error(msg)</l><list><block var="msg"/></list></block></script></block-definition><block-definition s="create %'_scope' var %'_names'" type="command" category="variables" helper="true"><comment x="0" y="0" w="146" collapsed="false">This block creates new variables on the selected scope: global (for all sprites), sprite (for this sprite only) or script (only for that blocks stack) with the names given (in 'names' list).

If there is already a variable with that name in that scope, it does nothing: no errors and no overwrites.</comment><header></header><code></code><translations>pt:cria as variáveis _ _
ca:crea les _ variables _
es:crear las _ variables _
de:erstellen _ var _
</translations><inputs><input type="%s" readonly="true">global<options>global
sprite
script</options></input><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>_item</l><block var="_names"/><script><block s="doApplyExtension"><l>var_declare(scope, name)</l><list><block var="_scope"/><block var="_item"/></list></block></script></block></script></block></script></block-definition><block-definition s="does var %'_name' exist?" type="predicate" category="variables" helper="true"><comment x="0" y="0" w="146" collapsed="false">This block reports "true" if there is a variable with this given name (input slot) in that context.

It can be a global, sprite or script variable.

Otherwise it reports "false".</comment><header></header><code></code><translations>pt:a variável _ existe
ca:existeix la variable _ ?
es:existe la variable _ ?
de:existiert var _ ?
</translations><inputs><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>err_try(cmd, catch, err)</l><list><block s="reifyScript"><script><block s="doApplyExtension"><l>err_ignore</l><list><block s="reportApplyExtension"><l>var_get(name)</l><list><block var="_name"/></list></block></list></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block><block s="reifyScript"><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><l></l></list></block><block s="doApplyExtension"><l>err_reset</l><list></list></block></script></block-definition><block-definition s="multiline %'text'" type="reporter" category="operators" helper="true"><header></header><code></code><translations>pt:o texto multilinha _
</translations><inputs><input type="%mlt"></input></inputs><script><block s="doReport"><block var="text"/></block></script></block-definition><block-definition s="pen crayon" type="reporter" category="pen"><header></header><code></code><translations>ca:llapis de color
</translations><inputs></inputs><script><custom-block s="✐ initialize variables"></custom-block><block s="doReport"><block var="✐ last crayon"/></block></script></block-definition></blocks> |