|
@@ -1704,6 +1704,12 @@ declare module BABYLON {
|
|
* @param {boolean} fullDetails - support for multiple levels of logging within scene loading
|
|
* @param {boolean} fullDetails - support for multiple levels of logging within scene loading
|
|
*/
|
|
*/
|
|
toString(fullDetails?: boolean): string;
|
|
toString(fullDetails?: boolean): string;
|
|
|
|
+ /**
|
|
|
|
+ * Get bone's index searching by name
|
|
|
|
+ * @param {string} name is bone's name to search for
|
|
|
|
+ * @return {number} Indice of the bone. Returns -1 if not found
|
|
|
|
+ */
|
|
|
|
+ getBoneIndexByName(name: string): number;
|
|
createAnimationRange(name: string, from: number, to: number): void;
|
|
createAnimationRange(name: string, from: number, to: number): void;
|
|
deleteAnimationRange(name: string, deleteFrames?: boolean): void;
|
|
deleteAnimationRange(name: string, deleteFrames?: boolean): void;
|
|
getAnimationRange(name: string): AnimationRange;
|
|
getAnimationRange(name: string): AnimationRange;
|
|
@@ -2002,8 +2008,6 @@ declare module BABYLON {
|
|
targetScreenOffset: Vector2;
|
|
targetScreenOffset: Vector2;
|
|
allowUpsideDown: boolean;
|
|
allowUpsideDown: boolean;
|
|
_viewMatrix: Matrix;
|
|
_viewMatrix: Matrix;
|
|
- _attachedElement: HTMLElement;
|
|
|
|
- _noPreventDefault: boolean;
|
|
|
|
_useCtrlForPanning: boolean;
|
|
_useCtrlForPanning: boolean;
|
|
inputs: ArcRotateCameraInputsManager;
|
|
inputs: ArcRotateCameraInputsManager;
|
|
_reset: () => void;
|
|
_reset: () => void;
|
|
@@ -2175,6 +2179,7 @@ declare module BABYLON {
|
|
class CameraInputsManager<TCamera extends BABYLON.Camera> {
|
|
class CameraInputsManager<TCamera extends BABYLON.Camera> {
|
|
attached: CameraInputsMap<TCamera>;
|
|
attached: CameraInputsMap<TCamera>;
|
|
attachedElement: HTMLElement;
|
|
attachedElement: HTMLElement;
|
|
|
|
+ noPreventDefault: boolean;
|
|
camera: TCamera;
|
|
camera: TCamera;
|
|
checkInputs: () => void;
|
|
checkInputs: () => void;
|
|
constructor(camera: TCamera);
|
|
constructor(camera: TCamera);
|
|
@@ -2182,9 +2187,10 @@ declare module BABYLON {
|
|
remove(inputToRemove: ICameraInput<TCamera>): void;
|
|
remove(inputToRemove: ICameraInput<TCamera>): void;
|
|
removeByType(inputType: string): void;
|
|
removeByType(inputType: string): void;
|
|
private _addCheckInputs(fn);
|
|
private _addCheckInputs(fn);
|
|
|
|
+ attachInput(input: ICameraInput<TCamera>): void;
|
|
attachElement(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
attachElement(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
detachElement(element: HTMLElement): void;
|
|
detachElement(element: HTMLElement): void;
|
|
- rebuildInputCheck(element: HTMLElement): void;
|
|
|
|
|
|
+ rebuildInputCheck(): void;
|
|
clear(): void;
|
|
clear(): void;
|
|
serialize(serializedCamera: any): void;
|
|
serialize(serializedCamera: any): void;
|
|
parse(parsedCamera: any): void;
|
|
parse(parsedCamera: any): void;
|
|
@@ -2244,8 +2250,6 @@ declare module BABYLON {
|
|
private _oldPosition;
|
|
private _oldPosition;
|
|
private _diffPosition;
|
|
private _diffPosition;
|
|
private _newPosition;
|
|
private _newPosition;
|
|
- _attachedElement: HTMLElement;
|
|
|
|
- _noPreventDefault: boolean;
|
|
|
|
_localDirection: Vector3;
|
|
_localDirection: Vector3;
|
|
_transformedDirection: Vector3;
|
|
_transformedDirection: Vector3;
|
|
constructor(name: string, position: Vector3, scene: Scene);
|
|
constructor(name: string, position: Vector3, scene: Scene);
|
|
@@ -2391,93 +2395,46 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class BoundingBox {
|
|
|
|
- minimum: Vector3;
|
|
|
|
- maximum: Vector3;
|
|
|
|
- vectors: Vector3[];
|
|
|
|
- center: Vector3;
|
|
|
|
- extendSize: 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 {
|
|
|
|
- class BoundingInfo {
|
|
|
|
- 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;
|
|
|
|
- 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;
|
|
|
|
|
|
+ class LensFlare {
|
|
|
|
+ size: number;
|
|
|
|
+ position: number;
|
|
|
|
+ color: Color3;
|
|
|
|
+ texture: Texture;
|
|
|
|
+ private _system;
|
|
|
|
+ constructor(size: number, position: number, color: any, imgUrl: string, system: LensFlareSystem);
|
|
|
|
+ dispose: () => void;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class Ray {
|
|
|
|
- origin: Vector3;
|
|
|
|
- direction: Vector3;
|
|
|
|
- length: number;
|
|
|
|
- private _edge1;
|
|
|
|
- private _edge2;
|
|
|
|
- private _pvec;
|
|
|
|
- private _tvec;
|
|
|
|
- private _qvec;
|
|
|
|
- constructor(origin: Vector3, direction: Vector3, length?: number);
|
|
|
|
- intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
|
|
|
|
- intersectsBox(box: BoundingBox): boolean;
|
|
|
|
- intersectsSphere(sphere: any): boolean;
|
|
|
|
- intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
|
|
|
|
- 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;
|
|
|
|
|
|
+ class LensFlareSystem {
|
|
|
|
+ name: string;
|
|
|
|
+ lensFlares: LensFlare[];
|
|
|
|
+ borderLimit: number;
|
|
|
|
+ meshesSelectionPredicate: (mesh: Mesh) => boolean;
|
|
|
|
+ layerMask: number;
|
|
|
|
+ private _scene;
|
|
|
|
+ private _emitter;
|
|
|
|
+ private _vertexDeclaration;
|
|
|
|
+ private _vertexStrideSize;
|
|
|
|
+ private _vertexBuffer;
|
|
|
|
+ private _indexBuffer;
|
|
|
|
+ private _effect;
|
|
|
|
+ private _positionX;
|
|
|
|
+ private _positionY;
|
|
|
|
+ private _isEnabled;
|
|
|
|
+ constructor(name: string, emitter: any, scene: Scene);
|
|
|
|
+ isEnabled: boolean;
|
|
|
|
+ getScene(): Scene;
|
|
|
|
+ getEmitter(): any;
|
|
|
|
+ setEmitter(newEmitter: any): void;
|
|
|
|
+ getEmitterPosition(): Vector3;
|
|
|
|
+ computeEffectivePosition(globalViewport: Viewport): boolean;
|
|
|
|
+ _isVisible(): boolean;
|
|
|
|
+ render(): boolean;
|
|
|
|
+ dispose(): void;
|
|
|
|
+ static Parse(parsedLensFlareSystem: any, scene: Scene, rootUrl: string): LensFlareSystem;
|
|
|
|
+ serialize(): any;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2593,46 +2550,93 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
- class LensFlare {
|
|
|
|
- size: number;
|
|
|
|
- position: number;
|
|
|
|
- color: Color3;
|
|
|
|
- texture: Texture;
|
|
|
|
- private _system;
|
|
|
|
- constructor(size: number, position: number, color: any, imgUrl: string, system: LensFlareSystem);
|
|
|
|
- dispose: () => void;
|
|
|
|
|
|
+ class BoundingBox {
|
|
|
|
+ minimum: Vector3;
|
|
|
|
+ maximum: Vector3;
|
|
|
|
+ vectors: Vector3[];
|
|
|
|
+ center: Vector3;
|
|
|
|
+ extendSize: 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 {
|
|
declare module BABYLON {
|
|
- class LensFlareSystem {
|
|
|
|
- name: string;
|
|
|
|
- lensFlares: LensFlare[];
|
|
|
|
- borderLimit: number;
|
|
|
|
- meshesSelectionPredicate: (mesh: Mesh) => boolean;
|
|
|
|
- layerMask: number;
|
|
|
|
- private _scene;
|
|
|
|
- private _emitter;
|
|
|
|
- private _vertexDeclaration;
|
|
|
|
- private _vertexStrideSize;
|
|
|
|
- private _vertexBuffer;
|
|
|
|
- private _indexBuffer;
|
|
|
|
- private _effect;
|
|
|
|
- private _positionX;
|
|
|
|
- private _positionY;
|
|
|
|
- private _isEnabled;
|
|
|
|
- constructor(name: string, emitter: any, scene: Scene);
|
|
|
|
- isEnabled: boolean;
|
|
|
|
- getScene(): Scene;
|
|
|
|
- getEmitter(): any;
|
|
|
|
- setEmitter(newEmitter: any): void;
|
|
|
|
- getEmitterPosition(): Vector3;
|
|
|
|
- computeEffectivePosition(globalViewport: Viewport): boolean;
|
|
|
|
- _isVisible(): boolean;
|
|
|
|
- render(): boolean;
|
|
|
|
- dispose(): void;
|
|
|
|
- static Parse(parsedLensFlareSystem: any, scene: Scene, rootUrl: string): LensFlareSystem;
|
|
|
|
- serialize(): any;
|
|
|
|
|
|
+ class BoundingInfo {
|
|
|
|
+ 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;
|
|
|
|
+ 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;
|
|
|
|
+ constructor(origin: Vector3, direction: Vector3, length?: number);
|
|
|
|
+ intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
|
|
|
|
+ intersectsBox(box: BoundingBox): boolean;
|
|
|
|
+ intersectsSphere(sphere: any): boolean;
|
|
|
|
+ intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
|
|
|
|
+ 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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -7614,13 +7618,13 @@ declare module BABYLON {
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
class ArcRotateCameraPointersInput implements ICameraInput<ArcRotateCamera> {
|
|
class ArcRotateCameraPointersInput implements ICameraInput<ArcRotateCamera> {
|
|
camera: ArcRotateCamera;
|
|
camera: ArcRotateCamera;
|
|
- private _isRightClick;
|
|
|
|
- private _isCtrlPushed;
|
|
|
|
- pinchInwards: boolean;
|
|
|
|
angularSensibilityX: number;
|
|
angularSensibilityX: number;
|
|
angularSensibilityY: number;
|
|
angularSensibilityY: number;
|
|
pinchPrecision: number;
|
|
pinchPrecision: number;
|
|
panningSensibility: number;
|
|
panningSensibility: number;
|
|
|
|
+ private _isRightClick;
|
|
|
|
+ private _isCtrlPushed;
|
|
|
|
+ pinchInwards: boolean;
|
|
private _onKeyDown;
|
|
private _onKeyDown;
|
|
private _onKeyUp;
|
|
private _onKeyUp;
|
|
private _onPointerDown;
|
|
private _onPointerDown;
|
|
@@ -8210,11 +8214,11 @@ declare module BABYLON {
|
|
/**
|
|
/**
|
|
* Creates a video texture.
|
|
* Creates a video texture.
|
|
* Sample : https://doc.babylonjs.com/tutorials/01._Advanced_Texturing
|
|
* Sample : https://doc.babylonjs.com/tutorials/01._Advanced_Texturing
|
|
- * @param urlsOrVideo can be used to provide an array of urls or an already setup HTML video element.
|
|
|
|
- * @param scene is obviously the current scene.
|
|
|
|
- * @param generateMipMaps can be used to turn on mipmaps (Can be expensive for videoTextures because they are often updated).
|
|
|
|
- * @param invertY is false by default but can be used to invert video on Y axis
|
|
|
|
- * @param samplingMode controls the sampling method and is set to TRILINEAR_SAMPLINGMODE by default
|
|
|
|
|
|
+ * @param {Array} urlsOrVideo can be used to provide an array of urls or an already setup HTML video element.
|
|
|
|
+ * @param {BABYLON.Scene} scene is obviously the current scene.
|
|
|
|
+ * @param {boolean} generateMipMaps can be used to turn on mipmaps (Can be expensive for videoTextures because they are often updated).
|
|
|
|
+ * @param {boolean} invertY is false by default but can be used to invert video on Y axis
|
|
|
|
+ * @param {number} samplingMode controls the sampling method and is set to TRILINEAR_SAMPLINGMODE by default
|
|
*/
|
|
*/
|
|
constructor(name: string, urlsOrVideo: string[] | HTMLVideoElement, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number);
|
|
constructor(name: string, urlsOrVideo: string[] | HTMLVideoElement, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number);
|
|
update(): boolean;
|
|
update(): boolean;
|