Object3D

HemisphereLightHelper

创建一个虚拟的球形网格 Mesh 的辅助对象来模拟 半球形光源 HemisphereLight.

代码示例

const light = new v3d.HemisphereLight(0xffffbb, 0x080820, 1); const helper = new v3d.HemisphereLightHelper(light, 5); scene.add(helper);

构造函数

HemisphereLightHelper(light : HemisphereLight, sphereSize : Number, color : Hex)

light -- 被模拟的光源.

size -- 用于模拟光源的网格尺寸.

color -- (可选的) 如果没有赋值辅助对象将使用光源的颜色.

属性

请到基类 Object3D 页面查看公共属性.

.light : HemisphereLight

被模拟的半球形光源.

.matrix : Object

请参考半球形光源的世界矩阵 matrixWorld.

.matrixAutoUpdate : Object

请查看 Object3D.matrixAutoUpdate. 这里设置为 false 表示辅助对象 使用半球形光源的 matrixWorld.

.color : hex

构造函数中传入的颜色值. 默认为 undefined. 如果改变该值, 辅助对象的颜色将在下一次 update 被调用时更新.

方法

请到基类 Object3D 页面查看其常用方法.

.dispose() → null

销毁该半球形光源辅助对象.

.update() → null

更新辅助对象,与 .light 属性的位置和方向保持一致.

源码

src/helpers/HemisphereLightHelper.js