mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
Multiply by bitmap resolution
This commit is contained in:
parent
85689201ed
commit
10aa6979ed
1 changed files with 4 additions and 3 deletions
|
@ -337,11 +337,12 @@ const parseScratchObject = function (object, runtime, extensions, topLevel, zip)
|
||||||
if (object.hasOwnProperty('costumes')) {
|
if (object.hasOwnProperty('costumes')) {
|
||||||
for (let i = 0; i < object.costumes.length; i++) {
|
for (let i = 0; i < object.costumes.length; i++) {
|
||||||
const costumeSource = object.costumes[i];
|
const costumeSource = object.costumes[i];
|
||||||
|
const bitmapResolution = costumeSource.bitmapResolution || 1;
|
||||||
const costume = {
|
const costume = {
|
||||||
name: costumeSource.costumeName,
|
name: costumeSource.costumeName,
|
||||||
bitmapResolution: costumeSource.bitmapResolution || 1,
|
bitmapResolution: bitmapResolution,
|
||||||
rotationCenterX: topLevel ? 240 : costumeSource.rotationCenterX,
|
rotationCenterX: topLevel ? 240 * bitmapResolution : costumeSource.rotationCenterX,
|
||||||
rotationCenterY: topLevel ? 180 : costumeSource.rotationCenterY,
|
rotationCenterY: topLevel ? 180 * bitmapResolution : costumeSource.rotationCenterY,
|
||||||
// TODO we eventually want this next property to be called
|
// TODO we eventually want this next property to be called
|
||||||
// md5ext to reflect what it actually contains, however this
|
// md5ext to reflect what it actually contains, however this
|
||||||
// will be a very extensive change across many repositories
|
// will be a very extensive change across many repositories
|
||||||
|
|
Loading…
Reference in a new issue