Buffer

@Serializable
data class Buffer(var name: String? = null, val uri: String? = null, val byteLength: Int = 0, val extensions: JsonElement? = null, val extras: JsonElement? = null) : GLTFProperty

A buffer points to binary geometry, animation, or skins.

https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/schema/buffer.schema.json

Constructors

Link copied to clipboard
constructor(name: String? = null, uri: String? = null, byteLength: Int = 0, extensions: JsonElement? = null, extras: JsonElement? = null)

Properties

Link copied to clipboard
val buffer: Buffer
Link copied to clipboard
val byteLength: Int = 0

The length of the buffer in bytes.

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
open override var name: String?
Link copied to clipboard
@Transient
var optBuffer: Buffer?
Link copied to clipboard
val uri: String? = null

The URI (or IRI) of the buffer. Relative paths are relative to the current glTF asset. Instead of referencing an external file, this field MAY contain a data:-URI.

Functions

Link copied to clipboard
open override fun toString(): String