|
@@ -3699,124 +3699,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;
|
|
|
- private _rayHelper;
|
|
|
- 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): IntersectionInfo;
|
|
|
- intersectsPlane(plane: Plane): 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 ArcRotateCamera extends TargetCamera {
|
|
|
alpha: number;
|
|
|
beta: number;
|
|
@@ -4294,6 +4176,134 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+declare module BABYLON.Debug {
|
|
|
+ class AxesViewer {
|
|
|
+ private _xline;
|
|
|
+ private _yline;
|
|
|
+ private _zline;
|
|
|
+ private _xmesh;
|
|
|
+ private _ymesh;
|
|
|
+ private _zmesh;
|
|
|
+ scene: Scene;
|
|
|
+ scaleLines: number;
|
|
|
+ constructor(scene: Scene, scaleLines?: number);
|
|
|
+ update(position: Vector3, xaxis: Vector3, yaxis: Vector3, zaxis: Vector3): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON.Debug {
|
|
|
+ class BoneAxesViewer extends Debug.AxesViewer {
|
|
|
+ mesh: Mesh;
|
|
|
+ bone: Bone;
|
|
|
+ pos: Vector3;
|
|
|
+ xaxis: Vector3;
|
|
|
+ yaxis: Vector3;
|
|
|
+ zaxis: Vector3;
|
|
|
+ constructor(scene: Scene, bone: Bone, mesh: Mesh, scaleLines?: number);
|
|
|
+ update(): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class DebugLayer {
|
|
|
+ private _scene;
|
|
|
+ static InspectorURL: string;
|
|
|
+ private _inspector;
|
|
|
+ constructor(scene: Scene);
|
|
|
+ /** Creates the inspector window. */
|
|
|
+ private _createInspector(config?);
|
|
|
+ isVisible(): boolean;
|
|
|
+ hide(): void;
|
|
|
+ show(config?: {
|
|
|
+ popup?: boolean;
|
|
|
+ initialTab?: number;
|
|
|
+ parentElement?: HTMLElement;
|
|
|
+ newColors?: {
|
|
|
+ backgroundColor?: string;
|
|
|
+ backgroundColorLighter?: string;
|
|
|
+ backgroundColorLighter2?: string;
|
|
|
+ backgroundColorLighter3?: string;
|
|
|
+ color?: string;
|
|
|
+ colorTop?: string;
|
|
|
+ colorBot?: string;
|
|
|
+ };
|
|
|
+ }): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON.Debug {
|
|
|
+ class PhysicsViewer {
|
|
|
+ protected _impostors: Array<PhysicsImpostor>;
|
|
|
+ protected _meshes: Array<AbstractMesh>;
|
|
|
+ protected _scene: Scene;
|
|
|
+ protected _numMeshes: number;
|
|
|
+ protected _physicsEnginePlugin: IPhysicsEnginePlugin;
|
|
|
+ private _renderFunction;
|
|
|
+ private _debugBoxMesh;
|
|
|
+ private _debugSphereMesh;
|
|
|
+ private _debugMaterial;
|
|
|
+ constructor(scene: Scene);
|
|
|
+ protected _updateDebugMeshes(): void;
|
|
|
+ showImpostor(impostor: PhysicsImpostor): void;
|
|
|
+ hideImpostor(impostor: PhysicsImpostor): void;
|
|
|
+ private _getDebugMaterial(scene);
|
|
|
+ private _getDebugBoxMesh(scene);
|
|
|
+ private _getDebugSphereMesh(scene);
|
|
|
+ private _getDebugMesh(impostor, scene);
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class RayHelper {
|
|
|
+ ray: Ray;
|
|
|
+ private _renderPoints;
|
|
|
+ private _renderLine;
|
|
|
+ private _renderFunction;
|
|
|
+ private _scene;
|
|
|
+ private _updateToMeshFunction;
|
|
|
+ private _attachedToMesh;
|
|
|
+ private _meshSpaceDirection;
|
|
|
+ private _meshSpaceOrigin;
|
|
|
+ static CreateAndShow(ray: Ray, scene: Scene, color: Color3): RayHelper;
|
|
|
+ constructor(ray: Ray);
|
|
|
+ show(scene: Scene, color: Color3): void;
|
|
|
+ hide(): void;
|
|
|
+ private _render();
|
|
|
+ attachToMesh(mesh: AbstractMesh, meshSpaceDirection?: Vector3, meshSpaceOrigin?: Vector3, length?: number): void;
|
|
|
+ detachFromMesh(): void;
|
|
|
+ private _updateToMesh();
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON.Debug {
|
|
|
+ /**
|
|
|
+ * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
|
+ */
|
|
|
+ class SkeletonViewer {
|
|
|
+ skeleton: Skeleton;
|
|
|
+ mesh: AbstractMesh;
|
|
|
+ autoUpdateBonesMatrices: boolean;
|
|
|
+ renderingGroupId: number;
|
|
|
+ color: Color3;
|
|
|
+ private _scene;
|
|
|
+ private _debugLines;
|
|
|
+ private _debugMesh;
|
|
|
+ private _isEnabled;
|
|
|
+ private _renderFunction;
|
|
|
+ constructor(skeleton: Skeleton, mesh: AbstractMesh, scene: Scene, autoUpdateBonesMatrices?: boolean, renderingGroupId?: number);
|
|
|
+ isEnabled: boolean;
|
|
|
+ private _getBonePosition(position, bone, meshMat, x?, y?, z?);
|
|
|
+ private _getLinesForBonesWithLength(bones, meshMat);
|
|
|
+ private _getLinesForBonesNoLength(bones, meshMat);
|
|
|
+ update(): void;
|
|
|
+ dispose(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
* Highlight layer options. This helps customizing the behaviour
|
|
@@ -4550,275 +4560,166 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-declare module BABYLON.Debug {
|
|
|
- class AxesViewer {
|
|
|
- private _xline;
|
|
|
- private _yline;
|
|
|
- private _zline;
|
|
|
- private _xmesh;
|
|
|
- private _ymesh;
|
|
|
- private _zmesh;
|
|
|
- scene: Scene;
|
|
|
- scaleLines: number;
|
|
|
- constructor(scene: Scene, scaleLines?: number);
|
|
|
- update(position: Vector3, xaxis: Vector3, yaxis: Vector3, zaxis: Vector3): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON.Debug {
|
|
|
- class BoneAxesViewer extends Debug.AxesViewer {
|
|
|
- mesh: Mesh;
|
|
|
- bone: Bone;
|
|
|
- pos: Vector3;
|
|
|
- xaxis: Vector3;
|
|
|
- yaxis: Vector3;
|
|
|
- zaxis: Vector3;
|
|
|
- constructor(scene: Scene, bone: Bone, mesh: Mesh, scaleLines?: number);
|
|
|
- update(): void;
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
declare module BABYLON {
|
|
|
- class DebugLayer {
|
|
|
- private _scene;
|
|
|
- static InspectorURL: string;
|
|
|
- private _inspector;
|
|
|
- constructor(scene: Scene);
|
|
|
- /** Creates the inspector window. */
|
|
|
- private _createInspector(config?);
|
|
|
- isVisible(): boolean;
|
|
|
- hide(): void;
|
|
|
- show(config?: {
|
|
|
- popup?: boolean;
|
|
|
- initialTab?: number;
|
|
|
- parentElement?: HTMLElement;
|
|
|
- newColors?: {
|
|
|
- backgroundColor?: string;
|
|
|
- backgroundColorLighter?: string;
|
|
|
- backgroundColorLighter2?: string;
|
|
|
- backgroundColorLighter3?: string;
|
|
|
- color?: string;
|
|
|
- colorTop?: string;
|
|
|
- colorBot?: string;
|
|
|
- };
|
|
|
- }): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON.Debug {
|
|
|
- class PhysicsViewer {
|
|
|
- protected _impostors: Array<PhysicsImpostor>;
|
|
|
- protected _meshes: Array<AbstractMesh>;
|
|
|
- protected _scene: Scene;
|
|
|
- protected _numMeshes: number;
|
|
|
- protected _physicsEnginePlugin: IPhysicsEnginePlugin;
|
|
|
- private _renderFunction;
|
|
|
- private _debugBoxMesh;
|
|
|
- private _debugSphereMesh;
|
|
|
- private _debugMaterial;
|
|
|
- constructor(scene: Scene);
|
|
|
- protected _updateDebugMeshes(): void;
|
|
|
- showImpostor(impostor: PhysicsImpostor): void;
|
|
|
- hideImpostor(impostor: PhysicsImpostor): void;
|
|
|
- private _getDebugMaterial(scene);
|
|
|
- private _getDebugBoxMesh(scene);
|
|
|
- private _getDebugSphereMesh(scene);
|
|
|
- private _getDebugMesh(impostor, scene);
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class RayHelper {
|
|
|
- ray: Ray;
|
|
|
- private _renderPoints;
|
|
|
- private _renderLine;
|
|
|
- private _renderFunction;
|
|
|
- private _scene;
|
|
|
- private _updateToMeshFunction;
|
|
|
- private _attachedToMesh;
|
|
|
- private _meshSpaceDirection;
|
|
|
- private _meshSpaceOrigin;
|
|
|
- static CreateAndShow(ray: Ray, scene: Scene, color: Color3): RayHelper;
|
|
|
- constructor(ray: Ray);
|
|
|
- show(scene: Scene, color: Color3): void;
|
|
|
- hide(): void;
|
|
|
- private _render();
|
|
|
- attachToMesh(mesh: AbstractMesh, meshSpaceDirection?: Vector3, meshSpaceOrigin?: Vector3, length?: number): void;
|
|
|
- detachFromMesh(): void;
|
|
|
- private _updateToMesh();
|
|
|
- dispose(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON.Debug {
|
|
|
- /**
|
|
|
- * Demo available here: http://www.babylonjs-playground.com/#1BZJVJ#8
|
|
|
- */
|
|
|
- class SkeletonViewer {
|
|
|
- skeleton: Skeleton;
|
|
|
- mesh: AbstractMesh;
|
|
|
- autoUpdateBonesMatrices: boolean;
|
|
|
- renderingGroupId: number;
|
|
|
- color: Color3;
|
|
|
- private _scene;
|
|
|
- private _debugLines;
|
|
|
- private _debugMesh;
|
|
|
- private _isEnabled;
|
|
|
- private _renderFunction;
|
|
|
- constructor(skeleton: Skeleton, mesh: AbstractMesh, scene: Scene, autoUpdateBonesMatrices?: boolean, renderingGroupId?: number);
|
|
|
- isEnabled: boolean;
|
|
|
- private _getBonePosition(position, bone, meshMat, x?, y?, z?);
|
|
|
- private _getLinesForBonesWithLength(bones, meshMat);
|
|
|
- private _getLinesForBonesNoLength(bones, meshMat);
|
|
|
- update(): void;
|
|
|
- dispose(): void;
|
|
|
+ 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 {
|
|
|
- class LensFlare {
|
|
|
- size: number;
|
|
|
- position: number;
|
|
|
- color: Color3;
|
|
|
- texture: Texture;
|
|
|
- alphaMode: number;
|
|
|
- private _system;
|
|
|
- constructor(size: number, position: number, color: any, imgUrl: string, system: LensFlareSystem);
|
|
|
- dispose: () => void;
|
|
|
+ interface ICullable {
|
|
|
+ isInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
+ isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class LensFlareSystem {
|
|
|
- name: string;
|
|
|
- lensFlares: LensFlare[];
|
|
|
- borderLimit: number;
|
|
|
- viewportBorder: number;
|
|
|
- meshesSelectionPredicate: (mesh: Mesh) => boolean;
|
|
|
- layerMask: number;
|
|
|
- id: string;
|
|
|
- private _scene;
|
|
|
- private _emitter;
|
|
|
- private _vertexBuffers;
|
|
|
- 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 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 {
|
|
|
- interface ILoadingScreen {
|
|
|
- displayLoadingUI: () => void;
|
|
|
- hideLoadingUI: () => void;
|
|
|
- loadingUIBackgroundColor: string;
|
|
|
- loadingUIText: string;
|
|
|
- }
|
|
|
- class DefaultLoadingScreen implements ILoadingScreen {
|
|
|
- private _renderingCanvas;
|
|
|
- private _loadingText;
|
|
|
- private _loadingDivBackgroundColor;
|
|
|
- private _loadingDiv;
|
|
|
- private _loadingTextDiv;
|
|
|
- constructor(_renderingCanvas: HTMLCanvasElement, _loadingText?: string, _loadingDivBackgroundColor?: string);
|
|
|
- displayLoadingUI(): void;
|
|
|
- hideLoadingUI(): void;
|
|
|
- loadingUIText: string;
|
|
|
- loadingUIBackgroundColor: string;
|
|
|
- private _resizeLoadingUI;
|
|
|
+ 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 {
|
|
|
- interface ISceneLoaderPluginExtensions {
|
|
|
- [extension: string]: {
|
|
|
- isBinary: boolean;
|
|
|
- };
|
|
|
- }
|
|
|
- interface ISceneLoaderPlugin {
|
|
|
- name: string;
|
|
|
- extensions: string | ISceneLoaderPluginExtensions;
|
|
|
- importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], onError: (message: string) => void) => boolean;
|
|
|
- load: (scene: Scene, data: string, rootUrl: string, onError: (message: string) => void) => boolean;
|
|
|
- canDirectLoad?: (data: string) => boolean;
|
|
|
- }
|
|
|
- interface ISceneLoaderPluginAsync {
|
|
|
- name: string;
|
|
|
- extensions: string | ISceneLoaderPluginExtensions;
|
|
|
- importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void) => void;
|
|
|
- loadAsync: (scene: Scene, data: string, rootUrl: string, onSuccess: () => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void) => void;
|
|
|
- canDirectLoad?: (data: string) => boolean;
|
|
|
- }
|
|
|
- class SceneLoader {
|
|
|
- private static _ForceFullSceneLoadingForIncremental;
|
|
|
- private static _ShowLoadingScreen;
|
|
|
- private static _CleanBoneMatrixWeights;
|
|
|
- static readonly NO_LOGGING: number;
|
|
|
- static readonly MINIMAL_LOGGING: number;
|
|
|
- static readonly SUMMARY_LOGGING: number;
|
|
|
- static readonly DETAILED_LOGGING: number;
|
|
|
- private static _loggingLevel;
|
|
|
- static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
- static ShowLoadingScreen: boolean;
|
|
|
- static loggingLevel: number;
|
|
|
- static CleanBoneMatrixWeights: boolean;
|
|
|
- static OnPluginActivatedObservable: Observable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
|
|
|
- private static _registeredPlugins;
|
|
|
- private static _getDefaultPlugin();
|
|
|
- private static _getPluginForExtension(extension);
|
|
|
- private static _getPluginForDirectLoad(data);
|
|
|
- private static _getPluginForFilename(sceneFilename);
|
|
|
- private static _getDirectLoad(sceneFilename);
|
|
|
- private static _loadData(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError);
|
|
|
- static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
|
|
|
- static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
|
|
|
- /**
|
|
|
- * Import meshes into a scene
|
|
|
- * @param meshNames an array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
- * @param scene the instance of BABYLON.Scene to append to
|
|
|
- * @param onSuccess a callback with a list of imported meshes, particleSystems, and skeletons when import succeeds
|
|
|
- * @param onProgress a callback with a progress event for each file being loaded
|
|
|
- * @param onError a callback with the scene, a message, and possibly an exception when import fails
|
|
|
- */
|
|
|
- static ImportMesh(meshNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onSuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress?: (event: ProgressEvent) => void, onError?: (scene: Scene, message: string, exception?: any) => void): void;
|
|
|
+ class Ray {
|
|
|
+ origin: Vector3;
|
|
|
+ direction: Vector3;
|
|
|
+ length: number;
|
|
|
+ private _edge1;
|
|
|
+ private _edge2;
|
|
|
+ private _pvec;
|
|
|
+ private _tvec;
|
|
|
+ private _qvec;
|
|
|
+ private _tmpRay;
|
|
|
+ private _rayHelper;
|
|
|
+ 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): IntersectionInfo;
|
|
|
+ intersectsPlane(plane: Plane): 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;
|
|
|
/**
|
|
|
- * Load a scene
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
- * @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
|
- * @param onSuccess a callback with the scene when import succeeds
|
|
|
- * @param onProgress a callback with a progress event for each file being loaded
|
|
|
- * @param onError a callback with the scene, a message, and possibly an exception when import fails
|
|
|
- */
|
|
|
- static Load(rootUrl: string, sceneFilename: any, engine: Engine, onSuccess?: (scene: Scene) => void, onProgress?: (event: ProgressEvent) => void, onError?: (scene: Scene, message: string, exception?: any) => void): void;
|
|
|
+ * 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;
|
|
|
/**
|
|
|
- * Append a scene
|
|
|
- * @param rootUrl a string that defines the root url for scene and resources
|
|
|
- * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
- * @param scene is the instance of BABYLON.Scene to append to
|
|
|
- * @param onSuccess a callback with the scene when import succeeds
|
|
|
- * @param onProgress a callback with a progress event for each file being loaded
|
|
|
- * @param onError a callback with the scene, a message, and possibly an exception when import fails
|
|
|
+ * 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 Append(rootUrl: string, sceneFilename: any, scene: Scene, onSuccess?: (scene: Scene) => void, onProgress?: (event: ProgressEvent) => void, onError?: (scene: Scene, message: string, exception?: any) => void): void;
|
|
|
+ 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 LensFlare {
|
|
|
+ size: number;
|
|
|
+ position: number;
|
|
|
+ color: Color3;
|
|
|
+ texture: Texture;
|
|
|
+ alphaMode: number;
|
|
|
+ private _system;
|
|
|
+ constructor(size: number, position: number, color: any, imgUrl: string, system: LensFlareSystem);
|
|
|
+ dispose: () => void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class LensFlareSystem {
|
|
|
+ name: string;
|
|
|
+ lensFlares: LensFlare[];
|
|
|
+ borderLimit: number;
|
|
|
+ viewportBorder: number;
|
|
|
+ meshesSelectionPredicate: (mesh: Mesh) => boolean;
|
|
|
+ layerMask: number;
|
|
|
+ id: string;
|
|
|
+ private _scene;
|
|
|
+ private _emitter;
|
|
|
+ private _vertexBuffers;
|
|
|
+ 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;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -5356,6 +5257,105 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ interface ILoadingScreen {
|
|
|
+ displayLoadingUI: () => void;
|
|
|
+ hideLoadingUI: () => void;
|
|
|
+ loadingUIBackgroundColor: string;
|
|
|
+ loadingUIText: string;
|
|
|
+ }
|
|
|
+ class DefaultLoadingScreen implements ILoadingScreen {
|
|
|
+ private _renderingCanvas;
|
|
|
+ private _loadingText;
|
|
|
+ private _loadingDivBackgroundColor;
|
|
|
+ private _loadingDiv;
|
|
|
+ private _loadingTextDiv;
|
|
|
+ constructor(_renderingCanvas: HTMLCanvasElement, _loadingText?: string, _loadingDivBackgroundColor?: string);
|
|
|
+ displayLoadingUI(): void;
|
|
|
+ hideLoadingUI(): void;
|
|
|
+ loadingUIText: string;
|
|
|
+ loadingUIBackgroundColor: string;
|
|
|
+ private _resizeLoadingUI;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ interface ISceneLoaderPluginExtensions {
|
|
|
+ [extension: string]: {
|
|
|
+ isBinary: boolean;
|
|
|
+ };
|
|
|
+ }
|
|
|
+ interface ISceneLoaderPlugin {
|
|
|
+ name: string;
|
|
|
+ extensions: string | ISceneLoaderPluginExtensions;
|
|
|
+ importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[], onError: (message: string) => void) => boolean;
|
|
|
+ load: (scene: Scene, data: string, rootUrl: string, onError: (message: string) => void) => boolean;
|
|
|
+ canDirectLoad?: (data: string) => boolean;
|
|
|
+ }
|
|
|
+ interface ISceneLoaderPluginAsync {
|
|
|
+ name: string;
|
|
|
+ extensions: string | ISceneLoaderPluginExtensions;
|
|
|
+ importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void) => void;
|
|
|
+ loadAsync: (scene: Scene, data: string, rootUrl: string, onSuccess: () => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void) => void;
|
|
|
+ canDirectLoad?: (data: string) => boolean;
|
|
|
+ }
|
|
|
+ class SceneLoader {
|
|
|
+ private static _ForceFullSceneLoadingForIncremental;
|
|
|
+ private static _ShowLoadingScreen;
|
|
|
+ private static _CleanBoneMatrixWeights;
|
|
|
+ static readonly NO_LOGGING: number;
|
|
|
+ static readonly MINIMAL_LOGGING: number;
|
|
|
+ static readonly SUMMARY_LOGGING: number;
|
|
|
+ static readonly DETAILED_LOGGING: number;
|
|
|
+ private static _loggingLevel;
|
|
|
+ static ForceFullSceneLoadingForIncremental: boolean;
|
|
|
+ static ShowLoadingScreen: boolean;
|
|
|
+ static loggingLevel: number;
|
|
|
+ static CleanBoneMatrixWeights: boolean;
|
|
|
+ static OnPluginActivatedObservable: Observable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
|
|
|
+ private static _registeredPlugins;
|
|
|
+ private static _getDefaultPlugin();
|
|
|
+ private static _getPluginForExtension(extension);
|
|
|
+ private static _getPluginForDirectLoad(data);
|
|
|
+ private static _getPluginForFilename(sceneFilename);
|
|
|
+ private static _getDirectLoad(sceneFilename);
|
|
|
+ private static _loadData(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError);
|
|
|
+ static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
|
|
|
+ static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
|
|
|
+ /**
|
|
|
+ * Import meshes into a scene
|
|
|
+ * @param meshNames an array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
+ * @param scene the instance of BABYLON.Scene to append to
|
|
|
+ * @param onSuccess a callback with a list of imported meshes, particleSystems, and skeletons when import succeeds
|
|
|
+ * @param onProgress a callback with a progress event for each file being loaded
|
|
|
+ * @param onError a callback with the scene, a message, and possibly an exception when import fails
|
|
|
+ */
|
|
|
+ static ImportMesh(meshNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onSuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress?: (event: ProgressEvent) => void, onError?: (scene: Scene, message: string, exception?: any) => void): void;
|
|
|
+ /**
|
|
|
+ * Load a scene
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
+ * @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
|
+ * @param onSuccess a callback with the scene when import succeeds
|
|
|
+ * @param onProgress a callback with a progress event for each file being loaded
|
|
|
+ * @param onError a callback with the scene, a message, and possibly an exception when import fails
|
|
|
+ */
|
|
|
+ static Load(rootUrl: string, sceneFilename: any, engine: Engine, onSuccess?: (scene: Scene) => void, onProgress?: (event: ProgressEvent) => void, onError?: (scene: Scene, message: string, exception?: any) => void): void;
|
|
|
+ /**
|
|
|
+ * Append a scene
|
|
|
+ * @param rootUrl a string that defines the root url for scene and resources
|
|
|
+ * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
|
|
|
+ * @param scene is the instance of BABYLON.Scene to append to
|
|
|
+ * @param onSuccess a callback with the scene when import succeeds
|
|
|
+ * @param onProgress a callback with a progress event for each file being loaded
|
|
|
+ * @param onError a callback with the scene, a message, and possibly an exception when import fails
|
|
|
+ */
|
|
|
+ static Append(rootUrl: string, sceneFilename: any, scene: Scene, onSuccess?: (scene: Scene) => void, onProgress?: (event: ProgressEvent) => void, onError?: (scene: Scene, message: string, exception?: any) => void): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class Scalar {
|
|
|
/**
|
|
|
* Boolean : true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)
|
|
@@ -15779,7 +15779,7 @@ declare module BABYLON {
|
|
|
class FramingBehavior implements Behavior<ArcRotateCamera> {
|
|
|
readonly name: string;
|
|
|
private _mode;
|
|
|
- private _radiusOffset;
|
|
|
+ private _relativeRadius;
|
|
|
private _elevation;
|
|
|
private _positionY;
|
|
|
private _defaultElevation;
|
|
@@ -15808,7 +15808,7 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* Sets the radius of the camera relative to the target's bounding box.
|
|
|
*/
|
|
|
- radiusOffset: number;
|
|
|
+ relativeRadius: number;
|
|
|
/**
|
|
|
* Gets the elevation of the camera from the target, in radians.
|
|
|
*/
|
|
@@ -15891,11 +15891,10 @@ declare module BABYLON {
|
|
|
* Calculates the lowest radius for the camera based on the bounding box of the mesh.
|
|
|
* @param mesh The mesh on which to base the calculation. mesh boundingInfo used to estimate necessary
|
|
|
* frustum width.
|
|
|
- * @param framingRadius An additional factor to add to the return camera radius.
|
|
|
* @return The minimum distance from the primary mesh's center point at which the camera must be kept in order
|
|
|
* to fully enclose the mesh in the viewing frustum.
|
|
|
*/
|
|
|
- protected _calculateLowerRadiusFromModelBoundingSphere(mesh: AbstractMesh, framingRadius: number): number;
|
|
|
+ protected _calculateLowerRadiusFromModelBoundingSphere(mesh: AbstractMesh): number;
|
|
|
/**
|
|
|
* Keeps the camera above the ground plane. If the user pulls the camera below the ground plane, the camera
|
|
|
* is automatically returned to its default position (expected to be above ground plane).
|
|
@@ -15907,17 +15906,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
private _getFrustumSlope();
|
|
|
/**
|
|
|
- * Returns true if user is scrolling.
|
|
|
- * @return true if user is scrolling.
|
|
|
- */
|
|
|
- protected _userIsZooming(): boolean;
|
|
|
- /**
|
|
|
- * Indicates if default model animation (rotation) should stop for the current user interaction.
|
|
|
- *
|
|
|
- * @return True if the model animation (rotation) should stop when given the current user interaction.
|
|
|
- */
|
|
|
- protected _shouldAnimationStopForInteraction(): boolean;
|
|
|
- /**
|
|
|
* Removes all animation locks. Allows new animations to be added to any of the arcCamera properties.
|
|
|
*/
|
|
|
private _clearAnimationLocks();
|
|
@@ -15942,53 +15930,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- interface IOctreeContainer<T> {
|
|
|
- blocks: Array<OctreeBlock<T>>;
|
|
|
- }
|
|
|
- class Octree<T> {
|
|
|
- maxDepth: number;
|
|
|
- blocks: Array<OctreeBlock<T>>;
|
|
|
- dynamicContent: T[];
|
|
|
- private _maxBlockCapacity;
|
|
|
- private _selectionContent;
|
|
|
- private _creationFunc;
|
|
|
- constructor(creationFunc: (entry: T, block: OctreeBlock<T>) => void, maxBlockCapacity?: number, maxDepth?: number);
|
|
|
- update(worldMin: Vector3, worldMax: Vector3, entries: T[]): void;
|
|
|
- addMesh(entry: T): void;
|
|
|
- select(frustumPlanes: Plane[], allowDuplicate?: boolean): SmartArray<T>;
|
|
|
- intersects(sphereCenter: Vector3, sphereRadius: number, allowDuplicate?: boolean): SmartArray<T>;
|
|
|
- intersectsRay(ray: Ray): SmartArray<T>;
|
|
|
- static _CreateBlocks<T>(worldMin: Vector3, worldMax: Vector3, entries: T[], maxBlockCapacity: number, currentDepth: number, maxDepth: number, target: IOctreeContainer<T>, creationFunc: (entry: T, block: OctreeBlock<T>) => void): void;
|
|
|
- static CreationFuncForMeshes: (entry: AbstractMesh, block: OctreeBlock<AbstractMesh>) => void;
|
|
|
- static CreationFuncForSubMeshes: (entry: SubMesh, block: OctreeBlock<SubMesh>) => void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class OctreeBlock<T> {
|
|
|
- entries: T[];
|
|
|
- blocks: Array<OctreeBlock<T>>;
|
|
|
- private _depth;
|
|
|
- private _maxDepth;
|
|
|
- private _capacity;
|
|
|
- private _minPoint;
|
|
|
- private _maxPoint;
|
|
|
- private _boundingVectors;
|
|
|
- private _creationFunc;
|
|
|
- constructor(minPoint: Vector3, maxPoint: Vector3, capacity: number, depth: number, maxDepth: number, creationFunc: (entry: T, block: OctreeBlock<T>) => void);
|
|
|
- readonly capacity: number;
|
|
|
- readonly minPoint: Vector3;
|
|
|
- readonly maxPoint: Vector3;
|
|
|
- addEntry(entry: T): void;
|
|
|
- addEntries(entries: T[]): void;
|
|
|
- select(frustumPlanes: Plane[], selection: SmartArray<T>, allowDuplicate?: boolean): void;
|
|
|
- intersects(sphereCenter: Vector3, sphereRadius: number, selection: SmartArray<T>, allowDuplicate?: boolean): void;
|
|
|
- intersectsRay(ray: Ray, selection: SmartArray<T>): void;
|
|
|
- createInnerBlocks(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
|
camera: ArcRotateCamera;
|
|
|
gamepad: Gamepad;
|
|
@@ -16347,7 +16288,51 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-declare module BABYLON.Internals {
|
|
|
+declare module BABYLON {
|
|
|
+ interface IOctreeContainer<T> {
|
|
|
+ blocks: Array<OctreeBlock<T>>;
|
|
|
+ }
|
|
|
+ class Octree<T> {
|
|
|
+ maxDepth: number;
|
|
|
+ blocks: Array<OctreeBlock<T>>;
|
|
|
+ dynamicContent: T[];
|
|
|
+ private _maxBlockCapacity;
|
|
|
+ private _selectionContent;
|
|
|
+ private _creationFunc;
|
|
|
+ constructor(creationFunc: (entry: T, block: OctreeBlock<T>) => void, maxBlockCapacity?: number, maxDepth?: number);
|
|
|
+ update(worldMin: Vector3, worldMax: Vector3, entries: T[]): void;
|
|
|
+ addMesh(entry: T): void;
|
|
|
+ select(frustumPlanes: Plane[], allowDuplicate?: boolean): SmartArray<T>;
|
|
|
+ intersects(sphereCenter: Vector3, sphereRadius: number, allowDuplicate?: boolean): SmartArray<T>;
|
|
|
+ intersectsRay(ray: Ray): SmartArray<T>;
|
|
|
+ static _CreateBlocks<T>(worldMin: Vector3, worldMax: Vector3, entries: T[], maxBlockCapacity: number, currentDepth: number, maxDepth: number, target: IOctreeContainer<T>, creationFunc: (entry: T, block: OctreeBlock<T>) => void): void;
|
|
|
+ static CreationFuncForMeshes: (entry: AbstractMesh, block: OctreeBlock<AbstractMesh>) => void;
|
|
|
+ static CreationFuncForSubMeshes: (entry: SubMesh, block: OctreeBlock<SubMesh>) => void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class OctreeBlock<T> {
|
|
|
+ entries: T[];
|
|
|
+ blocks: Array<OctreeBlock<T>>;
|
|
|
+ private _depth;
|
|
|
+ private _maxDepth;
|
|
|
+ private _capacity;
|
|
|
+ private _minPoint;
|
|
|
+ private _maxPoint;
|
|
|
+ private _boundingVectors;
|
|
|
+ private _creationFunc;
|
|
|
+ constructor(minPoint: Vector3, maxPoint: Vector3, capacity: number, depth: number, maxDepth: number, creationFunc: (entry: T, block: OctreeBlock<T>) => void);
|
|
|
+ readonly capacity: number;
|
|
|
+ readonly minPoint: Vector3;
|
|
|
+ readonly maxPoint: Vector3;
|
|
|
+ addEntry(entry: T): void;
|
|
|
+ addEntries(entries: T[]): void;
|
|
|
+ select(frustumPlanes: Plane[], selection: SmartArray<T>, allowDuplicate?: boolean): void;
|
|
|
+ intersects(sphereCenter: Vector3, sphereRadius: number, selection: SmartArray<T>, allowDuplicate?: boolean): void;
|
|
|
+ intersectsRay(ray: Ray, selection: SmartArray<T>): void;
|
|
|
+ createInnerBlocks(): void;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
@@ -16520,6 +16505,9 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+declare module BABYLON.Internals {
|
|
|
+}
|
|
|
+
|
|
|
declare module BABYLON {
|
|
|
/**
|
|
|
* The Physically based material base class of BJS.
|