mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -05:00
Fix bitmap support. In Scratch 3.0, we are defaulting to bitmapResolution = 2 for all costumes.
This commit is contained in:
parent
e1d9df3b1b
commit
af7ed61016
2 changed files with 4 additions and 4 deletions
|
@ -69,8 +69,8 @@ const loadCostumeFromAsset = function (costume, costumeAsset, runtime) {
|
|||
|
||||
if (!rotationCenter) {
|
||||
rotationCenter = renderer.getSkinRotationCenter(costume.skinId);
|
||||
costume.rotationCenterX = rotationCenter[0];
|
||||
costume.rotationCenterY = rotationCenter[1];
|
||||
costume.rotationCenterX = rotationCenter[0] * 2;
|
||||
costume.rotationCenterY = rotationCenter[1] * 2;
|
||||
}
|
||||
return costume;
|
||||
});
|
||||
|
|
|
@ -438,7 +438,7 @@ class RenderedTarget extends Target {
|
|||
typeof costume.rotationCenterX !== 'undefined' &&
|
||||
typeof costume.rotationCenterY !== 'undefined'
|
||||
) {
|
||||
const scale = costume.bitmapResolution || 1;
|
||||
const scale = costume.bitmapResolution || 2;
|
||||
drawableProperties.rotationCenter = [
|
||||
costume.rotationCenterX / scale,
|
||||
costume.rotationCenterY / scale
|
||||
|
@ -625,7 +625,7 @@ class RenderedTarget extends Target {
|
|||
if (this.renderer) {
|
||||
const renderedDirectionScale = this._getRenderedDirectionAndScale();
|
||||
const costume = this.getCostumes()[this.currentCostume];
|
||||
const bitmapResolution = costume.bitmapResolution || 1;
|
||||
const bitmapResolution = costume.bitmapResolution || 2;
|
||||
const props = {
|
||||
position: [this.x, this.y],
|
||||
direction: renderedDirectionScale.direction,
|
||||
|
|
Loading…
Reference in a new issue