|
@@ -267,7 +267,7 @@ declare module BABYLON {
|
|
* Constant used to define the minimal number value in Babylon.js
|
|
* Constant used to define the minimal number value in Babylon.js
|
|
* @ignorenaming
|
|
* @ignorenaming
|
|
*/
|
|
*/
|
|
- export const Epsilon = 0.001;
|
|
|
|
|
|
+ let Epsilon: number;
|
|
/**
|
|
/**
|
|
* Class used to hold a RBG color
|
|
* Class used to hold a RBG color
|
|
*/
|
|
*/
|
|
@@ -2937,6 +2937,14 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
setTranslationFromFloats(x: number, y: number, z: number): Matrix;
|
|
setTranslationFromFloats(x: number, y: number, z: number): Matrix;
|
|
/**
|
|
/**
|
|
|
|
+ * Adds the translation vector (using 3 floats) in the current matrix
|
|
|
|
+ * @param x defines the 1st component of the translation
|
|
|
|
+ * @param y defines the 2nd component of the translation
|
|
|
|
+ * @param z defines the 3rd component of the translation
|
|
|
|
+ * @returns the current updated matrix
|
|
|
|
+ */
|
|
|
|
+ addTranslationFromFloats(x: number, y: number, z: number): Matrix;
|
|
|
|
+ /**
|
|
* Inserts the translation vector in the current matrix
|
|
* Inserts the translation vector in the current matrix
|
|
* @param vector3 defines the translation to insert
|
|
* @param vector3 defines the translation to insert
|
|
* @returns the current updated matrix
|
|
* @returns the current updated matrix
|
|
@@ -3255,6 +3263,14 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
static RotationAxisToRef(axis: DeepImmutable<Vector3>, angle: number, result: Matrix): void;
|
|
static RotationAxisToRef(axis: DeepImmutable<Vector3>, angle: number, result: Matrix): void;
|
|
/**
|
|
/**
|
|
|
|
+ * Takes normalised vectors and returns a rotation matrix to align "from" with "to".
|
|
|
|
+ * Taken from http://www.iquilezles.org/www/articles/noacos/noacos.htm
|
|
|
|
+ * @param from defines the vector to align
|
|
|
|
+ * @param to defines the vector to align to
|
|
|
|
+ * @param result defines the target matrix
|
|
|
|
+ */
|
|
|
|
+ static RotationAlignToRef(from: DeepImmutable<Vector3>, to: DeepImmutable<Vector3>, result: Matrix): void;
|
|
|
|
+ /**
|
|
* Creates a rotation matrix
|
|
* Creates a rotation matrix
|
|
* @param yaw defines the yaw angle in radians (Y axis)
|
|
* @param yaw defines the yaw angle in radians (Y axis)
|
|
* @param pitch defines the pitch angle in radians (X axis)
|
|
* @param pitch defines the pitch angle in radians (X axis)
|
|
@@ -6134,38 +6150,10 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
- * Internal interface used to track InternalTexture already bound to the GL context
|
|
|
|
- */
|
|
|
|
- export interface IInternalTextureTracker {
|
|
|
|
- /**
|
|
|
|
- * Gets or set the previous tracker in the list
|
|
|
|
- */
|
|
|
|
- previous: Nullable<IInternalTextureTracker>;
|
|
|
|
- /**
|
|
|
|
- * Gets or set the next tracker in the list
|
|
|
|
- */
|
|
|
|
- next: Nullable<IInternalTextureTracker>;
|
|
|
|
- }
|
|
|
|
- /**
|
|
|
|
- * Internal class used by the engine to get list of InternalTexture already bound to the GL context
|
|
|
|
- */
|
|
|
|
- export class DummyInternalTextureTracker {
|
|
|
|
- /**
|
|
|
|
- * Gets or set the previous tracker in the list
|
|
|
|
- */
|
|
|
|
- previous: Nullable<IInternalTextureTracker>;
|
|
|
|
- /**
|
|
|
|
- * Gets or set the next tracker in the list
|
|
|
|
- */
|
|
|
|
- next: Nullable<IInternalTextureTracker>;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-declare module BABYLON {
|
|
|
|
- /**
|
|
|
|
* Class used to store data associated with WebGL texture data for the engine
|
|
* Class used to store data associated with WebGL texture data for the engine
|
|
* This class should not be used directly
|
|
* This class should not be used directly
|
|
*/
|
|
*/
|
|
- export class InternalTexture implements IInternalTextureTracker {
|
|
|
|
|
|
+ export class InternalTexture {
|
|
/** hidden */
private static _UpdateRGBDAsync: (internalTexture: InternalTexture, data: ArrayBufferView[][], sphericalPolynomial: SphericalPolynomial | null, lodScale: number, lodOffset: number) => Promise<void>;
|
|
/** hidden */
private static _UpdateRGBDAsync: (internalTexture: InternalTexture, data: ArrayBufferView[][], sphericalPolynomial: SphericalPolynomial | null, lodScale: number, lodOffset: number) => Promise<void>;
|
|
/**
|
|
/**
|
|
* The source of the texture data is unknown
|
|
* The source of the texture data is unknown
|
|
@@ -6291,17 +6279,8 @@ declare module BABYLON {
|
|
* Gets a boolean indicating if the texture is inverted on Y axis
|
|
* Gets a boolean indicating if the texture is inverted on Y axis
|
|
*/
|
|
*/
|
|
invertY: boolean;
|
|
invertY: boolean;
|
|
- /**
|
|
|
|
- * Gets or set the previous tracker in the list
|
|
|
|
- */
|
|
|
|
- previous: Nullable<IInternalTextureTracker>;
|
|
|
|
- /**
|
|
|
|
- * Gets or set the next tracker in the list
|
|
|
|
- */
|
|
|
|
- next: Nullable<IInternalTextureTracker>;
|
|
|
|
/** @hidden */
invertVScale: boolean;
|
|
/** @hidden */
invertVScale: boolean;
|
|
- /** @hidden */
initialSlot: number;
|
|
|
|
- /** @hidden */
designatedSlot: number;
|
|
|
|
|
|
+ /** @hidden */
associatedChannel: number;
|
|
/** @hidden */
dataSource: number;
|
|
/** @hidden */
dataSource: number;
|
|
/** @hidden */
buffer: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>;
|
|
/** @hidden */
buffer: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>;
|
|
/** @hidden */
bufferView: Nullable<ArrayBufferView>;
|
|
/** @hidden */
bufferView: Nullable<ArrayBufferView>;
|
|
@@ -7419,6 +7398,7 @@ declare module BABYLON {
|
|
private _up;
|
|
private _up;
|
|
private _right;
|
|
private _right;
|
|
private _rightInverted;
|
|
private _rightInverted;
|
|
|
|
+ private _usePivotMatrix;
|
|
private _position;
|
|
private _position;
|
|
private _rotation;
|
|
private _rotation;
|
|
private _rotationQuaternion;
|
|
private _rotationQuaternion;
|
|
@@ -7462,8 +7442,6 @@ declare module BABYLON {
|
|
private _pivotMatrix;
|
|
private _pivotMatrix;
|
|
private _pivotMatrixInverse;
|
|
private _pivotMatrixInverse;
|
|
protected _postMultiplyPivotMatrix: boolean;
|
|
protected _postMultiplyPivotMatrix: boolean;
|
|
- private _tempMatrix;
|
|
|
|
- private _tempMatrix2;
|
|
|
|
protected _isWorldMatrixFrozen: boolean;
|
|
protected _isWorldMatrixFrozen: boolean;
|
|
/** @hidden */
indexInSceneTransformNodesArray: number;
|
|
/** @hidden */
indexInSceneTransformNodesArray: number;
|
|
/**
|
|
/**
|
|
@@ -7733,6 +7711,10 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
addRotation(x: number, y: number, z: number): TransformNode;
|
|
addRotation(x: number, y: number, z: number): TransformNode;
|
|
/**
|
|
/**
|
|
|
|
+ * @hidden
|
|
|
|
+ */
|
|
|
|
+ protected _getEffectiveParent(): Nullable<Node>;
|
|
|
|
+ /**
|
|
* Computes the world matrix of the node
|
|
* Computes the world matrix of the node
|
|
* @param force defines if the cache version should be invalidated forcing the world matrix to be created from scratch
|
|
* @param force defines if the cache version should be invalidated forcing the world matrix to be created from scratch
|
|
* @returns the world matrix
|
|
* @returns the world matrix
|
|
@@ -18077,6 +18059,8 @@ declare module BABYLON {
|
|
* The previous ratio of the runtime animation
|
|
* The previous ratio of the runtime animation
|
|
*/
|
|
*/
|
|
private _previousRatio;
|
|
private _previousRatio;
|
|
|
|
+ private _enableBlending;
|
|
|
|
+ private _correctLoopMode;
|
|
/**
|
|
/**
|
|
* Gets the current frame of the runtime animation
|
|
* Gets the current frame of the runtime animation
|
|
*/
|
|
*/
|
|
@@ -23643,6 +23627,10 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
alwaysSelectAsActiveMesh: boolean;
|
|
alwaysSelectAsActiveMesh: boolean;
|
|
/**
|
|
/**
|
|
|
|
+ * Gets or sets a boolean indicating that the bounding info does not need to be kept in sync (for performance reason)
|
|
|
|
+ */
|
|
|
|
+ doNotSyncBoundingInfo: boolean;
|
|
|
|
+ /**
|
|
* Gets or sets the current action manager
|
|
* Gets or sets the current action manager
|
|
* @see http://doc.babylonjs.com/how_to/how_to_use_actions
|
|
* @see http://doc.babylonjs.com/how_to/how_to_use_actions
|
|
*/
|
|
*/
|
|
@@ -23726,6 +23714,10 @@ declare module BABYLON {
|
|
* @returns a string representation of the current mesh
|
|
* @returns a string representation of the current mesh
|
|
*/
|
|
*/
|
|
toString(fullDetails?: boolean): string;
|
|
toString(fullDetails?: boolean): string;
|
|
|
|
+ /**
|
|
|
|
+ * @hidden
|
|
|
|
+ */
|
|
|
|
+ protected _getEffectiveParent(): Nullable<Node>;
|
|
/** @hidden */
getActionManagerForTrigger(trigger?: number, initialCall?: boolean): Nullable<AbstractActionManager>;
|
|
/** @hidden */
getActionManagerForTrigger(trigger?: number, initialCall?: boolean): Nullable<AbstractActionManager>;
|
|
/** @hidden */
rebuild(): void;
|
|
/** @hidden */
rebuild(): void;
|
|
/** @hidden */
resyncLightSources(): void;
|
|
/** @hidden */
resyncLightSources(): void;
|
|
@@ -26792,12 +26784,6 @@ declare module BABYLON {
|
|
/** @hidden */
badOS: boolean;
|
|
/** @hidden */
badOS: boolean;
|
|
/** @hidden */
badDesktopOS: boolean;
|
|
/** @hidden */
badDesktopOS: boolean;
|
|
/**
|
|
/**
|
|
- * Gets or sets a value indicating if we want to disable texture binding optimization.
|
|
|
|
- * This could be required on some buggy drivers which wants to have textures bound in a progressive order.
|
|
|
|
- * By default Babylon.js will try to let textures bound where they are and only update the samplers to point where the texture is
|
|
|
|
- */
|
|
|
|
- disableTextureBindingOptimization: boolean;
|
|
|
|
- /**
|
|
|
|
* Gets the audio engine
|
|
* Gets the audio engine
|
|
* @see http://doc.babylonjs.com/how_to/playing_sounds_and_music
|
|
* @see http://doc.babylonjs.com/how_to/playing_sounds_and_music
|
|
* @ignorenaming
|
|
* @ignorenaming
|
|
@@ -26845,7 +26831,6 @@ declare module BABYLON {
|
|
private _colorWrite;
|
|
private _colorWrite;
|
|
private _loadingScreen;
|
|
private _loadingScreen;
|
|
/** @hidden */
drawCalls: PerfCounter;
|
|
/** @hidden */
drawCalls: PerfCounter;
|
|
- /** @hidden */
textureCollisions: PerfCounter;
|
|
|
|
private _glVersion;
|
|
private _glVersion;
|
|
private _glRenderer;
|
|
private _glRenderer;
|
|
private _glVendor;
|
|
private _glVendor;
|
|
@@ -26928,8 +26913,6 @@ declare module BABYLON {
|
|
private _currentInstanceLocations;
|
|
private _currentInstanceLocations;
|
|
private _currentInstanceBuffers;
|
|
private _currentInstanceBuffers;
|
|
private _textureUnits;
|
|
private _textureUnits;
|
|
- private _firstBoundInternalTextureTracker;
|
|
|
|
- private _lastBoundInternalTextureTracker;
|
|
|
|
private _workingCanvas;
|
|
private _workingCanvas;
|
|
private _workingContext;
|
|
private _workingContext;
|
|
private _rescalePostProcess;
|
|
private _rescalePostProcess;
|
|
@@ -28173,10 +28156,6 @@ declare module BABYLON {
|
|
* @param effect defines the effect to bind
|
|
* @param effect defines the effect to bind
|
|
*/
|
|
*/
|
|
bindSamplers(effect: Effect): void;
|
|
bindSamplers(effect: Effect): void;
|
|
- private _moveBoundTextureOnTop;
|
|
|
|
- private _getCorrectTextureChannel;
|
|
|
|
- private _linkTrackers;
|
|
|
|
- private _removeDesignatedSlot;
|
|
|
|
private _activateCurrentTexture;
|
|
private _activateCurrentTexture;
|
|
/** @hidden */
bindTextureDirectly(target: number, texture: Nullable<InternalTexture>, forTextureDataUpdate?: boolean, force?: boolean): boolean;
|
|
/** @hidden */
bindTextureDirectly(target: number, texture: Nullable<InternalTexture>, forTextureDataUpdate?: boolean, force?: boolean): boolean;
|
|
/** @hidden */
bindTexture(channel: number, texture: Nullable<InternalTexture>): void;
|
|
/** @hidden */
bindTexture(channel: number, texture: Nullable<InternalTexture>): void;
|
|
@@ -30574,6 +30553,12 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
static DecodeBase64(uri: string): ArrayBuffer;
|
|
static DecodeBase64(uri: string): ArrayBuffer;
|
|
/**
|
|
/**
|
|
|
|
+ * Gets the absolute url.
|
|
|
|
+ * @param url the input url
|
|
|
|
+ * @return the absolute url
|
|
|
|
+ */
|
|
|
|
+ static GetAbsoluteUrl(url: string): string;
|
|
|
|
+ /**
|
|
* No log
|
|
* No log
|
|
*/
|
|
*/
|
|
static readonly NoneLogLevel: number;
|
|
static readonly NoneLogLevel: number;
|
|
@@ -34303,6 +34288,19 @@ declare module BABYLON {
|
|
* Define the current local position of the camera in the scene
|
|
* Define the current local position of the camera in the scene
|
|
*/
|
|
*/
|
|
position: Vector3;
|
|
position: Vector3;
|
|
|
|
+ protected _upVector: Vector3;
|
|
|
|
+ protected _upToYMatrix: Matrix;
|
|
|
|
+ protected _YToUpMatrix: Matrix;
|
|
|
|
+ /**
|
|
|
|
+ * The vector the camera should consider as up. (default is Vector3(0, 1, 0) as returned by Vector3.Up())
|
|
|
|
+ * Setting this will copy the given vector to the camera's upVector, and set rotation matrices to and from Y up.
|
|
|
|
+ * DO NOT set the up vector using copyFrom or copyFromFloats, as this bypasses setting the above matrices.
|
|
|
|
+ */
|
|
|
|
+ upVector: Vector3;
|
|
|
|
+ /**
|
|
|
|
+ * Sets the Y-up to camera up-vector rotation matrix, and the up-vector to Y-up rotation matrix.
|
|
|
|
+ */
|
|
|
|
+ setMatUp(): void;
|
|
/**
|
|
/**
|
|
* Current inertia value on the longitudinal axis.
|
|
* Current inertia value on the longitudinal axis.
|
|
* The bigger this number the longer it will take for the camera to stop.
|
|
* The bigger this number the longer it will take for the camera to stop.
|
|
@@ -34517,8 +34515,6 @@ declare module BABYLON {
|
|
protected _collisionTriggered: boolean;
|
|
protected _collisionTriggered: boolean;
|
|
protected _targetBoundingCenter: Nullable<Vector3>;
|
|
protected _targetBoundingCenter: Nullable<Vector3>;
|
|
private _computationVector;
|
|
private _computationVector;
|
|
- private _tempAxisVector;
|
|
|
|
- private _tempAxisRotationMatrix;
|
|
|
|
/**
|
|
/**
|
|
* Instantiates a new ArcRotateCamera in a given scene
|
|
* Instantiates a new ArcRotateCamera in a given scene
|
|
* @param name Defines the name of the camera
|
|
* @param name Defines the name of the camera
|
|
@@ -34837,7 +34833,7 @@ declare module BABYLON {
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
updatable?: boolean;
|
|
updatable?: boolean;
|
|
sourcePlane?: Plane;
|
|
sourcePlane?: Plane;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -38536,7 +38532,7 @@ declare module BABYLON {
|
|
h: number;
|
|
h: number;
|
|
};
|
|
};
|
|
updatable?: boolean;
|
|
updatable?: boolean;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a ground mesh from a height map
|
|
* Creates a ground mesh from a height map
|
|
* * The parameter `url` sets the URL of the height map image resource.
|
|
* * The parameter `url` sets the URL of the height map image resource.
|
|
@@ -38566,7 +38562,7 @@ declare module BABYLON {
|
|
alphaFilter?: number;
|
|
alphaFilter?: number;
|
|
updatable?: boolean;
|
|
updatable?: boolean;
|
|
onReady?: (mesh: GroundMesh) => void;
|
|
onReady?: (mesh: GroundMesh) => void;
|
|
- }, scene: Scene): GroundMesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): GroundMesh;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -40195,6 +40191,7 @@ declare module BABYLON.Debug {
|
|
private _utilityLayer;
|
|
private _utilityLayer;
|
|
private _debugBoxMesh;
|
|
private _debugBoxMesh;
|
|
private _debugSphereMesh;
|
|
private _debugSphereMesh;
|
|
|
|
+ private _debugCylinderMesh;
|
|
private _debugMaterial;
|
|
private _debugMaterial;
|
|
private _debugMeshMeshes;
|
|
private _debugMeshMeshes;
|
|
/**
|
|
/**
|
|
@@ -40219,6 +40216,7 @@ declare module BABYLON.Debug {
|
|
private _getDebugMaterial;
|
|
private _getDebugMaterial;
|
|
private _getDebugBoxMesh;
|
|
private _getDebugBoxMesh;
|
|
private _getDebugSphereMesh;
|
|
private _getDebugSphereMesh;
|
|
|
|
+ private _getDebugCylinderMesh;
|
|
private _getDebugMeshMesh;
|
|
private _getDebugMeshMesh;
|
|
private _getDebugMesh;
|
|
private _getDebugMesh;
|
|
/** Releases all resources */
|
|
/** Releases all resources */
|
|
@@ -41775,7 +41773,7 @@ declare module BABYLON {
|
|
sideOrientation?: number;
|
|
sideOrientation?: number;
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -45670,10 +45668,6 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
readonly drawCallsCounter: PerfCounter;
|
|
readonly drawCallsCounter: PerfCounter;
|
|
/**
|
|
/**
|
|
- * Gets the perf counter used for texture collisions
|
|
|
|
- */
|
|
|
|
- readonly textureCollisionsCounter: PerfCounter;
|
|
|
|
- /**
|
|
|
|
* Instantiates a new scene instrumentation.
|
|
* Instantiates a new scene instrumentation.
|
|
* This class can be used to get instrumentation data from a Babylon engine
|
|
* This class can be used to get instrumentation data from a Babylon engine
|
|
* @see http://doc.babylonjs.com/how_to/optimizing_your_scene#sceneinstrumentation
|
|
* @see http://doc.babylonjs.com/how_to/optimizing_your_scene#sceneinstrumentation
|
|
@@ -47424,7 +47418,7 @@ declare module BABYLON {
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
instance?: Mesh;
|
|
instance?: Mesh;
|
|
invertUV?: boolean;
|
|
invertUV?: boolean;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
private static _ExtrudeShapeGeneric;
|
|
private static _ExtrudeShapeGeneric;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -48525,6 +48519,31 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
|
|
+ * Helper class to push actions to a pool of workers.
|
|
|
|
+ */
|
|
|
|
+ export class WorkerPool implements IDisposable {
|
|
|
|
+ private _workerInfos;
|
|
|
|
+ private _pendingActions;
|
|
|
|
+ /**
|
|
|
|
+ * Constructor
|
|
|
|
+ * @param workers Array of workers to use for actions
|
|
|
|
+ */
|
|
|
|
+ constructor(workers: Array<Worker>);
|
|
|
|
+ /**
|
|
|
|
+ * Terminates all workers and clears any pending actions.
|
|
|
|
+ */
|
|
|
|
+ dispose(): void;
|
|
|
|
+ /**
|
|
|
|
+ * Pushes an action to the worker pool. If all the workers are active, the action will be
|
|
|
|
+ * pended until a worker has completed its action.
|
|
|
|
+ * @param action The action to perform. Call onComplete when the action is complete.
|
|
|
|
+ */
|
|
|
|
+ push(action: (worker: Worker, onComplete: () => void) => void): void;
|
|
|
|
+ private _execute;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /**
|
|
* Configuration for Draco compression
|
|
* Configuration for Draco compression
|
|
*/
|
|
*/
|
|
export interface IDracoCompressionConfiguration {
|
|
export interface IDracoCompressionConfiguration {
|
|
@@ -48585,7 +48604,7 @@ declare module BABYLON {
|
|
* @see https://www.babylonjs-playground.com/#N3EK4B#0
|
|
* @see https://www.babylonjs-playground.com/#N3EK4B#0
|
|
*/
|
|
*/
|
|
export class DracoCompression implements IDisposable {
|
|
export class DracoCompression implements IDisposable {
|
|
- private static _DecoderModulePromise;
|
|
|
|
|
|
+ private _workerPoolPromise;
|
|
/**
|
|
/**
|
|
* The configuration. Defaults to the following urls:
|
|
* The configuration. Defaults to the following urls:
|
|
* - wasmUrl: "https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js"
|
|
* - wasmUrl: "https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js"
|
|
@@ -48598,25 +48617,38 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
static readonly DecoderAvailable: boolean;
|
|
static readonly DecoderAvailable: boolean;
|
|
/**
|
|
/**
|
|
|
|
+ * Default number of workers to create when creating the draco compression object.
|
|
|
|
+ */
|
|
|
|
+ static DefaultNumWorkers: number;
|
|
|
|
+ private static GetDefaultNumWorkers;
|
|
|
|
+ /**
|
|
* Constructor
|
|
* Constructor
|
|
|
|
+ * @param numWorkers The number of workers for async operations
|
|
*/
|
|
*/
|
|
- constructor();
|
|
|
|
|
|
+ constructor(numWorkers?: number);
|
|
/**
|
|
/**
|
|
* Stop all async operations and release resources.
|
|
* Stop all async operations and release resources.
|
|
*/
|
|
*/
|
|
dispose(): void;
|
|
dispose(): void;
|
|
/**
|
|
/**
|
|
- * Decode Draco compressed mesh data to vertex data.
|
|
|
|
- * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data
|
|
|
|
- * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids
|
|
|
|
- * @returns A promise that resolves with the decoded vertex data
|
|
|
|
|
|
+ * Returns a promise that resolves when ready. Call this manually to ensure draco compression is ready before use.
|
|
|
|
+ * @returns a promise that resolves when ready
|
|
*/
|
|
*/
|
|
|
|
+ whenReadyAsync(): Promise<void>;
|
|
|
|
+ /**
|
|
|
|
+ * Decode Draco compressed mesh data to vertex data.
|
|
|
|
+ * @param data The ArrayBuffer or ArrayBufferView for the Draco compression data
|
|
|
|
+ * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids
|
|
|
|
+ * @returns A promise that resolves with the decoded vertex data
|
|
|
|
+ */
|
|
decodeMeshAsync(data: ArrayBuffer | ArrayBufferView, attributes: {
|
|
decodeMeshAsync(data: ArrayBuffer | ArrayBufferView, attributes: {
|
|
[kind: string]: number;
|
|
[kind: string]: number;
|
|
}): Promise<VertexData>;
|
|
}): Promise<VertexData>;
|
|
- private static _GetDecoderModule;
|
|
|
|
- private static _LoadScriptAsync;
|
|
|
|
- private static _LoadFileAsync;
|
|
|
|
|
|
+ /**
|
|
|
|
+ * The worker function that gets converted to a blob url to pass into a worker.
|
|
|
|
+ */
|
|
|
|
+ private static _Worker;
|
|
|
|
+ private _loadDecoderWasmBinaryAsync;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -48954,7 +48986,7 @@ declare module BABYLON {
|
|
sideOrientation?: number;
|
|
sideOrientation?: number;
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
- }, scene: Scene, earcutInjection?: any): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>, earcutInjection?: any): Mesh;
|
|
/**
|
|
/**
|
|
* Creates an extruded polygon mesh, with depth in the Y direction.
|
|
* Creates an extruded polygon mesh, with depth in the Y direction.
|
|
* * You can set different colors and different images to the top, bottom and extruded side by using the parameters `faceColors` (an array of 3 Color3 elements) and `faceUV` (an array of 3 Vector4 elements)
|
|
* * You can set different colors and different images to the top, bottom and extruded side by using the parameters `faceColors` (an array of 3 Color3 elements) and `faceUV` (an array of 3 Vector4 elements)
|
|
@@ -48975,7 +49007,7 @@ declare module BABYLON {
|
|
sideOrientation?: number;
|
|
sideOrientation?: number;
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
- }, scene: Scene, earcutInjection?: any): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>, earcutInjection?: any): Mesh;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -49016,7 +49048,7 @@ declare module BABYLON {
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
cap?: number;
|
|
cap?: number;
|
|
invertUV?: boolean;
|
|
invertUV?: boolean;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -49061,7 +49093,7 @@ declare module BABYLON {
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
instance?: Mesh;
|
|
instance?: Mesh;
|
|
invertUV?: boolean;
|
|
invertUV?: boolean;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -49095,7 +49127,7 @@ declare module BABYLON {
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
updatable?: boolean;
|
|
updatable?: boolean;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -49185,7 +49217,7 @@ declare module BABYLON {
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
updatable?: boolean;
|
|
updatable?: boolean;
|
|
- }, scene: any): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a plane polygonal mesh. By default, this is a disc
|
|
* Creates a plane polygonal mesh. By default, this is a disc
|
|
* * The parameter `radius` sets the radius size (float) of the polygon (default 0.5)
|
|
* * The parameter `radius` sets the radius size (float) of the polygon (default 0.5)
|
|
@@ -49235,7 +49267,7 @@ declare module BABYLON {
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
updatable?: boolean;
|
|
updatable?: boolean;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a ribbon mesh. The ribbon is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters
|
|
* Creates a ribbon mesh. The ribbon is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters
|
|
* * The parameter `pathArray` is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry
|
|
* * The parameter `pathArray` is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry
|
|
@@ -49316,7 +49348,7 @@ declare module BABYLON {
|
|
sideOrientation?: number;
|
|
sideOrientation?: number;
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
- }, scene: any): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a torus mesh
|
|
* Creates a torus mesh
|
|
* * The parameter `diameter` sets the diameter size (float) of the torus (default 1)
|
|
* * The parameter `diameter` sets the diameter size (float) of the torus (default 1)
|
|
@@ -49339,7 +49371,7 @@ declare module BABYLON {
|
|
sideOrientation?: number;
|
|
sideOrientation?: number;
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
- }, scene: any): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a torus knot mesh
|
|
* Creates a torus knot mesh
|
|
* * The parameter `radius` sets the global radius size (float) of the torus knot (default 2)
|
|
* * The parameter `radius` sets the global radius size (float) of the torus knot (default 2)
|
|
@@ -49366,7 +49398,7 @@ declare module BABYLON {
|
|
sideOrientation?: number;
|
|
sideOrientation?: number;
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
- }, scene: any): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a line system mesh. A line system is a pool of many lines gathered in a single mesh
|
|
* Creates a line system mesh. A line system is a pool of many lines gathered in a single mesh
|
|
* * A line system mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of lines as an input parameter
|
|
* * A line system mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of lines as an input parameter
|
|
@@ -49512,7 +49544,7 @@ declare module BABYLON {
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
instance?: Mesh;
|
|
instance?: Mesh;
|
|
invertUV?: boolean;
|
|
invertUV?: boolean;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates lathe mesh.
|
|
* Creates lathe mesh.
|
|
* The lathe is a shape with a symetry axis : a 2D model shape is rotated around this axis to design the lathe
|
|
* The lathe is a shape with a symetry axis : a 2D model shape is rotated around this axis to design the lathe
|
|
@@ -49546,7 +49578,7 @@ declare module BABYLON {
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
cap?: number;
|
|
cap?: number;
|
|
invertUV?: boolean;
|
|
invertUV?: boolean;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a plane mesh
|
|
* Creates a plane mesh
|
|
* * The parameter `size` sets the size (float) of both sides of the plane at once (default 1)
|
|
* * The parameter `size` sets the size (float) of both sides of the plane at once (default 1)
|
|
@@ -49570,7 +49602,7 @@ declare module BABYLON {
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
updatable?: boolean;
|
|
updatable?: boolean;
|
|
sourcePlane?: Plane;
|
|
sourcePlane?: Plane;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a ground mesh
|
|
* Creates a ground mesh
|
|
* * The parameters `width` and `height` (floats, default 1) set the width and height sizes of the ground
|
|
* * The parameters `width` and `height` (floats, default 1) set the width and height sizes of the ground
|
|
@@ -49589,7 +49621,7 @@ declare module BABYLON {
|
|
subdivisionsX?: number;
|
|
subdivisionsX?: number;
|
|
subdivisionsY?: number;
|
|
subdivisionsY?: number;
|
|
updatable?: boolean;
|
|
updatable?: boolean;
|
|
- }, scene: any): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a tiled ground mesh
|
|
* Creates a tiled ground mesh
|
|
* * The parameters `xmin` and `xmax` (floats, default -1 and 1) set the ground minimum and maximum X coordinates
|
|
* * The parameters `xmin` and `xmax` (floats, default -1 and 1) set the ground minimum and maximum X coordinates
|
|
@@ -49617,7 +49649,7 @@ declare module BABYLON {
|
|
h: number;
|
|
h: number;
|
|
};
|
|
};
|
|
updatable?: boolean;
|
|
updatable?: boolean;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a ground mesh from a height map
|
|
* Creates a ground mesh from a height map
|
|
* * The parameter `url` sets the URL of the height map image resource.
|
|
* * The parameter `url` sets the URL of the height map image resource.
|
|
@@ -49647,7 +49679,7 @@ declare module BABYLON {
|
|
alphaFilter?: number;
|
|
alphaFilter?: number;
|
|
updatable?: boolean;
|
|
updatable?: boolean;
|
|
onReady?: (mesh: GroundMesh) => void;
|
|
onReady?: (mesh: GroundMesh) => void;
|
|
- }, scene: Scene): GroundMesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): GroundMesh;
|
|
/**
|
|
/**
|
|
* Creates a polygon mesh
|
|
* Creates a polygon mesh
|
|
* The polygon's shape will depend on the input parameters and is constructed parallel to a ground mesh
|
|
* The polygon's shape will depend on the input parameters and is constructed parallel to a ground mesh
|
|
@@ -49672,7 +49704,7 @@ declare module BABYLON {
|
|
sideOrientation?: number;
|
|
sideOrientation?: number;
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
- }, scene: Scene, earcutInjection?: any): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>, earcutInjection?: any): Mesh;
|
|
/**
|
|
/**
|
|
* Creates an extruded polygon mesh, with depth in the Y direction.
|
|
* Creates an extruded polygon mesh, with depth in the Y direction.
|
|
* * You can set different colors and different images to the top, bottom and extruded side by using the parameters `faceColors` (an array of 3 Color3 elements) and `faceUV` (an array of 3 Vector4 elements)
|
|
* * You can set different colors and different images to the top, bottom and extruded side by using the parameters `faceColors` (an array of 3 Color3 elements) and `faceUV` (an array of 3 Vector4 elements)
|
|
@@ -49693,7 +49725,7 @@ declare module BABYLON {
|
|
sideOrientation?: number;
|
|
sideOrientation?: number;
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
- }, scene: Scene, earcutInjection?: any): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>, earcutInjection?: any): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a tube mesh.
|
|
* Creates a tube mesh.
|
|
* The tube is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters
|
|
* The tube is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters
|
|
@@ -49731,7 +49763,7 @@ declare module BABYLON {
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
instance?: Mesh;
|
|
instance?: Mesh;
|
|
invertUV?: boolean;
|
|
invertUV?: boolean;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a polyhedron mesh
|
|
* Creates a polyhedron mesh
|
|
* * The parameter `type` (positive integer, max 14, default 0) sets the polyhedron type to build among the 15 embbeded types. Please refer to the type sheet in the tutorial to choose the wanted type
|
|
* * The parameter `type` (positive integer, max 14, default 0) sets the polyhedron type to build among the 15 embbeded types. Please refer to the type sheet in the tutorial to choose the wanted type
|
|
@@ -49765,7 +49797,7 @@ declare module BABYLON {
|
|
sideOrientation?: number;
|
|
sideOrientation?: number;
|
|
frontUVs?: Vector4;
|
|
frontUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
backUVs?: Vector4;
|
|
- }, scene: Scene): Mesh;
|
|
|
|
|
|
+ }, scene?: Nullable<Scene>): Mesh;
|
|
/**
|
|
/**
|
|
* Creates a decal mesh.
|
|
* Creates a decal mesh.
|
|
* A decal is a mesh usually applied as a model onto the surface of another mesh. So don't forget the parameter `sourceMesh` depicting the decal
|
|
* A decal is a mesh usually applied as a model onto the surface of another mesh. So don't forget the parameter `sourceMesh` depicting the decal
|
|
@@ -55208,31 +55240,6 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
- * Helper class to push actions to a pool of workers.
|
|
|
|
- */
|
|
|
|
- export class WorkerPool implements IDisposable {
|
|
|
|
- private _workerInfos;
|
|
|
|
- private _pendingActions;
|
|
|
|
- /**
|
|
|
|
- * Constructor
|
|
|
|
- * @param workers Array of workers to use for actions
|
|
|
|
- */
|
|
|
|
- constructor(workers: Array<Worker>);
|
|
|
|
- /**
|
|
|
|
- * Terminates all workers and clears any pending actions.
|
|
|
|
- */
|
|
|
|
- dispose(): void;
|
|
|
|
- /**
|
|
|
|
- * Pushes an action to the worker pool. If all the workers are active, the action will be
|
|
|
|
- * pended until a worker has completed its action.
|
|
|
|
- * @param action The action to perform. Call onComplete when the action is complete.
|
|
|
|
- */
|
|
|
|
- push(action: (worker: Worker, onComplete: () => void) => void): void;
|
|
|
|
- private _execute;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-declare module BABYLON {
|
|
|
|
- /**
|
|
|
|
* Class containing a set of static utilities functions for screenshots
|
|
* Class containing a set of static utilities functions for screenshots
|
|
*/
|
|
*/
|
|
export class ScreenshotTools {
|
|
export class ScreenshotTools {
|
|
@@ -60811,10 +60818,12 @@ declare module BABYLON.GLTF2.Loader.Extensions {
|
|
export class KHR_draco_mesh_compression implements IGLTFLoaderExtension {
|
|
export class KHR_draco_mesh_compression implements IGLTFLoaderExtension {
|
|
/** The name of this extension. */
|
|
/** The name of this extension. */
|
|
readonly name: string;
|
|
readonly name: string;
|
|
|
|
+ /** The draco compression used to decode vertex data. */
|
|
|
|
+ dracoCompression?: DracoCompression;
|
|
/** Defines whether this extension is enabled. */
|
|
/** Defines whether this extension is enabled. */
|
|
enabled: boolean;
|
|
enabled: boolean;
|
|
private _loader;
|
|
private _loader;
|
|
- private _dracoCompression?;
|
|
|
|
|
|
+ private _dracoCompressionOwned;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
constructor(loader: GLTFLoader);
|
|
constructor(loader: GLTFLoader);
|
|
/** @hidden */
|
|
/** @hidden */
|