An Introduction to Hydra
What is Hydra
Essentially, Hydra takes an input → modifies it → and returns an output.
There are three options for getting Hydra onto your computer. I recommend starting with the online editor before downloading the Atom package.
Using a Web Browser:
- Navigate to https://hydra-editor.glitch.me.
✨You're ready! ✨
- Download and install Atom, an open source text editor built by GitHub.
- Install inside Atom:
- Open Preferences
- Click Install on left sidebar
- Search for "atom-hydra" using search bar and click install
- Restart atom editor
- Install using APM (Atom Package Manager):
- The Atom Package Manager is a Command Line tool that you can use to install atom plugins
- Open terminal
apm install atom-hydra
To start Hydra inside Atom, click Packages in top menu bar. Under "atom-hydra" select Toggle. Press Control + Option + Enter to evaluate a block of code.
Running Locally (Requires Node):
- Open Terminal
git clone https://github.com/ojack/hydra
cd hydrato move into newly created hydra directory
- Install dependencies by running
- Start local server by running
To follow along with slides, use example files found in examples
Variables & Functions
|bpm||change bpm of hydra cycles||
|Math.abs||keep values position||
|Math.random||creates a random float between 0 and 1||
|Math.sin||sin wave for more fluid animation||
|mouse.x||x position of mouse||
|mouse.y||y position of mouse||
|time||elapse time in milliseconds||
|window.innerWidth||width of window|
|window.innerHeight||height of window|
|screencap||eval this function to save an image of your hydra sketch||