Hi,
I’m new to Cesium. I’ve been tryint to follow this Build a Flight Tracker tutorial:
However, the example plane model does not appear to be available in Sketchfab.
This link from the tutorial does not work:
https://s3.amazonaws.com/cesiumjs/downloads/Cesium_Air.glb
So then I downloaded a different model plane from Sketchfab.
However, my model needs to be rotated 90 degrees clockwise.
Can you tell me how to do this?
My code is here as copied from the tutorial and updated with my own asset id:
// STEP 6 CODE (airplane entity)
async function loadModel() {
// Load the glTF model from Cesium ion.
const airplaneUri = await Cesium.IonResource.fromAssetId(my_asset_id);
const airplaneEntity = viewer.entities.add({
availability: new Cesium.TimeIntervalCollection([ new Cesium.TimeInterval({ start: start, stop: stop }) ]),
position: positionProperty,
// Attach the 3D model instead of the green point.
model: { uri: airplaneUri },
// Automatically compute the orientation from the position.
orientation: new Cesium.VelocityOrientationProperty(positionProperty),
path: new Cesium.PathGraphics({ width: 3 })
});
viewer.trackedEntity = airplaneEntity;
}
loadModel();
My plane looks like this:
Thank you!