Skip to content

Commit e031b61

Browse files
authored
Merge branch 'dev-2.0' into fix/getTexture
2 parents 7e473c7 + caf8f37 commit e031b61

5 files changed

Lines changed: 15 additions & 0 deletions

File tree

preview/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107

108108
p.draw = function () {
109109
p.clear();
110+
p.rotateY(p.millis() * 0.001);
110111
p.push();
111112
//p.clip(() => p.rect(-50, -50, 200, 200));
112113
/*p.orbitControl();

src/webgpu/p5.RendererWebGPU.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,6 +1013,7 @@ function rendererWebGPU(p5, fn) {
10131013
this.states.setValue('activeImageLight', null);
10141014
this._pInst.setCamera(this.finalCamera);
10151015
this._pInst.resetShader();
1016+
this._pInst.resetMatrix();
10161017
this._pInst.imageMode(this._pInst.CENTER);
10171018
this._pInst.image(this.mainFramebuffer, 0, 0);
10181019
this._pInst.pop();

test/unit/visual/cases/webgpu.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,4 +844,14 @@ visualSuite("WebGPU", function () {
844844
);
845845
}
846846
});
847+
848+
visualSuite('transformation', function() {
849+
visualTest('outside of push() and pop()', async function (p5, screenshot) {
850+
await p5.createCanvas(50, 50, p5.WEBGPU);
851+
p5.background(200);
852+
p5.rotateY(p5.PI * 0.1);
853+
p5.box(30);
854+
await screenshot();
855+
});
856+
});
847857
});
424 Bytes
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"numScreenshots": 1
3+
}

0 commit comments

Comments
 (0)