Transform Your Texture
Node
TextureTransform • Attributes
Description
This is the same square texture used in TextureCoordinate that has been scaled by a negative 100% (causing the texture to repeat).
VRIGNETTE Notes
Transformations are applied to the texture coordinates defined of the image you are using.
Other Nodes
TextureCoordinate, ImageTexture, Texture Coordinate Generator
Example
Rotate the vrignette to view the geometry.
Code
<x3d> <scene> <!-- World Info --> <worldInfo title="X3D TextureTransform Example"> </worldInfo> <!-- Navigation Info --> <navigationInfo headlight="true"> </navigationInfo> <!-- Avatar Viewpoint --> <viewpoint position="0.0 2.0 10.0" centerOfRotation="0.0 0.0 0.0"> </viewpoint> <!-- Shapes --> <shape> <appearance> <material diffuseColor="0.0 0.0 0.75" specularColor="0.20 0.20 0.20" shininess="0.15"> </material> <imageTexture url="flower_photo_square_1000.jpeg" repeatS="true" repeatT="true"> </imageTexture> <textureTransform rotation="0.785" center="0.5 0.5" scale="-0.5 -0.5"> </textureTransform> </appearance> <indexedFaceSet solid="false" coordIndex="0 1 2 3 4 5 6 0"> <coordinate point="0.0 0.0 0.0, 2.0 0.0 0.0, 3.0 2.0 0.0, 2.0 4.0 0.0, -2.0 4.0 0.0, -3.0 2.0 0.0, -2.0 0.0 0.0"> </coordinate> <textureCoordinate point="0.5 0.0, 0.75 0.0, 1.0 0.5, 0.75 1.0, 0.5 1.0, 0.25 1.0, 0.0 0.5, 0.25 0.0, 0.5 0.0"> </textureCoordinate> <textureCoordinateGenerator mode="COORD"> </textureCoordinateGenerator> </indexedFaceSet> </shape> <!-- Scene Background --> <background skyColor="0.20 0.20 0.20" groundColor="0.20 0.20 0.20"> </background> </scene> </x3d>