Skip to content

Commit 710fb18

Browse files
committed
updated text, styling, and added a TOC
1 parent d42571f commit 710fb18

File tree

3 files changed

+174
-91
lines changed

3 files changed

+174
-91
lines changed

src/assets/learn/basic3d/cameraExample.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
<select id="cameraType">
5050
<option value="perspective" selected >perspective</option>
5151
<option value="ortho">ortho</option>
52+
<option value="orbitControl">orbitControl</option>
5253
</select>
5354
</label>
5455
<label>camera fov: <input id="cameraFov" type="range" step="0.001" min="69" max="72.5" value="70"/></label>

src/assets/learn/basic3d/cameraExample.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ function setup() {
1414

1515
function draw() {
1616
background(220);
17-
camera(200,-200,200)
17+
1818

1919
cameraType = selectCameraType.value;
2020

2121
if(cameraType === 'ortho') {
22+
camera(200,-200,200)
2223
ortho(-width / 2, width / 2, height / 2, -height / 2, 0, 500);
23-
} else {
24+
} else if(cameraType === 'perspective'){
25+
camera(200,-200,200)
2426
perspective(fovSlider.value)
27+
} else {
28+
orbitControl()
2529
}
2630

2731
box(50);

0 commit comments

Comments
 (0)