Skip to content

Commit 172b598

Browse files
authored
Merge branch 'dev-2.0' into decorator-api
2 parents 98b48ea + 2ef7704 commit 172b598

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

src/webgl/p5.Camera.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,17 @@ class Camera {
17991799

18001800
_cam.cameraType = this.cameraType;
18011801

1802+
_cam.defaultAspectRatio = this.defaultAspectRatio;
1803+
_cam.defaultEyeX = this.defaultEyeX;
1804+
_cam.defaultEyeY = this.defaultEyeY;
1805+
_cam.defaultEyeZ = this.defaultEyeZ;
1806+
_cam.defaultCameraFOV = this.defaultCameraFOV;
1807+
_cam.defaultCenterX = this.defaultCenterX;
1808+
_cam.defaultCenterY = this.defaultCenterY;
1809+
_cam.defaultCenterZ = this.defaultCenterZ;
1810+
_cam.defaultCameraNear = this.defaultCameraNear;
1811+
_cam.defaultCameraFar = this.defaultCameraFar;
1812+
18021813
return _cam;
18031814
}
18041815

test/unit/visual/cases/webgl.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ visualSuite('WebGL', function() {
6161
p5.image(fbo, 0, 0);
6262
screenshot();
6363
});
64+
65+
visualTest('Works after perspective() with no args', function(p5, screenshot) {
66+
p5.createCanvas(50, 50, p5.WEBGL);
67+
p5.background(200);
68+
p5.perspective();
69+
p5.noStroke();
70+
p5.lights();
71+
p5.sphere(20);
72+
screenshot();
73+
});
6474
});
6575

6676
visualSuite('filter', function() {
1.61 KB
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)