<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="lib/three.js"></script>
<style>
*{
padding: 0;
margin: 0;
}
</style>
</head>
<body>
<script>
var scene = new THREE.Scene(); //场景
var width = window.innerWidth;
var height = window.innerHeight;
var renderer = new THREE.WebGLRenderer();
renderer.setSize(width, height)
document.body.appendChild(renderer.domElement);
renderer.render(scene, null);
</script>
</body>
</html>
init.png
canvas.png
网友评论