Class: LightManager

LightManager

new LightManager(params)

光管理类

Name Type Description
params Object optional

创建对象的属性参数。可包含此类的所有属性。

Members Show Inherited

Name Type Default Description
isLightManager boolean true
className string LightManager
shadowEnabled boolean true

是否开启阴影

ambientLights Array.<AmbientLight>
directionalLights Array.<DirectionalLight>
pointLights Array.<PointLight>
spotLights Array.<SpotLight>
areaLights Array.<AreaLight>
updateCustomInfo updateCustomInfoCallback null

更新自定义灯光信息

Methods Show Inherited

增加光

Name Type Description
light Light

光源

Returns:
Type Description
LightManager this

getDirectionalInfo(camera){Object}

获取方向光信息

Name Type Description
camera Camera

摄像机

Returns:
Type Description
Object

getSpotInfo(camera){Object}

获取聚光灯信息

Name Type Description
camera Camera

摄像机

Returns:
Type Description
Object

getPointInfo(camera){Object}

获取点光源信息

Name Type Description
camera Camera

摄像机

Returns:
Type Description
Object

getAreaInfo(camera){Object}

获取面光源信息

Name Type Description
camera Camera

摄像机

Returns:
Type Description
Object

getAmbientInfo(){Object}

获取环境光信息

Returns:
Type Description
Object

updateInfo(camera)

更新所有光源信息

Name Type Description
camera Camera

摄像机

getInfo(){Object}

获取光源信息

Returns:
Type Description
Object

重置所有光源

getShadowMapCount(type){number}

获取阴影贴图数量

Name Type Description
type string
Returns:
Type Description
number

update(renderer, lights, camera)

更新光源信息

Name Type Description
renderer WebGLRenderer
lights Array.<Light>
camera Camera

createShadowMap(renderer, camera)

生成阴影贴图

Name Type Description
renderer WebGLRenderer
camera Camera