|
@@ -15084,7 +15084,8 @@ declare module "babylonjs/Meshes/transformNode" {
|
|
private _absoluteRotationQuaternion;
|
|
private _absoluteRotationQuaternion;
|
|
private _pivotMatrix;
|
|
private _pivotMatrix;
|
|
private _pivotMatrixInverse;
|
|
private _pivotMatrixInverse;
|
|
- protected _postMultiplyPivotMatrix: boolean;
|
|
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _postMultiplyPivotMatrix: boolean;
|
|
protected _isWorldMatrixFrozen: boolean;
|
|
protected _isWorldMatrixFrozen: boolean;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_indexInSceneTransformNodesArray: number;
|
|
_indexInSceneTransformNodesArray: number;
|
|
@@ -35144,12 +35145,14 @@ declare module "babylonjs/Materials/Textures/baseTexture" {
|
|
*/
|
|
*/
|
|
get is2DArray(): boolean;
|
|
get is2DArray(): boolean;
|
|
set is2DArray(value: boolean);
|
|
set is2DArray(value: boolean);
|
|
|
|
+ private _gammaSpace;
|
|
/**
|
|
/**
|
|
* Define if the texture contains data in gamma space (most of the png/jpg aside bump).
|
|
* Define if the texture contains data in gamma space (most of the png/jpg aside bump).
|
|
* HDR texture are usually stored in linear space.
|
|
* HDR texture are usually stored in linear space.
|
|
* This only impacts the PBR and Background materials
|
|
* This only impacts the PBR and Background materials
|
|
*/
|
|
*/
|
|
- gammaSpace: boolean;
|
|
|
|
|
|
+ get gammaSpace(): boolean;
|
|
|
|
+ set gammaSpace(gamma: boolean);
|
|
/**
|
|
/**
|
|
* Gets or sets whether or not the texture contains RGBD data.
|
|
* Gets or sets whether or not the texture contains RGBD data.
|
|
*/
|
|
*/
|
|
@@ -36014,6 +36017,8 @@ declare module "babylonjs/Engines/engineCapabilities" {
|
|
etc2: any;
|
|
etc2: any;
|
|
/** Defines if astc texture compression is supported */
|
|
/** Defines if astc texture compression is supported */
|
|
astc: any;
|
|
astc: any;
|
|
|
|
+ /** Defines if bptc texture compression is supported */
|
|
|
|
+ bptc: any;
|
|
/** Defines if float textures are supported */
|
|
/** Defines if float textures are supported */
|
|
textureFloat: boolean;
|
|
textureFloat: boolean;
|
|
/** Defines if vertex array objects are supported */
|
|
/** Defines if vertex array objects are supported */
|
|
@@ -37956,6 +37961,8 @@ declare module "babylonjs/Materials/Textures/internalTexture" {
|
|
_webGLTexture: Nullable<WebGLTexture>;
|
|
_webGLTexture: Nullable<WebGLTexture>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_references: number;
|
|
_references: number;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _gammaSpace: Nullable<boolean>;
|
|
private _engine;
|
|
private _engine;
|
|
/**
|
|
/**
|
|
* Gets the Engine the texture belongs to.
|
|
* Gets the Engine the texture belongs to.
|
|
@@ -43486,6 +43493,8 @@ declare module "babylonjs/Audio/audioSceneComponent" {
|
|
* in a given scene.
|
|
* in a given scene.
|
|
*/
|
|
*/
|
|
export class AudioSceneComponent implements ISceneSerializableComponent {
|
|
export class AudioSceneComponent implements ISceneSerializableComponent {
|
|
|
|
+ private static _CameraDirectionLH;
|
|
|
|
+ private static _CameraDirectionRH;
|
|
/**
|
|
/**
|
|
* The component name helpfull to identify the component in the list of scene components.
|
|
* The component name helpfull to identify the component in the list of scene components.
|
|
*/
|
|
*/
|
|
@@ -44911,6 +44920,7 @@ declare module "babylonjs/Misc/pivotTools" {
|
|
private static _OldPivotPoint;
|
|
private static _OldPivotPoint;
|
|
private static _PivotTranslation;
|
|
private static _PivotTranslation;
|
|
private static _PivotTmpVector;
|
|
private static _PivotTmpVector;
|
|
|
|
+ private static _PivotPostMultiplyPivotMatrix;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
static _RemoveAndStorePivotPoint(mesh: AbstractMesh): void;
|
|
static _RemoveAndStorePivotPoint(mesh: AbstractMesh): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
@@ -48892,6 +48902,10 @@ declare module "babylonjs/XR/webXRFeaturesManager" {
|
|
*/
|
|
*/
|
|
isCompatible(): boolean;
|
|
isCompatible(): boolean;
|
|
/**
|
|
/**
|
|
|
|
+ * Was this feature disposed;
|
|
|
|
+ */
|
|
|
|
+ isDisposed: boolean;
|
|
|
|
+ /**
|
|
* The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)
|
|
* The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)
|
|
*/
|
|
*/
|
|
xrNativeFeatureName?: string;
|
|
xrNativeFeatureName?: string;
|
|
@@ -50497,6 +50511,10 @@ declare module "babylonjs/XR/features/WebXRAbstractFeature" {
|
|
private _attached;
|
|
private _attached;
|
|
private _removeOnDetach;
|
|
private _removeOnDetach;
|
|
/**
|
|
/**
|
|
|
|
+ * Is this feature disposed?
|
|
|
|
+ */
|
|
|
|
+ isDisposed: boolean;
|
|
|
|
+ /**
|
|
* Should auto-attach be disabled?
|
|
* Should auto-attach be disabled?
|
|
*/
|
|
*/
|
|
disableAutoAttach: boolean;
|
|
disableAutoAttach: boolean;
|
|
@@ -51160,6 +51178,7 @@ declare module "babylonjs/Misc/timer" {
|
|
declare module "babylonjs/XR/features/WebXRControllerTeleportation" {
|
|
declare module "babylonjs/XR/features/WebXRControllerTeleportation" {
|
|
import { IWebXRFeature } from "babylonjs/XR/webXRFeaturesManager";
|
|
import { IWebXRFeature } from "babylonjs/XR/webXRFeaturesManager";
|
|
import { WebXRSessionManager } from "babylonjs/XR/webXRSessionManager";
|
|
import { WebXRSessionManager } from "babylonjs/XR/webXRSessionManager";
|
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
import { WebXRInput } from "babylonjs/XR/webXRInput";
|
|
import { WebXRInput } from "babylonjs/XR/webXRInput";
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
import { Vector3 } from "babylonjs/Maths/math.vector";
|
|
import { Vector3 } from "babylonjs/Maths/math.vector";
|
|
@@ -51248,6 +51267,10 @@ declare module "babylonjs/XR/features/WebXRControllerTeleportation" {
|
|
* Babylon XR Input class for controller
|
|
* Babylon XR Input class for controller
|
|
*/
|
|
*/
|
|
xrInput: WebXRInput;
|
|
xrInput: WebXRInput;
|
|
|
|
+ /**
|
|
|
|
+ * Meshes that the teleportation ray cannot go through
|
|
|
|
+ */
|
|
|
|
+ pickBlockerMeshes?: AbstractMesh[];
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* This is a teleportation feature to be used with WebXR-enabled motion controllers.
|
|
* This is a teleportation feature to be used with WebXR-enabled motion controllers.
|
|
@@ -51266,6 +51289,7 @@ declare module "babylonjs/XR/features/WebXRControllerTeleportation" {
|
|
private _teleportationRingMaterial?;
|
|
private _teleportationRingMaterial?;
|
|
private _tmpRay;
|
|
private _tmpRay;
|
|
private _tmpVector;
|
|
private _tmpVector;
|
|
|
|
+ private _tmpQuaternion;
|
|
/**
|
|
/**
|
|
* The module's name
|
|
* The module's name
|
|
*/
|
|
*/
|
|
@@ -51355,7 +51379,7 @@ declare module "babylonjs/XR/features/WebXRControllerTeleportation" {
|
|
* This is used to remove the selection rays when moving.
|
|
* This is used to remove the selection rays when moving.
|
|
* @param selectionFeature the feature to disable when forward movement is enabled
|
|
* @param selectionFeature the feature to disable when forward movement is enabled
|
|
*/
|
|
*/
|
|
- setSelectionFeature(selectionFeature: IWebXRFeature): void;
|
|
|
|
|
|
+ setSelectionFeature(selectionFeature: Nullable<IWebXRFeature>): void;
|
|
protected _onXRFrame(_xrFrame: XRFrame): void;
|
|
protected _onXRFrame(_xrFrame: XRFrame): void;
|
|
private _attachController;
|
|
private _attachController;
|
|
private _createDefaultTargetMesh;
|
|
private _createDefaultTargetMesh;
|
|
@@ -52335,6 +52359,9 @@ declare module "babylonjs/Gizmos/gizmo" {
|
|
private _tempQuaternion;
|
|
private _tempQuaternion;
|
|
private _tempVector;
|
|
private _tempVector;
|
|
private _tempVector2;
|
|
private _tempVector2;
|
|
|
|
+ private _tempMatrix1;
|
|
|
|
+ private _tempMatrix2;
|
|
|
|
+ private _rightHandtoLeftHandMatrix;
|
|
/**
|
|
/**
|
|
* Creates a gizmo
|
|
* Creates a gizmo
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
@@ -53018,6 +53045,8 @@ declare module "babylonjs/Debug/rayHelper" {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module "babylonjs/Debug/ISkeletonViewer" {
|
|
declare module "babylonjs/Debug/ISkeletonViewer" {
|
|
|
|
+ import { Skeleton } from "babylonjs/Bones/skeleton";
|
|
|
|
+ import { Color3 } from "babylonjs/Maths/math.color";
|
|
/**
|
|
/**
|
|
* Defines the options associated with the creation of a SkeletonViewer.
|
|
* Defines the options associated with the creation of a SkeletonViewer.
|
|
*/
|
|
*/
|
|
@@ -53032,6 +53061,8 @@ declare module "babylonjs/Debug/ISkeletonViewer" {
|
|
displayOptions: ISkeletonViewerDisplayOptions;
|
|
displayOptions: ISkeletonViewerDisplayOptions;
|
|
/** Flag to toggle if the Viewer should use the CPU for animations or not? */
|
|
/** Flag to toggle if the Viewer should use the CPU for animations or not? */
|
|
computeBonesUsingShaders: boolean;
|
|
computeBonesUsingShaders: boolean;
|
|
|
|
+ /** Flag ignore non weighted bones */
|
|
|
|
+ useAllBones: boolean;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* Defines how to display the various bone meshes for the viewer.
|
|
* Defines how to display the various bone meshes for the viewer.
|
|
@@ -53048,6 +53079,43 @@ declare module "babylonjs/Debug/ISkeletonViewer" {
|
|
/** Ratio for the Sphere Size */
|
|
/** Ratio for the Sphere Size */
|
|
sphereFactor?: number;
|
|
sphereFactor?: number;
|
|
}
|
|
}
|
|
|
|
+ /**
|
|
|
|
+ * Defines the constructor options for the BoneWeight Shader.
|
|
|
|
+ */
|
|
|
|
+ export interface IBoneWeightShaderOptions {
|
|
|
|
+ /** Skeleton to Map */
|
|
|
|
+ skeleton: Skeleton;
|
|
|
|
+ /** Colors for Uninfluenced bones */
|
|
|
|
+ colorBase?: Color3;
|
|
|
|
+ /** Colors for 0.0-0.25 Weight bones */
|
|
|
|
+ colorZero?: Color3;
|
|
|
|
+ /** Color for 0.25-0.5 Weight Influence */
|
|
|
|
+ colorQuarter?: Color3;
|
|
|
|
+ /** Color for 0.5-0.75 Weight Influence */
|
|
|
|
+ colorHalf?: Color3;
|
|
|
|
+ /** Color for 0.75-1 Weight Influence */
|
|
|
|
+ colorFull?: Color3;
|
|
|
|
+ /** Color for Zero Weight Influence */
|
|
|
|
+ targetBoneIndex?: number;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Simple structure of the gradient steps for the Color Map.
|
|
|
|
+ */
|
|
|
|
+ export interface ISkeletonMapShaderColorMapKnot {
|
|
|
|
+ /** Color of the Knot */
|
|
|
|
+ color: Color3;
|
|
|
|
+ /** Location of the Knot */
|
|
|
|
+ location: number;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Defines the constructor options for the SkeletonMap Shader.
|
|
|
|
+ */
|
|
|
|
+ export interface ISkeletonMapShaderOptions {
|
|
|
|
+ /** Skeleton to Map */
|
|
|
|
+ skeleton: Skeleton;
|
|
|
|
+ /** Array of ColorMapKnots that make the gradient must be ordered with knot[i].location < knot[i+1].location*/
|
|
|
|
+ colorMap?: ISkeletonMapShaderColorMapKnot[];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
declare module "babylonjs/Meshes/Builders/ribbonBuilder" {
|
|
declare module "babylonjs/Meshes/Builders/ribbonBuilder" {
|
|
import { Nullable } from "babylonjs/types";
|
|
import { Nullable } from "babylonjs/types";
|
|
@@ -53193,7 +53261,8 @@ declare module "babylonjs/Debug/skeletonViewer" {
|
|
import { LinesMesh } from "babylonjs/Meshes/linesMesh";
|
|
import { LinesMesh } from "babylonjs/Meshes/linesMesh";
|
|
import { UtilityLayerRenderer } from "babylonjs/Rendering/utilityLayerRenderer";
|
|
import { UtilityLayerRenderer } from "babylonjs/Rendering/utilityLayerRenderer";
|
|
import { StandardMaterial } from "babylonjs/Materials/standardMaterial";
|
|
import { StandardMaterial } from "babylonjs/Materials/standardMaterial";
|
|
- import { ISkeletonViewerOptions } from "babylonjs/Debug/ISkeletonViewer";
|
|
|
|
|
|
+ import { ShaderMaterial } from "babylonjs/Materials/shaderMaterial";
|
|
|
|
+ import { ISkeletonViewerOptions, IBoneWeightShaderOptions, ISkeletonMapShaderOptions } from "babylonjs/Debug/ISkeletonViewer";
|
|
/**
|
|
/**
|
|
* Class used to render a debug view of a given skeleton
|
|
* Class used to render a debug view of a given skeleton
|
|
* @see http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
* @see http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
@@ -53215,6 +53284,26 @@ declare module "babylonjs/Debug/skeletonViewer" {
|
|
static readonly DISPLAY_SPHERES: number;
|
|
static readonly DISPLAY_SPHERES: number;
|
|
/** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS */
|
|
/** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS */
|
|
static readonly DISPLAY_SPHERE_AND_SPURS: number;
|
|
static readonly DISPLAY_SPHERE_AND_SPURS: number;
|
|
|
|
+ /** public static method to create a BoneWeight Shader
|
|
|
|
+ * @param options The constructor options
|
|
|
|
+ * @param scene The scene that the shader is scoped to
|
|
|
|
+ * @returns The created ShaderMaterial
|
|
|
|
+ * @see http://www.babylonjs-playground.com/#1BZJVJ#395
|
|
|
|
+ */
|
|
|
|
+ static CreateBoneWeightShader(options: IBoneWeightShaderOptions, scene: Scene): ShaderMaterial;
|
|
|
|
+ /** public static method to create a BoneWeight Shader
|
|
|
|
+ * @param options The constructor options
|
|
|
|
+ * @param scene The scene that the shader is scoped to
|
|
|
|
+ * @returns The created ShaderMaterial
|
|
|
|
+ */
|
|
|
|
+ static CreateSkeletonMapShader(options: ISkeletonMapShaderOptions, scene: Scene): ShaderMaterial;
|
|
|
|
+ /** private static method to create a BoneWeight Shader
|
|
|
|
+ * @param size The size of the buffer to create (usually the bone count)
|
|
|
|
+ * @param colorMap The gradient data to generate
|
|
|
|
+ * @param scene The scene that the shader is scoped to
|
|
|
|
+ * @returns an Array of floats from the color gradient values
|
|
|
|
+ */
|
|
|
|
+ private static _CreateBoneMapColorBuffer;
|
|
/** If SkeletonViewer scene scope. */
|
|
/** If SkeletonViewer scene scope. */
|
|
private _scene;
|
|
private _scene;
|
|
/** Gets or sets the color used to render the skeleton */
|
|
/** Gets or sets the color used to render the skeleton */
|
|
@@ -56467,6 +56556,7 @@ declare module "babylonjs/Gizmos/lightGizmo" {
|
|
import { UtilityLayerRenderer } from "babylonjs/Rendering/utilityLayerRenderer";
|
|
import { UtilityLayerRenderer } from "babylonjs/Rendering/utilityLayerRenderer";
|
|
import { StandardMaterial } from "babylonjs/Materials/standardMaterial";
|
|
import { StandardMaterial } from "babylonjs/Materials/standardMaterial";
|
|
import { Light } from "babylonjs/Lights/light";
|
|
import { Light } from "babylonjs/Lights/light";
|
|
|
|
+ import { Observable } from "babylonjs/Misc/observable";
|
|
/**
|
|
/**
|
|
* Gizmo that enables viewing a light
|
|
* Gizmo that enables viewing a light
|
|
*/
|
|
*/
|
|
@@ -56476,6 +56566,11 @@ declare module "babylonjs/Gizmos/lightGizmo" {
|
|
private _cachedPosition;
|
|
private _cachedPosition;
|
|
private _cachedForward;
|
|
private _cachedForward;
|
|
private _attachedMeshParent;
|
|
private _attachedMeshParent;
|
|
|
|
+ private _pointerObserver;
|
|
|
|
+ /**
|
|
|
|
+ * Event that fires each time the gizmo is clicked
|
|
|
|
+ */
|
|
|
|
+ onClickedObservable: Observable<Light>;
|
|
/**
|
|
/**
|
|
* Creates a LightGizmo
|
|
* Creates a LightGizmo
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
@@ -56517,6 +56612,7 @@ declare module "babylonjs/Gizmos/cameraGizmo" {
|
|
import { UtilityLayerRenderer } from "babylonjs/Rendering/utilityLayerRenderer";
|
|
import { UtilityLayerRenderer } from "babylonjs/Rendering/utilityLayerRenderer";
|
|
import { StandardMaterial } from "babylonjs/Materials/standardMaterial";
|
|
import { StandardMaterial } from "babylonjs/Materials/standardMaterial";
|
|
import { Camera } from "babylonjs/Cameras/camera";
|
|
import { Camera } from "babylonjs/Cameras/camera";
|
|
|
|
+ import { Observable } from "babylonjs/Misc/observable";
|
|
/**
|
|
/**
|
|
* Gizmo that enables viewing a camera
|
|
* Gizmo that enables viewing a camera
|
|
*/
|
|
*/
|
|
@@ -56524,6 +56620,11 @@ declare module "babylonjs/Gizmos/cameraGizmo" {
|
|
private _cameraMesh;
|
|
private _cameraMesh;
|
|
private _cameraLinesMesh;
|
|
private _cameraLinesMesh;
|
|
private _material;
|
|
private _material;
|
|
|
|
+ private _pointerObserver;
|
|
|
|
+ /**
|
|
|
|
+ * Event that fires each time the gizmo is clicked
|
|
|
|
+ */
|
|
|
|
+ onClickedObservable: Observable<Camera>;
|
|
/**
|
|
/**
|
|
* Creates a CameraGizmo
|
|
* Creates a CameraGizmo
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
@@ -60221,20 +60322,65 @@ declare module "babylonjs/Misc/khronosTextureContainer" {
|
|
static IsValid(data: ArrayBufferView): boolean;
|
|
static IsValid(data: ArrayBufferView): boolean;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+declare module "babylonjs/Misc/workerPool" {
|
|
|
|
+ import { IDisposable } from "babylonjs/scene";
|
|
|
|
+ /**
|
|
|
|
+ * 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 "babylonjs/Misc/khronosTextureContainer2" {
|
|
declare module "babylonjs/Misc/khronosTextureContainer2" {
|
|
import { InternalTexture } from "babylonjs/Materials/Textures/internalTexture";
|
|
import { InternalTexture } from "babylonjs/Materials/Textures/internalTexture";
|
|
import { ThinEngine } from "babylonjs/Engines/thinEngine";
|
|
import { ThinEngine } from "babylonjs/Engines/thinEngine";
|
|
/**
|
|
/**
|
|
* Class for loading KTX2 files
|
|
* Class for loading KTX2 files
|
|
- * !!! Experimental Extension Subject to Changes !!!
|
|
|
|
* @hidden
|
|
* @hidden
|
|
*/
|
|
*/
|
|
export class KhronosTextureContainer2 {
|
|
export class KhronosTextureContainer2 {
|
|
- private static _ModulePromise;
|
|
|
|
- private static _TranscodeFormat;
|
|
|
|
- constructor(engine: ThinEngine);
|
|
|
|
|
|
+ private static _WorkerPoolPromise?;
|
|
|
|
+ private static _Initialized;
|
|
|
|
+ private static _Ktx2Decoder;
|
|
|
|
+ /**
|
|
|
|
+ * URL to use when loading the KTX2 decoder module
|
|
|
|
+ */
|
|
|
|
+ static JSModuleURL: string;
|
|
|
|
+ /**
|
|
|
|
+ * Default number of workers used to handle data decoding
|
|
|
|
+ */
|
|
|
|
+ static DefaultNumWorkers: number;
|
|
|
|
+ private static GetDefaultNumWorkers;
|
|
|
|
+ private _engine;
|
|
|
|
+ private static _CreateWorkerPool;
|
|
|
|
+ /**
|
|
|
|
+ * Constructor
|
|
|
|
+ * @param numWorkers The number of workers for async operations. Specify `0` to disable web workers and run synchronously in the current context.
|
|
|
|
+ */
|
|
|
|
+ constructor(engine: ThinEngine, numWorkers?: number);
|
|
uploadAsync(data: ArrayBufferView, internalTexture: InternalTexture): Promise<void>;
|
|
uploadAsync(data: ArrayBufferView, internalTexture: InternalTexture): Promise<void>;
|
|
- private _determineTranscodeFormat;
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Stop all async operations and release resources.
|
|
|
|
+ */
|
|
|
|
+ dispose(): void;
|
|
|
|
+ protected _createTexture(data: any, internalTexture: InternalTexture): void;
|
|
/**
|
|
/**
|
|
* Checks if the given data starts with a KTX2 file identifier.
|
|
* Checks if the given data starts with a KTX2 file identifier.
|
|
* @param data the data to check
|
|
* @param data the data to check
|
|
@@ -60242,6 +60388,7 @@ declare module "babylonjs/Misc/khronosTextureContainer2" {
|
|
*/
|
|
*/
|
|
static IsValid(data: ArrayBufferView): boolean;
|
|
static IsValid(data: ArrayBufferView): boolean;
|
|
}
|
|
}
|
|
|
|
+ export function workerFunc(): void;
|
|
}
|
|
}
|
|
declare module "babylonjs/Materials/Textures/Loaders/ktxTextureLoader" {
|
|
declare module "babylonjs/Materials/Textures/Loaders/ktxTextureLoader" {
|
|
import { Nullable } from "babylonjs/types";
|
|
import { Nullable } from "babylonjs/types";
|
|
@@ -64903,7 +65050,8 @@ declare module "babylonjs/Materials/Textures/Procedurals/noiseProceduralTexture"
|
|
* Class used to generate noise procedural textures
|
|
* Class used to generate noise procedural textures
|
|
*/
|
|
*/
|
|
export class NoiseProceduralTexture extends ProceduralTexture {
|
|
export class NoiseProceduralTexture extends ProceduralTexture {
|
|
- private _time;
|
|
|
|
|
|
+ /** Gets or sets the start time (default is 0) */
|
|
|
|
+ time: number;
|
|
/** Gets or sets a value between 0 and 1 indicating the overall brightness of the texture (default is 0.2) */
|
|
/** Gets or sets a value between 0 and 1 indicating the overall brightness of the texture (default is 0.2) */
|
|
brightness: number;
|
|
brightness: number;
|
|
/** Defines the number of octaves to process */
|
|
/** Defines the number of octaves to process */
|
|
@@ -68318,32 +68466,6 @@ declare module "babylonjs/Maths/index" {
|
|
export * from "babylonjs/Maths/math";
|
|
export * from "babylonjs/Maths/math";
|
|
export * from "babylonjs/Maths/sphericalPolynomial";
|
|
export * from "babylonjs/Maths/sphericalPolynomial";
|
|
}
|
|
}
|
|
-declare module "babylonjs/Misc/workerPool" {
|
|
|
|
- import { IDisposable } from "babylonjs/scene";
|
|
|
|
- /**
|
|
|
|
- * 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 "babylonjs/Meshes/Compression/dracoCompression" {
|
|
declare module "babylonjs/Meshes/Compression/dracoCompression" {
|
|
import { IDisposable } from "babylonjs/scene";
|
|
import { IDisposable } from "babylonjs/scene";
|
|
import { VertexData } from "babylonjs/Meshes/mesh.vertexData";
|
|
import { VertexData } from "babylonjs/Meshes/mesh.vertexData";
|
|
@@ -70136,6 +70258,14 @@ declare module "babylonjs/Meshes/thinInstanceMesh" {
|
|
*/
|
|
*/
|
|
thinInstanceBufferUpdated(kind: string): void;
|
|
thinInstanceBufferUpdated(kind: string): void;
|
|
/**
|
|
/**
|
|
|
|
+ * Applies a partial update to a buffer directly on the GPU
|
|
|
|
+ * Note that the buffer located on the CPU is NOT updated! It's up to you to update it (or not) with the same data you pass to this method
|
|
|
|
+ * @param kind name of the attribute to update. Use "matrix" to update the buffer of matrices
|
|
|
|
+ * @param data the data to set in the GPU buffer
|
|
|
|
+ * @param offset the offset in the GPU buffer where to update the data
|
|
|
|
+ */
|
|
|
|
+ thinInstancePartialBufferUpdate(kind: string, data: Float32Array, offset: number): void;
|
|
|
|
+ /**
|
|
* Refreshes the bounding info, taking into account all the thin instances defined
|
|
* Refreshes the bounding info, taking into account all the thin instances defined
|
|
* @param forceRefreshParentInfo true to force recomputing the mesh bounding info and use it to compute the aggregated bounding info
|
|
* @param forceRefreshParentInfo true to force recomputing the mesh bounding info and use it to compute the aggregated bounding info
|
|
*/
|
|
*/
|
|
@@ -78264,6 +78394,7 @@ declare module "babylonjs/Misc/index" {
|
|
export * from "babylonjs/Misc/depthReducer";
|
|
export * from "babylonjs/Misc/depthReducer";
|
|
export * from "babylonjs/Misc/dataStorage";
|
|
export * from "babylonjs/Misc/dataStorage";
|
|
export * from "babylonjs/Misc/sceneRecorder";
|
|
export * from "babylonjs/Misc/sceneRecorder";
|
|
|
|
+ export * from "babylonjs/Misc/khronosTextureContainer2";
|
|
}
|
|
}
|
|
declare module "babylonjs/XR/features/WebXRHitTestLegacy" {
|
|
declare module "babylonjs/XR/features/WebXRHitTestLegacy" {
|
|
import { IWebXRFeature } from "babylonjs/XR/webXRFeaturesManager";
|
|
import { IWebXRFeature } from "babylonjs/XR/webXRFeaturesManager";
|
|
@@ -79183,14 +79314,14 @@ declare module "babylonjs/XR/features/WebXRHandTracking" {
|
|
/**
|
|
/**
|
|
* Hand-parts definition (key is HandPart)
|
|
* Hand-parts definition (key is HandPart)
|
|
*/
|
|
*/
|
|
- static HandPartsDefinition: {
|
|
|
|
|
|
+ handPartsDefinition: {
|
|
[key: string]: number[];
|
|
[key: string]: number[];
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
* Populate the HandPartsDefinition object.
|
|
* Populate the HandPartsDefinition object.
|
|
* This is called as a side effect since certain browsers don't have XRHand defined.
|
|
* This is called as a side effect since certain browsers don't have XRHand defined.
|
|
*/
|
|
*/
|
|
- static _PopulateHandPartsDefinition(): void;
|
|
|
|
|
|
+ private generateHandPartsDefinition;
|
|
/**
|
|
/**
|
|
* Construct a new hand object
|
|
* Construct a new hand object
|
|
* @param xrController the controller to which the hand correlates
|
|
* @param xrController the controller to which the hand correlates
|
|
@@ -94348,7 +94479,8 @@ declare module BABYLON {
|
|
private _absoluteRotationQuaternion;
|
|
private _absoluteRotationQuaternion;
|
|
private _pivotMatrix;
|
|
private _pivotMatrix;
|
|
private _pivotMatrixInverse;
|
|
private _pivotMatrixInverse;
|
|
- protected _postMultiplyPivotMatrix: boolean;
|
|
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _postMultiplyPivotMatrix: boolean;
|
|
protected _isWorldMatrixFrozen: boolean;
|
|
protected _isWorldMatrixFrozen: boolean;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_indexInSceneTransformNodesArray: number;
|
|
_indexInSceneTransformNodesArray: number;
|
|
@@ -113588,12 +113720,14 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
get is2DArray(): boolean;
|
|
get is2DArray(): boolean;
|
|
set is2DArray(value: boolean);
|
|
set is2DArray(value: boolean);
|
|
|
|
+ private _gammaSpace;
|
|
/**
|
|
/**
|
|
* Define if the texture contains data in gamma space (most of the png/jpg aside bump).
|
|
* Define if the texture contains data in gamma space (most of the png/jpg aside bump).
|
|
* HDR texture are usually stored in linear space.
|
|
* HDR texture are usually stored in linear space.
|
|
* This only impacts the PBR and Background materials
|
|
* This only impacts the PBR and Background materials
|
|
*/
|
|
*/
|
|
- gammaSpace: boolean;
|
|
|
|
|
|
+ get gammaSpace(): boolean;
|
|
|
|
+ set gammaSpace(gamma: boolean);
|
|
/**
|
|
/**
|
|
* Gets or sets whether or not the texture contains RGBD data.
|
|
* Gets or sets whether or not the texture contains RGBD data.
|
|
*/
|
|
*/
|
|
@@ -114445,6 +114579,8 @@ declare module BABYLON {
|
|
etc2: any;
|
|
etc2: any;
|
|
/** Defines if astc texture compression is supported */
|
|
/** Defines if astc texture compression is supported */
|
|
astc: any;
|
|
astc: any;
|
|
|
|
+ /** Defines if bptc texture compression is supported */
|
|
|
|
+ bptc: any;
|
|
/** Defines if float textures are supported */
|
|
/** Defines if float textures are supported */
|
|
textureFloat: boolean;
|
|
textureFloat: boolean;
|
|
/** Defines if vertex array objects are supported */
|
|
/** Defines if vertex array objects are supported */
|
|
@@ -116340,6 +116476,8 @@ declare module BABYLON {
|
|
_webGLTexture: Nullable<WebGLTexture>;
|
|
_webGLTexture: Nullable<WebGLTexture>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_references: number;
|
|
_references: number;
|
|
|
|
+ /** @hidden */
|
|
|
|
+ _gammaSpace: Nullable<boolean>;
|
|
private _engine;
|
|
private _engine;
|
|
/**
|
|
/**
|
|
* Gets the Engine the texture belongs to.
|
|
* Gets the Engine the texture belongs to.
|
|
@@ -121683,6 +121821,8 @@ declare module BABYLON {
|
|
* in a given scene.
|
|
* in a given scene.
|
|
*/
|
|
*/
|
|
export class AudioSceneComponent implements ISceneSerializableComponent {
|
|
export class AudioSceneComponent implements ISceneSerializableComponent {
|
|
|
|
+ private static _CameraDirectionLH;
|
|
|
|
+ private static _CameraDirectionRH;
|
|
/**
|
|
/**
|
|
* The component name helpfull to identify the component in the list of scene components.
|
|
* The component name helpfull to identify the component in the list of scene components.
|
|
*/
|
|
*/
|
|
@@ -123049,6 +123189,7 @@ declare module BABYLON {
|
|
private static _OldPivotPoint;
|
|
private static _OldPivotPoint;
|
|
private static _PivotTranslation;
|
|
private static _PivotTranslation;
|
|
private static _PivotTmpVector;
|
|
private static _PivotTmpVector;
|
|
|
|
+ private static _PivotPostMultiplyPivotMatrix;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
static _RemoveAndStorePivotPoint(mesh: AbstractMesh): void;
|
|
static _RemoveAndStorePivotPoint(mesh: AbstractMesh): void;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
@@ -126764,6 +126905,10 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
isCompatible(): boolean;
|
|
isCompatible(): boolean;
|
|
/**
|
|
/**
|
|
|
|
+ * Was this feature disposed;
|
|
|
|
+ */
|
|
|
|
+ isDisposed: boolean;
|
|
|
|
+ /**
|
|
* The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)
|
|
* The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)
|
|
*/
|
|
*/
|
|
xrNativeFeatureName?: string;
|
|
xrNativeFeatureName?: string;
|
|
@@ -128319,6 +128464,10 @@ declare module BABYLON {
|
|
private _attached;
|
|
private _attached;
|
|
private _removeOnDetach;
|
|
private _removeOnDetach;
|
|
/**
|
|
/**
|
|
|
|
+ * Is this feature disposed?
|
|
|
|
+ */
|
|
|
|
+ isDisposed: boolean;
|
|
|
|
+ /**
|
|
* Should auto-attach be disabled?
|
|
* Should auto-attach be disabled?
|
|
*/
|
|
*/
|
|
disableAutoAttach: boolean;
|
|
disableAutoAttach: boolean;
|
|
@@ -129034,6 +129183,10 @@ declare module BABYLON {
|
|
* Babylon XR Input class for controller
|
|
* Babylon XR Input class for controller
|
|
*/
|
|
*/
|
|
xrInput: WebXRInput;
|
|
xrInput: WebXRInput;
|
|
|
|
+ /**
|
|
|
|
+ * Meshes that the teleportation ray cannot go through
|
|
|
|
+ */
|
|
|
|
+ pickBlockerMeshes?: AbstractMesh[];
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* This is a teleportation feature to be used with WebXR-enabled motion controllers.
|
|
* This is a teleportation feature to be used with WebXR-enabled motion controllers.
|
|
@@ -129052,6 +129205,7 @@ declare module BABYLON {
|
|
private _teleportationRingMaterial?;
|
|
private _teleportationRingMaterial?;
|
|
private _tmpRay;
|
|
private _tmpRay;
|
|
private _tmpVector;
|
|
private _tmpVector;
|
|
|
|
+ private _tmpQuaternion;
|
|
/**
|
|
/**
|
|
* The module's name
|
|
* The module's name
|
|
*/
|
|
*/
|
|
@@ -129141,7 +129295,7 @@ declare module BABYLON {
|
|
* This is used to remove the selection rays when moving.
|
|
* This is used to remove the selection rays when moving.
|
|
* @param selectionFeature the feature to disable when forward movement is enabled
|
|
* @param selectionFeature the feature to disable when forward movement is enabled
|
|
*/
|
|
*/
|
|
- setSelectionFeature(selectionFeature: IWebXRFeature): void;
|
|
|
|
|
|
+ setSelectionFeature(selectionFeature: Nullable<IWebXRFeature>): void;
|
|
protected _onXRFrame(_xrFrame: XRFrame): void;
|
|
protected _onXRFrame(_xrFrame: XRFrame): void;
|
|
private _attachController;
|
|
private _attachController;
|
|
private _createDefaultTargetMesh;
|
|
private _createDefaultTargetMesh;
|
|
@@ -130008,6 +130162,9 @@ declare module BABYLON {
|
|
private _tempQuaternion;
|
|
private _tempQuaternion;
|
|
private _tempVector;
|
|
private _tempVector;
|
|
private _tempVector2;
|
|
private _tempVector2;
|
|
|
|
+ private _tempMatrix1;
|
|
|
|
+ private _tempMatrix2;
|
|
|
|
+ private _rightHandtoLeftHandMatrix;
|
|
/**
|
|
/**
|
|
* Creates a gizmo
|
|
* Creates a gizmo
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
@@ -130641,6 +130798,8 @@ declare module BABYLON {
|
|
displayOptions: ISkeletonViewerDisplayOptions;
|
|
displayOptions: ISkeletonViewerDisplayOptions;
|
|
/** Flag to toggle if the Viewer should use the CPU for animations or not? */
|
|
/** Flag to toggle if the Viewer should use the CPU for animations or not? */
|
|
computeBonesUsingShaders: boolean;
|
|
computeBonesUsingShaders: boolean;
|
|
|
|
+ /** Flag ignore non weighted bones */
|
|
|
|
+ useAllBones: boolean;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* Defines how to display the various bone meshes for the viewer.
|
|
* Defines how to display the various bone meshes for the viewer.
|
|
@@ -130657,6 +130816,43 @@ declare module BABYLON {
|
|
/** Ratio for the Sphere Size */
|
|
/** Ratio for the Sphere Size */
|
|
sphereFactor?: number;
|
|
sphereFactor?: number;
|
|
}
|
|
}
|
|
|
|
+ /**
|
|
|
|
+ * Defines the constructor options for the BoneWeight Shader.
|
|
|
|
+ */
|
|
|
|
+ export interface IBoneWeightShaderOptions {
|
|
|
|
+ /** Skeleton to Map */
|
|
|
|
+ skeleton: Skeleton;
|
|
|
|
+ /** Colors for Uninfluenced bones */
|
|
|
|
+ colorBase?: Color3;
|
|
|
|
+ /** Colors for 0.0-0.25 Weight bones */
|
|
|
|
+ colorZero?: Color3;
|
|
|
|
+ /** Color for 0.25-0.5 Weight Influence */
|
|
|
|
+ colorQuarter?: Color3;
|
|
|
|
+ /** Color for 0.5-0.75 Weight Influence */
|
|
|
|
+ colorHalf?: Color3;
|
|
|
|
+ /** Color for 0.75-1 Weight Influence */
|
|
|
|
+ colorFull?: Color3;
|
|
|
|
+ /** Color for Zero Weight Influence */
|
|
|
|
+ targetBoneIndex?: number;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Simple structure of the gradient steps for the Color Map.
|
|
|
|
+ */
|
|
|
|
+ export interface ISkeletonMapShaderColorMapKnot {
|
|
|
|
+ /** Color of the Knot */
|
|
|
|
+ color: Color3;
|
|
|
|
+ /** Location of the Knot */
|
|
|
|
+ location: number;
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * Defines the constructor options for the SkeletonMap Shader.
|
|
|
|
+ */
|
|
|
|
+ export interface ISkeletonMapShaderOptions {
|
|
|
|
+ /** Skeleton to Map */
|
|
|
|
+ skeleton: Skeleton;
|
|
|
|
+ /** Array of ColorMapKnots that make the gradient must be ordered with knot[i].location < knot[i+1].location*/
|
|
|
|
+ colorMap?: ISkeletonMapShaderColorMapKnot[];
|
|
|
|
+ }
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
@@ -130806,6 +131002,26 @@ declare module BABYLON.Debug {
|
|
static readonly DISPLAY_SPHERES: number;
|
|
static readonly DISPLAY_SPHERES: number;
|
|
/** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS */
|
|
/** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS */
|
|
static readonly DISPLAY_SPHERE_AND_SPURS: number;
|
|
static readonly DISPLAY_SPHERE_AND_SPURS: number;
|
|
|
|
+ /** public static method to create a BoneWeight Shader
|
|
|
|
+ * @param options The constructor options
|
|
|
|
+ * @param scene The scene that the shader is scoped to
|
|
|
|
+ * @returns The created ShaderMaterial
|
|
|
|
+ * @see http://www.babylonjs-playground.com/#1BZJVJ#395
|
|
|
|
+ */
|
|
|
|
+ static CreateBoneWeightShader(options: IBoneWeightShaderOptions, scene: Scene): ShaderMaterial;
|
|
|
|
+ /** public static method to create a BoneWeight Shader
|
|
|
|
+ * @param options The constructor options
|
|
|
|
+ * @param scene The scene that the shader is scoped to
|
|
|
|
+ * @returns The created ShaderMaterial
|
|
|
|
+ */
|
|
|
|
+ static CreateSkeletonMapShader(options: ISkeletonMapShaderOptions, scene: Scene): ShaderMaterial;
|
|
|
|
+ /** private static method to create a BoneWeight Shader
|
|
|
|
+ * @param size The size of the buffer to create (usually the bone count)
|
|
|
|
+ * @param colorMap The gradient data to generate
|
|
|
|
+ * @param scene The scene that the shader is scoped to
|
|
|
|
+ * @returns an Array of floats from the color gradient values
|
|
|
|
+ */
|
|
|
|
+ private static _CreateBoneMapColorBuffer;
|
|
/** If SkeletonViewer scene scope. */
|
|
/** If SkeletonViewer scene scope. */
|
|
private _scene;
|
|
private _scene;
|
|
/** Gets or sets the color used to render the skeleton */
|
|
/** Gets or sets the color used to render the skeleton */
|
|
@@ -133804,6 +134020,11 @@ declare module BABYLON {
|
|
private _cachedPosition;
|
|
private _cachedPosition;
|
|
private _cachedForward;
|
|
private _cachedForward;
|
|
private _attachedMeshParent;
|
|
private _attachedMeshParent;
|
|
|
|
+ private _pointerObserver;
|
|
|
|
+ /**
|
|
|
|
+ * Event that fires each time the gizmo is clicked
|
|
|
|
+ */
|
|
|
|
+ onClickedObservable: Observable<Light>;
|
|
/**
|
|
/**
|
|
* Creates a LightGizmo
|
|
* Creates a LightGizmo
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
@@ -133847,6 +134068,11 @@ declare module BABYLON {
|
|
private _cameraMesh;
|
|
private _cameraMesh;
|
|
private _cameraLinesMesh;
|
|
private _cameraLinesMesh;
|
|
private _material;
|
|
private _material;
|
|
|
|
+ private _pointerObserver;
|
|
|
|
+ /**
|
|
|
|
+ * Event that fires each time the gizmo is clicked
|
|
|
|
+ */
|
|
|
|
+ onClickedObservable: Observable<Camera>;
|
|
/**
|
|
/**
|
|
* Creates a CameraGizmo
|
|
* Creates a CameraGizmo
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
* @param gizmoLayer The utility layer the gizmo will be added to
|
|
@@ -137305,16 +137531,60 @@ 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 for loading KTX2 files
|
|
* Class for loading KTX2 files
|
|
- * !!! Experimental Extension Subject to Changes !!!
|
|
|
|
* @hidden
|
|
* @hidden
|
|
*/
|
|
*/
|
|
export class KhronosTextureContainer2 {
|
|
export class KhronosTextureContainer2 {
|
|
- private static _ModulePromise;
|
|
|
|
- private static _TranscodeFormat;
|
|
|
|
- constructor(engine: ThinEngine);
|
|
|
|
|
|
+ private static _WorkerPoolPromise?;
|
|
|
|
+ private static _Initialized;
|
|
|
|
+ private static _Ktx2Decoder;
|
|
|
|
+ /**
|
|
|
|
+ * URL to use when loading the KTX2 decoder module
|
|
|
|
+ */
|
|
|
|
+ static JSModuleURL: string;
|
|
|
|
+ /**
|
|
|
|
+ * Default number of workers used to handle data decoding
|
|
|
|
+ */
|
|
|
|
+ static DefaultNumWorkers: number;
|
|
|
|
+ private static GetDefaultNumWorkers;
|
|
|
|
+ private _engine;
|
|
|
|
+ private static _CreateWorkerPool;
|
|
|
|
+ /**
|
|
|
|
+ * Constructor
|
|
|
|
+ * @param numWorkers The number of workers for async operations. Specify `0` to disable web workers and run synchronously in the current context.
|
|
|
|
+ */
|
|
|
|
+ constructor(engine: ThinEngine, numWorkers?: number);
|
|
uploadAsync(data: ArrayBufferView, internalTexture: InternalTexture): Promise<void>;
|
|
uploadAsync(data: ArrayBufferView, internalTexture: InternalTexture): Promise<void>;
|
|
- private _determineTranscodeFormat;
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Stop all async operations and release resources.
|
|
|
|
+ */
|
|
|
|
+ dispose(): void;
|
|
|
|
+ protected _createTexture(data: any, internalTexture: InternalTexture): void;
|
|
/**
|
|
/**
|
|
* Checks if the given data starts with a KTX2 file identifier.
|
|
* Checks if the given data starts with a KTX2 file identifier.
|
|
* @param data the data to check
|
|
* @param data the data to check
|
|
@@ -137322,6 +137592,7 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
static IsValid(data: ArrayBufferView): boolean;
|
|
static IsValid(data: ArrayBufferView): boolean;
|
|
}
|
|
}
|
|
|
|
+ export function workerFunc(): void;
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/**
|
|
/**
|
|
@@ -141637,7 +141908,8 @@ declare module BABYLON {
|
|
* Class used to generate noise procedural textures
|
|
* Class used to generate noise procedural textures
|
|
*/
|
|
*/
|
|
export class NoiseProceduralTexture extends ProceduralTexture {
|
|
export class NoiseProceduralTexture extends ProceduralTexture {
|
|
- private _time;
|
|
|
|
|
|
+ /** Gets or sets the start time (default is 0) */
|
|
|
|
+ time: number;
|
|
/** Gets or sets a value between 0 and 1 indicating the overall brightness of the texture (default is 0.2) */
|
|
/** Gets or sets a value between 0 and 1 indicating the overall brightness of the texture (default is 0.2) */
|
|
brightness: number;
|
|
brightness: number;
|
|
/** Defines the number of octaves to process */
|
|
/** Defines the number of octaves to process */
|
|
@@ -144564,31 +144836,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 {
|
|
|
|
- /**
|
|
|
|
* Configuration for Draco compression
|
|
* Configuration for Draco compression
|
|
*/
|
|
*/
|
|
export interface IDracoCompressionConfiguration {
|
|
export interface IDracoCompressionConfiguration {
|
|
@@ -146287,6 +146534,14 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
thinInstanceBufferUpdated(kind: string): void;
|
|
thinInstanceBufferUpdated(kind: string): void;
|
|
/**
|
|
/**
|
|
|
|
+ * Applies a partial update to a buffer directly on the GPU
|
|
|
|
+ * Note that the buffer located on the CPU is NOT updated! It's up to you to update it (or not) with the same data you pass to this method
|
|
|
|
+ * @param kind name of the attribute to update. Use "matrix" to update the buffer of matrices
|
|
|
|
+ * @param data the data to set in the GPU buffer
|
|
|
|
+ * @param offset the offset in the GPU buffer where to update the data
|
|
|
|
+ */
|
|
|
|
+ thinInstancePartialBufferUpdate(kind: string, data: Float32Array, offset: number): void;
|
|
|
|
+ /**
|
|
* Refreshes the bounding info, taking into account all the thin instances defined
|
|
* Refreshes the bounding info, taking into account all the thin instances defined
|
|
* @param forceRefreshParentInfo true to force recomputing the mesh bounding info and use it to compute the aggregated bounding info
|
|
* @param forceRefreshParentInfo true to force recomputing the mesh bounding info and use it to compute the aggregated bounding info
|
|
*/
|
|
*/
|
|
@@ -154654,14 +154909,14 @@ declare module BABYLON {
|
|
/**
|
|
/**
|
|
* Hand-parts definition (key is HandPart)
|
|
* Hand-parts definition (key is HandPart)
|
|
*/
|
|
*/
|
|
- static HandPartsDefinition: {
|
|
|
|
|
|
+ handPartsDefinition: {
|
|
[key: string]: number[];
|
|
[key: string]: number[];
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
* Populate the HandPartsDefinition object.
|
|
* Populate the HandPartsDefinition object.
|
|
* This is called as a side effect since certain browsers don't have XRHand defined.
|
|
* This is called as a side effect since certain browsers don't have XRHand defined.
|
|
*/
|
|
*/
|
|
- static _PopulateHandPartsDefinition(): void;
|
|
|
|
|
|
+ private generateHandPartsDefinition;
|
|
/**
|
|
/**
|
|
* Construct a new hand object
|
|
* Construct a new hand object
|
|
* @param xrController the controller to which the hand correlates
|
|
* @param xrController the controller to which the hand correlates
|
|
@@ -155707,39 +155962,43 @@ interface XRJointPose extends XRPose {
|
|
radius: number | undefined;
|
|
radius: number | undefined;
|
|
}
|
|
}
|
|
|
|
|
|
-declare class XRHand extends Array<XRJointSpace> {
|
|
|
|
|
|
+interface XRHand /*extends Iterablele<XRJointSpace>*/ {
|
|
readonly length: number;
|
|
readonly length: number;
|
|
|
|
|
|
- static readonly WRIST = 0;
|
|
|
|
|
|
+ [index: number]: XRJointSpace;
|
|
|
|
+
|
|
|
|
+ // Specs have the function 'joint(idx: number)', but chrome doesn't support it yet.
|
|
|
|
+
|
|
|
|
+ readonly WRIST: number;
|
|
|
|
|
|
- static readonly THUMB_METACARPAL = 1;
|
|
|
|
- static readonly THUMB_PHALANX_PROXIMAL = 2;
|
|
|
|
- static readonly THUMB_PHALANX_DISTAL = 3;
|
|
|
|
- static readonly THUMB_PHALANX_TIP = 4;
|
|
|
|
|
|
+ readonly THUMB_METACARPAL: number;
|
|
|
|
+ readonly THUMB_PHALANX_PROXIMAL: number;
|
|
|
|
+ readonly THUMB_PHALANX_DISTAL: number;
|
|
|
|
+ readonly THUMB_PHALANX_TIP: number;
|
|
|
|
|
|
- static readonly INDEX_METACARPAL = 5;
|
|
|
|
- static readonly INDEX_PHALANX_PROXIMAL = 6;
|
|
|
|
- static readonly INDEX_PHALANX_INTERMEDIATE = 7;
|
|
|
|
- static readonly INDEX_PHALANX_DISTAL = 8;
|
|
|
|
- static readonly INDEX_PHALANX_TIP = 9;
|
|
|
|
|
|
+ readonly INDEX_METACARPAL: number;
|
|
|
|
+ readonly INDEX_PHALANX_PROXIMAL: number;
|
|
|
|
+ readonly INDEX_PHALANX_INTERMEDIATE: number;
|
|
|
|
+ readonly INDEX_PHALANX_DISTAL: number;
|
|
|
|
+ readonly INDEX_PHALANX_TIP: number;
|
|
|
|
|
|
- static readonly MIDDLE_METACARPAL = 10;
|
|
|
|
- static readonly MIDDLE_PHALANX_PROXIMAL = 11;
|
|
|
|
- static readonly MIDDLE_PHALANX_INTERMEDIATE = 12;
|
|
|
|
- static readonly MIDDLE_PHALANX_DISTAL = 13;
|
|
|
|
- static readonly MIDDLE_PHALANX_TIP = 14;
|
|
|
|
|
|
+ readonly MIDDLE_METACARPAL: number;
|
|
|
|
+ readonly MIDDLE_PHALANX_PROXIMAL: number;
|
|
|
|
+ readonly MIDDLE_PHALANX_INTERMEDIATE: number;
|
|
|
|
+ readonly MIDDLE_PHALANX_DISTAL: number;
|
|
|
|
+ readonly MIDDLE_PHALANX_TIP: number;
|
|
|
|
|
|
- static readonly RING_METACARPAL = 15;
|
|
|
|
- static readonly RING_PHALANX_PROXIMAL = 16;
|
|
|
|
- static readonly RING_PHALANX_INTERMEDIATE = 17;
|
|
|
|
- static readonly RING_PHALANX_DISTAL = 18;
|
|
|
|
- static readonly RING_PHALANX_TIP = 19;
|
|
|
|
|
|
+ readonly RING_METACARPAL: number;
|
|
|
|
+ readonly RING_PHALANX_PROXIMAL: number;
|
|
|
|
+ readonly RING_PHALANX_INTERMEDIATE: number;
|
|
|
|
+ readonly RING_PHALANX_DISTAL: number;
|
|
|
|
+ readonly RING_PHALANX_TIP: number;
|
|
|
|
|
|
- static readonly LITTLE_METACARPAL = 20;
|
|
|
|
- static readonly LITTLE_PHALANX_PROXIMAL = 21;
|
|
|
|
- static readonly LITTLE_PHALANX_INTERMEDIATE = 22;
|
|
|
|
- static readonly LITTLE_PHALANX_DISTAL = 23;
|
|
|
|
- static readonly LITTLE_PHALANX_TIP = 24;
|
|
|
|
|
|
+ readonly LITTLE_METACARPAL: number;
|
|
|
|
+ readonly LITTLE_PHALANX_PROXIMAL: number;
|
|
|
|
+ readonly LITTLE_PHALANX_INTERMEDIATE: number;
|
|
|
|
+ readonly LITTLE_PHALANX_DISTAL: number;
|
|
|
|
+ readonly LITTLE_PHALANX_TIP: number;
|
|
}
|
|
}
|
|
|
|
|
|
// This file contains native only extensions for WebXR These APIs are not supported in the browser yet.
|
|
// This file contains native only extensions for WebXR These APIs are not supported in the browser yet.
|