|
@@ -8486,7 +8486,11 @@ declare module "babylonjs/Cameras/targetCamera" {
|
|
_isSynchronizedViewMatrix(): boolean;
|
|
_isSynchronizedViewMatrix(): boolean;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_computeLocalCameraSpeed(): number;
|
|
_computeLocalCameraSpeed(): number;
|
|
- /** @hidden */
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Defines the target the camera should look at.
|
|
|
|
+ * This will automatically adapt alpha beta and radius to fit within the new target.
|
|
|
|
+ * @param target Defines the new target as a Vector or a mesh
|
|
|
|
+ */
|
|
setTarget(target: Vector3): void;
|
|
setTarget(target: Vector3): void;
|
|
/**
|
|
/**
|
|
* Return the current target position of the camera. This value is expressed in local space.
|
|
* Return the current target position of the camera. This value is expressed in local space.
|
|
@@ -10338,6 +10342,7 @@ declare module "babylonjs/Lights/light" {
|
|
declare module "babylonjs/Actions/action" {
|
|
declare module "babylonjs/Actions/action" {
|
|
import { Observable } from "babylonjs/Misc/observable";
|
|
import { Observable } from "babylonjs/Misc/observable";
|
|
import { Condition } from "babylonjs/Actions/condition";
|
|
import { Condition } from "babylonjs/Actions/condition";
|
|
|
|
+ import { AbstractActionManager } from "babylonjs/Actions/abstractActionManager";
|
|
import { ActionManager } from "babylonjs/Actions/actionManager";
|
|
import { ActionManager } from "babylonjs/Actions/actionManager";
|
|
import { ActionEvent } from "babylonjs/Actions/actionEvent";
|
|
import { ActionEvent } from "babylonjs/Actions/actionEvent";
|
|
/**
|
|
/**
|
|
@@ -10366,6 +10371,16 @@ declare module "babylonjs/Actions/action" {
|
|
* @returns the serialized object
|
|
* @returns the serialized object
|
|
*/
|
|
*/
|
|
serialize(parent: any): any;
|
|
serialize(parent: any): any;
|
|
|
|
+ /**
|
|
|
|
+ * Internal only
|
|
|
|
+ * @hidden
|
|
|
|
+ */
|
|
|
|
+ _prepare(): void;
|
|
|
|
+ /**
|
|
|
|
+ * Internal only - manager for action
|
|
|
|
+ * @hidden
|
|
|
|
+ */
|
|
|
|
+ _actionManager: AbstractActionManager;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* The action to be carried out following a trigger
|
|
* The action to be carried out following a trigger
|
|
@@ -10995,7 +11010,7 @@ declare module "babylonjs/Actions/actionManager" {
|
|
import { Nullable } from "babylonjs/types";
|
|
import { Nullable } from "babylonjs/types";
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
import { Scene } from "babylonjs/scene";
|
|
import { Scene } from "babylonjs/scene";
|
|
- import { Action } from "babylonjs/Actions/action";
|
|
|
|
|
|
+ import { IAction } from "babylonjs/Actions/action";
|
|
import { IActionEvent } from "babylonjs/Actions/actionEvent";
|
|
import { IActionEvent } from "babylonjs/Actions/actionEvent";
|
|
import { AbstractActionManager } from "babylonjs/Actions/abstractActionManager";
|
|
import { AbstractActionManager } from "babylonjs/Actions/abstractActionManager";
|
|
/**
|
|
/**
|
|
@@ -11139,13 +11154,13 @@ declare module "babylonjs/Actions/actionManager" {
|
|
* @param action defines the action to be registered
|
|
* @param action defines the action to be registered
|
|
* @return the action amended (prepared) after registration
|
|
* @return the action amended (prepared) after registration
|
|
*/
|
|
*/
|
|
- registerAction(action: Action): Nullable<Action>;
|
|
|
|
|
|
+ registerAction(action: IAction): Nullable<IAction>;
|
|
/**
|
|
/**
|
|
* Unregisters an action to this action manager
|
|
* Unregisters an action to this action manager
|
|
* @param action defines the action to be unregistered
|
|
* @param action defines the action to be unregistered
|
|
* @return a boolean indicating whether the action has been unregistered
|
|
* @return a boolean indicating whether the action has been unregistered
|
|
*/
|
|
*/
|
|
- unregisterAction(action: Action): Boolean;
|
|
|
|
|
|
+ unregisterAction(action: IAction): Boolean;
|
|
/**
|
|
/**
|
|
* Process a specific trigger
|
|
* Process a specific trigger
|
|
* @param trigger defines the trigger to process
|
|
* @param trigger defines the trigger to process
|
|
@@ -11336,6 +11351,10 @@ declare module "babylonjs/Culling/ray" {
|
|
*/
|
|
*/
|
|
unprojectRayToRef(sourceX: float, sourceY: float, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, view: DeepImmutable<Matrix>, projection: DeepImmutable<Matrix>): void;
|
|
unprojectRayToRef(sourceX: float, sourceY: float, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, view: DeepImmutable<Matrix>, projection: DeepImmutable<Matrix>): void;
|
|
}
|
|
}
|
|
|
|
+ /**
|
|
|
|
+ * Type used to define predicate used to select faces when a mesh intersection is detected
|
|
|
|
+ */
|
|
|
|
+ export type TrianglePickingPredicate = (p0: Vector3, p1: Vector3, p2: Vector3, ray: Ray) => boolean;
|
|
module "babylonjs/scene" {
|
|
module "babylonjs/scene" {
|
|
interface Scene {
|
|
interface Scene {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
@@ -11345,9 +11364,9 @@ declare module "babylonjs/Culling/ray" {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_pickWithRayInverseMatrix: Matrix;
|
|
_pickWithRayInverseMatrix: Matrix;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _internalPick(rayFunction: (world: Matrix) => Ray, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean): Nullable<PickingInfo>;
|
|
|
|
|
|
+ _internalPick(rayFunction: (world: Matrix) => Ray, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate): Nullable<PickingInfo>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _internalMultiPick(rayFunction: (world: Matrix) => Ray, predicate?: (mesh: AbstractMesh) => boolean): Nullable<PickingInfo[]>;
|
|
|
|
|
|
+ _internalMultiPick(rayFunction: (world: Matrix) => Ray, predicate?: (mesh: AbstractMesh) => boolean, trianglePredicate?: TrianglePickingPredicate): Nullable<PickingInfo[]>;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -14280,6 +14299,10 @@ declare module "babylonjs/Particles/baseParticleSystem" {
|
|
*/
|
|
*/
|
|
beginAnimationLoop: boolean;
|
|
beginAnimationLoop: boolean;
|
|
/**
|
|
/**
|
|
|
|
+ * Gets or sets a world offset applied to all particles
|
|
|
|
+ */
|
|
|
|
+ worldOffset: Vector3;
|
|
|
|
+ /**
|
|
* Gets or sets whether an animation sprite sheet is enabled or not on the particle system
|
|
* Gets or sets whether an animation sprite sheet is enabled or not on the particle system
|
|
*/
|
|
*/
|
|
isAnimationSheetEnabled: boolean;
|
|
isAnimationSheetEnabled: boolean;
|
|
@@ -22045,6 +22068,7 @@ declare module "babylonjs/Meshes/subMesh" {
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
|
|
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
import { Mesh } from "babylonjs/Meshes/mesh";
|
|
import { Ray } from "babylonjs/Culling/ray";
|
|
import { Ray } from "babylonjs/Culling/ray";
|
|
|
|
+ import { TrianglePickingPredicate } from "babylonjs/Culling/ray";
|
|
/**
|
|
/**
|
|
* Base class for submeshes
|
|
* Base class for submeshes
|
|
*/
|
|
*/
|
|
@@ -22212,9 +22236,10 @@ declare module "babylonjs/Meshes/subMesh" {
|
|
* @param positions defines mesh's positions array
|
|
* @param positions defines mesh's positions array
|
|
* @param indices defines mesh's indices array
|
|
* @param indices defines mesh's indices array
|
|
* @param fastCheck defines if only bounding info should be used
|
|
* @param fastCheck defines if only bounding info should be used
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns intersection info or null if no intersection
|
|
* @returns intersection info or null if no intersection
|
|
*/
|
|
*/
|
|
- intersects(ray: Ray, positions: Vector3[], indices: IndicesArray, fastCheck?: boolean): Nullable<IntersectionInfo>;
|
|
|
|
|
|
+ intersects(ray: Ray, positions: Vector3[], indices: IndicesArray, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate): Nullable<IntersectionInfo>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
private _intersectLines;
|
|
private _intersectLines;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
@@ -23800,6 +23825,7 @@ declare module "babylonjs/Meshes/abstractMesh" {
|
|
import { AbstractActionManager } from "babylonjs/Actions/abstractActionManager";
|
|
import { AbstractActionManager } from "babylonjs/Actions/abstractActionManager";
|
|
import { Ray } from "babylonjs/Culling/ray";
|
|
import { Ray } from "babylonjs/Culling/ray";
|
|
import { Collider } from "babylonjs/Collisions/collider";
|
|
import { Collider } from "babylonjs/Collisions/collider";
|
|
|
|
+ import { TrianglePickingPredicate } from "babylonjs/Culling/ray";
|
|
/**
|
|
/**
|
|
* Class used to store all common mesh properties
|
|
* Class used to store all common mesh properties
|
|
*/
|
|
*/
|
|
@@ -24382,10 +24408,11 @@ declare module "babylonjs/Meshes/abstractMesh" {
|
|
* Checks if the passed Ray intersects with the mesh
|
|
* Checks if the passed Ray intersects with the mesh
|
|
* @param ray defines the ray to use
|
|
* @param ray defines the ray to use
|
|
* @param fastCheck defines if fast mode (but less precise) must be used (false by default)
|
|
* @param fastCheck defines if fast mode (but less precise) must be used (false by default)
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns the picking info
|
|
* @returns the picking info
|
|
* @see http://doc.babylonjs.com/babylon101/intersect_collisions_-_mesh
|
|
* @see http://doc.babylonjs.com/babylon101/intersect_collisions_-_mesh
|
|
*/
|
|
*/
|
|
- intersects(ray: Ray, fastCheck?: boolean): PickingInfo;
|
|
|
|
|
|
+ intersects(ray: Ray, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate): PickingInfo;
|
|
/**
|
|
/**
|
|
* Clones the current mesh
|
|
* Clones the current mesh
|
|
* @param name defines the mesh name
|
|
* @param name defines the mesh name
|
|
@@ -24647,6 +24674,7 @@ declare module "babylonjs/Actions/abstractActionManager" {
|
|
import { IDisposable } from "babylonjs/scene";
|
|
import { IDisposable } from "babylonjs/scene";
|
|
import { IActionEvent } from "babylonjs/Actions/actionEvent";
|
|
import { IActionEvent } from "babylonjs/Actions/actionEvent";
|
|
import { IAction } from "babylonjs/Actions/action";
|
|
import { IAction } from "babylonjs/Actions/action";
|
|
|
|
+ import { Nullable } from "babylonjs/types";
|
|
/**
|
|
/**
|
|
* Abstract class used to decouple action Manager from scene and meshes.
|
|
* Abstract class used to decouple action Manager from scene and meshes.
|
|
* Do not instantiate.
|
|
* Do not instantiate.
|
|
@@ -24705,12 +24733,24 @@ declare module "babylonjs/Actions/abstractActionManager" {
|
|
*/
|
|
*/
|
|
abstract hasSpecificTrigger(trigger: number, parameterPredicate?: (parameter: any) => boolean): boolean;
|
|
abstract hasSpecificTrigger(trigger: number, parameterPredicate?: (parameter: any) => boolean): boolean;
|
|
/**
|
|
/**
|
|
- * Serialize this manager to a JSON object
|
|
|
|
- * @param name defines the property name to store this manager
|
|
|
|
- * @returns a JSON representation of this manager
|
|
|
|
- */
|
|
|
|
|
|
+ * Serialize this manager to a JSON object
|
|
|
|
+ * @param name defines the property name to store this manager
|
|
|
|
+ * @returns a JSON representation of this manager
|
|
|
|
+ */
|
|
abstract serialize(name: string): any;
|
|
abstract serialize(name: string): any;
|
|
/**
|
|
/**
|
|
|
|
+ * Registers an action to this action manager
|
|
|
|
+ * @param action defines the action to be registered
|
|
|
|
+ * @return the action amended (prepared) after registration
|
|
|
|
+ */
|
|
|
|
+ abstract registerAction(action: IAction): Nullable<IAction>;
|
|
|
|
+ /**
|
|
|
|
+ * Unregisters an action to this action manager
|
|
|
|
+ * @param action defines the action to be unregistered
|
|
|
|
+ * @return a boolean indicating whether the action has been unregistered
|
|
|
|
+ */
|
|
|
|
+ abstract unregisterAction(action: IAction): Boolean;
|
|
|
|
+ /**
|
|
* Does exist one action manager with at least one trigger
|
|
* Does exist one action manager with at least one trigger
|
|
**/
|
|
**/
|
|
static readonly HasTriggers: boolean;
|
|
static readonly HasTriggers: boolean;
|
|
@@ -31712,6 +31752,7 @@ declare module "babylonjs/scene" {
|
|
import { MorphTarget } from "babylonjs/Morph/morphTarget";
|
|
import { MorphTarget } from "babylonjs/Morph/morphTarget";
|
|
import { AbstractActionManager } from "babylonjs/Actions/abstractActionManager";
|
|
import { AbstractActionManager } from "babylonjs/Actions/abstractActionManager";
|
|
import { Ray } from "babylonjs/Culling/ray";
|
|
import { Ray } from "babylonjs/Culling/ray";
|
|
|
|
+ import { TrianglePickingPredicate } from "babylonjs/Culling/ray";
|
|
import { Animation } from "babylonjs/Animations/animation";
|
|
import { Animation } from "babylonjs/Animations/animation";
|
|
import { Animatable } from "babylonjs/Animations/animatable";
|
|
import { Animatable } from "babylonjs/Animations/animatable";
|
|
import { AnimationGroup } from "babylonjs/Animations/animationGroup";
|
|
import { AnimationGroup } from "babylonjs/Animations/animationGroup";
|
|
@@ -33411,32 +33452,36 @@ declare module "babylonjs/scene" {
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
* @param fastCheck Launch a fast check only using the bounding boxes. Can be set to null.
|
|
* @param fastCheck Launch a fast check only using the bounding boxes. Can be set to null.
|
|
* @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
|
|
* @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns a PickingInfo
|
|
* @returns a PickingInfo
|
|
*/
|
|
*/
|
|
- pick(x: number, y: number, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean, camera?: Nullable<Camera>): Nullable<PickingInfo>;
|
|
|
|
|
|
+ pick(x: number, y: number, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean, camera?: Nullable<Camera>, trianglePredicate?: (p0: Vector3, p1: Vector3, p2: Vector3) => boolean): Nullable<PickingInfo>;
|
|
/** Use the given ray to pick a mesh in the scene
|
|
/** Use the given ray to pick a mesh in the scene
|
|
* @param ray The ray to use to pick meshes
|
|
* @param ray The ray to use to pick meshes
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must have isPickable set to true
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must have isPickable set to true
|
|
* @param fastCheck Launch a fast check only using the bounding boxes. Can be set to null
|
|
* @param fastCheck Launch a fast check only using the bounding boxes. Can be set to null
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns a PickingInfo
|
|
* @returns a PickingInfo
|
|
*/
|
|
*/
|
|
- pickWithRay(ray: Ray, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean): Nullable<PickingInfo>;
|
|
|
|
|
|
+ pickWithRay(ray: Ray, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate): Nullable<PickingInfo>;
|
|
/**
|
|
/**
|
|
* Launch a ray to try to pick a mesh in the scene
|
|
* Launch a ray to try to pick a mesh in the scene
|
|
* @param x X position on screen
|
|
* @param x X position on screen
|
|
* @param y Y position on screen
|
|
* @param y Y position on screen
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
* @param camera camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
|
|
* @param camera camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns an array of PickingInfo
|
|
* @returns an array of PickingInfo
|
|
*/
|
|
*/
|
|
- multiPick(x: number, y: number, predicate?: (mesh: AbstractMesh) => boolean, camera?: Camera): Nullable<PickingInfo[]>;
|
|
|
|
|
|
+ multiPick(x: number, y: number, predicate?: (mesh: AbstractMesh) => boolean, camera?: Camera, trianglePredicate?: TrianglePickingPredicate): Nullable<PickingInfo[]>;
|
|
/**
|
|
/**
|
|
* Launch a ray to try to pick a mesh in the scene
|
|
* Launch a ray to try to pick a mesh in the scene
|
|
* @param ray Ray to use
|
|
* @param ray Ray to use
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns an array of PickingInfo
|
|
* @returns an array of PickingInfo
|
|
*/
|
|
*/
|
|
- multiPickWithRay(ray: Ray, predicate: (mesh: AbstractMesh) => boolean): Nullable<PickingInfo[]>;
|
|
|
|
|
|
+ multiPickWithRay(ray: Ray, predicate: (mesh: AbstractMesh) => boolean, trianglePredicate?: TrianglePickingPredicate): Nullable<PickingInfo[]>;
|
|
/**
|
|
/**
|
|
* Force the value of meshUnderPointer
|
|
* Force the value of meshUnderPointer
|
|
* @param mesh defines the mesh to use
|
|
* @param mesh defines the mesh to use
|
|
@@ -44613,6 +44658,13 @@ declare module "babylonjs/Shaders/ShadersInclude/pbrLightingFunctions" {
|
|
shader: string;
|
|
shader: string;
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
+declare module "babylonjs/Shaders/ShadersInclude/pbrDebug" {
|
|
|
|
+ /** @hidden */
|
|
|
|
+ export var pbrDebug: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
declare module "babylonjs/Shaders/pbr.fragment" {
|
|
declare module "babylonjs/Shaders/pbr.fragment" {
|
|
import "babylonjs/Shaders/ShadersInclude/pbrFragmentDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/pbrFragmentDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/pbrUboDeclaration";
|
|
import "babylonjs/Shaders/ShadersInclude/pbrUboDeclaration";
|
|
@@ -44638,6 +44690,7 @@ declare module "babylonjs/Shaders/pbr.fragment" {
|
|
import "babylonjs/Shaders/ShadersInclude/lightFragment";
|
|
import "babylonjs/Shaders/ShadersInclude/lightFragment";
|
|
import "babylonjs/Shaders/ShadersInclude/logDepthFragment";
|
|
import "babylonjs/Shaders/ShadersInclude/logDepthFragment";
|
|
import "babylonjs/Shaders/ShadersInclude/fogFragment";
|
|
import "babylonjs/Shaders/ShadersInclude/fogFragment";
|
|
|
|
+ import "babylonjs/Shaders/ShadersInclude/pbrDebug";
|
|
/** @hidden */
|
|
/** @hidden */
|
|
export var pbrPixelShader: {
|
|
export var pbrPixelShader: {
|
|
name: string;
|
|
name: string;
|
|
@@ -45040,6 +45093,30 @@ declare module "babylonjs/Materials/PBR/pbrBaseMaterial" {
|
|
* If set to true, no lighting calculations will be applied.
|
|
* If set to true, no lighting calculations will be applied.
|
|
*/
|
|
*/
|
|
private _unlit;
|
|
private _unlit;
|
|
|
|
+ private _debugMode;
|
|
|
|
+ /**
|
|
|
|
+ * @hidden
|
|
|
|
+ * This is reserved for the inspector.
|
|
|
|
+ * Defines the material debug mode.
|
|
|
|
+ * It helps seeing only some components of the material while troubleshooting.
|
|
|
|
+ */
|
|
|
|
+ debugMode: number;
|
|
|
|
+ /**
|
|
|
|
+ * @hidden
|
|
|
|
+ * This is reserved for the inspector.
|
|
|
|
+ * Specify from where on screen the debug mode should start.
|
|
|
|
+ * The value goes from -1 (full screen) to 1 (not visible)
|
|
|
|
+ * It helps with side by side comparison against the final render
|
|
|
|
+ * This defaults to -1
|
|
|
|
+ */
|
|
|
|
+ private debugLimit;
|
|
|
|
+ /**
|
|
|
|
+ * @hidden
|
|
|
|
+ * This is reserved for the inspector.
|
|
|
|
+ * As the default viewing range might not be enough (if the ambient is really small for instance)
|
|
|
|
+ * You can use the factor to better multiply the final value.
|
|
|
|
+ */
|
|
|
|
+ private debugFactor;
|
|
/**
|
|
/**
|
|
* Defines the clear coat layer parameters for the material.
|
|
* Defines the clear coat layer parameters for the material.
|
|
*/
|
|
*/
|
|
@@ -56810,7 +56887,9 @@ declare module "babylonjs/Animations/pathCursor" {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module "babylonjs/Legacy/legacy" {
|
|
declare module "babylonjs/Legacy/legacy" {
|
|
|
|
+ import * as Babylon from "babylonjs/index";
|
|
export * from "babylonjs/index";
|
|
export * from "babylonjs/index";
|
|
|
|
+
|
|
}
|
|
}
|
|
declare module "babylonjs/Shaders/blur.fragment" {
|
|
declare module "babylonjs/Shaders/blur.fragment" {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
@@ -65824,7 +65903,11 @@ declare module BABYLON {
|
|
_isSynchronizedViewMatrix(): boolean;
|
|
_isSynchronizedViewMatrix(): boolean;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_computeLocalCameraSpeed(): number;
|
|
_computeLocalCameraSpeed(): number;
|
|
- /** @hidden */
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Defines the target the camera should look at.
|
|
|
|
+ * This will automatically adapt alpha beta and radius to fit within the new target.
|
|
|
|
+ * @param target Defines the new target as a Vector or a mesh
|
|
|
|
+ */
|
|
setTarget(target: Vector3): void;
|
|
setTarget(target: Vector3): void;
|
|
/**
|
|
/**
|
|
* Return the current target position of the camera. This value is expressed in local space.
|
|
* Return the current target position of the camera. This value is expressed in local space.
|
|
@@ -67640,6 +67723,16 @@ declare module BABYLON {
|
|
* @returns the serialized object
|
|
* @returns the serialized object
|
|
*/
|
|
*/
|
|
serialize(parent: any): any;
|
|
serialize(parent: any): any;
|
|
|
|
+ /**
|
|
|
|
+ * Internal only
|
|
|
|
+ * @hidden
|
|
|
|
+ */
|
|
|
|
+ _prepare(): void;
|
|
|
|
+ /**
|
|
|
|
+ * Internal only - manager for action
|
|
|
|
+ * @hidden
|
|
|
|
+ */
|
|
|
|
+ _actionManager: AbstractActionManager;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* The action to be carried out following a trigger
|
|
* The action to be carried out following a trigger
|
|
@@ -68403,13 +68496,13 @@ declare module BABYLON {
|
|
* @param action defines the action to be registered
|
|
* @param action defines the action to be registered
|
|
* @return the action amended (prepared) after registration
|
|
* @return the action amended (prepared) after registration
|
|
*/
|
|
*/
|
|
- registerAction(action: Action): Nullable<Action>;
|
|
|
|
|
|
+ registerAction(action: IAction): Nullable<IAction>;
|
|
/**
|
|
/**
|
|
* Unregisters an action to this action manager
|
|
* Unregisters an action to this action manager
|
|
* @param action defines the action to be unregistered
|
|
* @param action defines the action to be unregistered
|
|
* @return a boolean indicating whether the action has been unregistered
|
|
* @return a boolean indicating whether the action has been unregistered
|
|
*/
|
|
*/
|
|
- unregisterAction(action: Action): Boolean;
|
|
|
|
|
|
+ unregisterAction(action: IAction): Boolean;
|
|
/**
|
|
/**
|
|
* Process a specific trigger
|
|
* Process a specific trigger
|
|
* @param trigger defines the trigger to process
|
|
* @param trigger defines the trigger to process
|
|
@@ -68593,6 +68686,10 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
unprojectRayToRef(sourceX: float, sourceY: float, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, view: DeepImmutable<Matrix>, projection: DeepImmutable<Matrix>): void;
|
|
unprojectRayToRef(sourceX: float, sourceY: float, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, view: DeepImmutable<Matrix>, projection: DeepImmutable<Matrix>): void;
|
|
}
|
|
}
|
|
|
|
+ /**
|
|
|
|
+ * Type used to define predicate used to select faces when a mesh intersection is detected
|
|
|
|
+ */
|
|
|
|
+ export type TrianglePickingPredicate = (p0: Vector3, p1: Vector3, p2: Vector3, ray: Ray) => boolean;
|
|
interface Scene {
|
|
interface Scene {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_tempPickingRay: Nullable<Ray>;
|
|
_tempPickingRay: Nullable<Ray>;
|
|
@@ -68601,9 +68698,9 @@ declare module BABYLON {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
_pickWithRayInverseMatrix: Matrix;
|
|
_pickWithRayInverseMatrix: Matrix;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _internalPick(rayFunction: (world: Matrix) => Ray, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean): Nullable<PickingInfo>;
|
|
|
|
|
|
+ _internalPick(rayFunction: (world: Matrix) => Ray, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate): Nullable<PickingInfo>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
- _internalMultiPick(rayFunction: (world: Matrix) => Ray, predicate?: (mesh: AbstractMesh) => boolean): Nullable<PickingInfo[]>;
|
|
|
|
|
|
+ _internalMultiPick(rayFunction: (world: Matrix) => Ray, predicate?: (mesh: AbstractMesh) => boolean, trianglePredicate?: TrianglePickingPredicate): Nullable<PickingInfo[]>;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -71395,6 +71492,10 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
beginAnimationLoop: boolean;
|
|
beginAnimationLoop: boolean;
|
|
/**
|
|
/**
|
|
|
|
+ * Gets or sets a world offset applied to all particles
|
|
|
|
+ */
|
|
|
|
+ worldOffset: Vector3;
|
|
|
|
+ /**
|
|
* Gets or sets whether an animation sprite sheet is enabled or not on the particle system
|
|
* Gets or sets whether an animation sprite sheet is enabled or not on the particle system
|
|
*/
|
|
*/
|
|
isAnimationSheetEnabled: boolean;
|
|
isAnimationSheetEnabled: boolean;
|
|
@@ -79067,9 +79168,10 @@ declare module BABYLON {
|
|
* @param positions defines mesh's positions array
|
|
* @param positions defines mesh's positions array
|
|
* @param indices defines mesh's indices array
|
|
* @param indices defines mesh's indices array
|
|
* @param fastCheck defines if only bounding info should be used
|
|
* @param fastCheck defines if only bounding info should be used
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns intersection info or null if no intersection
|
|
* @returns intersection info or null if no intersection
|
|
*/
|
|
*/
|
|
- intersects(ray: Ray, positions: Vector3[], indices: IndicesArray, fastCheck?: boolean): Nullable<IntersectionInfo>;
|
|
|
|
|
|
+ intersects(ray: Ray, positions: Vector3[], indices: IndicesArray, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate): Nullable<IntersectionInfo>;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
private _intersectLines;
|
|
private _intersectLines;
|
|
/** @hidden */
|
|
/** @hidden */
|
|
@@ -81191,10 +81293,11 @@ declare module BABYLON {
|
|
* Checks if the passed Ray intersects with the mesh
|
|
* Checks if the passed Ray intersects with the mesh
|
|
* @param ray defines the ray to use
|
|
* @param ray defines the ray to use
|
|
* @param fastCheck defines if fast mode (but less precise) must be used (false by default)
|
|
* @param fastCheck defines if fast mode (but less precise) must be used (false by default)
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns the picking info
|
|
* @returns the picking info
|
|
* @see http://doc.babylonjs.com/babylon101/intersect_collisions_-_mesh
|
|
* @see http://doc.babylonjs.com/babylon101/intersect_collisions_-_mesh
|
|
*/
|
|
*/
|
|
- intersects(ray: Ray, fastCheck?: boolean): PickingInfo;
|
|
|
|
|
|
+ intersects(ray: Ray, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate): PickingInfo;
|
|
/**
|
|
/**
|
|
* Clones the current mesh
|
|
* Clones the current mesh
|
|
* @param name defines the mesh name
|
|
* @param name defines the mesh name
|
|
@@ -81506,12 +81609,24 @@ declare module BABYLON {
|
|
*/
|
|
*/
|
|
abstract hasSpecificTrigger(trigger: number, parameterPredicate?: (parameter: any) => boolean): boolean;
|
|
abstract hasSpecificTrigger(trigger: number, parameterPredicate?: (parameter: any) => boolean): boolean;
|
|
/**
|
|
/**
|
|
- * Serialize this manager to a JSON object
|
|
|
|
- * @param name defines the property name to store this manager
|
|
|
|
- * @returns a JSON representation of this manager
|
|
|
|
- */
|
|
|
|
|
|
+ * Serialize this manager to a JSON object
|
|
|
|
+ * @param name defines the property name to store this manager
|
|
|
|
+ * @returns a JSON representation of this manager
|
|
|
|
+ */
|
|
abstract serialize(name: string): any;
|
|
abstract serialize(name: string): any;
|
|
/**
|
|
/**
|
|
|
|
+ * Registers an action to this action manager
|
|
|
|
+ * @param action defines the action to be registered
|
|
|
|
+ * @return the action amended (prepared) after registration
|
|
|
|
+ */
|
|
|
|
+ abstract registerAction(action: IAction): Nullable<IAction>;
|
|
|
|
+ /**
|
|
|
|
+ * Unregisters an action to this action manager
|
|
|
|
+ * @param action defines the action to be unregistered
|
|
|
|
+ * @return a boolean indicating whether the action has been unregistered
|
|
|
|
+ */
|
|
|
|
+ abstract unregisterAction(action: IAction): Boolean;
|
|
|
|
+ /**
|
|
* Does exist one action manager with at least one trigger
|
|
* Does exist one action manager with at least one trigger
|
|
**/
|
|
**/
|
|
static readonly HasTriggers: boolean;
|
|
static readonly HasTriggers: boolean;
|
|
@@ -90043,32 +90158,36 @@ declare module BABYLON {
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
* @param fastCheck Launch a fast check only using the bounding boxes. Can be set to null.
|
|
* @param fastCheck Launch a fast check only using the bounding boxes. Can be set to null.
|
|
* @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
|
|
* @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns a PickingInfo
|
|
* @returns a PickingInfo
|
|
*/
|
|
*/
|
|
- pick(x: number, y: number, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean, camera?: Nullable<Camera>): Nullable<PickingInfo>;
|
|
|
|
|
|
+ pick(x: number, y: number, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean, camera?: Nullable<Camera>, trianglePredicate?: (p0: Vector3, p1: Vector3, p2: Vector3) => boolean): Nullable<PickingInfo>;
|
|
/** Use the given ray to pick a mesh in the scene
|
|
/** Use the given ray to pick a mesh in the scene
|
|
* @param ray The ray to use to pick meshes
|
|
* @param ray The ray to use to pick meshes
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must have isPickable set to true
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must have isPickable set to true
|
|
* @param fastCheck Launch a fast check only using the bounding boxes. Can be set to null
|
|
* @param fastCheck Launch a fast check only using the bounding boxes. Can be set to null
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns a PickingInfo
|
|
* @returns a PickingInfo
|
|
*/
|
|
*/
|
|
- pickWithRay(ray: Ray, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean): Nullable<PickingInfo>;
|
|
|
|
|
|
+ pickWithRay(ray: Ray, predicate?: (mesh: AbstractMesh) => boolean, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate): Nullable<PickingInfo>;
|
|
/**
|
|
/**
|
|
* Launch a ray to try to pick a mesh in the scene
|
|
* Launch a ray to try to pick a mesh in the scene
|
|
* @param x X position on screen
|
|
* @param x X position on screen
|
|
* @param y Y position on screen
|
|
* @param y Y position on screen
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
* @param camera camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
|
|
* @param camera camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns an array of PickingInfo
|
|
* @returns an array of PickingInfo
|
|
*/
|
|
*/
|
|
- multiPick(x: number, y: number, predicate?: (mesh: AbstractMesh) => boolean, camera?: Camera): Nullable<PickingInfo[]>;
|
|
|
|
|
|
+ multiPick(x: number, y: number, predicate?: (mesh: AbstractMesh) => boolean, camera?: Camera, trianglePredicate?: TrianglePickingPredicate): Nullable<PickingInfo[]>;
|
|
/**
|
|
/**
|
|
* Launch a ray to try to pick a mesh in the scene
|
|
* Launch a ray to try to pick a mesh in the scene
|
|
* @param ray Ray to use
|
|
* @param ray Ray to use
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
* @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true
|
|
|
|
+ * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
|
|
* @returns an array of PickingInfo
|
|
* @returns an array of PickingInfo
|
|
*/
|
|
*/
|
|
- multiPickWithRay(ray: Ray, predicate: (mesh: AbstractMesh) => boolean): Nullable<PickingInfo[]>;
|
|
|
|
|
|
+ multiPickWithRay(ray: Ray, predicate: (mesh: AbstractMesh) => boolean, trianglePredicate?: TrianglePickingPredicate): Nullable<PickingInfo[]>;
|
|
/**
|
|
/**
|
|
* Force the value of meshUnderPointer
|
|
* Force the value of meshUnderPointer
|
|
* @param mesh defines the mesh to use
|
|
* @param mesh defines the mesh to use
|
|
@@ -100371,6 +100490,13 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
/** @hidden */
|
|
/** @hidden */
|
|
|
|
+ export var pbrDebug: {
|
|
|
|
+ name: string;
|
|
|
|
+ shader: string;
|
|
|
|
+ };
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
|
|
+ /** @hidden */
|
|
export var pbrPixelShader: {
|
|
export var pbrPixelShader: {
|
|
name: string;
|
|
name: string;
|
|
shader: string;
|
|
shader: string;
|
|
@@ -100734,6 +100860,30 @@ declare module BABYLON {
|
|
* If set to true, no lighting calculations will be applied.
|
|
* If set to true, no lighting calculations will be applied.
|
|
*/
|
|
*/
|
|
private _unlit;
|
|
private _unlit;
|
|
|
|
+ private _debugMode;
|
|
|
|
+ /**
|
|
|
|
+ * @hidden
|
|
|
|
+ * This is reserved for the inspector.
|
|
|
|
+ * Defines the material debug mode.
|
|
|
|
+ * It helps seeing only some components of the material while troubleshooting.
|
|
|
|
+ */
|
|
|
|
+ debugMode: number;
|
|
|
|
+ /**
|
|
|
|
+ * @hidden
|
|
|
|
+ * This is reserved for the inspector.
|
|
|
|
+ * Specify from where on screen the debug mode should start.
|
|
|
|
+ * The value goes from -1 (full screen) to 1 (not visible)
|
|
|
|
+ * It helps with side by side comparison against the final render
|
|
|
|
+ * This defaults to -1
|
|
|
|
+ */
|
|
|
|
+ private debugLimit;
|
|
|
|
+ /**
|
|
|
|
+ * @hidden
|
|
|
|
+ * This is reserved for the inspector.
|
|
|
|
+ * As the default viewing range might not be enough (if the ambient is really small for instance)
|
|
|
|
+ * You can use the factor to better multiply the final value.
|
|
|
|
+ */
|
|
|
|
+ private debugFactor;
|
|
/**
|
|
/**
|
|
* Defines the clear coat layer parameters for the material.
|
|
* Defines the clear coat layer parameters for the material.
|
|
*/
|
|
*/
|