/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as t}from"tslib";import{Seconds as i}from"../../../../../core/time.js";import{subclass as e}from"../../../../../core/accessorSupport/decorators.js";import o from"../../../../ViewAnimation.js";import{applyAll as r}from"../../../camera/constraintUtils.js";import{ConstraintOptions as s}from"../../../camera/constraintUtils/ConstraintOptions.js";import{AnimationController as n}from"../AnimationController.js";import m from"../../../webgl/RenderCamera.js";let a=class extends n{constructor(){super(...arguments),this._beginCamera=new m,this._elapsedTime=i(0),this.constraintOptions=new s(15,4,0,this._beginCamera)}initialize(){this.constraintOptions.interactionType=this.interactionType,this.viewAnimation=new o}onControllerStart(t){this._beginCamera.copyFrom(t),super.onControllerStart(t)}stepController(t,e){e.copyViewFrom(this._beginCamera),this._elapsedTime=i(this._elapsedTime+t),this.momentumStep(this._elapsedTime,e),r(this.view,e,this.constraintOptions),this.momentum.isFinished(this._elapsedTime)&&this.finishController()}};a=t([e("esri.views.3d.state.controllers.momentum.MomentumController")],a);export{a as MomentumController};
