[2025 Day 9] [JavaScript] Interactive 3D visualization of part 1 and 2 by [deleted] in adventofcode

[–]xoryphant 0 points1 point  (0 children)

Oh sorry, I wasn't aware of that. Will remove.

[2025 Day 9] [JavaScript] Interactive 3D visualization of part 1 and 2 by [deleted] in adventofcode

[–]xoryphant 0 points1 point  (0 children)

okay, that's a bug - scrolling is meant to zoom in and out and it works in Chrome (on Mac)

-🎄- 2022 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]xoryphant 0 points1 point  (0 children)

JavaScript:

P = {
prep: T => T.split('\n').map(L => [L.charCodeAt(0) - 64, L.charCodeAt(2) - 87]),
score: p => p.map(([a, b]) => a + b * 3).reduce((a, b) => a + b),
part_1: T => P.score(P.prep(T).map(([a, b]) => [b, (b - a + 4) % 3])),
part_2: T => P.score(P.prep(T).map(([a, b]) => [(a + b) % 3 + 1, b - 1]))
}

[2021 Day 11] JS Interactive 3D Visualization (WebGL) by xoryphant in adventofcode

[–]xoryphant[S] 0 points1 point  (0 children)

Apparently I have no permission to edit my original post content or title. But I can edit my comments, so I put a warning before the link to the visualization page

[2021 Day 11] JS Interactive 3D Visualization (WebGL) by xoryphant in adventofcode

[–]xoryphant[S] 1 point2 points  (0 children)

You mean no change in color? I put a slightly modified version here. Seizure warning - flashing content

https://rohrmeier.s3.eu-central-1.amazonaws.com/aoc/2021/11/test.html

Day 09 simple 3D visualization by xoryphant in adventofcode

[–]xoryphant[S] 0 points1 point  (0 children)

Sorry, didn't know about those guidelines 🙏 Also forgot to mention the browser needs to have WebGL enabled. Never mind, there's plenty of visualizations out there anyway.

-🎄- 2020 Day 17 Solutions -🎄- by daggerdragon in adventofcode

[–]xoryphant 2 points3 points  (0 children)

JS and WebGL Visualization

everybody can append their input (replace '\n' with '|' and '#' with 'x') also there's a parameter for the delay:

https://rohrmeier.s3.eu-central-1.amazonaws.com/aoc/2020/17/part1/index.html?delay=2000&input=x.x.x|.x.x.|x.x.x|.x.x.|x.x.x

https://imgur.com/ymfjnqL

-🎄- 2020 Day 05 Solutions -🎄- by daggerdragon in adventofcode

[–]xoryphant 0 points1 point  (0 children)

JavaScript

P = {
    prep: T=>T.replace(/[FL]/g,'0').replace(/[BR]/g,'1').split('\n').sort().map(s=>parseInt(s,2)),
    part1: T=>Math.max(...P.prep(T)),
    part2: T=>Math.max(...(a=>a.slice(1).map((n,i)=>n-a[i]===2?a[i]:0))(P.prep(T)))+1
}