rotateUV operation
rotateUV(uvSet, angle)
uvSet float Number of texture coordinates set (integer number in [0,9]). The numbering corresponds to the texture layers of the material attribute, see also Texturing: Essential Knowledge.
angle float Defines the angle of the rotation.
This operation rotates the texture coordinates (uvs) of the current shape by the rotation angle.
The rotation center is at the texture position u=0 and v=0.
Rotating uvs works only after the uvs have been projected.
Related
Examples
Example with standard uvs and rotated uvs:
brickMap = "assets/bricks.jpg"
randBuildingHeight = 1
Lot -->
s('.75,'1,'.75)
center(xz)
extrude(world.up, randBuildingHeight)
comp(f) {
side : Facade |
top : set(material.color.a, .3) Roof.
}
Facade -->
setupProjection(0, scope.xy, scope.sx, scope.sy)
texture(brickMap)
projectUV(0) # projection of the uvs
rotateUV(0,10) # rotate command after the projection