Skip to content

Commit

Permalink
fix round
Browse files Browse the repository at this point in the history
  • Loading branch information
sealldeveloper committed Feb 12, 2024
1 parent b9c8474 commit 96a5470
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/animateconversion.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h3>How to export to Spritesheet and JSON from Adobe Animate?</h3>
f=newframes[f]
if (f.prop == `${x},${y},0,0` && !modified_indexes.includes(fc)) {
modified_indexes.push(fc)
newframes[fc].prop = `${isHd?round(currentx/2):round(currenty)},${isHd?round(currentx/2):round(currenty)},0,0`
newframes[fc].prop = `${isHd?Math.round(currentx/2):Math.round(currenty)},${isHd?Math.round(currentx/2):Math.round(currenty)},0,0`
}
fc++
}
Expand Down
4 changes: 2 additions & 2 deletions tools/animateconversionheads.html
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ <h3>How to export to Spritesheet, JSON and Motion XML from Adobe Animate?</h3>
newframes[fc].prop = propval

} catch (e){
head_y = round(currenty+(final_buffer*(Math.ceil(count/rowcount)-1)))
head_x = round(currentx-(defaultwidth-frame0width)/2)
head_y = Math.round(currenty+(final_buffer*(Math.ceil(count/rowcount)-1)))
head_x = Math.round(currentx-(defaultwidth-frame0width)/2)
propval = `${isHd?head_x/2:head_x},${isHd?head_y/2:head_y},0,0`
newframes[fc].prop = propval
}
Expand Down

0 comments on commit 96a5470

Please sign in to comment.