Package | away3d.loading |
Class | public class ResourceDependency |
See also
Property | Defined by | ||
---|---|---|---|
data : * [read-only]
The data containing the dependency to be parsed, if the resource was already loaded.
| ResourceDependency | ||
id : String [read-only]
The id of the dependency.
| ResourceDependency | ||
parentParser : ParserBase
[read-only]
The parser which is dependent on this ResourceDependency object.
| ResourceDependency | ||
resource : IResource
The loaded and parsed resource.
| ResourceDependency | ||
url : String [read-only]
The url of the dependency.
| ResourceDependency |
Method | Defined by | ||
---|---|---|---|
Creates a new ResourceDependency object.
| ResourceDependency | ||
resolve():void
Resolve the dependency when it's loaded with the parent parser.
| ResourceDependency | ||
resolveFailure():void
Resolve a dependency failure.
| ResourceDependency |
data | property |
data:*
[read-only]The data containing the dependency to be parsed, if the resource was already loaded.
Implementation public function get data():*
id | property |
id:String
[read-only]The id of the dependency.
Implementation public function get id():String
parentParser | property |
parentParser:ParserBase
[read-only]The parser which is dependent on this ResourceDependency object.
Implementation public function get parentParser():ParserBase
resource | property |
resource:IResource
[read-write]The loaded and parsed resource.
Implementation public function get resource():IResource
public function set resource(value:IResource):void
url | property |
url:String
[read-only]The url of the dependency.
Implementation public function get url():String
ResourceDependency | () | constructor |
public function ResourceDependency(id:String, url:String, data:ParserBase, parentParser:*)
Parameters
id:String — The id of the dependency.
|
|
url:String — The url of the dependency, if the resource needs to be loaded.
|
|
data:ParserBase — The data containing the dependency to be parsed, if the resource was already loaded.
|
|
parentParser:* — The parser which is dependent on this ResourceDependency object.
|
resolve | () | method |
public function resolve():void
Resolve the dependency when it's loaded with the parent parser. For example, a dependency containing an ImageResource would be assigned to a Mesh instance as a BitmapMaterial, a scene graph object would be added to its intended parent. The dependency should be a member of the dependencies property.
resolveFailure | () | method |
public function resolveFailure():void
Resolve a dependency failure. For example, map loading failure from a 3d file