You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
468 B
16 lines
468 B
import * as THREE from 'three';
|
|
|
|
var renderer = new THREE.WebGLRenderer();
|
|
renderer.setSize( window.innerWidth, window.innerHeight );
|
|
renderer.setClearColor(0xb9d3ff, 1); //设置背景颜色
|
|
document.body.appendChild( renderer.domElement );
|
|
|
|
var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 1000 );
|
|
camera.position.set( 0, 0, 100 );
|
|
camera.lookAt( 0, 0, 0 );
|
|
|
|
var scene = new THREE.Scene();
|
|
|
|
|
|
|
|
renderer.render( scene, camera );
|