Skip to content

Commit 9d50411

Browse files
committed
chore: minor fixes in the ViewCube example
1 parent e59d71b commit 9d50411

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/obc/src/core/ViewCube/example.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ viewport.append(viewCube);
6868

6969
/* MD
7070
This attaches the ViewCube to your viewport and links it to your camera's Three.js instance.
71-
*/
72-
73-
/* MD
71+
7472
### 🔄 Keeping the ViewCube in Sync
7573
7674
To keep the ViewCube orientation updated as the camera moves, listen for camera control updates:
@@ -86,7 +84,7 @@ world.camera.controls.addEventListener("update", () =>
8684
You can let users click on the ViewCube to change the camera's orientation. For example, set the camera to a specific view when the left face is clicked:
8785
*/
8886

89-
viewCube.addEventListener("back", () => {
87+
viewCube.addEventListener("leftclick", () => {
9088
world.camera.controls.setLookAt(-10, 10, 0, 1, 10, 0, true);
9189
});
9290

0 commit comments

Comments
 (0)