Skip to content

Commit

Permalink
chore: add some docs, fix focus and search box
Browse files Browse the repository at this point in the history
  • Loading branch information
delanni committed May 5, 2024
1 parent aa99047 commit 57e179a
Showing 1 changed file with 39 additions and 14 deletions.
53 changes: 39 additions & 14 deletions bundle.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -47199,6 +47199,7 @@
}
}

window.focusEditor = () => document.querySelector('.CodeMirror textarea').focus();
window.xemitter = emitter;

emitter.on('DOMContentLoaded', function () {
Expand Down Expand Up @@ -47417,6 +47418,7 @@

repl.eval(code, (string, err) => {
editor.flashCode()
editor.setValue(code);
if (!err) sketches.saveLocally(code)
})
});
Expand Down Expand Up @@ -47616,8 +47618,20 @@


// TODO: copy
let searchIsVisible = false;
emitter.on('gallery:search', () => {
if (searchIsVisible) {
document.body.removeChild(document.getElementById('autocompleteList'));
document.body.removeChild(document.getElementById('autocompleteInput'));
searchIsVisible = false;
window.focusEditor();
return;
} else {
searchIsVisible = true;
}

const autocompleteInput = document.createElement("input");
autocompleteInput.id = 'autocompleteInput';
autocompleteInput.setAttribute("list", "autocompleteList");
autocompleteInput.type = "text";
autocompleteInput.style = "z-index:100; position: absolute; top: 20%; margin: auto; left: 0; right: 0; width: 50%;"
Expand Down Expand Up @@ -47655,6 +47669,16 @@

document.body.removeChild(autocompleteInput);
document.body.removeChild(autocompleteList);
searchIsVisible = false;
window.focusEditor();
});
autocompleteInput.addEventListener('keyup', (evt) => {
if (evt.key === 'Escape') {
document.body.removeChild(autocompleteInput);
document.body.removeChild(autocompleteList);
searchIsVisible = false;
window.focusEditor();
}
});
})

Expand Down Expand Up @@ -47705,26 +47729,27 @@
"hide-info": "hide info window"
},
info: {
title: 'hydra',
subtitle: 'live coding video synth',
description: 'Hydra is live code-able video synth and coding environment that runs directly in the browser. It is free and open-source and made for beginners and experts alike.',
title: 'hydra(lisk)',
subtitle: 'live coding video synth - v2',
description: 'Hydra is live code-able video synth and coding environment that runs directly in the browser. It is free and open-source and made for beginners and experts alike.\nHydralisk is a proprietary fork, with added features.',
'get-started-title': 'To get started:',
'get-started-list': [
'Close this window',
'Change some numbers',
'Type Ctrl + Shift + Enter'
'Go to https://hydra.ojack.xyz - and learn the basics.',
'Come back, and play with the advanced features!'
],
'description-detailed': 'Hydra is written in JavaScript and compiles to WebGL under the hood. The syntax is inspired by analog modular synthesis, in which chaining or patching a set of transformations together generates a visual result.',
'uses': 'Hydra can be used:',
'description-detailed': 'The core usecase for hydralisk is to extend functionality towards more stage-playability, with a few performance features and helpers.',
'uses': 'Here are the extra added hotkeys as of now:',
'uses-list': [
'to mix and add effects to camera feeds, screenshares, live streams, and videos',
'to create generative and audio-reactive visuals, and share them online with others',
'in combination with other javascript libraries such as P5.js, Tone.js, THREE.js, or gibber',
'to add interactive video effects to a website',
'to experiment with and learn about video feedback, fractals, and pixel operations',
'to stream video between browsers and live-jam with others online'
'CTRL+Shift+(0/1/2/3/4/5) => (disable/1x/2x/4x/8x/16x) automutate mode. 1x corresoponds to 1x per beat. 16x corresponds to 1x per 16 beat (4 bars)',
'CTRL+Shift+X => toggle manual automutate mode',
'CMD+[ => Jump back 1 (jumps back 1 in the autosave history, which is 10 automutates)',
'CMD+Shift+[ => Jump back 5 (jumps back 5 in the autosave history, which is 50 automutates)',
'CMD+S => Execute and quick save',
'CMD+L => Quickload (jump back to the quicksaved version)',
'CTRL+Shift+C => Toggle search by name'
],
'author': 'Created by <a {{author}}>olivia.</a>',
'author': 'Created by <a {{author}}>olivia.</a>, tuned by <a href="https://github.com/delanni">Alex</a>',
'more-info': 'For more information and instructions, see: <a {{docs}}>the interactive documentation</a>, <a {{functions}}>a list of hydra functions</a>, <a {{garden}}>the community database of projects and tutorials</a>, <a {{gallery}}>a gallery of user-generated sketches</a>, and <a {{repo}}>the source code on github</a>,',

'more-info-forums': 'There is also an active <a {{discord}}>Discord server</a> and <a {{facebook}}>facebook group</a> for hydra users+contributors.',
Expand Down

0 comments on commit 57e179a

Please sign in to comment.