set the rotation point of "pen vectors" costumes to the position of the sprite that creates them

pull/89/head
jmoenig 2019-12-05 23:28:57 +01:00
rodzic 6d3bc37230
commit 4e1350837d
3 zmienionych plików z 12 dodań i 4 usunięć

Wyświetl plik

@ -10,6 +10,9 @@
* **Translation Updates:**
* German
### 2019-12-05
* threads: set the rotation point of "pen vectors" costumes to the position of the sprite that creates them
### 2019-12-03
* objects, blocks, threads, gui: added "log pen vectors" session setting
* updated German translation

Wyświetl plik

@ -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-12-03"></script>
<script type="text/javascript" src="src/threads.js?version=2019-12-03"></script>
<script type="text/javascript" src="src/threads.js?version=2019-12-05"></script>
<script type="text/javascript" src="src/objects.js?version=2019-12-03"></script>
<script type="text/javascript" src="src/gui.js?version=2019-12-03"></script>
<script type="text/javascript" src="src/paint.js?version=2019-06-27"></script>

Wyświetl plik

@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color,
TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/
modules.threads = '2019-December-02';
modules.threads = '2019-December-05';
var ThreadManager;
var Process;
@ -5119,7 +5119,7 @@ Process.prototype.reportNewCostume = function (pixels, width, height, name) {
Process.prototype.reportPentrailsAsSVG = function () {
// interpolated
var stage, svg, acc;
var rcvr, stage, svg, acc, offset;
if (!this.context.accumulator) {
stage = this.homeContext.receiver.parentThatIsA(StageMorph);
@ -5141,11 +5141,16 @@ Process.prototype.reportPentrailsAsSVG = function () {
acc.img.src = 'data:image/svg+xml,' + svg.src;
acc.img.rot = svg.rotationShift;
} else if (this.context.accumulator.ready) {
offset = new Point(0, 0);
rcvr = this.blockReceiver();
if (rcvr instanceof SpriteMorph) {
offset = new Point(rcvr.xPosition(), -rcvr.yPosition());
}
this.returnValueToParentContext(
new SVG_Costume(
this.context.accumulator.img,
this.blockReceiver().newCostumeName(localize('Costume')),
this.context.accumulator.rot
this.context.accumulator.rot.translateBy(offset)
)
);
return;