跳至主要內容

HemisphereLight

yisky小于 1 分钟组件文档组件HemisphereLight

HemisphereLight——半球光组件,直接放置在场景之上,光照颜色从天空光线颜色渐变到地面光线颜色。

注意

半球光不能投射阴影。

创建

import { HemisphereLight } from '@fantasy3d/core';

const { rootEntity } = scene;

// 在场景根实体上添加半球光组件
rootEntity.addComponent( HemisphereLight, {

    skyColor: '#ffffbb',        // 天空颜色
    groundColor: '#080820',     // 地面颜色
    intensity: 0.25 * Math.PI   // 强度

} );

提示

HemisphereLight 组件初始化参数,详见 HemisphereLightOptions

属性

上次编辑于: