Experiments - Team-Hamsa/calebhamsa.fun GitHub Wiki
Search the code for ๐งช Try this! to find them all. Some favorites:
- Night sky: in
css/blocks.css, change--skyto#1a1a40. - Old-time tuning: in
js/music-theory.js, changeA4_HZfrom 440 to 415. - Long notes: in
js/sound.js, setNOTE_SECONDSto 3. - Hear the click: set
ATTACK_SECONDSto 0, then tap a block. - A new chord: add
sus4: [0, 5, 7],toCHORDS, then copy a chord button inmusic.htmland change it todata-chord="sus4". - A new scale: add
blues: [3, 2, 1, 1, 3, 2],toSCALES, plus a button. - Wild rainbow: in
js/draw.js, setRAINBOW_STEPto 30. - Hot pink: add
'#ff69b4'toCOLORS. - Four fading copies: in
js/trace.js, setFADE_OPACITIESto[0.6, 0.4, 0.2, 0.1]. - New favorite thing: add an
<li>to the list inindex.html. - Redraw the app icon: change letters in
img/icon-pixels.txt(try a different letter instead of the C), then runnode tools/make-icons.js. - Slow-motion sand: in
js/build.js, setTICKS_PER_SECONDto 2. - Dimmer lamps: in
js/blocks/electric.js, change the lamp'sresistanceto 2. - Slow-motion water: in
js/fluids.js, setFLUID_STEPSto 1. Or make long pipes sluggish: setPIPE_EASEto 0.1. - Super gears: in
js/blocks/gears.js, give the big gear 24 teeth: small gears it drives spin 3 times as fast. - Easy carbon: in
js/chem/book.js, change the N step's goal from 3 carbon molecules to 1. - Your own molecule: add one to
js/chem/kid-names.jswith its SMILES, a name and a fact, then runnpm test. - A different machine: in
js/blocks/gears.js, setMACHINE_Kto 2: motors turn half as fast but push twice as hard, and generators make twice the volts. Then try to build a machine that runs by itself. (You can't: the same number is used both ways.)
And three to do on the Build page, with no code at all (they are on the โ๏ธ Gears page):
- The tell-tale lamp: a lamp in a row with a motor (and two batteries) is nearly dark when the motor runs free, bright while it lifts a crate and brightest when it is stuck.
- Help the crank: two batteries wired against a cranked generator drive it faster than the crank can go.
- Swap them: swap a generator block for a motor block. It works just the same.
And three for the ๐ง Water page:
- How deep can you make it squirt? Build a tall tank of water. Dig one hole in its side near the top, and one near the bottom. Which squirts harder? (Deep water presses harder.)
- Pipe first, or water first? Build a tall tank with a pipe out of its foot. Do it once laying the pipe before you pour the water in, and once after. Does the water run out just as fast? (It should: only how the build stands now matters, not how you got there.)
- Where does the wheel go? Put a water wheel (with a block on top of it) at the end of that pipe, with a drop right after it. Fill the tank and watch how fast the wheel turns. Then put the wheel in the middle of the pipe instead. Where is it faster? (At the end: that is where the water's push is used up. Now make the tank taller.)