
Learning Three.js: The JavaScript 3D Library for WebGL - Second Edition
By :

Three.js is a JavaScript library, so all you need to create Three.js WebGL applications is a text editor and one of the supported browsers to render the results. I would like to recommend two JavaScript editors, which I've started using exclusively over the last couple of years:
Even if you don't use any of these editors, there are a lot of editors available, open source and commercial, which you can use to edit JavaScript and create your Three.js projects. An interesting project you might want to look at is http://c9.io. This is a cloud-based JavaScript editor that can be connected to a GitHub account. This way, you can directly access all the source code and examples from this book and experiment with them.
Besides these text-based editors that you can use to edit and experiment with the sources from this book, Three.js currently also provides an online editor itself.
With this editor, which you can find at http://threejs.org/editor/, you can create Three.js scenes using a graphical approach.
I mentioned that most modern web browsers support WebGL and can be used to run Three.js examples. I usually run my code in Chrome. The reason is that most often, Chrome has the best support and performance for WebGL and it has a really great JavaScript debugger. With this debugger, which is shown in the following screenshot, you can quickly pinpoint problems, for instance, using breakpoints and console output. This is exemplified in the following screenshot. Throughout this book, I'll give you pointers on debugger usage and other debugging tips and tricks.
That's enough for an introduction to Three.js for now; let's get the source code and start with the first scene.
Change the font size
Change margin width
Change background colour