/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../../chunks/_rollupPluginBabelHelpers","../../../../../chunks/tslib.es6","../../../../../core/accessorSupport/decorators/property","../../../../../core/arrayUtils","../../../../../core/has","../../../../../core/accessorSupport/ensureType","../../../../../core/accessorSupport/decorators/subclass","../../../../ViewAnimation","../../../camera/constraintUtils","../../../camera/constraintUtils/common","../AnimationController","../../../webgl-engine/lib/Camera"],(function(e,t,n,o,i,r,a,s,c,l,p,m,u){"use strict";e.MomentumController=function(e){function n(t){var n;return(n=e.call(this,t)||this).view=null,n.beginCamera=new u.Camera,n.elapsedTimeSec=0,n.constraintOptions={selection:p.ConstraintTypes.ALL,interactionType:p.InteractionType.PAN,interactionFactor:0,interactionStartCamera:new u.Camera,interactionDirection:null,tiltMode:p.TiltMode.TUMBLE},n}t._inheritsLoose(n,e);var o=n.prototype;return o.initialize=function(){this.constraintOptions.interactionType=this.interactionType,this.viewAnimation=new c},o.onControllerStart=function(t){this.beginCamera.copyFrom(t),this.constraintOptions.interactionStartCamera=this.beginCamera,e.prototype.onControllerStart.call(this,t)},o.stepController=function(e,t){t.copyViewFrom(this.beginCamera),this.elapsedTimeSec+=e,this.momentumStep(this.elapsedTimeSec,t),l.applyAll(this.view,t,this.constraintOptions)},t._createClass(n,[{key:"steppingFinished",get:function(){return this.momentum.isFinished(this.elapsedTimeSec)}}]),n}(m.AnimationController),n.__decorate([o.property({constructOnly:!0})],e.MomentumController.prototype,"view",void 0),e.MomentumController=n.__decorate([s.subclass("esri.views.3d.state.controllers.momentum.MomentumController")],e.MomentumController),Object.defineProperty(e,"InteractionType",{enumerable:!0,get:()=>p.InteractionType}),Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
