Configures Scalable Ambient Obscurance (SAO) for a View.

See @xeokit/sdk/viewer for usage info.

Hierarchy (View Summary)

Properties

destroyed: boolean

True once this Component has been destroyed.

Don't use this Component if this is true.

dirty: boolean
id: string

Unique ID of this Component.

view: View

The View to which this SAO belongs.

Accessors

  • get blendCutoff(): number
  • Gets the SAO blend cutoff.

    Default value is 0.3.

    Normally you don't need to alter this.

    Returns number

  • set blendCutoff(value: number): void
  • Sets the SAO blend cutoff.

    Default value is 0.3.

    Normally you don't need to alter this.

    Parameters

    • value: number

    Returns void

  • get blendFactor(): number
  • Gets the SAO blend scale.

    Default value is 1.0.

    Normally you don't need to alter this.

    Returns number

  • set blendFactor(value: number): void
  • Sets the SAO blend factor.

    Default value is 1.0.

    Normally you don't need to alter this.

    Parameters

    • value: number

    Returns void

  • get intensity(): number
  • Gets the degree of darkening (ambient obscurance) produced by the SAO effect.

    Default value is 0.15.

    Returns number

  • set intensity(value: number): void
  • Sets the degree of darkening (ambient obscurance) produced by the SAO effect.

    Default value is 0.15.

    Parameters

    • value: number

    Returns void

  • get kernelRadius(): number
  • Gets the maximum area that SAO takes into account when checking for possible occlusion for each fragment.

    Default value is 100.0.

    Returns number

  • set kernelRadius(value: number): void
  • Sets the maximum area that SAO takes into account when checking for possible occlusion for each fragment.

    Default value is 100.0.

    Parameters

    • value: number

    Returns void

  • get numSamples(): number
  • Gets the number of SAO samples.

    Default value is 10.

    Returns number

  • set numSamples(value: number): void
  • Sets the number of SAO samples.

    Default value is 10.

    Update this sparingly, since it causes a shader recompile.

    Parameters

    • value: number

    Returns void

  • get supported(): boolean
  • Gets whether SAO is supported by this browser and GPU.

    Even when enabled, SAO will only work if supported.

    Returns boolean

Methods

  • Protected

    Logs an error for this component to the JavaScript console.

    The console message will have this format: [ERROR] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The error message to log

    Returns void

  • Protected

    Logs a message for this component.

    The message will have this format: [LOG] [<component type> <component id>: <message>

    Parameters

    • message: string

      The message to log

    Returns void

  • Protected

    Logs a warning for this component to the JavaScript console.

    The console message will have this format: [WARN] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The warning message to log

    Returns void

Events

onDestroyed: EventEmitter<Component, null>

Emits an event when the Component has been destroyed.