VolumetricRendererSpec

Source: VolumetricRender.ts

Style for GLViewer.addVolumetricRender. Unlike an isosurface, volume rendering
accumulates color and opacity along viewing rays through the grid.


Instance Fields

coords: Array

Coordinates in angstroms around which to include voxel centers. Omit to use the entire grid; an empty array masks the entire volume. Takes precedence over selection.

frame: number

Display only at this trajectory frame, when specified.

hidden: boolean

Hide the volume without discarding its grid or transfer function.

seldist: number

Radius in angstroms around coords or selection (default 2). Must be finite and nonnegative. Masking leaves the supplied VolumeData unchanged.

selection: AtomSelectionSpec

Selection around which to include data, resolved using the supplied viewer when coords are omitted.

subsamples: number

number of times to sample each voxel approximately (default 5)

transferfn: Array

Transfer-function points with color, opacity, and value fields. Colors and opacity are interpolated between points sorted by value.
Requires at least two points with finite numeric values (numbers or numeric strings) spanning a nonzero range that can be sampled without numeric overflow.
Opacity ranges from 0 (transparent) to 1 (opaque); numeric strings are also accepted.
The input array and point objects are not modified.
Missing or invalid transfer functions log a warning and skip rendering.

Properties

  • ] (ColorSpec)
  • ] (number | string)
  • ] (number | string)