{ graph.cameraPosition({ x: 0" /> { graph.cameraPosition({ x: 0" /> { graph.cameraPosition({ x: 0"/>

How to rotate the THREE camera around z-axis?

45 Views Asked by At

I have added a home button to a THREE 3d-force-graph that the user manipulates:

    btnHome.addEventListener("click", evt => {
        graph.cameraPosition({ x: 0, y: 0, z: 400 }, undefined, 2000);
    });

This works as expected - except that the camera might still be rotated around the z-axis.

I can't find out how to rotate the camera back around the z-axis.

I am new to this. I am using the library https://github.com/vasturiano/3d-force-graph which I find very good.

0

There are 0 best solutions below