-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
add 3D model with three.js example #7977
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! The only thing I'm a bit bummed about is that it's 3+ MB to add to the repo, and it loads for a considerable amount of time before being displayed. Perhaps there's an easy way to simplify the mesh in the GLTF data?
I agree that this example should use a minimal model, I'm more concerned about the load time of the example. I've not been able to find a good sample model yet, I think it's better to at least get this example out there, and can follow up with a change of the model down the track to use something simpler. |
* publisher-production: (41 commits) bump publisher after timeout (#8058) cosmetic update to draggable Marker/point examples to prevent coordinates overlapping Mapbox logo (#8057) update mapbox style and tileset version numbers to most recent (#8056) update docs page shell (#8039) [email protected] Add create-image script to generate example thumbnails (#8029) Add HTML clusters + aggregated properties example (#8019) add 3D model with three.js example (#7977) update mapbox-gl-geocoder to @3.1.4 in examples (#7978) V0.53.1 (#7961) rename example for accepting coordinates in the geocoder (#7859) [docs] use appropriate-images for examples to increase page speed (#7900) [docs] dr-ui 0.6.0 (#7909) version bump gl-geocoder to v3.1.2 (#7924) Fix docs for Camera methods Docs page shell update 02-14-19 (#7907) fixes regression with css on examples pages (#7891) updates sentry project for docs subdomain (#7890) v0.53.0 (#7884) [docs] update dr-ui 0.5.0 (#7880) ...
* publisher-production: (41 commits) bump publisher after timeout (#8058) cosmetic update to draggable Marker/point examples to prevent coordinates overlapping Mapbox logo (#8057) update mapbox style and tileset version numbers to most recent (#8056) update docs page shell (#8039) [email protected] Add create-image script to generate example thumbnails (#8029) Add HTML clusters + aggregated properties example (#8019) add 3D model with three.js example (#7977) update mapbox-gl-geocoder to @3.1.4 in examples (#7978) V0.53.1 (#7961) rename example for accepting coordinates in the geocoder (#7859) [docs] use appropriate-images for examples to increase page speed (#7900) [docs] dr-ui 0.6.0 (#7909) version bump gl-geocoder to v3.1.2 (#7924) Fix docs for Camera methods Docs page shell update 02-14-19 (#7907) fixes regression with css on examples pages (#7891) updates sentry project for docs subdomain (#7890) v0.53.0 (#7884) [docs] update dr-ui 0.5.0 (#7880) ...
Launch Checklist
Adds an example for adding a 3D model to a Mapbox map using three.js. This is quite a common request and having an official example should help point people in the right direction.
Give we have https://docs.mapbox.com/mapbox-gl-js/example/custom-style-layer/ this is probably enough to close #7330
To give credit where it's due, this example started off as @ansis's debug page, which was then developed by @andrewharvey into https://bl.ocks.org/andrewharvey/7b61e9bdb4165e8832b7495c2a4f17f7, which was further developed by @ryanbaumann into https://bl.ocks.org/ryanbaumann/b9725e79b5b1742d92ada00ddbf5c3d3, and finally further developed by @andrewharvey into this.
The 3D model included as an asset is public domain https://nasa3d.arc.nasa.gov/detail/jpl-vtad-dsn70 https://github.com/nasa/NASA-3D-Resources. I'm open to using something else if anyone has anything better, like a detailed skyscaper, but I think it's more important to get an official example than be held up by what it looks like.