processing / processing/processing4
PShape.setFill() no longer works
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 494
- Forks
- 183
- Avg merge
- 4h 39m
- Merged PRs (30d)
- 3
Description
Created by: cacheflowe
This used to work in Processing 3.x, but no longer works in recent Processing 4 versions.
Here's a complete sketch. In Processing 3.x and up to 4.0.b2, we see the box updates to random vertex colors. Since Processing 4.0.b4 (or maybe beta 3), it doesn't have an effect.
PShape shape;
public void setup() {
size(640, 360, P3D);
shape = createShape(BOX, 100, 100, 100).getTessellation();
updateFill();
}
public void updateFill() {
int numVerts = shape.getVertexCount();
for (int i = 0; i < numVerts; i++) {
shape.setFill(i, color(random(255), random(255), random(255)));
}
}
public void draw() {
background(0);
translate(width/2, height/2, 0);
rotateY(frameCount * 0.01);
shape(shape);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the complete Java sketch in the issue with Processing 4 and compare its per-vertex color behavior with Processing 3.x. Trace the PShape.setFill() call through createShape(BOX, ...).getTessellation() and shape(shape). Done means the sketch updates the box with random vertex colors again in the affected Processing 4 versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100