Merge pull request #401 from griffpatch/Effect-not-correctly-copied-to-clones

Effect not correctly copied to clones #337
This commit is contained in:
Andrew Sliwinski 2017-01-27 10:52:24 -05:00 committed by GitHub
commit eb3b7bfd40

View file

@ -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();
}