Every year I promise myself I’ll spend some time learning 3D graphics programming and just about every year I fail miserably at finding the time to do so. So in a desperate attempt not to let the same happen again this year I thought I’d do some tinkering with three.js. Here are two quick demos I put together.

tunnel-1tunnel-2

Both use a spline to generate a 3D tunnel, which I then move the camera along. The first tunnel is coloured by mapping its geometry’s normal vectors to RGB values. In the second demo I send the tunnel’s vertices to a particle system, which let’s you see the tunnel in its entirety as you move through it. Now all I need to do is convince my buddy Ian to give me his Oculus Rift headset and get that hooked up. How’s about it Ian?

UPDATE: You can now find the source for both demos on GitHub here.

  1. Nice. Are the projects on GitHub or similar? I know I can manually follow the page source to main.js, but I’m very lazy as you well know 🙂

    Oh, happy festive season of over indulgence, or Happy Christmas, depending on your predilections 🙂

  2. I’ll stick the code on GitHub tomorrow if I get a chance. Pester me if it looks like I’ve forgotten 🙂

    Christopher (Author)
  3. I also have been playing with it, the are doing a great job, but webgl isn’t an option now, have a lot of problems with different platforms, isn’t the same in Explorer, Firefox or Chrome, in mobile it runs 1 frame per second…

    Now I’m with Minko, but I miss Papervision.

    Here is my three.js christmas experiment, rotate it keeping pressed mouse button and moving. Music is not mine is from explosions in the sky, open it in chrome or firefox.

    http://navidad.arana.ws/

    jdearana
  4. Nice! Thanks for sharing!

    Christopher (Author)
  5. Better late than never. The source code for both demos is now on GitHub at: https://github.com/ccaleb/threejs-experiments

    Christopher (Author)