-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
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
'duplicate()' Function Bug #16
Comments
Hi @joshnice |
Hi @jscastro76, Yes I am. |
Clearly a bug, I can repro it too... I'm guessing the clone method is not doing what it should be as I had some issues with this method when I included CSS2DObjects that was accepted as new feature by THREE.js CSS2DObjects |
@JSCastro Ok, thank you very much. |
Hi @joshnice, just an update on this... this is becoming serious and seems the bug is in THREE.js as long as I can repro the bug WITHOUT Threebox code!! |
Hi @joshnice , I have reported this at three.js repo Error "Cannot read property 'isEmpty' of undefined" when cloning a Geometry with a Box3Helper. |
I found the solution, just adding a Box3Helper.prototype = Object.assign(Object.create(LineSegments.prototype), {
constructor: Box3Helper,
copy: function (source) {
LineSegments.prototype.copy.call(this, source);
this.box = source.box.clone();
return this;
}
}); I'll wait for their reply because it seems a clear and easy bug and I provided also de fix. If they don't include it in an upcoming release I will add it manually to our thee.js bundle |
@joshnice I've just pushed the change in the three.js bundle and I rebuilt threebox.js and threebox.min.js Could you please pull and check if it solves your issue?? I've done a local test where I reproduced your issue and it works |
@jscastro76 The fix has solved the bug for me! Thanks for your help. |
Great to hear, let's wait for THREE.js guys to check if they accept it as a bug and apply the fix. |
Hi, as commented previously on a different post, I am currently in the process of updating from peterqliu's threebox library to this forked version, I think I may of come across a bug with the 'duplicate' function. Below is the JavaScript code from a modified example of logistics (also a google drive shareable link which contains the whole example HTML file), which duplicates a model and tires to call setCoords. However once setCoords is called an error is thrown in the console and the model is not added to the map.
Console errors:
Modified file: https://drive.google.com/file/d/1AOfWV_ISFghaDHDRJMsG6T8pIgj9Gtej/view?usp=sharing
Modified JavaScript:
`
The text was updated successfully, but these errors were encountered: