CubeTextureLoader class

CubeTextureLoader can be used to load cube maps. The loader returns an instance of CubeTexture and expects the cube map to be defined as six separate images representing the sides of a cube. Other cube map definitions like vertical and horizontal cross, column and row layouts are not supported.

final scene = Scene();
scene.background = CubeTextureLoader()
.setPath( 'asstes/textures/cubeMaps/' )
.fromAssetList([
  'px.png',
  'nx.png',
  'py.png',
  'ny.png',
  'pz.png',
  'nz.png'
]);
Inheritance

Constructors

CubeTextureLoader.new({LoadingManager? manager, bool flipY = false})
manager — The loadingManager for the loader to use. Default is DefaultLoadingManager.

Properties

crossOrigin String
getter/setter pairinherited
flipY bool
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
loaded int
getter/setter pair
manager LoadingManager
getter/setter pairinherited
mimeType String
getter/setter pairinherited
path String
getter/setter pairinherited
requestHeader Map<String, dynamic>
getter/setter pairinherited
resourcePath String?
getter/setter pairinherited
responseType String
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
texture CubeTexture
final
withCredentials bool
getter/setter pairinherited

Methods

dispose() → void
override
fromAsset(String asset, {String? package}) Future<CubeTexture?>
asset - path of the file to be loaded
override
fromAssetList(List<String> asset, {String? package}) Future<CubeTexture?>
fromBlob(Blob blob) Future<CubeTexture?>
blob - a blob of the file to be loaded
override
fromBlobList(List<Blob> blob) Future<CubeTexture>
fromBytes(Uint8List bytes) Future<CubeTexture?>
bytes - the loaded bytes of the file
override
fromBytesList(List<Uint8List> bytes) Future<CubeTexture>
fromFile(File file) Future<CubeTexture?>
file - the file to be loaded
override
fromFileList(List<File> file) Future<CubeTexture>
fromNetwork(Uri uri) Future<CubeTexture?>
uri - a uri containing the location of the file to be loaded
override
fromNetworkList(List<Uri> uri) Future<CubeTexture?>
fromPath(String filePath) Future<CubeTexture?>
filePath - path of the file to be loaded
override
fromPathList(List<String> filePath) Future<CubeTexture?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCrossOrigin(String crossOrigin) Loader
crossOrigin — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
inherited
setPath(String path) Loader
path — Set the base path for the asset.
inherited
setRequestHeader(Map<String, dynamic> requestHeader) Loader
requestHeader - key: The name of the header whose value is to be set. value: The value to set as the body of the header.
inherited
setResourcePath(String? resourcePath) Loader
resourcePath — Set the base path for dependent resources like textures.
inherited
setWithCredentials(bool value) Loader
Whether the XMLHttpRequest uses credentials such as cookies, authorization headers or TLS client certificates. See XMLHttpRequest.withCredentials.
inherited
toString() String
A string representation of this object.
inherited
unknown(dynamic url) Future
url - a dynmaic data that gets parsed by the system
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited