Skip to content

Commit 1c8efce

Browse files
author
Jos Dirksen
committed
Another set of updates
1 parent 6ccb9eb commit 1c8efce

25 files changed

+434
-79
lines changed

assets/audio/cat.ogg

14 KB
Binary file not shown.

assets/audio/cow.ogg

25.4 KB
Binary file not shown.

assets/audio/dog.ogg

215 KB
Binary file not shown.

assets/textures/animals/cat.jpg

27.2 KB
Loading

assets/textures/animals/cow.png

679 KB
Loading

assets/textures/animals/dog.jpg

31.8 KB
Loading
4.25 KB
Loading

chapter-05/01-basic-2d-geometries-plane.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@
7272
// we need the first child, since it's a multimaterial
7373

7474

75-
this.width = plane.children[0].geometry.width;
76-
this.height = plane.children[0].geometry.height;
75+
this.width = plane.children[0].geometry.parameters.width;
76+
this.height = plane.children[0].geometry.parameters.height;
7777

78-
this.widthSegments = plane.children[0].geometry.widthSegments;
79-
this.heightSegments = plane.children[0].geometry.heightSegments;
78+
this.widthSegments = plane.children[0].geometry.parameters.widthSegments;
79+
this.heightSegments = plane.children[0].geometry.parameters.heightSegments;
8080

8181
this.redraw = function () {
8282
// remove the old plane

chapter-05/04-basic-3d-geometries-cube.html

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
webGLRenderer.setSize(window.innerWidth, window.innerHeight);
4545
webGLRenderer.shadowMapEnabled = true;
4646

47-
var cube = createMesh(new THREE.BoxGeometry(10, 10, 10));
47+
var cube = createMesh(new THREE.BoxGeometry(10, 10, 10, 1, 1, 1));
4848
// add the sphere to the scene
4949
scene.add(cube);
5050

@@ -70,16 +70,13 @@
7070
// setup the control gui
7171
var controls = new function () {
7272

73-
console.log(cube.children[0].geometry);
73+
this.width = cube.children[0].geometry.parameters.width;
74+
this.height = cube.children[0].geometry.parameters.height;
75+
this.depth = cube.children[0].geometry.parameters.depth;
7476

75-
// we need the first child, since it's a multimaterial
76-
this.width = cube.children[0].geometry.width;
77-
this.height = cube.children[0].geometry.height;
78-
this.depth = cube.children[0].geometry.depth;
79-
80-
this.widthSegments = cube.children[0].geometry.widthSegments;
81-
this.heightSegments = cube.children[0].geometry.heightSegments;
82-
this.depthSegments = cube.children[0].geometry.depthSegments;
77+
this.widthSegments = cube.children[0].geometry.parameters.widthSegments;
78+
this.heightSegments = cube.children[0].geometry.parameters.heightSegments;
79+
this.depthSegments = cube.children[0].geometry.parameters.depthSegments;
8380

8481

8582
this.redraw = function () {

chapter-05/05-basic-3d-geometries-sphere.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
// setup the control gui
6666
var controls = new function () {
6767
// we need the first child, since it's a multimaterial
68-
this.radius = sphere.children[0].geometry.radius;
69-
this.widthSegments = sphere.children[0].geometry.widthSegments;
70-
this.heightSegments = sphere.children[0].geometry.heightSegments;
68+
this.radius = sphere.children[0].geometry.parameters.radius;
69+
this.widthSegments = sphere.children[0].geometry.parameters.widthSegments;
70+
this.heightSegments = sphere.children[0].geometry.parameters.heightSegments;
7171
this.phiStart = 0;
7272
this.phiLength = Math.PI * 2;
7373
this.thetaStart = 0;

0 commit comments

Comments
 (0)