ThreeJs on Github - Where the Magic Happens!

three.js ON GITHUB - WHERE THE MAGIC HAPPENS! 

Everything officially related to the three.js project is kept in one huge repository on Github. It’s maintained by the original creator of three.js, @mrdoob (AKA Ricardo Cabello), along with an army of open-source aficionados.
It’s a huge and active repo - the 7th most starred Javascript library on Github, and the 8th most forked. Its up there with superstars like ReactjQuery, and Node.js.
There’s a lot to see here, but we only need to look inside a couple of folders for now. Go ahead and open the repo if you want to take a look now, but feel free to skip ahead and come back to this chapter later if you’re eager to get started.

The build/ Folder

Here are the three versions of the three.js core, one of which you need to include in your project:
  • three.js
  • three.min.js
  • three.module.js
We’ll cover the various ways of getting a hold of these files in Ch 0.6: How to Include three.js in Your Projects.

The examples/ Folder

The main thing that this folder holds is source code for the official examples, bu there are a lot of useful goodies contained here too, such as:
  • plugins in the examples/js folder (also known by the community as examples, confusingly)
  • fonts for use with the FontLoader
  • models in many different formats
  • sounds
  • textures
  • loaders to help you load models created in other applications
  • … and lots more. Everything you need to learn how to use three.js is here - except for this book!
You can view live versions of the examples here. You should definitely make sure that you are familiar with these and whenever you are working to understand a new feature of three.js, check the examples to see if there is one that covers it and go over the corresponding source code.
Nearly everything in this folder is covered by the same MIT license as three.js, which means that you are free to use anything in your own projects, in any way that you like.

The src/ Folder

The uncompiled three.js source files are all contained here, in the src/ folder. While you are learning to use three.js you won’t need to look in here that often, but as you become more proficient you’ll probably need to know how the actual three.js code is implemented. To make things easier, every docs page has a direct link to the relevant file in the src/ folder.

Other Folders

There are a couple of other folders in addition to the ones mentioned above. We won’t be covering them further in this book, but you may find their contents useful:
  • docs/: All the files related to the official documentation and tutorials are here, although you’ll probably find thelive version easier to read!
  • editor/: The three.js community maintains an editor. If you want to look at the code, here it is, although again the live version will probably be more useful.
  • test/: three.js unit tests are kept here. Unless you start developing for three.js you don’t need to concern yourself with these.
  • utils/: A collections of utilities, including some simple HTTP servers.

Comments

Popular posts from this blog

How to download a file using command prompt (cmd) Windows?

The future of Artificial Intelligence: 6 ways it will impact everyday life

How to Include ThreeJs in Your Projects