kopia lustrzana https://github.com/backface/turtlestitch
preserve the sprite's rotation point when taking a video-snap on it
rodzic
2f9b080b23
commit
f7639df2b8
|
@ -6,10 +6,12 @@
|
|||
* **Notable Fixes:**
|
||||
* allowed reserved JS object property names as variable names in Snap (e.g. "constructor")
|
||||
* disabled direct editing of list watchers for non-literal typed lists (such as costumes) in speech bubbles and prompters
|
||||
* now preserving the sprite's rotation point when taking a video-snap on it
|
||||
* **Translation Updates:**
|
||||
|
||||
### 2019-11-14
|
||||
* disabled direct editing of list watchers for non-literal typed lists (such as costumes) in speech bubbles and prompters
|
||||
* lists: disabled direct editing of list watchers for non-literal typed lists (such as costumes) in speech bubbles and prompters
|
||||
* objects: preserve the sprite's rotation point when taking a video-snap on it
|
||||
|
||||
### 2019-11-13
|
||||
* new dev version
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<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-13"></script>
|
||||
<script type="text/javascript" src="src/objects.js?version=2019-11-12"></script>
|
||||
<script type="text/javascript" src="src/objects.js?version=2019-11-14"></script>
|
||||
<script type="text/javascript" src="src/gui.js?version=2019-11-13"></script>
|
||||
<script type="text/javascript" src="src/paint.js?version=2019-06-27"></script>
|
||||
<script type="text/javascript" src="src/lists.js?version=2019-11-14"></script>
|
||||
|
|
|
@ -84,7 +84,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, BooleanSlotMorph,
|
|||
localize, TableMorph, TableFrameMorph, normalizeCanvas, VectorPaintEditorMorph,
|
||||
HandleMorph, AlignmentMorph, Process, XML_Element, WorldMap, copyCanvas*/
|
||||
|
||||
modules.objects = '2019-November-12';
|
||||
modules.objects = '2019-November-14';
|
||||
|
||||
var SpriteMorph;
|
||||
var StageMorph;
|
||||
|
@ -2055,17 +2055,18 @@ SpriteMorph.prototype.getImageData = function () {
|
|||
return this.imageData.pixels;
|
||||
};
|
||||
|
||||
SpriteMorph.prototype.projectionSnap = function() {
|
||||
SpriteMorph.prototype.projectionSnap = function() { // +++
|
||||
var stage = this.parentThatIsA(StageMorph),
|
||||
center = this.center().subtract(stage.position())
|
||||
.divideBy(stage.scale),
|
||||
cst = this.costume || this.image,
|
||||
w, h,
|
||||
w, h, rot,
|
||||
offset,
|
||||
snap,
|
||||
ctx;
|
||||
|
||||
if (cst instanceof Costume) {
|
||||
rot = cst.rotationCenter.copy();
|
||||
cst = cst.contents;
|
||||
w = cst.width;
|
||||
h = cst.height;
|
||||
|
@ -2082,7 +2083,7 @@ SpriteMorph.prototype.projectionSnap = function() {
|
|||
ctx.drawImage(cst, 0, 0);
|
||||
ctx.globalCompositeOperation = 'source-in';
|
||||
ctx.drawImage(stage.projectionLayer(), -offset.x, -offset.y);
|
||||
return new Costume(snap, this.newCostumeName(localize('snap')));
|
||||
return new Costume(snap, this.newCostumeName(localize('snap')), rot);
|
||||
};
|
||||
|
||||
// SpriteMorph block instantiation
|
||||
|
|
Ładowanie…
Reference in New Issue