You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
1.4 KiB
6 lines
1.4 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("exports ../../../core/time ../easing ./Definition ./InterpolateComponents ./Settings ./apex/Path".split(" "),function(f,d,e,h,k,g,l){const m=new k.InterpolateComponents;f.Animation=class{get time(){return this._time}get isLinear(){return 1===this.path.segments.length}constructor(a){this._time=d.Milliseconds(0);this._easing=e.inOutCoastQuad;this.definition=new h.Definition(a);this.path=new l.Path}update(a,b,c){this.definition.update(a,b,c);this.path.update(this.definition,c);this._time=this._applyTimeSettings(d.millisecondsFromSeconds(isFinite(this.path.time)? |
|
this.path.time:d.Seconds(0)),c);this._easing=c.easing??(1E3<=this._time?e.inOutCoastQuad:e.outExpo)}cameraAt(a,b){a=Math.min(Math.max(0,a),1);a=this._normalizedEasing(a);a=this.path.interpolateComponentsAt(a,m);b.interpolate(this.definition.source,this.definition.target,a)}_normalizedEasing(a){const b=this._easing(0,this._time),c=this._easing(1,this._time);return(this._easing(a,this._time)-b)/(c-b)}_applyTimeSettings(a,b){const c=null!=b.speedFactor?b.speedFactor:1,n=b.minDuration??g.defaultSettings.minDuration/ |
|
c,p=b.maxDuration??g.defaultSettings.maxDuration/c;return a=null!=b.duration?b.duration:d.Milliseconds(Math.min(Math.max(a/c,n),p))}};Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})}); |