Three wrap modes, same picture
The "F" shows what happens. Clamp: one small F and a smear of edge pixels. Repeat: four copies. Mirrored: copies flipped like a book.
UV coordinates say which point of the picture lands on which point of the shape. wrapS, wrapT, repeat, offset, rotation and center decide what happens outside 0 to 1 and how the picture is stretched, tiled and moved.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 4 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
A 4 m × 4 m floor uses a tile that should cover 0.5 m. Write the three lines that tile it.
How do you make a tyre's tread appear to roll at 1 turn per second, without turning the mesh?
Explain it without notes
A floor texture shows one small picture and then a smear. What two things are missing?
Why does the rotation example need center.set(0.5, 0.5)?
Console
Nothing logged yet.Expected console output
ClampToEdgeWrapping (default) | wrapS: 1001 | repeat: 2, 2
RepeatWrapping | wrapS: 1000 | repeat: 2, 2
MirroredRepeatWrapping | wrapS: 1002 | repeat: 2, 2