Renderer

Renderer

# new Renderer()

Source:

Deferred renderer

Extends

Members

# __uid__ :number

Source:
Inherited From:
Type:
  • number

# autoResize :boolean

Source:

If enable auto resizing from given defualt renderer size.

Type:
  • boolean

# shadowMapPass :clay.prePass.ShadowMap

Source:

Provide ShadowMapPass for shadow rendering.

Type:

Methods

# after(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of once('after' + name)

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# before(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of once('before' + name)

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# dispose(renderer)

Source:
Parameters:
Name Type Description
renderer clay.Renderer

# error(action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of on('error')

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# getGBuffer() → {clay.deferred.GBuffer}

Source:
Returns:
Type
clay.deferred.GBuffer

# getTargetFrameBuffer() → {clay.FrameBuffer}

Source:
Returns:
Type
clay.FrameBuffer

# getTargetTexture() → {clay.Texture2D}

Source:
Returns:
Type
clay.Texture2D

# has(name, action) → {boolean}

Source:
Inherited From:
Mixes In:

If registered the event handler

Parameters:
Name Type Description
name string
action function
Returns:
Type
boolean

# off(action, contextopt)

Source:
Inherited From:
Mixes In:

Remove event listener

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# on(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Register event handler

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# once(name, action, contextopt)

Source:
Inherited From:
Mixes In:

Register event, event will only be triggered once and then removed

Parameters:
Name Type Attributes Description
name string
action function
context Object <optional>

# render(renderer, scene, camera, optsopt)

Source:

Do render

Parameters:
Name Type Attributes Description
renderer clay.Renderer
scene clay.Scene
camera clay.Camera
opts Object <optional>
Properties
Name Type Attributes Default Description
renderToTarget boolean <optional>
false

If not ouput and render to the target texture

notUpdateShadow boolean <optional>
true

If not update the shadow.

notUpdateScene boolean <optional>
true

If not update the scene.

# resize(width, height)

Source:

Set renderer size.

Parameters:
Name Type Description
width number
height number

# success(action, contextopt)

Source:
Inherited From:
Mixes In:

Alias of on('success')

Parameters:
Name Type Attributes Description
action function
context Object <optional>

# trigger(name)

Source:
Inherited From:
Mixes In:

Trigger event

Parameters:
Name Type Description
name string