-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
s is the scalar component of the quaternion, but it could be w as well. :) |
This is a very good point. I've added state validations and unit tests to the TODO-list. |
Adding a proper type for the mercator coordinate is a good idea. Something like |
Can’t wait to see a converter between SceneKit’s SCNCamera class and this new |
c0696ae
to
de33779
Compare
Interface updateI've updated the public interface by replacing the @mapbox/gl-native I'd like to get feedback especially on the |
6380b70
to
bb486ba
Compare
bb486ba
to
3ed6dd7
Compare
@mpulkki-mapbox @tmpsantos is it ok if we delay merging this until after 1.6.0 is released on Thursday? |
8ed5b9e
to
808487b
Compare
@chloekraw yes this is fine by me! |
@mpulkki-mapbox 👍 thank you! I'll add the label to help us remember and remove after the release is published, even though currently there isn't an approval. |
808487b
to
ca5f0fe
Compare
abde423
to
9e8a210
Compare
7c1ad3a
to
a133ebd
Compare
3bda614
to
974b11e
Compare
This pull request is the first iteration of a "real" 3D camera API that gives the user more precise controls of the camera entity itself by exposing direct properties like position and orientation. The difference to the current viewport API is that instead of applying transformations to the map the user has (a limited) access to the underlying camera object that is orbiting around the map center point at a certain distance. Implementation follows standard conventions and is a typical way of controlling the camera in any 3D engine/software.
Both interfaces, the old and the new, are interchangeable and fully compatible with each other: changes made to the transformation via one API is immediately reflected to the other one.
Interface
Disclaimer: naming of things is not final!
Only two parameters are currently exposed to the user: position in mercator coordinates and focus point on the map. Focus point is equivalent of the center point in the viewport API and it's used to compute the orientation of the camera. Zoom value can't be set explicitly set as it's computed from the distance between the camera and the focus point.
This interface could be extended to give the user better control of the camera (raw orientation access as a quaternion, view frustum information, projection properties, etc.)
TODO