Skip to main content

Class: GBufferPlugin

Plugins.GBufferPlugin

Hierarchy

Implements

Properties

PluginType

Static Readonly PluginType: "GBuffer"

Defined in

webgi/src/plugins/GBufferPlugin.ts:27


passId

passId: "gbuffer"

Overrides

GenericFilterPlugin.passId

Defined in

webgi/src/plugins/GBufferPlugin.ts:20


renderFlagsBuffer

renderFlagsBuffer: boolean = true


_dirty

Protected _dirty: boolean = false

Inherited from

GenericFilterPlugin._dirty

Defined in

webgi/src/core/AViewerPlugin.ts:25


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

GenericFilterPlugin._viewer

Defined in

webgi/src/core/AViewerPlugin.ts:29


_beforeFilters

Protected _beforeFilters: string[]

Overrides

GenericFilterPlugin._beforeFilters

Defined in

webgi/src/plugins/GBufferPlugin.ts:22


_afterFilters

Protected _afterFilters: never[] = []

Overrides

GenericFilterPlugin._afterFilters

Defined in

webgi/src/plugins/GBufferPlugin.ts:23


_requiredFilters

Protected _requiredFilters: string[]

Overrides

GenericFilterPlugin._requiredFilters

Defined in

webgi/src/plugins/GBufferPlugin.ts:24


_pass

Protected Optional _pass: IFilter<GBufferRenderPass<WebGLRenderTarget | WebGLMultipleRenderTargets>, "gbuffer">

Inherited from

GenericFilterPlugin._pass

Defined in

webgi/src/plugins/GenericFilterPlugin.ts:8

Accessors

dirty

get dirty(): boolean

Returns

boolean

Implementation of

IViewerPlugin.dirty

Inherited from

GenericFilterPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:18

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Implementation of

IViewerPlugin.dirty

Inherited from

GenericFilterPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:22


enabled

get enabled(): boolean

Returns

boolean

Inherited from

GenericFilterPlugin.enabled

Defined in

webgi/src/plugins/GenericFilterPlugin.ts:17

set enabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

GenericFilterPlugin.enabled

Defined in

webgi/src/plugins/GenericFilterPlugin.ts:21


pass

get pass(): undefined | IFilter<T, TPassId>

Returns

undefined | IFilter<T, TPassId>

Inherited from

GenericFilterPlugin.pass

Defined in

webgi/src/plugins/GenericFilterPlugin.ts:62

Methods

addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

void

Implementation of

IViewerPlugin.addEventListener

Inherited from

GenericFilterPlugin.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

boolean

Implementation of

IViewerPlugin.hasEventListener

Inherited from

GenericFilterPlugin.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

void

Implementation of

IViewerPlugin.removeEventListener

Inherited from

GenericFilterPlugin.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<"" | "serialize" | "deserialize">

Returns

void

Implementation of

IViewerPlugin.dispatchEvent

Inherited from

GenericFilterPlugin.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74


passCtor

passCtor(v): GBufferRenderPass<WebGLRenderTarget | WebGLMultipleRenderTargets>

Parameters

NameType
vViewerApp

Returns

GBufferRenderPass<WebGLRenderTarget | WebGLMultipleRenderTargets>

Overrides

GenericFilterPlugin.passCtor

Defined in

webgi/src/plugins/GBufferPlugin.ts:33


getDepthNormal

getDepthNormal(): undefined | Texture

Returns

undefined | Texture

Defined in

webgi/src/plugins/GBufferPlugin.ts:74


getFlagsTexture

getFlagsTexture(): undefined | Texture

Returns

undefined | Texture

Defined in

webgi/src/plugins/GBufferPlugin.ts:77


onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Implementation of

IViewerPlugin.onDispose

Overrides

GenericFilterPlugin.onDispose

Defined in

webgi/src/plugins/GBufferPlugin.ts:81


onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Implementation of

IViewerPlugin.onRemove

Overrides

GenericFilterPlugin.onRemove

Defined in

webgi/src/plugins/GBufferPlugin.ts:85


getTarget

getTarget(): undefined | WebGLRenderTarget | WebGLMultipleRenderTargets

Returns

undefined | WebGLRenderTarget | WebGLMultipleRenderTargets

Defined in

webgi/src/plugins/GBufferPlugin.ts:93


getUnpackSnippet

getUnpackSnippet(): string

Returns

string

Defined in

webgi/src/plugins/GBufferPlugin.ts:97


updateShaderProperties

updateShaderProperties(material): GBufferPlugin

Parameters

NameType
materialObject
material.definesRecord<string, undefined | string | number>
material.uniformsObject

Returns

GBufferPlugin

Implementation of

IShaderPropertiesUpdater.updateShaderProperties

Defined in

webgi/src/plugins/GBufferPlugin.ts:101


registerGBufferUpdater

registerGBufferUpdater(updater): void

Parameters

NameType
updater(object: Object3D<Event>, data: Vector4) => void

Returns

void

Defined in

webgi/src/plugins/GBufferPlugin.ts:115


onAdded

onAdded(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Implementation of

IViewerPlugin.onAdded

Inherited from

GenericFilterPlugin.onAdded

Defined in

webgi/src/plugins/GenericFilterPlugin.ts:29


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Implementation of

IViewerPlugin.toJSON

Inherited from

GenericFilterPlugin.toJSON

Defined in

webgi/src/plugins/GenericFilterPlugin.ts:66


fromJSON

fromJSON(data, meta?): null | GBufferPlugin

Parameters

NameType
dataany
meta?any

Returns

null | GBufferPlugin

Implementation of

IViewerPlugin.fromJSON

Inherited from

GenericFilterPlugin.fromJSON

Defined in

webgi/src/plugins/GenericFilterPlugin.ts:75


_update

Protected _update(v): boolean

Parameters

NameType
vViewerApp

Returns

boolean

Overrides

GenericFilterPlugin._update

Defined in

webgi/src/plugins/GBufferPlugin.ts:60

Constructors

constructor

new GBufferPlugin(renderFlagsBuffer?)

Parameters

NameTypeDefault value
renderFlagsBufferbooleantrue

Overrides

GenericFilterPlugin.constructor

Defined in

webgi/src/plugins/GBufferPlugin.ts:70