File: VolumeSlice.md | Updated: 11/15/2025
This class has been made to hold a slice of a volume data.
VolumeSlice is an addon, and must be imported explicitly, see Installation#Addons.
import { VolumeSlice } from 'three/addons/misc/VolumeSlice.js';
Constructs a new volume slice.
volume | The associated volume.
---|---
index | The index of the slice. Default is 0.
axis | For now only 'x', 'y' or 'z' but later it will change to a normal vector. Default is 'z'.
See:
The normal axis.
The final canvas used for the texture.
The intermediary canvas used to paint the data.
The rendering context of the canvas.
The rendering context of the canvas buffer,
If set to true, updateGeometry() will be triggered at the next repaint.
Default is true.
Width of slice in the original coordinate system, corresponds to the width of the buffer canvas.
Default is 0.
The index of the slice, if changed, will automatically call updateGeometry at the next repaint.
Default is 0.
Height of slice in the original coordinate system, corresponds to the height of the buffer canvas.
Default is 0.
The mesh ready to get used in the scene.
Function that allow the slice to access right data.
See:
The associated volume.
Refresh the texture and the geometry if geometryNeedsUpdate is set to true.
Refresh the geometry according to axis and index.
See: