* Reset branch for WPF changes * Convert BMP to PNG; fix link-out-of-scope err * Add snippets for WPF... 6794 files!!!! * Add missing snippets * update file updated between migration * Fix paths to include * update breadcrumb and toc * fix index links * fix index links * fix index links * fix markdown
2.2 KiB
title, ms.date, helpviewer_keywords, ms.assetid
| title | ms.date | helpviewer_keywords | ms.assetid | ||||||
|---|---|---|---|---|---|---|---|---|---|
| How to: Animate Camera Position and Direction Using Key Frames | 03/30/2017 |
|
5753024e-0057-454d-947f-43ea686879c7 |
How to: Animate Camera Position and Direction Using Key Frames
In the following example, xref:System.Windows.Media.Animation.Point3DAnimationUsingKeyFrames is used to animate the position of a xref:System.Windows.Media.Media3D.PerspectiveCamera in a 3D scene. In addition, xref:System.Windows.Media.Animation.Vector3DAnimationUsingKeyFrames is used to animate the direction the camera is pointing in the 3D scene. Both of these animations use several key frames which create a series of animation effects:
-
xref:System.Windows.Media.Animation.LinearPoint3DKeyFrame and xref:System.Windows.Media.Animation.LinearVector3DKeyFrame are used to create a smooth, linear interpolation between values.
-
xref:System.Windows.Media.Animation.DiscretePoint3DKeyFrame and xref:System.Windows.Media.Animation.DiscreteVector3DKeyFrame are used to create sudden "jumps" between values (no interpolation).
-
xref:System.Windows.Media.Animation.SplinePoint3DKeyFrame and xref:System.Windows.Media.Animation.SplineVector3DKeyFrame are used to create a variable transition between values depending on the xref:System.Windows.Media.Animation.SplinePoint3DKeyFrame.KeySpline%2A property. In the example below, the animation starts off slow but toward the end of the time segment, speeds up exponentially.
Example
[!code-xamlAnimation3DGallery_snip#PointVector3DAnimationUsingKeyFramesExampleWholePage]