topical media & game development

talk show tell print

mobile-query-three-plugins-webaudio-examples-soundtrack.htm / htm



  <!doctype html><title>Minimal tQuery Page</title>
  <script src="../../../build/tquery-bundle-require.js"></script>
  <body><script>
  require(['tquery.webaudio'], function(){
          var world        = tQuery.createWorld().boilerplate().start();
          var object	= tQuery.createTorus().addTo(world);
  
          // enable webaudio
          WebAudio.isAvailable && world.enableWebAudio();
          
          if( WebAudio.isAvailable ){
                  tQuery.createSound().load('../../assets/sounds/eatpill.mp3', function(sound){
                          sound.loop(true).play()
                  });
                  
                  
                  // init the library without tQuery plugins to avoid the listener localisation
                  var webaudio        = new WebAudio();
                  // create a sound
                  webaudio.createSound().load('../../assets/sounds/techno.mp3', function(sound){
                          sound.loop(true).play();
                  });
  
          }
  });
  </script></body>


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.