Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[core, node] Support axonometric rendering - #10064

Merged
lbud merged 5 commits into
masterfrom
axonometric
Oct 14, 2017
Merged

lbud merged 5 commits into
masterfrom
axonometric

Conversation

@lbud

@lbud lbud commented Sep 25, 2017

Copy link
Copy Markdown
Contributor
  • Adds support in core for axonometric rendering for 3D layers. New API surface:
    • void Map::setAxonometric(bool)
    • bool Map::getAxonometric() const
    • void Map::setXSkew(double)
    • double Map::getXSkew() const
    • void Map::setYSkew(double)
    • double Map::getYSkew() const
  • Adds platform support for axonometric only for node for the time being: this clears the way to use fill-extrusion layers in fallback maps. We may add bindings for other platforms + gl-js later. New node map arguments are
    • axonometric: boolean
    • skew: [number, number]

Presently the default for skew if axonometric = true and skew is unspecified is [0, 1]. This is what lower Manhattan looks like with [0, 1]:
image
Here is a quick demo where you can tweak the skew. @nickidlugash — do you have any thoughts on what a reasonable default should be? [0, 0] feels like the type of neutral we usually use, but may lead people to think it's broken. Regardless, this default doesn't have to be what we use in api-gl for fallback maps.

Locally I ran a render-test run applying axonometric: true to all tests to verify that there are no unintended consequences/layer types using the perspective projection matrix in unexpected ways. I suppose theoretically we could add a new CI run to verify that, but it doesn't seem necessary and our CI infrastructure is heavy enough as it is…

@kkaefer kkaefer added the Core The cross-platform C++ core, aka mbgl label Oct 11, 2017
@lbud
lbud force-pushed the axonometric branch 3 times, most recently from e54af76 to 2b4791f Compare October 13, 2017 21:20
lbud pushed a commit to mapbox/mapbox-gl-js that referenced this pull request Oct 14, 2017
@lbud
lbud merged commit e43e2aa into master Oct 14, 2017
@lbud
lbud deleted the axonometric branch October 14, 2017 01:15
VictorHom pushed a commit to VictorHom/mapbox-gl-js that referenced this pull request Oct 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Core The cross-platform C++ core, aka mbgl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants