mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Merge pull request #23646 from stelcheck/playcanvas/assets-prefix-app-loadscene
playcanvas: assets prefix, app.loadScene
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user