Hi, I’ve been trying to use textureWrap(MIRROR) to tile a texture and no matter what I do it doesn’t seem to do anything - the texture just resizes to the full size of the surface. I’ve put textureWrap() in both draw and setup. The image I’m using is a 64x64px jpg.
let grass;
function preload() {
grass = loadImage('grass.jpg');
}
function setup() {
createCanvas(1000, 1000, WEBGL);
textureWrap(MIRROR);
}
function draw() {
background(220);
texture(grass);
box(500)
orbitControl();
}
Resizing the cube with mouseX - as you can see the texture just stretches, it doesn’t tile.
I also tried REPEAT and CLAMP and they don’t work either. What am I missing? I feel like I’m following the reference exactly.