Skip to main content

Type Alias: VolumeStrategyProvider()

VolumeStrategyProvider: (context) => IVolumeRenderStrategy[]

Builds the strategies that a render component can use.

This never runs on the frame path. It derives the voxels that a strategy needs and it allocates the texture sets, which are the two expensive steps.

It runs when the render path adds its actor, and it runs again whenever something could change the answer: the data finished loading, or the memory changed. reason says which. A provider must therefore be safe to run more than once. A texture set that the store already holds comes back as it is, so a second run of the same provider allocates nothing.

A new render type defines its own provider, and that is how a new render type defines new texture sets. The provider below is the default one.

The textures that this builds hold no data yet. The loader fills the voxel managers as the data arrives, the volume marks the affected textures, and each render refills the marked slices — which is what the code already does.

Parameters​

• context: VolumeStrategyProvisionContext

Returns​

IVolumeRenderStrategy[]

Defined in​

packages/core/src/RenderingEngine/helpers/volumeRenderStrategy.ts:128