|
@@ -3555,6 +3555,225 @@ 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;
|
|
|
+ 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.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 {
|
|
|
+ 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 {
|
|
|
class ArcRotateCamera extends TargetCamera {
|
|
|
alpha: number;
|
|
|
beta: number;
|
|
@@ -4009,236 +4228,17 @@ declare module BABYLON {
|
|
|
|
|
|
declare module BABYLON {
|
|
|
class UniversalCamera extends TouchCamera {
|
|
|
- gamepadAngularSensibility: number;
|
|
|
- gamepadMoveSensibility: number;
|
|
|
- constructor(name: string, position: Vector3, scene: Scene);
|
|
|
- getClassName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class VirtualJoysticksCamera extends FreeCamera {
|
|
|
- constructor(name: string, position: Vector3, scene: Scene);
|
|
|
- getClassName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-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;
|
|
|
- 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.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 {
|
|
|
- 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;
|
|
|
+ gamepadAngularSensibility: number;
|
|
|
+ gamepadMoveSensibility: number;
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene);
|
|
|
+ getClassName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class VirtualJoysticksCamera extends FreeCamera {
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene);
|
|
|
+ getClassName(): string;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -5605,13 +5605,12 @@ declare module BABYLON {
|
|
|
/**
|
|
|
* Child classes can use it to update shaders
|
|
|
*/
|
|
|
- markAsDirty(flag: number): void;
|
|
|
getClassName(): string;
|
|
|
readonly isFrozen: boolean;
|
|
|
freeze(): void;
|
|
|
unfreeze(): void;
|
|
|
isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
|
|
|
- isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
|
|
|
+ isReadyForSubMesh(mesh: AbstractMesh, subMesh: BaseSubMesh, useInstances?: boolean): boolean;
|
|
|
getEffect(): Effect;
|
|
|
getScene(): Scene;
|
|
|
needAlphaBlending(): boolean;
|
|
@@ -5629,6 +5628,13 @@ declare module BABYLON {
|
|
|
unbind(): void;
|
|
|
clone(name: string): Material;
|
|
|
getBindedMeshes(): AbstractMesh[];
|
|
|
+ markAsDirty(flag: number): void;
|
|
|
+ protected _markAllSubMeshesAsDirty(func: (defines: MaterialDefines) => void): void;
|
|
|
+ protected _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
+ protected _markAllSubMeshesAsFresnelDirty(): void;
|
|
|
+ protected _markAllSubMeshesAsLightsDirty(): void;
|
|
|
+ protected _markAllSubMeshesAsAttributesDirty(): void;
|
|
|
+ protected _markAllSubMeshesAsMiscDirty(): void;
|
|
|
dispose(forceDisposeEffect?: boolean, forceDisposeTextures?: boolean): void;
|
|
|
serialize(): any;
|
|
|
static ParseMultiMaterial(parsedMultiMaterial: any, scene: Scene): MultiMaterial;
|
|
@@ -5660,8 +5666,10 @@ declare module BABYLON {
|
|
|
|
|
|
declare module BABYLON {
|
|
|
class MultiMaterial extends Material {
|
|
|
+ private _subMaterials;
|
|
|
subMaterials: Material[];
|
|
|
constructor(name: string, scene: Scene);
|
|
|
+ private _hookArray(array);
|
|
|
getSubMaterial(index: any): Material;
|
|
|
getClassName(): string;
|
|
|
isReady(mesh?: AbstractMesh): boolean;
|
|
@@ -5680,13 +5688,6 @@ declare module BABYLON {
|
|
|
bind(world: Matrix, mesh?: Mesh): void;
|
|
|
protected _afterBind(mesh: Mesh, effect?: Effect): void;
|
|
|
protected _mustRebind(scene: Scene, effect: Effect, visibility?: number): boolean;
|
|
|
- markAsDirty(flag: number): void;
|
|
|
- protected _markAllSubMeshesAsDirty(func: (defines: MaterialDefines) => void): void;
|
|
|
- protected _markAllSubMeshesAsTexturesDirty(): void;
|
|
|
- protected _markAllSubMeshesAsFresnelDirty(): void;
|
|
|
- protected _markAllSubMeshesAsLightsDirty(): void;
|
|
|
- protected _markAllSubMeshesAsAttributesDirty(): void;
|
|
|
- protected _markAllSubMeshesAsMiscDirty(): void;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -8252,69 +8253,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class MorphTarget {
|
|
|
- name: string;
|
|
|
- animations: Animation[];
|
|
|
- private _positions;
|
|
|
- private _normals;
|
|
|
- private _tangents;
|
|
|
- private _influence;
|
|
|
- onInfluenceChanged: Observable<boolean>;
|
|
|
- influence: number;
|
|
|
- constructor(name: string, influence?: number);
|
|
|
- readonly hasNormals: boolean;
|
|
|
- readonly hasTangents: boolean;
|
|
|
- setPositions(data: Float32Array | number[]): void;
|
|
|
- getPositions(): Float32Array;
|
|
|
- setNormals(data: Float32Array | number[]): void;
|
|
|
- getNormals(): Float32Array;
|
|
|
- setTangents(data: Float32Array | number[]): void;
|
|
|
- getTangents(): Float32Array;
|
|
|
- /**
|
|
|
- * Serializes the current target into a Serialization object.
|
|
|
- * Returns the serialized object.
|
|
|
- */
|
|
|
- serialize(): any;
|
|
|
- static Parse(serializationObject: any): MorphTarget;
|
|
|
- static FromMesh(mesh: AbstractMesh, name?: string, influence?: number): MorphTarget;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class MorphTargetManager {
|
|
|
- private _targets;
|
|
|
- private _targetObservable;
|
|
|
- private _activeTargets;
|
|
|
- private _scene;
|
|
|
- private _influences;
|
|
|
- private _supportsNormals;
|
|
|
- private _supportsTangents;
|
|
|
- private _vertexCount;
|
|
|
- private _uniqueId;
|
|
|
- constructor(scene?: Scene);
|
|
|
- readonly uniqueId: number;
|
|
|
- readonly vertexCount: number;
|
|
|
- readonly supportsNormals: boolean;
|
|
|
- readonly supportsTangents: boolean;
|
|
|
- readonly numTargets: number;
|
|
|
- readonly numInfluencers: number;
|
|
|
- readonly influences: Float32Array;
|
|
|
- getActiveTarget(index: number): MorphTarget;
|
|
|
- getTarget(index: number): MorphTarget;
|
|
|
- addTarget(target: MorphTarget): void;
|
|
|
- removeTarget(target: MorphTarget): void;
|
|
|
- /**
|
|
|
- * Serializes the current manager into a Serialization object.
|
|
|
- * Returns the serialized object.
|
|
|
- */
|
|
|
- serialize(): any;
|
|
|
- private _onInfluenceChanged(needUpdate);
|
|
|
- private _syncActiveTargets(needUpdate);
|
|
|
- static Parse(serializationObject: any, scene: Scene): MorphTargetManager;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class AbstractMesh extends Node implements IDisposable, ICullable, IGetSetVerticesData {
|
|
|
private static _BILLBOARDMODE_NONE;
|
|
|
private static _BILLBOARDMODE_X;
|
|
@@ -11459,7 +11397,13 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class SubMesh implements ICullable {
|
|
|
+ class BaseSubMesh {
|
|
|
+ _materialDefines: MaterialDefines;
|
|
|
+ _materialEffect: Effect;
|
|
|
+ readonly effect: Effect;
|
|
|
+ setEffect(effect: Effect, defines?: MaterialDefines): void;
|
|
|
+ }
|
|
|
+ class SubMesh extends BaseSubMesh implements ICullable {
|
|
|
materialIndex: number;
|
|
|
verticesStart: number;
|
|
|
verticesCount: number;
|
|
@@ -11477,11 +11421,7 @@ declare module BABYLON {
|
|
|
_alphaIndex: number;
|
|
|
_distanceToCamera: number;
|
|
|
_id: number;
|
|
|
- _materialDefines: MaterialDefines;
|
|
|
- _materialEffect: Effect;
|
|
|
private _currentMaterial;
|
|
|
- readonly effect: Effect;
|
|
|
- setEffect(effect: Effect, defines?: MaterialDefines): void;
|
|
|
constructor(materialIndex: number, verticesStart: number, verticesCount: number, indexStart: any, indexCount: number, mesh: AbstractMesh, renderingMesh?: Mesh, createBoundingBox?: boolean);
|
|
|
readonly IsGlobal: boolean;
|
|
|
/**
|
|
@@ -11658,6 +11598,69 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class MorphTarget {
|
|
|
+ name: string;
|
|
|
+ animations: Animation[];
|
|
|
+ private _positions;
|
|
|
+ private _normals;
|
|
|
+ private _tangents;
|
|
|
+ private _influence;
|
|
|
+ onInfluenceChanged: Observable<boolean>;
|
|
|
+ influence: number;
|
|
|
+ constructor(name: string, influence?: number);
|
|
|
+ readonly hasNormals: boolean;
|
|
|
+ readonly hasTangents: boolean;
|
|
|
+ setPositions(data: Float32Array | number[]): void;
|
|
|
+ getPositions(): Float32Array;
|
|
|
+ setNormals(data: Float32Array | number[]): void;
|
|
|
+ getNormals(): Float32Array;
|
|
|
+ setTangents(data: Float32Array | number[]): void;
|
|
|
+ getTangents(): Float32Array;
|
|
|
+ /**
|
|
|
+ * Serializes the current target into a Serialization object.
|
|
|
+ * Returns the serialized object.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ static Parse(serializationObject: any): MorphTarget;
|
|
|
+ static FromMesh(mesh: AbstractMesh, name?: string, influence?: number): MorphTarget;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class MorphTargetManager {
|
|
|
+ private _targets;
|
|
|
+ private _targetObservable;
|
|
|
+ private _activeTargets;
|
|
|
+ private _scene;
|
|
|
+ private _influences;
|
|
|
+ private _supportsNormals;
|
|
|
+ private _supportsTangents;
|
|
|
+ private _vertexCount;
|
|
|
+ private _uniqueId;
|
|
|
+ constructor(scene?: Scene);
|
|
|
+ readonly uniqueId: number;
|
|
|
+ readonly vertexCount: number;
|
|
|
+ readonly supportsNormals: boolean;
|
|
|
+ readonly supportsTangents: boolean;
|
|
|
+ readonly numTargets: number;
|
|
|
+ readonly numInfluencers: number;
|
|
|
+ readonly influences: Float32Array;
|
|
|
+ getActiveTarget(index: number): MorphTarget;
|
|
|
+ getTarget(index: number): MorphTarget;
|
|
|
+ addTarget(target: MorphTarget): void;
|
|
|
+ removeTarget(target: MorphTarget): void;
|
|
|
+ /**
|
|
|
+ * Serializes the current manager into a Serialization object.
|
|
|
+ * Returns the serialized object.
|
|
|
+ */
|
|
|
+ serialize(): any;
|
|
|
+ private _onInfluenceChanged(needUpdate);
|
|
|
+ private _syncActiveTargets(needUpdate);
|
|
|
+ static Parse(serializationObject: any, scene: Scene): MorphTargetManager;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class Particle {
|
|
|
position: Vector3;
|
|
|
direction: Vector3;
|
|
@@ -14682,6 +14685,53 @@ 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;
|
|
@@ -15023,53 +15073,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 {
|
|
|
/**
|
|
|
* Interface to implement to create a shadow generator compatible with BJS.
|
|
|
*/
|