Loader3D
Loader3D can load any file format that Away3D supports and be added directly to the scene. As assets are encountered
they are added to the Loader3D container. Assets that can not be displayed in the scene graph (e.g. unused bitmaps/materials/skeletons etc) will be ignored.
This provides a fast and easy way to load models (no need for event listeners) but is not very versatile since many types of assets are ignored.
Loader3D by default uses the Asset3DLibrary to load all assets, which means that they also ends up in the library. To circumvent this, Loader3D can be configured to not use the Asset3DLibrary in which case it will use the AssetLoader directly.
Inherited from ObjectContainer3D -> Object3D -> NamedAssetBase -> EventDispatcher.
Can be created with method new:
Lib.Away3D.Loaders.Loader3D.new(useAsset3DLibrary, Asset3DLibraryId) |
Creates Loader3D object |
useAsset3DLibrary - true/false, default true Asset3DLibraryId - string, default nil |
Has methods:
load(req, context, ns, parser) |
Loads a file and (optionally) all of its dependencies. Returns AssetLoaderToken. |
req - URLRequest, The URLRequest object containing the URL of the file to be loaded. context - AssetLoaderContext, An optional context object providing additional parameters for loading, default nil ns - string, An optional namespace string under which the file is to be loaded, allowing the differentiation of two resources with identical assets, default nil parser - ParserBase, An optional parser object for translating the loaded data into a usable resource. If not provided, AssetLoader will attempt to auto-detect the file type, default nil |
loadData(data, context, ns, parser) |
|
data - *, The data object containing all resource information. context - AssetLoaderContext, An optional context object providing additional parameters for loading, default nil ns - string, An optional namespace string under which the file is to be loaded, allowing the differentiation of two resources with identical assets, default nil parser - ParserBase, An optional parser object for translating the loaded data into a usable resource. If not provided, AssetLoader will attempt to auto-detect the file type, default nil |
Can capture events: Asset3DEvent, LoaderEvent.
Created with the Personal Edition of HelpNDoc: Free iPhone documentation generator