Ecmascript 6 support

Does threejs support ecmascript 6? (javascript), I’m interested in using javascript classes.
Thanks in advance.

ES6 is fully backwards compatible, so even though three.js is written in ES5 (aside from being modularised) you can write your own application in ES6.

How about tree-shaking support?

Tree shaking doesn’t work well with three.js (with Rollup.js) at least. How that affects tree shaking your own code will depend on how it’s written.

There’s an ongoing discussion about this on github, here.