|
@@ -3472,123 +3472,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class BoundingBox implements ICullable {
|
|
|
- minimum: Vector3;
|
|
|
- maximum: Vector3;
|
|
|
- vectors: Vector3[];
|
|
|
- center: Vector3;
|
|
|
- centerWorld: Vector3;
|
|
|
- extendSize: Vector3;
|
|
|
- extendSizeWorld: Vector3;
|
|
|
- directions: Vector3[];
|
|
|
- vectorsWorld: Vector3[];
|
|
|
- minimumWorld: Vector3;
|
|
|
- maximumWorld: Vector3;
|
|
|
- private _worldMatrix;
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
- getWorldMatrix(): Matrix;
|
|
|
- setWorldMatrix(matrix: Matrix): BoundingBox;
|
|
|
- _update(world: Matrix): void;
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- intersectsPoint(point: Vector3): boolean;
|
|
|
- intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
- intersectsMinMax(min: Vector3, max: Vector3): boolean;
|
|
|
- static Intersects(box0: BoundingBox, box1: BoundingBox): boolean;
|
|
|
- static IntersectsSphere(minPoint: Vector3, maxPoint: Vector3, sphereCenter: Vector3, sphereRadius: number): boolean;
|
|
|
- static IsCompletelyInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
- static IsInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- interface ICullable {
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- }
|
|
|
- class BoundingInfo implements ICullable {
|
|
|
- minimum: Vector3;
|
|
|
- maximum: Vector3;
|
|
|
- boundingBox: BoundingBox;
|
|
|
- boundingSphere: BoundingSphere;
|
|
|
- private _isLocked;
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
- isLocked: boolean;
|
|
|
- update(world: Matrix): void;
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- /**
|
|
|
- * Gets the world distance between the min and max points of the bounding box
|
|
|
- */
|
|
|
- readonly diagonalLength: number;
|
|
|
- isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- _checkCollision(collider: Collider): boolean;
|
|
|
- intersectsPoint(point: Vector3): boolean;
|
|
|
- intersects(boundingInfo: BoundingInfo, precise: boolean): boolean;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class BoundingSphere {
|
|
|
- minimum: Vector3;
|
|
|
- maximum: Vector3;
|
|
|
- center: Vector3;
|
|
|
- radius: number;
|
|
|
- centerWorld: Vector3;
|
|
|
- radiusWorld: number;
|
|
|
- private _tempRadiusVector;
|
|
|
- constructor(minimum: Vector3, maximum: Vector3);
|
|
|
- _update(world: Matrix): void;
|
|
|
- isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
- intersectsPoint(point: Vector3): boolean;
|
|
|
- static Intersects(sphere0: BoundingSphere, sphere1: BoundingSphere): boolean;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class Ray {
|
|
|
- origin: Vector3;
|
|
|
- direction: Vector3;
|
|
|
- length: number;
|
|
|
- private _edge1;
|
|
|
- private _edge2;
|
|
|
- private _pvec;
|
|
|
- private _tvec;
|
|
|
- private _qvec;
|
|
|
- private _tmpRay;
|
|
|
- constructor(origin: Vector3, direction: Vector3, length?: number);
|
|
|
- intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
|
|
|
- intersectsBox(box: BoundingBox): boolean;
|
|
|
- intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
- intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): Nullable<IntersectionInfo>;
|
|
|
- intersectsPlane(plane: Plane): Nullable<number>;
|
|
|
- intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
|
|
|
- intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
|
|
|
- private _comparePickingInfo(pickingInfoA, pickingInfoB);
|
|
|
- private static smallnum;
|
|
|
- private static rayl;
|
|
|
- /**
|
|
|
- * Intersection test between the ray and a given segment whithin a given tolerance (threshold)
|
|
|
- * @param sega the first point of the segment to test the intersection against
|
|
|
- * @param segb the second point of the segment to test the intersection against
|
|
|
- * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
|
|
|
- * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
|
|
|
- */
|
|
|
- intersectionSegment(sega: Vector3, segb: Vector3, threshold: number): number;
|
|
|
- static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
|
|
|
- /**
|
|
|
- * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
|
|
|
- * transformed to the given world matrix.
|
|
|
- * @param origin The origin point
|
|
|
- * @param end The end point
|
|
|
- * @param world a matrix to transform the ray to. Default is the identity matrix.
|
|
|
- */
|
|
|
- static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
|
|
|
- static Transform(ray: Ray, matrix: Matrix): Ray;
|
|
|
- static TransformToRef(ray: Ray, matrix: Matrix, result: Ray): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class Collider {
|
|
|
radius: Vector3;
|
|
|
retry: number;
|
|
@@ -3832,6 +3715,123 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+declare module BABYLON {
|
|
|
+ class BoundingBox implements ICullable {
|
|
|
+ minimum: Vector3;
|
|
|
+ maximum: Vector3;
|
|
|
+ vectors: Vector3[];
|
|
|
+ center: Vector3;
|
|
|
+ centerWorld: Vector3;
|
|
|
+ extendSize: Vector3;
|
|
|
+ extendSizeWorld: Vector3;
|
|
|
+ directions: Vector3[];
|
|
|
+ vectorsWorld: Vector3[];
|
|
|
+ minimumWorld: Vector3;
|
|
|
+ maximumWorld: Vector3;
|
|
|
+ private _worldMatrix;
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
+ getWorldMatrix(): Matrix;
|
|
|
+ setWorldMatrix(matrix: Matrix): BoundingBox;
|
|
|
+ _update(world: Matrix): void;
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ intersectsPoint(point: Vector3): boolean;
|
|
|
+ intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
+ intersectsMinMax(min: Vector3, max: Vector3): boolean;
|
|
|
+ static Intersects(box0: BoundingBox, box1: BoundingBox): boolean;
|
|
|
+ static IntersectsSphere(minPoint: Vector3, maxPoint: Vector3, sphereCenter: Vector3, sphereRadius: number): boolean;
|
|
|
+ static IsCompletelyInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
+ static IsInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ interface ICullable {
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ }
|
|
|
+ class BoundingInfo implements ICullable {
|
|
|
+ minimum: Vector3;
|
|
|
+ maximum: Vector3;
|
|
|
+ boundingBox: BoundingBox;
|
|
|
+ boundingSphere: BoundingSphere;
|
|
|
+ private _isLocked;
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
+ isLocked: boolean;
|
|
|
+ update(world: Matrix): void;
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ /**
|
|
|
+ * Gets the world distance between the min and max points of the bounding box
|
|
|
+ */
|
|
|
+ readonly diagonalLength: number;
|
|
|
+ isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ _checkCollision(collider: Collider): boolean;
|
|
|
+ intersectsPoint(point: Vector3): boolean;
|
|
|
+ intersects(boundingInfo: BoundingInfo, precise: boolean): boolean;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class BoundingSphere {
|
|
|
+ minimum: Vector3;
|
|
|
+ maximum: Vector3;
|
|
|
+ center: Vector3;
|
|
|
+ radius: number;
|
|
|
+ centerWorld: Vector3;
|
|
|
+ radiusWorld: number;
|
|
|
+ private _tempRadiusVector;
|
|
|
+ constructor(minimum: Vector3, maximum: Vector3);
|
|
|
+ _update(world: Matrix): void;
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ intersectsPoint(point: Vector3): boolean;
|
|
|
+ static Intersects(sphere0: BoundingSphere, sphere1: BoundingSphere): boolean;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class Ray {
|
|
|
+ origin: Vector3;
|
|
|
+ direction: Vector3;
|
|
|
+ length: number;
|
|
|
+ private _edge1;
|
|
|
+ private _edge2;
|
|
|
+ private _pvec;
|
|
|
+ private _tvec;
|
|
|
+ private _qvec;
|
|
|
+ private _tmpRay;
|
|
|
+ constructor(origin: Vector3, direction: Vector3, length?: number);
|
|
|
+ intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
|
|
|
+ intersectsBox(box: BoundingBox): boolean;
|
|
|
+ intersectsSphere(sphere: BoundingSphere): boolean;
|
|
|
+ intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): Nullable<IntersectionInfo>;
|
|
|
+ intersectsPlane(plane: Plane): Nullable<number>;
|
|
|
+ intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
|
|
|
+ intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
|
|
|
+ private _comparePickingInfo(pickingInfoA, pickingInfoB);
|
|
|
+ private static smallnum;
|
|
|
+ private static rayl;
|
|
|
+ /**
|
|
|
+ * Intersection test between the ray and a given segment whithin a given tolerance (threshold)
|
|
|
+ * @param sega the first point of the segment to test the intersection against
|
|
|
+ * @param segb the second point of the segment to test the intersection against
|
|
|
+ * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
|
|
|
+ * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
|
|
|
+ */
|
|
|
+ intersectionSegment(sega: Vector3, segb: Vector3, threshold: number): number;
|
|
|
+ static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
|
|
|
+ /**
|
|
|
+ * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
|
|
|
+ * transformed to the given world matrix.
|
|
|
+ * @param origin The origin point
|
|
|
+ * @param end The end point
|
|
|
+ * @param world a matrix to transform the ray to. Default is the identity matrix.
|
|
|
+ */
|
|
|
+ static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
|
|
|
+ static Transform(ray: Ray, matrix: Matrix): Ray;
|
|
|
+ static TransformToRef(ray: Ray, matrix: Matrix, result: Ray): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
declare module BABYLON.Debug {
|
|
|
class AxesViewer {
|
|
|
private _xline;
|
|
@@ -4573,7 +4573,10 @@ declare module BABYLON {
|
|
|
updateTextureSamplingMode(samplingMode: number, texture: InternalTexture): void;
|
|
|
updateDynamicTexture(texture: Nullable<InternalTexture>, canvas: HTMLCanvasElement, invertY: boolean, premulAlpha?: boolean, format?: number): void;
|
|
|
updateVideoTexture(texture: Nullable<InternalTexture>, video: HTMLVideoElement, invertY: boolean): void;
|
|
|
- createRenderTargetTexture(size: any, options: boolean | RenderTargetCreationOptions): InternalTexture;
|
|
|
+ createRenderTargetTexture(size: number | {
|
|
|
+ width: number;
|
|
|
+ height: number;
|
|
|
+ }, options: boolean | RenderTargetCreationOptions): InternalTexture;
|
|
|
createMultipleRenderTarget(size: any, options: any): InternalTexture[];
|
|
|
private _setupFramebufferDepthAttachments(generateStencilBuffer, generateDepthBuffer, width, height, samples?);
|
|
|
updateRenderTargetTextureSampleCount(texture: Nullable<InternalTexture>, samples: number): number;
|
|
@@ -14253,36 +14256,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class ReflectionProbe {
|
|
|
- name: string;
|
|
|
- private _scene;
|
|
|
- private _renderTargetTexture;
|
|
|
- private _projectionMatrix;
|
|
|
- private _viewMatrix;
|
|
|
- private _target;
|
|
|
- private _add;
|
|
|
- private _attachedMesh;
|
|
|
- invertYAxis: boolean;
|
|
|
- position: Vector3;
|
|
|
- constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
- samples: number;
|
|
|
- refreshRate: number;
|
|
|
- getScene(): Scene;
|
|
|
- readonly cubeTexture: RenderTargetTexture;
|
|
|
- readonly renderList: Nullable<AbstractMesh[]>;
|
|
|
- attachToMesh(mesh: AbstractMesh): void;
|
|
|
- /**
|
|
|
- * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.
|
|
|
- *
|
|
|
- * @param renderingGroupId The rendering group id corresponding to its index
|
|
|
- * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.
|
|
|
- */
|
|
|
- setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class BoundingBoxRenderer {
|
|
|
frontColor: Color3;
|
|
|
backColor: Color3;
|
|
@@ -14547,6 +14520,36 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class ReflectionProbe {
|
|
|
+ name: string;
|
|
|
+ private _scene;
|
|
|
+ private _renderTargetTexture;
|
|
|
+ private _projectionMatrix;
|
|
|
+ private _viewMatrix;
|
|
|
+ private _target;
|
|
|
+ private _add;
|
|
|
+ private _attachedMesh;
|
|
|
+ invertYAxis: boolean;
|
|
|
+ position: Vector3;
|
|
|
+ constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
|
|
|
+ samples: number;
|
|
|
+ refreshRate: number;
|
|
|
+ getScene(): Scene;
|
|
|
+ readonly cubeTexture: RenderTargetTexture;
|
|
|
+ readonly renderList: Nullable<AbstractMesh[]>;
|
|
|
+ attachToMesh(mesh: AbstractMesh): void;
|
|
|
+ /**
|
|
|
+ * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.
|
|
|
+ *
|
|
|
+ * @param renderingGroupId The rendering group id corresponding to its index
|
|
|
+ * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.
|
|
|
+ */
|
|
|
+ setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class AnaglyphPostProcess extends PostProcess {
|
|
|
private _passedProcess;
|
|
|
constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
@@ -18581,17 +18584,27 @@ declare module BABYLON {
|
|
|
private _savedViewMatrix;
|
|
|
private _blurX;
|
|
|
private _blurY;
|
|
|
+ private _adaptiveBlurKernel;
|
|
|
private _blurKernelX;
|
|
|
private _blurKernelY;
|
|
|
private _blurRatio;
|
|
|
+ private _resizeObserver;
|
|
|
blurRatio: number;
|
|
|
+ adaptiveBlurKernel: number;
|
|
|
blurKernel: number;
|
|
|
blurKernelX: number;
|
|
|
blurKernelY: number;
|
|
|
- constructor(name: string, size: any, scene: Scene, generateMipMaps?: boolean, type?: number, samplingMode?: number, generateDepthBuffer?: boolean);
|
|
|
+ private _autoComputeBlurKernel();
|
|
|
+ constructor(name: string, size: number | {
|
|
|
+ width: number;
|
|
|
+ height: number;
|
|
|
+ } | {
|
|
|
+ ratio: number;
|
|
|
+ }, scene: Scene, generateMipMaps?: boolean, type?: number, samplingMode?: number, generateDepthBuffer?: boolean);
|
|
|
private _preparePostProcesses();
|
|
|
clone(): MirrorTexture;
|
|
|
serialize(): any;
|
|
|
+ dispose(): void;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -18609,7 +18622,6 @@ declare module BABYLON {
|
|
|
private _internalTextures;
|
|
|
private _textures;
|
|
|
private _count;
|
|
|
- private _engine;
|
|
|
readonly isSupported: boolean;
|
|
|
private _multiRenderTargetOptions;
|
|
|
readonly textures: Texture[];
|
|
@@ -18718,7 +18730,11 @@ declare module BABYLON {
|
|
|
private _onClearObserver;
|
|
|
onClear: (Engine: Engine) => void;
|
|
|
clearColor: Color4;
|
|
|
- protected _size: number;
|
|
|
+ protected _size: number | {
|
|
|
+ width: number;
|
|
|
+ height: number;
|
|
|
+ };
|
|
|
+ private _sizeRatio;
|
|
|
_generateMipMaps: boolean;
|
|
|
protected _renderingManager: RenderingManager;
|
|
|
_waitingRenderList: string[];
|
|
@@ -18729,7 +18745,14 @@ declare module BABYLON {
|
|
|
protected _samples: number;
|
|
|
protected _renderTargetOptions: RenderTargetCreationOptions;
|
|
|
readonly renderTargetOptions: RenderTargetCreationOptions;
|
|
|
- constructor(name: string, size: any, scene: Nullable<Scene>, generateMipMaps?: boolean, doNotChangeAspectRatio?: boolean, type?: number, isCube?: boolean, samplingMode?: number, generateDepthBuffer?: boolean, generateStencilBuffer?: boolean, isMulti?: boolean);
|
|
|
+ protected _engine: Engine;
|
|
|
+ constructor(name: string, size: number | {
|
|
|
+ width: number;
|
|
|
+ height: number;
|
|
|
+ } | {
|
|
|
+ ratio: number;
|
|
|
+ }, scene: Nullable<Scene>, generateMipMaps?: boolean, doNotChangeAspectRatio?: boolean, type?: number, isCube?: boolean, samplingMode?: number, generateDepthBuffer?: boolean, generateStencilBuffer?: boolean, isMulti?: boolean);
|
|
|
+ private _processSizeParameter(size);
|
|
|
samples: number;
|
|
|
resetRefreshCounter(): void;
|
|
|
refreshRate: number;
|
|
@@ -18738,11 +18761,19 @@ declare module BABYLON {
|
|
|
removePostProcess(postProcess: PostProcess): void;
|
|
|
_shouldRender(): boolean;
|
|
|
getRenderSize(): number;
|
|
|
+ getRenderWidth(): number;
|
|
|
+ getRenderHeight(): number;
|
|
|
readonly canRescale: boolean;
|
|
|
scale(ratio: number): void;
|
|
|
getReflectionTextureMatrix(): Matrix;
|
|
|
- resize(size: any): void;
|
|
|
+ resize(size: number | {
|
|
|
+ width: number;
|
|
|
+ height: number;
|
|
|
+ } | {
|
|
|
+ ratio: number;
|
|
|
+ }): void;
|
|
|
render(useCameraPostProcess?: boolean, dumpForDebug?: boolean): void;
|
|
|
+ private _bestReflectionRenderTargetDimension(renderDimension, scale);
|
|
|
private renderToTarget(faceIndex, currentRenderList, currentRenderListLength, useCameraPostProcess, dumpForDebug);
|
|
|
/**
|
|
|
* Overrides the default sort function applied in the renderging group to prepare the meshes.
|