lostpage 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +390 -2
- package/dist/catalog.d.ts +2 -0
- package/dist/catalog.js +1 -0
- package/dist/catalog.json +11438 -0
- package/dist/cdn/c/ascii-3d-LO5K5SPJ.js +3 -0
- package/dist/cdn/c/astronaut-LH5N45GT.js +2 -0
- package/dist/cdn/c/aurora-XF7DCQ7M.js +129 -0
- package/dist/cdn/c/autumn-V5GRVYCX.js +1 -0
- package/dist/cdn/c/balloon-404-KV6ISJWV.js +1 -0
- package/dist/cdn/c/beach-OGS53KAQ.js +95 -0
- package/dist/cdn/c/black-hole-635WWF67.js +124 -0
- package/dist/cdn/c/block-drop-QU7NYBNQ.js +1 -0
- package/dist/cdn/c/blue-screen-GKLGT7XD.js +70 -0
- package/dist/cdn/c/breakout-EGDE3QDC.js +1 -0
- package/dist/cdn/c/bricks-C6XPPQ64.js +1 -0
- package/dist/cdn/c/broken-link-U47D6LR2.js +11 -0
- package/dist/cdn/c/brutalist-QFXIHFAD.js +15 -0
- package/dist/cdn/c/bubble-wrap-45ZWIQMW.js +1 -0
- package/dist/cdn/c/campfire-TFG4DUUS.js +88 -0
- package/dist/cdn/c/card-GH5VVMRG.js +15 -0
- package/dist/cdn/c/cassette-33OUQ4CF.js +15 -0
- package/dist/cdn/c/chalkboard-NAPUHNER.js +3 -0
- package/dist/cdn/c/chrome-404-QVPFIQEF.js +1 -0
- package/dist/cdn/c/chunk-4ZBXB36L.js +1 -0
- package/dist/cdn/c/chunk-A44JMJWI.js +1 -0
- package/dist/cdn/c/chunk-HXSSPN2I.js +1 -0
- package/dist/cdn/c/chunk-IETNWEVK.js +1 -0
- package/dist/cdn/c/chunk-JLRXT2AZ.js +4 -0
- package/dist/cdn/c/chunk-LMRCHEWX.js +1 -0
- package/dist/cdn/c/chunk-NUQBEDA4.js +296 -0
- package/dist/cdn/c/chunk-QHXVYCR6.js +1 -0
- package/dist/cdn/c/chunk-QJZBGT2Q.js +75 -0
- package/dist/cdn/c/chunk-URWX3LLV.js +1 -0
- package/dist/cdn/c/chunk-YNREKTFR.js +70 -0
- package/dist/cdn/c/circuit-board-V6VT4OTX.js +1 -0
- package/dist/cdn/c/claw-machine-LLCPLZ6W.js +1 -0
- package/dist/cdn/c/clay-404-SMDVAQCV.js +1 -0
- package/dist/cdn/c/constellation-J5QMY7IB.js +1 -0
- package/dist/cdn/c/countdown-2TEFVO73.js +14 -0
- package/dist/cdn/c/cross-stitch-N5H5GLAG.js +2 -0
- package/dist/cdn/c/deep-sea-ILDVMW5M.js +85 -0
- package/dist/cdn/c/divider-PMT4UZEF.js +9 -0
- package/dist/cdn/c/dna-CAAKBMRK.js +2 -0
- package/dist/cdn/c/dominoes-VLA5MBXM.js +1 -0
- package/dist/cdn/c/dot-grid-O7LJO44U.js +11 -0
- package/dist/cdn/c/editorial-4C5Z33WO.js +11 -0
- package/dist/cdn/c/elevator-EFNB6FVO.js +36 -0
- package/dist/cdn/c/emoji-EHAJDQSM.js +8 -0
- package/dist/cdn/c/error-cascade-CIJCQLP3.js +18 -0
- package/dist/cdn/c/evidence-board-Z7DXMGNE.js +18 -0
- package/dist/cdn/c/eyes-VPOHW2CX.js +2 -0
- package/dist/cdn/c/fireworks-QLWJ3S43.js +1 -0
- package/dist/cdn/c/flashlight-QXI7QT74.js +57 -0
- package/dist/cdn/c/flatline-3GBK7IVS.js +1 -0
- package/dist/cdn/c/flock-RLSZ7EZQ.js +1 -0
- package/dist/cdn/c/foggy-glass-A56REA7E.js +1 -0
- package/dist/cdn/c/gears-4HJO7H74.js +5 -0
- package/dist/cdn/c/glass-404-WZRMDFTP.js +1 -0
- package/dist/cdn/c/glitch-Y4CIADF3.js +60 -0
- package/dist/cdn/c/gradient-404-YNSTOPNA.js +6 -0
- package/dist/cdn/c/halftone-XZ7F75B4.js +43 -0
- package/dist/cdn/c/hanging-letters-Y3VH7EVP.js +1 -0
- package/dist/cdn/c/hanging-sign-2KUXPLZE.js +1 -0
- package/dist/cdn/c/helpful-links-UFGTWTRQ.js +18 -0
- package/dist/cdn/c/hyperspace-R34QNI7J.js +57 -0
- package/dist/cdn/c/hypnosis-MK6AV3SC.js +26 -0
- package/dist/cdn/c/ink-S332BOPS.js +43 -0
- package/dist/cdn/c/invaders-ZSY3Z443.js +1 -0
- package/dist/cdn/c/kaleidoscope-BLGSIK4F.js +34 -0
- package/dist/cdn/c/lava-lamp-VYY5XFG5.js +55 -0
- package/dist/cdn/c/life-QBWZL5FY.js +1 -0
- package/dist/cdn/c/lighthouse-QX7QIIPX.js +60 -0
- package/dist/cdn/c/loading-LIS67QF7.js +34 -0
- package/dist/cdn/c/lost-at-sea-QNURIHBY.js +258 -0
- package/dist/cdn/c/magic-8-ball-W3TRJALZ.js +2 -0
- package/dist/cdn/c/matrix-rain-4V4SVGGG.js +3 -0
- package/dist/cdn/c/maze-QL5TRCE5.js +1 -0
- package/dist/cdn/c/mesh-gradient-UISGI62K.js +34 -0
- package/dist/cdn/c/metro-map-H64EHOZM.js +30 -0
- package/dist/cdn/c/milk-carton-3SDLA5AY.js +53 -0
- package/dist/cdn/c/minimal-SB6FU3DE.js +9 -0
- package/dist/cdn/c/mirage-IQ3IA3VB.js +70 -0
- package/dist/cdn/c/moon-landing-TKZE4Q6G.js +1 -0
- package/dist/cdn/c/neon-sign-XGMN75MH.js +1 -0
- package/dist/cdn/c/newspaper-YECAUY77.js +49 -0
- package/dist/cdn/c/nixie-CQBRCVDE.js +1 -0
- package/dist/cdn/c/no-signal-HL4A4CFZ.js +82 -0
- package/dist/cdn/c/one-bit-AFIZQPHK.js +49 -0
- package/dist/cdn/c/outline-404-REB5E5EN.js +9 -0
- package/dist/cdn/c/paint-splash-GZGPOURW.js +1 -0
- package/dist/cdn/c/paper-plane-KDCSE3RM.js +2 -0
- package/dist/cdn/c/particles-7UMRMT2M.js +1 -0
- package/dist/cdn/c/path-not-found-VUEXOVO7.js +14 -0
- package/dist/cdn/c/planet-H6QGPDVC.js +157 -0
- package/dist/cdn/c/pond-6DL43VUQ.js +106 -0
- package/dist/cdn/c/pong-B2ZGAY7T.js +1 -0
- package/dist/cdn/c/radar-22JCPGQZ.js +4 -0
- package/dist/cdn/c/rainy-window-DTGLJVAR.js +114 -0
- package/dist/cdn/c/receipt-ZOYUSMN3.js +32 -0
- package/dist/cdn/c/road-closed-3OS55UBX.js +1 -0
- package/dist/cdn/c/rpg-dialog-FV53YYNJ.js +14 -0
- package/dist/cdn/c/runner-NANXJTQG.js +1 -0
- package/dist/cdn/c/scratch-card-GC6U4ZZN.js +1 -0
- package/dist/cdn/c/screensaver-UXKJVQUU.js +1 -0
- package/dist/cdn/c/search-404-HFKZ4DUA.js +17 -0
- package/dist/cdn/c/server-default-RBMMRAHS.js +10 -0
- package/dist/cdn/c/server-room-QSKAUFUY.js +1 -0
- package/dist/cdn/c/skyline-OMZMF5R6.js +1 -0
- package/dist/cdn/c/skywriting-RYNQWJ6I.js +1 -0
- package/dist/cdn/c/slot-machine-XXCVI2HK.js +33 -0
- package/dist/cdn/c/snake-6Z5V3QA3.js +1 -0
- package/dist/cdn/c/snow-globe-RLDPNA2J.js +2 -0
- package/dist/cdn/c/soft-blobs-FYEFGINV.js +15 -0
- package/dist/cdn/c/solar-system-CQAP6WFU.js +2 -0
- package/dist/cdn/c/split-flap-O7JGD5Q4.js +37 -0
- package/dist/cdn/c/split-panel-QGXZ24E4.js +12 -0
- package/dist/cdn/c/stage-GBZR3JQS.js +2 -0
- package/dist/cdn/c/swiss-poster-OON4HBUG.js +20 -0
- package/dist/cdn/c/terminal-7BTUDZDB.js +41 -0
- package/dist/cdn/c/thunderstorm-FRCKHKXY.js +1 -0
- package/dist/cdn/c/topographic-3RIQXKIQ.js +38 -0
- package/dist/cdn/c/torn-page-6UT5ZQHG.js +16 -0
- package/dist/cdn/c/treasure-map-FALAEBL5.js +3 -0
- package/dist/cdn/c/typewriter-7TIO42MH.js +23 -0
- package/dist/cdn/c/ufo-6UW34TI3.js +1 -0
- package/dist/cdn/c/unplugged-QXKDDH4S.js +1 -0
- package/dist/cdn/c/vending-machine-SH3MNFMY.js +27 -0
- package/dist/cdn/c/vinyl-3FUP3LSO.js +2 -0
- package/dist/cdn/c/voxel-404-LMC43X4B.js +102 -0
- package/dist/cdn/c/wormhole-I2RWIMRW.js +113 -0
- package/dist/cdn/c/zen-garden-HMAMASJK.js +1 -0
- package/dist/cdn/element.js +1 -0
- package/dist/cdn/index.js +1 -0
- package/dist/chunks/chunk-3ISI6SOJ.js +1 -0
- package/dist/chunks/chunk-6HZC24J2.js +296 -0
- package/dist/chunks/chunk-7XMDQMDO.js +1 -0
- package/dist/chunks/chunk-B2NBRLO2.js +1 -0
- package/dist/chunks/chunk-B4TY5M55.js +1 -0
- package/dist/chunks/chunk-DAZOIOF7.js +1 -0
- package/dist/chunks/chunk-ES56TX4X.js +1 -0
- package/dist/chunks/chunk-FVGCB66F.js +1 -0
- package/dist/chunks/chunk-KIYSQVWX.js +1 -0
- package/dist/chunks/chunk-MNUNTC4L.js +4 -0
- package/dist/chunks/chunk-SH72TE6I.js +75 -0
- package/dist/chunks/chunk-URB3NNOB.js +70 -0
- package/dist/cli.js +97 -0
- package/dist/core/canvas2d.d.ts +18 -0
- package/dist/core/define.d.ts +16 -0
- package/dist/core/gl.d.ts +50 -0
- package/dist/core/glsl.d.ts +10 -0
- package/dist/core/overlay.d.ts +5 -0
- package/dist/core/runtime.d.ts +8 -0
- package/dist/core/shader.d.ts +22 -0
- package/dist/core/styles.d.ts +4 -0
- package/dist/core/text.d.ts +54 -0
- package/dist/core/types.d.ts +170 -0
- package/dist/core/util.d.ts +16 -0
- package/dist/core.d.ts +8 -0
- package/dist/core.js +1 -0
- package/dist/element.cdn.js +1 -0
- package/dist/element.d.ts +21 -0
- package/dist/element.js +1 -0
- package/dist/engines/arcade.d.ts +25 -0
- package/dist/engines/text3d.d.ts +37 -0
- package/dist/generated/all.d.ts +2 -0
- package/dist/generated/catalog.d.ts +2 -0
- package/dist/generated/registry.d.ts +5 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +1 -0
- package/dist/lostpage.global.js +3222 -0
- package/dist/react.d.ts +21 -0
- package/dist/react.js +2 -0
- package/dist/scenes/_simple.d.ts +10 -0
- package/dist/scenes/ascii-3d.d.ts +10 -0
- package/dist/scenes/ascii-3d.js +3 -0
- package/dist/scenes/astronaut.d.ts +10 -0
- package/dist/scenes/astronaut.js +2 -0
- package/dist/scenes/aurora.d.ts +14 -0
- package/dist/scenes/aurora.js +129 -0
- package/dist/scenes/autumn.d.ts +8 -0
- package/dist/scenes/autumn.js +1 -0
- package/dist/scenes/balloon-404.d.ts +9 -0
- package/dist/scenes/balloon-404.js +1 -0
- package/dist/scenes/beach.d.ts +14 -0
- package/dist/scenes/beach.js +95 -0
- package/dist/scenes/black-hole.d.ts +15 -0
- package/dist/scenes/black-hole.js +124 -0
- package/dist/scenes/block-drop.d.ts +9 -0
- package/dist/scenes/block-drop.js +1 -0
- package/dist/scenes/blue-screen.d.ts +5 -0
- package/dist/scenes/blue-screen.js +70 -0
- package/dist/scenes/breakout.d.ts +10 -0
- package/dist/scenes/breakout.js +1 -0
- package/dist/scenes/bricks.d.ts +7 -0
- package/dist/scenes/bricks.js +1 -0
- package/dist/scenes/broken-link.d.ts +8 -0
- package/dist/scenes/broken-link.js +11 -0
- package/dist/scenes/brutalist.d.ts +7 -0
- package/dist/scenes/brutalist.js +15 -0
- package/dist/scenes/bubble-wrap.d.ts +9 -0
- package/dist/scenes/bubble-wrap.js +1 -0
- package/dist/scenes/campfire.d.ts +11 -0
- package/dist/scenes/campfire.js +88 -0
- package/dist/scenes/card.d.ts +8 -0
- package/dist/scenes/card.js +15 -0
- package/dist/scenes/cassette.d.ts +9 -0
- package/dist/scenes/cassette.js +15 -0
- package/dist/scenes/chalkboard.d.ts +8 -0
- package/dist/scenes/chalkboard.js +3 -0
- package/dist/scenes/chrome-404.d.ts +13 -0
- package/dist/scenes/chrome-404.js +1 -0
- package/dist/scenes/circuit-board.d.ts +9 -0
- package/dist/scenes/circuit-board.js +1 -0
- package/dist/scenes/claw-machine.d.ts +8 -0
- package/dist/scenes/claw-machine.js +1 -0
- package/dist/scenes/clay-404.d.ts +11 -0
- package/dist/scenes/clay-404.js +1 -0
- package/dist/scenes/constellation.d.ts +10 -0
- package/dist/scenes/constellation.js +1 -0
- package/dist/scenes/countdown.d.ts +9 -0
- package/dist/scenes/countdown.js +14 -0
- package/dist/scenes/cross-stitch.d.ts +8 -0
- package/dist/scenes/cross-stitch.js +2 -0
- package/dist/scenes/deep-sea.d.ts +9 -0
- package/dist/scenes/deep-sea.js +85 -0
- package/dist/scenes/divider.d.ts +6 -0
- package/dist/scenes/divider.js +9 -0
- package/dist/scenes/dna.d.ts +9 -0
- package/dist/scenes/dna.js +2 -0
- package/dist/scenes/dominoes.d.ts +9 -0
- package/dist/scenes/dominoes.js +1 -0
- package/dist/scenes/dot-grid.d.ts +9 -0
- package/dist/scenes/dot-grid.js +11 -0
- package/dist/scenes/editorial.d.ts +6 -0
- package/dist/scenes/editorial.js +11 -0
- package/dist/scenes/elevator.d.ts +10 -0
- package/dist/scenes/elevator.js +36 -0
- package/dist/scenes/emoji.d.ts +7 -0
- package/dist/scenes/emoji.js +8 -0
- package/dist/scenes/error-cascade.d.ts +6 -0
- package/dist/scenes/error-cascade.js +18 -0
- package/dist/scenes/evidence-board.d.ts +7 -0
- package/dist/scenes/evidence-board.js +18 -0
- package/dist/scenes/eyes.d.ts +12 -0
- package/dist/scenes/eyes.js +2 -0
- package/dist/scenes/fireworks.d.ts +8 -0
- package/dist/scenes/fireworks.js +1 -0
- package/dist/scenes/flashlight.d.ts +12 -0
- package/dist/scenes/flashlight.js +57 -0
- package/dist/scenes/flatline.d.ts +9 -0
- package/dist/scenes/flatline.js +1 -0
- package/dist/scenes/flock.d.ts +13 -0
- package/dist/scenes/flock.js +1 -0
- package/dist/scenes/foggy-glass.d.ts +9 -0
- package/dist/scenes/foggy-glass.js +1 -0
- package/dist/scenes/gears.d.ts +10 -0
- package/dist/scenes/gears.js +5 -0
- package/dist/scenes/glass-404.d.ts +11 -0
- package/dist/scenes/glass-404.js +1 -0
- package/dist/scenes/glitch.d.ts +15 -0
- package/dist/scenes/glitch.js +60 -0
- package/dist/scenes/gradient-404.d.ts +9 -0
- package/dist/scenes/gradient-404.js +6 -0
- package/dist/scenes/halftone.d.ts +11 -0
- package/dist/scenes/halftone.js +43 -0
- package/dist/scenes/hanging-letters.d.ts +10 -0
- package/dist/scenes/hanging-letters.js +1 -0
- package/dist/scenes/hanging-sign.d.ts +9 -0
- package/dist/scenes/hanging-sign.js +1 -0
- package/dist/scenes/helpful-links.d.ts +6 -0
- package/dist/scenes/helpful-links.js +18 -0
- package/dist/scenes/hyperspace.d.ts +11 -0
- package/dist/scenes/hyperspace.js +57 -0
- package/dist/scenes/hypnosis.d.ts +10 -0
- package/dist/scenes/hypnosis.js +26 -0
- package/dist/scenes/ink.d.ts +10 -0
- package/dist/scenes/ink.js +43 -0
- package/dist/scenes/invaders.d.ts +10 -0
- package/dist/scenes/invaders.js +1 -0
- package/dist/scenes/kaleidoscope.d.ts +10 -0
- package/dist/scenes/kaleidoscope.js +34 -0
- package/dist/scenes/lava-lamp.d.ts +11 -0
- package/dist/scenes/lava-lamp.js +55 -0
- package/dist/scenes/life.d.ts +13 -0
- package/dist/scenes/life.js +1 -0
- package/dist/scenes/lighthouse.d.ts +11 -0
- package/dist/scenes/lighthouse.js +60 -0
- package/dist/scenes/loading.d.ts +6 -0
- package/dist/scenes/loading.js +34 -0
- package/dist/scenes/lost-at-sea.d.ts +35 -0
- package/dist/scenes/lost-at-sea.js +258 -0
- package/dist/scenes/magic-8-ball.d.ts +10 -0
- package/dist/scenes/magic-8-ball.js +2 -0
- package/dist/scenes/matrix-rain.d.ts +13 -0
- package/dist/scenes/matrix-rain.js +3 -0
- package/dist/scenes/maze.d.ts +9 -0
- package/dist/scenes/maze.js +1 -0
- package/dist/scenes/mesh-gradient.d.ts +13 -0
- package/dist/scenes/mesh-gradient.js +34 -0
- package/dist/scenes/metro-map.d.ts +8 -0
- package/dist/scenes/metro-map.js +30 -0
- package/dist/scenes/milk-carton.d.ts +9 -0
- package/dist/scenes/milk-carton.js +53 -0
- package/dist/scenes/minimal.d.ts +6 -0
- package/dist/scenes/minimal.js +9 -0
- package/dist/scenes/mirage.d.ts +10 -0
- package/dist/scenes/mirage.js +70 -0
- package/dist/scenes/moon-landing.d.ts +8 -0
- package/dist/scenes/moon-landing.js +1 -0
- package/dist/scenes/neon-sign.d.ts +15 -0
- package/dist/scenes/neon-sign.js +1 -0
- package/dist/scenes/newspaper.d.ts +10 -0
- package/dist/scenes/newspaper.js +49 -0
- package/dist/scenes/nixie.d.ts +11 -0
- package/dist/scenes/nixie.js +1 -0
- package/dist/scenes/no-signal.d.ts +11 -0
- package/dist/scenes/no-signal.js +82 -0
- package/dist/scenes/one-bit.d.ts +8 -0
- package/dist/scenes/one-bit.js +49 -0
- package/dist/scenes/outline-404.d.ts +8 -0
- package/dist/scenes/outline-404.js +9 -0
- package/dist/scenes/paint-splash.d.ts +6 -0
- package/dist/scenes/paint-splash.js +1 -0
- package/dist/scenes/paper-plane.d.ts +9 -0
- package/dist/scenes/paper-plane.js +2 -0
- package/dist/scenes/particles.d.ts +22 -0
- package/dist/scenes/particles.js +1 -0
- package/dist/scenes/path-not-found.d.ts +6 -0
- package/dist/scenes/path-not-found.js +14 -0
- package/dist/scenes/planet.d.ts +19 -0
- package/dist/scenes/planet.js +157 -0
- package/dist/scenes/pond.d.ts +11 -0
- package/dist/scenes/pond.js +106 -0
- package/dist/scenes/pong.d.ts +8 -0
- package/dist/scenes/pong.js +1 -0
- package/dist/scenes/radar.d.ts +9 -0
- package/dist/scenes/radar.js +4 -0
- package/dist/scenes/rainy-window.d.ts +11 -0
- package/dist/scenes/rainy-window.js +114 -0
- package/dist/scenes/receipt.d.ts +8 -0
- package/dist/scenes/receipt.js +32 -0
- package/dist/scenes/road-closed.d.ts +9 -0
- package/dist/scenes/road-closed.js +1 -0
- package/dist/scenes/rpg-dialog.d.ts +11 -0
- package/dist/scenes/rpg-dialog.js +14 -0
- package/dist/scenes/runner.d.ts +10 -0
- package/dist/scenes/runner.js +1 -0
- package/dist/scenes/scratch-card.d.ts +9 -0
- package/dist/scenes/scratch-card.js +1 -0
- package/dist/scenes/screensaver.d.ts +8 -0
- package/dist/scenes/screensaver.js +1 -0
- package/dist/scenes/search-404.d.ts +9 -0
- package/dist/scenes/search-404.js +17 -0
- package/dist/scenes/server-default.d.ts +6 -0
- package/dist/scenes/server-default.js +10 -0
- package/dist/scenes/server-room.d.ts +9 -0
- package/dist/scenes/server-room.js +1 -0
- package/dist/scenes/skyline.d.ts +10 -0
- package/dist/scenes/skyline.js +1 -0
- package/dist/scenes/skywriting.d.ts +8 -0
- package/dist/scenes/skywriting.js +1 -0
- package/dist/scenes/slot-machine.d.ts +10 -0
- package/dist/scenes/slot-machine.js +33 -0
- package/dist/scenes/snake.d.ts +13 -0
- package/dist/scenes/snake.js +1 -0
- package/dist/scenes/snow-globe.d.ts +10 -0
- package/dist/scenes/snow-globe.js +2 -0
- package/dist/scenes/soft-blobs.d.ts +9 -0
- package/dist/scenes/soft-blobs.js +15 -0
- package/dist/scenes/solar-system.d.ts +9 -0
- package/dist/scenes/solar-system.js +2 -0
- package/dist/scenes/split-flap.d.ts +15 -0
- package/dist/scenes/split-flap.js +37 -0
- package/dist/scenes/split-panel.d.ts +8 -0
- package/dist/scenes/split-panel.js +12 -0
- package/dist/scenes/stage.d.ts +10 -0
- package/dist/scenes/stage.js +2 -0
- package/dist/scenes/swiss-poster.d.ts +9 -0
- package/dist/scenes/swiss-poster.js +20 -0
- package/dist/scenes/terminal.d.ts +13 -0
- package/dist/scenes/terminal.js +41 -0
- package/dist/scenes/thunderstorm.d.ts +11 -0
- package/dist/scenes/thunderstorm.js +1 -0
- package/dist/scenes/topographic.d.ts +13 -0
- package/dist/scenes/topographic.js +38 -0
- package/dist/scenes/torn-page.d.ts +9 -0
- package/dist/scenes/torn-page.js +16 -0
- package/dist/scenes/treasure-map.d.ts +10 -0
- package/dist/scenes/treasure-map.js +3 -0
- package/dist/scenes/typewriter.d.ts +10 -0
- package/dist/scenes/typewriter.js +23 -0
- package/dist/scenes/ufo.d.ts +11 -0
- package/dist/scenes/ufo.js +1 -0
- package/dist/scenes/unplugged.d.ts +9 -0
- package/dist/scenes/unplugged.js +1 -0
- package/dist/scenes/vending-machine.d.ts +7 -0
- package/dist/scenes/vending-machine.js +27 -0
- package/dist/scenes/vinyl.d.ts +9 -0
- package/dist/scenes/vinyl.js +2 -0
- package/dist/scenes/voxel-404.d.ts +13 -0
- package/dist/scenes/voxel-404.js +102 -0
- package/dist/scenes/wormhole.d.ts +13 -0
- package/dist/scenes/wormhole.js +113 -0
- package/dist/scenes/zen-garden.d.ts +8 -0
- package/dist/scenes/zen-garden.js +1 -0
- package/dist/svelte.d.ts +17 -0
- package/dist/svelte.js +1 -0
- package/dist/vue.d.ts +66 -0
- package/dist/vue.js +1 -0
- package/package.json +114 -4
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var esc=s=>s.replace(/[&<>"]/g,c=>({"&":"&","<":"<",">":">",'"':"""})[c]);function fakeQR(seed){let s=seed,r=()=>(s=s*1103515245+12345&2147483647)/2147483647,cells="",finder=(x,y)=>{let fx=x<7&&y<7?[x,y]:x>=18&&y<7?[x-18,y]:x<7&&y>=18?[x,y-18]:null;if(!fx)return null;let[a,b]=fx;return Math.max(Math.abs(a-3),Math.abs(b-3))!==2};for(let y=0;y<25;y++)for(let x=0;x<25;x++){let f=finder(x,y);(f===null?r()>.52:f)&&(cells+=`<rect x="${x}" y="${y}" width="1" height="1"/>`)}return`<svg viewBox="-1 -1 27 27" aria-hidden="true"><rect x="-1" y="-1" width="27" height="27" fill="#fff"/><g fill="currentColor">${cells}</g></svg>`}var blue_screen_default={id:"blue-screen",name:"Fatal Error",description:"Blue screens, kernel panics, restart prompts and guru meditations, each a classic crash screen rewritten as a 404.",category:"Retro Tech",kind:"2d",motion:"live",tags:["dom","bsod","crash","retro","developer","funny","keyboard"],layout:"none",copy:{title:"Your browser ran into a problem.",message:"The page you asked for doesn't exist. We're collecting some error info, then we'll take you home.",actions:[{label:"Restart at home",href:"/",variant:"primary"}]},params:{style:"modern"},theme:{bg:"#1259b8",fg:"#ffffff"},presetName:"Modern",presets:{green:{name:"Preview Build",params:{style:"modern"},theme:{bg:"#0e7a0d",fg:"#ffffff"}},black:{name:"Black Screen",params:{style:"modern"},theme:{bg:"#000000",fg:"#ffffff"}},classic:{name:"Classic",params:{style:"classic"},theme:{bg:"#0000aa",fg:"#ffffff"}},kernel:{name:"Kernel Panic",params:{style:"kernel"},theme:{bg:"#000000",fg:"#c7c7c7"}},restart:{name:"Restart Required",params:{style:"restart"},theme:{bg:"#1d1d1f",fg:"#f5f5f7"}},guru:{name:"Guru Meditation",params:{style:"guru"},theme:{bg:"#000000",fg:"#ff2a1a"}},bios:{name:"Boot Failure",params:{style:"bios"},theme:{bg:"#000000",fg:"#bdbdbd"}}},css:`
|
|
2
|
+
& .bs{position:absolute;inset:0;overflow:hidden;color:var(--lp-fg)}
|
|
3
|
+
& .bs a{color:inherit}
|
|
4
|
+
& .bs-modern{display:flex;align-items:center;padding:clamp(24px,9cqw,140px)}
|
|
5
|
+
& .bs-modern .in{max-width:900px}
|
|
6
|
+
& .bs-modern .face{font-size:clamp(90px,13cqw,170px);line-height:1;margin:0 0 .25em;font-weight:300}
|
|
7
|
+
& .bs-modern h1{font-size:clamp(20px,2.3cqw,30px);font-weight:300;line-height:1.35;margin:0 0 1em;max-width:30ch}
|
|
8
|
+
& .bs-modern .pct{font-size:clamp(20px,2.3cqw,30px);font-weight:300;margin:0 0 1.4em}
|
|
9
|
+
& .bs-modern .row{display:flex;gap:22px;align-items:flex-start}
|
|
10
|
+
& .bs-modern .qr{width:clamp(78px,8cqw,110px);flex:none;color:var(--lp-bg)}
|
|
11
|
+
& .bs-modern .meta{font-size:clamp(12px,1cqw,14px);line-height:1.6}
|
|
12
|
+
& .bs-modern .meta p{margin:0 0 .6em}
|
|
13
|
+
& .bs-modern .home{display:inline-block;margin-top:.4em;padding:8px 16px;border:1px solid rgba(255,255,255,.7);text-decoration:none}
|
|
14
|
+
& .bs-modern .home:hover{background:#fff;color:var(--lp-bg)}
|
|
15
|
+
& .bs-classic,& .bs-guru,& .bs-bios,& .bs-kernel{font-family:"Perfect DOS VGA 437","IBM Plex Mono",ui-monospace,Menlo,Consolas,monospace}
|
|
16
|
+
& .bs-classic{display:flex;align-items:center;justify-content:center;padding:24px;font-size:clamp(13px,1.35cqw,18px);line-height:1.45}
|
|
17
|
+
& .bs-classic .in{max-width:68ch}
|
|
18
|
+
& .bs-classic .tag{display:table;margin:0 auto 1.4em;background:#aaaaaa;color:#0000aa;padding:0 .6em;font-weight:700}
|
|
19
|
+
& .bs-classic h1{font:inherit;margin:0 0 1.2em}
|
|
20
|
+
& .bs-classic p{margin:0 0 1.2em}
|
|
21
|
+
& .bs-classic .cont{text-align:center}
|
|
22
|
+
& .cur{display:inline-block;width:.6em;animation:bs-b 1s steps(1) infinite}
|
|
23
|
+
@keyframes bs-b{50%{opacity:0}}
|
|
24
|
+
& .bs-kernel{padding:clamp(10px,2cqw,24px);font-size:clamp(11px,1cqw,13.5px);line-height:1.4;white-space:pre-wrap}
|
|
25
|
+
& .bs-kernel .log{margin:0;font:inherit}
|
|
26
|
+
& .bs-kernel h1{font:inherit;margin:0;color:#fff}
|
|
27
|
+
& .bs-kernel a{color:#7fdbff}
|
|
28
|
+
& .bs-restart{display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at center,#2c2c2e,#121214)}
|
|
29
|
+
& .bs-restart .in{text-align:center;max-width:620px;padding:24px;animation:bs-fade 1.6s ease both}
|
|
30
|
+
@keyframes bs-fade{from{opacity:0}}
|
|
31
|
+
& .bs-restart svg{width:64px;height:64px;margin-bottom:28px;opacity:.9}
|
|
32
|
+
& .bs-restart h1{font-size:clamp(18px,1.8cqw,22px);font-weight:500;margin:0 0 .5em}
|
|
33
|
+
& .bs-restart p{margin:.25em 0;color:rgba(245,245,247,.62);font-size:14px}
|
|
34
|
+
& .bs-restart .langs{margin-top:22px}
|
|
35
|
+
& .bs-restart .home{display:inline-block;margin-top:26px;padding:9px 20px;border-radius:999px;background:#f5f5f7;color:#1d1d1f;text-decoration:none;font-weight:500;font-size:14px}
|
|
36
|
+
& .bs-guru{display:flex;align-items:flex-start;justify-content:center;padding-top:clamp(20px,6cqh,60px)}
|
|
37
|
+
& .bs-guru .box{border:clamp(4px,.5cqw,7px) solid currentColor;padding:1.1em 2em;text-align:center;font-size:clamp(12px,1.5cqw,20px);line-height:1.6;animation:bs-g 1.6s steps(1) infinite;max-width:94cqw}
|
|
38
|
+
@keyframes bs-g{50%{border-color:transparent}}
|
|
39
|
+
& .bs-guru h1{font:inherit;margin:0}
|
|
40
|
+
& .bs-guru .sub{color:rgba(255,255,255,.5);margin-top:3em;font-size:clamp(11px,1cqw,14px);text-align:center}
|
|
41
|
+
& .bs-bios{padding:clamp(16px,3cqw,40px);font-size:clamp(12px,1.25cqw,17px);line-height:1.55}
|
|
42
|
+
& .bs-bios .logo{float:right;text-align:right;color:#5af;opacity:.9;line-height:1.1}
|
|
43
|
+
& .bs-bios h1{font:inherit;color:#fff;margin:1.4em 0 0}
|
|
44
|
+
& .bs-bios .w{color:#fff}
|
|
45
|
+
& .bs-bios .ok{color:#5f5}
|
|
46
|
+
@media (prefers-reduced-motion:reduce){& .cur,& .bs-guru .box,& .bs-restart .in{animation:none}}
|
|
47
|
+
`,setup(ctx){let{style}=ctx.params,c=ctx.copy,home=c.actions[0]?.href??"/",homeLabel=c.actions[0]?.label??"Go home",path=typeof location<"u"?location.pathname:"/missing",el=document.createElement("div");el.className=`bs bs-${style}`;let tick=()=>{};if(style==="modern"){el.innerHTML=`<div class="in"><div class="face" aria-hidden="true">:(</div>
|
|
48
|
+
<h1><span class="lp-sr">Error ${esc(c.code)}: </span>${esc(c.title)} ${esc(c.message)}</h1>
|
|
49
|
+
<p class="pct"><span class="n">0</span>% complete</p>
|
|
50
|
+
<div class="row"><div class="qr">${fakeQR(404)}</div><div class="meta">
|
|
51
|
+
<p>For more information about this issue and possible fixes, visit the homepage.</p>
|
|
52
|
+
<p>If you call a support person, give them this info:<br>Stop code: PAGE_NOT_FOUND (${esc(c.code)})<br>What failed: ${esc(path)}</p>
|
|
53
|
+
<a class="home" href="${esc(home)}">${esc(homeLabel)}</a></div></div></div>`;let n=el.querySelector(".n");tick=t=>{let v=Math.min(100,Math.floor(t*7%140));n.textContent=v>=100?c.code:String(v)}}else if(style==="classic")el.innerHTML=`<div class="in"><div class="tag"> Error ${esc(c.code)} </div>
|
|
54
|
+
<h1>A fatal exception ${esc(c.code)} has occurred at 0028:C0011E36 in VXD PAGE(01) + 00010E36. <span class="lp-sr">${esc(c.title)}</span>The current page will be terminated.</h1>
|
|
55
|
+
<p>* Press any key to return to the homepage.<br>* Press CTRL+ALT+DEL to lose any unsaved links in all pages. That would be a shame.</p>
|
|
56
|
+
<p class="cont">Press any key to continue <span class="cur">_</span></p></div>`;else if(style==="kernel"){let lines=["[ 0.000000] Linux version 4.0.4-lost (page@nowhere) #404 SMP","[ 0.000404] Command line: BOOT_IMAGE=/vmlinuz root="+path+" ro quiet splash",'[ 1.204040] VFS: Cannot open root device "'+path+'" or unknown-block(404,0): error -2','[ 1.204041] Please append a correct "root=" boot option; here are the available partitions:',"[ 1.204044] 0800 home / (driver?)","[ 1.204045] 0801 blog /blog (driver?)","[ 1.204046] 0802 about /about (driver?)"];el.innerHTML='<pre class="log"></pre>';let log=el.querySelector(".log"),shown=0;tick=t=>{let want=Math.min(lines.length+4,Math.floor(t*4));for(;shown<want;){if(shown<lines.length)log.append(lines[shown]+`
|
|
57
|
+
`);else if(shown===lines.length){let h=document.createElement("h1");h.innerHTML=`[ 1.204047] Kernel panic - not syncing: VFS: Unable to mount ${esc(c.title.toLowerCase())} on unknown-block(${esc(c.code)},0)`,log.append(h)}else if(shown===lines.length+1)log.append(`[ 1.204048] ---[ end Kernel panic - not syncing ]---
|
|
58
|
+
|
|
59
|
+
`);else if(shown===lines.length+2){let a=document.createElement("a");a.href=home,a.textContent=`> reboot into ${home}`,log.append(a,`
|
|
60
|
+
`)}shown++}}}else style==="restart"?el.innerHTML=`<div class="in"><svg viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" aria-hidden="true"><path d="M32 8v22"/><path d="M19 15a22 22 0 1 0 26 0"/></svg>
|
|
61
|
+
<h1><span class="lp-sr">Error ${esc(c.code)}: </span>You need to go back to the homepage.</h1>
|
|
62
|
+
<p>${esc(c.message)}</p>
|
|
63
|
+
<div class="langs"><p>Vous devez retourner \xE0 la page d'accueil.</p><p>Sie m\xFCssen zur Startseite zur\xFCckkehren.</p><p>\u30DB\u30FC\u30E0\u30DA\u30FC\u30B8\u306B\u623B\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002</p></div>
|
|
64
|
+
<a class="home" href="${esc(home)}">${esc(homeLabel)}</a></div>`:style==="guru"?el.innerHTML=`<div><div class="box"><h1>Software Failure. Press left mouse button to continue.<span class="lp-sr"> ${esc(c.title)}</span></h1>Guru Meditation #0000${esc(c.code.padStart(4,"0"))}.00C0FFEE</div>
|
|
65
|
+
<div class="sub">${esc(c.message)}</div></div>`:el.innerHTML=`<div class="logo" aria-hidden="true">LOSTPAGE BIOS<br>v4.04</div>
|
|
66
|
+
<div>Lostpage Modular BIOS v4.04, An Energy Star Ally<br>Copyright (C) 1984-2026, Nowhere Software, Inc.</div><br>
|
|
67
|
+
<div>Main Processor : Pentium-ish 404MHz<br>Memory Testing : <span class="ok">65536K OK</span></div><br>
|
|
68
|
+
<div>Detecting Primary Master ... <span class="w">HOMEPAGE</span><br>Detecting Primary Slave ... <span class="w">${esc(path)}</span> <span style="color:#f55">None</span></div>
|
|
69
|
+
<h1>Error ${esc(c.code)}: Boot page not found.<span class="lp-sr"> ${esc(c.title)}</span></h1>
|
|
70
|
+
<div>${esc(c.message)}</div><br><div class="w">Press any key to boot from HOMEPAGE <span class="cur">_</span></div>`;return ctx.root.append(el),(style==="classic"||style==="bios"||style==="guru")&&(ctx.onWindow("keydown",e=>{!ctx.visible()||e.metaKey||e.ctrlKey||e.altKey||e.key==="Tab"||e.key==="Shift"||ctx.navigate(home)}),ctx.on("click",e=>{e.target.closest("a")||ctx.navigate(home,e)}),el.style.cursor="pointer"),el.querySelectorAll("a").forEach(a=>a.addEventListener("click",e=>{e.metaKey||e.ctrlKey||(e.preventDefault(),ctx.navigate(a.getAttribute("href")??"/",e))})),{frame(t){tick(ctx.reducedMotion?99:t)},destroy(){el.remove()}}}};export{blue_screen_default as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GAME_CSS,codeBitmap,hud,input,loadHigh,saveHigh}from"../chunks/chunk-MNUNTC4L.js";import{canvas2d}from"../chunks/chunk-DAZOIOF7.js";import{rgba}from"../chunks/chunk-FVGCB66F.js";import"../chunks/chunk-3ISI6SOJ.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var breakout_default={id:"breakout",name:"Brick Breaker",description:"The 404 is a wall of bricks. It plays itself until you move the paddle, then it's your game.",category:"Games",kind:"2d",motion:"game",tags:["canvas","game","playable","arcade","retro","interactive"],layout:"bottom",codeInScene:!0,copy:{eyebrow:"Insert coin",title:"Break the 404 to find the page.",message:"Spoiler: it isn't behind the bricks either. Move your mouse or use \u2190 \u2192 to play.",actions:[{label:"Quit to home",href:"/",variant:"primary"}]},params:{bg:"#07070f",bricks:["#ff4d6d","#ff8e3c","#ffd23f","#3bd16f","#3ab0ff","#9b5cff"],paddle:"#f4f4f8",ball:"#ffffff",text:"#f4f4f8",glow:!0},theme:{bg:"#07070f",accent:"#f4f4f8","accent-fg":"#07070f","font-display":"var(--lp-font-mono)","title-weight":"700"},presetName:"Arcade",presets:{candy:{name:"Candy",params:{bg:"#fff4f8",bricks:["#ff5c8a","#ffb13b","#5cd6ff","#9b7bff"],paddle:"#2a1030",ball:"#ff5c8a",text:"#2a1030",glow:!1},theme:{bg:"#fff4f8",fg:"#2a1030",accent:"#2a1030","accent-fg":"#fff"}},ice:{name:"Ice",params:{bg:"#03111c",bricks:["#e6faff","#9fe8ff","#4fc3ff"],paddle:"#e6faff",ball:"#ffffff",text:"#cdefff"},theme:{bg:"#03111c",accent:"#9fe8ff","accent-fg":"#03111c"}},lava:{name:"Lava",params:{bg:"#100300",bricks:["#ff2a00","#ff7a00","#ffd000"],paddle:"#ffd000",ball:"#ffffff",text:"#ffd9b0"},theme:{bg:"#100300",accent:"#ff7a00","accent-fg":"#100300"}},gameboy:{name:"Pocket",params:{bg:"#9bbc0f",bricks:["#0f380f","#306230"],paddle:"#0f380f",ball:"#0f380f",text:"#0f380f",glow:!1},theme:{bg:"#9bbc0f",fg:"#0f380f",accent:"#0f380f","accent-fg":"#9bbc0f"}},paper:{name:"Paper",params:{bg:"#f6f3ec",bricks:["#1c1c1c","#e4572e","#1c1c1c"],paddle:"#1c1c1c",ball:"#e4572e",text:"#1c1c1c",glow:!1},theme:{bg:"#f6f3ec",fg:"#1c1c1c",accent:"#1c1c1c","accent-fg":"#f6f3ec"}},neon:{name:"Neon",params:{bg:"#050010",bricks:["#ff2bd6","#22d3ff"],paddle:"#22d3ff",ball:"#ffffff",text:"#ffe9ff"},theme:{bg:"#050010",accent:"#ff2bd6","accent-fg":"#fff"}},mono:{name:"Amber Terminal",params:{bg:"#0b0700",bricks:["#ffb000","#c98a00"],paddle:"#ffb000",ball:"#ffe3a3",text:"#ffb000"},theme:{bg:"#0b0700",fg:"#ffe3a3",accent:"#ffb000","accent-fg":"#0b0700"}}},css:GAME_CSS,setup(ctx){let p=ctx.params,c=canvas2d(ctx),inp=input(ctx,{pointerPlays:!0}),rnd=ctx.random,code=ctx.copy.code||"404",bricks=[],field={x:0,y:0,w:0,h:0},paddle={x:0,w:0,y:0},ball={x:0,y:0,vx:0,vy:0,r:6,stuck:!0},sparks=[],score=0,lives=3,high=loadHigh("breakout"),over=!1,wasPlaying=!1;function layout(){let w=c.w,h=c.h;field={x:Math.max(16,w*.06),y:Math.max(16,h*.05),w:w-2*Math.max(16,w*.06),h:h*.6};let cols=Math.max(24,Math.min(54,Math.round(field.w/22))),rows=Math.round(cols*.36),bm=codeBitmap(code,cols,rows),bw=field.w*.86/cols,bh=bw*.62,ox=field.x+field.w*.07,oy=field.y+34;bricks=[];for(let r=0;r<rows;r++)for(let q=0;q<cols;q++)bm[r*cols+q]&&bricks.push({x:ox+q*bw,y:oy+r*bh,w:bw-2,h:bh-2,col:p.bricks[Math.floor(r/rows*p.bricks.length)%p.bricks.length],alive:!0});paddle={x:w/2,w:Math.max(70,Math.min(140,w*.1)),y:field.y+field.h},ball.r=Math.max(4,Math.min(7,w/220)),resetBall()}function resetBall(){ball.x=paddle.x,ball.y=paddle.y-14;let sp=Math.min(c.h,c.w)*.75,a=-Math.PI/2+(rnd()-.5)*.9;ball.vx=Math.cos(a)*sp,ball.vy=Math.sin(a)*sp,ball.stuck=!1}function burst(x,y,col){for(let i=0;i<10;i++)sparks.push({x,y,vx:(rnd()-.5)*300,vy:(rnd()-.5)*300,life:.6,col})}return layout(),{resize(){c.reset(),layout()},frame(t,dt){let g=c.g;c.reset(),inp.playing&&!wasPlaying&&(wasPlaying=!0,score=0,lives=3,over=!1,layout());let half=paddle.w/2;if(inp.playing)inp.left&&(paddle.x-=900*dt),inp.right&&(paddle.x+=900*dt),ctx.pointer.inside&&!(inp.left||inp.right)&&(paddle.x+=(ctx.pointer.x-paddle.x)*Math.min(1,dt*18));else{let target=ball.x+Math.sin(t*.7)*half*.6;paddle.x+=(target-paddle.x)*Math.min(1,dt*9)}if(paddle.x=Math.max(field.x+half,Math.min(field.x+field.w-half,paddle.x)),over)inp.pressed()&&(over=!1,score=0,lives=3,layout());else if(dt>0){let steps=Math.ceil(Math.hypot(ball.vx,ball.vy)*dt/(ball.r*.8)),sdt=dt/steps;for(let s=0;s<steps;s++){if(ball.x+=ball.vx*sdt,ball.y+=ball.vy*sdt,ball.x<field.x+ball.r&&(ball.x=field.x+ball.r,ball.vx=Math.abs(ball.vx)),ball.x>field.x+field.w-ball.r&&(ball.x=field.x+field.w-ball.r,ball.vx=-Math.abs(ball.vx)),ball.y<field.y+ball.r&&(ball.y=field.y+ball.r,ball.vy=Math.abs(ball.vy)),ball.vy>0&&ball.y+ball.r>paddle.y&&ball.y<paddle.y+10&&Math.abs(ball.x-paddle.x)<half+ball.r){let off=(ball.x-paddle.x)/half,sp=Math.hypot(ball.vx,ball.vy)*1.01,a=-Math.PI/2+off*1.05;ball.vx=Math.cos(a)*sp,ball.vy=Math.sin(a)*sp,ball.y=paddle.y-ball.r}for(let b of bricks){if(!b.alive||ball.x+ball.r<b.x||ball.x-ball.r>b.x+b.w||ball.y+ball.r<b.y||ball.y-ball.r>b.y+b.h)continue;b.alive=!1,score+=10,burst(b.x+b.w/2,b.y+b.h/2,b.col);let ox=Math.min(ball.x+ball.r-b.x,b.x+b.w-(ball.x-ball.r)),oy=Math.min(ball.y+ball.r-b.y,b.y+b.h-(ball.y-ball.r));ox<oy?ball.vx=-ball.vx:ball.vy=-ball.vy;break}if(ball.y>paddle.y+60){inp.playing&&(lives--,lives<=0&&(over=!0,score>high&&saveHigh("breakout",high=score))),resetBall();break}}bricks.some(b=>b.alive)||(score>high&&saveHigh("breakout",high=score),layout())}g.fillStyle=p.bg,g.fillRect(0,0,c.w,c.h),p.glow&&(g.shadowBlur=12);for(let b of bricks)b.alive&&(g.fillStyle=b.col,p.glow&&(g.shadowColor=b.col),g.fillRect(b.x,b.y,b.w,b.h));g.shadowBlur=0;for(let s of sparks)s.x+=s.vx*dt,s.y+=s.vy*dt,s.vy+=600*dt,s.life-=dt,g.fillStyle=rgba(s.col,Math.max(0,s.life/.6)),g.fillRect(s.x,s.y,3,3);sparks=sparks.filter(s=>s.life>0),g.fillStyle=p.paddle,p.glow&&(g.shadowColor=p.paddle,g.shadowBlur=14),g.fillRect(paddle.x-half,paddle.y,paddle.w,8),g.fillStyle=p.ball,p.glow&&(g.shadowColor=p.ball),g.beginPath(),g.arc(ball.x,ball.y,ball.r,0,Math.PI*2),g.fill(),g.shadowBlur=0;let fs=Math.max(10,Math.min(14,c.w/90));hud(g,`SCORE ${String(score).padStart(5,"0")}`,field.x,field.y,fs,p.text),hud(g,`HI ${String(high).padStart(5,"0")}`,c.w/2,field.y,fs,p.text,"center"),hud(g,inp.playing?"\u2665".repeat(Math.max(0,lives)):"",field.x+field.w,field.y,fs,p.text,"right"),!inp.playing&&Math.floor(t*1.6)%2===0&&hud(g,"DEMO \xB7 MOVE TO PLAY",c.w/2,paddle.y+22,fs,rgba(p.text,.75),"center"),over&&(hud(g,"GAME OVER",c.w/2,field.y+field.h*.45,fs*2.4,p.text,"center"),hud(g,"CLICK OR PRESS SPACE",c.w/2,field.y+field.h*.45+fs*3.4,fs,rgba(p.text,.7),"center"))}}}};export{breakout_default as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{codeBitmap}from"../chunks/chunk-MNUNTC4L.js";import{canvas2d}from"../chunks/chunk-DAZOIOF7.js";import{rgba}from"../chunks/chunk-FVGCB66F.js";import"../chunks/chunk-3ISI6SOJ.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var bricks_default={id:"bricks",name:"Toy Bricks",description:"Seen from above, a baseplate where toy bricks snap down one by one until the error is built. Studs, shadows and all.",category:"Playful",kind:"2d",motion:"live",tags:["canvas","toy","bricks","building","colorful","playful","kids"],layout:"bottom",codeInScene:!0,copy:{eyebrow:"Under construction",title:"This page is missing a few pieces.",message:"We built everything we could from the instructions. Step 404 seems to be missing.",actions:[{label:"Back to the box",href:"/",variant:"primary"}]},params:{plate:"#3a9d4a",colors:["#d62828","#f7b801","#1f6feb","#ffffff","#111111"],bg:"#e9e4da"},theme:{bg:"#e9e4da",fg:"#1a1a1a",accent:"#d62828","accent-fg":"#fff"},presetName:"Classic",presets:{pastel:{name:"Pastel",params:{plate:"#f2e6ff",colors:["#ffb3c7","#a8d8ff","#ffe08a","#b8f0c8"],bg:"#fff8f2"},theme:{bg:"#fff8f2",accent:"#2a1a33"}},space:{name:"Space Set",params:{plate:"#1d2a55",colors:["#d9dce6","#3bd6ff","#9aa0a6","#ffd23f"],bg:"#0b1022"},theme:{bg:"#0b1022",fg:"#eef2ff",accent:"#3bd6ff","accent-fg":"#0b1022"}},mono:{name:"Monochrome",params:{plate:"#d9d9d9",colors:["#111111","#555555"],bg:"#f2f2f2"},theme:{bg:"#f2f2f2",accent:"#111"}}},setup(ctx){let p=ctx.params,c=canvas2d(ctx),rnd=ctx.random,bricks=[],cols=0,rows=0,s=0,ox=0,oy=0,build=()=>{cols=40,rows=16,s=Math.floor(Math.min(c.w*.86/cols,c.h*.6/rows)),ox=Math.floor((c.w-cols*s)/2),oy=Math.floor(c.h*.05);let bm=codeBitmap(ctx.copy.code||"404",36,13,900),used=new Uint8Array(468);bricks=[];for(let y=0;y<13;y++)for(let x=0;x<36;x++){if(!bm[y*36+x]||used[y*36+x])continue;let w=1;for(let tw of[4,3,2]){let ok=x+tw<=36;for(let k=0;ok&&k<tw;k++)ok=!!bm[y*36+x+k]&&!used[y*36+x+k];if(ok){w=tw;break}}for(let k=0;k<w;k++)used[y*36+x+k]=1;bricks.push({x:x+2,y:y+1.5,w,col:p.colors[Math.floor(rnd()*p.colors.length)]})}bricks.sort(()=>rnd()-.5)};build();let stud=(g,x,y,col)=>{g.fillStyle=rgba("#000000",.25),g.beginPath(),g.arc(x+s*.06,y+s*.08,s*.3,0,Math.PI*2),g.fill(),g.fillStyle=col,g.beginPath(),g.arc(x,y,s*.3,0,Math.PI*2),g.fill(),g.fillStyle=rgba("#ffffff",.35),g.beginPath(),g.arc(x-s*.08,y-s*.08,s*.12,0,Math.PI*2),g.fill()};return{resize(){c.reset(),build()},frame(t){let g=c.g;c.reset(),g.fillStyle=p.bg,g.fillRect(0,0,c.w,c.h),g.fillStyle=rgba("#000000",.15),g.fillRect(ox+8,oy+10,cols*s,rows*s),g.fillStyle=p.plate,g.fillRect(ox,oy,cols*s,rows*s);for(let y=0;y<rows;y++)for(let x=0;x<cols;x++)stud(g,ox+(x+.5)*s,oy+(y+.5)*s,p.plate);let ct=ctx.reducedMotion?99:t%14,n=Math.min(bricks.length,Math.floor(ct*40));for(let i=0;i<n;i++){let b=bricks[i],age=ct-i/40,drop=Math.max(0,1-age*6),x=ox+b.x*s,y=oy+b.y*s-drop*s*2.5;g.fillStyle=rgba("#000000",.28*(1-drop)),g.fillRect(x+s*.12,y+s*.18+drop*s*2.5,b.w*s,s),g.fillStyle=b.col,g.fillRect(x,y,b.w*s-1,s-1),g.fillStyle=rgba("#000000",.12),g.fillRect(x,y+s-4,b.w*s-1,3);for(let k=0;k<b.w;k++)stud(g,x+(k+.5)*s,y+s*.5,b.col)}}}}};export{bricks_default as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var broken_link_default={id:"broken-link",name:"Broken Link",description:"A minimal line illustration of a snapped chain link above the text. Says \u201Cbroken link\u201D without a single word.",category:"Simple",kind:"2d",motion:"live",tags:["simple","illustration","line-art","link","chain","fast","light"],layout:"center",copy:{eyebrow:"404",title:"This link is broken",message:"The page it pointed to has moved or no longer exists.",actions:[{label:"Back to home",href:"/"}]},params:{line:"#111827",swing:!0},theme:{bg:"#ffffff",fg:"#111827",accent:"#111827","accent-fg":"#ffffff"},presetName:"Ink",presets:{dark:{name:"Dark",params:{line:"#e5e7eb"},theme:{bg:"#0c0d10",fg:"#e5e7eb",accent:"#e5e7eb","accent-fg":"#0c0d10"}},teal:{name:"Teal",params:{line:"#0f766e"},theme:{bg:"#f0fdfa",fg:"#134e4a",accent:"#0f766e","accent-fg":"#fff"}}},css:`
|
|
2
|
+
& .bl{width:clamp(130px,18cqw,200px);margin:0 auto clamp(18px,4cqh,36px);pointer-events:none}
|
|
3
|
+
& .lp-stage>.bl{position:absolute;left:50%;top:20%;translate:-50% 0}
|
|
4
|
+
& .bl svg{width:100%;overflow:visible;fill:none;stroke:var(--ln);stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
|
|
5
|
+
& .bl .sp{stroke-width:3;opacity:.6}
|
|
6
|
+
& .lp-code{display:none}
|
|
7
|
+
& .lp-title{font-weight:700;font-size:clamp(26px,4cqw,44px)}
|
|
8
|
+
`,setup(ctx){let el=document.createElement("div");el.className="bl",el.style.setProperty("--ln",ctx.params.line),el.innerHTML=`<svg viewBox="0 0 200 100" aria-hidden="true">
|
|
9
|
+
<g class="l"><path d="M88 34H52a16 16 0 0 0 0 32h36"/><path d="M60 50h20"/></g>
|
|
10
|
+
<g class="r"><path d="M112 34h36a16 16 0 0 1 0 32h-36"/><path d="M120 50h20"/></g>
|
|
11
|
+
<g class="sp"><path d="M100 18v8M88 22l4 6M112 22l-4 6M100 82v-8M88 78l4-6M112 78l-4-6"/></g></svg>`,(ctx.overlay?.querySelector(".lp-head")??ctx.stage).prepend(el);let l=el.querySelector(".l"),r=el.querySelector(".r");return{frame(t){if(!ctx.params.swing)return;let a=Math.sin(t*1.4)*5;l.setAttribute("transform",`translate(${-Math.abs(a)} 0) rotate(${-a} 88 50)`),r.setAttribute("transform",`translate(${Math.abs(a)} 0) rotate(${a} 112 50)`)},destroy:()=>el.remove()}}};export{broken_link_default as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{actions,esc,layer,sr}from"../chunks/chunk-ES56TX4X.js";import"../chunks/chunk-B2NBRLO2.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var brutalist_default={id:"brutalist",name:"Brutalist",description:"Neo-brutalism: thick black borders, hard offset shadows, a loud colour block and chunky buttons that press in when you click.",category:"Simple",kind:"2d",motion:"static",tags:["simple","brutalism","neo-brutalist","bold","loud","static","fast","light"],layout:"none",copy:{eyebrow:"Whoops",title:"This page took a wrong turn.",message:"We broke something, or you typed something. Either way, nothing lives here.",actions:[{label:"Get me out",href:"/",icon:"none"},{label:"Report it",href:"/contact",variant:"secondary",icon:"none"}]},params:{block:"#ffde59",shadow:8},theme:{bg:"#fdf6e3",fg:"#111111",accent:"#ff6b6b","accent-fg":"#111111",font:'"Space Grotesk","Archivo","Inter",system-ui,sans-serif'},presetName:"Yellow",presets:{pink:{name:"Pink",params:{block:"#ff90e8"},theme:{bg:"#f4f4f0",accent:"#23a094","accent-fg":"#111"}},blue:{name:"Blue",params:{block:"#7aa2ff"},theme:{bg:"#fffbeb",accent:"#ffde59"}},green:{name:"Green",params:{block:"#b8f35e",shadow:6},theme:{bg:"#ffffff",accent:"#111","accent-fg":"#b8f35e"}}},css:`
|
|
2
|
+
& .br{position:absolute;inset:0;display:grid;place-items:center;padding:20px;overflow:auto}
|
|
3
|
+
& .br .box{width:min(640px,100%);border:3px solid #111;background:var(--lp-bg);box-shadow:var(--sh) var(--sh) 0 #111;padding:clamp(20px,4cqw,40px)}
|
|
4
|
+
& .br .num{display:inline-block;background:var(--blk);border:3px solid #111;box-shadow:calc(var(--sh) / 2) calc(var(--sh) / 2) 0 #111;padding:2px 18px;
|
|
5
|
+
font-weight:800;font-size:clamp(64px,12cqw,128px);line-height:1;letter-spacing:-.05em;transform:rotate(-2deg)}
|
|
6
|
+
& .br .ey{display:block;margin-top:26px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;font-size:13px}
|
|
7
|
+
& .br h1{margin:8px 0 0;font-size:clamp(26px,4.2cqw,46px);font-weight:800;line-height:1.05;letter-spacing:-.03em}
|
|
8
|
+
& .br p{margin:14px 0 0;font-size:16px;line-height:1.5;max-width:46ch}
|
|
9
|
+
& .br .lp-actions{justify-content:flex-start;gap:14px}
|
|
10
|
+
& .br .lp-btn{border:3px solid #111;border-radius:0;padding:12px 20px;font-weight:800;font-size:15px;box-shadow:4px 4px 0 #111;transition:transform .08s,box-shadow .08s}
|
|
11
|
+
& .br .lp-btn--primary{background:var(--lp-accent);color:var(--lp-accent-fg)}
|
|
12
|
+
& .br .lp-btn--secondary{background:#fff;color:#111}
|
|
13
|
+
& .br .lp-btn:hover{transform:translate(-2px,-2px);box-shadow:6px 6px 0 #111}
|
|
14
|
+
& .br .lp-btn:active{transform:translate(4px,4px);box-shadow:0 0 0 #111}
|
|
15
|
+
`,setup(ctx){let c=ctx.copy,el=layer(ctx,"br",`<div class="box"><span class="num" aria-hidden="true">${esc(c.code)}</span><span class="ey">${esc(c.eyebrow)}</span><h1>${sr(c.code)}${esc(c.title)}</h1><p>${esc(c.message)}</p></div>`,{blk:ctx.params.block,sh:ctx.params.shadow+"px"});return el.querySelector(".box").append(actions(ctx)),{destroy:()=>el.remove()}}};export{brutalist_default as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{codeBitmap}from"../chunks/chunk-MNUNTC4L.js";import{canvas2d}from"../chunks/chunk-DAZOIOF7.js";import{rgba}from"../chunks/chunk-FVGCB66F.js";import"../chunks/chunk-3ISI6SOJ.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var bubble_wrap_default={id:"bubble-wrap",name:"Bubble Wrap",description:"A sheet of bubble wrap with the error printed into it. Pop every bubble you like. It's very satisfying and changes nothing.",category:"Playful",kind:"2d",motion:"interactive",tags:["canvas","toy","satisfying","interactive","light","tactile","funny"],layout:"bottom",codeInScene:!0,copy:{eyebrow:"Stress relief",title:"Pop a few. The page is still gone.",message:"We packed this page very carefully. It got lost in shipping anyway.",actions:[{label:"Unwrap the homepage",href:"/",variant:"primary"}]},params:{bg:"#d9e4ec",film:"#ffffff",ink:"#ff4d6d",size:34},theme:{bg:"#d9e4ec",fg:"#13202b",accent:"#13202b","accent-fg":"#fff"},presetName:"Clear",presets:{mint:{name:"Mint",params:{bg:"#d9f5ea",film:"#ffffff",ink:"#0f8a5a"},theme:{bg:"#d9f5ea",fg:"#0a2e20",accent:"#0a2e20"}},pink:{name:"Pink Mailer",params:{bg:"#ffd1e0",film:"#ffffff",ink:"#7a1f4a"},theme:{bg:"#ffd1e0",fg:"#3a0d22",accent:"#3a0d22"}},kraft:{name:"Kraft Box",params:{bg:"#c9a273",film:"#fff8ec",ink:"#1f6feb"},theme:{bg:"#c9a273",fg:"#2a1a0a",accent:"#2a1a0a"}},night:{name:"Midnight",params:{bg:"#10131c",film:"#9fb4ff",ink:"#ffd23f"},theme:{bg:"#10131c",fg:"#eef2ff",accent:"#eef2ff","accent-fg":"#10131c"}}},setup(ctx){let p=ctx.params,c=canvas2d(ctx),bubbles=[],pops=[],count=0,build=()=>{bubbles=[];let s=p.size*Math.max(.75,Math.min(1.1,c.w/1440)),cols=Math.floor(c.w/s)+1,rows=Math.floor(c.h*.66/(s*.87))+1,bw=Math.round(cols*.8),bh=Math.round(rows*.6),bm=codeBitmap(ctx.copy.code||"404",bw,bh,900),bx=Math.floor((cols-bw)/2),by=Math.floor(rows*.12);for(let r=0;r<rows;r++)for(let q=0;q<cols;q++){let inB=q>=bx&&q<bx+bw&&r>=by&&r<by+bh&&bm[(r-by)*bw+(q-bx)];bubbles.push({x:q*s+(r%2?s/2:0),y:r*s*.87+s*.5,r:s*.4,code:inB,popped:0,wob:Math.random()*6})}};build();let popAt=(x,y)=>{for(let b of bubbles)if(!b.popped&&Math.hypot(b.x-x,b.y-y)<b.r){b.popped=1,count++,pops.push({x:b.x,y:b.y,life:.35}),ctx.invalidate();break}},down=!1;return ctx.on("pointerdown",e=>{e.target.closest("a,button")||(down=!0,popAt(ctx.pointer.x,ctx.pointer.y))}),ctx.onWindow("pointerup",()=>down=!1),ctx.on("pointermove",()=>down&&popAt(ctx.pointer.x,ctx.pointer.y)),{resize(){c.reset(),build()},frame(t,dt){let g=c.g;c.reset(),g.fillStyle=p.bg,g.fillRect(0,0,c.w,c.h),g.fillStyle=rgba(p.film,.18),g.fillRect(0,0,c.w,c.h*.7);for(let b of bubbles){let near=ctx.pointer.inside?Math.max(0,1-Math.hypot(b.x-ctx.pointer.x,b.y-ctx.pointer.y)/60):0,r=b.r*(b.popped?.9:1+near*.05+Math.sin(t*2+b.wob)*.008);if(b.popped){g.strokeStyle=rgba(p.film,.5),g.lineWidth=1,g.beginPath();for(let k=0;k<=8;k++){let a=k/8*Math.PI*2,rr=r*(.7+(k*37+Math.floor(b.x))%5*.06);k?g.lineTo(b.x+Math.cos(a)*rr,b.y+Math.sin(a)*rr):g.moveTo(b.x+Math.cos(a)*rr,b.y+Math.sin(a)*rr)}g.stroke();continue}let grd=g.createRadialGradient(b.x-r*.35,b.y-r*.4,r*.05,b.x,b.y,r);grd.addColorStop(0,rgba("#ffffff",.95)),grd.addColorStop(.25,rgba(p.film,.45)),grd.addColorStop(.85,rgba(b.code?p.ink:p.film,b.code?.75:.22)),grd.addColorStop(1,rgba("#000000",.18)),g.fillStyle=grd,g.beginPath(),g.arc(b.x,b.y,r,0,Math.PI*2),g.fill(),g.strokeStyle=rgba("#ffffff",.55),g.lineWidth=1,g.stroke()}for(let q of pops){q.life-=dt||.016,g.strokeStyle=rgba(p.ink,Math.max(0,q.life*2.4)),g.lineWidth=2;for(let k=0;k<6;k++){let a=k/6*Math.PI*2,r1=(.35-q.life)*120+10;g.beginPath(),g.moveTo(q.x+Math.cos(a)*r1*.6,q.y+Math.sin(a)*r1*.6),g.lineTo(q.x+Math.cos(a)*r1,q.y+Math.sin(a)*r1),g.stroke()}}pops=pops.filter(q=>q.life>0),g.fillStyle=rgba(p.ink,.8),g.font="700 12px ui-monospace,Menlo,monospace",g.textAlign="right",g.fillText(`${count} popped`,c.w-16,c.h*.7+18)}}}};export{bubble_wrap_default as default};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import{shaderScene}from"../chunks/chunk-B4TY5M55.js";import{HASH,NOISE,POST}from"../chunks/chunk-SH72TE6I.js";import{linear}from"../chunks/chunk-FVGCB66F.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var FRAG=`
|
|
2
|
+
uniform vec3 uSkyTop, uSkyBottom, uGround, uTrees, uFire;
|
|
3
|
+
uniform float uEmbers, uTent;
|
|
4
|
+
${HASH}
|
|
5
|
+
${NOISE}
|
|
6
|
+
${POST}
|
|
7
|
+
|
|
8
|
+
float pine(vec2 p, float h) {
|
|
9
|
+
float w = (1.0 - clamp(p.y / h, 0.0, 1.0)) * h * 0.32 * (0.82 + 0.18 * abs(sin(p.y / h * 18.0)));
|
|
10
|
+
return step(abs(p.x), w) * step(0.0, p.y) * step(p.y, h);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
void main() {
|
|
14
|
+
vec2 fc = gl_FragCoord.xy;
|
|
15
|
+
vec2 uv = fc / uRes;
|
|
16
|
+
vec2 p = (fc - 0.5 * uRes) / uRes.y + uMouse * vec2(0.015, 0.008);
|
|
17
|
+
float t = uTime;
|
|
18
|
+
float groundY = -0.18;
|
|
19
|
+
vec3 col = mix(uSkyBottom, uSkyTop, smoothstep(-0.2, 0.6, p.y));
|
|
20
|
+
// stars + milky way band
|
|
21
|
+
vec2 g = p * 160.0;
|
|
22
|
+
vec2 id = floor(g);
|
|
23
|
+
vec2 f = fract(g) - 0.5 - (hash22(id) - 0.5) * 0.7;
|
|
24
|
+
float st = smoothstep(0.1, 0.0, length(f)) * step(0.975, hash12(id)) * (0.6 + 0.4 * sin(t * 2.0 + hash12(id) * 40.0));
|
|
25
|
+
col += vec3(0.9, 0.92, 1.0) * st * smoothstep(-0.05, 0.3, p.y);
|
|
26
|
+
float band = exp(-pow((p.y - p.x * 0.35 - 0.25) * 4.0, 2.0)) * fbm(p * 6.0);
|
|
27
|
+
col += vec3(0.5, 0.55, 0.8) * band * 0.25;
|
|
28
|
+
// treeline silhouettes, two layers
|
|
29
|
+
float far = 0.0;
|
|
30
|
+
for (int i = 0; i < 2; i++) {
|
|
31
|
+
float fi = float(i);
|
|
32
|
+
float sc = 22.0 - fi * 8.0;
|
|
33
|
+
float x = p.x * sc;
|
|
34
|
+
float cell = floor(x);
|
|
35
|
+
float hx = hash11(cell + fi * 10.0);
|
|
36
|
+
float h = (0.12 + 0.12 * hx) * sc * (0.6 + fi * 0.4);
|
|
37
|
+
vec2 q = vec2(fract(x) - 0.5, (p.y - groundY + 0.02 - fi * 0.0) * sc);
|
|
38
|
+
float tr = pine(q, h * 0.25);
|
|
39
|
+
vec3 tc = mix(uTrees, uSkyBottom, 0.5 - fi * 0.45);
|
|
40
|
+
col = mix(col, tc, tr);
|
|
41
|
+
}
|
|
42
|
+
// ground
|
|
43
|
+
if (p.y < groundY) col = uGround * (0.7 + 0.3 * fbm(p * 30.0));
|
|
44
|
+
// the fire
|
|
45
|
+
vec2 fp = p - vec2(0.0, groundY);
|
|
46
|
+
float flick = 0.85 + 0.15 * sin(t * 13.0) * sin(t * 7.3);
|
|
47
|
+
// logs
|
|
48
|
+
float logs = step(abs(mat2(0.94, 0.34, -0.34, 0.94) * fp - vec2(0.0, 0.012)).x, 0.11) * step(abs((mat2(0.94, 0.34, -0.34, 0.94) * fp).y - 0.012), 0.012);
|
|
49
|
+
logs = max(logs, step(abs((mat2(0.94, -0.34, 0.34, 0.94) * fp).x), 0.11) * step(abs((mat2(0.94, -0.34, 0.34, 0.94) * fp).y - 0.012), 0.012));
|
|
50
|
+
// flame shape: noise-displaced teardrop
|
|
51
|
+
vec2 q = fp;
|
|
52
|
+
q.x += (fbm(vec2(q.y * 8.0 - t * 2.0, t)) - 0.5) * 0.06 * smoothstep(0.0, 0.2, q.y);
|
|
53
|
+
float n = fbm(vec2(q.x * 9.0, q.y * 6.0 - t * 3.5));
|
|
54
|
+
float shape = smoothstep(0.09, 0.0, abs(q.x) - (0.07 - q.y * 0.28)) * smoothstep(-0.01, 0.02, q.y) * smoothstep(0.28, 0.05, q.y + n * 0.08);
|
|
55
|
+
float heat = shape * (0.6 + 0.6 * n) * flick;
|
|
56
|
+
vec3 fireCol = mix(uFire, vec3(1.0, 0.95, 0.7), smoothstep(0.5, 1.0, heat));
|
|
57
|
+
fireCol = mix(vec3(0.6, 0.08, 0.02), fireCol, smoothstep(0.15, 0.45, heat));
|
|
58
|
+
// light from the fire on the ground and trees
|
|
59
|
+
float lightR = length(fp * vec2(1.0, 2.2));
|
|
60
|
+
vec3 glow = uFire * flick * 0.55 / (1.0 + lightR * lightR * 60.0);
|
|
61
|
+
col += glow * (p.y < groundY + 0.02 ? 1.4 : 0.5);
|
|
62
|
+
col = mix(col, vec3(0.08, 0.04, 0.02), logs);
|
|
63
|
+
col += fireCol * heat * 2.2;
|
|
64
|
+
// tent, lit on one side
|
|
65
|
+
if (uTent > 0.5) {
|
|
66
|
+
vec2 tp = p - vec2(-0.42, groundY);
|
|
67
|
+
float tri = step(abs(tp.x), (0.2 - tp.y) * 0.95) * step(0.0, tp.y) * step(tp.y, 0.2);
|
|
68
|
+
vec3 tcol = vec3(0.22, 0.32, 0.25) * (0.35 + 1.6 * glow.r * (1.0 + tp.x * 3.0));
|
|
69
|
+
float door = step(abs(tp.x + 0.0), (0.12 - tp.y) * 0.45) * step(0.0, tp.y) * step(tp.y, 0.12);
|
|
70
|
+
tcol = mix(tcol, vec3(0.03), door);
|
|
71
|
+
col = mix(col, tcol, tri);
|
|
72
|
+
}
|
|
73
|
+
// rising embers
|
|
74
|
+
for (int i = 0; i < 40; i++) {
|
|
75
|
+
float fi = float(i);
|
|
76
|
+
if (fi > uEmbers) break;
|
|
77
|
+
float life = fract(t * (0.12 + hash11(fi) * 0.15) + hash11(fi * 7.0));
|
|
78
|
+
vec2 ep = vec2((hash11(fi * 3.0) - 0.5) * 0.1 + sin(life * 9.0 + fi) * 0.05 * life, groundY + 0.05 + life * 0.6);
|
|
79
|
+
float d = length(p - ep);
|
|
80
|
+
col += uFire * (1.0 - life) * smoothstep(0.004, 0.0, d) * 2.0;
|
|
81
|
+
col += uFire * (1.0 - life) * 0.04 * exp(-d * 120.0);
|
|
82
|
+
}
|
|
83
|
+
col = toSRGB(aces(col * 1.1));
|
|
84
|
+
col *= mix(0.65, 1.0, vignette(uv, 0.3));
|
|
85
|
+
col += grain(fc, t) * 0.02;
|
|
86
|
+
fragColor = vec4(col, 1.0);
|
|
87
|
+
}
|
|
88
|
+
`,campfire_default={id:"campfire",name:"Campfire",description:"Lost in the woods at night. A crackling fire, embers drifting up into a sky full of stars, and a tent waiting.",category:"Nature",kind:"2d",motion:"live",tags:["webgl","fire","camping","night","stars","cozy","nature"],layout:"top",copy:{eyebrow:"Off the trail",title:"Lost in the woods.",message:"The trail to this page has gone cold. Warm up by the fire, then follow the path home.",actions:[{label:"Follow the trail home",href:"/",variant:"primary"}]},params:{skyTop:"#020414",skyBottom:"#0f1a33",ground:"#0b0906",trees:"#020406",fire:"#ff7a1f",embers:40,tent:!0},theme:{bg:"#050814",fg:"#ffeedd",accent:"#ff9a4a","accent-fg":"#1a0a00","code-color":"rgba(255,238,221,.16)"},presetName:"Pine Forest",presets:{autumn:{name:"Autumn Woods",params:{skyTop:"#0a0618",skyBottom:"#3a1f2a",trees:"#0a0505",fire:"#ff8a1f"},theme:{bg:"#1a0d12"}},green:{name:"Witch Fire",eyebrow:"Something brews",params:{fire:"#7dff3b",skyBottom:"#0a1a12"},theme:{accent:"#b8ff8a","accent-fg":"#031400"}},desert:{name:"Desert Camp",params:{skyTop:"#0a0618",skyBottom:"#3a1f3a",ground:"#2a1608",trees:"#120a08",tent:!1},theme:{bg:"#160d18"}},blue:{name:"Spirit Fire",eyebrow:"Something strange",params:{fire:"#3bb8ff"},theme:{accent:"#7fd3ff","accent-fg":"#00121f"}},winter:{name:"Winter",params:{ground:"#5a6070",skyBottom:"#1d2a44",trees:"#05080d"},theme:{bg:"#0e1626"}}},css:"& .lp-overlay{padding-top:clamp(28px,7cqh,80px)}& .lp-code{--lp-code-size:clamp(80px,12cqw,170px);font-weight:300}",setup(ctx){let p=ctx.params;return shaderScene(ctx,{frag:FRAG,uniforms:()=>({uSkyTop:linear(p.skyTop),uSkyBottom:linear(p.skyBottom),uGround:linear(p.ground),uTrees:linear(p.trees),uFire:linear(p.fire),uEmbers:p.embers,uTent:p.tent?1:0})})}};export{campfire_default as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{actions,esc,layer,sr}from"../chunks/chunk-ES56TX4X.js";import"../chunks/chunk-B2NBRLO2.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var ICONS={compass:'<circle cx="12" cy="12" r="9"/><path d="m15.5 8.5-2 5-5 2 2-5z"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="m20 20-4.2-4.2M9 9l4 4M13 9l-4 4"/>',link:'<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1M4 4l16 16"/>',alert:'<path d="M12 3 2 20h20zM12 10v4M12 17v.5"/>'},card_default={id:"card",name:"Card",description:"A centred card with an icon badge, headline, message and buttons. Fits inside any dashboard or app shell without fighting its design.",category:"Simple",kind:"2d",motion:"static",tags:["simple","card","app","dashboard","saas","static","fast"],layout:"none",copy:{title:"Page not found",message:"The page you\u2019re looking for doesn\u2019t exist or you don\u2019t have access to it.",actions:[{label:"Back to dashboard",href:"/"},{label:"Get help",href:"/help",variant:"secondary",icon:"arrow"}]},params:{page:"#f4f5f7",icon:"compass"},theme:{bg:"#ffffff",fg:"#101828",accent:"#101828","accent-fg":"#ffffff",radius:"10px"},presetName:"Light",presets:{dark:{name:"Dark",params:{page:"#09090b"},theme:{bg:"#18181b",fg:"#fafafa",accent:"#fafafa","accent-fg":"#18181b"}},search:{name:"Search icon",params:{page:"#eef4ff",icon:"search"},theme:{accent:"#2563eb","accent-fg":"#fff"}},broken:{name:"Broken link",title:"This link is broken",params:{page:"#fff7ed",icon:"link"},theme:{accent:"#ea580c","accent-fg":"#fff"}}},css:`
|
|
2
|
+
&{background:var(--page)}
|
|
3
|
+
& .cr{position:absolute;inset:0;display:grid;place-items:center;padding:16px;overflow:auto}
|
|
4
|
+
& .cr .box{width:min(440px,100%);background:var(--lp-bg);border-radius:16px;padding:clamp(24px,4cqw,40px);text-align:center;
|
|
5
|
+
border:1px solid color-mix(in srgb,var(--lp-fg) 9%,transparent);box-shadow:0 1px 2px rgba(16,24,40,.05),0 20px 40px -20px rgba(16,24,40,.18)}
|
|
6
|
+
& .cr .ic{width:52px;height:52px;margin:0 auto 18px;border-radius:14px;display:grid;place-items:center;
|
|
7
|
+
background:color-mix(in srgb,var(--lp-accent) 10%,transparent);color:var(--lp-accent);outline:8px solid color-mix(in srgb,var(--lp-accent) 5%,transparent)}
|
|
8
|
+
& .cr .ic svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
|
|
9
|
+
& .cr .code{font-size:12.5px;font-weight:600;color:var(--lp-muted)}
|
|
10
|
+
& .cr h1{margin:6px 0 0;font-size:clamp(22px,2.6cqw,28px);font-weight:700;letter-spacing:-.02em}
|
|
11
|
+
& .cr p{margin:10px 0 0;color:var(--lp-muted);font-size:14.5px;line-height:1.6}
|
|
12
|
+
& .cr .lp-actions{margin-top:26px;flex-direction:column-reverse;gap:10px;align-items:stretch}
|
|
13
|
+
& .cr .lp-btn{justify-content:center;font-weight:600}
|
|
14
|
+
& .cr .lp-btn--secondary{border:1px solid color-mix(in srgb,var(--lp-fg) 16%,transparent);border-radius:var(--lp-radius);padding:12px 20px}
|
|
15
|
+
`,setup(ctx){let c=ctx.copy;ctx.root.style.setProperty("--page",ctx.params.page);let el=layer(ctx,"cr",`<div class="box"><div class="ic" aria-hidden="true"><svg viewBox="0 0 24 24">${ICONS[ctx.params.icon]??ICONS.compass}</svg></div><span class="code">Error ${esc(c.code)}</span><h1>${sr(c.code)}${esc(c.title)}</h1><p>${esc(c.message)}</p></div>`);return el.querySelector(".box").append(actions(ctx)),{destroy:()=>el.remove()}}};export{card_default as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var esc=s=>s.replace(/[&<>"]/g,c=>({"&":"&","<":"<",">":">",'"':"""})[c]),cassette_default={id:"cassette",name:"Mixtape",description:"A cassette whose tape has come unspooled in a long tangle. The reels still turn, but this side of the mixtape won't play.",category:"Retro Tech",kind:"2d",motion:"live",tags:["svg","cassette","retro","80s","music","nostalgia","illustration"],layout:"bottom",codeInScene:!0,copy:{eyebrow:"Side B",title:"This track got chewed up.",message:"The tape for this page tangled in the deck. Grab a pencil, or just rewind to the homepage.",actions:[{label:"Rewind to home",href:"/",variant:"primary"}]},params:{shell:"#1d1d22",label:"#ffd23f",ink:"#1d1d22",bg:"#ff6b6b",tape:"#3a2a1a"},theme:{bg:"#ff6b6b",fg:"#1d1d22",accent:"#1d1d22","accent-fg":"#fff"},presetName:"Hot Coral",presets:{clear:{name:"Clear Shell",params:{shell:"#d9e2ec",label:"#ffffff",ink:"#1b3a5a",bg:"#9fd3ff",tape:"#2a1a10"},theme:{bg:"#9fd3ff",fg:"#0b2340",accent:"#0b2340"}},synth:{name:"Synthwave",params:{shell:"#120a24",label:"#ff3bd4",ink:"#120a24",bg:"#2a0f4a",tape:"#3bd6ff"},theme:{bg:"#2a0f4a",fg:"#ffe6fb",accent:"#ff3bd4","accent-fg":"#fff"}},mint:{name:"Mint",params:{shell:"#f4f1ea",label:"#2ec4b6",ink:"#1d1d22",bg:"#cbf3f0",tape:"#3a2a1a"},theme:{bg:"#cbf3f0",fg:"#0a2a26",accent:"#0a2a26"}}},css:`& .cs{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;padding-top:clamp(16px,5cqh,56px)}
|
|
2
|
+
& .cs svg{width:min(540px,78cqw);height:auto;overflow:visible;filter:drop-shadow(0 26px 30px rgba(0,0,0,.28))}`,setup(ctx){let p=ctx.params,wrap=document.createElement("div");wrap.className="cs",wrap.style.background=p.bg,wrap.setAttribute("aria-hidden","true");let reel=cx=>`<g transform="translate(${cx} 150)"><circle r="34" fill="#f4f4f4"/><circle r="30" fill="${p.tape}"/><g data-reel>${Array.from({length:6},(_,i)=>`<rect x="-3" y="-18" width="6" height="9" fill="#f4f4f4" transform="rotate(${i*60})"/>`).join("")}<circle r="10" fill="#f4f4f4"/></g></g>`;wrap.innerHTML=`<svg viewBox="0 0 600 420">
|
|
3
|
+
<path data-tape d="" fill="none" stroke="${p.tape}" stroke-width="5" stroke-linecap="round"/>
|
|
4
|
+
<rect x="10" y="10" width="580" height="370" rx="24" fill="${p.shell}"/>
|
|
5
|
+
<rect x="40" y="36" width="520" height="200" rx="10" fill="${p.label}"/>
|
|
6
|
+
<rect x="40" y="36" width="520" height="34" rx="10" fill="rgba(0,0,0,.12)"/>
|
|
7
|
+
<text x="60" y="60" font-family="Marker Felt,Comic Sans MS,cursive" font-size="20" fill="${p.ink}">MIXTAPE ${esc(ctx.copy.code)} \xB7 SIDE B</text>
|
|
8
|
+
<path d="M60 220 H540" stroke="${p.ink}" stroke-opacity=".3"/>
|
|
9
|
+
<rect x="150" y="110" width="300" height="80" rx="40" fill="#111"/>
|
|
10
|
+
${reel(210)}${reel(390)}
|
|
11
|
+
<rect x="250" y="135" width="100" height="30" rx="4" fill="rgba(255,255,255,.08)"/>
|
|
12
|
+
<path d="M120 380 L150 300 H450 L480 380 Z" fill="rgba(0,0,0,.25)"/>
|
|
13
|
+
${[170,230,300,370,430].map(x=>`<circle cx="${x}" cy="350" r="7" fill="#111"/>`).join("")}
|
|
14
|
+
<circle cx="40" cy="350" r="9" fill="rgba(255,255,255,.18)"/><circle cx="560" cy="350" r="9" fill="rgba(255,255,255,.18)"/>
|
|
15
|
+
</svg>`,ctx.stage.append(wrap);let reels=[...wrap.querySelectorAll("[data-reel]")],tape=wrap.querySelector("[data-tape]");return{frame(t){reels.forEach((r,i)=>r.setAttribute("transform",`rotate(${t*(i?80:110)})`));let sw=Math.sin(t*.9)*18,sw2=Math.cos(t*.7)*24;tape.setAttribute("d",`M260 372 C 240 440, ${150+sw} 430, ${120+sw} 470 S ${180+sw2} 520, ${300+sw} 490 S ${450-sw2} 430, ${480+sw} 470 S ${420+sw2} 520, 340 372`)},destroy(){wrap.remove()}}}};export{cassette_default as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{canvas2d}from"../chunks/chunk-DAZOIOF7.js";import{rgba}from"../chunks/chunk-FVGCB66F.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var HAND='"Chalkboard SE","Chalkduster","Marker Felt","Comic Sans MS","Segoe Print",cursive',chalkboard_default={id:"chalkboard",name:"Chalkboard",description:"A classroom blackboard where the lesson is the error: the 404 drawn in chalk, a little equation to prove it, and smudges where someone tried to erase it.",category:"Paper & Print",kind:"2d",motion:"live",tags:["canvas","chalk","school","handwritten","math","retro","education"],layout:"none",copy:{title:"Today's lesson: page not found.",message:"Homework: go back to the homepage.",actions:[{label:"Class dismissed",href:"/",variant:"primary"}]},params:{board:"#22352b",chalk:"#f2f2ea",frame:"#6b4a2a",accent:"#ffd76b"},theme:{bg:"#22352b",fg:"#f2f2ea",accent:"#f2f2ea","accent-fg":"#22352b"},presetName:"Green Board",presets:{black:{name:"Blackboard",params:{board:"#1d1f22",chalk:"#f4f4f0",frame:"#8a6a4a",accent:"#ff9ec4"},theme:{bg:"#1d1f22"}},blue:{name:"Blue Board",params:{board:"#1f3550",chalk:"#eef4ff",frame:"#a8a8a8",accent:"#ffe14d"},theme:{bg:"#1f3550"}},white:{name:"Whiteboard",params:{board:"#f4f6f8",chalk:"#1d4fc4",frame:"#c9ced6",accent:"#e5484d"},theme:{bg:"#f4f6f8",fg:"#1d4fc4",accent:"#1d4fc4","accent-fg":"#fff"}}},css:`& .cb-links{position:absolute;right:clamp(28px,7cqw,90px);bottom:clamp(40px,10cqh,110px);display:flex;flex-direction:column;align-items:flex-end;gap:8px;z-index:3}
|
|
2
|
+
& .cb-links a{font:400 clamp(18px,1.8cqw,26px)/1.2 ${HAND};color:var(--lp-fg);text-decoration:none;border-bottom:2px dashed currentColor;opacity:.92}
|
|
3
|
+
& .cb-links a:hover{opacity:1}`,setup(ctx){let p=ctx.params,c=canvas2d(ctx),rnd=ctx.random,copy=ctx.copy,board,links=document.createElement("div");links.className="cb-links";let esc=s=>s.replace(/[&<>"]/g,ch=>({"&":"&","<":"<",">":">",'"':"""})[ch]);links.innerHTML=`<h1 class="lp-sr">Error ${esc(copy.code)}: ${esc(copy.title)}</h1>`+copy.actions.map(a=>`<a href="${esc(a.href??"/")}">${esc(a.label)} \u2192</a>`).join(""),ctx.root.append(links),links.querySelectorAll("a").forEach(a=>a.addEventListener("click",e=>{e.metaKey||e.ctrlKey||(e.preventDefault(),ctx.navigate(a.getAttribute("href"),e))}));let build=()=>{let s=Math.min(2,ctx.dpr);board=document.createElement("canvas"),board.width=c.w*s,board.height=c.h*s;let g=board.getContext("2d");g.scale(s,s),g.fillStyle=p.frame,g.fillRect(0,0,c.w,c.h);let m=Math.max(14,c.w*.018);g.fillStyle=p.board,g.fillRect(m,m,c.w-m*2,c.h-m*2.6);for(let i=0;i<26;i++){let x=rnd()*c.w,y=rnd()*c.h,r=40+rnd()*160,grd=g.createRadialGradient(x,y,0,x,y,r);grd.addColorStop(0,rgba(p.chalk,.05)),grd.addColorStop(1,rgba(p.chalk,0)),g.fillStyle=grd,g.fillRect(x-r,y-r,r*2,r*2)}for(let i=0;i<c.w*c.h/30;i++)g.fillStyle=rgba(p.chalk,rnd()*.04),g.fillRect(rnd()*c.w,rnd()*c.h,1,1);g.fillStyle=rgba("#000000",.25),g.fillRect(m,c.h-m*1.6,c.w-m*2,m*.4),g.fillStyle="#f4f4f0",g.fillRect(c.w*.2,c.h-m*1.9,40,7),g.fillStyle="#ff9ec4",g.fillRect(c.w*.25,c.h-m*1.9,30,7),g.fillStyle="#3a2a1a",g.fillRect(c.w*.62,c.h-m*2.4,90,16),g.fillStyle="#8a8a8a",g.fillRect(c.w*.62,c.h-m*2.4+12,90,5)};build();let chalkText=(g,text,x,y,size,k,col,align="left")=>{if(k<=0)return;g.save(),g.font=`400 ${size}px ${HAND}`,g.textAlign=align,g.textBaseline="alphabetic";let w=g.measureText(text).width,left=align==="center"?x-w/2:x;g.beginPath(),g.rect(left-10,y-size,(w+20)*k,size*1.5),g.clip(),g.fillStyle=rgba(col,.92),g.fillText(text,x,y),g.globalCompositeOperation="destination-out";for(let i=0;i<w*size/18;i++)g.fillStyle=`rgba(0,0,0,${Math.random()*.6})`,g.fillRect(left+Math.random()*w,y-size+Math.random()*size*1.2,1.4,1.4);g.restore()},layer=null,lastK=-1;return{resize(){c.reset(),build(),lastK=-1},frame(t){let g=c.g;c.reset();let k=ctx.reducedMotion?99:t,step=Math.min(Math.floor(k*20)/20,6.5);if(step!==lastK||!layer){lastK=step;let s=Math.min(2,ctx.dpr);layer=document.createElement("canvas"),layer.width=c.w*s,layer.height=c.h*s;let lg=layer.getContext("2d");lg.scale(s,s);let big=Math.min(c.w*.26,c.h*.36),prog=(a,d)=>Math.max(0,Math.min(1,(k-a)/d));chalkText(lg,copy.code,c.w*.08,c.h*.42,big,prog(.2,1.4),p.chalk),prog(1.6,.4)>0&&(lg.strokeStyle=rgba(p.accent,.85),lg.lineWidth=5,lg.beginPath(),lg.moveTo(c.w*.08,c.h*.47),lg.lineTo(c.w*.08+big*1.9*prog(1.6,.4),c.h*.47+6),lg.stroke());let fs=Math.min(c.w*.03,34);if(chalkText(lg,copy.title,c.w*.08,c.h*.58,fs,prog(2,1.4),p.chalk),chalkText(lg,`page + link \u2212 server = ${copy.code}`,c.w*.08,c.h*.66,fs*.8,prog(3.4,1.4),p.accent),chalkText(lg,copy.message,c.w*.08,c.h*.74,fs*.75,prog(4.8,1.2),p.chalk),prog(2.4,1)>0){lg.strokeStyle=rgba(p.chalk,.7),lg.lineWidth=3;let cx=c.w*.78,cy=c.h*.26;lg.beginPath(),lg.arc(cx,cy,46,0,Math.PI*2*prog(2.4,1)),lg.stroke(),prog(3.4,.4)>0&&(lg.beginPath(),lg.moveTo(cx-14,cy-10),lg.lineTo(cx-14,cy-2),lg.moveTo(cx+14,cy-10),lg.lineTo(cx+14,cy-2),lg.arc(cx,cy+26,16,Math.PI*1.15,Math.PI*1.85),lg.stroke())}}g.drawImage(board,0,0,c.w,c.h),g.drawImage(layer,0,0,c.w,c.h)},destroy(){links.remove()}}}};export{chalkboard_default as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Params {
|
|
2
|
+
tint: string;
|
|
3
|
+
tint2: string;
|
|
4
|
+
tint3: string;
|
|
5
|
+
bgTop: string;
|
|
6
|
+
bgBottom: string;
|
|
7
|
+
light: string;
|
|
8
|
+
depth: number;
|
|
9
|
+
bevel: number;
|
|
10
|
+
sway: number;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: import("..").SceneDef<Params>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{text3dScene}from"../chunks/chunk-6HZC24J2.js";import"../chunks/chunk-SH72TE6I.js";import"../chunks/chunk-FVGCB66F.js";import"../chunks/chunk-3ISI6SOJ.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var chrome_404_default={id:"chrome-404",name:"Liquid Chrome",description:"Mirror-polished 3D numerals in a photo studio. Softboxes slide across the surface and the letters reflect each other.",category:"Typography",kind:"3d",motion:"live",tags:["webgl","raymarching","chrome","metal","studio","y2k","luxury"],layout:"bottom",codeInScene:!0,copy:{eyebrow:"Error 404",title:"Polished. Perfect. Missing.",message:"We buffed every surface and still couldn't find this page.",actions:[{label:"Take me home",href:"/",variant:"primary"}]},params:{tint:"#e9edf2",tint2:"#e9edf2",tint3:"#e9edf2",bgTop:"#2a2e36",bgBottom:"#07080a",light:"#ffffff",depth:.24,bevel:.05,sway:.28},theme:{bg:"#0b0c10",accent:"#f1f3f6","accent-fg":"#0b0c10"},presetName:"Chrome",presets:{titanium:{name:"Titanium",params:{tint:"#9aa5b1",tint2:"#9aa5b1",tint3:"#9aa5b1",bgTop:"#1b2433",bgBottom:"#05070b",light:"#e6f0ff"},theme:{bg:"#0c1119",accent:"#d6e2f0","accent-fg":"#0c1119"}},emerald:{name:"Emerald Metal",params:{tint:"#3bd18a",tint2:"#3bd18a",tint3:"#3bd18a",bgTop:"#0d2a1f",bgBottom:"#020806",light:"#eafff3"},theme:{bg:"#06140e",accent:"#5ff0a8","accent-fg":"#02140b"}},ruby:{name:"Candy Red",title:"Shiny, red, and nowhere.",params:{tint:"#ff3b5c",tint2:"#ff3b5c",tint3:"#ff3b5c",bgTop:"#2a0a12",bgBottom:"#070103",light:"#ffeef1"},theme:{bg:"#14050a",accent:"#ff6b84","accent-fg":"#1a0208"}},pearl:{name:"Pearl",params:{tint:"#fff1f6",tint2:"#e9f3ff",tint3:"#f6f0ff",bgTop:"#f4f1f6",bgBottom:"#cfc8d6",light:"#ffffff"},theme:{bg:"#e4dfe9",fg:"#1d1823",accent:"#1d1823","accent-fg":"#fff"}},medals:{name:"Gold \xB7 Silver \xB7 Bronze",title:"Every medal, no page.",params:{tint:"#ffcf73",tint2:"#e9edf2",tint3:"#e8875a",bgTop:"#202530",bgBottom:"#05060a",light:"#ffffff"},theme:{bg:"#0b0d12",accent:"#ffcf73","accent-fg":"#1a1206"}},gold:{name:"24k Gold",title:"Worth its weight. Still missing.",message:"Solid gold numerals, zero pages. Let's take you somewhere real.",params:{tint:"#ffcf73",tint2:"#ffcf73",tint3:"#ffcf73",bgTop:"#2a1f12",bgBottom:"#070504",light:"#fff2d9"},theme:{bg:"#120d07",accent:"#ffd27a","accent-fg":"#1a1206"}},"rose-gold":{name:"Rose Gold",params:{tint:"#f4b8a4",tint2:"#f4b8a4",tint3:"#f4b8a4",bgTop:"#3a2a2c",bgBottom:"#0c0808",light:"#fff0ec"},theme:{bg:"#1a1112",accent:"#f7c6b6","accent-fg":"#24120f"}},"black-chrome":{name:"Black Chrome",title:"Dark matter.",message:"This page absorbed all the light. Nothing left to show.",params:{tint:"#3b3f46",tint2:"#3b3f46",tint3:"#3b3f46",bgTop:"#121317",bgBottom:"#020203",light:"#ffffff",bevel:.08},theme:{bg:"#060608",accent:"#ffffff","accent-fg":"#000"}},holo:{name:"Holographic",title:"Iridescent, and irrelevant.",message:"A shimmering 404 for a page that never was.",params:{tint:"#9ef3ff",tint2:"#f6a6ff",tint3:"#fff1a0",bgTop:"#e9e6f5",bgBottom:"#b7b3cc",light:"#ffffff"},theme:{bg:"#d8d5e8",fg:"#15131f",accent:"#15131f","accent-fg":"#fff"}},copper:{name:"Copper",params:{tint:"#e8875a",tint2:"#e8875a",tint3:"#e8875a",bgTop:"#1d2626",bgBottom:"#050707",light:"#fff4e6"},theme:{bg:"#0d1212",accent:"#f0a07a","accent-fg":"#1d0d06"}}},css:"& .lp-title{font-weight:600}",setup(ctx){let p=ctx.params;return text3dScene(ctx,{material:"chrome",colors:{a:p.tint,b:p.tint2,c:p.tint3,bg0:p.bgTop,bg1:p.bgBottom,light:p.light},depth:p.depth,round:p.bevel,spin:p.sway,envSpeed:.12,floor:!1,y:.1})}};export{chrome_404_default as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{canvas2d}from"../chunks/chunk-DAZOIOF7.js";import{rgba}from"../chunks/chunk-FVGCB66F.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var circuit_board_default={id:"circuit-board",name:"Circuit Board",description:"Signals race along the copper traces of a circuit board toward the chip that serves this page. That chip is scorched and smoking.",category:"Retro Tech",kind:"2d",motion:"live",tags:["canvas","pcb","electronics","tech","hardware","green","signals"],layout:"bottom",codeInScene:!0,copy:{eyebrow:"Hardware fault",title:"Short circuit.",message:"The signal reached the chip that holds this page, and the chip didn't answer. Route around it.",actions:[{label:"Reroute to home",href:"/",variant:"primary"}]},params:{board:"#0d3b22",trace:"#c9a35a",pulse:"#9dffcf",chip:"#141414",burnt:"#3a1a08"},theme:{bg:"#0a2a18",fg:"#e6ffef",accent:"#9dffcf","accent-fg":"#0a2a18"},presetName:"FR4 Green",presets:{blue:{name:"Blue Board",params:{board:"#0b2a5a",trace:"#d9dce6",pulse:"#7fd3ff"},theme:{bg:"#08203f",accent:"#7fd3ff","accent-fg":"#08203f"}},black:{name:"Matte Black",params:{board:"#121214",trace:"#d4af37",pulse:"#ffd36b"},theme:{bg:"#0b0b0c",accent:"#ffd36b","accent-fg":"#0b0b0c"}},purple:{name:"Purple",params:{board:"#2a0f4a",trace:"#e6c86b",pulse:"#ff7ae0"},theme:{bg:"#200b3a",accent:"#ff7ae0","accent-fg":"#200b3a"}}},setup(ctx){let p=ctx.params,c=canvas2d(ctx),rnd=ctx.random,traces=[],lens=[],chip={x:0,y:0,w:0,h:0},smoke=[],build=()=>{chip={w:Math.min(c.w*.18,200),h:Math.min(c.w*.18,200)*.8,x:0,y:0},chip.x=c.w/2-chip.w/2,chip.y=c.h*.32-chip.h/2,traces=[];let G=16,snap=v=>Math.round(v/G)*G;for(let i=0;i<34;i++){let side=i%4,k=(Math.floor(i/4)+.5)/9,x=side===0?chip.x+chip.w*k:side===1?chip.x+chip.w:side===2?chip.x+chip.w*k:chip.x,y=side===0?chip.y:side===1?chip.y+chip.h*k:side===2?chip.y+chip.h:chip.y+chip.h*k,path=[[x,y]],dir=side===0?[0,-1]:side===1?[1,0]:side===2?[0,1]:[-1,0],len=30+rnd()*60;x+=dir[0]*len,y+=dir[1]*len,path.push([snap(x),snap(y)]);let diag=rnd()<.5?1:-1;len=40+rnd()*140,x+=(dir[0]||diag)*len,y+=(dir[1]||diag)*len,path.push([snap(x),snap(y)]),len=60+rnd()*c.w*.3,x+=dir[0]*len,y+=dir[1]*len,path.push([snap(x),snap(y)]),traces.push(path)}lens=traces.map(pa=>pa.slice(1).reduce((s,q,i)=>s+Math.hypot(q[0]-pa[i][0],q[1]-pa[i][1]),0))};build();let pointAt=(pa,d)=>{for(let i=1;i<pa.length;i++){let L=Math.hypot(pa[i][0]-pa[i-1][0],pa[i][1]-pa[i-1][1]);if(d<=L)return[pa[i-1][0]+(pa[i][0]-pa[i-1][0])*d/L,pa[i-1][1]+(pa[i][1]-pa[i-1][1])*d/L];d-=L}return pa[pa.length-1]};return{resize(){c.reset(),build()},frame(t,dt){let g=c.g;c.reset(),g.fillStyle=p.board,g.fillRect(0,0,c.w,c.h),g.fillStyle=rgba("#ffffff",.02);for(let y=0;y<c.h;y+=4)g.fillRect(0,y,c.w,1);g.strokeStyle=rgba(p.trace,.75),g.lineWidth=3,g.lineJoin="round";for(let pa of traces){g.beginPath(),pa.forEach(([x,y],i)=>i?g.lineTo(x,y):g.moveTo(x,y)),g.stroke();let[ex,ey]=pa[pa.length-1];g.fillStyle=p.trace,g.beginPath(),g.arc(ex,ey,6,0,Math.PI*2),g.fill(),g.fillStyle=p.board,g.beginPath(),g.arc(ex,ey,2.5,0,Math.PI*2),g.fill()}g.globalCompositeOperation="lighter",traces.forEach((pa,i)=>{let L=lens[i],d=L-((t*160+i*97)%(L+200)-100);if(d<0||d>L)return;let[x,y]=pointAt(pa,d),grd=g.createRadialGradient(x,y,0,x,y,14);grd.addColorStop(0,rgba(p.pulse,.9)),grd.addColorStop(1,rgba(p.pulse,0)),g.fillStyle=grd,g.fillRect(x-14,y-14,28,28)}),g.globalCompositeOperation="source-over",g.fillStyle="#888";for(let k=0;k<9;k++){let f=(k+.5)/9;g.fillRect(chip.x+chip.w*f-3,chip.y-8,6,8),g.fillRect(chip.x+chip.w*f-3,chip.y+chip.h,6,8),g.fillRect(chip.x-8,chip.y+chip.h*f-3,8,6),g.fillRect(chip.x+chip.w,chip.y+chip.h*f-3,8,6)}g.fillStyle=p.chip,g.fillRect(chip.x,chip.y,chip.w,chip.h);let scorch=g.createRadialGradient(chip.x+chip.w*.55,chip.y+chip.h*.45,0,chip.x+chip.w*.55,chip.y+chip.h*.45,chip.w*.7);scorch.addColorStop(0,rgba(p.burnt,1)),scorch.addColorStop(.3,rgba("#6b2a0a",.8)),scorch.addColorStop(1,rgba(p.burnt,0)),g.fillStyle=scorch,g.fillRect(chip.x-20,chip.y-20,chip.w+40,chip.h+40),g.fillStyle="rgba(255,255,255,.65)",g.font=`700 ${chip.h*.16}px ui-monospace,Menlo,monospace`,g.textAlign="center",g.fillText(`PG-${ctx.copy.code}`,chip.x+chip.w/2,chip.y+chip.h*.32),g.font=`600 ${chip.h*.09}px ui-monospace,Menlo,monospace`,g.fillText("NOT FOUND",chip.x+chip.w/2,chip.y+chip.h*.85),Math.sin(t*13)>.6&&(g.fillStyle="rgba(255,140,40,.9)",g.fillRect(chip.x+chip.w*.5+Math.sin(t*7)*10,chip.y+chip.h*.5,3,3)),dt>0&&Math.random()<dt*5&&smoke.push({x:chip.x+chip.w*(.4+Math.random()*.3),y:chip.y+chip.h*.4,r:8,life:1});for(let s of smoke)s.y-=26*dt,s.r+=16*dt,s.life-=dt*.4,g.fillStyle=`rgba(200,200,200,${Math.max(0,s.life*.18)})`,g.beginPath(),g.arc(s.x,s.y,s.r,0,Math.PI*2),g.fill();smoke=smoke.filter(s=>s.life>0)}}}};export{circuit_board_default as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{GAME_CSS,hud,input}from"../chunks/chunk-MNUNTC4L.js";import{canvas2d}from"../chunks/chunk-DAZOIOF7.js";import{rgba}from"../chunks/chunk-FVGCB66F.js";import{SANS}from"../chunks/chunk-3ISI6SOJ.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var claw_machine_default={id:"claw-machine",name:"Claw Machine",description:"An arcade claw machine full of plush toys, with the 404 plush right at the front. Move with \u2190 \u2192, drop with space. The claw is, of course, rigged.",category:"Games",kind:"2d",motion:"game",tags:["canvas","game","playable","arcade","claw","funny","keyboard"],layout:"bottom",codeInScene:!0,copy:{eyebrow:"\u2190 \u2192 move \xB7 space drops",title:"So close. It slipped away again.",message:"The 404 plush is always just out of reach. The prize counter (the homepage) is open.",actions:[{label:"Go to the prize counter",href:"/",variant:"primary"}]},params:{cabinet:"#ff3b7f",glass:"#1a0b2e",plush:["#ffd23f","#7bdff2","#b2f7ef","#f7d6e0","#cdb4db"],claw:"#d9d9de"},theme:{bg:"#120720",fg:"#ffe9f3",accent:"#ff3b7f","accent-fg":"#fff","font-display":"var(--lp-font-mono)","title-weight":"700"},presetName:"Arcade Pink",presets:{blue:{name:"Midnight Claw",params:{cabinet:"#2b59ff",glass:"#050a24",plush:["#ffd23f","#ff6b9a","#7bdff2","#ffffff"]},theme:{bg:"#050a24",accent:"#2b59ff","accent-fg":"#fff"}},mint:{name:"Mint Machine",params:{cabinet:"#2ec4b6",glass:"#04201d",plush:["#ffbf69","#ff9f1c","#cbf3f0","#ffffff"]},theme:{bg:"#031a17",accent:"#2ec4b6","accent-fg":"#031a17"}},gold:{name:"Gold Rush",params:{cabinet:"#d4a017",glass:"#1a1205",plush:["#ff6b6b","#4ecdc4","#ffe66d","#f7fff7"]},theme:{bg:"#120c02",accent:"#d4a017","accent-fg":"#120c02"}}},css:GAME_CSS,setup(ctx){let p=ctx.params,c=canvas2d(ctx),inp=input(ctx,{pointerPlays:!1}),rnd=ctx.random,box={x:0,y:0,w:0,h:0},toys=[],claw={x:0,y:0,open:1,state:"idle",t:0,holding:-1},demoT=2,build=()=>{let w=Math.min(c.w*.62,640),h=Math.min(c.h*.56,w*.8);box={x:(c.w-w)/2,y:c.h*.04,w,h},toys=[];for(let i=0;i<26;i++){let r=18+rnd()*14;toys.push({x:box.x+r+rnd()*(box.w-r*2),y:box.y+box.h-r-rnd()*box.h*.25,r,col:p.plush[i%p.plush.length],code:!1,vy:0,held:!1})}toys.push({x:box.x+box.w*.62,y:box.y+box.h-52,r:44,col:"#ffffff",code:!0,vy:0,held:!1}),claw={x:box.x+box.w*.2,y:box.y+20,open:1,state:"idle",t:0,holding:-1}};build();let drop=()=>{claw.state==="idle"&&(claw.state="down")};return{resize(){c.reset(),build()},frame(t,dt){let g=c.g;if(c.reset(),dt>0&&(!ctx.reducedMotion||inp.playing)){if(claw.state==="idle"){if(inp.playing)inp.left&&(claw.x-=220*dt),inp.right&&(claw.x+=220*dt),(inp.pressed()||inp.action)&&drop();else{let target=toys[toys.length-1].x;claw.x+=Math.sign(target-claw.x)*Math.min(Math.abs(target-claw.x),160*dt),Math.abs(target-claw.x)<2&&t>demoT&&drop()}claw.x=Math.max(box.x+30,Math.min(box.x+box.w-30,claw.x))}else if(claw.state==="down"){claw.y+=260*dt;let hit=toys.find(q=>Math.abs(q.x-claw.x)<q.r&&claw.y+30>q.y-q.r);(hit||claw.y>box.y+box.h-40)&&(claw.state="grab",claw.t=0,hit&&(claw.holding=toys.indexOf(hit)))}else if(claw.state==="grab")claw.t+=dt,claw.open=Math.max(.15,1-claw.t*2),claw.t>.6&&(claw.state="up");else if(claw.state==="up"){claw.y-=160*dt;let toy=toys[claw.holding];toy&&(toy.x=claw.x,toy.y=claw.y+40+toy.r*.5,toy.held=!0,claw.y<box.y+box.h*.45&&(toy.held=!1,claw.holding=-1,claw.open=.7)),claw.y<=box.y+20&&(claw.y=box.y+20,claw.state="return")}else claw.state==="return"&&(claw.open=Math.min(1,claw.open+dt),claw.open>=1&&(claw.state="idle",demoT=t+3));for(let q of toys){if(q.held)continue;q.vy+=900*dt,q.y+=q.vy*dt;let floor=box.y+box.h-q.r;q.y>floor&&(q.y=floor,q.vy=0)}}g.fillStyle=p.glass,g.fillRect(0,0,c.w,c.h);let cab=g.createLinearGradient(box.x-30,0,box.x+box.w+30,0);cab.addColorStop(0,rgba(p.cabinet,.7)),cab.addColorStop(.5,p.cabinet),cab.addColorStop(1,rgba(p.cabinet,.7)),g.fillStyle=cab,g.beginPath(),g.roundRect(box.x-26,box.y-10,box.w+52,box.h+70,24),g.fill(),g.fillStyle=p.glass,g.fillRect(box.x,box.y,box.w,box.h),g.fillStyle=rgba("#ffffff",.05),g.fillRect(box.x,box.y,box.w,box.h),g.fillStyle="#000",g.fillRect(box.x+10,box.y+box.h-70,70,70),g.fillStyle=rgba(p.cabinet,.8),g.font="700 10px ui-monospace,Menlo,monospace",g.textAlign="center",g.fillText("PRIZE",box.x+45,box.y+box.h-30);for(let q of toys)g.fillStyle=q.col,g.beginPath(),g.arc(q.x,q.y,q.r,0,Math.PI*2),g.fill(),g.beginPath(),g.arc(q.x-q.r*.6,q.y-q.r*.75,q.r*.32,0,Math.PI*2),g.arc(q.x+q.r*.6,q.y-q.r*.75,q.r*.32,0,Math.PI*2),g.fill(),g.fillStyle="#1a1a1a",g.beginPath(),g.arc(q.x-q.r*.3,q.y-q.r*.1,q.r*.08,0,Math.PI*2),g.arc(q.x+q.r*.3,q.y-q.r*.1,q.r*.08,0,Math.PI*2),g.fill(),q.code&&(g.fillStyle=p.cabinet,g.font=`900 ${q.r*.5}px ${SANS}`,g.textAlign="center",g.textBaseline="middle",g.fillText(ctx.copy.code,q.x,q.y+q.r*.35),g.textBaseline="alphabetic");g.strokeStyle=p.claw,g.lineWidth=2,g.beginPath(),g.moveTo(claw.x,box.y),g.lineTo(claw.x,claw.y),g.stroke(),g.fillStyle=p.claw,g.fillRect(claw.x-16,claw.y-6,32,14),g.lineWidth=5,g.lineCap="round";for(let s of[-1,1]){let spread=10+claw.open*18;g.beginPath(),g.moveTo(claw.x+s*10,claw.y+6),g.lineTo(claw.x+s*spread,claw.y+28),g.lineTo(claw.x+s*(spread-10),claw.y+42),g.stroke()}g.fillStyle=rgba("#ffffff",.06),g.beginPath(),g.moveTo(box.x+box.w*.15,box.y),g.lineTo(box.x+box.w*.32,box.y),g.lineTo(box.x+box.w*.12,box.y+box.h),g.lineTo(box.x-0,box.y+box.h),g.fill();let fs=Math.max(10,Math.min(13,c.w/100));!inp.playing&&Math.floor(t*1.6)%2===0&&hud(g,"DEMO \xB7 PRESS \u2190 \u2192 OR SPACE",c.w/2,box.y+box.h+30,fs,"#fff","center")}}}};export{claw_machine_default as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{text3dScene}from"../chunks/chunk-6HZC24J2.js";import"../chunks/chunk-SH72TE6I.js";import"../chunks/chunk-FVGCB66F.js";import"../chunks/chunk-3ISI6SOJ.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var clay_404_default={id:"clay-404",name:"Soft Clay",description:"Chunky pastel clay numerals with soft studio shadows, the friendly 3D look made popular by Spline.",category:"Typography",kind:"3d",motion:"live",tags:["webgl","raymarching","clay","pastel","spline","soft","light","friendly"],layout:"bottom",codeInScene:!0,copy:{eyebrow:"Oops",title:"This page got squished.",message:"We rolled it, shaped it and baked it, but it still doesn't exist.",actions:[{label:"Go home",href:"/",variant:"primary",icon:"home"}]},params:{c1:"#ff8fa3",c2:"#ffd166",c3:"#7bdff2",bgTop:"#fbf3ea",bgBottom:"#f2e2d2",gloss:.35,light:"#fff6ec"},theme:{bg:"#f7ebdf",fg:"#2b1d16",accent:"#2b1d16","accent-fg":"#fff7ef","font-display":'"Bricolage Grotesque","Nunito",ui-rounded,ui-sans-serif,system-ui,sans-serif'},presetName:"Sorbet",presets:{ocean:{name:"Seaside",params:{c1:"#4ea8de",c2:"#56cfe1",c3:"#ffd6a5",bgTop:"#eef8ff",bgBottom:"#d4ecfb"},theme:{bg:"#e1f2fd",fg:"#0d2a40",accent:"#0d2a40","accent-fg":"#eef8ff"}},citrus:{name:"Citrus",title:"Squeezed out of existence.",params:{c1:"#ff9f1c",c2:"#c5e063",c3:"#ffdd4a",bgTop:"#fffbea",bgBottom:"#fbefc4"},theme:{bg:"#fdf4d5",fg:"#3a2a05",accent:"#3a2a05","accent-fg":"#fffbea"}},berry:{name:"Berry",params:{c1:"#c0266d",c2:"#7b2cbf",c3:"#ff6f91",bgTop:"#fff0f6",bgBottom:"#f6d5e5"},theme:{bg:"#fbe4ee",fg:"#3a0a22",accent:"#3a0a22","accent-fg":"#fff0f6"}},chocolate:{name:"Chocolate",title:"Melted away.",params:{c1:"#7b4a2e",c2:"#a0673f",c3:"#f2d4b8",bgTop:"#f7ece3",bgBottom:"#e8d2bf",gloss:.6},theme:{bg:"#efdfd0",fg:"#2e1708",accent:"#2e1708","accent-fg":"#f7ece3"}},garden:{name:"Night Garden",params:{c1:"#7bd389",c2:"#f7b2bd",c3:"#ffe8a3",bgTop:"#1d2a24",bgBottom:"#0f1814",light:"#f2fff6",gloss:.45},theme:{bg:"#16211c",fg:"#eefaf2",accent:"#7bd389","accent-fg":"#0f1814"}},mint:{name:"Mint",params:{c1:"#7fd8be",c2:"#a1fcdf",c3:"#fcd29f",bgTop:"#eefaf5",bgBottom:"#d7efe6"},theme:{bg:"#e2f4ec",fg:"#123227",accent:"#123227","accent-fg":"#effaf5"}},lilac:{name:"Lilac",params:{c1:"#b8a1ff",c2:"#ffb3e6",c3:"#a1c4ff",bgTop:"#f5f1ff",bgBottom:"#e4dcfa"},theme:{bg:"#ece6fd",fg:"#221a3d",accent:"#221a3d","accent-fg":"#f5f1ff"}},terracotta:{name:"Terracotta",title:"Fired in the kiln. Gone.",params:{c1:"#d9764f",c2:"#e9a15c",c3:"#b85a3e",bgTop:"#f6e9dc",bgBottom:"#e9d3bf",gloss:.15},theme:{bg:"#efdcca",fg:"#3a1c10",accent:"#3a1c10","accent-fg":"#fbefe4"}},midnight:{name:"Midnight",params:{c1:"#6c7cff",c2:"#ff6c9e",c3:"#ffd36c",bgTop:"#232742",bgBottom:"#151829",light:"#e9ecff",gloss:.5},theme:{bg:"#1b1f35",fg:"#eef0ff",accent:"#ffd36c","accent-fg":"#1b1f35"}},mono:{name:"Plaster",params:{c1:"#f4f1ec",c2:"#f4f1ec",c3:"#f4f1ec",bgTop:"#e9e5df",bgBottom:"#d8d2ca",gloss:.1},theme:{bg:"#e2ddd6",fg:"#1f1c18",accent:"#1f1c18","accent-fg":"#f4f1ec"}}},css:"& .lp-title{font-weight:700;letter-spacing:-.03em}",setup(ctx){let p=ctx.params;return text3dScene(ctx,{material:"clay",colors:{a:p.c1,b:p.c2,c:p.c3,bg0:p.bgTop,bg1:p.bgBottom,light:p.light},depth:.3,round:.16,spin:.22,float:.05,gloss:p.gloss,weight:900,floor:!0,y:.1})}};export{clay_404_default as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{canvas2d}from"../chunks/chunk-DAZOIOF7.js";import{rgba}from"../chunks/chunk-FVGCB66F.js";import{SANS,textPoints}from"../chunks/chunk-3ISI6SOJ.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var constellation_default={id:"constellation",name:"Constellation",description:"Star by star, the lines join up into a new constellation in the shape of the error. Hover a star to light it.",category:"Space",kind:"2d",motion:"live",tags:["canvas","stars","astronomy","night","calm","elegant","interactive"],layout:"bottom",codeInScene:!0,copy:{eyebrow:"Constellatio Paginae Amissae",title:"Written in the stars: not found.",message:"Ancient astronomers mapped this one too. They called it The Missing Page.",actions:[{label:"Navigate home by the stars",href:"/",variant:"primary"}]},params:{bg:"#050a1a",bg2:"#0d1838",star:"#ffffff",line:"#9fb8ff",label:"#d9b25f",chart:!1},theme:{bg:"#050a1a",fg:"#e9eeff",accent:"#e9eeff","accent-fg":"#050a1a","font-display":"var(--lp-font-serif)","title-weight":"400"},presetName:"Night Sky",presets:{aurora:{name:"Aurora Sky",params:{bg:"#03101a",bg2:"#0b3a3a",star:"#e6fff6",line:"#6bffc4",label:"#6bffc4"},theme:{bg:"#03101a",accent:"#6bffc4","accent-fg":"#03101a"}},chart:{name:"Star Chart",params:{bg:"#0d1f3a",bg2:"#0d1f3a",star:"#f3e6c8",line:"#d9b25f",label:"#d9b25f",chart:!0},theme:{bg:"#0d1f3a",fg:"#f3e6c8",accent:"#d9b25f","accent-fg":"#0d1f3a"}},dawn:{name:"Before Dawn",params:{bg:"#1a1440",bg2:"#d9787a",star:"#fff6e8",line:"#ffe2c2",label:"#fff6e8"},theme:{bg:"#3a2050",fg:"#fff6e8",accent:"#fff6e8","accent-fg":"#3a2050"}}},setup(ctx){let p=ctx.params,c=canvas2d(ctx),rnd=ctx.random,field=[],nodes=[],edges=[],build=()=>{field=Array.from({length:Math.round(c.w*c.h/2600)},()=>({x:rnd()*c.w,y:rnd()*c.h,m:rnd()**3,tw:rnd()*10}));let boxW=Math.min(c.w*.8,1e3),boxH=Math.min(boxW*.4,c.h*.42),pts=textPoints(ctx.copy.code||"404",{width:boxW,height:boxH,font:SANS,weight:300,fit:.95,step:Math.max(4,Math.round(boxW/160)),random:rnd}),cand=[];for(let i=0;i<pts.length;i+=2)cand.push({x:pts[i]+(c.w-boxW)/2,y:pts[i+1]+c.h*.36-boxH/2});nodes=[];let minD=boxW/22;for(let q of cand.sort(()=>rnd()-.5))nodes.every(n=>Math.hypot(n.x-q.x,n.y-q.y)>minD)&&nodes.push({...q,m:.5+rnd()*.5});edges=[];let inTree=new Set([0]);for(;inTree.size<nodes.length;){let best=[-1,-1,1/0];for(let i of inTree)for(let j=0;j<nodes.length;j++){if(inTree.has(j))continue;let d=Math.hypot(nodes[i].x-nodes[j].x,nodes[i].y-nodes[j].y);d<best[2]&&(best=[i,j,d])}inTree.add(best[1]),best[2]<minD*2.1&&edges.push([best[0],best[1]])}};return build(),{resize(){c.reset(),build()},frame(t){let g=c.g;c.reset();let bg=g.createLinearGradient(0,0,0,c.h);if(bg.addColorStop(0,p.bg),bg.addColorStop(1,p.bg2),g.fillStyle=bg,g.fillRect(0,0,c.w,c.h),p.chart){g.strokeStyle=rgba(p.line,.12),g.lineWidth=1;for(let k=1;k<8;k++)g.beginPath(),g.arc(c.w/2,c.h*1.4,c.h*1.4*k/6,Math.PI,0),g.stroke();for(let k=-6;k<=6;k++)g.beginPath(),g.moveTo(c.w/2,c.h*1.4),g.lineTo(c.w/2+k*c.w*.18,-10),g.stroke()}for(let s of field){let a=.25+s.m*.75*(.7+.3*Math.sin(t*(1+s.tw*.2)+s.tw));g.fillStyle=rgba(p.star,a);let r=.5+s.m*1.4;g.fillRect(s.x-r/2,s.y-r/2,r,r)}let prog=ctx.reducedMotion?edges.length:Math.min(edges.length,(t-.6)*edges.length*.32);g.strokeStyle=rgba(p.line,.55),g.lineWidth=1.2;for(let i=0;i<Math.floor(prog);i++){let[a,b]=edges[i];g.beginPath(),g.moveTo(nodes[a].x,nodes[a].y),g.lineTo(nodes[b].x,nodes[b].y),g.stroke()}if(prog<edges.length&&prog>0){let[a,b]=edges[Math.floor(prog)],k=prog%1;g.beginPath(),g.moveTo(nodes[a].x,nodes[a].y),g.lineTo(nodes[a].x+(nodes[b].x-nodes[a].x)*k,nodes[a].y+(nodes[b].y-nodes[a].y)*k),g.stroke()}for(let n of nodes){let near=ctx.pointer.inside?Math.max(0,1-Math.hypot(n.x-ctx.pointer.x,n.y-ctx.pointer.y)/80):0,r=1.6+n.m*2.2+near*3,grd=g.createRadialGradient(n.x,n.y,0,n.x,n.y,r*5);grd.addColorStop(0,rgba(p.star,.9)),grd.addColorStop(.2,rgba(p.star,.35+near*.4)),grd.addColorStop(1,rgba(p.star,0)),g.fillStyle=grd,g.fillRect(n.x-r*5,n.y-r*5,r*10,r*10),g.fillStyle=p.star,g.beginPath(),g.arc(n.x,n.y,r*.6,0,Math.PI*2),g.fill()}prog>=edges.length&&(g.fillStyle=rgba(p.label,.8),g.font="italic 15px Georgia,serif",g.textAlign="center",g.fillText("\u2014 Pagina Amissa \u2014",c.w/2,c.h*.36+Math.min(c.w*.8,1e3)*.22+10))}}}};export{constellation_default as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Params {
|
|
2
|
+
/** Seconds before going home. */
|
|
3
|
+
seconds: number;
|
|
4
|
+
/** Actually follow the first button's link when the timer ends. Off by default so previews don't jump. */
|
|
5
|
+
redirect: boolean;
|
|
6
|
+
ring: string;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import("..").SceneDef<Params>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{esc,layer,sr}from"../chunks/chunk-ES56TX4X.js";import"../chunks/chunk-B2NBRLO2.js";import"../chunks/chunk-KIYSQVWX.js";import"../chunks/chunk-7XMDQMDO.js";var countdown_default={id:"countdown",name:"Countdown",description:"\u201CTaking you home in 10 seconds.\u201D A progress ring counts down; set redirect to true and it follows your first button when it hits zero.",category:"Simple",kind:"2d",motion:"live",tags:["simple","redirect","timer","countdown","useful","fast"],layout:"none",copy:{title:"This page doesn\u2019t exist",message:"We\u2019ll take you back to the homepage in a moment.",actions:[{label:"Go now",href:"/",icon:"arrow"}]},params:{seconds:10,redirect:!1,ring:"#2563eb"},theme:{bg:"#ffffff",fg:"#0f172a",accent:"#2563eb","accent-fg":"#ffffff",radius:"10px"},stillTime:3,presetName:"Light",presets:{dark:{name:"Dark",params:{ring:"#34d399"},theme:{bg:"#06110d",fg:"#ecfdf5",accent:"#34d399","accent-fg":"#06110d"}},quick:{name:"Quick (5s)",params:{seconds:5,ring:"#f97316"},theme:{bg:"#fff7ed",fg:"#431407",accent:"#f97316","accent-fg":"#fff"}}},css:`
|
|
2
|
+
& .cd{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px 16px}
|
|
3
|
+
& .cd .ring{position:relative;width:clamp(110px,16cqw,150px);aspect-ratio:1;margin-bottom:28px}
|
|
4
|
+
& .cd svg{width:100%;height:100%;transform:rotate(-90deg)}
|
|
5
|
+
& .cd circle{fill:none;stroke-width:6}
|
|
6
|
+
& .cd .tr{stroke:color-mix(in srgb,var(--lp-fg) 10%,transparent)}
|
|
7
|
+
& .cd .pg{stroke:var(--ring);stroke-linecap:round}
|
|
8
|
+
& .cd .n{position:absolute;inset:0;display:grid;place-items:center;font-size:clamp(34px,5cqw,48px);font-weight:700;font-variant-numeric:tabular-nums}
|
|
9
|
+
& .cd .code{font-size:12.5px;font-weight:700;letter-spacing:.14em;color:var(--lp-muted)}
|
|
10
|
+
& .cd h1{margin:8px 0 0;font-size:clamp(26px,4cqw,44px);font-weight:700;letter-spacing:-.03em;line-height:1.1}
|
|
11
|
+
& .cd p{margin:12px 0 0;color:var(--lp-muted);font-size:15px}
|
|
12
|
+
& .cd a{margin-top:24px;display:inline-flex;align-items:center;gap:8px;padding:12px 20px;border-radius:var(--lp-radius);background:var(--lp-accent);color:var(--lp-accent-fg);text-decoration:none;font-weight:600;font-size:14px}
|
|
13
|
+
`,setup(ctx){let p=ctx.params,c=ctx.copy,go=c.actions[0]??{label:"Go home",href:"/"},R=44,L=2*Math.PI*R,el=layer(ctx,"cd",`<div class="ring" aria-hidden="true"><svg viewBox="0 0 100 100"><circle class="tr" cx="50" cy="50" r="${R}"/><circle class="pg" cx="50" cy="50" r="${R}" stroke-dasharray="${L}"/></svg><span class="n"></span></div>
|
|
14
|
+
<span class="code">ERROR ${esc(c.code)}</span><h1>${sr(c.code)}${esc(c.title)}</h1><p>${esc(c.message)}</p><a href="${esc(go.href??"/")}">${esc(go.label)} \u2192</a>`,{ring:p.ring}),pg=el.querySelector(".pg"),n=el.querySelector(".n");el.querySelector("a").addEventListener("click",e=>{e.metaKey||e.ctrlKey||(e.preventDefault(),ctx.navigate(go.href??"/",e))});let done=!1;return{frame(t){let left=Math.max(0,p.seconds-t);n.textContent=String(Math.ceil(left)),pg.style.strokeDashoffset=String(L*(1-left/p.seconds)),left===0&&!done&&(done=!0,p.redirect&&!ctx.reducedMotion&&ctx.navigate(go.href??"/"))},destroy:()=>el.remove()}}};export{countdown_default as default};
|