Hydra's method-chaining API composes visual transforms as a pipeline from source to output
Every Hydra visual is built by chaining JavaScript methods on a source call. osc() generates a base oscillator; .rotate() transforms its geometry; .pixelate() applies a grid; .out() sends it to a buffer. Each method returns the same object, so transforms compose left to right and are evaluated as a GPU shader pipeline at render time. This makes the API immediately readable as a signal-flow diagram and enables incremental live-coding — you can append or remove a step mid-performance and re-evaluate the line.
Examples
osc(20, 0.1, 0.8).rotate(0.8).pixelate(20, 30).out()
Assessment
Starting from osc(20,0.1,0.8).out(), add rotate and pixelate steps one at a time and observe each transform’s effect. Predict what happens if you swap their order.