OSMBuildings icon indicating copy to clipboard operation
OSMBuildings copied to clipboard

Rotation Point

Open abrichr opened this issue 3 years ago • 1 comments

Hello,

Thank you for open sourcing such excellent software! I have a few questions:

  • Is it possible to set the altitude of the camera? If the answer is no, can you please suggest how one might go about implementing this type of functionality? I imagine it might have something to do wtih this.viewMatrix: https://github.com/OSMBuildings/OSMBuildings/blob/55e22a6d09911550225625d1c87a87bf8260f6b9/src/view/index.js#L150 It looks like GLX.Matrix implements translateTo() which takes a z parameter: https://github.com/OSMBuildings/OSMBuildings/blob/55e22a6d09911550225625d1c87a87bf8260f6b9/src/glx/Matrix.js#L81 Am I on the right track?

  • Is it possible to set the rotation point of the camera somewhere other than the target point? I imagine one way to implement this might involve translating the target point to the rotation point, rotating, and then translating back. Is it possible to execute these operations without redrawing? If not, I imagine View.renderFrame() might be the right place to start implementing this: https://github.com/OSMBuildings/OSMBuildings/blob/55e22a6d09911550225625d1c87a87bf8260f6b9/src/view/index.js#L50

Any suggestions would be appreciated!

abrichr avatar May 08 '21 02:05 abrichr

I'm looking for this too.

kinqert avatar May 08 '21 08:05 kinqert