_AmbientLight

环境光类,功能包括环境光的创建、设置等相关操作。 全部展开

属性展开

  • + color : uint

    颜色值。

    • 示例

       ambient.color = _Color.Red
  • + darkAmbient: bool

    设置环境光为暗部环境光。

    • 示例

       ambient.darkAmbient = true
  • + name : string

    环境光名称。

    • 示例

       ambient.name = 'ambientlight'
  • + power : number

    光强度,取值范围1~100。

    • 示例

      ambient.power = 60

构造方法展开

  • + function _AmbientLight() : _AmbientLight

    构造环境光。

代码示例

    _dofile('cameracontrol.lua')
    teapot = _mf:createTeapot()
    _rd.camera.eye = _Vector3.new(3, 3, 3)

    ambient = _AmbientLight.new()
    ambient.color = _Color.Green
    _rd:useLight(ambient)

    _app:onIdle(function(e)
    teapot:drawMesh()
    end)
问题反馈(登录才可以发表哦!)