squarefeet / ShaderParticleEngine

A GLSL-heavy particle engine for THREE.js. Originally based on Stemkoski's great particle engine (see README)
http://squarefeet.github.io/ShaderParticleEngine/
MIT License
853 stars 115 forks source link

NPM Build Assumes `window.THREE` Exists #110

Closed msimpson closed 7 years ago

msimpson commented 8 years ago

While this library has module loader support by way of:

// Module loader support:
if ( typeof define === 'function' && define.amd ) {
    define( 'spe', SPE );
}
else if ( typeof exports !== 'undefined' && typeof module !== 'undefined' ) {
    module.exports = SPE;
}

Using module.exports to expose the SPE object is not sufficient without also requiring THREE as a dependency. Therefore, this library--always--needs to be shimmed to even function when loaded via NPM.

squarefeet commented 7 years ago

Thanks, I'm on it (finally).