kopia lustrzana https://github.com/backface/turtlestitch
1 wiersz
20 KiB
XML
1 wiersz
20 KiB
XML
<blocks app="Snap! 5.0, http://snap.berkeley.edu" version="1"><block-definition s="id %'arg'" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block var="arg"/></block></script></block-definition><block-definition s="-- %'n'" type="reporter" category="variables"><header></header><code></code><translations></translations><inputs><input type="%anyUE" readonly="true"></input></inputs><script><block s="doRun"><block s="reifyScript"><script><block s="doChangeVar"><l></l><l>-1</l></block></script><list></list></block><list><block var="n"/></list></block><block s="doReport"><block s="evaluate"><block var="n"/><list></list></block></block></script></block-definition><block-definition s="animate setter %'setter' getter %'getter' delta %'delta' over %'duration' secs easing %'easing'" type="command" category="control"><header></header><code></code><translations>de:animiere Setter _ Getter _ Delta _ über _ Sek. beschleunigt _
ca:modifica setter _ i getter _ amb delta _ en _ segons de forma _
pt:anima com modificador _ e inspector _ de _ em _ s de forma _
</translations><inputs><input type="%cmdRing"></input><input type="%repRing"></input><input type="%n">50</input><input type="%n">1</input><input type="%repRing"></input></inputs><script><block s="doDeclareVariables"><list><l>end time</l><l>destination</l></list></block><block s="doSetVar"><l>end time</l><block s="reportSum"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block s="reportProduct"><block var="duration"/><l>1000</l></block></block></block><block s="doSetVar"><l>destination</l><block s="reportSum"><block s="evaluate"><block var="getter"/><list></list></block><block var="delta"/></block></block><block s="doUntil"><block s="reportGreaterThan"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="end time"/></block><script><block s="doRun"><block var="setter"/><list><block s="reportDifference"><block var="destination"/><block s="reportProduct"><block var="delta"/><block s="evaluate"><block var="easing"/><list><block s="reportQuotient"><block s="reportDifference"><block var="end time"/><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="reportProduct"><block var="duration"/><l>1000</l></block></block></list></block></block></block></list></block></script></block><block s="doRun"><block var="setter"/><list><block var="destination"/></list></block></script></block-definition><block-definition s="PI" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><l>3.141592653589793</l></block></script></block-definition><block-definition s="degrees %'radians'" type="reporter" category="operators"><header></header><code></code><translations>de:Grad _
ca:graus de _ radians
pt:_ radianos em graus
</translations><inputs><input type="%n">0.5</input></inputs><script><block s="doReport"><block s="reportQuotient"><block s="reportProduct"><block var="radians"/><l>180</l></block><custom-block s="PI"></custom-block></block></block></script></block-definition><block-definition s="error %'msg'" type="command" category="control"><header></header><code></code><translations>de:Fehler _
pt:assinala o erro _
</translations><inputs><input type="%s"></input></inputs><script><block s="doRun"><block s="reportJSFunction"><list><l>msg</l></list><l>throw new Error(msg)</l></block><list><block var="msg"/></list></block></script></block-definition><block-definition s="glide %'steps' in %'duration' secs easing %'easing'" type="command" category="motion"><header></header><code></code><translations>de:gleite _ in _ Sek. beschleunigt: _
ca:llisca _ en _ segons de forma _
fr:glisser _ en _ sec. accélérer _
pt:desliza _ em _ s de forma _
</translations><inputs><input type="%n">50</input><input type="%n">1</input><input type="%s" readonly="true">linear<options>linear
quadratic={
quadratic-in
quadratic-out
quadratic-in-out
}
cubic={
cubic-in
cubic-out
cubic-in-out
}
quart={
quart-in
quart-out
quart-in-out
}
sinusoidal={
sine-in
sine-out
sine-in-out
}
elastic</options></input></inputs><script><block s="doDeclareVariables"><list><l>destX</l><l>destY</l><l>end time</l><l>deltaX</l><l>deltaY</l><l>func</l></list></block><block s="forward"><block var="steps"/></block><block s="doSetVar"><l>destX</l><block s="xPosition"></block></block><block s="doSetVar"><l>destY</l><block s="yPosition"></block></block><block s="forward"><block s="reportProduct"><block var="steps"/><l>-1</l></block></block><block s="doSetVar"><l>end time</l><block s="reportSum"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block s="reportProduct"><block var="duration"/><l>1000</l></block></block></block><block s="doSetVar"><l>deltaX</l><block s="reportDifference"><block var="destX"/><block s="xPosition"></block></block></block><block s="doSetVar"><l>deltaY</l><block s="reportDifference"><block var="destY"/><block s="yPosition"></block></block></block><block s="doIfElse"><block s="reportIsA"><block var="easing"/><l><option>reporter</option></l></block><script><block s="doSetVar"><l>func</l><block var="easing"/></block></script><script><block s="doSetVar"><l>func</l><custom-block s="easing %txt"><block var="easing"/></custom-block></block></script></block><block s="doUntil"><block s="reportGreaterThan"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="end time"/></block><script><block s="setXPosition"><block s="reportDifference"><block var="destX"/><block s="reportProduct"><block var="deltaX"/><block s="evaluate"><block var="func"/><list><block s="reportQuotient"><block s="reportDifference"><block var="end time"/><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="reportProduct"><block var="duration"/><l>1000</l></block></block></list></block></block></block></block><block s="setYPosition"><block s="reportDifference"><block var="destY"/><block s="reportProduct"><block var="deltaY"/><block s="evaluate"><block var="func"/><list><block s="reportQuotient"><block s="reportDifference"><block var="end time"/><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="reportProduct"><block var="duration"/><l>1000</l></block></block></list></block></block></block></block></script></block><block s="gotoXY"><block var="destX"/><block var="destY"/></block></script></block-definition><block-definition s="animate %'attribute' by %'delta' in %'duration' secs easing %'easing'" type="command" category="motion"><header></header><code></code><translations>de:animiere _ um _ in _ Sek. beschleunigt: _
ca:modifica _ amb _ en _ segons de forma _
pt:anima _ de _ em _ s de forma _
</translations><inputs><input type="%s" readonly="true">x position<options>x position
y position
direction
size
ghost effect
color effect
saturation effect
brightness effect
fisheye effect
whirl effect
pixelate effect
mosaic effect
negative effect
tempo
volume
balance</options></input><input type="%n">50</input><input type="%n">1</input><input type="%s" readonly="true">linear<options>linear
quadratic={
quadratic-in
quadratic-out
quadratic-in-out
}
cubic={
cubic-in
cubic-out
cubic-in-out
}
quart={
quart-in
quart-out
quart-in-out
}
sinusoidal={
sine-in
sine-out
sine-in-out
}
elastic</options></input></inputs><script><block s="doDeclareVariables"><list><l>accessors</l><l>func</l></list></block><block s="doSetVar"><l>accessors</l><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>x position</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setXPosition"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="xPosition"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>y position</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setYPosition"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="yPosition"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>direction</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setHeading"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="direction"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>size</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setScale"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getScale"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>tempo</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="doSetTempo"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getTempo"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>volume</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setVolume"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getVolume"></block></autolambda><list></list></block></list></block><block s="reportIfElse"><block s="reportEquals"><block var="attribute"/><l>balance</l></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setPan"><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getPan"></block></autolambda><list></list></block></list></block><block s="reportNewList"><list><block s="reifyScript"><script><block s="setEffect"><block s="reportListItem"><l>1</l><block s="reportTextSplit"><block var="attribute"/><l> </l></block></block><l></l></block></script><list></list></block><block s="reifyReporter"><autolambda><block s="getEffect"><block s="reportListItem"><l>1</l><block s="reportTextSplit"><block var="attribute"/><l> </l></block></block></block></autolambda><list></list></block></list></block></block></block></block></block></block></block></block></block><block s="doIfElse"><block s="reportIsA"><block var="easing"/><l><option>reporter</option></l></block><script><block s="doSetVar"><l>func</l><block var="easing"/></block></script><script><block s="doSetVar"><l>func</l><custom-block s="easing %txt"><block var="easing"/></custom-block></block></script></block><custom-block s="animate setter %cmdRing getter %repRing delta %n over %n secs easing %repRing"><block s="reportListItem"><l>1</l><block var="accessors"/></block><block s="reportListItem"><l>2</l><block var="accessors"/></block><block var="delta"/><block var="duration"/><block var="func"/></custom-block></script></block-definition><block-definition s="easing %'choice'" type="reporter" category="operators"><header></header><code></code><translations>de:Beschleunigung _
ca:de forma _
pt:a forma _
</translations><inputs><input type="%txt" readonly="true">linear<options>linear
quadratic={
quadratic-in
quadratic-out
quadratic-in-out
}
cubic={
cubic-in
cubic-out
cubic-in-out
}
quart={
quart-in
quart-out
quart-in-out
}
sinusoidal={
sine-in
sine-out
sine-in-out
}
elastic</options></input></inputs><script><block s="doIf"><block s="reportEquals"><block var="choice"/><l>linear</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><custom-block s="id %n"><l></l></custom-block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quadratic-in</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><l></l></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quadratic-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><block s="reportDifference"><l>2</l><l></l></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quadratic-in-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportLessThan"><l></l><l>.5</l></block><block s="reportProduct"><l>2</l><block s="reportProduct"><l></l><l></l></block></block><block s="reportDifference"><block s="reportProduct"><block s="reportDifference"><l>4</l><block s="reportProduct"><l>2</l><l></l></block></block><l></l></block><l>1</l></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>cubic-in</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><block s="reportProduct"><l></l><l></l></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>cubic-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportSum"><block s="reportProduct"><block s="reportProduct"><custom-block s="-- %anyUE"><block var="t"/></custom-block><block var="t"/></block><block var="t"/></block><l>1</l></block></autolambda><list><l>t</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>cubic-in-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportLessThan"><l></l><l>.5</l></block><block s="reportProduct"><l>4</l><block s="reportProduct"><l></l><block s="reportProduct"><l></l><l></l></block></block></block><block s="reportSum"><block s="reportProduct"><block s="reportProduct"><block s="reportDifference"><l></l><l>1</l></block><block s="reportDifference"><block s="reportProduct"><l>2</l><l></l></block><l>2</l></block></block><block s="reportDifference"><block s="reportProduct"><l>2</l><l></l></block><l>2</l></block></block><l>1</l></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quart-in</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportProduct"><l></l><block s="reportProduct"><l></l><block s="reportProduct"><l></l><l></l></block></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quart-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportProduct"><custom-block s="-- %anyUE"><block var="t"/></custom-block><block s="reportProduct"><block var="t"/><block s="reportProduct"><block var="t"/><block var="t"/></block></block></block></block></autolambda><list><l>t</l></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>quart-in-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportLessThan"><l></l><l>.5</l></block><block s="reportProduct"><l>8</l><block s="reportProduct"><l></l><block s="reportProduct"><l></l><block s="reportProduct"><l></l><l></l></block></block></block></block><block s="evaluate"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportProduct"><l>8</l><block s="reportProduct"><custom-block s="-- %anyUE"><block var="t"/></custom-block><block s="reportProduct"><block var="t"/><block s="reportProduct"><block var="t"/><block var="t"/></block></block></block></block></block></autolambda><list><l>t</l></list></block><list><l></l></list></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>sine-in</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportMonadic"><l><option>sin</option></l><block s="reportSum"><l>90</l><block s="reportProduct"><l></l><l>90</l></block></block></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>sine-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportMonadic"><l><option>sin</option></l><block s="reportProduct"><l></l><l>90</l></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>sine-in-out</l></block><script><block s="doReport"><block s="reifyReporter"><autolambda><block s="reportDifference"><l>1</l><block s="reportMonadic"><l><option>cos</option></l><block s="reportProduct"><l></l><l>90</l></block></block></block></autolambda><list></list></block></block></script></block><block s="doIf"><block s="reportEquals"><block var="choice"/><l>elastic</l></block><script><block s="doReport"><block s="reifyScript"><script><block s="doDeclareVariables"><list><l>p</l></list></block><block s="doSetVar"><l>p</l><l>0.3</l></block><block s="doReport"><block s="reportSum"><block s="reportProduct"><block s="reportPower"><l>2</l><block s="reportProduct"><l>-10</l><l></l></block></block><block s="reportMonadic"><l><option>sin</option></l><custom-block s="degrees %n"><block s="reportProduct"><block s="reportDifference"><l></l><block s="reportQuotient"><block var="p"/><l>4</l></block></block><block s="reportQuotient"><block s="reportProduct"><l>2</l><custom-block s="PI"></custom-block></block><block var="p"/></block></block></custom-block></block></block><l>1</l></block></block></script><list></list></block></block></script></block><custom-block s="error %s"><block s="reportJoinWords"><list><l>unknown easing function "</l><block var="choice"/><l>"</l></list></block></custom-block></script></block-definition><block-definition s="for %'i' = %'start' to %'end' $nl in %'time' secs easing %'easing' %'action'" type="command" category="control"><header></header><code></code><translations>de:für _ = _ bis _ _ in _ Sek. beschleunigt: _ _
ca:per _ = _ fins _ _ en _ segons de forma _ _
pt:para _ de _ a _ _ em _ s de forma _ _
</translations><inputs><input type="%upvar"></input><input type="%n">0</input><input type="%n">100</input><input type="%n">1</input><input type="%txt" readonly="true">linear<options>linear
quadratic={
quadratic-in
quadratic-out
quadratic-in-out
}
cubic={
cubic-in
cubic-out
cubic-in-out
}
quart={
quart-in
quart-out
quart-in-out
}
sinusoidal={
sine-in
sine-out
sine-in-out
}
elastic</options></input><input type="%ca"></input></inputs><script><block s="doSetVar"><l>i</l><block var="start"/></block><custom-block s="animate setter %cmdRing getter %repRing delta %n over %n secs easing %repRing"><block s="reifyScript"><script><block s="doSetVar"><l>i</l><l></l></block><block s="doRun"><block var="action"/><list></list></block></script><list></list></block><block s="reifyReporter"><autolambda><block var="i"/></autolambda><list></list></block><block s="reportDifference"><block var="end"/><block var="start"/></block><block var="time"/><block s="reportIfElse"><block s="reportIsA"><block var="easing"/><l><option>reporter</option></l></block><block var="easing"/><custom-block s="easing %txt"><block var="easing"/></custom-block></block></custom-block></script></block-definition></blocks> |