CSMLight

Glodon.Bimface.Light. CSMLight

场景辅助光类

Constructor

new Glodon.Bimface.Light.CSMLight()

Methods

enableShadow(enable)

开启/关闭阴影,开启后方向光的阴影自动关闭

Parameters:
Name Type Description
enable Boolean

开启/关闭阴影

getDirection()

获取CSM对象的投影方向

Returns:
Type Description
Object

CSM对象的投影方向

getId()

获取光源ID

Returns:
Type Description
String

光源ID

isShadowEnabled()

获取CSM对象的阴影开启状态

Returns:
Type Description
Boolean

CSM对象的阴影开启状态

setDirection(direction)

设置CSM对象的阴影投影方向

Parameters:
Name Type Description
direction Object

CSM对象的投影方向, 用向量对象表示, 例如:{ x: 0.64, y: -0.48, z: -0.6 }

setDirectionByCondition(latLon, date)

根据经纬度及时间设置CSM对象的投影方向

Parameters:
Name Type Description
latLon Object

表示经纬度的对象, 例如: { lat: 31.0, lon: 120.0 }

date Date

时间对象, 例如: new Date('2020-05-16 16:00:00 GMT+8')