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

Update to Mapbox 2.2 #146

Closed
2 tasks done
jscastro76 opened this issue Dec 14, 2020 · 7 comments
Closed
2 tasks done

Update to Mapbox 2.2 #146

jscastro76 opened this issue Dec 14, 2020 · 7 comments
Assignees
Milestone

Comments

@jscastro76
Copy link
Owner

jscastro76 commented Dec 14, 2020

New Mapbox 2.0 brings the important new feature of having finally a 3D terrain, among others such as sky layers and free camera movement.
We'll need to analyze the impact of the change to support Mapbox 2.0 as there are important changes in the Perspective Matrixes calculations, including the max pitch change.

  • Depth calculation
  • Examples
@mohong
Copy link

mohong commented Dec 28, 2020

The model went through the wall when I update to Mapbox 2.0.

image

Here is a gif:
6

@jscastro76
Copy link
Owner Author

jscastro76 commented Dec 28, 2020

The model went through the wall when I update to Mapbox 2.0.

As said in this issue description, mapbox 2.0 is the first major update in 2 years, and has changed completely the way they calculate the depth including a new free camera mode. It would require some investigation first, at first sight now maxPitch is > 60 which was a limit before

@KarimJedda
Copy link

I think an important consideration would be as well the new licensing model for mapbox v2 and whether or not this has implications on the licensing for this library.

@jscastro76
Copy link
Owner Author

I think an important consideration would be as well the new licensing model for mapbox v2 and whether or not this has implications on the licensing for this library.

Well, this library is a three.js plug-in, it doesn’t embed mapbox, so the licensing will always depend on the developer side to configure it properly with the right licensing, as it’s nowadays.

@Stefwint
Copy link

Hi @jscastro76, I'm using your library for building shadows and it is working very nice. For version 2.0 of mapbox it doesn't work yet. Are you working on this? If so, do you have an estimation of when this will be supported?

@jscastro76
Copy link
Owner Author

Hi @Stefwint, thanks for the feedback
Update to Mapbox 2.0 is definitely in the backlog, but not estimated yet a date for supporting it.

The main issue is the depth calculation between Mapbox extrusions and 3D Objects, as shown above in a gif. But it's not the only one because I haven't reviewed yet all the changes in Mapbox 2.0 that also affect the style sources. The shader created to paint the buildings shadows is based on this.map.style.sourceCaches which is now private and return different values.

Long story short, I cannot have a estimated date for this yet, it needs much more research.

@jscastro76
Copy link
Owner Author

@mohong, @KarimJedda I have finally solved the depth issues with Mapbox 2.0... 2.2.0 indeed... so this will be available very soon
@Stefwint I still fighting with the shadows

@jscastro76 jscastro76 self-assigned this Apr 7, 2021
@jscastro76 jscastro76 added this to the v2.2.2. milestone Apr 7, 2021
@jscastro76 jscastro76 changed the title Update to Mapbox 2.0 Update to Mapbox 2.2 Apr 7, 2021
jscastro76 added a commit that referenced this issue Apr 7, 2021
  - #225 Mapbox 2.2: Update Depth calculation keeping compatibility with previous versions
  - #226 Mapbox 2.2: Update all the examples (14-buildingshadow & 17-azuremaps not updated)

#### 📝 Documentation
- Updated [documentation](/examples/readme.md) (Added a note on the examples updated to Mapbox 2.2.0)
jscastro76 added a commit that referenced this issue Apr 11, 2021
Minor version by [@jscastro76](https://github.com/jscastro76), some enhancements and bugs.

**WARNING**: This version updates to Mapbox **2.2.0**. Despite v1.11.1 still supported, if used, some features from mapbox v.2.0.1 won't be obviously available such as sky layers.
**Known issue**: `BuildingShadow` wont work as the definition of the layers has changed.

#### ✨ Enhancements

Add a better light for night on 14-buildingshadow.html example #118
- #146 Update to Mapbox 2.2
  - #225 Mapbox 2.2: Update Depth calculation keeping compatibility with previous versions
  - #226 Mapbox 2.2: Update all the examples (14-buildingshadow & 17-azuremaps not updated)
  - #232 Mapbox 2.2: Add sky layer as an option in threebox
  - Updated example [07-alignmentTest.html](https://github.com/jscastro76/threebox/blob/master/examples/07-alignmentTest.html)
  - Updated example [12-add3dmodel.html](https://github.com/jscastro76/threebox/blob/master/examples/12-add3dmodel.html)
  - Updated example [13-eiffel.html](https://github.com/jscastro76/threebox/blob/master/examples/13-eiffel.html)
- #224 Ignore worker_threads
- #229 tb.dispose() in dev mode not working. It was removed from three.js but not included in migration guide.
- #234 Update all the examples to include antialias: true in the webglcontext

#### 🪲 Bug fixes
- #223 Can't resolve worker threads
- #230 Module not found: Can't resolve 'worker_threads' (duplicated #223)

#### 📝 Documentation
- Updated [documentation](/examples/readme.md) (Added a note on the examples updated to Mapbox 2.2.0)
- Updated [Threebox documentation](/docs/Threebox.md) (public cdns data, `sky` attribute and property, `tb.createSkyLayer`, `tb.getSunSky`, `tb.updateSunSky`, `tb.updateLightHelper`, )
- Updated [Examples](/examples) documentation (new sky layers in 7, 12, 13).
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

4 participants