fromAsset method
asset
- path of the file to be loaded
package
- if the file is from another flutter package add the name of the package here
Implementation
@override
Future<CubeTexture?> fromAsset(String asset, {String? package}) async{
final image = await _loader.fromAsset(asset, package: package);
texture.images.add(image);
loaded ++;
if ( loaded == 6 ) {
texture.needsUpdate = true;
return texture;
}
return null;
}