/// <summary> /// Animates the orthographic width. /// </summary> /// <param name="camera"> /// An orthographic camera. /// </param> /// <param name="newWidth"> /// The width to animate to. /// </param> /// <param name="animationTime"> /// Animation time in milliseconds /// </param> public static void AnimateWidth(this OrthographicCamera camera, double newWidth, double animationTime) { if (animationTime > 0) { camera.AnimateWidth(newWidth, animationTime); } else { camera.Width = newWidth; } }
/// <summary> /// Resets the specified orthographic camera. /// </summary> /// <param name="camera"> /// The camera. /// </param> public static void Reset(this OrthographicCamera camera) { if (camera == null) { return; } camera.Position = new Vector3(20, 10, 40); camera.LookDirection = new Vector3(-20, -10, -40); camera.UpDirection = new Vector3(0, 1, 0); camera.Width = 40; camera.NearPlaneDistance = 0.1; camera.FarPlaneDistance = 1000; }
/// <summary> /// Animates the orthographic width. /// </summary> /// <param name="camera"> /// An orthographic camera. /// </param> /// <param name="newWidth"> /// The width to animate to. /// </param> /// <param name="animationTime"> /// Animation time in milliseconds /// </param> public static void AnimateWidth(this OrthographicCamera camera, double newWidth, double animationTime) { camera.AnimateWidth(newWidth, animationTime); }