Which code examples would you like to see?

Would you like to see some new Viewer API code examples? Then let us know which topics you’re most interested in! Please post your ideas here and we’ll pick the best/most interesting requests and create some new examples.

How do I roll the camera lookat?

As in rotate left or right around the view axis, like the rocking of a boat.

1 Like

Clicking on an Annotation not only moves to that view, but also plays a specific segment on the timeline (assuming there is an animation as part of the model).

@aleahy My trigonometry skills are not what they once were… but I made an attempt to rotate the camera around the z-axis. However, rotating around the view axis you would actually have to rotate the model itself, not the camera, as we have no way to manipulate the camera on that axis.

(someone with more math and 3D skills like @paul_sketch could do something more reliable and nice).


1 Like

By the way @paul_sketch, I think the duration parameter is broken for rotate() (and maybe the others. It always makes the change instantly.

{duration: 2} as in Viewer API - Functions - Sketchfab

1 Like

oops, thanks