-
值:
light
-
值:
true
-
值:
SUPPORT_LIFE_CYCLE.THREE
- 300
-
类型:
Light
- 配置类型:
export interface LightConifg extends ObjectConfig {
color: string;
intensity: number;
}
- 默认配置:
{
color: "rgb(255, 255, 255)",
intensity: 1,
}
:::tip 此配置为内部使用 :::
-
类型:
AmbientLight
- 参照:https://threejs.org/docs/index.html?q=light#api/en/lights/AmbientLight
- 配置类型:
export type AmbientLightConfig = LightConifg;
- 默认配置:
{
color: "rgb(255, 255, 255)",
intensity: 1,
}
-
类型:
PointLight
- 参照:https://threejs.org/docs/index.html?q=light#api/en/lights/PointLight
- 配置类型:
export interface PointLightConfig extends LightConifg {
distance: number;
decay: number;
}
- 默认配置:
{
color: "rgb(255, 255, 255)",
intensity: 1,
}
-
类型:
SpotLight
- 参照:https://threejs.org/docs/index.html?q=light#api/en/lights/SpotLight
- 配置类型:
export interface SpotLightConfig extends LightConifg {
distance: number;
angle: number;
penumbra: number;
decay: number;
}
- 默认配置:
{
distance: 30,
angle: (Math.PI / 180) * 45,
penumbra: 0.01,
decay: 0.01,
}
-
类型:
DirectionalLight
- 参照:https://threejs.org/docs/index.html?q=light#api/en/lights/DirectionalLight
- 配置类型:
export interface DirectionalLightConfig extends LightConifg {
shadow: {
mapSize: {
width: number;
height: number;
};
camera: {
near: number;
far: number;
};
};
}
- 默认配置:
{
shadow: {
mapSize: {
width: 512,
height: 512,
},
camera: {
near: 0.5,
far: 500,
},
},
}
-
类型:
HemisphereLight
- 参照:https://threejs.org/docs/index.html?q=light#api/en/lights/HemisphereLight
- 配置类型:
export interface HemisphereLightConfig extends LightConifg {
groundColor: string;
}
- 默认配置:
{
color: "rgb(255, 255, 255)",
groundColor: "rgb(0, 0, 0)",
}
-
类型:
RectAreaLight
- 参照:https://threejs.org/docs/index.html?q=light#api/en/lights/RectAreaLight
- 配置类型:
export interface RectAreaLightConfig extends LightConifg {
width: number;
height: number;
}
- 默认配置:
{
width: 10,
height: 10,
}