Class RenderTargetPreviewPlugin<TEvent>

RenderTargetPreviewPlugin is a useful development and debugging plugin that renders any registered render-target to the screen in small collapsable panels.

Type Parameters

  • TEvent extends string

Hierarchy (View Summary)

Constructors

Properties

_dirty: boolean = false
_viewer?: ThreeViewer
_viewerListeners: PartialRecord<
    | "dispose"
    | "*"
    | "update"
    | "preRender"
    | "postRender"
    | "preFrame"
    | "postFrame"
    | "addPlugin"
    | "removePlugin"
    | "renderEnabled"
    | "renderDisabled",
    (e: IViewerEvent) => void,
> = {}
constructor: typeof AViewerPluginSync & typeof AViewerPlugin
enabled: boolean = true
mainDiv: HTMLDivElement = ...
stylesheet?: HTMLStyleElement
targetBlocks: RenderTargetBlock[] = []
toJSON: any = null
uiConfig?: UiObjectConfig = undefined
OldPluginType?: string
PluginType: "RenderTargetPreviewPlugin" = 'RenderTargetPreviewPlugin'

Accessors

Methods

  • Parameters

    • target: ValOrFunc<undefined | null | IRenderTarget | { texture?: ValOrArr<ITexture> }>

      render target or a function that returns a render target

    • name: string

      name of the target

    • transparent: boolean = false

      if true, the target will be rendered with transparency

    • originalColorSpace: boolean = false

      if true, the target will be rendered in its original color space

    • visible: boolean = true

      initial visibility

    • Optionalmaterial: ShaderMaterial | ValOrFunc<string, [string]>

      snippet for ExtendedCopyPass or a custom ExtendedShaderMaterial or three.js ShaderMaterial. Example to read just the red channel (s)=>s + ' = vec4(' + s + '.r);'

    Returns this