babylon.sceneLoader.d.ts 2.1 KB

12345678910111213141516171819202122232425262728293031
  1. declare module BABYLON {
  2. interface ISceneLoaderPlugin {
  3. extensions: string;
  4. importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
  5. load: (scene: Scene, data: string, rootUrl: string) => boolean;
  6. }
  7. class SceneLoader {
  8. private static _ForceFullSceneLoadingForIncremental;
  9. private static _ShowLoadingScreen;
  10. static ForceFullSceneLoadingForIncremental : boolean;
  11. static ShowLoadingScreen : boolean;
  12. private static _registeredPlugins;
  13. private static _getPluginForFilename(sceneFilename);
  14. static RegisterPlugin(plugin: ISceneLoaderPlugin): void;
  15. static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, e: any) => void): void;
  16. /**
  17. * Load a scene
  18. * @param rootUrl a string that defines the root url for scene and resources
  19. * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
  20. * @param engine is the instance of BABYLON.Engine to use to create the scene
  21. */
  22. static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
  23. /**
  24. * Append a scene
  25. * @param rootUrl a string that defines the root url for scene and resources
  26. * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
  27. * @param scene is the instance of BABYLON.Scene to append to
  28. */
  29. static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
  30. }
  31. }