Skip to content
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

vue and threebox,map not defined #54

Closed
luojiandan opened this issue Oct 17, 2020 · 4 comments
Closed

vue and threebox,map not defined #54

luojiandan opened this issue Oct 17, 2020 · 4 comments

Comments

@luojiandan
Copy link

image
image
image

@jscastro76
Copy link
Owner

jscastro76 commented Oct 19, 2020

This works since the beginning as it comes from the original Threebox, but it´s definitely a bad practice to use a global variable in internal methods, that´s why it could crash unexpectedly if the mapbox object is not called map.
Requires a bit of analysis, not as easy as it seems as objects prototype is widely used so cannot use the internal map instance.

@jscastro76 jscastro76 added 📑 code improvement and removed 🪲 bug Something isn't working labels Oct 19, 2020
@luojiandan
Copy link
Author

@jscastro76 thanks for your replay:),yes,It has a global varable "map" in it,Let me read the code more carefully again.

@jscastro76
Copy link
Owner

@luojiandan working on this, it´s resolved for the next version

@jscastro76 jscastro76 self-assigned this Oct 28, 2020
@jscastro76 jscastro76 added this to the v2.0.7. milestone Oct 28, 2020
jscastro76 added a commit that referenced this issue Oct 28, 2020
Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.

#### ✨ Enhancements

- [**#54**](#54) vue and threebox,map not defined.
- [**#63**](#63) `CSS2DObject` is not disposing properly.
- Update example [15-performance.html](https://github.com/jscastro76/threebox/blob/master/examples/15-performance.html) to avoid dupplicated calls when dragging the count GUI control.

#### 🪲 Bug fixes

- [**#61**](#61) .userData not refreshed properly on obj.duplicate.
- [**#62**](#62) Memory Leak on tb.remove(). Tested
- [**#64**](#64) Cache instance of a loaded model is disposed when the world children is.
@jscastro76
Copy link
Owner

@luojiandan please test this in v2.0.7 release

jscastro76 added a commit that referenced this issue Nov 2, 2020
Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.

#### ✨ Enhancements

- [**#24**](#24) Refactor `obj.deepCopy`, these members must be properties found by name
- [**#54**](#54) vue and threebox,map not defined.
- [**#63**](#63) `CSS2DObject` is not disposing properly.
- [**#66**](#66) `tb.dispose` must now call `tb.clear` and return the async value
- [**#68**](#68) add new methods to remove label & tooltip
- [**#71**](#71) Defer default boundingBox and tooltip creation.
- Update example [15-performance.html](https://github.com/jscastro76/threebox/blob/master/examples/15-performance.html) to avoid dupplicated calls when dragging the count GUI control.

#### 🪲 Bug fixes
- [**#61**](#61) `.userData` not refreshed properly on `obj.duplicate`.
- [**#62**](#62) Memory Leak on `tb.remove()`. Tested
- [**#64**](#64) Cache instance of a loaded model is disposed when the world children is.
- [**#65**](#65) addTooltip and addLabel don't remove previous objects.
- [**#67**](#67) clones have `boundingBoxShadow` line in white.
- [**#69**](#69) After #56 the labels and tooltips are wrongly positioned.
- [**#70**](#70) After #56 object boundingBox has the original cached size.
- [**#72**](#72) After #56 animations are not being cloned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants