fromAssets static method
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;
}