Skip to Content

Debugging Three.js

| Three.js

If you’re in the stages of creating a webGL game or app using three.js you may find it useful to visualize what your code is doing. That’s where the need for a debugger/inspector comes into play. Here are a few ways to do it.

Unity3D vs. Three.js

| Three.js

Why is this important knowledge? You may be looking into both options as whether you're planning to build online games, a plugin for your website, etc. Unity3D and three.js are certainly both great options that can accomplish similar things but definitely very different. I've fortunately been able to dip into both a bit. Hopefully you'll find this useful...

Smooth Mouse Rotation in Three.js

| Three.js

Achieving a momentum effect during mouse drag has always been a nice feature that I've see many times in different examples of 3D for the web. After experimenting with three.js and seeing it's potential I thought this is a must have feature. The problem I found though is that from the examples that use it, it was difficult to find proper source code that worked just how I wanted it.

Antialiasing in Three.js

| Three.js

One of the hurdles of 3D is aliasing (jagged edges when rendering). Depending on your hardware and browser, three.js has a built in function to help with this (top left - without antialiasing, top right - with antialiasing)...

Importing a Model Into Three.js

| Three.js

We'll be using Blender (currently version 2.70 at the time of this writing) as our go-to 3d program for our lessons. The best part about it is that it's free. If you haven't used it before, there are countless online tutorials on the web to get you started. The main thing is though to get your model from a 3d modelling program into a format that three.js can use...

Creating a Basic Scene in Three.js

| Three.js

Here we will create a basic scene complete with an animated transparent cube in three.js. Though most beginner examples on the net show scenes loaded right from an HTML page, we'll set it up using an external file as it's generally good practice to keep your .js files separate when dealing with any kind of code that may become more than a few lines now or in the future.

Introduction to Three.js

| Three.js

Common problems with 3d for the web

I’ve always been interested in bringing 3d to the web which has been available in various ways, but there’s never really been any standard as to how it would be accomplished. I’ve found the result has been a mix of third party plugins, Java, WEB3D, VRML, faking 3d through a 2d engine or some heavily layered JavaScript.