|
@@ -32438,12 +32438,34 @@ declare module "babylonjs/Misc/promise" {
|
|
|
static Apply(force?: boolean): void;
|
|
|
}
|
|
|
}
|
|
|
+declare module "babylonjs/Misc/interfaces/screenshotSize" {
|
|
|
+ /**
|
|
|
+ * Interface for screenshot methods with describe argument called `size` as object with options
|
|
|
+ * @link https://doc.babylonjs.com/api/classes/babylon.screenshottools
|
|
|
+ */
|
|
|
+ export interface IScreenshotSize {
|
|
|
+ /**
|
|
|
+ * number in pixels for canvas height
|
|
|
+ */
|
|
|
+ height?: number;
|
|
|
+ /**
|
|
|
+ * multiplier allowing render at a higher or lower resolution
|
|
|
+ * If value is defined then height and width will be ignored and taken from camera
|
|
|
+ */
|
|
|
+ precision?: number;
|
|
|
+ /**
|
|
|
+ * number in pixels for canvas width
|
|
|
+ */
|
|
|
+ width?: number;
|
|
|
+ }
|
|
|
+}
|
|
|
declare module "babylonjs/Misc/tools" {
|
|
|
import { Nullable, float } from "babylonjs/types";
|
|
|
import { DomManagement } from "babylonjs/Misc/domManagement";
|
|
|
import { WebRequest } from "babylonjs/Misc/webRequest";
|
|
|
import { IFileRequest } from "babylonjs/Misc/fileRequest";
|
|
|
import { IOfflineProvider } from "babylonjs/Offline/IOfflineProvider";
|
|
|
+ import { IScreenshotSize } from "babylonjs/Misc/interfaces/screenshotSize";
|
|
|
import { Camera } from "babylonjs/Cameras/camera";
|
|
|
import { Engine } from "babylonjs/Engines/engine";
|
|
|
interface IColor4Like {
|
|
@@ -32771,7 +32793,7 @@ declare module "babylonjs/Misc/tools" {
|
|
|
* @param mimeType defines the MIME type of the screenshot image (default: image/png).
|
|
|
* Check your browser for supported MIME types
|
|
|
*/
|
|
|
- static CreateScreenshot(engine: Engine, camera: Camera, size: any, successCallback?: (data: string) => void, mimeType?: string): void;
|
|
|
+ static CreateScreenshot(engine: Engine, camera: Camera, size: IScreenshotSize | number, successCallback?: (data: string) => void, mimeType?: string): void;
|
|
|
/**
|
|
|
* Captures a screenshot of the current rendering
|
|
|
* @see http://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
@@ -32787,7 +32809,7 @@ declare module "babylonjs/Misc/tools" {
|
|
|
* @returns screenshot as a string of base64-encoded characters. This string can be assigned
|
|
|
* to the src parameter of an <img> to display it
|
|
|
*/
|
|
|
- static CreateScreenshotAsync(engine: Engine, camera: Camera, size: any, mimeType?: string): Promise<string>;
|
|
|
+ static CreateScreenshotAsync(engine: Engine, camera: Camera, size: IScreenshotSize | number, mimeType?: string): Promise<string>;
|
|
|
/**
|
|
|
* Generates an image screenshot from the specified camera.
|
|
|
* @see http://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
@@ -32807,7 +32829,7 @@ declare module "babylonjs/Misc/tools" {
|
|
|
* @param antialiasing Whether antialiasing should be turned on or not (default: false)
|
|
|
* @param fileName A name for for the downloaded file.
|
|
|
*/
|
|
|
- static CreateScreenshotUsingRenderTarget(engine: Engine, camera: Camera, size: any, successCallback?: (data: string) => void, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): void;
|
|
|
+ static CreateScreenshotUsingRenderTarget(engine: Engine, camera: Camera, size: IScreenshotSize | number, successCallback?: (data: string) => void, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): void;
|
|
|
/**
|
|
|
* Generates an image screenshot from the specified camera.
|
|
|
* @see http://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
@@ -32826,7 +32848,7 @@ declare module "babylonjs/Misc/tools" {
|
|
|
* @returns screenshot as a string of base64-encoded characters. This string can be assigned
|
|
|
* to the src parameter of an <img> to display it
|
|
|
*/
|
|
|
- static CreateScreenshotUsingRenderTargetAsync(engine: Engine, camera: Camera, size: any, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): Promise<string>;
|
|
|
+ static CreateScreenshotUsingRenderTargetAsync(engine: Engine, camera: Camera, size: IScreenshotSize | number, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): Promise<string>;
|
|
|
/**
|
|
|
* Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523
|
|
|
* Be aware Math.random() could cause collisions, but:
|
|
@@ -34802,6 +34824,12 @@ declare module "babylonjs/scene" {
|
|
|
*/
|
|
|
getMaterialByName(name: string): Nullable<Material>;
|
|
|
/**
|
|
|
+ * Get a texture using its unique id
|
|
|
+ * @param uniqueId defines the texture's unique id
|
|
|
+ * @return the texture or null if none found.
|
|
|
+ */
|
|
|
+ getTextureByUniqueID(uniqueId: number): Nullable<BaseTexture>;
|
|
|
+ /**
|
|
|
* Gets a camera using its id
|
|
|
* @param id defines the id to look for
|
|
|
* @returns the camera or null if not found
|
|
@@ -39034,7 +39062,7 @@ declare module "babylonjs/Cameras/Inputs/freeCameraDeviceOrientationInput" {
|
|
|
* @param timeout amount of time in milliseconds to wait for a response from the sensor (default: infinite)
|
|
|
* @returns a promise that will resolve on orientation change
|
|
|
*/
|
|
|
- static WaitForOrientationChangeAsync(timeout?: number): Promise<unknown>;
|
|
|
+ static WaitForOrientationChangeAsync(timeout?: number): Promise<{}>;
|
|
|
/**
|
|
|
* @hidden
|
|
|
*/
|
|
@@ -42251,7 +42279,7 @@ declare module "babylonjs/Cameras/XR/webXRSessionManager" {
|
|
|
* Stops the xrSession and restores the renderloop
|
|
|
* @returns Promise which resolves after it exits XR
|
|
|
*/
|
|
|
- exitXRAsync(): Promise<unknown>;
|
|
|
+ exitXRAsync(): Promise<{}>;
|
|
|
/**
|
|
|
* Checks if a session would be supported for the creation options specified
|
|
|
* @param sessionMode session mode to check if supported eg. immersive-vr
|
|
@@ -42410,7 +42438,7 @@ declare module "babylonjs/Cameras/XR/webXRExperienceHelper" {
|
|
|
* Exits XR mode and returns the scene to its original state
|
|
|
* @returns promise that resolves after xr mode has exited
|
|
|
*/
|
|
|
- exitXRAsync(): Promise<unknown>;
|
|
|
+ exitXRAsync(): Promise<{}>;
|
|
|
/**
|
|
|
* Enters XR mode (This must be done within a user interaction in most browsers eg. button click)
|
|
|
* @param sessionCreationOptions options for the XR session
|
|
@@ -43933,9 +43961,9 @@ declare module "babylonjs/Gizmos/positionGizmo" {
|
|
|
private _snapDistance;
|
|
|
private _scaleRatio;
|
|
|
/** Fires an event when any of it's sub gizmos are dragged */
|
|
|
- onDragStartObservable: Observable<unknown>;
|
|
|
+ onDragStartObservable: Observable<{}>;
|
|
|
/** Fires an event when any of it's sub gizmos are released from dragging */
|
|
|
- onDragEndObservable: Observable<unknown>;
|
|
|
+ onDragEndObservable: Observable<{}>;
|
|
|
/**
|
|
|
* If set to true, planar drag is enabled
|
|
|
*/
|
|
@@ -45364,9 +45392,9 @@ declare module "babylonjs/Gizmos/scaleGizmo" {
|
|
|
private _uniformScalingMesh;
|
|
|
private _octahedron;
|
|
|
/** Fires an event when any of it's sub gizmos are dragged */
|
|
|
- onDragStartObservable: Observable<unknown>;
|
|
|
+ onDragStartObservable: Observable<{}>;
|
|
|
/** Fires an event when any of it's sub gizmos are released from dragging */
|
|
|
- onDragEndObservable: Observable<unknown>;
|
|
|
+ onDragEndObservable: Observable<{}>;
|
|
|
attachedMesh: Nullable<AbstractMesh>;
|
|
|
/**
|
|
|
* Creates a ScaleGizmo
|
|
@@ -45661,9 +45689,9 @@ declare module "babylonjs/Gizmos/rotationGizmo" {
|
|
|
*/
|
|
|
zGizmo: PlaneRotationGizmo;
|
|
|
/** Fires an event when any of it's sub gizmos are dragged */
|
|
|
- onDragStartObservable: Observable<unknown>;
|
|
|
+ onDragStartObservable: Observable<{}>;
|
|
|
/** Fires an event when any of it's sub gizmos are released from dragging */
|
|
|
- onDragEndObservable: Observable<unknown>;
|
|
|
+ onDragEndObservable: Observable<{}>;
|
|
|
private _meshAttached;
|
|
|
attachedMesh: Nullable<AbstractMesh>;
|
|
|
/**
|
|
@@ -63627,6 +63655,7 @@ declare module "babylonjs/Misc/videoRecorder" {
|
|
|
}
|
|
|
declare module "babylonjs/Misc/screenshotTools" {
|
|
|
import { Camera } from "babylonjs/Cameras/camera";
|
|
|
+ import { IScreenshotSize } from "babylonjs/Misc/interfaces/screenshotSize";
|
|
|
import { Engine } from "babylonjs/Engines/engine";
|
|
|
/**
|
|
|
* Class containing a set of static utilities functions for screenshots
|
|
@@ -63648,7 +63677,7 @@ declare module "babylonjs/Misc/screenshotTools" {
|
|
|
* @param mimeType defines the MIME type of the screenshot image (default: image/png).
|
|
|
* Check your browser for supported MIME types
|
|
|
*/
|
|
|
- static CreateScreenshot(engine: Engine, camera: Camera, size: any, successCallback?: (data: string) => void, mimeType?: string): void;
|
|
|
+ static CreateScreenshot(engine: Engine, camera: Camera, size: IScreenshotSize | number, successCallback?: (data: string) => void, mimeType?: string): void;
|
|
|
/**
|
|
|
* Captures a screenshot of the current rendering
|
|
|
* @see http://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
@@ -63684,7 +63713,7 @@ declare module "babylonjs/Misc/screenshotTools" {
|
|
|
* @param antialiasing Whether antialiasing should be turned on or not (default: false)
|
|
|
* @param fileName A name for for the downloaded file.
|
|
|
*/
|
|
|
- static CreateScreenshotUsingRenderTarget(engine: Engine, camera: Camera, size: any, successCallback?: (data: string) => void, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): void;
|
|
|
+ static CreateScreenshotUsingRenderTarget(engine: Engine, camera: Camera, size: IScreenshotSize | number, successCallback?: (data: string) => void, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): void;
|
|
|
/**
|
|
|
* Generates an image screenshot from the specified camera.
|
|
|
* @see http://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
@@ -95475,6 +95504,27 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * Interface for screenshot methods with describe argument called `size` as object with options
|
|
|
+ * @link https://doc.babylonjs.com/api/classes/babylon.screenshottools
|
|
|
+ */
|
|
|
+ export interface IScreenshotSize {
|
|
|
+ /**
|
|
|
+ * number in pixels for canvas height
|
|
|
+ */
|
|
|
+ height?: number;
|
|
|
+ /**
|
|
|
+ * multiplier allowing render at a higher or lower resolution
|
|
|
+ * If value is defined then height and width will be ignored and taken from camera
|
|
|
+ */
|
|
|
+ precision?: number;
|
|
|
+ /**
|
|
|
+ * number in pixels for canvas width
|
|
|
+ */
|
|
|
+ width?: number;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
interface IColor4Like {
|
|
|
r: float;
|
|
|
g: float;
|
|
@@ -95800,7 +95850,7 @@ declare module BABYLON {
|
|
|
* @param mimeType defines the MIME type of the screenshot image (default: image/png).
|
|
|
* Check your browser for supported MIME types
|
|
|
*/
|
|
|
- static CreateScreenshot(engine: Engine, camera: Camera, size: any, successCallback?: (data: string) => void, mimeType?: string): void;
|
|
|
+ static CreateScreenshot(engine: Engine, camera: Camera, size: IScreenshotSize | number, successCallback?: (data: string) => void, mimeType?: string): void;
|
|
|
/**
|
|
|
* Captures a screenshot of the current rendering
|
|
|
* @see http://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
@@ -95816,7 +95866,7 @@ declare module BABYLON {
|
|
|
* @returns screenshot as a string of base64-encoded characters. This string can be assigned
|
|
|
* to the src parameter of an <img> to display it
|
|
|
*/
|
|
|
- static CreateScreenshotAsync(engine: Engine, camera: Camera, size: any, mimeType?: string): Promise<string>;
|
|
|
+ static CreateScreenshotAsync(engine: Engine, camera: Camera, size: IScreenshotSize | number, mimeType?: string): Promise<string>;
|
|
|
/**
|
|
|
* Generates an image screenshot from the specified camera.
|
|
|
* @see http://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
@@ -95836,7 +95886,7 @@ declare module BABYLON {
|
|
|
* @param antialiasing Whether antialiasing should be turned on or not (default: false)
|
|
|
* @param fileName A name for for the downloaded file.
|
|
|
*/
|
|
|
- static CreateScreenshotUsingRenderTarget(engine: Engine, camera: Camera, size: any, successCallback?: (data: string) => void, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): void;
|
|
|
+ static CreateScreenshotUsingRenderTarget(engine: Engine, camera: Camera, size: IScreenshotSize | number, successCallback?: (data: string) => void, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): void;
|
|
|
/**
|
|
|
* Generates an image screenshot from the specified camera.
|
|
|
* @see http://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
@@ -95855,7 +95905,7 @@ declare module BABYLON {
|
|
|
* @returns screenshot as a string of base64-encoded characters. This string can be assigned
|
|
|
* to the src parameter of an <img> to display it
|
|
|
*/
|
|
|
- static CreateScreenshotUsingRenderTargetAsync(engine: Engine, camera: Camera, size: any, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): Promise<string>;
|
|
|
+ static CreateScreenshotUsingRenderTargetAsync(engine: Engine, camera: Camera, size: IScreenshotSize | number, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): Promise<string>;
|
|
|
/**
|
|
|
* Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523
|
|
|
* Be aware Math.random() could cause collisions, but:
|
|
@@ -97765,6 +97815,12 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getMaterialByName(name: string): Nullable<Material>;
|
|
|
/**
|
|
|
+ * Get a texture using its unique id
|
|
|
+ * @param uniqueId defines the texture's unique id
|
|
|
+ * @return the texture or null if none found.
|
|
|
+ */
|
|
|
+ getTextureByUniqueID(uniqueId: number): Nullable<BaseTexture>;
|
|
|
+ /**
|
|
|
* Gets a camera using its id
|
|
|
* @param id defines the id to look for
|
|
|
* @returns the camera or null if not found
|
|
@@ -101783,7 +101839,7 @@ declare module BABYLON {
|
|
|
* @param timeout amount of time in milliseconds to wait for a response from the sensor (default: infinite)
|
|
|
* @returns a promise that will resolve on orientation change
|
|
|
*/
|
|
|
- static WaitForOrientationChangeAsync(timeout?: number): Promise<unknown>;
|
|
|
+ static WaitForOrientationChangeAsync(timeout?: number): Promise<{}>;
|
|
|
/**
|
|
|
* @hidden
|
|
|
*/
|
|
@@ -104731,7 +104787,7 @@ declare module BABYLON {
|
|
|
* Stops the xrSession and restores the renderloop
|
|
|
* @returns Promise which resolves after it exits XR
|
|
|
*/
|
|
|
- exitXRAsync(): Promise<unknown>;
|
|
|
+ exitXRAsync(): Promise<{}>;
|
|
|
/**
|
|
|
* Checks if a session would be supported for the creation options specified
|
|
|
* @param sessionMode session mode to check if supported eg. immersive-vr
|
|
@@ -104877,7 +104933,7 @@ declare module BABYLON {
|
|
|
* Exits XR mode and returns the scene to its original state
|
|
|
* @returns promise that resolves after xr mode has exited
|
|
|
*/
|
|
|
- exitXRAsync(): Promise<unknown>;
|
|
|
+ exitXRAsync(): Promise<{}>;
|
|
|
/**
|
|
|
* Enters XR mode (This must be done within a user interaction in most browsers eg. button click)
|
|
|
* @param sessionCreationOptions options for the XR session
|
|
@@ -106237,9 +106293,9 @@ declare module BABYLON {
|
|
|
private _snapDistance;
|
|
|
private _scaleRatio;
|
|
|
/** Fires an event when any of it's sub gizmos are dragged */
|
|
|
- onDragStartObservable: Observable<unknown>;
|
|
|
+ onDragStartObservable: Observable<{}>;
|
|
|
/** Fires an event when any of it's sub gizmos are released from dragging */
|
|
|
- onDragEndObservable: Observable<unknown>;
|
|
|
+ onDragEndObservable: Observable<{}>;
|
|
|
/**
|
|
|
* If set to true, planar drag is enabled
|
|
|
*/
|
|
@@ -107511,9 +107567,9 @@ declare module BABYLON {
|
|
|
private _uniformScalingMesh;
|
|
|
private _octahedron;
|
|
|
/** Fires an event when any of it's sub gizmos are dragged */
|
|
|
- onDragStartObservable: Observable<unknown>;
|
|
|
+ onDragStartObservable: Observable<{}>;
|
|
|
/** Fires an event when any of it's sub gizmos are released from dragging */
|
|
|
- onDragEndObservable: Observable<unknown>;
|
|
|
+ onDragEndObservable: Observable<{}>;
|
|
|
attachedMesh: Nullable<AbstractMesh>;
|
|
|
/**
|
|
|
* Creates a ScaleGizmo
|
|
@@ -107772,9 +107828,9 @@ declare module BABYLON {
|
|
|
*/
|
|
|
zGizmo: PlaneRotationGizmo;
|
|
|
/** Fires an event when any of it's sub gizmos are dragged */
|
|
|
- onDragStartObservable: Observable<unknown>;
|
|
|
+ onDragStartObservable: Observable<{}>;
|
|
|
/** Fires an event when any of it's sub gizmos are released from dragging */
|
|
|
- onDragEndObservable: Observable<unknown>;
|
|
|
+ onDragEndObservable: Observable<{}>;
|
|
|
private _meshAttached;
|
|
|
attachedMesh: Nullable<AbstractMesh>;
|
|
|
/**
|
|
@@ -124361,7 +124417,7 @@ declare module BABYLON {
|
|
|
* @param mimeType defines the MIME type of the screenshot image (default: image/png).
|
|
|
* Check your browser for supported MIME types
|
|
|
*/
|
|
|
- static CreateScreenshot(engine: Engine, camera: Camera, size: any, successCallback?: (data: string) => void, mimeType?: string): void;
|
|
|
+ static CreateScreenshot(engine: Engine, camera: Camera, size: IScreenshotSize | number, successCallback?: (data: string) => void, mimeType?: string): void;
|
|
|
/**
|
|
|
* Captures a screenshot of the current rendering
|
|
|
* @see http://doc.babylonjs.com/how_to/render_scene_on_a_png
|
|
@@ -124397,7 +124453,7 @@ declare module BABYLON {
|
|
|
* @param antialiasing Whether antialiasing should be turned on or not (default: false)
|
|
|
* @param fileName A name for for the downloaded file.
|
|
|
*/
|
|
|
- static CreateScreenshotUsingRenderTarget(engine: Engine, camera: Camera, size: any, successCallback?: (data: string) => void, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): void;
|
|
|
+ static CreateScreenshotUsingRenderTarget(engine: Engine, camera: Camera, size: IScreenshotSize | number, successCallback?: (data: string) => void, mimeType?: string, samples?: number, antialiasing?: boolean, fileName?: string): void;
|
|
|
/**
|
|
|
* Generates an image screenshot from the specified camera.
|
|
|
* @see http://doc.babylonjs.com/how_to/render_scene_on_a_png
|