some minor syntax corrections and a rewrite of the demo index.html and css file

This commit is contained in:
bluesaxman
2022-04-07 18:31:56 -06:00
parent 2ca87fbb55
commit 5f7df39d9e
3 changed files with 85 additions and 60 deletions

View File

@@ -4,48 +4,67 @@
<link href="css/css.css" rel="stylesheet" />
<script src="libs/bluecore.js"></script>
<script src="libs/blueaudio.js"></script>
<script src="libs/bluemath.js"></script>
<script src="libs/bluepixle.js"></script>
<script src="libs/blueui.js"></script>
</head>
<body>
<p>
This project is to develop and test my own small private javascript libraries.
</p>
<p>
bluecore.js - 1.7.2 - This is as its named very basic functions like grabbing things asynchronously and such. All libraries will require this basic library.
bluecore.js - This is as its named very basic functions like grabbing things asynchronously and such. (also contains legacy functions that are depricated and replaced in other libraries now)
</p>
<p>
blueaudio.js - 1.0.4 - This is for adding/loading audio assets to a project.
blueaudio.js - This is for adding/loading audio assets to a project.
</p>
<p>
bluepixle.js - Planned - This will be for adding/loading/handling graphical assets within a HTML5 canvas context.
bluemath.js - Adds some helpful math objects such as vectors and matricies.
</p>
<p>
bluepixle.js - Adds helper classes to make using canvas with objects simple. (requires bluemath.js)
</p>
<p>
blueui.js - Adds classes for several highly reusable ui objects such as buttons and draggable windows.
</p>
</body>
</html>
<script>
document.body.innerHTML = "";
elementPlace("body","disc",null,"div",null);
elementPlace("#disc",null,null,"p",null).innerText = "This project is to develop and test my own small private javascript libraries.";
elementPlace("#disc","bluecore","library","p",null).innerText = "bluecore.js - 1.7.2 - This is as its named very basic functions like grabbing things asynchronously and such. All libraries will require this basic library.";
elementPlace("#disc","blueaudio","library","p",null).innerText = "blueaudio.js - 1.0.4 - This is for adding/loading audio assets to a project.";
elementPlace("#disc","bluepixle","library","p",null).innerText = "bluepixle.js - Planned - This will be for adding/loading/handling graphical assets within a HTML5 canvas context.";
var mySound = elementPlace("#blueaudio",null,"button","a",null);
var mySequence = elementPlace("#blueaudio","sequenceText",null,"input",null);
document.body.innerHTML = ""; // javascript enabled clear screen
window.bdescription = new buiWindow("blue.js", 400, 600, true, false, true, true);
window.bcore = new buiWindow("bluecore.js", 400, 600, true, false, true, true);
window.baudio = new buiWindow("blueaudio.js", 400, 600, true, false, true, true);
window.bmath = new buiWindow("bluemath.js", 400, 600, true, false, true, true);
window.bpixle = new buiWindow("bluepixle.js", 400, 600, true, false, true, true);
window.bui = new buiWindow("blueui.js", 400, 600, true, false, true, true);
window.bdescription.content.innerText = "This project is to develop and test my own small private javascript libraries.";
window.bcore.content.innerText = "This is as its named very basic functions like grabbing things asynchronously and such. This library also containes a lot of legacy functions for backwards compatibility.";
window.bpixle.content.innerText = "bluepixle.js - Adds helper classes to make using canveas with objects simple (requires bluemath.js)";
window.bui.content.innerText = "blueui.js - Adds classes for several reusable ui objects such as buttons and draggable windows.";
window.bmath.content.innerText = "bluemath.js - Adds some helpful math objects such as vectors and matricies.";
var baudioDescription = document.createElement("div");
baudioDescription.innerText = "blueaudio.js - This is for adding/loading audio assets to a project.";
var bluePlayer = new AudioContext();
var mySound = new buiButton("Click me for blueaudio.js demo",function () {
playSequence(window.bluePlayer,parseSequence(mySequence.value),"triangle",60);
});
var mySequence = document.createElement("input");
mySequence.id = "sequenceText";
mySequence.style.width = "100%";
mySequence.style.textAlign = "center";
mySequence.value = "5ab1/8;5g1/8;5e1/8;4bb1/8;4an1/8;5f1/8;5an1/8;6db3/8";
mySound.innerText = "Click Me for blueaudio.js demo";
var bluePlayer = new AudioContext();
mySound.onclick = function () {
playSequence(window.bluePlayer,parseSequence(mySequence.value),"triangle",60
//[
// {"note":8,"octave":5,"length":0.50,"type":"triangle"},
// {"note":7,"octave":5,"length":0.50,"type":"triangle"},
// {"note":4,"octave":5,"length":0.50,"type":"triangle"},
// {"note":10,"octave":4,"length":0.50,"type":"triangle"},
// {"note":9,"octave":4,"length":0.50,"type":"triangle"},
// {"note":5,"octave":5,"length":0.50,"type":"triangle"},
// {"note":9,"octave":5,"length":0.50,"type":"triangle"},
// {"note":1,"octave":6,"length":1.50,"type":"triangle"}
// ]
);
}
window.baudio.content.appendChild(baudioDescription);
window.baudio.content.appendChild(mySound.root);
window.baudio.content.appendChild(mySequence);
document.body.appendChild(window.bdescription.root);
document.body.appendChild(window.bcore.root);
document.body.appendChild(window.baudio.root);
document.body.appendChild(window.bmath.root);
document.body.appendChild(window.bpixle.root);
document.body.appendChild(window.bui.root);
</script>