Jump to content

Crystals sketch...


Recommended Posts



A small sketch incorporating Tone.js with Babylon. It seems like the two timing systems work reasonably well together, and with stress testing I only came across a few occasional 'hung' notes which disappeared when un-focusing / re-focusing the browser.

The audio works by far the best in Chrome, and in Firefox produces some 'pops' and 'crackle' (as it does with any use of web audio still unfortunately :mellow: ).

The crystals are a Babylon interpretation of Amanda Glosson's Spinning Ball of Crystal which was done in three.js.

Both the crystals and the audio are generated in the code... no models or audio files! So feel free to 'view source' and see how it works ;)

PS. I hope it's okay to post these things in the main forum? I didn't see a thread for small sketches, like there is with the 'projects' thread.

Link to comment
Share on other sites

I'm glad to hear that davrous! Can't wait to get the official release of win10 on my Surface Pro 3 :D And another engine that runs the Web Audio API? Bliss!


Amazing  !!!  I love this !!!

Of course you can post this here : you MUST do it actually.

Even in the playground, so everyone can understand and play with the code.. pliiiiiiiiizz

I started the sketch in the playground, but unfortunately I got the 'Unable to save your code. It may be too long.' error when I tried to save it :( The code is still all there if you view source nonetheless. And I ensured not to minify the scene.js code so anybody can look through it and see what's going on (and how sketchy my coding was lol).

It hasn't been optimised, and infact is de-optimised, with lots of excess calculations rather than holding values in variables because I wanted to test Babylon running with Tone.js.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...