From cf43efe3ee6cb0ba7377c61607f8977cc0d93022 Mon Sep 17 00:00:00 2001 From: griffpatch Date: Fri, 27 Jan 2017 11:14:53 +0000 Subject: [PATCH] Effect not correctly copied to clones #337 Fixes Effect not correctly copied to clones #337 --- src/sprites/rendered-target.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index 36affd7b1..9eb8956b2 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -437,7 +437,7 @@ RenderedTarget.prototype.updateAllDrawableProperties = function () { if (this.renderer) { var renderedDirectionScale = this._getRenderedDirectionAndScale(); var costume = this.sprite.costumes[this.currentCostume]; - this.renderer.updateDrawableProperties(this.drawableID, { + var props = { position: [this.x, this.y], direction: renderedDirectionScale.direction, scale: renderedDirectionScale.scale, @@ -448,7 +448,11 @@ RenderedTarget.prototype.updateAllDrawableProperties = function () { costume.rotationCenterX / costume.bitmapResolution, costume.rotationCenterY / costume.bitmapResolution ] - }); + }; + for (var effectID in this.effects) { + props[effectID] = this.effects[effectID]; + } + this.renderer.updateDrawableProperties(this.drawableID, props); if (this.visible) { this.runtime.requestRedraw(); }