processing/processing4

rotate a texture in PShape bug not but work not

Open

#621 geöffnet am 9. Dez. 2022

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (176 Forks)auto 404
help wantedopengl

Repository-Metriken

Stars
 (439 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Created by: matheplica

Hi, here's a bug with last Processing version :

PMatrix2D uvtr = new PMatrix2D();
textUVA = new PVector(0, 0.5);
        textUVB = new PVector(0.25, 0.08);
        memUVA = new PVector(0, 0.5);
        memUVB = new PVector(0.25, 0.08);

void adaptTexture(){
       uvtr.reset();
        uvtr.translate(0.5, 0.5);
        uvtr.rotate(rotText);
        uvtr.translate(-0.5, -0.5);
        uvtr.mult(memUVA, textUVA);
        uvtr.mult(memUVB, textUVB);
        sh.setTextureUV(1, textUVA.x, textUVA.y);
        sh.setTextureUV(2, textUVB.x, textUVB.y);
}

Before I start to change the variable rotText like this:

ani = new Ani(this, time, "rotText", rotText+((PI/3)*sens), Ani.CIRC_OUT, "onUpdate:adaptTexture");

This part of code runs in P3 but not in P4. There is no error message but it's append nothing. In P3 the texture turn in the shape.

I'm on ubuntu 22.04

Contributor Guide