Keep the pasteable embed, then use the browser handle to animate the view after
startup.
Learning goal
Lesson 1 configured the browser with HTML attributes. This lesson adds a tiny
script. Skykit.whenReady() gives you the live browser object, and
transitionTo() can rotate the view or move the
observer through parsec space.
Live code
Look toward Orion, then fly out
The first transition rotates the view. The second moves the observer through 3D space.
Ready.
Console
Things to try
Change the wait times before each transition.
Change durationSecs to make the movement slower or faster.
Change observerPc to fly to another place in parsec space.
Use only lookAt when you want to rotate without moving.
What changed in the code
The first transition changes only the look direction. The second transition includes
observerPc, so SkyKit also moves the observer. The
movement and orientation lanes can have different
durations.