HemisphereLightHelper 半球光助手

—> Object3D

function HemisphereLightHelper( light, size, color ) { } var geometry = new THREE.BoxGeometry(8, 8, 8, 2, 2, 2), material = new THREE.MeshPhongMaterial({color: 0x663399}), mesh = new THREE.Mesh( geometry, material ); scene.add(mesh); var ambientLight = new THREE.AmbientLight(0xffffff); scene.add(ambientLight); addHemisphereLightHelper(-3, 7, 12, 0xffff00, 0x00ff00); addHemisphereLightHelper(0,10,0, 0xffff00, 0xffffff); function addHemisphereLightHelper(x,y,z,color1, color2){ var light = new THREE.HemisphereLight(color1, color2); light.position.set(x,y,z); scene.add(light); light.target = mesh; var helper = new THREE.HemisphereLightHelper(light, 1, color2); scene.add(helper); }

Constructor

light size color
HemisphereLight 1
方向光 尺寸 颜色

Attributes

color : Hexadecimal value

Default value : 构造函数参数里的color, undefined
Description : 颜色

light : DirectionalLight

Default value : 构造函数参数里的light
Description : 方向光

matrix : object

Default value : object.matrixWorld
Description : 光线的矩阵世界。

matrixAutoUpdate : Boolean

Default value : false
Description : 矩阵自动更新。

material : Material

Default value : new MeshBasicMaterial( { wireframe: true, fog: false } )
Description : ?

Methods

dispose( ) : null

删除助手。

update( ) : null

基于相机的投影矩阵来更新助手。