I could use a very simple script to create and then show a 3D model during a fixed time period. Can anyone point me to such a script?
Sorry for the delayed reply, if you never figured this out, here’s a small example you can paste into Sandcastle: Basically it’s no different than defining an “always on” model except that you give the entity an availability interval. If you paste this into Sandcastle the plane will go off if you scrub the timeline to the right or left.
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
infoBox : false,
selectionIndicator : false
});
var start = Cesium.JulianDate.fromDate(new Date(2015, 2, 25, 16));
var stop = Cesium.JulianDate.addSeconds(start, 360, new Cesium.JulianDate());
viewer.clock.startTime = start.clone();
viewer.clock.stopTime = stop.clone();
viewer.clock.currentTime = start.clone();
viewer.clock.clockRange = Cesium.ClockRange.UNBOUNDED;
viewer.clock.multiplier = 10;
viewer.timeline.zoomTo(start, stop);
var entity = viewer.entities.add({
availability : new Cesium.TimeIntervalCollection([new Cesium.TimeInterval({
start : start,
stop : stop
})]),
position : Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, 5000),
model : {
uri : ‘…/…/SampleData/models/CesiumAir/Cesium_Air.gltf’,
minimumPixelSize : 128
}
});
viewer.zoomTo(entity);
That was far too easy:) I could use it to do exactly what I needed.
Thanks