extendTexture method

dynamic extendTexture(
  1. dynamic texture,
  2. dynamic transform
)

Implementation

extendTexture(texture, transform) {
  texture = texture.clone();

  if (transform.offset != null) {
    texture.offset.fromArray(transform.offset);
  }

  if (transform.rotation != null) {
    texture.rotation = transform.rotation;
  }

  if (transform.scale != null) {
    texture.repeat.fromArray(transform.scale);
  }

  if (transform.texCoord != null) {
    print(
        'THREE.GLTFLoader: Custom UV sets in ${this.name} extension not yet supported.');
  }

  texture.needsUpdate = true;

  return texture;
}