initial commit
This commit is contained in:
commit
c1fcd84395
2 changed files with 333 additions and 0 deletions
43
index.html
Normal file
43
index.html
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="wordlist.js"></script>
|
||||
</head>
|
||||
<body style="background: black; color: #888">
|
||||
<canvas id="c" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: black"></canvas>
|
||||
<div id="b" style="cursor: pointer; position: fixed; top: 0; left: 0; font-size: 7vw;">↻</div>
|
||||
<script>
|
||||
var word;
|
||||
|
||||
var mm
|
||||
var do_layout = function() {
|
||||
var canvas = document.getElementById("c");
|
||||
canvas.width = canvas.clientWidth
|
||||
canvas.height = canvas.clientHeight
|
||||
var ctx = canvas.getContext("2d");
|
||||
var ww = canvas.width, hh = canvas.height
|
||||
ctx.font = "30px Arial Bold";
|
||||
ctx.fillStyle = "#ccc";
|
||||
var measure = ctx.measureText(word)
|
||||
mm = measure
|
||||
ctx.translate(ww/2, hh/2)
|
||||
if(ww < hh) {
|
||||
ctx.rotate(Math.PI / 2)
|
||||
hh = canvas.width
|
||||
ww = canvas.height
|
||||
}
|
||||
var scale = ww / measure.width * .95
|
||||
ctx.scale(scale, scale)
|
||||
ctx.translate(-measure.width / 2 + measure.actualBoundingBoxLeft, (measure.actualBoundingBoxAscent - measure.actualBoundingBoxDescent)/2)
|
||||
ctx.fillText(word, 1, 1)
|
||||
}
|
||||
var new_word = function() {
|
||||
word = words[0|(Math.random()*words.length)]
|
||||
console.log(word)
|
||||
do_layout();
|
||||
}
|
||||
new_word()
|
||||
window.addEventListener('resize', function(event) { do_layout() })
|
||||
document.getElementById('b').addEventListener('click', function(event) { new_word() })
|
||||
</script>
|
||||
</body>
|
||||
290
wordlist.js
Normal file
290
wordlist.js
Normal file
|
|
@ -0,0 +1,290 @@
|
|||
// From google-10000-english-usa-no-swears-medium.txt but curated.
|
||||
// via https://gist.github.com/dicksontsai/e610bb632c00b4deab312f0b2eda150d
|
||||
const words = [
|
||||
"company", "fortune", "booth", "injury", "guard",
|
||||
"viral", "simpson", "bacon", "warrior", "frame",
|
||||
"drain", "nursery", "track", "sombrero", "spread",
|
||||
"period", "table", "arcade", "drunk", "plaza",
|
||||
"storm", "postal", "grammar", "rhythm", "lunch",
|
||||
"arrow", "spongebob", "category", "jewelry", "tuition",
|
||||
"science", "grain", "tulip", "investor", "movement",
|
||||
"spotify", "lobby", "chemical", "weekend", "crane",
|
||||
"cheese", "toast", "pacific", "retreat", "sail",
|
||||
"cartoon", "pattern", "castle", "elegant", "joint",
|
||||
"watch", "volcano", "money", "disposal", "humor",
|
||||
"color", "trick", "vampire", "neutral", "discount",
|
||||
"murray", "finance", "label", "scenic", "garden",
|
||||
"broadway", "propose", "ribbon", "softball", "fantasy",
|
||||
"plate", "powder", "puzzle", "portable", "butterfly",
|
||||
"remedy", "hairy", "stock", "minority", "knock",
|
||||
"animal", "panda", "special", "proof", "chase",
|
||||
"pressure", "stage", "potato", "metro", "yeast",
|
||||
"sword", "captain", "silent", "cardiac", "tunnel",
|
||||
"reduce", "anatomy", "conflict", "bookmark", "token",
|
||||
"catch", "condo", "degree", "dairy", "donation",
|
||||
"delivery", "liberty", "account", "tractor", "pocket",
|
||||
"palace", "desktop", "privacy", "jackson", "brooklyn",
|
||||
"canyon", "doctor", "normal", "dance", "popular",
|
||||
"title", "pleasure", "korea", "bunch", "cancel",
|
||||
"physical", "reject", "muscle", "solar", "map",
|
||||
"forecast", "karma", "rain", "greek", "egyptian",
|
||||
"property", "lens", "fight", "platform", "lemon",
|
||||
"grill", "bubble", "drug", "birthday", "stamp",
|
||||
"mower", "coast", "stupid", "portrait", "darwin",
|
||||
"candle", "steak", "cloudy", "minor", "nintendo",
|
||||
"journal", "birth", "grove", "autumn", "panic",
|
||||
"install", "transit", "location", "stone", "probe",
|
||||
"angel", "mature", "eastern", "rouge", "baseball",
|
||||
"newark", "acorn", "suicide", "chance", "aurora",
|
||||
"parallel", "combat", "asian", "phantom", "plastic",
|
||||
"wagon", "destroy", "budget", "spell", "sheep",
|
||||
"thread", "emergency", "video", "patent", "basic",
|
||||
"puppy", "battery", "gumbo", "election", "verse",
|
||||
"square", "lawsuit", "crazy", "nudist", "plain",
|
||||
"treaty", "bangkok", "omega", "mountain", "renew",
|
||||
"destiny", "church", "eclipse", "document", "cannon",
|
||||
"pasta", "momentum", "download", "beauty", "graph",
|
||||
"cinema", "alcohol", "accent", "sentence", "radar",
|
||||
"prince", "salmon", "queen", "watson", "premiere",
|
||||
"youtube", "adobe", "receptor", "luxury", "sandwich",
|
||||
"industry", "metallic", "mayor", "xbox", "vanilla",
|
||||
"drink", "kitty", "ghost", "fashion", "editor",
|
||||
"block", "medal", "level", "pig", "picture",
|
||||
"script", "pottery", "latin", "cemetery", "immune",
|
||||
"checkout", "static", "vacation", "breast", "haven",
|
||||
"smart", "labor", "poetry", "award", "taiwan",
|
||||
"remix", "stream", "floppy", "olive", "texture",
|
||||
"legend", "train", "mental", "faith", "ensemble",
|
||||
"punch", "knife", "circus", "service", "hardware",
|
||||
"strength", "dramatic", "stretch", "invasion", "hockey",
|
||||
"plug", "shoot", "shake", "museum", "necklace",
|
||||
"browse", "adult", "aluminum", "refund", "saturn",
|
||||
"elf", "donor", "torture", "alumni", "negative",
|
||||
"fancy", "aviation", "cliff", "equation", "distance",
|
||||
"monkey", "ceremony", "hormone", "retail", "geometry",
|
||||
"river", "release", "fruit", "wolf", "charity",
|
||||
"traffic", "indian", "truck", "pirate", "match",
|
||||
"brazil", "public", "decor", "hanks", "ball",
|
||||
"coffee", "casino", "security", "climb", "junior",
|
||||
"hybrid", "orbit", "naval", "safari", "harbor",
|
||||
"nuclear", "lucky", "steal", "protein", "tutorial",
|
||||
"jedi", "stadium", "calendar", "roulette", "cradle",
|
||||
"theta", "police", "globe", "graduate", "partial",
|
||||
"straight", "stomach", "flesh", "pixel", "sitcom",
|
||||
"exercise", "portal", "welcome", "metal", "cocktail",
|
||||
"noise", "flush", "valve", "clover", "japanese",
|
||||
"python", "judge", "float", "packet", "sample",
|
||||
"toilet", "salad", "burst", "shape", "patrol",
|
||||
"mercury", "disease", "blood", "sorry", "laugh",
|
||||
"andale", "peace", "maintain", "lawyer", "biology",
|
||||
"gravity", "essay", "scoop", "cursor", "locator",
|
||||
"brunette", "magnet", "conduct", "trivia", "poison",
|
||||
"trauma", "banana", "bread", "regime", "system",
|
||||
"tinder", "faculty", "persian", "shirt", "sheriff",
|
||||
"india", "brick", "avenue", "operation", "marie",
|
||||
"postage", "dream", "century", "sonic", "licence",
|
||||
"shelf", "dwarf", "liable", "speech", "license",
|
||||
"dynamic", "inform", "brake", "northern", "peanut",
|
||||
"bridge", "snake", "noodles", "publish", "mexico",
|
||||
"voltage", "gallery", "cricket", "classic", "hotel",
|
||||
"marble", "custom", "ivory", "wealth", "denial",
|
||||
"lottery", "boston", "exit", "rational", "dozen",
|
||||
"radio", "affair", "expert", "floral", "texas",
|
||||
"grant", "millenial", "dodge", "target", "nascar",
|
||||
"funeral", "monopoly", "festival", "ellen", "shift",
|
||||
"bathroom", "coach", "downtown", "island", "hindu",
|
||||
"savage", "invite", "basket", "outlet", "vengeance",
|
||||
"surround", "circle", "geneva", "universe", "media",
|
||||
"upgrade", "tongue", "store", "piano", "slave",
|
||||
"limit", "fleece", "shrek", "deluxe", "theft",
|
||||
"profile", "ketchup", "equal", "auction", "arena",
|
||||
"respect", "plasma", "terrain", "trust", "black",
|
||||
"cruise", "roommate", "trace", "database", "cycle",
|
||||
"deputy", "race", "motion", "camera", "story",
|
||||
"leisure", "threat", "religion", "balance", "scratch",
|
||||
"rocky", "button", "breath", "blend", "lodge",
|
||||
"state", "snow", "guitar", "grande", "berry",
|
||||
"cowboy", "batman", "veteran", "chicken", "kitchen",
|
||||
"cargo", "cement", "album", "opera", "easter",
|
||||
"position", "infant", "locate", "workout", "remind",
|
||||
"neighbor", "flight", "insulin", "show", "routine",
|
||||
"hotdog", "collapse", "estimate", "console", "struggle",
|
||||
"mario", "queue", "squad", "package", "blackpink",
|
||||
"massage", "quote", "chair", "energy", "board",
|
||||
"delta", "bible", "mercy", "bouquet", "makeup",
|
||||
"strike", "hose", "strap", "brand", "discrete",
|
||||
"diesel", "moral", "colony", "deadline", "donate",
|
||||
"solution", "reggae", "bryant", "concrete", "nirvana",
|
||||
"spray", "shadow", "alien", "produce", "stylish",
|
||||
"groove", "antenna", "employee", "college", "summit",
|
||||
"website", "codenames", "ecology", "decimal", "prairie",
|
||||
"bracket", "price", "bachelor", "slope", "italy",
|
||||
"houston", "ocean", "culture", "vacuum", "jacket",
|
||||
"excuse", "draft", "reality", "crowd", "explore",
|
||||
"talent", "benefit", "cross", "crime", "niagara",
|
||||
"mouse", "receipt", "wheel", "symphony", "barbie",
|
||||
"analog", "removal", "cabinet", "tiktok", "costco",
|
||||
"clarity", "realtor", "medieval", "million", "adopt",
|
||||
"teach", "income", "sticky", "whale", "imagine",
|
||||
"idea", "ferrari", "rescue", "mouth", "angle",
|
||||
"scuba", "teenage", "metric", "supreme", "terrace",
|
||||
"steam", "choir", "horse", "japan", "material",
|
||||
"phrase", "karaoke", "oxygen", "vaccine", "subject",
|
||||
"ultimate", "sharp", "africa", "pole", "ratio",
|
||||
"legacy", "oriental", "predict", "tension", "disney",
|
||||
"shark", "railroad", "laundry", "pong", "deposit",
|
||||
"western", "tariff", "fresh", "gamecube", "online",
|
||||
"tragedy", "dialog", "bottle", "cuisine", "badge",
|
||||
"charge", "chubby", "scroll", "surface", "perfume",
|
||||
"skirt", "hyundai", "spoke", "boss", "redeem",
|
||||
"amateur", "lincoln", "crash", "shaft", "gauge",
|
||||
"bone", "blade", "manga", "premium", "demand",
|
||||
"screen", "stroke", "health", "audience", "motor",
|
||||
"ambient", "email", "america", "factory", "rainbow",
|
||||
"topic", "language", "tomorrow", "template", "booty",
|
||||
"court", "coral", "question", "robot", "concert",
|
||||
"battle", "pulse", "magazine", "loose", "escape",
|
||||
"honolulu", "trial", "pepper", "bacteria", "crown",
|
||||
"lease", "vault", "trunk", "insight", "satisfy",
|
||||
"brain", "clone", "candy", "passion", "toilet",
|
||||
"italic", "branch", "creek", "house", "spice",
|
||||
"honda", "stuck", "party", "samsung", "sodium",
|
||||
"memorial", "gourmet", "secret", "broke", "bullet",
|
||||
"column", "virgin", "strain", "lance", "chef",
|
||||
"organ", "manage", "spank", "mandate", "sprint",
|
||||
"senate", "blank", "stolen", "monitor", "permit",
|
||||
"silicon", "chick", "rabbit", "timeline", "startup",
|
||||
"director", "tropical", "sunshine", "burden", "anxiety",
|
||||
"hawaii", "pizza", "studio", "anniversary", "thumb",
|
||||
"tsunami", "report", "fusion", "detect", "seafood",
|
||||
"bieber", "buffalo", "antique", "genome", "flag",
|
||||
"tumor", "prophet", "mentor", "occasion", "oscars",
|
||||
"strand", "british", "pension", "husband", "pickup",
|
||||
"hollow", "yield", "nurse", "onion", "wheat",
|
||||
"wallet", "tooth", "local", "freeze", "cabin",
|
||||
"creature", "merit", "sexual", "spoken", "rural",
|
||||
"frank", "blanket", "software", "settle", "profit",
|
||||
"sun", "audio", "ceramic", "barrel", "paint",
|
||||
"engage", "plant", "coupon", "guide", "poverty",
|
||||
"travel", "royalty", "index", "needle", "medium",
|
||||
"sugar", "fire", "obtain", "north", "detector",
|
||||
"safety", "drove", "shade", "nasty", "relief",
|
||||
"handy", "laptop", "create", "marine", "novel",
|
||||
"surprise", "replace", "unlock", "surge", "elephant",
|
||||
"curve", "graphic", "throat", "force", "catalog",
|
||||
"chinese", "tomato", "suspect", "bermuda", "generate",
|
||||
"scale", "sleeve", "devil", "nickname", "defeat",
|
||||
"harvard", "abortion", "brutal", "resident", "schedule",
|
||||
"mineral", "grocery", "entrance", "emoji", "sauce",
|
||||
"central", "event", "shield", "shanghai", "angry",
|
||||
"major", "pencil", "colon", "marvel", "enzyme",
|
||||
"alert", "ballet", "cloth", "merry", "passport",
|
||||
"highway", "prime", "attract", "jungle", "anchor",
|
||||
"homework", "waste", "arctic", "fluid", "jaguar",
|
||||
"crude", "mixture", "comfort", "acoustic", "auditor",
|
||||
"brochure", "break", "picnic", "cable", "hamilton",
|
||||
"fence", "regional", "wine", "flash", "velvet",
|
||||
"disable", "feedback", "emperor", "anaheim", "atomic",
|
||||
"florist", "marriage", "asthma", "shore", "switch",
|
||||
"origin", "mustang", "delight", "human", "mutual",
|
||||
"indoor", "street", "knight", "resort", "message",
|
||||
"remark", "garlic", "celtic", "design", "bloom",
|
||||
"parcel", "agenda", "symbol", "neural", "purse",
|
||||
"criminal", "double", "milk", "empty", "creative",
|
||||
"google", "american", "atlantic", "shock", "justice",
|
||||
"valley", "fabric", "microwave", "embassy", "fossil",
|
||||
"tourism", "mailman", "amazon", "lesbian", "bracelet",
|
||||
"football", "cookbook", "military", "window", "fountain",
|
||||
"blink", "parade", "sphere", "strip", "luggage",
|
||||
"receive", "frozen", "hungry", "cookie", "parent",
|
||||
"smile", "quilt", "treat", "rugby", "debate",
|
||||
"oreo", "waltz", "pearl", "miracle", "disco",
|
||||
"waffle", "wound", "rebound", "matrix", "guild",
|
||||
"salary", "cherry", "random", "shakira", "chapel",
|
||||
"expedia", "drive", "infinite", "therapy", "suzuki",
|
||||
"climate", "thong", "exotic", "boost", "innocent",
|
||||
"depot", "keyboard", "dubai", "nasdaq", "titanium",
|
||||
"flour", "viking", "frost", "grave", "harmony",
|
||||
"crack", "aquarium", "carbon", "fraction", "heart",
|
||||
"rose", "penalty", "humid", "guardian", "upset",
|
||||
"credit", "particle", "yacht", "ferry", "truth",
|
||||
"duration", "bingo", "pilot", "platinum", "cloud",
|
||||
"bikini", "lingerie", "fetish", "merchant", "mission",
|
||||
"glucose", "elite", "people", "flexible", "governor",
|
||||
"cavity", "english", "teeth", "gasoline", "magic",
|
||||
"pierce", "spirit", "exhaust", "blame", "boundary",
|
||||
"musician", "tattoo", "juice", "music", "calcium",
|
||||
"debug", "point", "canal", "office", "happy",
|
||||
"tackle", "moisture", "sponsor", "fraud", "clock",
|
||||
"eminem", "berkeley", "alpha", "blast", "oakland",
|
||||
"nerve", "southern", "patient", "london", "signal",
|
||||
"comedy", "billion", "voice", "tie", "handle",
|
||||
"holiday", "canada", "turkey", "pregnant", "helmet",
|
||||
"treasure", "station", "fatal", "check", "cornell",
|
||||
"cologne", "rap", "rebel", "sapphire", "diary",
|
||||
"charm", "cheap", "chain", "flood", "tribe",
|
||||
"lyric", "product", "search", "martial", "division",
|
||||
"shower", "resume", "playlist", "tahoe", "pharmacy",
|
||||
"genre", "punk", "majority", "walnut", "empire",
|
||||
"relay", "episode", "chief", "noble", "hygiene",
|
||||
"boba", "venice", "doll", "merge", "champion",
|
||||
"medicine", "launch", "juvenile", "hole", "realm",
|
||||
"tea", "emerald", "organic", "collar", "durable",
|
||||
"liquid", "pastor", "naughty", "chewbacca", "commerce",
|
||||
"fork", "herbal", "enemy", "heaven", "maiden",
|
||||
"scout", "pope", "violent", "kingdom", "death",
|
||||
"delete", "trade", "custody", "eilish", "chicago",
|
||||
"star", "president", "hobby", "mango", "mirror",
|
||||
"capital", "optimal", "wind", "cheat", "desert",
|
||||
"accident", "anime", "garbage", "camel", "meme",
|
||||
"terminal", "phoenix", "toxic", "sensor", "romance",
|
||||
"indiana", "surgery", "nylon", "craft", "shine",
|
||||
"revenge", "shame", "muslim", "galaxy", "honey",
|
||||
"ancient", "tribute", "serial", "cube", "electric",
|
||||
"chocolate", "history", "maple", "bedroom", "lebron",
|
||||
"bench", "slide", "midnight", "bicycle", "pitch",
|
||||
"motel", "taste", "pillow", "wizard", "market",
|
||||
"ranch", "weapon", "chrome", "shell", "trail",
|
||||
"mistake", "hospital", "park", "ikea", "hazard",
|
||||
"unwrap", "durham", "beer", "planet", "missile",
|
||||
"seattle", "separate", "economy", "relax", "daddy",
|
||||
"beverage", "intimate", "kidney", "spend", "social",
|
||||
"empire", "mustard", "fuzzy", "uncle", "dragon",
|
||||
"drama", "smell", "formula", "assassin", "podcast",
|
||||
"prefix", "failure", "triangle", "margin", "alcatraz",
|
||||
"turtle", "habitat", "elvis", "headline", "sense",
|
||||
"night", "bargain", "cherry", "diamond", "santa",
|
||||
"audit", "society", "pursuit", "footage", "sierra",
|
||||
"towel", "cotton", "penguin", "fleet", "hammer",
|
||||
"theatre", "wrist", "bumble", "sweet", "pokemon",
|
||||
"divine", "cottage", "harry", "capture", "musical",
|
||||
"illegal", "isaac", "balloon", "latex", "argument",
|
||||
"salon", "syndrome", "geology", "rocket", "prison",
|
||||
"sudden", "fairy", "guilty", "foam", "earth",
|
||||
"bishop", "ballot", "honor", "essence", "divorce",
|
||||
"laundry", "comment", "engine", "trek", "unit",
|
||||
"reach", "network", "village", "jewish", "europe",
|
||||
"sleep", "trend", "garage", "greece", "beast",
|
||||
"closure", "spare", "eagle", "paradise", "sperm",
|
||||
"delay", "comic", "radical", "allergy", "parasite",
|
||||
"tokyo", "orange", "announce", "twist", "basement",
|
||||
"grade", "priority", "bunny", "single", "marathon",
|
||||
"smoke", "apollo", "growth", "spine", "moment",
|
||||
"reunion", "machine", "envelope", "paste", "rehab",
|
||||
"registry", "antibody", "gossip", "latitude", "flavor",
|
||||
"divide", "sheet", "pound", "function", "stanford",
|
||||
"tablet", "panel", "swift", "shuttle", "saint",
|
||||
"school", "mystery", "campaign", "academy", "attitude",
|
||||
"cream", "ozone", "carnival", "horizon", "dispute",
|
||||
"korean", "romantic", "integral", "library", "height",
|
||||
"courage", "mirage", "costume", "screw", "refresh",
|
||||
"carpet", "newbie", "yahoo", "facility", "count",
|
||||
"inbox", "alarm", "measure", "serum", "remain",
|
||||
"league", "touch", "patch", "marsh", "field",
|
||||
"myspace", "facial", "journey", "suite", "lifetime",
|
||||
"friend", "freedom", "tissue", "eligible", "scary",
|
||||
"dialogue", "click", "tolkien", "dispatch", "chart",
|
||||
"channel", "notebook", "drill", "daisy", "project",
|
||||
"change", "space", "patio", "beatles", "stand",
|
||||
"crystal", "sequence", "recipe", "couple", "jersey",
|
||||
];
|
||||
Loading…
Reference in a new issue