Class

PostEffect

PostEffect(program)

A class to create post-effects

Constructor

new PostEffect(program)

Constructor
Parameters:
Name Type Description
program Program A Program instance.

View Source Extra/PostEffect.js, line 12

Members

RenderAPI

protected renderApi

The render API to use

View Source Extra/PostEffect.js, line 25

Methods

begin(coloropt)

Begin
Parameters:
Name Type Attributes Description
color Color <optional>
A Color instance

View Source Extra/PostEffect.js, line 71

init(width, height, useDepthBufferopt, userStencilBufferopt) → {PostEffect}

Init the post effect composer
Parameters:
Name Type Attributes Default Description
width number Resulting effect width
height number Resulting effect height
useDepthBuffer boolean <optional>
true True to use depth buffer (useful in 3D)
userStencilBuffer boolean <optional>
false True to use stencil buffer

View Source Extra/PostEffect.js, line 54

A reference to the instance
PostEffect

render(scene, camera)

Render the given scene
Parameters:
Name Type Description
scene Scene A Scene instance
camera Camera A Camera instance

View Source Extra/PostEffect.js, line 100

setEffectValue(name, type, value) → {PostEffect}

Set value of an element from the program
Parameters:
Name Type Description
name string Element's name in the shader
type Type Type of value to send
value Array.<number> | number | boolean | Texture | Float32Array A value

View Source Extra/PostEffect.js, line 124

A reference to the instance
PostEffect

setProgram(program) → {PostEffect}

Set program to use
Parameters:
Name Type Description
program Program A Program instance

View Source Extra/PostEffect.js, line 110

A reference to the instance
PostEffect