Skip to content

KBE3D / KBCore / Cesium / Rotation

接口: Rotation

Represents a Packable number that always interpolates values towards the shortest angle of rotation. This object is never used directly but is instead passed to the constructor of SampledProperty in order to represent a two-dimensional angle of rotation.

示例

ts
const time1 = Cesium.JulianDate.fromIso8601('2010-05-07T00:00:00');
const time2 = Cesium.JulianDate.fromIso8601('2010-05-07T00:01:00');
const time3 = Cesium.JulianDate.fromIso8601('2010-05-07T00:02:00');

const property = new Cesium.SampledProperty(Cesium.Rotation);
property.addSample(time1, 0);
property.addSample(time3, Cesium.Math.toRadians(350));

//Getting the value at time2 will equal 355 degrees instead
//of 175 degrees (which is what you get if you construct
//a SampledProperty(Number) instead.  Note, the actual
//return value is in radians, not degrees.
property.getValue(time2);

KBE3D @3.0.0 Copyright © 2024-present KBE3D