HemisphereLight
A light source positioned directly above the scene.
HemisphereLight类用于在场景中创建半球光,主要用在室外,但是没有阴影。
构造函数
HemisphereLight( skyColor, groundColor, intensity )
各参数解释如下:
skyColor
— Numeric value of the RGB sky color.(天空的颜色)
groundColor
— Numeric value of the RGB ground color.(地面的颜色)
intensity
— Numeric value of the light’s strength/intensity.(光的强度)
例子代码
var renderer, scene, camera, cube, plane;
var stat = null;
//绑定canvas和渲染器
function initRender() {
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
//清除画面颜色
renderer.setClearColor(0x000000);