Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set camera position SuGaR viewer #201

Open
agouloumis opened this issue Jul 23, 2024 · 0 comments
Open

Set camera position SuGaR viewer #201

agouloumis opened this issue Jul 23, 2024 · 0 comments

Comments

@agouloumis
Copy link

How can I set the camera position in the SuGaR viewer?

I made these changes in main.jsx, but the camera position does not change:

// Load the splat scene
var viewer = new DropInViewer({
    'gpuAcceleratedSort': true,
    'cameraUp': [0, -1, 0.0],
    'initialCameraPosition': [0, 0, 0],
    'initialCameraLookAt': [0, 0, 0],
    'sharedMemoryForWorkers': false
});
viewer.addSplatScene(
    // "./media/hybrid/qant03/qant03_7k.ply", 
    // "./src/media/hybrid/qant03/sugarfine_3Dgs7000_densityestim02_sdfnorm02_level03_decim1000000_normalconsistency01_gaussperface1.ply",
    // "./../output/refined_ply/dukemon3/sugarfine_3Dgs7000_densityestim02_sdfnorm02_level03_decim200000_normalconsistency01_gaussperface6.ply",
    ply_path,
{
    'splatAlphaRemovalThreshold': 5,
    'showLoadingSpinner': true,
    'position': [0, 0, 0],
    'rotation': [0, 0, 0, 1],
    'scale': [1.5, 1.5, 1.5]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant