Home Reference Source
import {TiltShiftEffect} from 'postprocessing'
public class | source

TiltShiftEffect

Extends:

three~EventDispatcherEffect → TiltShiftEffect

Indirect Implements:

A tilt shift effect.

Constructor Summary

Public Constructor
public

constructor(options: Object)

Constructs a new tilt shift Effect

Member Summary

Public Members
public get
this get was deprecated.

A blend bias.

public set
public

A blur pass.

public get

The softness of the focus area edges.

public set
public get

The relative size of the focus area.

public set
public get

The relative offset of the focus area.

public set
public get

The rotation of the focus area in radians.

public set

Method Summary

Public Methods
public

initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number)

Performs initialization tasks.

public

setSize(width: Number, height: Number)

Updates the size of internal render targets.

public

update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number)

Updates this effect.

Inherited Summary

From class Effect
public get

inputColorSpace: ColorSpace

this get is experimental.

The input color space.

public set

mainCamera: Camera

Sets the main camera.

public set

mainScene: Scene

Sets the main scene.

public get

outputColorSpace: ColorSpace

this get is experimental.

The output color space.

protected set

inputColorSpace: ColorSpace

this set is experimental.
protected set

outputColorSpace: ColorSpace

this set is experimental.
public

The blend mode of this effect.

public

Preprocessor macro definitions.

public

WebGL extensions that are required by this effect.

public

The name of this effect.

public

uniforms: Map<String, Uniform>

Shader uniforms.

protected

renderer: WebGLRenderer

this member was deprecated.

The renderer.

public

Performs a shallow search for properties that define a dispose method and deletes them.

public

Returns the effect attributes.

public
this method was deprecated. Use blendMode instead.

Returns the blend mode.

public
this method was deprecated. Use defines instead.

Returns the preprocessor macro definitions.

public
this method was deprecated. Use extensions instead.

Returns the WebGL extensions that are required by this effect.

public

Returns the fragment shader.

public
this method was deprecated. Use name instead.

Returns the name of this effect.

public

getUniforms(): Map<String, Uniform>

this method was deprecated. Use uniforms instead.

Returns the uniforms of this effect.

public

Returns the vertex shader.

public

initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number)

Performs initialization tasks.

public

setDepthTexture(depthTexture: Texture, depthPacking: DepthPackingStrategies)

Sets the depth texture.

public

setRenderer(renderer: WebGLRenderer)

this method was deprecated.

Sets the renderer.

public

setSize(width: Number, height: Number)

Updates the size of this effect.

public

update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number)

Updates this effect by performing supporting operations.

protected

Sets the effect attributes.

protected

Informs the associated EffectPass that this effect requires a shader recompilation.

protected

setFragmentShader(fragmentShader: String)

Sets the fragment shader.

protected

setVertexShader(vertexShader: String)

Sets the vertex shader.

Public Constructors

public constructor(options: Object) source

Constructs a new tilt shift Effect

Override:

Effect#constructor

Params:

NameTypeAttributeDescription
options Object
  • optional

The options.

options.blendFunction BlendFunction
  • optional

The blend function of this effect.

options.offset Number
  • optional
  • default: 0.0

The relative offset of the focus area.

options.rotation Number
  • optional
  • default: 0.0

The rotation of the focus area in radians.

options.focusArea Number
  • optional
  • default: 0.4

The relative size of the focus area.

options.feather Number
  • optional
  • default: 0.3

The softness of the focus area edges.

options.bias Number
  • optional
  • default: 0.06

Deprecated.

options.kernelSize KernelSize
  • optional
  • default: KernelSize.MEDIUM

The blur kernel size.

options.resolutionScale Number
  • optional
  • default: 0.5

The resolution scale.

options.resolutionX Number
  • optional
  • default: Resolution.AUTO_SIZE

The horizontal resolution.

options.resolutionY Number
  • optional
  • default: Resolution.AUTO_SIZE

The vertical resolution.

Public Members

public get bias: Number source

this get was deprecated.

A blend bias.

public set bias source

public blurPass: TiltShiftBlurPass source

A blur pass.

public get feather: Number source

The softness of the focus area edges.

public set feather source

public get focusArea: Number source

The relative size of the focus area.

public set focusArea source

public get offset: Number source

The relative offset of the focus area.

public set offset source

public get rotation: Number source

The rotation of the focus area in radians.

public set rotation source

Public Methods

public initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) source

Performs initialization tasks.

Override:

Effect#initialize

Params:

NameTypeAttributeDescription
renderer WebGLRenderer

The renderer.

alpha Boolean

Whether the renderer uses the alpha channel or not.

frameBufferType Number

The type of the main frame buffers.

public setSize(width: Number, height: Number) source

Updates the size of internal render targets.

Override:

Effect#setSize

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.

public update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number) source

Updates this effect.

Override:

Effect#update

Params:

NameTypeAttributeDescription
renderer WebGLRenderer

The renderer.

inputBuffer WebGLRenderTarget

A frame buffer that contains the result of the previous pass.

deltaTime Number
  • optional

The time between the last frame and the current one in seconds.