setSplatData method

void setSplatData(
  1. Uint8List data
)

Supplies raw splat data (32 bytes per splat) and rebuilds the GPU texture. Throws ArgumentError if the buffer length is not a multiple of 32.

Implementation

void setSplatData(Uint8List data) {
  if (data.length % GsConst.bytesPerSplat != 0) {
    throw ArgumentError.value(
      data.length,
      'data.length',
      'Must be a multiple of 32',
    );
  }
  _splatBuffer = data;
  _splatCount = data.length ~/ GsConst.bytesPerSplat;
  _needDepthSort = true;
  _uploadSplatTexture(data);
}