import { Main, DragResizableImage, render_and_copy, n_of } from "./common.tsx"; // new idea! "make your own image macro" scrollable background of various le classic meme images (imgflip) // + images (yes, images; nobody has impact installed) // nah. let's just do white + text-shadow const base_url = "https://static.pyrope.net/imgflip/"; const urls = [ "aggressive-right-turn.png", "aliens.png", "always-has-been.png", "balloon.png", "batman-slapping-robin.png", "bike-self-sabotage.png", "buff-doge-vs-cheems.png", "cefqrn.png", "change-my-mind.png", "chuck-norris.png", "despicable-plan.png", "distracted-boyfriend.png", "drake.png", "everywhere-everywhere.png", "evil-kermit.png", "expanding-brain.png", "girl-smile-fire.png", "heinous-suggestion.png", "hide-the-pain-harold.png", "i-am-once-again-asking.png", "if-i-had-one.png", "is-this-a.png", "not-sure-if.png", "one-does-not-simply.png", "or-draw-25.png", "panik-kalm-panik.png", "psycholonials-reference.png", "rock-the-dwayne-johnson-driving.png", "same-picture.png", "scroll-of-truth.png", "slam-button.png", "STRONG-handshake.png", "success-kid.png", "tap-head.png", "thinking-about-other-women.png", "this-is-fine.png", "two-buttons.png", "waiting-guy.png", "waiting-skeleton.png", "who-killed.png", "woman-yelling-at-cat.png", "you-get-a.png", ].map(x => base_url + x); const Word = ({ children, left = "0px", top = "0px", }: { children: string; left?: string; top?: string; }) => (

{children}

); // alright, doing it the right way (https://cohost.org/blackle/post/38921-alright-cohost-it) is too hard. // let's cheat. // if we aren't random, and instead distribute things such that the initial setup has the least covered // ehhhhhhhhhhhhhhhhhh // sighhhhh let's just do it right // generate the stupid freaking impact font // use it as a background image // ughhhhhh // oo i know i'll make one image in photopea and just clip it // that should work and be easy fingers crossed // that'll actually be way harder to adapt lel // ughhhh am i going to have to pull out that crappy library // AND download an impact font // (yes) // tl;dr i can still use this scattering // imagescript can't do the shadow we need (thank goodness) // maybe imagemagick + photopea then // i got it (KISS): photopea -> split on command line -> reference by url // that should be workable const words = { THE: 6, HOMESTUCK: 3, MEME: 4, IS: 4, EGGBUG: 4, WHEN: 2, YOU: 5, SUS: 1, IMPOSTER: 1, ME: 3, ALIEN: 1, ARE: 3, A: 4, BOTTOM: 2, TOP: 2, TEXT: 4, "?": 3, "!": 3, NO: 3, YES: 3, COHOST: 2, MEHBARK: 2, WEBARK: 2, THIS: 2, POST: 2, SUCK: 2, "CHUCK NORRIS": 2, FOR: 2, S: 4, GET: 2, } satisfies Record; console.log( `yikes. there are ${ Object.keys(words).length } unique words and ${Object.values(words).reduce( (a, b) => a + b )} words in total` ); // Object.keys(words).forEach(w => console.log(w)) const text_img_url = (text: string) => `https://static.pyrope.net/meme-text/${text}.png`; const TEXT_HEIGHT = 55; const decoder = new TextDecoder(); // crazy inefficient but idc const get_text_width = (text: string): number => +decoder.decode( new Deno.Command("identify", { args: ["-format", "%w", `static/meme-text/${text}.png`], }).outputSync().stdout ); const ScatteredWords = ({ children }: { children: Record }) => ( <> {...Object.entries(children).flatMap(([text, count]) => // feels pretty snazzy ngl n_of(Math.ceil(count), () => ( )).map(f => f()) )} ); render_and_copy( <>
{words}
{...urls.map(u => ( ))}

a horizontally scrollable list of memes with draggable words that look like a knockoff of impact font. if you want a better and (hopefully) more accessible version, visit imgflip.com. all of the memes are taken from there anyway

notes as per usual i do this all th etime:
  • dragresizing taken entirely from @blackle's{" "} excellent post
  • you have to get the very center to drag. @blackle put an indicator but i made it optional and turned it off! sorry! aesthetics! (edit: turned em back on. character growth! i did turn the opacity down just a squidge. idk. it's late!)
  • i probably could have turned the resizing off too, but, you know, it's very funny
);