kopia lustrzana https://github.com/backface/turtlestitch
Optimization: Don’t redraw unrotateable sprites on TURN
rodzic
d5b3883ca1
commit
7934f4cd03
|
|
@ -2815,3 +2815,7 @@ end - bulk of 151215
|
||||||
151218
|
151218
|
||||||
------
|
------
|
||||||
* new Arabic translation, yay!! Thanks Tarek Galal!!!
|
* new Arabic translation, yay!! Thanks Tarek Galal!!!
|
||||||
|
|
||||||
|
151219
|
||||||
|
------
|
||||||
|
* Objects: Optimization: Don’t redraw unrotateable sprites on TURN
|
||||||
|
|
|
||||||
14
objects.js
14
objects.js
|
|
@ -125,7 +125,7 @@ PrototypeHatBlockMorph*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.objects = '2015-December-15';
|
modules.objects = '2015-December-19';
|
||||||
|
|
||||||
var SpriteMorph;
|
var SpriteMorph;
|
||||||
var StageMorph;
|
var StageMorph;
|
||||||
|
|
@ -3533,10 +3533,14 @@ SpriteMorph.prototype.setHeading = function (degrees) {
|
||||||
turn = dir - this.heading;
|
turn = dir - this.heading;
|
||||||
|
|
||||||
// apply to myself
|
// apply to myself
|
||||||
this.changed();
|
if (this.rotationStyle) { // optimization, only redraw if rotatable
|
||||||
SpriteMorph.uber.setHeading.call(this, dir);
|
this.changed();
|
||||||
this.silentGotoXY(x, y, true); // just me
|
SpriteMorph.uber.setHeading.call(this, dir);
|
||||||
this.positionTalkBubble();
|
this.silentGotoXY(x, y, true); // just me
|
||||||
|
this.positionTalkBubble();
|
||||||
|
} else {
|
||||||
|
this.heading = parseFloat(degrees) % 360;
|
||||||
|
}
|
||||||
|
|
||||||
// propagate to my parts
|
// propagate to my parts
|
||||||
this.parts.forEach(function (part) {
|
this.parts.forEach(function (part) {
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue