kopia lustrzana https://github.com/backface/turtlestitch
rodzic
c27fb90305
commit
e66046e71e
|
@ -3,6 +3,7 @@
|
|||
## in development:
|
||||
* **New Features:**
|
||||
* export pen trails as SVG
|
||||
* access pen trails as SVG_Costume: new "pen trails (SVG)" reporter (experimental, hidden in dev)
|
||||
* **Notable Changes:**
|
||||
* **Notable Fixes:**
|
||||
* **Translation Updates:**
|
||||
|
@ -10,6 +11,7 @@
|
|||
### 2019-12-02
|
||||
* new dev version
|
||||
* objects: export pen trails as SVG (under construction)
|
||||
* threads: new "pen trails (SVG)" reporter (experimental, hidden in dev)
|
||||
|
||||
## v5.3.8:
|
||||
* **Notable Change:**
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<script type="text/javascript" src="src/morphic.js?version=2019-11-12"></script>
|
||||
<script type="text/javascript" src="src/widgets.js?version=2019-10-16"></script>
|
||||
<script type="text/javascript" src="src/blocks.js?version=2019-11-12"></script>
|
||||
<script type="text/javascript" src="src/threads.js?version=2019-11-29"></script>
|
||||
<script type="text/javascript" src="src/threads.js?version=2019-12-02"></script>
|
||||
<script type="text/javascript" src="src/objects.js?version=2019-12-02"></script>
|
||||
<script type="text/javascript" src="src/gui.js?version=2019-12-02"></script>
|
||||
<script type="text/javascript" src="src/paint.js?version=2019-06-27"></script>
|
||||
|
|
|
@ -53,15 +53,15 @@
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
/*global ArgMorph, BlockMorph, CommandBlockMorph, CommandSlotMorph, Morph,
|
||||
/*global ArgMorph, BlockMorph, CommandBlockMorph, CommandSlotMorph, Morph, Map,
|
||||
MultiArgMorph, Point, ReporterBlockMorph, SyntaxElementMorph, contains, Costume,
|
||||
degrees, detect, nop, radians, ReporterSlotMorph, CSlotMorph, RingMorph, Sound,
|
||||
IDE_Morph, ArgLabelMorph, localize, XML_Element, hex_sha512, TableDialogMorph,
|
||||
StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
|
||||
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
|
||||
TableFrameMorph, ColorSlotMorph, isSnapObject, Map, newCanvas, Symbol*/
|
||||
TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/
|
||||
|
||||
modules.threads = '2019-November-29';
|
||||
modules.threads = '2019-December-02';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -5112,6 +5112,34 @@ Process.prototype.reportNewCostume = function (pixels, width, height, name) {
|
|||
);
|
||||
};
|
||||
|
||||
Process.prototype.reportPentrailsAsSVG = function () { // +++
|
||||
// interpolated
|
||||
var stage, svg, acc;
|
||||
|
||||
if (!this.context.accumulator) {
|
||||
stage = this.homeContext.receiver.parentThatIsA(StageMorph);
|
||||
svg = stage.trailsLogAsSVG();
|
||||
this.context.accumulator = {
|
||||
img : new Image(),
|
||||
ready : false
|
||||
};
|
||||
acc = this.context.accumulator;
|
||||
acc.img.onload = function () {
|
||||
acc.ready = true;
|
||||
};
|
||||
acc.img.src = 'data:image/svg+xml,' + svg;
|
||||
} else if (this.context.accumulator.ready) {
|
||||
this.returnValueToParentContext(
|
||||
new SVG_Costume(
|
||||
this.context.accumulator.img,
|
||||
this.blockReceiver().newCostumeName(localize('Costume'))
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.pushContext();
|
||||
};
|
||||
|
||||
// Process constant input options
|
||||
|
||||
Process.prototype.inputOption = function (dta) {
|
||||
|
|
Ładowanie…
Reference in New Issue