Skip to content

Scene - goTo()

This sample demonstrates how to customize camera flight animations in a Scene using the options property of the goTo method.

By adjusting properties such as speedFactor and easing, you can control how fast the camera moves and how it behaves as it approaches the target.

For example, the snippet below defines a flight that is slower than the default and gradually eases out when reaching the destination:

Use dark colors for code blocksCopy
1
2
3
4
5
6
const options = {
  speedFactor: 0.1, // animation is 10 times slower than default
  easing: "quint-out", // easing function to slow down when reaching the target
};

viewElement.goTo(target, options);

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.