-
-
Save MagnusThor/c1e79e0bcd7cd24ce319 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Old Guys Rule | Man Myth Legend</title> | |
| <link href="css/default.css" rel="stylesheet" /> | |
| <script> | |
| var basePath = "/audio/"; | |
| var Effects = {}; | |
| </script> | |
| </head> | |
| <body> | |
| <canvas id="surface"></canvas> | |
| <script src="js/lib/noc/Noc.beta.js"></script> | |
| <script src="js/lib/scriptProcessor.js"></script> | |
| <script src="app/effects.js"></script> | |
| <script src="js/lib/tinysid.js"></script> | |
| <script> | |
| var engine; | |
| var assets; | |
| var audio; | |
| var mml = function (evt) { | |
| ScriptNodePlayer.createInstance(new SIDBackendAdapter(), "/audio/", [], true, function() { | |
| }, | |
| function () { | |
| this.play(); | |
| }, function(parameters) { | |
| console.log("doOnTrackEnd"); | |
| }); | |
| engine = new Noc.Engine("#surface"); | |
| audio = new Noc.Audio(); | |
| engine.start(); | |
| ScriptNodePlayer.getInstance().loadMusicFromURL("Spijkerhoek_3.mp3", { basePath: "/audio/" }, function () { | |
| engine.addEntity(new Effects.Plasma()); | |
| var spectrum = new Effects.Spectrum(ScriptNodePlayer.getInstance()._scriptNode); | |
| engine.addEntity(spectrum.entity); | |
| var fade = new Effects.Fade(); | |
| fade.onlifetimeend = function() { | |
| console.log("!"); | |
| engine.removeEntity("fade"); | |
| engine.removeEntity("plasma"); | |
| engine.addEntity(new Effects.Fractal()); | |
| }; | |
| engine.addEntity(fade); | |
| // engine.addEntity(new Effects.SomeFx()); | |
| }); | |
| } | |
| document.addEventListener("DOMContentLoaded", | |
| mml | |
| ); | |
| var p, snd; | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment