This is an implementation for vanilla three.js projects. Check out the documented source code to see how it works and copy any relevant code. The functionality is already built into threepipe and ...