three-object-loader icon indicating copy to clipboard operation
three-object-loader copied to clipboard

Don't modify the THREE object

Open AndrewRayCode opened this issue 9 years ago • 2 comments

You shouldn't modify the THREE object passed in. As in don't do this:

THREE.OBJLoader = function...

A better pattern is to get a reference to THREE however you prefer (either as a peerDependency or force user to pass it), and use it as needed. This is the path taken by three-subdivision-modifier and three-orbit-controls

Modifying objects passed to you, especially ones that represent other libs, can be dangerous.

AndrewRayCode avatar Feb 04 '16 20:02 AndrewRayCode