We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4882c2c + b89cfa0 commit f4f54bfCopy full SHA for f4f54bf
Chapter8/8.4.1.html
@@ -12,10 +12,11 @@
12
var alpha = 0;
13
14
function init() {
15
- renderer = new THREE.WebGLRenderer({
16
- canvas: document.getElementById('mainCanvas')
17
- });
18
- renderer.setClearColor(0x000000);
+ renderer = new THREE.WebGLRenderer();
+ renderer.setSize(400, 300);
+
+ var container = document.getElementById('canvas');
19
+ container.appendChild(renderer.domElement);
20
renderer.shadowMapEnabled = true;
21
22
scene = new THREE.Scene();
@@ -67,6 +68,6 @@
67
68
</head>
69
70
<body onload="init()">
- <canvas id="mainCanvas" width="400px" height="300px" ></canvas>
71
+ <div id="canvas" width="400px" height="300px"></div>
72
</body>
73
</html>
0 commit comments