/** A 32 px picture, red on the left and green on the right, pasted in for pixel checks (28l, 29e). */ export const PASTE_HALVES = `(async () => { const canvas = document.createElement('canvas'); canvas.width = 32; canvas.height = 32; const g = canvas.getContext('2d'); g.fillStyle = '#e63c3c'; g.fillRect(0, 0, 16, 32); g.fillStyle = '#3cc85a'; g.fillRect(16, 0, 16, 32); const blob = await new Promise((resolve) => canvas.toBlob(resolve, 'image/png')); const transfer = new DataTransfer(); transfer.items.add(new File([blob], 'halves.png', { type: 'image/png' })); window.dispatchEvent(new ClipboardEvent('paste', { clipboardData: transfer, bubbles: true })); })()`; export const HALVES_LEFT = '#e63c3c'; export const HALVES_RIGHT = '#3cc85a'; /** * The pasted picture's asset, once the paste has landed: the newest one named after the pasted * file. Size alone is not enough – in the full run a module before 47 leaves a 32 px "wedge" * behind, and taking the first 32 px texture picked that one (CI task 217). */ export const FIND_HALVES = "__gm.state.project.assets.filter((a) => a.type === 'texture' && a.name === 'halves' && a.width === 32 && a.height === 32).map((a) => ({ id: a.id, file: a.file })).at(-1) ?? null";