How to use texture transform in script?

API Documentation
Reactive Programming
Is there an example of how we can use texture transform in script?
Asked about a year ago by Aw
4 Votes2 FollowersSeen by 84
  • Featured Answer
    • Spark AR Team
      Here is an example:

      const Materials = require('Materials');

      ]).then(([material0]) => {
      // Assumes material with texture setup as diffuse
      // and attached to a plane

      // Scale, offset and rotation properties allow you
      // to move, rotate and scale texture within the
      // material

      // Scaling example:
      material0.diffuseTextureTransform.scaleU = 2;
      material0.diffuseTextureTransform.scaleV = 2;

      Let us know how else we can help!
      • woah, that is really helpful, thanks!
        Posted about a year ago by Aw
  • This question has been closed.