Control a CesiumJS camera with AI
Set the opening shot, frame landmarks and guide visitors between locations in an existing three-dimensional map.
You can control a CesiumJS camera with AI by describing the shot as well as the destination. For a city overview, a high oblique angle reveals the street grid. For a tower, a lower position to one side reveals its shape. The cesiumjs-camera guide helps your agent turn that distinction into camera position, heading, pitch and distance.
A good camera move still needs something visible at the target. If a viewer has flat imagery and a marker, the camera can frame that marker. A low flight over a detailed skyline depends on suitable three-dimensional assets in the scene.
What it does
- Choose an opening view that shows the whole area of interest.
- Cut straight to a position when resetting a scene.
- Animate a camera flight between stops in a location guide.
- Keep a moving entity in view as its position changes.
- Limit zoom or rotation to suit a particular map.
Install and use
- Give your agent a working CesiumJS project, its version and the available layers. Some newer controllers require version 1.144 or later.
- Specify the destination and what should stay visible. Ask for the camera change in the existing viewer.
- Try the movement in the browser. Check the arrival angle and what happens when the visitor takes control again.
FAQ
Source
Made by CesiumGS. Original skill: cesiumjs-camera, published on GitHub under the Apache-2.0 licence.
View on GitHub