sceneHelpers.d.ts 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import type { Nullable } from "../types";
  2. import type { Mesh } from "../Meshes/mesh";
  3. import type { BaseTexture } from "../Materials/Textures/baseTexture";
  4. import type { IEnvironmentHelperOptions } from "./environmentHelper";
  5. import { EnvironmentHelper } from "./environmentHelper";
  6. import type { VRExperienceHelperOptions } from "../Cameras/VR/vrExperienceHelper";
  7. import { VRExperienceHelper } from "../Cameras/VR/vrExperienceHelper";
  8. import "../Materials/Textures/Loaders/ddsTextureLoader";
  9. import "../Materials/Textures/Loaders/envTextureLoader";
  10. import "../Materials/Textures/Loaders/ktxTextureLoader";
  11. import type { WebXRDefaultExperienceOptions } from "../XR/webXRDefaultExperience";
  12. import { WebXRDefaultExperience } from "../XR/webXRDefaultExperience";
  13. /** @internal */
  14. export declare var _forceSceneHelpersToBundle: boolean;
  15. declare module "../scene" {
  16. interface Scene {
  17. /**
  18. * Creates a default light for the scene.
  19. * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/fastBuildWorld#create-default-light
  20. * @param replace has the default false, when true replaces the existing lights in the scene with a hemispheric light
  21. */
  22. createDefaultLight(replace?: boolean): void;
  23. /**
  24. * Creates a default camera for the scene.
  25. * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/fastBuildWorld#create-default-camera
  26. * @param createArcRotateCamera has the default false which creates a free camera, when true creates an arc rotate camera
  27. * @param replace has default false, when true replaces the active camera in the scene
  28. * @param attachCameraControls has default false, when true attaches camera controls to the canvas.
  29. */
  30. createDefaultCamera(createArcRotateCamera?: boolean, replace?: boolean, attachCameraControls?: boolean): void;
  31. /**
  32. * Creates a default camera and a default light.
  33. * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/fastBuildWorld#create-default-camera-or-light
  34. * @param createArcRotateCamera has the default false which creates a free camera, when true creates an arc rotate camera
  35. * @param replace has the default false, when true replaces the active camera/light in the scene
  36. * @param attachCameraControls has the default false, when true attaches camera controls to the canvas.
  37. */
  38. createDefaultCameraOrLight(createArcRotateCamera?: boolean, replace?: boolean, attachCameraControls?: boolean): void;
  39. /**
  40. * Creates a new sky box
  41. * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/fastBuildWorld#create-default-skybox
  42. * @param environmentTexture defines the texture to use as environment texture
  43. * @param pbr has default false which requires the StandardMaterial to be used, when true PBRMaterial must be used
  44. * @param scale defines the overall scale of the skybox
  45. * @param blur is only available when pbr is true, default is 0, no blur, maximum value is 1
  46. * @param setGlobalEnvTexture has default true indicating that scene.environmentTexture must match the current skybox texture
  47. * @returns a new mesh holding the sky box
  48. */
  49. createDefaultSkybox(environmentTexture?: BaseTexture, pbr?: boolean, scale?: number, blur?: number, setGlobalEnvTexture?: boolean): Nullable<Mesh>;
  50. /**
  51. * Creates a new environment
  52. * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/fastBuildWorld#create-default-environment
  53. * @param options defines the options you can use to configure the environment
  54. * @returns the new EnvironmentHelper
  55. */
  56. createDefaultEnvironment(options?: Partial<IEnvironmentHelperOptions>): Nullable<EnvironmentHelper>;
  57. /**
  58. * Creates a new VREXperienceHelper
  59. * @see https://doc.babylonjs.com/features/featuresDeepDive/cameras/webVRHelper
  60. * @param webVROptions defines the options used to create the new VREXperienceHelper
  61. * @deprecated Please use createDefaultXRExperienceAsync instead
  62. * @returns a new VREXperienceHelper
  63. */
  64. createDefaultVRExperience(webVROptions?: VRExperienceHelperOptions): VRExperienceHelper;
  65. /**
  66. * Creates a new WebXRDefaultExperience
  67. * @see https://doc.babylonjs.com/features/featuresDeepDive/webXR/introToWebXR
  68. * @param options experience options
  69. * @returns a promise for a new WebXRDefaultExperience
  70. */
  71. createDefaultXRExperienceAsync(options?: WebXRDefaultExperienceOptions): Promise<WebXRDefaultExperience>;
  72. }
  73. }