// We want to preserve the rotation center of exported SVGs when they are later imported. // Unfortunately, the SVG itself does not have sufficient information to accomplish this. // Instead we must add a small amount of extra information to the end of exported SVGs // that can be read on import. // Adding this comment in scratch-paint is not a viable approach because the user can // open projects not made with TurboWarp and we want costumes exported from there to // have their center saved even if they haven't been edited. let _TextEncoder; let _TextDecoder; if (typeof TextEncoder === 'undefined') { _TextEncoder = require('text-encoding').TextEncoder; _TextDecoder = require('text-encoding').TextDecoder; } else { _TextEncoder = TextEncoder; _TextDecoder = TextDecoder; } // Using literal HTML comments tokens will cause this script to be very hard to inline in // a