RuntimeShaders constructor

RuntimeShaders({
  1. required String? backend,
  2. required Future<LoadedShaderLibrary> loadShaders(
    1. ByteData bundle
    ),
  3. required Registration addMaterials(
    1. ShaderLibrary library
    ),
  4. Map<String, String>? engineSources,
  5. PackedStage? webGpuHost,
  6. int? webGpuFullscreenUvLocation,
  7. MaterialCompilerRegistry? compilers,
  8. Future<ByteData?> prebuilt(
    1. String material
    )?,
})

Implementation

RuntimeShaders({
  required String? backend,
  required Future<LoadedShaderLibrary> Function(ByteData bundle) loadShaders,
  required Registration Function(ShaderLibrary library) addMaterials,
  Map<String, String>? engineSources,
  PackedStage? webGpuHost,
  int? webGpuFullscreenUvLocation,
  MaterialCompilerRegistry? compilers,
  Future<ByteData?> Function(String material)? prebuilt,
}) : _store = _ShaderStore(
       RuntimeBackends.normalize(backend),
       loadShaders,
       addMaterials,
       engineSources,
       webGpuHost,
       webGpuFullscreenUvLocation,
       compilers,
       prebuilt,
     ),
     _scope = null;