Options
All
  • Public
  • Public/Protected
  • All
Menu

Manage the environment parameters and options

Hierarchy

  • environment

Index

Constructors

constructor

Properties

ambientsound

ambientsound: string

Url of the sound to be played in the background

ambientsoundvolume

ambientsoundvolume: number = 1

Volume of the sound to be played in the background

fogcolor

fogcolor: Array<number>

Fog color to reder in the scene, if undefined there is no fog

light

light: boolean

Do we use a main light or not (one environment texture can be enough)

lightcolor

lightcolor: Array<number>

The color diffused by the main light

lightintensity

lightintensity: number = 1

Intensity of the main light

mainlight

mainlight: lightPattern

Main light of the scene (directionnal light by default)

skySize

skySize: number = 50

Size of the sky sphere which also determine the size of the scene and camera movement possibilities

skyblur

skyblur: number

How blur the sky must be depending on the environment texture

skybox

skybox: shapePattern

The big sphere surrounding the scene and on which is set the reflection texture

skybrightness

skybrightness: number

How bright the sky must be depending on the environment texture

skycolor

skycolor: Array<number>

Add a color overlay on the skybox

skydiffuse

skydiffuse: string

Url of the environment texture to use (must be .env or .dds file)

Methods

checkOption

playAmbientSound

  • playAmbientSound(): void

setAmbiantSound

  • setAmbiantSound(url: string): void
  • Set the ambiant from the url of a sound file

    Parameters

    • url: string

      Url of the sound to load

    Returns void

setAmbiantSoundVolume

  • setAmbiantSoundVolume(volume: number): void
  • Set the volume of the ambiant sound

    Parameters

    • volume: number

      New sound volume

    Returns void

setFogColor

  • setFogColor(color: Array<number>): boolean
  • Set the scene fog color, opacity will be use for fog density

    Parameters

    • color: Array<number>

      New color of the fog

    Returns boolean

setFogDensity

  • setFogDensity(density: number): void
  • Set the scene fog density

    Parameters

    • density: number

      New density of the density

    Returns void

setLight

  • setLight(lightEnabled: boolean): void
  • Set if we will use a main light or not

    Parameters

    • lightEnabled: boolean

      new main light value

    Returns void

setLightColor

  • setLightColor(color: Array<number>): void
  • Set the color of the main light

    Parameters

    • color: Array<number>

      New light color

    Returns void

setLightIntensity

  • setLightIntensity(intensity: number): void
  • Set the intensity of the main light

    Parameters

    • intensity: number

      New light intensity

    Returns void

setOption

setSkyBlur

  • setSkyBlur(blur: number): void

setSkyBrightness

  • setSkyBrightness(brightness: number): void
  • Set the brightness of the sky

    Parameters

    • brightness: number

      New brightness of the sky

    Returns void

setSkyColor

  • setSkyColor(color: Array<number>): void
  • Set the color of the sky

    Parameters

    • color: Array<number>

      new color of the sky

    Returns void

setSkyDiffuse

  • setSkyDiffuse(url: string): void
  • Set the environment texture

    Parameters

    • url: string

      Url of the new texture to load

    Returns void

start

  • start(callback?: Function): void
  • Start environment with a small animation which will make the fog progressively fade out and reach its normal value

    Parameters

    • Optional callback: Function

      call when animation is finished

    Returns void

stopAmbientSound

  • stopAmbientSound(): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc