Resource <T>
Implements
- Loadable<T>
Index
Constructors
constructor
Type parameters
- T
Parameters
path: string
Path to the remote resource
responseType: | arraybuffer | blob | document | json | text
The type to expect as a response: "" | "arraybuffer" | "blob" | "document" | "json" | "text";
bustCache: boolean = false
Whether or not to cache-bust requests
Returns Resource<T>
Properties
publicbustCache
Whether or not to cache-bust requests
publicdata
Data associated with a loadable
publicevents
publiclogger
publicpath
Path to the remote resource
publicresponseType
The type to expect as a response: "" | "arraybuffer" | "blob" | "document" | "json" | "text";
Methods
publicisLoaded
Returns true if the Resource is completely loaded and is ready to be drawn.
Returns boolean
publicload
Begin loading the resource and returns a promise to be resolved on completion
Returns Promise<T>
The [[Resource]] type allows games built in Excalibur to load generic resources. For any type of remote resource it is recommended to use [[Resource]] for preloading.