add library functions (thanks to Richards!)

wooify
Michael Aschauer 2017-10-15 06:47:32 +02:00
rodzic 95b9650bef
commit d91aa4a377
2 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1 @@
<blocks app="Snap! 4.0, http://snap.berkeley.edu" version="1"><block-definition s="thickLine %&apos;length&apos; %&apos;width&apos; %&apos;density&apos;" type="command" category="motion"><comment w="230.9999999999999" collapsed="false">This block is an alternative to changing the pen size to make thicker lines.&#xD;It works by zig-zagging along the line.&#xD;Length and width are reasonably obvious - density changes how close the zig-zags are.&#xD;Try setting width to 10 and density to 0.5 as a good start!&#xD;&#xD;Richard Millwood @richardmillwood October 2017</comment><header></header><code></code><inputs><input type="%s">30</input><input type="%s">10</input><input type="%s">0.5</input></inputs><script><block s="turnLeft"><l>90</l></block><block s="forward"><block s="reportProduct"><l>0.5</l><block var="width"/></block></block><block s="turn"><l>180</l></block><block s="doRepeat"><block s="reportProduct"><block var="length"/><block var="density"/></block><script><block s="forward"><block var="width"/></block><block s="turnLeft"><block s="reportDifference"><l>180</l><block s="reportMonadic"><l><option>atan</option></l><block s="reportQuotient"><block s="reportQuotient"><l>1</l><block var="density"/></block><block var="width"/></block></block></block></block><block s="forward"><block s="reportMonadic"><l><option>sqrt</option></l><block s="reportSum"><block s="reportProduct"><block var="width"/><block var="width"/></block><block s="reportProduct"><block s="reportQuotient"><l>1</l><block var="density"/></block><block s="reportQuotient"><l>1</l><block var="density"/></block></block></block></block></block><block s="turn"><block s="reportDifference"><l>180</l><block s="reportMonadic"><l><option>atan</option></l><block s="reportQuotient"><block s="reportQuotient"><l>1</l><block var="density"/></block><block var="width"/></block></block></block></block></script></block><block s="forward"><block s="reportProduct"><l>0.5</l><block var="width"/></block></block><block s="turnLeft"><l>90</l></block></script></block-definition></blocks>

Wyświetl plik

@ -7,6 +7,10 @@ IDE_Morph.prototype.originalInit = IDE_Morph.prototype.init;
IDE_Morph.prototype.init = function(isAutoFill) {
this.originalInit();
this.padding = 1;
this.droppedText(
this.getURL(this.resourceURL('stitchcode/embroidery-library.xml')),
'tools'
);
// this.isAnimating = false;
};