LodComponent constructor

LodComponent(
  1. List<LodLevel> levels, {
  2. double lodBias = 1.0,
  3. double hysteresis = 0.1,
  4. double blendRange = 0.0,
})

Creates an LOD component over levels (highest detail first).

blendRange above 0 cross-fades adjacent levels with a screen-space dither across a band that wide (as a fraction of each threshold) instead of hard-switching, removing the pop. Cross-fade is honored by the built-in lit and unlit materials.

Implementation

LodComponent(
  List<LodLevel> levels, {
  double lodBias = 1.0,
  double hysteresis = 0.1,
  double blendRange = 0.0,
}) : _selection = LodSelection(
       levels,
       lodBias: lodBias,
       hysteresis: hysteresis,
       blendRange: blendRange,
     ),
     super(Mesh(levels.first.geometry, levels.first.material));