Browse Source

idk lol

master
Charlie Ritter 2 months ago
parent
commit
ca300d186e
6 changed files with 14 additions and 5 deletions
  1. +0
    -1
      .gitignore
  2. +3
    -2
      art/index.html
  3. +1
    -1
      art/index.js
  4. +1
    -0
      art/index.js.map
  5. +8
    -1
      art/src/shutin.ts
  6. +1
    -0
      covidct/index.js.map

+ 0
- 1
.gitignore View File

@ -7,4 +7,3 @@
*.fls
*.synctex.gz
node_modules/
*.js.map

+ 3
- 2
art/index.html View File

@ -17,12 +17,13 @@
<header>
<h1><a href="..">&larr;</a>SOPHIE - Is It Cold in the Water?</h1>
</header>
<main>
</main>
<main></main>
<footer>
<p>Music Copyright &copy; <a href="https://msmsmsm.com/">SOPHIE</a><br>
Visuals Copyright &copy; Charlie Ritter 2020
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" src="/images/cc.png" class="license"></a>
<br>
<a href="src">Source</a>
</p>
<script src="index.js"></script>
</footer>

+ 1
- 1
art/index.js
File diff suppressed because it is too large
View File


+ 1
- 0
art/index.js.map
File diff suppressed because it is too large
View File


+ 8
- 1
art/src/shutin.ts View File

@ -25,17 +25,24 @@ function main(sound: Sound) {
const startTime = performance.now()
space.add((time: number | undefined, ftime: number | undefined) => {
// Stars
if (sound.playing) {
form.fillOnly(RED).points(Create.distributeRandom(space.innerBound, ftime || 0), 3, 'circle')
}
// Red rectangle
const t = (time || 0) - startTime
const rect = Rectangle.fromCenter(space.center, space.size.$divide((t ** 0.3) * 0.1 - 1))
form.fillOnly(RED).rect(rect)
// Lightning
const td = sound.timeDomainTo(space.size)
form.fillOnly('lightgrey').points(td.rotate2D(Math.PI / 2, space.center), 10, 'square')
// Slug
const fd = sound.freqDomainTo(space.size)
fd.forEach((pt, i) => {
const normal = Num.cycle( 1 - i / fd.length, Shaping.exponentialIn)
const normal = Num.cycle( i / fd.length, Shaping.exponentialIn)
const height = normal * fd.length
const point = [pt.x, space.height - pt.y]
form.fillOnly(colors[i % colors.length])

+ 1
- 0
covidct/index.js.map
File diff suppressed because it is too large
View File


Loading…
Cancel
Save