mkkellogg / GaussianSplats3D

Three.js-based implementation of 3D Gaussian splatting
MIT License
1.09k stars 134 forks source link

Camera positions #244

Closed runabol closed 3 weeks ago

runabol commented 3 weeks ago

Thanks for the awesome work!

Is it possible to get the camera positions from the viewer programmatically at any given point in time?

Specifically: cameraUp, initialCameraPosition and initialCameraLookAt. The goal is to store them for a given splat in a database for the user, so the model open up properly situated.

mkkellogg commented 3 weeks ago

Yep! Just press the I key to open a panel that displays a bunch of runtime info, including camera position, the camera up vector, and the current camera look-at position.

runabol commented 3 weeks ago

Yea, for sure. But I mean is there a way to get that info programmatically? Maybe through an event or property?

mkkellogg commented 3 weeks ago

Sorry, I misunderstood :) You should be able to check the properties of Viewer.camera: up and position for camera-up and camera-position as well as Viewer.controls.target for the camera look-at position.

runabol commented 3 weeks ago

Works like a charm. Thanks!