Texture Class

Extends Texture
Module: Textures

Image texture constructor, with support for GIF animations.

It is based on THREE.Texture, original documentation can be found here https://threejs.org/docs/index.html#Reference/Textures/Texture

Constructor

Texture

(
  • image
  • mapping
  • wrapS
  • wrapT
  • magFilter
  • minFilter
  • format
  • type
  • anisotropy
  • encoding
)

Parameters:

  • image Image
  • mapping Number
  • wrapS Number
  • wrapT Number
  • magFilter Number
  • minFilter Number
  • format Number
  • type Number
  • anisotropy Number
  • encoding Number

Item Index

Methods

Properties

Methods

dispose

()

Dispose texture.

toJSON

(
  • meta
)

Create JSON description for texture, serializes image used in the texture THREE.Texture serialization is different inside nunuStudio, the THREE.Texture class does not serialize any image data.

Parameters:

  • meta Object

Properties

disposed

Boolean

Flag used to know is the texture has been disposed.

Is used to control animation when using a gif as a texture.

Default: false

image

DOM

DOM element attached to the texture

img

Image

Image attached to the texture

name

String

Name of the texture

Default: "texture"