Sampler

@Serializable
data class Sampler(var name: String? = null, val input: Int = -1, val interpolation: String = "LINEAR", val output: Int = -1, val extensions: JsonElement? = null, val extras: JsonElement? = null) : GLTFProperty

Constructors

Link copied to clipboard
constructor(name: String? = null, input: Int = -1, interpolation: String = "LINEAR", output: Int = -1, extensions: JsonElement? = null, extras: JsonElement? = null)

Types

Link copied to clipboard
data class Lookup(var requestedTime: Float = 0.0f, var lowIndex: Int = 0, var highIndex: Int = 0, var lowTime: Float = 0.0f, var highTime: Float = 0.0f, var interpolation: String = "LINEAR")

Properties

Link copied to clipboard
open override val extensions: JsonElement? = null

JSON object with extension-specific objects.

Link copied to clipboard
open override val extras: JsonElement? = null

Although extras MAY have any type, it is common for applications to store and access custom data as key/value pairs. Therefore, extras SHOULD be a JSON object rather than a primitive value for best portability.

Link copied to clipboard
val input: Int

The index of an accessor containing keyframe timestamps. The accessor MUST be of scalar type with floating-point components. The values represent time in seconds with time[0] >= 0.0, and strictly increasing values, i.e., time[n + 1] > time[n].

Link copied to clipboard
Link copied to clipboard

Interpolation algorithm.

Link copied to clipboard
open override var name: String?
Link copied to clipboard
val output: Int

The index of an accessor, containing keyframe output values.

Link copied to clipboard

Functions

Link copied to clipboard
fun doLookup(gltf: GLTF2, time: Float, kind: GLTF2.Animation.Sampler.LookupKind, out: GLTF2AccessorVector, count: Int = 1, outIndex: Int = 0)
Link copied to clipboard
Link copied to clipboard
fun maxTime(gltf: GLTF2): Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard