open-rmf / rmf-web

Apache License 2.0
83 stars 39 forks source link

Setting camera target to most negative number to handle arbitrary large maps #993

Closed aaronchongth closed 1 month ago

aaronchongth commented 1 month ago

What's new

Self-checks

aaronchongth commented 1 month ago

This changes the 3D position that the camera points towards, raising it to a large negative number implies that the camera will almost always be pointing down vertically, no matter where the camera is moved to in 3D space. This helps mimic an orthogonal view.

Although this value falls under the category of bigger-is-better, there's no harm in using the scene size to calculate it dynamically I guess.

I've also refactored the camera controls a little to reduce repeated construction of cameras and its controller

aaronchongth commented 1 month ago

As explained the purpose of these changes in DM