# Introduction
The viewer features a completely customisable rendering pipeline. Pipelines are composed of passes that take turns in order to render either to the screen, either to textures.
# Stock Pipelines
The library comes with several stock rendering pipelines:
- DefaultPipeline: Normal Shading
- ShadedViewPipeline: Typical for Speckle data. Uses the color proxies of objects instead of material colors
- ArcticViewPipeline: Solid white coloring + heavy spread ambient occlusion
- PenViewPipeline: Object outlines only respecting the scene depth
- SolidViewPipeline: Solid coloring using a matcap texture or optionally a solid color
- EdgesPipeline: Object outlines only. Typically used inside other pipelines rather than on it's own
The way a pipeline is set is via the SpeckleRenderer's pipeline property
const renderer = viewer.getRenderer()
renderer.pipeline = new PenViewPipeline(renderer)
1
2
2
Pipeline take optionally options of various kinds. All stock pipelines take PipelineOptions which controls the overlaying of edges/outlines. Default is true
.
To disable/enable edges/outlines rendering you can simply
const renderer = viewer.getRenderer()
/** Works with all stock pipelines, not just DefaultPipeline */
renderer.pipeline = new DefaultPipeline(renderer, { edges: false })
1
2
3
2
3
There are additional options related to the edges/outlines that you can play around with:
const renderer = viewer.getRenderer()
renderer.pipeline = new PenViewPipeline(renderer, {
outlineThickness: 4
outlineColor: 0xff0000
outlineOpacity: 0.5
})
1
2
3
4
5
6
2
3
4
5
6
← RenderTree Pipeline →