Merge pull request #23646 from stelcheck/playcanvas/assets-prefix-app-loadscene

playcanvas: assets prefix, app.loadScene
This commit is contained in:
Daniel Rosenwasser
2018-02-15 11:21:33 -08:00
committed by GitHub
2 changed files with 22 additions and 1 deletions

View File

@@ -11,6 +11,8 @@ declare namespace pc {
class AssetRegistry {
constructor(loader: pc.ResourceLoader)
prefix: string;
/**
* @function
* @name pc.AssetRegistry#list
@@ -164,4 +166,4 @@ declare namespace pc {
*/
find(name: string, type?: string): pc.Asset;
}
}
}

View File

@@ -206,6 +206,25 @@ declare namespace pc {
*/
loadSceneSettings(url: string, callback: (...args: any[]) => {}): void;
/**
* @function
* @name pc.Application#loadScene
* @description Load a scene file.
* @param {String} url The URL of the scene file. Usually this will be "scene_id.json"
* @param {Function} callback The function to call after loading, passed (err, entity) where err is null if no errors occurred.
* @example
*
* app.loadScene("1000.json", function (err, entity) {
* if (!err) {
* var e = app.root.find("My New Entity");
* } else {
* // error
* }
* }
* });
*/
loadScene(url: string, callback: (...args: any[]) => {}): void;
/**
* @function
* @name pc.Application#start