ObjectLoader class

A loader for loading a JSON resource in the JSON Object/Scene format.

This uses the FileLoader internally for loading files.

Inheritance

Constructors

ObjectLoader([LoadingManager? manager])
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
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
withCredentials bool
getter/setter pairinherited

Methods

bindSkeletons(Object3D object, Map<String, dynamic> skeletons) → void
dispose() → void
override
fromAsset(String asset, {String? package}) Future<Object3D?>
asset - path of the file to be loaded
override
fromBlob(Blob blob) Future<Object3D?>
blob - a blob of the file to be loaded
override
fromBytes(Uint8List bytes) Future<Object3D?>
bytes - the loaded bytes of the file
override
fromFile(File file) Future<Object3D?>
file - the file to be loaded
override
fromMap(Map<String, dynamic> map) Future<Object3D?>
fromNetwork(Uri uri) Future<Object3D?>
uri - a uri containing the location of the file to be loaded
override
fromPath(String filePath) Future<Object3D?>
filePath - path of the file to be loaded
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseAnimations(List<Map<String, dynamic>>? json) Map<String, dynamic>
parseGeometries(List<Map<String, dynamic>>? json, [dynamic shapes]) Map<String, dynamic>
parseImages(List<Map<String, dynamic>>? json, [void onLoad()?]) Future<Map<String, dynamic>>
parseMaterials(List<Map<String, dynamic>>? json, Map<String, Texture> textures) Map<String, dynamic>
parseObject(Map<String, dynamic> data, dynamic geometries, dynamic materials, dynamic textures, dynamic animations) → Object3D
parseShapes(List<Map<String, dynamic>>? json) Map<String, Shape>
parseSkeletons(Map<String, dynamic>? json, Object3D object) Map<String, dynamic>
parseTextures(List<Map<String, dynamic>>? json, Map<String, dynamic> images) Map<String, Texture>
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
setTexturePath(String? value) → Loader
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