mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-28 22:30:40 -04:00
Handle rotationCenter values that might be 0.
This commit is contained in:
parent
70a78cf7db
commit
172409c1e3
1 changed files with 7 additions and 3 deletions
|
@ -355,9 +355,13 @@ const serializeCostume = function (costume) {
|
|||
// pervasive
|
||||
obj.md5ext = (costume.broken && costume.broken.md5) || costume.md5;
|
||||
obj.dataFormat = costume.dataFormat.toLowerCase();
|
||||
// TODO: WATCH OUT FOR ZEROs HERE
|
||||
obj.rotationCenterX = (costume.broken && costume.broken.rotationCenterX) || costume.rotationCenterX;
|
||||
obj.rotationCenterY = (costume.broken && costume.broken.rotationCenterY) || costume.rotationCenterY;
|
||||
if (costume.broken) {
|
||||
obj.rotationCenterX = costume.broken.rotationCenterX;
|
||||
obj.rotationCenterY = costume.broken.rotationCenterY;
|
||||
} else {
|
||||
obj.rotationCenterX = costume.rotationCenterX;
|
||||
obj.rotationCenterY = costume.rotationCenterY;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue