Package | away3d.loaders |
Class | public class AssetLoader |
Inheritance | AssetLoader flash.events.EventDispatcher |
See also
Property | Defined By | ||
---|---|---|---|
baseDependency : ResourceDependency [read-only]
Returns the base dependency of the loader
| AssetLoader |
Method | Defined By | ||
---|---|---|---|
Create a new ResourceLoadSession object. | AssetLoader | ||
enableParser(parserClass:Class):void [static]
Enables a specific parser. | AssetLoader | ||
enableParsers(parserClasses:Vector.<Class>):void [static]
Enables a list of parsers. | AssetLoader | ||
load(req:URLRequest, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderToken
Loads a file and (optionally) all of its dependencies. | AssetLoader | ||
loadData(data:*, id:String, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderToken
Loads a resource from already loaded data. | AssetLoader | ||
stop():void | AssetLoader |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when an animation node has been constructed from a resource. | AssetLoader | |||
Dispatched when an animation set has been constructed from a group of animation state resources. | AssetLoader | |||
Dispatched when an animation state has been constructed from a group of animation node resources. | AssetLoader | |||
Dispatched when a animator asset has been constructed from a resource. | AssetLoader | |||
Dispatched when any asset finishes parsing. | AssetLoader | |||
Dispatched when a camera3d asset has been costructed from a ressource. | AssetLoader | |||
Dispatched when a container asset has been constructed from a resource. | AssetLoader | |||
Dispatched when a single dependency (which may be the main file of a resource) finishes loading. | AssetLoader | |||
Dispatched when an effect method asset has been constructed from a resources. | AssetLoader | |||
Dispatched when a geometry asset has been constructed from a resource. | AssetLoader | |||
Dispatched when an light asset has been constructed from a resources. | AssetLoader | |||
Dispatched when an light picker asset has been constructed from a resources. | AssetLoader | |||
Dispatched when an error occurs during loading. | AssetLoader | |||
Dispatched when a material asset has been constructed from a resource. | AssetLoader | |||
Dispatched when a mesh asset has been costructed from a ressource. | AssetLoader | |||
Dispatched when an error occurs during parsing. | AssetLoader | |||
Dispatched when a full resource (including dependencies) finishes loading. | AssetLoader | |||
Dispatched when an shadow map method asset has been constructed from a resources. | AssetLoader | |||
Dispatched when a skeleton asset has been constructed from a resource. | AssetLoader | |||
Dispatched when a skeleton pose asset has been constructed from a resource. | AssetLoader | |||
Dispatched when a skybox asset has been costructed from a ressource. | AssetLoader | |||
Dispatched when an animation state transition has been constructed from a group of animation node resources. | AssetLoader | |||
Dispatched when a texture asset has been constructed from a resource. | AssetLoader | |||
Dispatched when a texture projector asset has been constructed from a resource. | AssetLoader | |||
Dispatched when an image asset dimensions are not a power of 2 | AssetLoader |
baseDependency | property |
baseDependency:ResourceDependency
[read-only] Returns the base dependency of the loader
public function get baseDependency():ResourceDependency
AssetLoader | () | Constructor |
public function AssetLoader()
Create a new ResourceLoadSession object.
addErrorHandler | () | method |
arcane function addErrorHandler(handler:Function):void
Parameters
handler:Function |
enableParser | () | method |
public static function enableParser(parserClass:Class):void
Enables a specific parser. When no specific parser is set for a loading/parsing opperation, loader3d can autoselect the correct parser to use. A parser must have been enabled, to be considered when autoselecting the parser.
Parameters
parserClass:Class — The parser class to enable.
|
See also
enableParsers | () | method |
public static function enableParsers(parserClasses:Vector.<Class>):void
Enables a list of parsers. When no specific parser is set for a loading/parsing opperation, AssetLoader can autoselect the correct parser to use. A parser must have been enabled, to be considered when autoselecting the parser.
Parameters
parserClasses:Vector.<Class> — A Vector of parser classes to enable.
|
See also
load | () | method |
public function load(req:URLRequest, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderToken
Loads a file and (optionally) all of its dependencies.
Parameters
req:URLRequest — The URLRequest object containing the URL of the file to be loaded.
| |
context:AssetLoaderContext (default = null ) — An optional context object providing additional parameters for loading
| |
ns:String (default = null ) — An optional namespace string under which the file is to be loaded, allowing the differentiation of two resources with identical assets
| |
parser:ParserBase (default = null ) — 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.
|
AssetLoaderToken |
loadData | () | method |
public function loadData(data:*, id:String, context:AssetLoaderContext = null, ns:String = null, parser:ParserBase = null):AssetLoaderToken
Loads a resource from already loaded data.
Parameters
data:* — The data object containing all resource information.
| |
id:String — An optional context object providing additional parameters for loading
| |
context:AssetLoaderContext (default = null ) — An optional namespace string under which the file is to be loaded, allowing the differentiation of two resources with identical assets
| |
ns:String (default = null ) — 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.
| |
parser:ParserBase (default = null )
|
AssetLoaderToken |
stop | () | method |
public function stop():void
animationNodeComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an animation node has been constructed from a resource.
animationSetComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an animation set has been constructed from a group of animation state resources.
animationStateComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an animation state has been constructed from a group of animation node resources.
animatorComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a animator asset has been constructed from a resource.
assetComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when any asset finishes parsing. Also see specific events for each individual asset type (meshes, materials et c.)
cameraComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a camera3d asset has been costructed from a ressource.
containerComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a container asset has been constructed from a resource.
dependencyComplete | Event |
away3d.events.LoaderEvent
away3d.events.LoaderEvent
Dispatched when a single dependency (which may be the main file of a resource) finishes loading.
effectMethodComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an effect method asset has been constructed from a resources.
geometryComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a geometry asset has been constructed from a resource.
lightComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an light asset has been constructed from a resources.
lightPickerComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an light picker asset has been constructed from a resources.
loadError | Event |
away3d.events.LoaderEvent
away3d.events.LoaderEvent
Dispatched when an error occurs during loading. I
materialComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a material asset has been constructed from a resource.
meshComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a mesh asset has been costructed from a ressource.
parseError | Event |
away3d.events.ParserEvent
away3d.events.ParserEvent
Dispatched when an error occurs during parsing.
resourceComplete | Event |
away3d.events.LoaderEvent
away3d.events.LoaderEvent
Dispatched when a full resource (including dependencies) finishes loading.
shadowMapMethodComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an shadow map method asset has been constructed from a resources.
skeletonComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a skeleton asset has been constructed from a resource.
skeletonPoseComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a skeleton pose asset has been constructed from a resource.
skyboxComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a skybox asset has been costructed from a ressource.
stateTransitionComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an animation state transition has been constructed from a group of animation node resources.
textureComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a texture asset has been constructed from a resource.
textureProjectorComplete | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when a texture projector asset has been constructed from a resource.
textureSizeError | Event |
away3d.events.AssetEvent
away3d.events.AssetEvent
Dispatched when an image asset dimensions are not a power of 2