|
@@ -460,6 +460,16 @@ declare module BABYLON {
|
|
|
*/
|
|
|
toLinearSpace(): Color3;
|
|
|
/**
|
|
|
+ * Converts current color in rgb space to HSV values
|
|
|
+ * @returns a new color3 representing the HSV values
|
|
|
+ */
|
|
|
+ toHSV(): Color3;
|
|
|
+ /**
|
|
|
+ * Converts current color in rgb space to HSV values
|
|
|
+ * @param result defines the Color3 where to store the HSV values
|
|
|
+ */
|
|
|
+ toHSVToRef(result: Color3): void;
|
|
|
+ /**
|
|
|
* Converts the Color3 values to linear space and stores the result in "convertedColor"
|
|
|
* @param convertedColor defines the Color3 object where to store the linear space version
|
|
|
* @returns the unmodified Color3
|
|
@@ -478,6 +488,14 @@ declare module BABYLON {
|
|
|
toGammaSpaceToRef(convertedColor: Color3): Color3;
|
|
|
private static _BlackReadOnly;
|
|
|
/**
|
|
|
+ * Convert Hue, saturation and value to a Color3 (RGB)
|
|
|
+ * @param hue defines the hue
|
|
|
+ * @param saturation defines the saturation
|
|
|
+ * @param value defines the value
|
|
|
+ * @param result defines the Color3 where to store the RGB values
|
|
|
+ */
|
|
|
+ static HSVtoRGBToRef(hue: number, saturation: number, value: number, result: Color3): void;
|
|
|
+ /**
|
|
|
* Creates a new Color3 from the string containing valid hexadecimal values
|
|
|
* @param hex defines a string containing valid hexadecimal values
|
|
|
* @returns a new Color3 object
|
|
@@ -1217,6 +1235,7 @@ declare module BABYLON {
|
|
|
*/
|
|
|
z: number;
|
|
|
private static _UpReadOnly;
|
|
|
+ private static _ZeroReadOnly;
|
|
|
/**
|
|
|
* Creates a new Vector3 object from the given x, y, z (floats) coordinates.
|
|
|
* @param x defines the first coordinates (on X axis)
|
|
@@ -1641,6 +1660,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
static readonly UpReadOnly: DeepImmutable<Vector3>;
|
|
|
/**
|
|
|
+ * Gets a zero Vector3 that must not be updated
|
|
|
+ */
|
|
|
+ static readonly ZeroReadOnly: DeepImmutable<Vector3>;
|
|
|
+ /**
|
|
|
* Returns a new Vector3 set to (0.0, -1.0, 0.0)
|
|
|
* @returns a new down Vector3
|
|
|
*/
|
|
@@ -5135,20 +5158,6 @@ declare module BABYLON {
|
|
|
/** @hidden */
|
|
|
protected _keys: string[];
|
|
|
private _isDirty;
|
|
|
-<<<<<<< HEAD
|
|
|
- /** @hidden */
renderId: number;
|
|
|
- /** @hidden */
areLightsDirty: boolean;
|
|
|
- /** @hidden */
areAttributesDirty: boolean;
|
|
|
- /** @hidden */
areTexturesDirty: boolean;
|
|
|
- /** @hidden */
areFresnelDirty: boolean;
|
|
|
- /** @hidden */
areMiscDirty: boolean;
|
|
|
- /** @hidden */
areImageProcessingDirty: boolean;
|
|
|
- /** @hidden */
normals: boolean;
|
|
|
- /** @hidden */
uvs: boolean;
|
|
|
- /** @hidden */
needNormals: boolean;
|
|
|
- /** @hidden */
needUVs: boolean;
|
|
|
- [id: string]: any;
|
|
|
-=======
|
|
|
/** @hidden */
private _renderId: number;
|
|
|
/** @hidden */
private _areLightsDirty: boolean;
|
|
|
/** @hidden */
private _areAttributesDirty: boolean;
|
|
@@ -5160,7 +5169,7 @@ declare module BABYLON {
|
|
|
/** @hidden */
private _uvs: boolean;
|
|
|
/** @hidden */
private _needNormals: boolean;
|
|
|
/** @hidden */
private _needUVs: boolean;
|
|
|
->>>>>>> e0d205794def4ad96793ee06bf383169b9adecd1
|
|
|
+ [id: string]: any;
|
|
|
/**
|
|
|
* Specifies if the material needs to be re-calculated
|
|
|
*/
|
|
@@ -9775,10 +9784,19 @@ declare module BABYLON {
|
|
|
*/
|
|
|
onBeforeShadowMapRenderObservable: Observable<Effect>;
|
|
|
/**
|
|
|
+ * Observable triggered after the shadow is rendered. Can be used to restore internal effect state
|
|
|
+ */
|
|
|
+ onAfterShadowMapRenderObservable: Observable<Effect>;
|
|
|
+ /**
|
|
|
* Observable triggered before a mesh is rendered in the shadow map.
|
|
|
* Can be used to update internal effect state (that you can get from the onBeforeShadowMapRenderObservable)
|
|
|
*/
|
|
|
onBeforeShadowMapRenderMeshObservable: Observable<Mesh>;
|
|
|
+ /**
|
|
|
+ * Observable triggered after a mesh is rendered in the shadow map.
|
|
|
+ * Can be used to update internal effect state (that you can get from the onAfterShadowMapRenderObservable)
|
|
|
+ */
|
|
|
+ onAfterShadowMapRenderMeshObservable: Observable<Mesh>;
|
|
|
private _bias;
|
|
|
/**
|
|
|
* Gets the bias: offset applied on the depth preventing acnea (in light direction).
|
|
@@ -9938,6 +9956,8 @@ declare module BABYLON {
|
|
|
*/
|
|
|
contactHardeningLightSizeUVRatio: number;
|
|
|
private _darkness;
|
|
|
+ /** Gets or sets the actual darkness of a shadow */
|
|
|
+ darkness: number;
|
|
|
/**
|
|
|
* Returns the darkness value (float). This can only decrease the actual darkness of a shadow.
|
|
|
* 0 means strongest and 1 would means no shadow.
|
|
@@ -9951,6 +9971,8 @@ declare module BABYLON {
|
|
|
*/
|
|
|
setDarkness(darkness: number): ShadowGenerator;
|
|
|
private _transparencyShadow;
|
|
|
+ /** Gets or sets the ability to have transparent shadow */
|
|
|
+ transparencyShadow: boolean;
|
|
|
/**
|
|
|
* Sets the ability to have transparent shadow (boolean).
|
|
|
* @param transparent True if transparent else False
|
|
@@ -9970,6 +9992,11 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getShadowMapForRendering(): Nullable<RenderTargetTexture>;
|
|
|
/**
|
|
|
+ * Gets the class name of that object
|
|
|
+ * @returns "ShadowGenerator"
|
|
|
+ */
|
|
|
+ getClassName(): string;
|
|
|
+ /**
|
|
|
* Helper function to add a mesh and its descendants to the list of shadow casters.
|
|
|
* @param mesh Mesh to add
|
|
|
* @param includeDescendants boolean indicating if the descendants should be added. Default to true
|
|
@@ -10480,6 +10507,13 @@ declare module BABYLON {
|
|
|
* Internal only - manager for action
|
|
|
* @hidden
|
|
|
*/
private _actionManager: AbstractActionManager;
|
|
|
+ /**
|
|
|
+ * Adds action to chain of actions, may be a DoNothingAction
|
|
|
+ * @param action defines the next action to execute
|
|
|
+ * @returns The action passed in
|
|
|
+ * @see https://www.babylonjs-playground.com/#1T30HR#0
|
|
|
+ */
|
|
|
+ then(action: IAction): IAction;
|
|
|
}
|
|
|
/**
|
|
|
* The action to be carried out following a trigger
|
|
@@ -13734,185 +13768,6 @@ declare module BABYLON {
|
|
|
declare module BABYLON {
|
|
|
interface AbstractScene {
|
|
|
/**
|
|
|
- * The list of layers (background and foreground) of the scene
|
|
|
- */
|
|
|
- layers: Array<Layer>;
|
|
|
- }
|
|
|
- /**
|
|
|
- * Defines the layer scene component responsible to manage any layers
|
|
|
- * in a given scene.
|
|
|
- */
|
|
|
- export class LayerSceneComponent implements ISceneComponent {
|
|
|
- /**
|
|
|
- * The component name helpfull to identify the component in the list of scene components.
|
|
|
- */
|
|
|
- readonly name: string;
|
|
|
- /**
|
|
|
- * The scene the component belongs to.
|
|
|
- */
|
|
|
- scene: Scene;
|
|
|
- private _engine;
|
|
|
- /**
|
|
|
- * Creates a new instance of the component for the given scene
|
|
|
- * @param scene Defines the scene to register the component in
|
|
|
- */
|
|
|
- constructor(scene: Scene);
|
|
|
- /**
|
|
|
- * Registers the component in a given scene
|
|
|
- */
|
|
|
- register(): void;
|
|
|
- /**
|
|
|
- * Rebuilds the elements related to this component in case of
|
|
|
- * context lost for instance.
|
|
|
- */
|
|
|
- rebuild(): void;
|
|
|
- /**
|
|
|
- * Disposes the component and the associated ressources.
|
|
|
- */
|
|
|
- dispose(): void;
|
|
|
- private _draw;
|
|
|
- private _drawCameraPredicate;
|
|
|
- private _drawCameraBackground;
|
|
|
- private _drawCameraForeground;
|
|
|
- private _drawRenderTargetPredicate;
|
|
|
- private _drawRenderTargetBackground;
|
|
|
- private _drawRenderTargetForeground;
|
|
|
- }
|
|
|
-}
|
|
|
-declare module BABYLON {
|
|
|
- /** @hidden */
|
|
|
- export var layerPixelShader: {
|
|
|
- name: string;
|
|
|
- shader: string;
|
|
|
- };
|
|
|
-}
|
|
|
-declare module BABYLON {
|
|
|
- /** @hidden */
|
|
|
- export var layerVertexShader: {
|
|
|
- name: string;
|
|
|
- shader: string;
|
|
|
- };
|
|
|
-}
|
|
|
-declare module BABYLON {
|
|
|
- /**
|
|
|
- * This represents a full screen 2d layer.
|
|
|
- * This can be useful to display a picture in the background of your scene for instance.
|
|
|
- * @see https://www.babylonjs-playground.com/#08A2BS#1
|
|
|
- */
|
|
|
- export class Layer {
|
|
|
- /**
|
|
|
- * Define the name of the layer.
|
|
|
- */
|
|
|
- name: string;
|
|
|
- /**
|
|
|
- * Define the texture the layer should display.
|
|
|
- */
|
|
|
- texture: Nullable<Texture>;
|
|
|
- /**
|
|
|
- * Is the layer in background or foreground.
|
|
|
- */
|
|
|
- isBackground: boolean;
|
|
|
- /**
|
|
|
- * Define the color of the layer (instead of texture).
|
|
|
- */
|
|
|
- color: Color4;
|
|
|
- /**
|
|
|
- * Define the scale of the layer in order to zoom in out of the texture.
|
|
|
- */
|
|
|
- scale: Vector2;
|
|
|
- /**
|
|
|
- * Define an offset for the layer in order to shift the texture.
|
|
|
- */
|
|
|
- offset: Vector2;
|
|
|
- /**
|
|
|
- * Define the alpha blending mode used in the layer in case the texture or color has an alpha.
|
|
|
- */
|
|
|
- alphaBlendingMode: number;
|
|
|
- /**
|
|
|
- * Define if the layer should alpha test or alpha blend with the rest of the scene.
|
|
|
- * Alpha test will not mix with the background color in case of transparency.
|
|
|
- * It will either use the texture color or the background depending on the alpha value of the current pixel.
|
|
|
- */
|
|
|
- alphaTest: boolean;
|
|
|
- /**
|
|
|
- * Define a mask to restrict the layer to only some of the scene cameras.
|
|
|
- */
|
|
|
- layerMask: number;
|
|
|
- /**
|
|
|
- * Define the list of render target the layer is visible into.
|
|
|
- */
|
|
|
- renderTargetTextures: RenderTargetTexture[];
|
|
|
- /**
|
|
|
- * Define if the layer is only used in renderTarget or if it also
|
|
|
- * renders in the main frame buffer of the canvas.
|
|
|
- */
|
|
|
- renderOnlyInRenderTargetTextures: boolean;
|
|
|
- private _scene;
|
|
|
- private _vertexBuffers;
|
|
|
- private _indexBuffer;
|
|
|
- private _effect;
|
|
|
- private _alphaTestEffect;
|
|
|
- /**
|
|
|
- * An event triggered when the layer is disposed.
|
|
|
- */
|
|
|
- onDisposeObservable: Observable<Layer>;
|
|
|
- private _onDisposeObserver;
|
|
|
- /**
|
|
|
- * Back compatibility with callback before the onDisposeObservable existed.
|
|
|
- * The set callback will be triggered when the layer has been disposed.
|
|
|
- */
|
|
|
- onDispose: () => void;
|
|
|
- /**
|
|
|
- * An event triggered before rendering the scene
|
|
|
- */
|
|
|
- onBeforeRenderObservable: Observable<Layer>;
|
|
|
- private _onBeforeRenderObserver;
|
|
|
- /**
|
|
|
- * Back compatibility with callback before the onBeforeRenderObservable existed.
|
|
|
- * The set callback will be triggered just before rendering the layer.
|
|
|
- */
|
|
|
- onBeforeRender: () => void;
|
|
|
- /**
|
|
|
- * An event triggered after rendering the scene
|
|
|
- */
|
|
|
- onAfterRenderObservable: Observable<Layer>;
|
|
|
- private _onAfterRenderObserver;
|
|
|
- /**
|
|
|
- * Back compatibility with callback before the onAfterRenderObservable existed.
|
|
|
- * The set callback will be triggered just after rendering the layer.
|
|
|
- */
|
|
|
- onAfterRender: () => void;
|
|
|
- /**
|
|
|
- * Instantiates a new layer.
|
|
|
- * This represents a full screen 2d layer.
|
|
|
- * This can be useful to display a picture in the background of your scene for instance.
|
|
|
- * @see https://www.babylonjs-playground.com/#08A2BS#1
|
|
|
- * @param name Define the name of the layer in the scene
|
|
|
- * @param imgUrl Define the url of the texture to display in the layer
|
|
|
- * @param scene Define the scene the layer belongs to
|
|
|
- * @param isBackground Defines whether the layer is displayed in front or behind the scene
|
|
|
- * @param color Defines a color for the layer
|
|
|
- */
|
|
|
- constructor(
|
|
|
- /**
|
|
|
- * Define the name of the layer.
|
|
|
- */
|
|
|
- name: string, imgUrl: Nullable<string>, scene: Nullable<Scene>, isBackground?: boolean, color?: Color4);
|
|
|
- private _createIndexBuffer;
|
|
|
- /** @hidden */
private _rebuild(): void;
|
|
|
- /**
|
|
|
- * Renders the layer in the scene.
|
|
|
- */
|
|
|
- render(): void;
|
|
|
- /**
|
|
|
- * Disposes and releases the associated ressources.
|
|
|
- */
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-declare module BABYLON {
|
|
|
- interface AbstractScene {
|
|
|
- /**
|
|
|
* The list of procedural textures added to the scene
|
|
|
* @see http://doc.babylonjs.com/how_to/how_to_use_procedural_textures
|
|
|
*/
|
|
@@ -16964,11 +16819,11 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* If vertex color should be applied to the mesh
|
|
|
*/
|
|
|
- useVertexColor?: boolean | undefined;
|
|
|
+ readonly useVertexColor?: boolean | undefined;
|
|
|
/**
|
|
|
* If vertex alpha should be applied to the mesh
|
|
|
*/
|
|
|
- useVertexAlpha?: boolean | undefined;
|
|
|
+ readonly useVertexAlpha?: boolean | undefined;
|
|
|
/**
|
|
|
* Color of the line (Default: White)
|
|
|
*/
|
|
@@ -16984,6 +16839,7 @@ declare module BABYLON {
|
|
|
*/
|
|
|
intersectionThreshold: number;
|
|
|
private _colorShader;
|
|
|
+ private color4;
|
|
|
/**
|
|
|
* Creates a new LinesMesh
|
|
|
* @param name defines the name
|
|
@@ -17219,6 +17075,7 @@ declare module BABYLON {
|
|
|
*/
|
|
|
export class RenderingGroup {
|
|
|
index: number;
|
|
|
+ private static _zeroVector;
|
|
|
private _scene;
|
|
|
private _opaqueSubMeshes;
|
|
|
private _transparentSubMeshes;
|
|
@@ -20807,6 +20664,7 @@ declare module BABYLON {
|
|
|
* Returns the mesh VertexBuffer object from the requested `kind`
|
|
|
* @param kind defines which buffer to read from (positions, indices, normals, etc). Possible `kind` values :
|
|
|
* - VertexBuffer.PositionKind
|
|
|
+ * - VertexBuffer.NormalKind
|
|
|
* - VertexBuffer.UVKind
|
|
|
* - VertexBuffer.UV2Kind
|
|
|
* - VertexBuffer.UV3Kind
|
|
@@ -20825,6 +20683,7 @@ declare module BABYLON {
|
|
|
* Tests if a specific vertex buffer is associated with this mesh
|
|
|
* @param kind defines which buffer to check (positions, indices, normals, etc). Possible `kind` values :
|
|
|
* - VertexBuffer.PositionKind
|
|
|
+ * - VertexBuffer.NormalKind
|
|
|
* - VertexBuffer.UVKind
|
|
|
* - VertexBuffer.UV2Kind
|
|
|
* - VertexBuffer.UV3Kind
|
|
@@ -20861,6 +20720,7 @@ declare module BABYLON {
|
|
|
* Returns a string which contains the list of existing `kinds` of Vertex Data associated with this mesh.
|
|
|
* @param kind defines which buffer to read from (positions, indices, normals, etc). Possible `kind` values :
|
|
|
* - VertexBuffer.PositionKind
|
|
|
+ * - VertexBuffer.NormalKind
|
|
|
* - VertexBuffer.UVKind
|
|
|
* - VertexBuffer.UV2Kind
|
|
|
* - VertexBuffer.UV3Kind
|
|
@@ -22136,6 +21996,7 @@ declare module BABYLON {
|
|
|
forceCompilationAsync(mesh: AbstractMesh, options?: Partial<{
|
|
|
clipPlane: boolean;
|
|
|
}>): Promise<void>;
|
|
|
+ private static readonly _AllDirtyCallBack;
|
|
|
private static readonly _ImageProcessingDirtyCallBack;
|
|
|
private static readonly _TextureDirtyCallBack;
|
|
|
private static readonly _FresnelDirtyCallBack;
|
|
@@ -22157,6 +22018,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
protected _markAllSubMeshesAsDirty(func: (defines: MaterialDefines) => void): void;
|
|
|
/**
|
|
|
+ * Indicates that we need to re-calculated for all submeshes
|
|
|
+ */
|
|
|
+ protected _markAllSubMeshesAsAllDirty(): void;
|
|
|
+ /**
|
|
|
* Indicates that image processing needs to be re-calculated for all submeshes
|
|
|
*/
|
|
|
protected _markAllSubMeshesAsImageProcessingDirty(): void;
|
|
@@ -35218,7 +35083,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
export class PointerDragBehavior implements Behavior<AbstractMesh> {
|
|
|
private static _AnyMouseID;
|
|
|
- private _attachedNode;
|
|
|
+ /**
|
|
|
+ * Abstract mesh the behavior is set on
|
|
|
+ */
|
|
|
+ attachedNode: AbstractMesh;
|
|
|
private _dragPlane;
|
|
|
private _scene;
|
|
|
private _pointerObserver;
|
|
@@ -39094,6 +38962,7 @@ declare module BABYLON {
|
|
|
* * The parameter `subdivisions` sets the number of rings along the cylinder height (positive integer, default 1).
|
|
|
* * The parameter `hasRings` (boolean, default false) makes the subdivisions independent from each other, so they become different faces.
|
|
|
* * The parameter `enclose` (boolean, default false) adds two extra faces per subdivision to a sliced cylinder to close it around its height axis.
|
|
|
+ * * The parameter `cap` sets the way the cylinder is capped. Possible values : BABYLON.Mesh.NO_CAP, BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL (default).
|
|
|
* * The parameter `arc` (float, default 1) is the ratio (max 1) to apply to the circumference to slice the cylinder.
|
|
|
* * You can set different colors and different images to each box side by using the parameters `faceColors` (an array of n Color3 elements) and `faceUV` (an array of n Vector4 elements).
|
|
|
* * The value of n is the number of cylinder faces. If the cylinder has only 1 subdivisions, n equals : top face + cylinder surface + bottom face = 3
|
|
@@ -39125,6 +38994,7 @@ declare module BABYLON {
|
|
|
updatable?: boolean;
|
|
|
hasRings?: boolean;
|
|
|
enclose?: boolean;
|
|
|
+ cap?: number;
|
|
|
sideOrientation?: number;
|
|
|
frontUVs?: Vector4;
|
|
|
backUVs?: Vector4;
|
|
@@ -44512,7 +44382,7 @@ declare module BABYLON {
|
|
|
*
|
|
|
* This offers the main features of a standard PBR material.
|
|
|
* For more information, please refer to the documentation :
|
|
|
- * http://doc.babylonjs.com/extensions/Physically_Based_Rendering
|
|
|
+ * https://doc.babylonjs.com/how_to/physically_based_rendering
|
|
|
*/
|
|
|
export abstract class PBRBaseMaterial extends PushMaterial {
|
|
|
/**
|
|
@@ -45014,7 +44884,7 @@ declare module BABYLON {
|
|
|
*
|
|
|
* This offers the main features of a standard PBR material.
|
|
|
* For more information, please refer to the documentation :
|
|
|
- * http://doc.babylonjs.com/extensions/Physically_Based_Rendering
|
|
|
+ * https://doc.babylonjs.com/how_to/physically_based_rendering
|
|
|
*/
|
|
|
export class PBRMaterial extends PBRBaseMaterial {
|
|
|
/**
|
|
@@ -47032,6 +46902,185 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
+ interface AbstractScene {
|
|
|
+ /**
|
|
|
+ * The list of layers (background and foreground) of the scene
|
|
|
+ */
|
|
|
+ layers: Array<Layer>;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * Defines the layer scene component responsible to manage any layers
|
|
|
+ * in a given scene.
|
|
|
+ */
|
|
|
+ export class LayerSceneComponent implements ISceneComponent {
|
|
|
+ /**
|
|
|
+ * The component name helpfull to identify the component in the list of scene components.
|
|
|
+ */
|
|
|
+ readonly name: string;
|
|
|
+ /**
|
|
|
+ * The scene the component belongs to.
|
|
|
+ */
|
|
|
+ scene: Scene;
|
|
|
+ private _engine;
|
|
|
+ /**
|
|
|
+ * Creates a new instance of the component for the given scene
|
|
|
+ * @param scene Defines the scene to register the component in
|
|
|
+ */
|
|
|
+ constructor(scene: Scene);
|
|
|
+ /**
|
|
|
+ * Registers the component in a given scene
|
|
|
+ */
|
|
|
+ register(): void;
|
|
|
+ /**
|
|
|
+ * Rebuilds the elements related to this component in case of
|
|
|
+ * context lost for instance.
|
|
|
+ */
|
|
|
+ rebuild(): void;
|
|
|
+ /**
|
|
|
+ * Disposes the component and the associated ressources.
|
|
|
+ */
|
|
|
+ dispose(): void;
|
|
|
+ private _draw;
|
|
|
+ private _drawCameraPredicate;
|
|
|
+ private _drawCameraBackground;
|
|
|
+ private _drawCameraForeground;
|
|
|
+ private _drawRenderTargetPredicate;
|
|
|
+ private _drawRenderTargetBackground;
|
|
|
+ private _drawRenderTargetForeground;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /** @hidden */
|
|
|
+ export var layerPixelShader: {
|
|
|
+ name: string;
|
|
|
+ shader: string;
|
|
|
+ };
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /** @hidden */
|
|
|
+ export var layerVertexShader: {
|
|
|
+ name: string;
|
|
|
+ shader: string;
|
|
|
+ };
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * This represents a full screen 2d layer.
|
|
|
+ * This can be useful to display a picture in the background of your scene for instance.
|
|
|
+ * @see https://www.babylonjs-playground.com/#08A2BS#1
|
|
|
+ */
|
|
|
+ export class Layer {
|
|
|
+ /**
|
|
|
+ * Define the name of the layer.
|
|
|
+ */
|
|
|
+ name: string;
|
|
|
+ /**
|
|
|
+ * Define the texture the layer should display.
|
|
|
+ */
|
|
|
+ texture: Nullable<Texture>;
|
|
|
+ /**
|
|
|
+ * Is the layer in background or foreground.
|
|
|
+ */
|
|
|
+ isBackground: boolean;
|
|
|
+ /**
|
|
|
+ * Define the color of the layer (instead of texture).
|
|
|
+ */
|
|
|
+ color: Color4;
|
|
|
+ /**
|
|
|
+ * Define the scale of the layer in order to zoom in out of the texture.
|
|
|
+ */
|
|
|
+ scale: Vector2;
|
|
|
+ /**
|
|
|
+ * Define an offset for the layer in order to shift the texture.
|
|
|
+ */
|
|
|
+ offset: Vector2;
|
|
|
+ /**
|
|
|
+ * Define the alpha blending mode used in the layer in case the texture or color has an alpha.
|
|
|
+ */
|
|
|
+ alphaBlendingMode: number;
|
|
|
+ /**
|
|
|
+ * Define if the layer should alpha test or alpha blend with the rest of the scene.
|
|
|
+ * Alpha test will not mix with the background color in case of transparency.
|
|
|
+ * It will either use the texture color or the background depending on the alpha value of the current pixel.
|
|
|
+ */
|
|
|
+ alphaTest: boolean;
|
|
|
+ /**
|
|
|
+ * Define a mask to restrict the layer to only some of the scene cameras.
|
|
|
+ */
|
|
|
+ layerMask: number;
|
|
|
+ /**
|
|
|
+ * Define the list of render target the layer is visible into.
|
|
|
+ */
|
|
|
+ renderTargetTextures: RenderTargetTexture[];
|
|
|
+ /**
|
|
|
+ * Define if the layer is only used in renderTarget or if it also
|
|
|
+ * renders in the main frame buffer of the canvas.
|
|
|
+ */
|
|
|
+ renderOnlyInRenderTargetTextures: boolean;
|
|
|
+ private _scene;
|
|
|
+ private _vertexBuffers;
|
|
|
+ private _indexBuffer;
|
|
|
+ private _effect;
|
|
|
+ private _alphaTestEffect;
|
|
|
+ /**
|
|
|
+ * An event triggered when the layer is disposed.
|
|
|
+ */
|
|
|
+ onDisposeObservable: Observable<Layer>;
|
|
|
+ private _onDisposeObserver;
|
|
|
+ /**
|
|
|
+ * Back compatibility with callback before the onDisposeObservable existed.
|
|
|
+ * The set callback will be triggered when the layer has been disposed.
|
|
|
+ */
|
|
|
+ onDispose: () => void;
|
|
|
+ /**
|
|
|
+ * An event triggered before rendering the scene
|
|
|
+ */
|
|
|
+ onBeforeRenderObservable: Observable<Layer>;
|
|
|
+ private _onBeforeRenderObserver;
|
|
|
+ /**
|
|
|
+ * Back compatibility with callback before the onBeforeRenderObservable existed.
|
|
|
+ * The set callback will be triggered just before rendering the layer.
|
|
|
+ */
|
|
|
+ onBeforeRender: () => void;
|
|
|
+ /**
|
|
|
+ * An event triggered after rendering the scene
|
|
|
+ */
|
|
|
+ onAfterRenderObservable: Observable<Layer>;
|
|
|
+ private _onAfterRenderObserver;
|
|
|
+ /**
|
|
|
+ * Back compatibility with callback before the onAfterRenderObservable existed.
|
|
|
+ * The set callback will be triggered just after rendering the layer.
|
|
|
+ */
|
|
|
+ onAfterRender: () => void;
|
|
|
+ /**
|
|
|
+ * Instantiates a new layer.
|
|
|
+ * This represents a full screen 2d layer.
|
|
|
+ * This can be useful to display a picture in the background of your scene for instance.
|
|
|
+ * @see https://www.babylonjs-playground.com/#08A2BS#1
|
|
|
+ * @param name Define the name of the layer in the scene
|
|
|
+ * @param imgUrl Define the url of the texture to display in the layer
|
|
|
+ * @param scene Define the scene the layer belongs to
|
|
|
+ * @param isBackground Defines whether the layer is displayed in front or behind the scene
|
|
|
+ * @param color Defines a color for the layer
|
|
|
+ */
|
|
|
+ constructor(
|
|
|
+ /**
|
|
|
+ * Define the name of the layer.
|
|
|
+ */
|
|
|
+ name: string, imgUrl: Nullable<string>, scene: Nullable<Scene>, isBackground?: boolean, color?: Color4);
|
|
|
+ private _createIndexBuffer;
|
|
|
+ /** @hidden */
private _rebuild(): void;
|
|
|
+ /**
|
|
|
+ * Renders the layer in the scene.
|
|
|
+ */
|
|
|
+ render(): void;
|
|
|
+ /**
|
|
|
+ * Disposes and releases the associated ressources.
|
|
|
+ */
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
/** @hidden */
|
|
|
export var lensFlarePixelShader: {
|
|
|
name: string;
|
|
@@ -49061,7 +49110,68 @@ declare module BABYLON {
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
-<<<<<<< HEAD
|
|
|
+ * Defines the options related to the creation of an HtmlElementTexture
|
|
|
+ */
|
|
|
+ export interface IHtmlElementTextureOptions {
|
|
|
+ /**
|
|
|
+ * Defines wether mip maps should be created or not.
|
|
|
+ */
|
|
|
+ generateMipMaps?: boolean;
|
|
|
+ /**
|
|
|
+ * Defines the sampling mode of the texture.
|
|
|
+ */
|
|
|
+ samplingMode?: number;
|
|
|
+ /**
|
|
|
+ * Defines the engine instance to use the texture with. It is not mandatory if you define a scene.
|
|
|
+ */
|
|
|
+ engine: Nullable<Engine>;
|
|
|
+ /**
|
|
|
+ * Defines the scene the texture belongs to. It is not mandatory if you define an engine.
|
|
|
+ */
|
|
|
+ scene: Nullable<Scene>;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * This represents the smallest workload to use an already existing element (Canvas or Video) as a texture.
|
|
|
+ * To be as efficient as possible depending on your constraints nothing aside the first upload
|
|
|
+ * is automatically managed.
|
|
|
+ * It is a cheap VideoTexture or DynamicTexture if you prefer to keep full control of the elements
|
|
|
+ * in your application.
|
|
|
+ *
|
|
|
+ * As the update is not automatic, you need to call them manually.
|
|
|
+ */
|
|
|
+ export class HtmlElementTexture extends BaseTexture {
|
|
|
+ /**
|
|
|
+ * The texture URL.
|
|
|
+ */
|
|
|
+ element: HTMLVideoElement | HTMLCanvasElement;
|
|
|
+ private static readonly DefaultOptions;
|
|
|
+ private _textureMatrix;
|
|
|
+ private _engine;
|
|
|
+ private _isVideo;
|
|
|
+ private _generateMipMaps;
|
|
|
+ private _samplingMode;
|
|
|
+ /**
|
|
|
+ * Instantiates a HtmlElementTexture from the following parameters.
|
|
|
+ *
|
|
|
+ * @param name Defines the name of the texture
|
|
|
+ * @param element Defines the video or canvas the texture is filled with
|
|
|
+ * @param options Defines the other none mandatory texture creation options
|
|
|
+ */
|
|
|
+ constructor(name: string, element: HTMLVideoElement | HTMLCanvasElement, options: IHtmlElementTextureOptions);
|
|
|
+ private _createInternalTexture;
|
|
|
+ /**
|
|
|
+ * Returns the texture matrix used in most of the material.
|
|
|
+ */
|
|
|
+ getTextureMatrix(): Matrix;
|
|
|
+ /**
|
|
|
+ * Updates the content of the texture.
|
|
|
+ * @param invertY Defines wether the texture should be inverted on Y (false by default on video and true on canvas)
|
|
|
+ */
|
|
|
+ update(invertY?: Nullable<boolean>): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
* Enum used to define the target of a block
|
|
|
*/
|
|
|
export enum NodeMaterialBlockTargets {
|
|
@@ -49240,13 +49350,13 @@ declare module BABYLON {
|
|
|
* Shared data between multiple NodeMaterialBuildState instances
|
|
|
*/
|
|
|
sharedData: NodeMaterialBuildStateSharedData;
|
|
|
- /** @hidden */
vertexState: NodeMaterialBuildState;
|
|
|
+ /** @hidden */
private _vertexState: NodeMaterialBuildState;
|
|
|
private _attributeDeclaration;
|
|
|
private _uniformDeclaration;
|
|
|
private _samplerDeclaration;
|
|
|
private _varyingTransfer;
|
|
|
private _repeatableContentAnchorIndex;
|
|
|
- /** @hidden */
builtCompilationString: string;
|
|
|
+ /** @hidden */
private _builtCompilationString: string;
|
|
|
/**
|
|
|
* Gets the emitted compilation strings
|
|
|
*/
|
|
@@ -49257,18 +49367,18 @@ declare module BABYLON {
|
|
|
*/
|
|
|
finalize(state: NodeMaterialBuildState): void;
|
|
|
/** @hidden */
protected readonly _repeatableContentAnchor: string;
|
|
|
- /** @hidden */
getFreeVariableName(prefix: string): string;
|
|
|
- /** @hidden */
getFreeDefineName(prefix: string): string;
|
|
|
- /** @hidden */
excludeVariableName(name: string): void;
|
|
|
- /** @hidden */
getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
|
|
|
- /** @hidden */
emitFunction(name: string, code: string, comments: string): void;
|
|
|
- /** @hidden */
emitCodeFromInclude(includeName: string, comments: string, options?: {
|
|
|
+ /** @hidden */
private _getFreeVariableName(prefix: string): string;
|
|
|
+ /** @hidden */
private _getFreeDefineName(prefix: string): string;
|
|
|
+ /** @hidden */
private _excludeVariableName(name: string): void;
|
|
|
+ /** @hidden */
private _getGLType(type: NodeMaterialBlockConnectionPointTypes): string;
|
|
|
+ /** @hidden */
private _emitFunction(name: string, code: string, comments: string): void;
|
|
|
+ /** @hidden */
private _emitCodeFromInclude(includeName: string, comments: string, options?: {
|
|
|
replaceStrings?: {
|
|
|
search: RegExp;
|
|
|
replace: string;
|
|
|
}[];
|
|
|
}): string;
|
|
|
- /** @hidden */
emitFunctionFromInclude(includeName: string, comments: string, options?: {
|
|
|
+ /** @hidden */
private _emitFunctionFromInclude(includeName: string, comments: string, options?: {
|
|
|
repeatKey?: string;
|
|
|
removeAttributes?: boolean;
|
|
|
removeUniforms?: boolean;
|
|
@@ -49279,9 +49389,9 @@ declare module BABYLON {
|
|
|
replace: string;
|
|
|
}[];
|
|
|
}): void;
|
|
|
- /** @hidden */
emitVaryings(point: NodeMaterialConnectionPoint, define?: string, force?: boolean, fromFragment?: boolean, replacementName?: string): void;
|
|
|
+ /** @hidden */
private _emitVaryings(point: NodeMaterialConnectionPoint, define?: string, force?: boolean, fromFragment?: boolean, replacementName?: string): void;
|
|
|
private _emitDefine;
|
|
|
- /** @hidden */
emitUniformOrAttributes(point: NodeMaterialConnectionPoint, define?: string): void;
|
|
|
+ /** @hidden */
private _emitUniformOrAttributes(point: NodeMaterialConnectionPoint, define?: string): void;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -49360,12 +49470,10 @@ declare module BABYLON {
|
|
|
onBuildObservable: Observable<NodeMaterial>;
|
|
|
/**
|
|
|
* Gets or sets the root nodes of the material vertex shader
|
|
|
- */
|
|
|
- private _vertexOutputNodes;
|
|
|
+ */
private _vertexOutputNodes: NodeMaterialBlock[];
|
|
|
/**
|
|
|
* Gets or sets the root nodes of the material fragment (pixel) shader
|
|
|
- */
|
|
|
- private _fragmentOutputNodes;
|
|
|
+ */
private _fragmentOutputNodes: NodeMaterialBlock[];
|
|
|
/** Gets or sets options to control the node material overall behavior */
|
|
|
options: INodeMaterialOptions;
|
|
|
/**
|
|
@@ -49501,10 +49609,8 @@ declare module BABYLON {
|
|
|
private _buildId;
|
|
|
private _target;
|
|
|
private _isFinalMerger;
|
|
|
- /** @hidden */
|
|
|
- protected _inputs: NodeMaterialConnectionPoint[];
|
|
|
- /** @hidden */
|
|
|
- protected _outputs: NodeMaterialConnectionPoint[];
|
|
|
+ /** @hidden */
private _inputs: NodeMaterialConnectionPoint[];
|
|
|
+ /** @hidden */
private _outputs: NodeMaterialConnectionPoint[];
|
|
|
/**
|
|
|
* Gets or sets the name of the block
|
|
|
*/
|
|
@@ -49655,14 +49761,14 @@ declare module BABYLON {
|
|
|
* Defines a connection point for a block
|
|
|
*/
|
|
|
export class NodeMaterialConnectionPoint {
|
|
|
- private _ownerBlock;
|
|
|
- private _connectedPoint;
|
|
|
+ /** @hidden */
private _ownerBlock: NodeMaterialBlock;
|
|
|
+ /** @hidden */
private _connectedPoint: Nullable<NodeMaterialConnectionPoint>;
|
|
|
private _associatedVariableName;
|
|
|
private _endpoints;
|
|
|
private _storedValue;
|
|
|
private _valueCallback;
|
|
|
private _isVarying;
|
|
|
- /** @hidden */
wellKnownValue: Nullable<NodeMaterialWellKnownValues>;
|
|
|
+ /** @hidden */
private _wellKnownValue: Nullable<NodeMaterialWellKnownValues>;
|
|
|
/**
|
|
|
* Gets or sets the connection point type (default is float)
|
|
|
*/
|
|
@@ -50101,71 +50207,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
readonly input: NodeMaterialConnectionPoint;
|
|
|
protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
-=======
|
|
|
- * Defines the options related to the creation of an HtmlElementTexture
|
|
|
- */
|
|
|
- export interface IHtmlElementTextureOptions {
|
|
|
- /**
|
|
|
- * Defines wether mip maps should be created or not.
|
|
|
- */
|
|
|
- generateMipMaps?: boolean;
|
|
|
- /**
|
|
|
- * Defines the sampling mode of the texture.
|
|
|
- */
|
|
|
- samplingMode?: number;
|
|
|
- /**
|
|
|
- * Defines the engine instance to use the texture with. It is not mandatory if you define a scene.
|
|
|
- */
|
|
|
- engine: Nullable<Engine>;
|
|
|
- /**
|
|
|
- * Defines the scene the texture belongs to. It is not mandatory if you define an engine.
|
|
|
- */
|
|
|
- scene: Nullable<Scene>;
|
|
|
- }
|
|
|
- /**
|
|
|
- * This represents the smallest workload to use an already existing element (Canvas or Video) as a texture.
|
|
|
- * To be as efficient as possible depending on your constraints nothing aside the first upload
|
|
|
- * is automatically managed.
|
|
|
- * It is a cheap VideoTexture or DynamicTexture if you prefer to keep full control of the elements
|
|
|
- * in your application.
|
|
|
- *
|
|
|
- * As the update is not automatic, you need to call them manually.
|
|
|
- */
|
|
|
- export class HtmlElementTexture extends BaseTexture {
|
|
|
- /**
|
|
|
- * The texture URL.
|
|
|
- */
|
|
|
- element: HTMLVideoElement | HTMLCanvasElement;
|
|
|
- private static readonly DefaultOptions;
|
|
|
- private _textureMatrix;
|
|
|
- private _engine;
|
|
|
- private _isVideo;
|
|
|
- private _generateMipMaps;
|
|
|
- private _samplingMode;
|
|
|
- /**
|
|
|
- * Instantiates a HtmlElementTexture from the following parameters.
|
|
|
- *
|
|
|
- * @param name Defines the name of the texture
|
|
|
- * @param element Defines the video or canvas the texture is filled with
|
|
|
- * @param options Defines the other none mandatory texture creation options
|
|
|
- */
|
|
|
- constructor(name: string, element: HTMLVideoElement | HTMLCanvasElement, options: IHtmlElementTextureOptions);
|
|
|
- private _createInternalTexture;
|
|
|
- /**
|
|
|
- * Returns the texture matrix used in most of the material.
|
|
|
- */
|
|
|
- getTextureMatrix(): Matrix;
|
|
|
- /**
|
|
|
- * Updates the content of the texture.
|
|
|
- * @param invertY Defines wether the texture should be inverted on Y (false by default on video and true on canvas)
|
|
|
- */
|
|
|
- update(invertY?: Nullable<boolean>): void;
|
|
|
->>>>>>> e0d205794def4ad96793ee06bf383169b9adecd1
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
-<<<<<<< HEAD
|
|
|
* Block used to read a texture from a sampler
|
|
|
*/
|
|
|
export class TextureBlock extends NodeMaterialBlock {
|
|
@@ -50483,7 +50528,10 @@ declare module BABYLON {
|
|
|
*/
|
|
|
getClassName(): string;
|
|
|
protected _buildBlock(state: NodeMaterialBuildState): this;
|
|
|
-=======
|
|
|
+ }
|
|
|
+}
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
* Helper class to push actions to a pool of workers.
|
|
|
*/
|
|
|
export class WorkerPool implements IDisposable {
|
|
@@ -50505,7 +50553,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
push(action: (worker: Worker, onComplete: () => void) => void): void;
|
|
|
private _execute;
|
|
|
->>>>>>> e0d205794def4ad96793ee06bf383169b9adecd1
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
@@ -51380,6 +51427,7 @@ declare module BABYLON {
|
|
|
* * The parameter `subdivisions` sets the number of rings along the cylinder height (positive integer, default 1).
|
|
|
* * The parameter `hasRings` (boolean, default false) makes the subdivisions independent from each other, so they become different faces.
|
|
|
* * The parameter `enclose` (boolean, default false) adds two extra faces per subdivision to a sliced cylinder to close it around its height axis.
|
|
|
+ * * The parameter `cap` sets the way the cylinder is capped. Possible values : BABYLON.Mesh.NO_CAP, BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL (default).
|
|
|
* * The parameter `arc` (float, default 1) is the ratio (max 1) to apply to the circumference to slice the cylinder.
|
|
|
* * You can set different colors and different images to each box side by using the parameters `faceColors` (an array of n Color3 elements) and `faceUV` (an array of n Vector4 elements).
|
|
|
* * The value of n is the number of cylinder faces. If the cylinder has only 1 subdivisions, n equals : top face + cylinder surface + bottom face = 3
|
|
@@ -51411,6 +51459,7 @@ declare module BABYLON {
|
|
|
updatable?: boolean;
|
|
|
hasRings?: boolean;
|
|
|
enclose?: boolean;
|
|
|
+ cap?: number;
|
|
|
sideOrientation?: number;
|
|
|
frontUVs?: Vector4;
|
|
|
backUVs?: Vector4;
|
|
@@ -60008,8 +60057,6 @@ declare module BABYLON.GUI {
|
|
|
private _drawGradientSquare;
|
|
|
private _drawCircle;
|
|
|
private _createColorWheelCanvas;
|
|
|
- private _RGBtoHSV;
|
|
|
- private _HSVtoRGB;
|
|
|
/** @hidden */
private _draw(context: CanvasRenderingContext2D): void;
|
|
|
private _pointerIsDown;
|
|
|
private _updateValueFromPointer;
|