kopia lustrzana https://github.com/backface/turtlestitch
limited sprites' direction and coordinates to finite numbers
rodzic
51998503a3
commit
385ca6f891
|
@ -3673,6 +3673,10 @@ Fixes:
|
|||
* new "Animation" library
|
||||
* new "Pixels" library for MediaComp
|
||||
|
||||
171004
|
||||
------
|
||||
* Objects: limited sprites' direction and coordinates to finite numbers
|
||||
|
||||
|
||||
v4.1 Features:
|
||||
* polymorphic sprite-local custom blocks
|
||||
|
@ -3721,3 +3725,4 @@ Fixes:
|
|||
* fixed “fill” block crash when applying the same color twice
|
||||
* fixed occasional empty drop-down menu items named “close”
|
||||
* fixed some typos
|
||||
* limited sprites' direction and coordinates to finite numbers
|
||||
|
|
10
objects.js
10
objects.js
|
@ -83,7 +83,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize,
|
|||
TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph, HandleMorph,
|
||||
AlignmentMorph*/
|
||||
|
||||
modules.objects = '2017-September-28';
|
||||
modules.objects = '2017-October-04';
|
||||
|
||||
var SpriteMorph;
|
||||
var StageMorph;
|
||||
|
@ -4447,7 +4447,7 @@ SpriteMorph.prototype.forward = function (steps) {
|
|||
SpriteMorph.prototype.setHeading = function (degrees, noShadow) {
|
||||
var x = this.xPosition(),
|
||||
y = this.yPosition(),
|
||||
dir = (+degrees || 0),
|
||||
dir = !isFinite(degrees) ? 0 : +degrees,
|
||||
turn = dir - this.heading;
|
||||
|
||||
// apply to myself
|
||||
|
@ -4556,8 +4556,10 @@ SpriteMorph.prototype.gotoXY = function (x, y, justMe, noShadow) {
|
|||
this.shadowAttribute('x position');
|
||||
this.shadowAttribute('y position');
|
||||
}
|
||||
newX = stage.center().x + (+x || 0) * stage.scale;
|
||||
newY = stage.center().y - (+y || 0) * stage.scale;
|
||||
x = !isFinite(+x) ? 0 : +x;
|
||||
y = !isFinite(+y) ? 0 : +y;
|
||||
newX = stage.center().x + x * stage.scale;
|
||||
newY = stage.center().y - y * stage.scale;
|
||||
if (this.costume) {
|
||||
dest = new Point(newX, newY).subtract(this.rotationOffset);
|
||||
} else {
|
||||
|
|
Ładowanie…
Reference in New Issue