Skip to content

Commit 474409b

Browse files
committed
Merge pull request Ovilia#1 from Ovilia/hotfix/chapter8-4-1
Spotlight display
2 parents aec8922 + 91456d9 commit 474409b

File tree

2 files changed

+103
-5
lines changed

2 files changed

+103
-5
lines changed

Chapter8/8.4.1.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
var alpha = 0;
1313

1414
function init() {
15-
renderer = new THREE.WebGLRenderer({
16-
canvas: document.getElementById('mainCanvas')
17-
});
18-
renderer.setClearColor(0x000000);
15+
renderer = new THREE.WebGLRenderer();
16+
renderer.setSize(400, 300);
17+
18+
var container = document.getElementById('canvas');
19+
container.appendChild(renderer.domElement);
1920
renderer.shadowMapEnabled = true;
2021

2122
scene = new THREE.Scene();
@@ -67,6 +68,6 @@
6768
</head>
6869

6970
<body onload="init()">
70-
<canvas id="mainCanvas" width="400px" height="300px" ></canvas>
71+
<div id="canvas" width="400px" height="300px"></div>
7172
</body>
7273
</html>

README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,100 @@ Three.jsExamples
22
================
33

44
Examples for a book on Three.js
5+
6+
7+
8+
Chapter 1
9+
---------
10+
11+
http://zhangwenli.com/ThreeExample.js/Chapter1/1.1.1.html
12+
13+
http://zhangwenli.com/ThreeExample.js/Chapter1/1.2.1.html
14+
15+
Chapter 2
16+
---------
17+
18+
http://zhangwenli.com/ThreeExample.js/Chapter2/2.3.1.html
19+
20+
http://zhangwenli.com/ThreeExample.js/Chapter2/2.4.1.html
21+
22+
Chpater 3
23+
---------
24+
25+
http://zhangwenli.com/ThreeExample.js/Chapter3/3.1.1.html
26+
27+
http://zhangwenli.com/ThreeExample.js/Chapter3/3.2.1.html
28+
29+
http://zhangwenli.com/ThreeExample.js/Chapter3/3.3.1.html
30+
31+
Chapter 4
32+
---------
33+
34+
http://zhangwenli.com/ThreeExample.js/Chapter4/4.1.1.html
35+
36+
http://zhangwenli.com/ThreeExample.js/Chapter4/4.2.1.html
37+
38+
http://zhangwenli.com/ThreeExample.js/Chapter4/4.3.1.html
39+
40+
http://zhangwenli.com/ThreeExample.js/Chapter4/4.4.1.html
41+
42+
http://zhangwenli.com/ThreeExample.js/Chapter4/4.5.1.html
43+
44+
http://zhangwenli.com/ThreeExample.js/Chapter4/4.5.2.html
45+
46+
http://zhangwenli.com/ThreeExample.js/Chapter4/4.5.3.html
47+
48+
Chapter 5
49+
---------
50+
51+
http://zhangwenli.com/ThreeExample.js/Chapter5/5.1.1.html
52+
53+
http://zhangwenli.com/ThreeExample.js/Chapter5/5.2.1.html
54+
55+
http://zhangwenli.com/ThreeExample.js/Chapter5/5.2.2.html
56+
57+
Chapter 6
58+
---------
59+
60+
http://zhangwenli.com/ThreeExample.js/Chapter6/6.1.1.html
61+
62+
http://zhangwenli.com/ThreeExample.js/Chapter6/6.1.2.html
63+
64+
http://zhangwenli.com/ThreeExample.js/Chapter6/6.2.1.html
65+
66+
http://zhangwenli.com/ThreeExample.js/Chapter6/6.2.2.html
67+
68+
http://zhangwenli.com/ThreeExample.js/Chapter6/6.3.1.html
69+
70+
Chapter 7
71+
---------
72+
73+
http://zhangwenli.com/ThreeExample.js/Chapter7/7.2.1.html
74+
75+
http://zhangwenli.com/ThreeExample.js/Chapter7/7.3.1.html
76+
77+
http://zhangwenli.com/ThreeExample.js/Chapter6/7.3.2.html
78+
79+
Chapter 8
80+
---------
81+
82+
http://zhangwenli.com/ThreeExample.js/Chapter8/8.1.1.html
83+
84+
http://zhangwenli.com/ThreeExample.js/Chapter8/8.1.2.html
85+
86+
http://zhangwenli.com/ThreeExample.js/Chapter8/8.1.3.html
87+
88+
http://zhangwenli.com/ThreeExample.js/Chapter8/8.2.1.html
89+
90+
http://zhangwenli.com/ThreeExample.js/Chapter8/8.3.1.html
91+
92+
http://zhangwenli.com/ThreeExample.js/Chapter8/8.4.1.html
93+
94+
http://zhangwenli.com/ThreeExample.js/Chapter8/8.5.1.html
95+
96+
Chapter 9
97+
---------
98+
99+
http://zhangwenli.com/ThreeExample.js/Chapter9/9.3.1.html
100+
101+
http://zhangwenli.com/ThreeExample.js/Chapter9/9.3.2.html

0 commit comments

Comments
 (0)