mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
Default bitmapResolution to 1 if not provided in costume metadata (#485)
* Default bitmapResolution to 1 if not provided in costume metadata. Resolves GH-484
This commit is contained in:
parent
7042bdb45c
commit
a4578ba086
1 changed files with 4 additions and 3 deletions
|
@ -428,16 +428,17 @@ RenderedTarget.prototype.updateAllDrawableProperties = function () {
|
||||||
if (this.renderer) {
|
if (this.renderer) {
|
||||||
var renderedDirectionScale = this._getRenderedDirectionAndScale();
|
var renderedDirectionScale = this._getRenderedDirectionAndScale();
|
||||||
var costume = this.sprite.costumes[this.currentCostume];
|
var costume = this.sprite.costumes[this.currentCostume];
|
||||||
|
var bitmapResolution = costume.bitmapResolution || 1;
|
||||||
var props = {
|
var props = {
|
||||||
position: [this.x, this.y],
|
position: [this.x, this.y],
|
||||||
direction: renderedDirectionScale.direction,
|
direction: renderedDirectionScale.direction,
|
||||||
scale: renderedDirectionScale.scale,
|
scale: renderedDirectionScale.scale,
|
||||||
visible: this.visible,
|
visible: this.visible,
|
||||||
skin: costume.skin,
|
skin: costume.skin,
|
||||||
costumeResolution: costume.bitmapResolution,
|
costumeResolution: bitmapResolution,
|
||||||
rotationCenter: [
|
rotationCenter: [
|
||||||
costume.rotationCenterX / costume.bitmapResolution,
|
costume.rotationCenterX / bitmapResolution,
|
||||||
costume.rotationCenterY / costume.bitmapResolution
|
costume.rotationCenterY / bitmapResolution
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
for (var effectName in this.effects) {
|
for (var effectName in this.effects) {
|
||||||
|
|
Loading…
Reference in a new issue