NormalTextureInfo

@Serializable
data class NormalTextureInfo(var name: String? = null, val index: Int = -1, val texCoord: Int = -1, val scale: Float = 1.0f, val extensions: JsonElement? = null, val extras: JsonElement? = null) : GLTF2.Material.BaseTextureInfo

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

Constructors

Link copied to clipboard
constructor(name: String? = null, index: Int = -1, texCoord: Int = -1, scale: Float = 1.0f, extensions: JsonElement? = null, extras: JsonElement? = null)

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
open override val index: Int
Link copied to clipboard
open override var name: String?
Link copied to clipboard
val scale: Float = 1.0f

The scalar parameter applied to each normal vector of the texture. This value scales the normal vector in X and Y directions using the formula: scaledNormal = normalize((<sampled normal texture value> * 2.0 - 1.0) * vec3(<normal scale>, <normal scale>, 1.0)).

Link copied to clipboard
open override val texCoord: Int

Functions

Link copied to clipboard
fun getTexture(gltf: GLTF2): Bitmap?