# SceneTransition

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-livecharts/scene_transition/struct-scenetransition/

**struct** · [`ferroui-controls-livecharts`](/docs/0.5.0/api/ferroui-controls-livecharts/) · v0.5.0

```rust
struct SceneTransition
```

A transition between two complete, immutable measured scenes.

Retarget by passing `Rc::new(previous.sample(now_ms))` as the next `from`
scene. The first sample of the new transition is exactly that scene, including
partially faded primitives; no geometry jumps back to its previous target.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/scene_transition.rs#L82)

## Members

- [`new`](#function-new)
- [`with_easing`](#function-with_easing)
- [`is_completed`](#function-is_completed)
- [`sample`](#function-sample)

<a id="function-new"></a>

### new

```rust
fn new(from: Rc<Scene>, to: Rc<Scene>, started_ms: f64, duration_ms: f64) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/scene_transition.rs#L94)

<a id="function-with_easing"></a>

### with_easing

```rust
fn with_easing(self: Self, easing: EasingFunction) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/scene_transition.rs#L155)

<a id="function-is_completed"></a>

### is_completed

```rust
fn is_completed(self: &Self, now_ms: f64) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/scene_transition.rs#L160)

<a id="function-sample"></a>

### sample

```rust
fn sample(self: &Self, now_ms: f64) -> Scene
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/scene_transition.rs#L168)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
