No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Drop, paste or upload a photo. The background is removed in the browser, and the subject becomes a die-cut holographic sticker that you can peel off the table. It starts with the CodeLab team cutout from Figma (Marketing Workspace 25–26, node 6409:14) as the demo.
npm install
npm run dev # http://localhost:5302
src/main.ts, useFile): images that already have transparency skip this step. If most of the border is one exact colour (a design export with a solid fill), keySolidBackground removes just that colour by flood-filling in from the edges, so nothing inside the subject is touched and no one in a group shot gets dropped. Otherwise @imgly/background-removal (the isnet_fp16 model, ONNX in WASM) runs locally. On first use it downloads the model from IMG.LY's CDN, and the library is lazy-loaded so the page opens fast. Its licence is AGPL, so check that before shipping this publicly.src/sticker.ts): the cutout is cropped and padded. On a ≤640px grid, an exact Euclidean distance transform grows the border, small specks are dropped and holes are filled.
src/shaders.ts): a single full-screen fragment shader in WebGL2. The sticker is flat like paper: no bevel and no thickness shadow. Only the peel gives it shape.
(L + πR)/2 back from it, and the radius grows with the pull (CURL), up to a cap (CURL_MAX). Each pixel is inverted to the sticker points that land on it: the flat face-down backing, the outside of the curl (backing) and the inside of the curl (printed face). The lifted flap casts a soft shadow from the coverage mips.
FLY_AT and the sticker comes off, then re-sticks. Release short of that and a critically damped spring lays it back down. It has no overshoot, so the fold can't flip sides.SHARD_MIX caps how far it takes over, kept well short of full prism foil.] while peeling to hold the peel after you let go, and [ to let it fall back.src/history.ts): every new sticker goes into this browser's IndexedDB. Each record holds the cut-out (so the background is never removed twice), its settings and a thumbnail. Changing settings updates the open one. The left column lists them newest first; click one to reopen it, × to remove it. On load, the latest one opens, or the demo if there are none.textureLod with a precomputed level (gLod). Implicit-derivative texture() calls inside the peel branches drew hairlines across the table.sq(x), not pow(x, 2.0): pow is undefined for negative bases.inBox also guards against this.