Skip to content

Commit 53437b8

Browse files
committed
Remove calls to updateDrawableSkinIdRotationCenter
1 parent 8faad67 commit 53437b8

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

src/sprites/rendered-target.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -458,19 +458,7 @@ class RenderedTarget extends Target {
458458
);
459459
if (this.renderer) {
460460
const costume = this.getCostumes()[this.currentCostume];
461-
if (
462-
typeof costume.rotationCenterX !== 'undefined' &&
463-
typeof costume.rotationCenterY !== 'undefined'
464-
) {
465-
const scale = costume.bitmapResolution || 2;
466-
const rotationCenter = [
467-
costume.rotationCenterX / scale,
468-
costume.rotationCenterY / scale
469-
];
470-
this.renderer.updateDrawableSkinIdRotationCenter(this.drawableID, costume.skinId, rotationCenter);
471-
} else {
472-
this.renderer.updateDrawableSkinId(this.drawableID, costume.skinId);
473-
}
461+
this.renderer.updateDrawableSkinId(this.drawableID, costume.skinId);
474462

475463
if (this.visible) {
476464
this.emit(RenderedTarget.EVENT_TARGET_VISUAL_CHANGE, this);
@@ -709,11 +697,7 @@ class RenderedTarget extends Target {
709697
this.renderer.updateDrawableVisible(this.drawableID, this.visible);
710698

711699
const costume = this.getCostumes()[this.currentCostume];
712-
const bitmapResolution = costume.bitmapResolution || 2;
713-
this.renderer.updateDrawableSkinIdRotationCenter(this.drawableID, costume.skinId, [
714-
costume.rotationCenterX / bitmapResolution,
715-
costume.rotationCenterY / bitmapResolution
716-
]);
700+
this.renderer.updateDrawableSkinId(this.drawableID, costume.skinId);
717701

718702
for (const effectName in this.effects) {
719703
if (!this.effects.hasOwnProperty(effectName)) continue;

test/fixtures/fake-renderer.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ FakeRenderer.prototype.getFencedPositionOfDrawable = function (d, p) { // eslint
1717
FakeRenderer.prototype.updateDrawableSkinId = function (d, skinId) { // eslint-disable-line no-unused-vars
1818
};
1919

20-
FakeRenderer.prototype.updateDrawableSkinIdRotationCenter =
21-
function (d, skinId, rotationCenter) {}; // eslint-disable-line no-unused-vars
22-
2320
FakeRenderer.prototype.updateDrawablePosition = function (d, position) { // eslint-disable-line no-unused-vars
2421
this.x = position[0];
2522
this.y = position[1];

0 commit comments

Comments
 (0)