# TestGltfAnimation

Artifact: [androidx.xr.scenecore:scenecore-testing](https://developer.android.com/jetpack/androidx/releases/xr-scenecore) [View Source](https://cs.android.com/search?q=file:androidx/xr/scenecore/testing/GltfModelEntityTester.kt+class:androidx.xr.scenecore.testing.TestGltfAnimation) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
class TestGltfAnimation
```

<br />

*** ** * ** ***

A test-only data class that mirrors the properties of a `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/GltfAnimation`.

This is used to define the characteristics of an animation to be added to a `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/GltfModelEntityTester` for testing purposes.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/TestGltfAnimation.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/TestGltfAnimation`. |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/TestGltfAnimation#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/TestGltfAnimation#hashCode()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/TestGltfAnimation#animationDuration()` The duration of the animation in seconds. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/TestGltfAnimation#animationIndex()` The index of the animation in the glTF model file. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/TestGltfAnimation#animationName()` The optional name of the animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/TestGltfAnimation#seekStartTime()` Retrieves the seek start time (in seconds) for the animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/TestGltfAnimation#shouldLoop()` Checks whether the animation is currently configured to loop. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/testing/TestGltfAnimation#speed()` Retrieves the current playback speed of the animation. |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

## Public properties

### animationDuration

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
val animationDuration: Float
```

The duration of the animation in seconds.

### animationIndex

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
val animationIndex: Int
```

The index of the animation in the glTF model file.

### animationName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
val animationName: String?
```

The optional name of the animation.

### seekStartTime

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
val seekStartTime: Float
```

Retrieves the seek start time (in seconds) for the animation.

This reflects the underlying runtime state typically configured when starting the animation via `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/GltfAnimation#start()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The seek start time of the animation in seconds. |

### shouldLoop

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
val shouldLoop: Boolean
```

Checks whether the animation is currently configured to loop.

This reflects the underlying runtime state typically modified by `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/GltfAnimation#start()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the animation is set to loop, `false` otherwise. |

### speed

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
val speed: Float
```

Retrieves the current playback speed of the animation.

This reflects the underlying runtime state typically modified by `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/GltfAnimation#start()` or `https://developer.android.com/reference/kotlin/androidx/xr/scenecore/GltfAnimation#speed()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The playback speed multiplier of the animation. |