Capítulo 618 de 859
This class has been made to hold a slice of a volume data.
true, updateGeometry() will be triggered at the next repaint.import { VolumeSlice } from 'three/addons/misc/VolumeSlice.js';
Constructor
| Signature |
|---|
| `new VolumeSlice( volume : Volume, index : number, axis : 'x' |
Properties
| Property | Description |
|---|---|
| `.axis : 'x' | 'y' |
.canvas : HTMLCanvasElement | The final canvas used for the texture. |
.canvasBuffer : HTMLCanvasElement | The intermediary canvas used to paint the data. |
.ctx : CanvasRenderingContext2D | The rendering context of the canvas. |
.ctxBuffer : CanvasRenderingContext2D | The rendering context of the canvas buffer, |
.geometryNeedsUpdate : boolean | If set to true, updateGeometry() will be triggered at the next repaint. |
.iLength : number | Width of slice in the original coordinate system, corresponds to the width of the buffer canvas. |
.index : number | The index of the slice, if changed, will automatically call updateGeometry at the next repaint. |
.jLength : number | Height of slice in the original coordinate system, corresponds to the height of the buffer canvas. |
.mesh : Mesh | The mesh ready to get used in the scene. |
.sliceAccess : function | Function that allow the slice to access right data. |
.volume : Volume | The associated volume. |
Methods
| Method | Description |
|---|---|
.repaint() | Refresh the texture and the geometry if geometryNeedsUpdate is set to true. |
.updateGeometry() | Refresh the geometry according to axis and index. |