Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BlurEffect

Hierarchy

Index

Constructors

constructor

Properties

direction

direction: string

Protected indexBuffer

indexBuffer: IndexBuffer3D

The internally used index buffer used on rendering.

Protected indexBufferSize

indexBufferSize: number

The current size of the index buffer (in number of indices).

mvpMatrix3D

mvpMatrix3D: Matrix3D

The MVP (modelview-projection) matrix transforms vertices into clipspace.

onRestore

onRestore: function

The that you provide here will be called after a context loss. Call both "upload..." methods from within the callback to restore any vertex or index buffers. The callback will be executed with the effect as its sole parameter.

Type declaration

    • (Effect: any): void
    • Parameters

      • Effect: any

      Returns void

Protected program

program: Program

Returns the current program, either by creating a new one (via createProgram) or by getting it from the Painter. Do not override this method! Instead, implement createProgram.

programBaseName

programBaseName: string

Returns the base name for the program. @default the fully qualified class name

programName

programName: string

Returns the full name of the program, which is used to register it at the current Painter.

The default implementation efficiently combines the program's base and variant names (e.g. LightEffect#42). It shouldn't be necessary to override this method.

programVariantName

programVariantName: number

Override this method if the effect requires a different program depending on the current settings. Ideally, you do this by creating a bit mask encoding all the options. This method is called often, so do not allocate any temporary objects when overriding.

@default 0

quality

quality: number

strength

strength: number

texture

texture: Texture

The texture to be mapped onto the vertices.

textureRepeat

textureRepeat: boolean

Indicates if pixels at the edges will be repeated or clamped. Only works for power-of-two textures. @default false

textureSmoothing

textureSmoothing: string

The smoothing filter that is used for the texture. @default bilinear

Protected vertexBuffer

vertexBuffer: VertexBuffer3D

The internally used vertex buffer used on rendering.

Protected vertexBufferSize

vertexBufferSize: number

The current size of the vertex buffer (in blocks of 32 bits).

vertexFormat

vertexFormat: VertexDataFormat

The data format that this effect requires from the VertexData that it renders: "position:number2"

Static HORIZONTAL

HORIZONTAL: string

Static STD_VERTEX_SHADER

STD_VERTEX_SHADER: string

The AGAL code for the standard vertex shader that most filters will use. It simply transforms the vertex coordinates to clip-space and passes the texture coordinates to the fragment program (as 'v0').

Static VERTEX_FORMAT

VERTEX_FORMAT: VertexDataFormat

The vertex format expected by uploadVertexData: "position:number2, texCoords:number2"

Static VERTICAL

VERTICAL: string

Methods

dispose

  • dispose(): void

Protected get_direction

  • get_direction(): string

Protected get_indexBuffer

  • get_indexBuffer(): IndexBuffer3D

Protected get_indexBufferSize

  • get_indexBufferSize(): number

Protected get_mvpMatrix3D

  • get_mvpMatrix3D(): Matrix3D

Protected get_onRestore

  • get_onRestore(): function

Protected get_program

Protected get_programBaseName

  • get_programBaseName(): string

Protected get_programName

  • get_programName(): string

Protected get_programVariantName

  • get_programVariantName(): number

Protected get_quality

  • get_quality(): number

Protected get_strength

  • get_strength(): number

Protected get_texture

Protected get_textureRepeat

  • get_textureRepeat(): boolean

Protected get_textureSmoothing

  • get_textureSmoothing(): string

Protected get_vertexBuffer

  • get_vertexBuffer(): VertexBuffer3D

Protected get_vertexBufferSize

  • get_vertexBufferSize(): number

Protected get_vertexFormat

purgeBuffers

  • purgeBuffers(vertexBuffer?: boolean, indexBuffer?: boolean): void

render

  • render(firstIndex?: number, numTriangles?: number): void
  • Draws the triangles described by the index- and vertex-buffers, or a range of them. This calls beforeDraw, context.drawTriangles, and afterDraw, in this order.

    Parameters

    • Optional firstIndex: number
    • Optional numTriangles: number

    Returns void

Protected set_direction

  • set_direction(value: string): string

Protected set_mvpMatrix3D

  • set_mvpMatrix3D(value: Matrix3D): Matrix3D

Protected set_onRestore

  • set_onRestore(value: function): function

Protected set_programBaseName

  • set_programBaseName(value: string): string

Protected set_quality

  • set_quality(value: number): number

Protected set_strength

  • set_strength(value: number): number

Protected set_texture

Protected set_textureRepeat

  • set_textureRepeat(value: boolean): boolean

Protected set_textureSmoothing

  • set_textureSmoothing(value: string): string

uploadIndexData

  • uploadIndexData(indexData: IndexData, bufferUsage?: string): void
  • Uploads the given index data to the internal index buffer. If the buffer is too small, a new one is created automatically.

    @param indexData The IndexData instance to upload. @param bufferUsage The expected buffer usage. Use one of the constants defined in Context3DBufferUsage. Only used when the method call causes the creation of a new index buffer.

    Parameters

    • indexData: IndexData
    • Optional bufferUsage: string

    Returns void

uploadVertexData

  • uploadVertexData(vertexData: VertexData, bufferUsage?: string): void
  • Uploads the given vertex data to the internal vertex buffer. If the buffer is too small, a new one is created automatically.

    @param vertexData The VertexData instance to upload. @param bufferUsage The expected buffer usage. Use one of the constants defined in Context3DBufferUsage. Only used when the method call causes the creation of a new vertex buffer.

    Parameters

    • vertexData: VertexData
    • Optional bufferUsage: string

    Returns void

Generated using TypeDoc