How to build three.js from sources

I'm having trouble getting three.js to build - the resulting three.js file three.js significantly different from what I downloaded.

This is probably due to the comment โ€œThis page is currently invalid and needs to be rewrittenโ€ on this page in the wiki, [โ€œHow to generate a compressed threeโ€] ( https://github.com/mrdoob/three.js/wiki/build .py , -or-how-to-generate-a-compression-Three.js file).

However, I am a little up to the tree.

I would like to add a collision exception to Raycaster.js/intersectObject() , but rebuilding interrupts my application without errors or warnings in the console.

I tried with various permutations of the possible --include , with variable but unsuccessful results.

I'm not even trying to create a smaller version.

I'm on OSX.

Any pointers are appreciated.

+4
source share
1 answer

In the terminal window, go to utils / build and run:

 python build.py --include common --include extras --output ../../build/three.js 

Or ... run the shell file file :

 ./build.sh 
+7
source

Source: https://habr.com/ru/post/1484523/


All Articles