Import
MaskPass is an addon, and must be imported explicitly, see Installation#Addons.
import { MaskPass } from 'three/addons/postprocessing/MaskPass.js';
Constructor
new MaskPass( scene : Scene, camera : Camera )
Constructs a new mask pass.
| scene |
The 3D objects in this scene will define the mask. |
| camera |
The camera. |
Properties
.clear : boolean
Overwritten to perform a clear operation by default.
Default is true.
- Overrides: Pass#clear
.inverse : boolean
Whether to inverse the mask or not.
Default is false.
Methods
.render( renderer : WebGLRenderer, writeBuffer : WebGLRenderTarget, readBuffer : WebGLRenderTarget, deltaTime : number, maskActive : boolean )
Performs a mask pass with the configured scene and camera.
| renderer |
The renderer. |
| writeBuffer |
The write buffer. This buffer is intended as the rendering destination for the pass. |
| readBuffer |
The read buffer. The pass can access the result from the previous pass from this buffer. |
| deltaTime |
The delta time in seconds. |
| maskActive |
Whether masking is active or not. |
- Overrides: Pass#render