> ## Documentation Index
> Fetch the complete documentation index at: https://docs.speckle.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# BaseGPass

> Abstract base class which contains most of the basic common implementation for most passes.

[GPass](/developers/viewer/rendering-pipeline-api/g-pass-api) -> [BaseGPass](/developers/viewer/rendering-pipeline-api/base-g-pass-api)

When developing a new pass, it's recommended to extend this class rather then implementing the `GPass` interface directly.

<Warning>
  `BaseGPAss` implements almosts all [GPass](/developers/viewer/rendering-pipeline-api/g-pass-api) members however the `render` function is declared as `abstract` so extending implementations will need to implement it themselves
</Warning>

## Methods

### applyLayer

```typescript theme={null}
protected applyLayers(camera: Camera | null)
```

Implementation for applying object layers. Provided for extending types.

**Returns**: `void`

### clear

```typescript theme={null}
protected clear(renderer: WebGLRenderer)
```

Implementation for clearing render targets. Provided for extending types.

**Parameters**:

* **renderer**: The hosting [`WebGLRenderer`](https://threejs.org/docs/index.html?q=webglrend#api/en/renderers/WebGLRenderer)

**Returns**: `void`

### enableLayer

```typescript theme={null}
enableLayer(layer: ObjectLayers, value: boolean): void
```

Enabled/disables specific object layers on the pass.

**Parameters**:

* **layer**: The [ObjectLayers](/developers/viewer/viewer-api#objectlayers) to enable/disable
* **value**: The value to enable/disable the layer

**Returns**: `void`
