We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A lot of functions depend on cached THREE objects:
const v1 = new Vector3(); function doSomething( triangle ) { v1.copy( triangle.a ); // ... do stuff ... }
which runs a risk of functions overwriting other functions variables mid-use, etc. It might be best to refactor to use the pattern that THREE.js uses:
const doSomething = ( function() { const v1 = new Vector3(); return function doSomething ( triangle ) { // ... } } )();
Or for class members:
MeshBVHNode.prototype.doSomething = ( function() { const v1 = new Vector3(); return function doSomething ( triangle ) { // ... } } )();
Update: See MeshBVH.js for the functions that need to be updated.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A lot of functions depend on cached THREE objects:
which runs a risk of functions overwriting other functions variables mid-use, etc. It might be best to refactor to use the pattern that THREE.js uses:
Or for class members:
Update: See MeshBVH.js for the functions that need to be updated.
The text was updated successfully, but these errors were encountered: