I am currently working on a side-project using the ArcGIS JavaScript beta API. With this API I have set up a 3D SceneView over which I animate the view's camera, using the 'animateTo()' method.
The kind of fly-by effect this creates looks really great, but I'd like to be able to customize the animation a bit more. For instance, I would like to set the animation's duration to a higher number of seconds and I'd like to set the easing of the animation to linear.
Dojo easing reference: dojo/fx/easing — The Dojo Toolkit - Reference Guide
Is this possible in the current state of the JavaScript beta API (beta 3)? How would I go about implementing this?
My animation code:
view.animateTo({
position: [ point.longitude, point.latitude, 10 ],
heading : bearing,
tilt : 80
});
Solved! Go to Solution.
The options between MapView and SceneView are not the same for animateTo() in beta3. This will change since we're still refining the design for animateTo(). We are trying to keep the two methods as consistent as possible, but be aware that it does not mean the options for animateTo() will be equal in MapView and SceneView when we release 4.0 final. This may change in a future release after 4.0, however.
It looks like the easing can only be set on the animateTo for the MapView. It would be nice to also be able to set it, along with the duration for the animateTo on the SceneView
The options between MapView and SceneView are not the same for animateTo() in beta3. This will change since we're still refining the design for animateTo(). We are trying to keep the two methods as consistent as possible, but be aware that it does not mean the options for animateTo() will be equal in MapView and SceneView when we release 4.0 final. This may change in a future release after 4.0, however.
see also Fun with Accessors in ArcGIS JS 4.0beta1 - odoenet
we have implemented it in 'About us' in Studio A&T