fromAssets static method

  1. @Deprecated('Use fromEquirectImageAsset instead')
Future<EnvironmentMap> fromAssets({
  1. required String radianceImagePath,
  2. List<Vector3>? diffuseSphericalHarmonics,
})

Loads an EnvironmentMap from an equirectangular sRGB radiance image in the asset bundle (see fromUIImages).

fromEquirectImageAsset does everything this does and also detects Radiance HDR and OpenEXR sources; prefer it.

Implementation

@Deprecated('Use fromEquirectImageAsset instead')
static Future<EnvironmentMap> fromAssets({
  required String radianceImagePath,
  List<Vector3>? diffuseSphericalHarmonics,
}) async {
  final environment = await fromUIImages(
    radianceImage: await imageFromAsset(radianceImagePath),
    diffuseSphericalHarmonics: diffuseSphericalHarmonics,
  );
  _environmentAssetPaths[environment] = radianceImagePath;
  return environment;
}