[page:Object3D] →

方向光辅助工具([name])

用来在场景中显示[page:DirectionalLight]效果的辅助工具对象。 由一个平面和一条表示光的位置与方向的线组成。

示例

var light = new THREE.DirectionalLight( 0xFFFFFF ); var helper = new THREE.DirectionalLightHelper( light, 5 ); scene.add( helper );

构造器

[name]( [param:DirectionalLight light], [param:Number size], [param:Hex color] )

[page:DirectionalLight light]-- 将会被可视化的光。

[page:Number size] -- (可选)平面的大小,默认为*1*。(optional) dimensions of the plane. Default is *1*.

[page:Hex color] -- (可选)如果没有设置这个值,辅助工具将会使用光线本身的颜色。(optional) if this is not the set the helper will take the color of the light.

属性

请参阅其基类[page:Object3D]来查看共有属性。

[property:Line lightPlane]

包含着用于显示方向光的位置的线(网格)。

[property:DirectionalLight light]

Reference to the [page:DirectionalLight directionalLight] being visualized.

[property:object matrix]

Reference to the light's [page:Object3D.matrixWorld matrixWorld].

[property:object matrixAutoUpdate]

See [page:Object3D.matrixAutoUpdate]. Set to *false* here as the helper is using the light's [page:Object3D.matrixWorld matrixWorld].

[property:hex color]

The color parameter passed in the constructor. Default is *undefined*. If this is changed, the helper's color will update the next time [page:.update update] is called.

Methods

See the base [page:Object3D] class for common properties.

[method:null dispose]()

Dispose of the directionalLightHelper.

[method:null update]()

Updates the helper to match the position and direction of the [page:.light directionalLight] being visualized.

Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]