Skip to content
Discussion options

You must be logged in to vote

In glTF this is handled by the KHR_texture_transform extension. You can see glTF Transform's implementation here:

To get the offset and scale of the base color texture, for example, you'd write:

const textureInfo = material.getBaseColorTextureInfo();
const transform = textureInfo.getExtension('KHR_texture_transform');

if (transform) {
  const offset = transform.getOffset();
  const rotation = transform.getRotation();
  const scale = transform.getScale(); // equivalent to THREE.Texture's .repeat property
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CITIZENDOT
Comment options

Answer selected by CITIZENDOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants