const marching_blob = await fetch('https://cdn.jsdelivr.net/gh/charlieroberts/marching@main/dist/index.js') | |
const marching_txt = await marching_blob.text() | |
eval( marching_txt ) | |
window.screamer = await import('https://cdn.jsdelivr.net/gh/charlieroberts/screamer@latest/screamer.js') | |
window.screamer = screamer.default | |
const screamerlang_blob = await fetch('https://cdn.jsdelivr.net/gh/charlieroberts/screamer@latest/screamer-lang.js') | |
const screamerlang_txt = await screamerlang_blob.text() | |
eval( screamerlang_txt ) |
const marching_blob = await fetch('https://cdn.jsdelivr.net/gh/charlieroberts/marching@main/dist/index.js') | |
const marching_txt = await marching_blob.text() | |
eval( marching_txt ) | |
window.screamer = await import('https://cdn.jsdelivr.net/gh/charlieroberts/screamer@latest/screamer.js') | |
window.screamer = screamer.default | |
const screamerlang_blob = await fetch('https://cdn.jsdelivr.net/gh/charlieroberts/screamer@latest/screamer-lang.js') | |
const screamerlang_txt = await screamerlang_blob.text() | |
eval( screamerlang_txt ) |
ConductorM = { | |
add( ...agents ) { | |
ConductorM.agents.push( ...agents ) | |
}, | |
agents:[], | |
articulation( v ) { | |
}, |
inRange
-
sum
-
equals
-
getProp
-
setProp
-
move
- convenience that calls setProp
on x,y,z
You can find Hydra at: < hydra >
The easiest way to get started is to start changing numbers in existing sketches (you can load new random sketches by hitting the reload button in the upper right corner) and hitting ctrl+shift+enter to see how your results change after modifying the code.
There’s lots of commented examples to look at here: hydra-examples/0-getting-started.js at master · ojack/hydra-examples · GitHub
And there’s documentation for the various functions at: hydra/funcs.md at master · ojack/hydra · GitHub
Let’s start by creating an oscillator similar to what we did in The Force:
This demo tutorial will mainly focus on getting started using marching.js playground, a browser-based tool for live coding with ray marchers. I’ve added some extra information at the beginning on the demoscene, which was an important source of inspiration for marching.js. Here’s a recent article on the demoscene: Here’s some Sanity, literally, and Amiga Dreams as read for you in French - CDM Create Digital Music
The demoscene is a culture that began in the 1980s, when hackers created “cracktros” for the software they cracked… these were short audiovisual demos that showed off the skills of the hacker and often contained shoutouts to their other hackers / friends.
Over time, some hackers/artists became more interested in the audiovisual demos than they were in pirating software, and this became the birth of the “demoscene”, where programmers would create audiovisual “demos” that
// copy and paste into https://charlieroberts.github.io/marching/playground/ | |
// select all and hit ctrl+enter | |
mat1 = Material( 'phong', .05, 1, .5 ) | |
mat2 = Material( 'phong', 0, .1, .25 ) | |
march( | |
t = Twist( | |
b = Julia().material( mat1 ).scale(.4), | |
Vec2(10) | |
), |
// copy and paste into https://charlieroberts.github.io/marching/playground/ | |
// select all and hit ctrl+enter | |
// turn quality to 'high' if you have a nice gfx card | |
quality = 'med' | |
size = .01/4 | |
m = HexPrism( Vec2(size,size/16) ).material('green') | |
mirrors = [] | |
count = 19 | |