GUI Javascript library, for web audio applications developers.
<script type='text/javascript' src='https://github.jspm.io/EightMedia/[email protected]/dist/hammer.js'> </script>
<script type='text/javascript' src='https://github.jspm.io/janesconference/[email protected]/kievII.js'> </script>
define(['github:janesconference/[email protected]/kievII', ...], function(K2) { ... });
System.import('github:janesconference/[email protected]/kievII').then(function (K2) { ... });
// Get your Canvas Element ID
var targetCanvas = document.getElementById("your_canvas");
// Create a new KievII UI
var ui = new K2.UI ({type: 'CANVAS2D', target: targetCanvas});
// Set the element arguments
var ElementArgs = {
ID: 'elementID',
/* Set the element-specific arguments here (...) */
onValueSet: function (slot, value, element) {
/* element callback, called when a slot gets changed */
ui.refresh();
}
};
// Add element to the UI
ui.addElement(new K2.UIElement(gaugeArgs, {zIndex: ... }));
hint See the examples page for a quick overview of the available elements and techniques
// Remove element from the UI
ui.removeElement('elementID');