processing/processing4

rotate a texture in PShape bug not but work not

Open

#621 创建于 2022年12月9日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Java (176 fork)auto 404
help wantedopengl

仓库指标

Star
 (439 star)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南