|
@@ -3763,6 +3763,131 @@ 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;
|
|
|
+ /**
|
|
|
+ * Recreate the bounding info to be centered around a specific point given a specific extend.
|
|
|
+ * @param center New center of the bounding info
|
|
|
+ * @param extend New extend of the bounding info
|
|
|
+ */
|
|
|
+ centerOn(center: Vector3, extend: Vector3): BoundingInfo;
|
|
|
+ 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;
|
|
|
+ update(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
|
|
|
+ static Zero(): Ray;
|
|
|
+ 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;
|
|
@@ -3893,131 +4018,6 @@ declare module BABYLON.Debug {
|
|
|
}
|
|
|
|
|
|
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;
|
|
|
- /**
|
|
|
- * Recreate the bounding info to be centered around a specific point given a specific extend.
|
|
|
- * @param center New center of the bounding info
|
|
|
- * @param extend New extend of the bounding info
|
|
|
- */
|
|
|
- centerOn(center: Vector3, extend: Vector3): BoundingInfo;
|
|
|
- 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;
|
|
|
- update(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
|
|
|
- static Zero(): Ray;
|
|
|
- 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 InstancingAttributeInfo {
|
|
|
/**
|
|
|
* Index/offset of the attribute in the vertex shader
|
|
@@ -4320,11 +4320,10 @@ declare module BABYLON {
|
|
|
protected _alphaState: Internals._AlphaState;
|
|
|
protected _alphaMode: number;
|
|
|
private _internalTexturesCache;
|
|
|
- protected _activeChannel: number;
|
|
|
+ protected _activeTextureChannel: number;
|
|
|
protected _boundTexturesCache: {
|
|
|
[key: string]: Nullable<InternalTexture>;
|
|
|
};
|
|
|
- protected _boundTexturesOrder: InternalTexture[];
|
|
|
protected _currentEffect: Nullable<Effect>;
|
|
|
protected _currentProgram: Nullable<WebGLProgram>;
|
|
|
private _compiledEffects;
|
|
@@ -4354,7 +4353,6 @@ declare module BABYLON {
|
|
|
private _emptyCubeTexture;
|
|
|
private _emptyTexture3D;
|
|
|
private _frameHandler;
|
|
|
- private _nextFreeTextureSlot;
|
|
|
private _texturesSupported;
|
|
|
private _textureFormatInUse;
|
|
|
readonly texturesSupported: Array<string>;
|
|
@@ -4626,8 +4624,8 @@ declare module BABYLON {
|
|
|
createTexture(urlArg: Nullable<string>, noMipmap: boolean, invertY: boolean, scene: Nullable<Scene>, samplingMode?: number, onLoad?: Nullable<() => void>, onError?: Nullable<(message: string, exception: any) => void>, buffer?: Nullable<ArrayBuffer | HTMLImageElement>, fallBack?: Nullable<InternalTexture>, format?: Nullable<number>): InternalTexture;
|
|
|
private _rescaleTexture(source, destination, scene, internalFormat, onComplete);
|
|
|
private _getInternalFormat(format);
|
|
|
- updateRawTexture(texture: Nullable<InternalTexture>, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression?: Nullable<string>): void;
|
|
|
- createRawTexture(data: Nullable<ArrayBufferView>, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>): InternalTexture;
|
|
|
+ updateRawTexture(texture: Nullable<InternalTexture>, data: Nullable<ArrayBufferView>, format: number, invertY: boolean, compression?: Nullable<string>, type?: number): void;
|
|
|
+ createRawTexture(data: Nullable<ArrayBufferView>, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, type?: number): InternalTexture;
|
|
|
createDynamicTexture(width: number, height: number, generateMipMaps: boolean, samplingMode: number): InternalTexture;
|
|
|
updateTextureSamplingMode(samplingMode: number, texture: InternalTexture): void;
|
|
|
updateDynamicTexture(texture: Nullable<InternalTexture>, canvas: HTMLCanvasElement, invertY: boolean, premulAlpha?: boolean, format?: number): void;
|
|
@@ -4656,17 +4654,13 @@ declare module BABYLON {
|
|
|
_releaseFramebufferObjects(texture: InternalTexture): void;
|
|
|
_releaseTexture(texture: InternalTexture): void;
|
|
|
private setProgram(program);
|
|
|
- private _boundUniforms;
|
|
|
bindSamplers(effect: Effect): void;
|
|
|
- private _activateTextureChannel(channel);
|
|
|
- private _removeDesignatedSlot(internalTexture);
|
|
|
+ private activateTextureChannel(textureChannel);
|
|
|
_bindTextureDirectly(target: number, texture: Nullable<InternalTexture>): void;
|
|
|
_bindTexture(channel: number, texture: Nullable<InternalTexture>): void;
|
|
|
setTextureFromPostProcess(channel: number, postProcess: Nullable<PostProcess>): void;
|
|
|
unbindAllTextures(): void;
|
|
|
setTexture(channel: number, uniform: Nullable<WebGLUniformLocation>, texture: Nullable<BaseTexture>): void;
|
|
|
- private _getCorrectTextureChannel(channel, internalTexture);
|
|
|
- private _bindSamplerUniformToChannel(sourceSlot, destination);
|
|
|
private _setTexture(channel, texture);
|
|
|
setTextureArray(channel: number, uniform: Nullable<WebGLUniformLocation>, textures: BaseTexture[]): void;
|
|
|
_setAnisotropicLevel(key: number, texture: BaseTexture): void;
|
|
@@ -4871,6 +4865,69 @@ declare var WebGLVertexArrayObject: {
|
|
|
};
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class KeyboardEventTypes {
|
|
|
+ static _KEYDOWN: number;
|
|
|
+ static _KEYUP: number;
|
|
|
+ static readonly KEYDOWN: number;
|
|
|
+ static readonly KEYUP: number;
|
|
|
+ }
|
|
|
+ class KeyboardInfo {
|
|
|
+ type: number;
|
|
|
+ event: KeyboardEvent;
|
|
|
+ constructor(type: number, event: KeyboardEvent);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * This class is used to store keyboard related info for the onPreKeyboardObservable event.
|
|
|
+ * Set the skipOnKeyboardObservable property to true if you want the engine to stop any process after this event is triggered, even not calling onKeyboardObservable
|
|
|
+ */
|
|
|
+ class KeyboardInfoPre extends KeyboardInfo {
|
|
|
+ constructor(type: number, event: KeyboardEvent);
|
|
|
+ skipOnPointerObservable: boolean;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class PointerEventTypes {
|
|
|
+ static _POINTERDOWN: number;
|
|
|
+ static _POINTERUP: number;
|
|
|
+ static _POINTERMOVE: number;
|
|
|
+ static _POINTERWHEEL: number;
|
|
|
+ static _POINTERPICK: number;
|
|
|
+ static _POINTERTAP: number;
|
|
|
+ static _POINTERDOUBLETAP: number;
|
|
|
+ static readonly POINTERDOWN: number;
|
|
|
+ static readonly POINTERUP: number;
|
|
|
+ static readonly POINTERMOVE: number;
|
|
|
+ static readonly POINTERWHEEL: number;
|
|
|
+ static readonly POINTERPICK: number;
|
|
|
+ static readonly POINTERTAP: number;
|
|
|
+ static readonly POINTERDOUBLETAP: number;
|
|
|
+ }
|
|
|
+ class PointerInfoBase {
|
|
|
+ type: number;
|
|
|
+ event: PointerEvent | MouseWheelEvent;
|
|
|
+ constructor(type: number, event: PointerEvent | MouseWheelEvent);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * This class is used to store pointer related info for the onPrePointerObservable event.
|
|
|
+ * Set the skipOnPointerObservable property to true if you want the engine to stop any process after this event is triggered, even not calling onPointerObservable
|
|
|
+ */
|
|
|
+ class PointerInfoPre extends PointerInfoBase {
|
|
|
+ constructor(type: number, event: PointerEvent | MouseWheelEvent, localX: number, localY: number);
|
|
|
+ localPosition: Vector2;
|
|
|
+ skipOnPointerObservable: boolean;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * This type contains all the data related to a pointer event in Babylon.js.
|
|
|
+ * The event member is an instance of PointerEvent for all types except PointerWheel and is of type MouseWheelEvent when type equals PointerWheel. The different event types can be found in the PointerEventTypes class.
|
|
|
+ */
|
|
|
+ class PointerInfo extends PointerInfoBase {
|
|
|
+ pickInfo: Nullable<PickingInfo>;
|
|
|
+ constructor(type: number, event: PointerEvent | MouseWheelEvent, pickInfo: Nullable<PickingInfo>);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class StickValues {
|
|
|
x: number;
|
|
|
y: number;
|
|
@@ -4925,23 +4982,24 @@ declare module BABYLON {
|
|
|
|
|
|
declare module BABYLON {
|
|
|
class GamepadManager {
|
|
|
+ private _scene;
|
|
|
private _babylonGamepads;
|
|
|
private _oneGamepadConnected;
|
|
|
- private _isMonitoring;
|
|
|
+ _isMonitoring: boolean;
|
|
|
private _gamepadEventSupported;
|
|
|
private _gamepadSupport;
|
|
|
onGamepadConnectedObservable: Observable<Gamepad>;
|
|
|
onGamepadDisconnectedObservable: Observable<Gamepad>;
|
|
|
private _onGamepadConnectedEvent;
|
|
|
private _onGamepadDisconnectedEvent;
|
|
|
- constructor();
|
|
|
+ constructor(_scene?: Scene | undefined);
|
|
|
readonly gamepads: Gamepad[];
|
|
|
getGamepadByType(type?: number): Nullable<Gamepad>;
|
|
|
dispose(): void;
|
|
|
private _addNewGamepad(gamepad);
|
|
|
private _startMonitoringGamepads();
|
|
|
private _stopMonitoringGamepads();
|
|
|
- private _checkGamepadsStatus();
|
|
|
+ _checkGamepadsStatus(): void;
|
|
|
private _updateGamepadObjects();
|
|
|
}
|
|
|
}
|
|
@@ -5313,69 +5371,6 @@ declare namespace BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class KeyboardEventTypes {
|
|
|
- static _KEYDOWN: number;
|
|
|
- static _KEYUP: number;
|
|
|
- static readonly KEYDOWN: number;
|
|
|
- static readonly KEYUP: number;
|
|
|
- }
|
|
|
- class KeyboardInfo {
|
|
|
- type: number;
|
|
|
- event: KeyboardEvent;
|
|
|
- constructor(type: number, event: KeyboardEvent);
|
|
|
- }
|
|
|
- /**
|
|
|
- * This class is used to store keyboard related info for the onPreKeyboardObservable event.
|
|
|
- * Set the skipOnKeyboardObservable property to true if you want the engine to stop any process after this event is triggered, even not calling onKeyboardObservable
|
|
|
- */
|
|
|
- class KeyboardInfoPre extends KeyboardInfo {
|
|
|
- constructor(type: number, event: KeyboardEvent);
|
|
|
- skipOnPointerObservable: boolean;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class PointerEventTypes {
|
|
|
- static _POINTERDOWN: number;
|
|
|
- static _POINTERUP: number;
|
|
|
- static _POINTERMOVE: number;
|
|
|
- static _POINTERWHEEL: number;
|
|
|
- static _POINTERPICK: number;
|
|
|
- static _POINTERTAP: number;
|
|
|
- static _POINTERDOUBLETAP: number;
|
|
|
- static readonly POINTERDOWN: number;
|
|
|
- static readonly POINTERUP: number;
|
|
|
- static readonly POINTERMOVE: number;
|
|
|
- static readonly POINTERWHEEL: number;
|
|
|
- static readonly POINTERPICK: number;
|
|
|
- static readonly POINTERTAP: number;
|
|
|
- static readonly POINTERDOUBLETAP: number;
|
|
|
- }
|
|
|
- class PointerInfoBase {
|
|
|
- type: number;
|
|
|
- event: PointerEvent | MouseWheelEvent;
|
|
|
- constructor(type: number, event: PointerEvent | MouseWheelEvent);
|
|
|
- }
|
|
|
- /**
|
|
|
- * This class is used to store pointer related info for the onPrePointerObservable event.
|
|
|
- * Set the skipOnPointerObservable property to true if you want the engine to stop any process after this event is triggered, even not calling onPointerObservable
|
|
|
- */
|
|
|
- class PointerInfoPre extends PointerInfoBase {
|
|
|
- constructor(type: number, event: PointerEvent | MouseWheelEvent, localX: number, localY: number);
|
|
|
- localPosition: Vector2;
|
|
|
- skipOnPointerObservable: boolean;
|
|
|
- }
|
|
|
- /**
|
|
|
- * This type contains all the data related to a pointer event in Babylon.js.
|
|
|
- * The event member is an instance of PointerEvent for all types except PointerWheel and is of type MouseWheelEvent when type equals PointerWheel. The different event types can be found in the PointerEventTypes class.
|
|
|
- */
|
|
|
- class PointerInfo extends PointerInfoBase {
|
|
|
- pickInfo: Nullable<PickingInfo>;
|
|
|
- constructor(type: number, event: PointerEvent | MouseWheelEvent, pickInfo: Nullable<PickingInfo>);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
/**
|
|
|
* This class can be used to get instrumentation data from a Babylon engine
|
|
|
*/
|
|
@@ -8726,9 +8721,21 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* Normalize the current Vector3.
|
|
|
* Returns the updated Vector3.
|
|
|
+ * /!\ In place operation.
|
|
|
*/
|
|
|
normalize(): Vector3;
|
|
|
/**
|
|
|
+ * Normalize the current Vector3 to a new vector.
|
|
|
+ * @returns the new Vector3.
|
|
|
+ */
|
|
|
+ normalizeToNew(): Vector3;
|
|
|
+ /**
|
|
|
+ * Normalize the current Vector3 to the reference.
|
|
|
+ * @param the reference to update.
|
|
|
+ * @returns the updated Vector3.
|
|
|
+ */
|
|
|
+ normalizeToRef(reference: Vector3): Vector3;
|
|
|
+ /**
|
|
|
* Returns a new Vector3 copied from the current Vector3.
|
|
|
*/
|
|
|
clone(): Vector3;
|
|
@@ -11519,6 +11526,8 @@ declare module BABYLON {
|
|
|
* Returns the Mesh.
|
|
|
*/
|
|
|
refreshBoundingInfo(): Mesh;
|
|
|
+ _refreshBoundingInfo(applySkeleton: boolean): Mesh;
|
|
|
+ private _getPositionData(applySkeleton);
|
|
|
_createGlobalSubMesh(force: boolean): Nullable<SubMesh>;
|
|
|
subdivide(count: number): void;
|
|
|
/**
|
|
@@ -13489,6 +13498,15 @@ declare module BABYLON {
|
|
|
*/
|
|
|
locallyTranslate(vector3: Vector3): TransformNode;
|
|
|
private static _lookAtVectorCache;
|
|
|
+ /**
|
|
|
+ * Orients a mesh towards a target point. Mesh must be drawn facing user.
|
|
|
+ * @param targetPoint the position (must be in same space as current mesh) to look at
|
|
|
+ * @param yawCor optional yaw (y-axis) correction in radians
|
|
|
+ * @param pitchCor optional pitch (x-axis) correction in radians
|
|
|
+ * @param rollCor optional roll (z-axis) correction in radians
|
|
|
+ * @param space the choosen space of the target
|
|
|
+ * @returns the TransformNode.
|
|
|
+ */
|
|
|
lookAt(targetPoint: Vector3, yawCor?: number, pitchCor?: number, rollCor?: number, space?: Space): TransformNode;
|
|
|
/**
|
|
|
* Returns a new Vector3 what is the localAxis, expressed in the mesh local space, rotated like the mesh.
|
|
@@ -14439,10 +14457,17 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* The strenght of the force in correspondence to the distance of the affected object
|
|
|
*/
|
|
|
- enum PhysicsRadialImpulseFallof {
|
|
|
+ enum PhysicsRadialImpulseFalloff {
|
|
|
Constant = 0,
|
|
|
Linear = 1,
|
|
|
}
|
|
|
+ /**
|
|
|
+ * The strenght of the force in correspondence to the distance of the affected object
|
|
|
+ */
|
|
|
+ enum PhysicsUpdraftMode {
|
|
|
+ Center = 0,
|
|
|
+ Perpendicular = 1,
|
|
|
+ }
|
|
|
class PhysicsHelper {
|
|
|
private _scene;
|
|
|
private _physicsEngine;
|
|
@@ -14451,33 +14476,41 @@ declare module BABYLON {
|
|
|
* @param {Vector3} origin the origin of the explosion
|
|
|
* @param {number} radius the explosion radius
|
|
|
* @param {number} strength the explosion strength
|
|
|
- * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
|
|
|
+ * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
|
|
|
*/
|
|
|
- applyRadialExplosionImpulse(origin: Vector3, radius: number, strength: number, falloff?: PhysicsRadialImpulseFallof): Nullable<PhysicsRadialExplosionEvent>;
|
|
|
+ applyRadialExplosionImpulse(origin: Vector3, radius: number, strength: number, falloff?: PhysicsRadialImpulseFalloff): Nullable<PhysicsRadialExplosionEvent>;
|
|
|
/**
|
|
|
* @param {Vector3} origin the origin of the explosion
|
|
|
* @param {number} radius the explosion radius
|
|
|
* @param {number} strength the explosion strength
|
|
|
- * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
|
|
|
+ * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
|
|
|
*/
|
|
|
- applyRadialExplosionForce(origin: Vector3, radius: number, strength: number, falloff?: PhysicsRadialImpulseFallof): Nullable<PhysicsRadialExplosionEvent>;
|
|
|
+ applyRadialExplosionForce(origin: Vector3, radius: number, strength: number, falloff?: PhysicsRadialImpulseFalloff): Nullable<PhysicsRadialExplosionEvent>;
|
|
|
/**
|
|
|
* @param {Vector3} origin the origin of the explosion
|
|
|
* @param {number} radius the explosion radius
|
|
|
* @param {number} strength the explosion strength
|
|
|
- * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear. Defaults to Constant
|
|
|
+ * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear. Defaults to Constant
|
|
|
+ */
|
|
|
+ gravitationalField(origin: Vector3, radius: number, strength: number, falloff?: PhysicsRadialImpulseFalloff): Nullable<PhysicsGravitationalFieldEvent>;
|
|
|
+ /**
|
|
|
+ * @param {Vector3} origin the origin of the updraft
|
|
|
+ * @param {number} radius the radius of the updraft
|
|
|
+ * @param {number} strength the strength of the updraft
|
|
|
+ * @param {number} height the height of the updraft
|
|
|
*/
|
|
|
- gravitationalField(origin: Vector3, radius: number, strength: number, falloff?: PhysicsRadialImpulseFallof): Nullable<PhysicsGravitationalFieldEvent>;
|
|
|
+ updraft(origin: Vector3, radius: number, strength: number, height: number, updraftMode: PhysicsUpdraftMode): Nullable<PhysicsUpdraftEvent>;
|
|
|
}
|
|
|
/***** Radial explosion *****/
|
|
|
class PhysicsRadialExplosionEvent {
|
|
|
private _scene;
|
|
|
- private _radialSphere;
|
|
|
+ private _sphere;
|
|
|
+ private _sphereOptions;
|
|
|
private _rays;
|
|
|
private _dataFetched;
|
|
|
constructor(scene: Scene);
|
|
|
/**
|
|
|
- * Returns the data related to the radial explosion event (radialSphere & rays).
|
|
|
+ * Returns the data related to the radial explosion event (sphere & rays).
|
|
|
* @returns {PhysicsRadialExplosionEventData}
|
|
|
*/
|
|
|
getData(): PhysicsRadialExplosionEventData;
|
|
@@ -14487,26 +14520,18 @@ declare module BABYLON {
|
|
|
* @param {Vector3} origin the origin of the explosion
|
|
|
* @param {number} radius the explosion radius
|
|
|
* @param {number} strength the explosion strength
|
|
|
- * @param {PhysicsRadialImpulseFallof} falloff possible options: Constant & Linear
|
|
|
+ * @param {PhysicsRadialImpulseFalloff} falloff possible options: Constant & Linear
|
|
|
* @returns {Nullable<PhysicsForceAndContactPoint>}
|
|
|
*/
|
|
|
- getImpostorForceAndContactPoint(impostor: PhysicsImpostor, origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFallof): Nullable<PhysicsForceAndContactPoint>;
|
|
|
+ getImpostorForceAndContactPoint(impostor: PhysicsImpostor, origin: Vector3, radius: number, strength: number, falloff: PhysicsRadialImpulseFalloff): Nullable<PhysicsForceAndContactPoint>;
|
|
|
/**
|
|
|
- * Disposes the radialSphere.
|
|
|
+ * Disposes the sphere.
|
|
|
* @param {bolean} force
|
|
|
*/
|
|
|
dispose(force?: boolean): void;
|
|
|
/*** Helpers ***/
|
|
|
- private _prepareRadialSphere();
|
|
|
- private _intersectsWithRadialSphere(impostor, origin, radius);
|
|
|
- }
|
|
|
- interface PhysicsRadialExplosionEventData {
|
|
|
- radialSphere: Mesh;
|
|
|
- rays: Array<Ray>;
|
|
|
- }
|
|
|
- interface PhysicsForceAndContactPoint {
|
|
|
- force: Vector3;
|
|
|
- contactPoint: Vector3;
|
|
|
+ private _prepareSphere();
|
|
|
+ private _intersectsWithSphere(impostor, origin, radius);
|
|
|
}
|
|
|
/***** Gravitational Field *****/
|
|
|
class PhysicsGravitationalFieldEvent {
|
|
@@ -14517,11 +14542,11 @@ declare module BABYLON {
|
|
|
private _strength;
|
|
|
private _falloff;
|
|
|
private _tickCallback;
|
|
|
- private _radialSphere;
|
|
|
+ private _sphere;
|
|
|
private _dataFetched;
|
|
|
- constructor(physicsHelper: PhysicsHelper, scene: Scene, origin: Vector3, radius: number, strength: number, falloff?: PhysicsRadialImpulseFallof);
|
|
|
+ constructor(physicsHelper: PhysicsHelper, scene: Scene, origin: Vector3, radius: number, strength: number, falloff?: PhysicsRadialImpulseFalloff);
|
|
|
/**
|
|
|
- * Returns the data related to the gravitational field event (radialSphere).
|
|
|
+ * Returns the data related to the gravitational field event (sphere).
|
|
|
* @returns {PhysicsGravitationalFieldEventData}
|
|
|
*/
|
|
|
getData(): PhysicsGravitationalFieldEventData;
|
|
@@ -14534,14 +14559,66 @@ declare module BABYLON {
|
|
|
*/
|
|
|
disable(): void;
|
|
|
/**
|
|
|
- * Disposes the radialSphere.
|
|
|
+ * Disposes the sphere.
|
|
|
* @param {bolean} force
|
|
|
*/
|
|
|
dispose(force?: boolean): void;
|
|
|
private _tick();
|
|
|
}
|
|
|
interface PhysicsGravitationalFieldEventData {
|
|
|
- radialSphere: Mesh;
|
|
|
+ sphere: Mesh;
|
|
|
+ }
|
|
|
+ /***** Updraft *****/
|
|
|
+ class PhysicsUpdraftEvent {
|
|
|
+ private _physicsEngine;
|
|
|
+ private _scene;
|
|
|
+ private _origin;
|
|
|
+ private _originTop;
|
|
|
+ private _originDirection;
|
|
|
+ private _radius;
|
|
|
+ private _strength;
|
|
|
+ private _height;
|
|
|
+ private _updraftMode;
|
|
|
+ private _tickCallback;
|
|
|
+ private _cylinder;
|
|
|
+ private _cylinderPosition;
|
|
|
+ private _dataFetched;
|
|
|
+ constructor(physicsEngine: PhysicsEngine, scene: Scene, origin: Vector3, radius: number, strength: number, height: number, updraftMode: PhysicsUpdraftMode);
|
|
|
+ /**
|
|
|
+ * Returns the data related to the updraft event (cylinder).
|
|
|
+ * @returns {PhysicsGravitationalFieldEventData}
|
|
|
+ */
|
|
|
+ getData(): PhysicsUpdraftEventData;
|
|
|
+ /**
|
|
|
+ * Enables the updraft.
|
|
|
+ */
|
|
|
+ enable(): void;
|
|
|
+ /**
|
|
|
+ * Disables the cortex.
|
|
|
+ */
|
|
|
+ disable(): void;
|
|
|
+ /**
|
|
|
+ * Disposes the sphere.
|
|
|
+ * @param {bolean} force
|
|
|
+ */
|
|
|
+ dispose(force?: boolean): void;
|
|
|
+ private getImpostorForceAndContactPoint(impostor);
|
|
|
+ private _tick();
|
|
|
+ /*** Helpers ***/
|
|
|
+ private _prepareCylinder();
|
|
|
+ private _intersectsWithCylinder(impostor);
|
|
|
+ }
|
|
|
+ /***** Data interfaces *****/
|
|
|
+ interface PhysicsRadialExplosionEventData {
|
|
|
+ sphere: Mesh;
|
|
|
+ rays: Array<Ray>;
|
|
|
+ }
|
|
|
+ interface PhysicsForceAndContactPoint {
|
|
|
+ force: Vector3;
|
|
|
+ contactPoint: Vector3;
|
|
|
+ }
|
|
|
+ interface PhysicsUpdraftEventData {
|
|
|
+ cylinder: Mesh;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -14863,36 +14940,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 AnaglyphPostProcess extends PostProcess {
|
|
|
private _passedProcess;
|
|
|
constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
|
|
@@ -15420,6 +15467,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 BoundingBoxRenderer {
|
|
|
frontColor: Color3;
|
|
|
backColor: Color3;
|
|
@@ -17569,9 +17646,10 @@ declare module BABYLON {
|
|
|
private _onVRDisplayChanged;
|
|
|
private _onVRRequestPresentStart;
|
|
|
private _onVRRequestPresentComplete;
|
|
|
- onEnteringVR: () => void;
|
|
|
- onExitingVR: () => void;
|
|
|
- onControllerMeshLoaded: (controller: WebVRController) => void;
|
|
|
+ onEnteringVR: Observable<{}>;
|
|
|
+ onExitingVR: Observable<{}>;
|
|
|
+ onControllerMeshLoaded: Observable<WebVRController>;
|
|
|
+ private _rayLength;
|
|
|
private _useCustomVRButton;
|
|
|
private _teleportationRequested;
|
|
|
private _teleportationEnabledOnLeftController;
|
|
@@ -17591,9 +17669,27 @@ declare module BABYLON {
|
|
|
private _teleportationBorderColor;
|
|
|
private _rotationAngle;
|
|
|
private _haloCenter;
|
|
|
- private _rayHelper;
|
|
|
private _gazeTracker;
|
|
|
+ private _padSensibilityUp;
|
|
|
+ private _padSensibilityDown;
|
|
|
+ private _leftLaserPointer;
|
|
|
+ private _rightLaserPointer;
|
|
|
+ private _currentMeshSelected;
|
|
|
+ onNewMeshSelected: Observable<AbstractMesh>;
|
|
|
+ private _circleEase;
|
|
|
+ private _raySelectionPredicate;
|
|
|
+ /**
|
|
|
+ * To be optionaly changed by user to define custom ray selection
|
|
|
+ */
|
|
|
+ raySelectionPredicate: (mesh: AbstractMesh) => boolean;
|
|
|
+ /**
|
|
|
+ * To be optionaly changed by user to define custom selection logic (after ray selection)
|
|
|
+ */
|
|
|
meshSelectionPredicate: (mesh: AbstractMesh) => boolean;
|
|
|
+ private _currentHit;
|
|
|
+ private _pointerDownOnMeshAsked;
|
|
|
+ private _isActionableMesh;
|
|
|
+ private _defaultHeight;
|
|
|
readonly deviceOrientationCamera: DeviceOrientationCamera;
|
|
|
readonly currentVRCamera: FreeCamera;
|
|
|
readonly webVRCamera: WebVRFreeCamera;
|
|
@@ -17623,9 +17719,12 @@ declare module BABYLON {
|
|
|
private _displayTeleportationCircle();
|
|
|
private _hideTeleportationCircle();
|
|
|
private _rotateCamera(right);
|
|
|
- private _moveTeleportationSelectorTo(coordinates);
|
|
|
+ private _moveTeleportationSelectorTo(hit);
|
|
|
+ private _workingVector;
|
|
|
private _teleportCamera();
|
|
|
private _castRayAndSelectObject();
|
|
|
+ changeLaserColor(color: Color3): void;
|
|
|
+ changeGazeColor(color: Color3): void;
|
|
|
dispose(): void;
|
|
|
getClassName(): string;
|
|
|
}
|
|
@@ -17666,6 +17765,8 @@ declare module BABYLON {
|
|
|
defaultLightingOnControllers?: boolean;
|
|
|
useCustomVRButton?: boolean;
|
|
|
customVRButton?: HTMLButtonElement;
|
|
|
+ rayLength?: number;
|
|
|
+ defaultHeight?: number;
|
|
|
}
|
|
|
class WebVRFreeCamera extends FreeCamera implements PoseControlled {
|
|
|
private webVROptions;
|
|
@@ -18621,10 +18722,15 @@ declare module BABYLON {
|
|
|
protected _forceAlphaTest: boolean;
|
|
|
/**
|
|
|
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
|
|
|
- * And/Or occlude the blended part.
|
|
|
+ * And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)
|
|
|
*/
|
|
|
protected _useAlphaFresnel: boolean;
|
|
|
/**
|
|
|
+ * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
|
|
|
+ * And/Or occlude the blended part. (alpha stays linear to compute the fresnel)
|
|
|
+ */
|
|
|
+ protected _useLinearAlphaFresnel: boolean;
|
|
|
+ /**
|
|
|
* The transparency mode of the material.
|
|
|
*/
|
|
|
protected _transparencyMode: Nullable<number>;
|
|
@@ -18768,10 +18874,13 @@ declare module BABYLON.Internals {
|
|
|
* If sets to true and backfaceCulling is false, normals will be flipped on the backside.
|
|
|
*/
|
|
|
doubleSided: boolean;
|
|
|
+ lightmapTexture: BaseTexture;
|
|
|
+ useLightmapAsShadowmap: boolean;
|
|
|
/**
|
|
|
* Return the active textures of the material.
|
|
|
*/
|
|
|
getActiveTextures(): BaseTexture[];
|
|
|
+ hasTexture(texture: BaseTexture): boolean;
|
|
|
/**
|
|
|
* Instantiates a new PBRMaterial instance.
|
|
|
*
|
|
@@ -19002,11 +19111,16 @@ declare module BABYLON {
|
|
|
twoSidedLighting: boolean;
|
|
|
/**
|
|
|
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
|
|
|
- * And/Or occlude the blended part.
|
|
|
+ * And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)
|
|
|
*/
|
|
|
useAlphaFresnel: boolean;
|
|
|
/**
|
|
|
* A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
|
|
|
+ * And/Or occlude the blended part. (alpha stays linear to compute the fresnel)
|
|
|
+ */
|
|
|
+ useLinearAlphaFresnel: boolean;
|
|
|
+ /**
|
|
|
+ * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
|
|
|
* And/Or occlude the blended part.
|
|
|
*/
|
|
|
environmentBRDFTexture: Nullable<BaseTexture>;
|
|
@@ -19526,8 +19640,6 @@ declare module BABYLON {
|
|
|
baseHeight: number;
|
|
|
baseDepth: number;
|
|
|
invertY: boolean;
|
|
|
- _initialSlot: number;
|
|
|
- _designatedSlot: number;
|
|
|
_dataSource: number;
|
|
|
_buffer: Nullable<ArrayBuffer | HTMLImageElement>;
|
|
|
_bufferView: Nullable<ArrayBufferView>;
|
|
@@ -19634,13 +19746,13 @@ declare module BABYLON {
|
|
|
class RawTexture extends Texture {
|
|
|
format: number;
|
|
|
private _engine;
|
|
|
- constructor(data: ArrayBufferView, width: number, height: number, format: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number);
|
|
|
+ constructor(data: ArrayBufferView, width: number, height: number, format: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number, type?: number);
|
|
|
update(data: ArrayBufferView): void;
|
|
|
static CreateLuminanceTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
|
|
|
static CreateLuminanceAlphaTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
|
|
|
static CreateAlphaTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
|
|
|
- static CreateRGBTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
|
|
|
- static CreateRGBATexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number): RawTexture;
|
|
|
+ static CreateRGBTexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number, type?: number): RawTexture;
|
|
|
+ static CreateRGBATexture(data: ArrayBufferView, width: number, height: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number, type?: number): RawTexture;
|
|
|
}
|
|
|
}
|
|
|
|