mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Compare asset type runtime formats instead of AssetType objects because costume assets can get flattened (e.g. while uploading a sprite from file).
This commit is contained in:
parent
ebe06a97d9
commit
c1b697b575
1 changed files with 1 additions and 1 deletions
|
@ -211,7 +211,7 @@ const loadCostumeFromAsset = function (costume, runtime, optVersion) {
|
||||||
typeof costume.rotationCenterY === 'number' && !isNaN(costume.rotationCenterY)) {
|
typeof costume.rotationCenterY === 'number' && !isNaN(costume.rotationCenterY)) {
|
||||||
rotationCenter = [costume.rotationCenterX, costume.rotationCenterY];
|
rotationCenter = [costume.rotationCenterX, costume.rotationCenterY];
|
||||||
}
|
}
|
||||||
if (costume.asset.assetType === AssetType.ImageVector) {
|
if (costume.asset.assetType.runtimeFormat === AssetType.ImageVector.runtimeFormat) {
|
||||||
return loadVector_(costume, runtime, rotationCenter, optVersion);
|
return loadVector_(costume, runtime, rotationCenter, optVersion);
|
||||||
}
|
}
|
||||||
return loadBitmap_(costume, runtime, rotationCenter, optVersion);
|
return loadBitmap_(costume, runtime, rotationCenter, optVersion);
|
||||||
|
|
Loading…
Reference in a new issue