xyj3d API 文档 - v1.0.0
    正在准备搜索索引...

    类 NightVision

    NightVision

    索引

    构造函数

    • 构造函数

      参数

      参数名称类型默认值描述信息
      viewerViewer—场景

      返回 NightVision

    属性

    type: string

    类型

    state: string

    当前状态,取值见 State(initialized / enabled / disabled)

    enable: boolean

    注意:旧实现的构造函数没有初始化 this._effect,首次 enable = true 会因 this._effect.enabled 读取 undefined 而抛 TypeError。

    是否开启。 首次置 true 时惰性创建并加入 scene.postProcessStages;重复切换幂等。

    selected: boolean

    选中对象(可选):只对给定实体生效。 详见 BlackAndWhite 的 selected 说明。

    选中的实体或实体数组

    方法

    • 销毁:从 scene.postProcessStages 移除并 destroy() 本阶段,释放 GPU 资源。 重复调用安全。

      返回 unknown

    • 是否已销毁

      返回 boolean