Gay autistic trans non-binary pastel goth Twitch streamer @ https://twitch.tv/driestyosho πŸ³οΈβ€βš§οΈπŸ³οΈβ€πŸŒˆ

18+ followers only | May reshare NSFW


ubuntor
@ubuntor
⚠️ note: please don't actually use this, use this trick (and this followup) or svg animations instead... your browser will thank you

this is spin.

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

this is what it looks like.

<div style="animation: 10s linear 0s infinite spin; display: flex; justify-content: center; align-items: center">
  <!-- content -->
</div>
:eggbug:
:eggbug:
(click to play/pause animations!)

we can adjust the period using animation-duration and the phase using a negative animation-delay. (this makes the animation play immediately, but offset in time.)

<div style="animation: 10s linear 0s infinite spin; display: flex; justify-content: center; align-items: center">
  <!-- content -->
</div>

<div style="animation: 5s linear 0s infinite spin; display: flex; justify-content: center; align-items: center">
  <!-- content -->
</div>

<div style="animation: 10s linear -8s infinite spin; display: flex; justify-content: center; align-items: center">
  <!-- content -->
</div>
:eggbug:
:eggbug:
:eggbug:
:eggbug:
:eggbug:
:eggbug:

we can spin the other way by using reverse.

<div style="animation: 10s linear 0s infinite reverse spin; display: flex; justify-content: center; align-items: center">
  <!-- content -->
</div>
:eggbug:
:eggbug:

if we want to move in a circle, we can move our content to the side.

<div style="animation: 10s linear 0s infinite spin; display: flex; justify-content: center; align-items: center">
  <div style="transform: translate(100px)">
     <!-- content -->
  </div>
</div>
:eggbug:
:eggbug:

we can adjust the radius by adjusting how much we move.

<div style="animation: 10s linear 0s infinite spin; display: flex; justify-content: center; align-items: center">
  <div style="transform: translate(150px)">
     <!-- content -->
  </div>
</div>
:eggbug:
:eggbug:

we can stack spins by nesting divs that use spin.

<div style="animation: 10s linear 0s infinite spin; display: flex; justify-content: center; align-items: center">
  <div style="transform:translate(100px)">
    <div style="animation: 10s linear 0s infinite spin; display: flex; justify-content: center; align-items: center">
      <div style="transform:translate(100px)">
        <!-- content -->
      </div>
    </div>
  </div>
</div>
:eggbug:
:eggbug:

now, what if we wanted motion that was different than spin? can we move in a triangle instead?

yes! if we express our target motion as a closed path in the complex plane, we can use a fourier series to approximate it using a sum of spins! (there are many good explainers out there.)

we'll sample our target motion, compute a discrete fourier transform, then pick out the largest components for our approximation.

(implementation details: we need to cancel out each rotation before applying the next one, since otherwise subsequent rotations will be affected by it. this also has the benefit of not rotating your content, like in the previous examples. spin also goes clockwise [decreasing angle], so we need to reverse it.)

here's a triangle made from only 4 spins! (well, 8, if you count the 4 extra spins to cancel those out.)

:eggbug:
:eggbug:
here's some examples! (note: might lag browser)
2 points (square wave) (20 components)
:eggbug:
4 points (20 components)
:eggbug:
sine wave (2 components)
:eggbug:
linear (triangle wave) (8 components)
:eggbug:
sawtooth wave (20 components)
:eggbug:
triangle (20 components)
:eggbug:
square (20 components)
:eggbug:
"marquee" (20 components)
you'll need to hide the bottom and maybe a bit of the sides.
:eggbug:
"dvd screensaver" (20 components)
:eggbug:
bounce (20 components)
:eggbug:
eggbug (30 components, using @nex3's vectorized eggbug)
:eggbug:
Β 
here's a script to generate stuff! (requires numpy)

lexi
@lexi

i thought about Fourier series yesterday and i remember thinking that its only a matter of time until someone does This.

god i love cohost



blackle
@blackle

desktop firefox and chrome only
click below for hints and solutions

used these models:

10-11-2022 - updated the colours in the tile matching puzzle to be more colourblind friendly.

10-11-2022 - I've heard reports that the lights on game doesn't properly detect completion on some browsers. I can't reproduce it on edge, chrome, or firefox on windows, or chrome and firefox on linux. One person said that zooming in or out can fix it, so please try this. Worst case scenario, right click on the purple button and delete the element, this will reveal the clickable button underneath.

view hints/solutions

step 1:

hintlook for inconsistencies, and click on 'em!
solution click the screw in the bottom left corner, then click the hole just below the "blackle mori 2022" line

step 2:

hintturn on all the lights
solution this is the classic lights out puzzle, except instead of turning off lights, you need to turn them on. you can follow this guide to solve the puzzle, just invert the light-on-edness of all the instructions.

step 3:

hintonce you solve the sudoku puzzle, consider where the numbers in the circled cells could go...
solution completing the sudoku puzzle gives the code 61644, enter this into the combination lock on the top right

step 4:

hintalso called picross, nonograms can be tricky. try to get most of the left side done before moving onto the right
solution this is how the nonogram will look when solved:

step 5:

hintpretty much the same as step 3. try your best!
solution completing the sudoku puzzle gives the code 94427

step 6:

hinttry to figure out which tiles have to go in the corners first. this will whittle down the possibilities for where the rest of the tiles can go.
solution the completed tile matching puzzle looks like this:

Β