fromBytes method

  1. @override
Future<CubeTexture?> fromBytes(
  1. Uint8List bytes
)
override

bytes - the loaded bytes of the file

Implementation

@override
Future<CubeTexture?> fromBytes(Uint8List bytes) async{
  final image = await _loader.fromBytes(bytes);
  texture.images.add(image);
  loaded ++;

  if ( loaded == 6 ) {
    texture.needsUpdate = true;
    return texture;
  }
  return null;
}