Global

Members

blur :number

Set/Get blur value
Type:
  • number
Source:

(constant) crossFadeAudioVolumes

Crossfades the volume between two audio items based on step
Source:

(constant) fadeAudioVolume

Fades the volume of an audio item between min and max based on step
Source:

level :number

Gets or sets the water level (green channel of the backdrop)
Type:
  • number
Source:

scale :number

Gets or sets the scale of the water displacement
Type:
  • number
Source:

speed :number

Gets or sets the speed of the water animation
Type:
  • number
Source:

Methods

render(delay)

Renders the animated water effect
Parameters:
Name Type Description
delay number The time delay since the last render
Source:

render()

Render
Source:

setSize(w, h)

Sets the size of the animated water effect
Parameters:
Name Type Description
w number Width
h number Height
Source:

setSize(w, h)

Set Renderer Size
Parameters:
Name Type Description
w number Width
h number Height
Source:

Type Definitions

KeyboardConfig

Type:
  • Object
Properties:
Name Type Attributes Default Description
useCode boolean <optional>
false Identify keys by `event.code` (the physical key, independent of the keyboard layout and modifiers) instead of `event.key`
preventDefault Array.<string> <optional>
[] Ids whose default browser action is prevented, such as page scrolling
Source:

MouseConfig

Type:
  • Object
Properties:
Name Type Attributes Default Description
preventContextMenu boolean <optional>
false Prevent the context menu on the target, so the secondary button can be used in the game
Source:

SmoothLightRendererConfig

Type:
  • Object
Properties:
Name Type Description
blur number
Source: