Pipeline
Abstract class that is the base for all concrete rendering pipeline implementations.
Constructors
constructor
Parameters
- speckleRenderer: The hosting renderer as SpeckleRenderer
Properties
drawingSize
The final display size for the pipeline in pixels. DPR is already factored in.
Returns: Vector2
passList
The pipeline’s ordered GPass.
Returns: Array<
GPass
>
speckleRenderer
The hosting speckle renderer instance
Returns: SpeckleRenderer
Accessors
passes
Gets the current ordered pass list
Returns: Array<
GPass
>
Methods
createMultipleRenderTarget
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
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
Get’s all the passes with the provided name
Parameters
- name: The name of the pass to get
Returns: GPass[]
onAfterPipelineRender
Callback for before the pipeline starts to render
Returns: void
onBeforePipelineRender
Callback for before the pipeline has finished rendering
Returns: void
render
Returns: boolean
reset
Callback for before the pipeline has finished rendering
Returns: void
resize
Resets the pipeline
Returns: void
Parameters
- width: The new width of the pipeline
- height: The new height of the pipeline
Returns: void
setClippingPlanes
Propagates clipping planes towards the pipeline’s consituent passes
Parameters
- planes: The clipping
Planes
Returns: void