Constructors

constructor

constructor(speckleRenderer: SpeckleRenderer)

Parameters

Properties

drawingSize

protected drawingSize: Vector2;

The final display size for the pipeline in pixels. DPR is already factored in.

Returns: Vector2

passList

protected passList: Array<GPass>;

The pipeline’s ordered GPass.

Returns: Array<GPass>

speckleRenderer

protected speckleRenderer: SpeckleRenderer;

The hosting speckle renderer instance

Returns: SpeckleRenderer

Accessors

passes

get passes(): Array<GPass>;

Gets the current ordered pass list

Returns: Array<GPass>

Methods

createMultipleRenderTarget

static createMultipleRenderTarget(
  count: number,
  options?: WebGLRenderTargetOptions,
  width?: number,
  height?: number
): WebGLMultipleRenderTargets
        static createMultipleRenderTarget(
          count: number,
          options?: WebGLRenderTargetOptions,
          width?: number,
          height?: number
        ): WebGLMultipleRenderTargets

Creates an MRT enabled three.js render target.

The resulting render target will be using a 32 bit depth + stencil renderbuffer.

Because the Speckle viewer is still using an older version of three.js the type WebGLMultipleRenderTargets does not exist anymore in their documentation. However it works similarly to the regular WebGLRenderTarget

Parameters

  • count: The number of color attachements to the framebuffer
  • options: WebGLRenderTargetOptions
  • width: If none specified it will default to 1
  • height: If none specified it will default to 1

Returns: WebGLMultipleRenderTargets

createRenderTarget

static createRenderTarget(
  options?: WebGLRenderTargetOptions,
  width?: number,
  height?: number
): WebGLRenderTarget

Creates a three.js render target.

The resulting render target will be using a 32 bit depth + stencil renderbuffer.

Because the Speckle viewer is still using an older version of three.js the type WebGLMultipleRenderTargets does not exist anymore in their documentation. However it works similarly to the regular WebGLRenderTarget

Parameters

  • options: WebGLRenderTargetOptions
  • width: If none specified it will default to 1
  • height: If none specified it will default to 1

Returns: WebGLRenderTarget

getPass

getPass(name: string): GPass[]

Get’s all the passes with the provided name

Parameters

  • name: The name of the pass to get

Returns: GPass[]

onAfterPipelineRender

onAfterPipelineRender(): void

Callback for before the pipeline starts to render

Returns: void

onBeforePipelineRender

onBeforePipelineRender(): void

Callback for before the pipeline has finished rendering

Returns: void

render

render(): boolean

Returns: boolean

reset

reset(): void

Callback for before the pipeline has finished rendering

Returns: void

resize

resize(width: number, height: number): void

Resets the pipeline

Returns: void

Parameters

  • width: The new width of the pipeline
  • height: The new height of the pipeline

Returns: void

setClippingPlanes

setClippingPlanes(planes: Plane[]): void

Propagates clipping planes towards the pipeline’s consituent passes

Parameters

Returns: void