| @@ -49,14 +49,14 @@ class DynamicBillboard extends DynamicOverlay { | |||
| /** | |||
| * set the location | |||
| */ | |||
| this._samplePosition.forwardExtrapolationType = | |||
| this._sampledPosition.forwardExtrapolationType = | |||
| Cesium.ExtrapolationType.HOLD | |||
| this._startTime = Cesium.JulianDate.now() | |||
| this._samplePosition.addSample( | |||
| this._sampledPosition.addSample( | |||
| this._startTime, | |||
| Transform.transformWGS84ToCartesian(this._posistion) | |||
| ) | |||
| this._delegate.position = this._samplePosition | |||
| this._delegate.position = this._sampledPosition | |||
| this._cache.push(this._startTime) | |||
| /** | |||
| * initialize the Overlay parameter | |||
| @@ -35,16 +35,16 @@ class DynamicModel extends DynamicOverlay { | |||
| /** | |||
| * set the location | |||
| */ | |||
| this._samplePosition.forwardExtrapolationType = | |||
| this._sampledPosition.forwardExtrapolationType = | |||
| Cesium.ExtrapolationType.HOLD | |||
| this._startTime = Cesium.JulianDate.now() | |||
| this._samplePosition.addSample( | |||
| this._sampledPosition.addSample( | |||
| this._startTime, | |||
| Transform.transformWGS84ToCartesian(this._posistion) | |||
| ) | |||
| this._delegate.position = this._samplePosition | |||
| this._delegate.position = this._sampledPosition | |||
| this._delegate.orientation = new Cesium.VelocityOrientationProperty( | |||
| this._samplePosition | |||
| this._sampledPosition | |||
| ) | |||
| this._cache.push(this._startTime) | |||
| /** | |||
| @@ -14,7 +14,7 @@ class DynamicOverlay extends Overlay { | |||
| super() | |||
| this._startTime = undefined | |||
| this._lastTime = undefined | |||
| this._samplePosition = new Cesium.SampledPositionProperty() | |||
| this._sampledPosition = new Cesium.SampledPositionProperty() | |||
| this._cache = [] | |||
| this._maxCacheSize = 10 | |||
| this._state = State.INITIALIZED | |||
| @@ -31,7 +31,7 @@ class DynamicOverlay extends Overlay { | |||
| get position() { | |||
| return Transform.transformCartesianToWGS84( | |||
| this._samplePosition.getValue(Cesium.JulianDate.now()) | |||
| this._sampledPosition.getValue(Cesium.JulianDate.now()) | |||
| ) | |||
| } | |||
| @@ -51,7 +51,7 @@ class DynamicOverlay extends Overlay { | |||
| -0.2, | |||
| new Cesium.JulianDate() | |||
| ) | |||
| this._samplePosition.removeSamples( | |||
| this._sampledPosition.removeSamples( | |||
| new Cesium.TimeInterval({ | |||
| start: start, | |||
| stop: stop | |||
| @@ -75,7 +75,7 @@ class DynamicOverlay extends Overlay { | |||
| interval, | |||
| new Cesium.JulianDate() | |||
| ) | |||
| this._samplePosition.addSample( | |||
| this._sampledPosition.addSample( | |||
| time, | |||
| Transform.transformWGS84ToCartesian(Parse.parsePosition(position)) | |||
| ) | |||
| @@ -94,6 +94,4 @@ class DynamicOverlay extends Overlay { | |||
| } | |||
| } | |||
| Overlay.registerType('dynamic-model') | |||
| export default DynamicOverlay | |||