|
@@ -3418,250 +3418,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class Collider {
|
|
|
- radius: Vector3;
|
|
|
- retry: number;
|
|
|
- velocity: Vector3;
|
|
|
- basePoint: Vector3;
|
|
|
- epsilon: number;
|
|
|
- collisionFound: boolean;
|
|
|
- velocityWorldLength: number;
|
|
|
- basePointWorld: Vector3;
|
|
|
- velocityWorld: Vector3;
|
|
|
- normalizedVelocity: Vector3;
|
|
|
- initialVelocity: Vector3;
|
|
|
- initialPosition: Vector3;
|
|
|
- nearestDistance: number;
|
|
|
- intersectionPoint: Vector3;
|
|
|
- collidedMesh: Nullable<AbstractMesh>;
|
|
|
- private _collisionPoint;
|
|
|
- private _planeIntersectionPoint;
|
|
|
- private _tempVector;
|
|
|
- private _tempVector2;
|
|
|
- private _tempVector3;
|
|
|
- private _tempVector4;
|
|
|
- private _edge;
|
|
|
- private _baseToVertex;
|
|
|
- private _destinationPoint;
|
|
|
- private _slidePlaneNormal;
|
|
|
- private _displacementVector;
|
|
|
- private _collisionMask;
|
|
|
- collisionMask: number;
|
|
|
- _initialize(source: Vector3, dir: Vector3, e: number): void;
|
|
|
- _checkPointInTriangle(point: Vector3, pa: Vector3, pb: Vector3, pc: Vector3, n: Vector3): boolean;
|
|
|
- _canDoCollision(sphereCenter: Vector3, sphereRadius: number, vecMin: Vector3, vecMax: Vector3): boolean;
|
|
|
- _testTriangle(faceIndex: number, trianglePlaneArray: Array<Plane>, p1: Vector3, p2: Vector3, p3: Vector3, hasMaterial: boolean): void;
|
|
|
- _collide(trianglePlaneArray: Array<Plane>, pts: Vector3[], indices: IndicesArray, indexStart: number, indexEnd: number, decal: number, hasMaterial: boolean): void;
|
|
|
- _getResponse(pos: Vector3, vel: Vector3): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- var CollisionWorker: string;
|
|
|
- interface ICollisionCoordinator {
|
|
|
- getNewPosition(position: Vector3, displacement: Vector3, collider: Collider, maximumRetry: number, excludedMesh: Nullable<AbstractMesh>, onNewPosition: (collisionIndex: number, newPosition: Vector3, collidedMesh: Nullable<AbstractMesh>) => void, collisionIndex: number): void;
|
|
|
- init(scene: Scene): void;
|
|
|
- destroy(): void;
|
|
|
- onMeshAdded(mesh: AbstractMesh): void;
|
|
|
- onMeshUpdated(mesh: AbstractMesh): void;
|
|
|
- onMeshRemoved(mesh: AbstractMesh): void;
|
|
|
- onGeometryAdded(geometry: Geometry): void;
|
|
|
- onGeometryUpdated(geometry: Geometry): void;
|
|
|
- onGeometryDeleted(geometry: Geometry): void;
|
|
|
- }
|
|
|
- interface SerializedMesh {
|
|
|
- id: string;
|
|
|
- name: string;
|
|
|
- uniqueId: number;
|
|
|
- geometryId: Nullable<string>;
|
|
|
- sphereCenter: Array<number>;
|
|
|
- sphereRadius: number;
|
|
|
- boxMinimum: Array<number>;
|
|
|
- boxMaximum: Array<number>;
|
|
|
- worldMatrixFromCache: any;
|
|
|
- subMeshes: Array<SerializedSubMesh>;
|
|
|
- checkCollisions: boolean;
|
|
|
- }
|
|
|
- interface SerializedSubMesh {
|
|
|
- position: number;
|
|
|
- verticesStart: number;
|
|
|
- verticesCount: number;
|
|
|
- indexStart: number;
|
|
|
- indexCount: number;
|
|
|
- hasMaterial: boolean;
|
|
|
- sphereCenter: Array<number>;
|
|
|
- sphereRadius: number;
|
|
|
- boxMinimum: Array<number>;
|
|
|
- boxMaximum: Array<number>;
|
|
|
- }
|
|
|
- interface SerializedGeometry {
|
|
|
- id: string;
|
|
|
- positions: Float32Array;
|
|
|
- indices: Uint32Array;
|
|
|
- normals: Float32Array;
|
|
|
- }
|
|
|
- interface BabylonMessage {
|
|
|
- taskType: WorkerTaskType;
|
|
|
- payload: InitPayload | CollidePayload | UpdatePayload;
|
|
|
- }
|
|
|
- interface SerializedColliderToWorker {
|
|
|
- position: Array<number>;
|
|
|
- velocity: Array<number>;
|
|
|
- radius: Array<number>;
|
|
|
- }
|
|
|
- enum WorkerTaskType {
|
|
|
- INIT = 0,
|
|
|
- UPDATE = 1,
|
|
|
- COLLIDE = 2,
|
|
|
- }
|
|
|
- interface WorkerReply {
|
|
|
- error: WorkerReplyType;
|
|
|
- taskType: WorkerTaskType;
|
|
|
- payload?: any;
|
|
|
- }
|
|
|
- interface CollisionReplyPayload {
|
|
|
- newPosition: Array<number>;
|
|
|
- collisionId: number;
|
|
|
- collidedMeshUniqueId: number;
|
|
|
- }
|
|
|
- interface InitPayload {
|
|
|
- }
|
|
|
- interface CollidePayload {
|
|
|
- collisionId: number;
|
|
|
- collider: SerializedColliderToWorker;
|
|
|
- maximumRetry: number;
|
|
|
- excludedMeshUniqueId: Nullable<number>;
|
|
|
- }
|
|
|
- interface UpdatePayload {
|
|
|
- updatedMeshes: {
|
|
|
- [n: number]: SerializedMesh;
|
|
|
- };
|
|
|
- updatedGeometries: {
|
|
|
- [s: string]: SerializedGeometry;
|
|
|
- };
|
|
|
- removedMeshes: Array<number>;
|
|
|
- removedGeometries: Array<string>;
|
|
|
- }
|
|
|
- enum WorkerReplyType {
|
|
|
- SUCCESS = 0,
|
|
|
- UNKNOWN_ERROR = 1,
|
|
|
- }
|
|
|
- class CollisionCoordinatorWorker implements ICollisionCoordinator {
|
|
|
- private _scene;
|
|
|
- private _scaledPosition;
|
|
|
- private _scaledVelocity;
|
|
|
- private _collisionsCallbackArray;
|
|
|
- private _init;
|
|
|
- private _runningUpdated;
|
|
|
- private _runningCollisionTask;
|
|
|
- private _worker;
|
|
|
- private _addUpdateMeshesList;
|
|
|
- private _addUpdateGeometriesList;
|
|
|
- private _toRemoveMeshesArray;
|
|
|
- private _toRemoveGeometryArray;
|
|
|
- constructor();
|
|
|
- static SerializeMesh: (mesh: AbstractMesh) => SerializedMesh;
|
|
|
- static SerializeGeometry: (geometry: Geometry) => SerializedGeometry;
|
|
|
- getNewPosition(position: Vector3, displacement: Vector3, collider: Collider, maximumRetry: number, excludedMesh: AbstractMesh, onNewPosition: (collisionIndex: number, newPosition: Vector3, collidedMesh: Nullable<AbstractMesh>) => void, collisionIndex: number): void;
|
|
|
- init(scene: Scene): void;
|
|
|
- destroy(): void;
|
|
|
- onMeshAdded(mesh: AbstractMesh): void;
|
|
|
- onMeshUpdated: (mesh: AbstractMesh) => void;
|
|
|
- onMeshRemoved(mesh: AbstractMesh): void;
|
|
|
- onGeometryAdded(geometry: Geometry): void;
|
|
|
- onGeometryUpdated: (geometry: Geometry) => void;
|
|
|
- onGeometryDeleted(geometry: Geometry): void;
|
|
|
- private _afterRender;
|
|
|
- private _onMessageFromWorker;
|
|
|
- }
|
|
|
- class CollisionCoordinatorLegacy implements ICollisionCoordinator {
|
|
|
- private _scene;
|
|
|
- private _scaledPosition;
|
|
|
- private _scaledVelocity;
|
|
|
- private _finalPosition;
|
|
|
- getNewPosition(position: Vector3, displacement: Vector3, collider: Collider, maximumRetry: number, excludedMesh: AbstractMesh, onNewPosition: (collisionIndex: number, newPosition: Vector3, collidedMesh: Nullable<AbstractMesh>) => void, collisionIndex: number): void;
|
|
|
- init(scene: Scene): void;
|
|
|
- destroy(): void;
|
|
|
- onMeshAdded(mesh: AbstractMesh): void;
|
|
|
- onMeshUpdated(mesh: AbstractMesh): void;
|
|
|
- onMeshRemoved(mesh: AbstractMesh): void;
|
|
|
- onGeometryAdded(geometry: Geometry): void;
|
|
|
- onGeometryUpdated(geometry: Geometry): void;
|
|
|
- onGeometryDeleted(geometry: Geometry): void;
|
|
|
- private _collideWithWorld(position, velocity, collider, maximumRetry, finalPosition, excludedMesh?);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare function importScripts(...urls: string[]): void;
|
|
|
-declare module BABYLON {
|
|
|
- var WorkerIncluded: boolean;
|
|
|
- class CollisionCache {
|
|
|
- private _meshes;
|
|
|
- private _geometries;
|
|
|
- getMeshes(): {
|
|
|
- [n: number]: SerializedMesh;
|
|
|
- };
|
|
|
- getGeometries(): {
|
|
|
- [s: number]: SerializedGeometry;
|
|
|
- };
|
|
|
- getMesh(id: any): SerializedMesh;
|
|
|
- addMesh(mesh: SerializedMesh): void;
|
|
|
- removeMesh(uniqueId: number): void;
|
|
|
- getGeometry(id: string): SerializedGeometry;
|
|
|
- addGeometry(geometry: SerializedGeometry): void;
|
|
|
- removeGeometry(id: string): void;
|
|
|
- }
|
|
|
- class CollideWorker {
|
|
|
- collider: Collider;
|
|
|
- private _collisionCache;
|
|
|
- private finalPosition;
|
|
|
- private collisionsScalingMatrix;
|
|
|
- private collisionTranformationMatrix;
|
|
|
- constructor(collider: Collider, _collisionCache: CollisionCache, finalPosition: Vector3);
|
|
|
- collideWithWorld(position: Vector3, velocity: Vector3, maximumRetry: number, excludedMeshUniqueId: Nullable<number>): void;
|
|
|
- private checkCollision(mesh);
|
|
|
- private processCollisionsForSubMeshes(transformMatrix, mesh);
|
|
|
- private collideForSubMesh(subMesh, transformMatrix, meshGeometry);
|
|
|
- private checkSubmeshCollision(subMesh);
|
|
|
- }
|
|
|
- interface ICollisionDetector {
|
|
|
- onInit(payload: InitPayload): void;
|
|
|
- onUpdate(payload: UpdatePayload): void;
|
|
|
- onCollision(payload: CollidePayload): void;
|
|
|
- }
|
|
|
- class CollisionDetectorTransferable implements ICollisionDetector {
|
|
|
- private _collisionCache;
|
|
|
- onInit(payload: InitPayload): void;
|
|
|
- onUpdate(payload: UpdatePayload): void;
|
|
|
- onCollision(payload: CollidePayload): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class IntersectionInfo {
|
|
|
- bu: Nullable<number>;
|
|
|
- bv: Nullable<number>;
|
|
|
- distance: number;
|
|
|
- faceId: number;
|
|
|
- subMeshId: number;
|
|
|
- constructor(bu: Nullable<number>, bv: Nullable<number>, distance: number);
|
|
|
- }
|
|
|
- class PickingInfo {
|
|
|
- hit: boolean;
|
|
|
- distance: number;
|
|
|
- pickedPoint: Nullable<Vector3>;
|
|
|
- pickedMesh: Nullable<AbstractMesh>;
|
|
|
- bu: number;
|
|
|
- bv: number;
|
|
|
- faceId: number;
|
|
|
- subMeshId: number;
|
|
|
- pickedSprite: Nullable<Sprite>;
|
|
|
- getNormal(useWorldCoordinates?: boolean, useVerticesNormals?: boolean): Nullable<Vector3>;
|
|
|
- getTextureCoordinates(): Nullable<Vector2>;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class BoundingBox implements ICullable {
|
|
|
minimum: Vector3;
|
|
|
maximum: Vector3;
|
|
@@ -4945,18 +4701,262 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- /**
|
|
|
- * This class can be used to get instrumentation data from a Babylon engine
|
|
|
- */
|
|
|
- class EngineInstrumentation implements IDisposable {
|
|
|
- engine: Engine;
|
|
|
- private _captureGPUFrameTime;
|
|
|
- private _gpuFrameTimeToken;
|
|
|
- private _gpuFrameTime;
|
|
|
- private _captureShaderCompilationTime;
|
|
|
- private _shaderCompilationTime;
|
|
|
- private _onBeginFrameObserver;
|
|
|
- private _onEndFrameObserver;
|
|
|
+ class Collider {
|
|
|
+ radius: Vector3;
|
|
|
+ retry: number;
|
|
|
+ velocity: Vector3;
|
|
|
+ basePoint: Vector3;
|
|
|
+ epsilon: number;
|
|
|
+ collisionFound: boolean;
|
|
|
+ velocityWorldLength: number;
|
|
|
+ basePointWorld: Vector3;
|
|
|
+ velocityWorld: Vector3;
|
|
|
+ normalizedVelocity: Vector3;
|
|
|
+ initialVelocity: Vector3;
|
|
|
+ initialPosition: Vector3;
|
|
|
+ nearestDistance: number;
|
|
|
+ intersectionPoint: Vector3;
|
|
|
+ collidedMesh: Nullable<AbstractMesh>;
|
|
|
+ private _collisionPoint;
|
|
|
+ private _planeIntersectionPoint;
|
|
|
+ private _tempVector;
|
|
|
+ private _tempVector2;
|
|
|
+ private _tempVector3;
|
|
|
+ private _tempVector4;
|
|
|
+ private _edge;
|
|
|
+ private _baseToVertex;
|
|
|
+ private _destinationPoint;
|
|
|
+ private _slidePlaneNormal;
|
|
|
+ private _displacementVector;
|
|
|
+ private _collisionMask;
|
|
|
+ collisionMask: number;
|
|
|
+ _initialize(source: Vector3, dir: Vector3, e: number): void;
|
|
|
+ _checkPointInTriangle(point: Vector3, pa: Vector3, pb: Vector3, pc: Vector3, n: Vector3): boolean;
|
|
|
+ _canDoCollision(sphereCenter: Vector3, sphereRadius: number, vecMin: Vector3, vecMax: Vector3): boolean;
|
|
|
+ _testTriangle(faceIndex: number, trianglePlaneArray: Array<Plane>, p1: Vector3, p2: Vector3, p3: Vector3, hasMaterial: boolean): void;
|
|
|
+ _collide(trianglePlaneArray: Array<Plane>, pts: Vector3[], indices: IndicesArray, indexStart: number, indexEnd: number, decal: number, hasMaterial: boolean): void;
|
|
|
+ _getResponse(pos: Vector3, vel: Vector3): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ var CollisionWorker: string;
|
|
|
+ interface ICollisionCoordinator {
|
|
|
+ getNewPosition(position: Vector3, displacement: Vector3, collider: Collider, maximumRetry: number, excludedMesh: Nullable<AbstractMesh>, onNewPosition: (collisionIndex: number, newPosition: Vector3, collidedMesh: Nullable<AbstractMesh>) => void, collisionIndex: number): void;
|
|
|
+ init(scene: Scene): void;
|
|
|
+ destroy(): void;
|
|
|
+ onMeshAdded(mesh: AbstractMesh): void;
|
|
|
+ onMeshUpdated(mesh: AbstractMesh): void;
|
|
|
+ onMeshRemoved(mesh: AbstractMesh): void;
|
|
|
+ onGeometryAdded(geometry: Geometry): void;
|
|
|
+ onGeometryUpdated(geometry: Geometry): void;
|
|
|
+ onGeometryDeleted(geometry: Geometry): void;
|
|
|
+ }
|
|
|
+ interface SerializedMesh {
|
|
|
+ id: string;
|
|
|
+ name: string;
|
|
|
+ uniqueId: number;
|
|
|
+ geometryId: Nullable<string>;
|
|
|
+ sphereCenter: Array<number>;
|
|
|
+ sphereRadius: number;
|
|
|
+ boxMinimum: Array<number>;
|
|
|
+ boxMaximum: Array<number>;
|
|
|
+ worldMatrixFromCache: any;
|
|
|
+ subMeshes: Array<SerializedSubMesh>;
|
|
|
+ checkCollisions: boolean;
|
|
|
+ }
|
|
|
+ interface SerializedSubMesh {
|
|
|
+ position: number;
|
|
|
+ verticesStart: number;
|
|
|
+ verticesCount: number;
|
|
|
+ indexStart: number;
|
|
|
+ indexCount: number;
|
|
|
+ hasMaterial: boolean;
|
|
|
+ sphereCenter: Array<number>;
|
|
|
+ sphereRadius: number;
|
|
|
+ boxMinimum: Array<number>;
|
|
|
+ boxMaximum: Array<number>;
|
|
|
+ }
|
|
|
+ interface SerializedGeometry {
|
|
|
+ id: string;
|
|
|
+ positions: Float32Array;
|
|
|
+ indices: Uint32Array;
|
|
|
+ normals: Float32Array;
|
|
|
+ }
|
|
|
+ interface BabylonMessage {
|
|
|
+ taskType: WorkerTaskType;
|
|
|
+ payload: InitPayload | CollidePayload | UpdatePayload;
|
|
|
+ }
|
|
|
+ interface SerializedColliderToWorker {
|
|
|
+ position: Array<number>;
|
|
|
+ velocity: Array<number>;
|
|
|
+ radius: Array<number>;
|
|
|
+ }
|
|
|
+ enum WorkerTaskType {
|
|
|
+ INIT = 0,
|
|
|
+ UPDATE = 1,
|
|
|
+ COLLIDE = 2,
|
|
|
+ }
|
|
|
+ interface WorkerReply {
|
|
|
+ error: WorkerReplyType;
|
|
|
+ taskType: WorkerTaskType;
|
|
|
+ payload?: any;
|
|
|
+ }
|
|
|
+ interface CollisionReplyPayload {
|
|
|
+ newPosition: Array<number>;
|
|
|
+ collisionId: number;
|
|
|
+ collidedMeshUniqueId: number;
|
|
|
+ }
|
|
|
+ interface InitPayload {
|
|
|
+ }
|
|
|
+ interface CollidePayload {
|
|
|
+ collisionId: number;
|
|
|
+ collider: SerializedColliderToWorker;
|
|
|
+ maximumRetry: number;
|
|
|
+ excludedMeshUniqueId: Nullable<number>;
|
|
|
+ }
|
|
|
+ interface UpdatePayload {
|
|
|
+ updatedMeshes: {
|
|
|
+ [n: number]: SerializedMesh;
|
|
|
+ };
|
|
|
+ updatedGeometries: {
|
|
|
+ [s: string]: SerializedGeometry;
|
|
|
+ };
|
|
|
+ removedMeshes: Array<number>;
|
|
|
+ removedGeometries: Array<string>;
|
|
|
+ }
|
|
|
+ enum WorkerReplyType {
|
|
|
+ SUCCESS = 0,
|
|
|
+ UNKNOWN_ERROR = 1,
|
|
|
+ }
|
|
|
+ class CollisionCoordinatorWorker implements ICollisionCoordinator {
|
|
|
+ private _scene;
|
|
|
+ private _scaledPosition;
|
|
|
+ private _scaledVelocity;
|
|
|
+ private _collisionsCallbackArray;
|
|
|
+ private _init;
|
|
|
+ private _runningUpdated;
|
|
|
+ private _runningCollisionTask;
|
|
|
+ private _worker;
|
|
|
+ private _addUpdateMeshesList;
|
|
|
+ private _addUpdateGeometriesList;
|
|
|
+ private _toRemoveMeshesArray;
|
|
|
+ private _toRemoveGeometryArray;
|
|
|
+ constructor();
|
|
|
+ static SerializeMesh: (mesh: AbstractMesh) => SerializedMesh;
|
|
|
+ static SerializeGeometry: (geometry: Geometry) => SerializedGeometry;
|
|
|
+ getNewPosition(position: Vector3, displacement: Vector3, collider: Collider, maximumRetry: number, excludedMesh: AbstractMesh, onNewPosition: (collisionIndex: number, newPosition: Vector3, collidedMesh: Nullable<AbstractMesh>) => void, collisionIndex: number): void;
|
|
|
+ init(scene: Scene): void;
|
|
|
+ destroy(): void;
|
|
|
+ onMeshAdded(mesh: AbstractMesh): void;
|
|
|
+ onMeshUpdated: (mesh: AbstractMesh) => void;
|
|
|
+ onMeshRemoved(mesh: AbstractMesh): void;
|
|
|
+ onGeometryAdded(geometry: Geometry): void;
|
|
|
+ onGeometryUpdated: (geometry: Geometry) => void;
|
|
|
+ onGeometryDeleted(geometry: Geometry): void;
|
|
|
+ private _afterRender;
|
|
|
+ private _onMessageFromWorker;
|
|
|
+ }
|
|
|
+ class CollisionCoordinatorLegacy implements ICollisionCoordinator {
|
|
|
+ private _scene;
|
|
|
+ private _scaledPosition;
|
|
|
+ private _scaledVelocity;
|
|
|
+ private _finalPosition;
|
|
|
+ getNewPosition(position: Vector3, displacement: Vector3, collider: Collider, maximumRetry: number, excludedMesh: AbstractMesh, onNewPosition: (collisionIndex: number, newPosition: Vector3, collidedMesh: Nullable<AbstractMesh>) => void, collisionIndex: number): void;
|
|
|
+ init(scene: Scene): void;
|
|
|
+ destroy(): void;
|
|
|
+ onMeshAdded(mesh: AbstractMesh): void;
|
|
|
+ onMeshUpdated(mesh: AbstractMesh): void;
|
|
|
+ onMeshRemoved(mesh: AbstractMesh): void;
|
|
|
+ onGeometryAdded(geometry: Geometry): void;
|
|
|
+ onGeometryUpdated(geometry: Geometry): void;
|
|
|
+ onGeometryDeleted(geometry: Geometry): void;
|
|
|
+ private _collideWithWorld(position, velocity, collider, maximumRetry, finalPosition, excludedMesh?);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare function importScripts(...urls: string[]): void;
|
|
|
+declare module BABYLON {
|
|
|
+ var WorkerIncluded: boolean;
|
|
|
+ class CollisionCache {
|
|
|
+ private _meshes;
|
|
|
+ private _geometries;
|
|
|
+ getMeshes(): {
|
|
|
+ [n: number]: SerializedMesh;
|
|
|
+ };
|
|
|
+ getGeometries(): {
|
|
|
+ [s: number]: SerializedGeometry;
|
|
|
+ };
|
|
|
+ getMesh(id: any): SerializedMesh;
|
|
|
+ addMesh(mesh: SerializedMesh): void;
|
|
|
+ removeMesh(uniqueId: number): void;
|
|
|
+ getGeometry(id: string): SerializedGeometry;
|
|
|
+ addGeometry(geometry: SerializedGeometry): void;
|
|
|
+ removeGeometry(id: string): void;
|
|
|
+ }
|
|
|
+ class CollideWorker {
|
|
|
+ collider: Collider;
|
|
|
+ private _collisionCache;
|
|
|
+ private finalPosition;
|
|
|
+ private collisionsScalingMatrix;
|
|
|
+ private collisionTranformationMatrix;
|
|
|
+ constructor(collider: Collider, _collisionCache: CollisionCache, finalPosition: Vector3);
|
|
|
+ collideWithWorld(position: Vector3, velocity: Vector3, maximumRetry: number, excludedMeshUniqueId: Nullable<number>): void;
|
|
|
+ private checkCollision(mesh);
|
|
|
+ private processCollisionsForSubMeshes(transformMatrix, mesh);
|
|
|
+ private collideForSubMesh(subMesh, transformMatrix, meshGeometry);
|
|
|
+ private checkSubmeshCollision(subMesh);
|
|
|
+ }
|
|
|
+ interface ICollisionDetector {
|
|
|
+ onInit(payload: InitPayload): void;
|
|
|
+ onUpdate(payload: UpdatePayload): void;
|
|
|
+ onCollision(payload: CollidePayload): void;
|
|
|
+ }
|
|
|
+ class CollisionDetectorTransferable implements ICollisionDetector {
|
|
|
+ private _collisionCache;
|
|
|
+ onInit(payload: InitPayload): void;
|
|
|
+ onUpdate(payload: UpdatePayload): void;
|
|
|
+ onCollision(payload: CollidePayload): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class IntersectionInfo {
|
|
|
+ bu: Nullable<number>;
|
|
|
+ bv: Nullable<number>;
|
|
|
+ distance: number;
|
|
|
+ faceId: number;
|
|
|
+ subMeshId: number;
|
|
|
+ constructor(bu: Nullable<number>, bv: Nullable<number>, distance: number);
|
|
|
+ }
|
|
|
+ class PickingInfo {
|
|
|
+ hit: boolean;
|
|
|
+ distance: number;
|
|
|
+ pickedPoint: Nullable<Vector3>;
|
|
|
+ pickedMesh: Nullable<AbstractMesh>;
|
|
|
+ bu: number;
|
|
|
+ bv: number;
|
|
|
+ faceId: number;
|
|
|
+ subMeshId: number;
|
|
|
+ pickedSprite: Nullable<Sprite>;
|
|
|
+ getNormal(useWorldCoordinates?: boolean, useVerticesNormals?: boolean): Nullable<Vector3>;
|
|
|
+ getTextureCoordinates(): Nullable<Vector2>;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * This class can be used to get instrumentation data from a Babylon engine
|
|
|
+ */
|
|
|
+ class EngineInstrumentation implements IDisposable {
|
|
|
+ engine: Engine;
|
|
|
+ private _captureGPUFrameTime;
|
|
|
+ private _gpuFrameTimeToken;
|
|
|
+ private _gpuFrameTime;
|
|
|
+ private _captureShaderCompilationTime;
|
|
|
+ private _shaderCompilationTime;
|
|
|
+ private _onBeginFrameObserver;
|
|
|
+ private _onEndFrameObserver;
|
|
|
private _onBeforeShaderCompilationObserver;
|
|
|
private _onAfterShaderCompilationObserver;
|
|
|
/**
|
|
@@ -5312,6 +5312,52 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class LensFlare {
|
|
|
+ size: number;
|
|
|
+ position: number;
|
|
|
+ color: Color3;
|
|
|
+ texture: Nullable<Texture>;
|
|
|
+ alphaMode: number;
|
|
|
+ private _system;
|
|
|
+ static AddFlare(size: number, position: number, color: Color3, imgUrl: string, system: LensFlareSystem): LensFlare;
|
|
|
+ constructor(size: number, position: number, color: Color3, 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;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
class DirectionalLight extends ShadowLight {
|
|
|
private _shadowFrustumSize;
|
|
|
/**
|
|
@@ -5845,52 +5891,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class LensFlare {
|
|
|
- size: number;
|
|
|
- position: number;
|
|
|
- color: Color3;
|
|
|
- texture: Nullable<Texture>;
|
|
|
- alphaMode: number;
|
|
|
- private _system;
|
|
|
- static AddFlare(size: number, position: number, color: Color3, imgUrl: string, system: LensFlareSystem): LensFlare;
|
|
|
- constructor(size: number, position: number, color: Color3, 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;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
interface ILoadingScreen {
|
|
|
displayLoadingUI: () => void;
|
|
|
hideLoadingUI: () => void;
|
|
@@ -16458,180 +16458,6 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
- class VRCameraMetrics {
|
|
|
- hResolution: number;
|
|
|
- vResolution: number;
|
|
|
- hScreenSize: number;
|
|
|
- vScreenSize: number;
|
|
|
- vScreenCenter: number;
|
|
|
- eyeToScreenDistance: number;
|
|
|
- lensSeparationDistance: number;
|
|
|
- interpupillaryDistance: number;
|
|
|
- distortionK: number[];
|
|
|
- chromaAbCorrection: number[];
|
|
|
- postProcessScaleFactor: number;
|
|
|
- lensCenterOffset: number;
|
|
|
- compensateDistortion: boolean;
|
|
|
- readonly aspectRatio: number;
|
|
|
- readonly aspectRatioFov: number;
|
|
|
- readonly leftHMatrix: Matrix;
|
|
|
- readonly rightHMatrix: Matrix;
|
|
|
- readonly leftPreViewMatrix: Matrix;
|
|
|
- readonly rightPreViewMatrix: Matrix;
|
|
|
- static GetDefault(): VRCameraMetrics;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class VRDeviceOrientationFreeCamera extends DeviceOrientationCamera {
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
- getClassName(): string;
|
|
|
- }
|
|
|
- class VRDeviceOrientationGamepadCamera extends VRDeviceOrientationFreeCamera {
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
- getClassName(): string;
|
|
|
- }
|
|
|
- class VRDeviceOrientationArcRotateCamera extends ArcRotateCamera {
|
|
|
- constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
- getClassName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
- class VRExperienceHelper {
|
|
|
- webVROptions: WebVROptions;
|
|
|
- private _scene;
|
|
|
- private _position;
|
|
|
- private _btnVR;
|
|
|
- private _webVRsupported;
|
|
|
- private _webVRready;
|
|
|
- private _webVRrequesting;
|
|
|
- private _webVRpresenting;
|
|
|
- private _fullscreenVRpresenting;
|
|
|
- private _canvas;
|
|
|
- private _webVRCamera;
|
|
|
- private _vrDeviceOrientationCamera;
|
|
|
- private _deviceOrientationCamera;
|
|
|
- private _onKeyDown;
|
|
|
- private _onVrDisplayPresentChange;
|
|
|
- private _onVRDisplayChanged;
|
|
|
- private _onVRRequestPresentStart;
|
|
|
- private _onVRRequestPresentComplete;
|
|
|
- onEnteringVR: () => void;
|
|
|
- onExitingVR: () => void;
|
|
|
- onControllerMeshLoaded: (controller: WebVRController) => void;
|
|
|
- constructor(scene: Scene, webVROptions?: WebVROptions);
|
|
|
- private _onDefaultMeshLoaded(webVRController);
|
|
|
- private _onFullscreenChange();
|
|
|
- private isInVRMode();
|
|
|
- private onVrDisplayPresentChange();
|
|
|
- private onVRDisplayChanged(eventArgs);
|
|
|
- private updateButtonVisibility();
|
|
|
- /**
|
|
|
- * Attempt to enter VR. If a headset is connected and ready, will request present on that.
|
|
|
- * Otherwise, will use the fullscreen API.
|
|
|
- */
|
|
|
- enterVR(): void;
|
|
|
- /**
|
|
|
- * Attempt to exit VR, or fullscreen.
|
|
|
- */
|
|
|
- exitVR(): void;
|
|
|
- position: Vector3;
|
|
|
- dispose(): void;
|
|
|
- getClassName(): string;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare var HMDVRDevice: any;
|
|
|
-declare var VRDisplay: any;
|
|
|
-declare var VRFrameData: any;
|
|
|
-declare module BABYLON {
|
|
|
- /**
|
|
|
- * This is a copy of VRPose.
|
|
|
- * IMPORTANT!! The data is right-hand data.
|
|
|
- * @export
|
|
|
- * @interface DevicePose
|
|
|
- */
|
|
|
- interface DevicePose {
|
|
|
- readonly position?: Float32Array;
|
|
|
- readonly linearVelocity?: Float32Array;
|
|
|
- readonly linearAcceleration?: Float32Array;
|
|
|
- readonly orientation?: Float32Array;
|
|
|
- readonly angularVelocity?: Float32Array;
|
|
|
- readonly angularAcceleration?: Float32Array;
|
|
|
- }
|
|
|
- interface PoseControlled {
|
|
|
- position: Vector3;
|
|
|
- rotationQuaternion: Quaternion;
|
|
|
- devicePosition?: Vector3;
|
|
|
- deviceRotationQuaternion: Quaternion;
|
|
|
- rawPose: Nullable<DevicePose>;
|
|
|
- deviceScaleFactor: number;
|
|
|
- updateFromDevice(poseData: DevicePose): void;
|
|
|
- }
|
|
|
- interface WebVROptions {
|
|
|
- trackPosition?: boolean;
|
|
|
- positionScale?: number;
|
|
|
- displayName?: string;
|
|
|
- controllerMeshes?: boolean;
|
|
|
- defaultLightingOnControllers?: boolean;
|
|
|
- }
|
|
|
- class WebVRFreeCamera extends FreeCamera implements PoseControlled {
|
|
|
- private webVROptions;
|
|
|
- _vrDevice: any;
|
|
|
- rawPose: Nullable<DevicePose>;
|
|
|
- private _onVREnabled;
|
|
|
- private _specsVersion;
|
|
|
- private _attached;
|
|
|
- private _frameData;
|
|
|
- protected _descendants: Array<Node>;
|
|
|
- devicePosition: Vector3;
|
|
|
- deviceRotationQuaternion: Quaternion;
|
|
|
- deviceScaleFactor: number;
|
|
|
- controllers: Array<WebVRController>;
|
|
|
- onControllersAttachedObservable: Observable<WebVRController[]>;
|
|
|
- onControllerMeshLoadedObservable: Observable<WebVRController>;
|
|
|
- rigParenting: boolean;
|
|
|
- private _lightOnControllers;
|
|
|
- constructor(name: string, position: Vector3, scene: Scene, webVROptions?: WebVROptions);
|
|
|
- dispose(): void;
|
|
|
- getControllerByName(name: string): Nullable<WebVRController>;
|
|
|
- private _leftController;
|
|
|
- readonly leftController: Nullable<WebVRController>;
|
|
|
- private _rightController;
|
|
|
- readonly rightController: Nullable<WebVRController>;
|
|
|
- getForwardRay(length?: number): Ray;
|
|
|
- _checkInputs(): void;
|
|
|
- updateFromDevice(poseData: DevicePose): void;
|
|
|
- /**
|
|
|
- * WebVR's attach control will start broadcasting frames to the device.
|
|
|
- * Note that in certain browsers (chrome for example) this function must be called
|
|
|
- * within a user-interaction callback. Example:
|
|
|
- * <pre> scene.onPointerDown = function() { camera.attachControl(canvas); }</pre>
|
|
|
- *
|
|
|
- * @param {HTMLElement} element
|
|
|
- * @param {boolean} [noPreventDefault]
|
|
|
- *
|
|
|
- * @memberOf WebVRFreeCamera
|
|
|
- */
|
|
|
- attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
- detachControl(element: HTMLElement): void;
|
|
|
- getClassName(): string;
|
|
|
- resetToCurrentRotation(): void;
|
|
|
- _updateRigCameras(): void;
|
|
|
- /**
|
|
|
- * This function is called by the two RIG cameras.
|
|
|
- * 'this' is the left or right camera (and NOT (!!!) the WebVRFreeCamera instance)
|
|
|
- */
|
|
|
- protected _getWebVRViewMatrix(): Matrix;
|
|
|
- protected _getWebVRProjectionMatrix(): Matrix;
|
|
|
- private _onGamepadConnectedObserver;
|
|
|
- private _onGamepadDisconnectedObserver;
|
|
|
- initControllers(): void;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-declare module BABYLON {
|
|
|
class ArcRotateCameraGamepadInput implements ICameraInput<ArcRotateCamera> {
|
|
|
camera: ArcRotateCamera;
|
|
|
gamepad: Nullable<Gamepad>;
|
|
@@ -16860,6 +16686,180 @@ declare module BABYLON {
|
|
|
}
|
|
|
|
|
|
declare module BABYLON {
|
|
|
+ class VRCameraMetrics {
|
|
|
+ hResolution: number;
|
|
|
+ vResolution: number;
|
|
|
+ hScreenSize: number;
|
|
|
+ vScreenSize: number;
|
|
|
+ vScreenCenter: number;
|
|
|
+ eyeToScreenDistance: number;
|
|
|
+ lensSeparationDistance: number;
|
|
|
+ interpupillaryDistance: number;
|
|
|
+ distortionK: number[];
|
|
|
+ chromaAbCorrection: number[];
|
|
|
+ postProcessScaleFactor: number;
|
|
|
+ lensCenterOffset: number;
|
|
|
+ compensateDistortion: boolean;
|
|
|
+ readonly aspectRatio: number;
|
|
|
+ readonly aspectRatioFov: number;
|
|
|
+ readonly leftHMatrix: Matrix;
|
|
|
+ readonly rightHMatrix: Matrix;
|
|
|
+ readonly leftPreViewMatrix: Matrix;
|
|
|
+ readonly rightPreViewMatrix: Matrix;
|
|
|
+ static GetDefault(): VRCameraMetrics;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class VRDeviceOrientationFreeCamera extends DeviceOrientationCamera {
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
+ getClassName(): string;
|
|
|
+ }
|
|
|
+ class VRDeviceOrientationGamepadCamera extends VRDeviceOrientationFreeCamera {
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
+ getClassName(): string;
|
|
|
+ }
|
|
|
+ class VRDeviceOrientationArcRotateCamera extends ArcRotateCamera {
|
|
|
+ constructor(name: string, alpha: number, beta: number, radius: number, target: Vector3, scene: Scene, compensateDistortion?: boolean, vrCameraMetrics?: VRCameraMetrics);
|
|
|
+ getClassName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
+ class VRExperienceHelper {
|
|
|
+ webVROptions: WebVROptions;
|
|
|
+ private _scene;
|
|
|
+ private _position;
|
|
|
+ private _btnVR;
|
|
|
+ private _webVRsupported;
|
|
|
+ private _webVRready;
|
|
|
+ private _webVRrequesting;
|
|
|
+ private _webVRpresenting;
|
|
|
+ private _fullscreenVRpresenting;
|
|
|
+ private _canvas;
|
|
|
+ private _webVRCamera;
|
|
|
+ private _vrDeviceOrientationCamera;
|
|
|
+ private _deviceOrientationCamera;
|
|
|
+ private _onKeyDown;
|
|
|
+ private _onVrDisplayPresentChange;
|
|
|
+ private _onVRDisplayChanged;
|
|
|
+ private _onVRRequestPresentStart;
|
|
|
+ private _onVRRequestPresentComplete;
|
|
|
+ onEnteringVR: () => void;
|
|
|
+ onExitingVR: () => void;
|
|
|
+ onControllerMeshLoaded: (controller: WebVRController) => void;
|
|
|
+ constructor(scene: Scene, webVROptions?: WebVROptions);
|
|
|
+ private _onDefaultMeshLoaded(webVRController);
|
|
|
+ private _onFullscreenChange();
|
|
|
+ private isInVRMode();
|
|
|
+ private onVrDisplayPresentChange();
|
|
|
+ private onVRDisplayChanged(eventArgs);
|
|
|
+ private updateButtonVisibility();
|
|
|
+ /**
|
|
|
+ * Attempt to enter VR. If a headset is connected and ready, will request present on that.
|
|
|
+ * Otherwise, will use the fullscreen API.
|
|
|
+ */
|
|
|
+ enterVR(): void;
|
|
|
+ /**
|
|
|
+ * Attempt to exit VR, or fullscreen.
|
|
|
+ */
|
|
|
+ exitVR(): void;
|
|
|
+ position: Vector3;
|
|
|
+ dispose(): void;
|
|
|
+ getClassName(): string;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare var HMDVRDevice: any;
|
|
|
+declare var VRDisplay: any;
|
|
|
+declare var VRFrameData: any;
|
|
|
+declare module BABYLON {
|
|
|
+ /**
|
|
|
+ * This is a copy of VRPose.
|
|
|
+ * IMPORTANT!! The data is right-hand data.
|
|
|
+ * @export
|
|
|
+ * @interface DevicePose
|
|
|
+ */
|
|
|
+ interface DevicePose {
|
|
|
+ readonly position?: Float32Array;
|
|
|
+ readonly linearVelocity?: Float32Array;
|
|
|
+ readonly linearAcceleration?: Float32Array;
|
|
|
+ readonly orientation?: Float32Array;
|
|
|
+ readonly angularVelocity?: Float32Array;
|
|
|
+ readonly angularAcceleration?: Float32Array;
|
|
|
+ }
|
|
|
+ interface PoseControlled {
|
|
|
+ position: Vector3;
|
|
|
+ rotationQuaternion: Quaternion;
|
|
|
+ devicePosition?: Vector3;
|
|
|
+ deviceRotationQuaternion: Quaternion;
|
|
|
+ rawPose: Nullable<DevicePose>;
|
|
|
+ deviceScaleFactor: number;
|
|
|
+ updateFromDevice(poseData: DevicePose): void;
|
|
|
+ }
|
|
|
+ interface WebVROptions {
|
|
|
+ trackPosition?: boolean;
|
|
|
+ positionScale?: number;
|
|
|
+ displayName?: string;
|
|
|
+ controllerMeshes?: boolean;
|
|
|
+ defaultLightingOnControllers?: boolean;
|
|
|
+ }
|
|
|
+ class WebVRFreeCamera extends FreeCamera implements PoseControlled {
|
|
|
+ private webVROptions;
|
|
|
+ _vrDevice: any;
|
|
|
+ rawPose: Nullable<DevicePose>;
|
|
|
+ private _onVREnabled;
|
|
|
+ private _specsVersion;
|
|
|
+ private _attached;
|
|
|
+ private _frameData;
|
|
|
+ protected _descendants: Array<Node>;
|
|
|
+ devicePosition: Vector3;
|
|
|
+ deviceRotationQuaternion: Quaternion;
|
|
|
+ deviceScaleFactor: number;
|
|
|
+ controllers: Array<WebVRController>;
|
|
|
+ onControllersAttachedObservable: Observable<WebVRController[]>;
|
|
|
+ onControllerMeshLoadedObservable: Observable<WebVRController>;
|
|
|
+ rigParenting: boolean;
|
|
|
+ private _lightOnControllers;
|
|
|
+ constructor(name: string, position: Vector3, scene: Scene, webVROptions?: WebVROptions);
|
|
|
+ dispose(): void;
|
|
|
+ getControllerByName(name: string): Nullable<WebVRController>;
|
|
|
+ private _leftController;
|
|
|
+ readonly leftController: Nullable<WebVRController>;
|
|
|
+ private _rightController;
|
|
|
+ readonly rightController: Nullable<WebVRController>;
|
|
|
+ getForwardRay(length?: number): Ray;
|
|
|
+ _checkInputs(): void;
|
|
|
+ updateFromDevice(poseData: DevicePose): void;
|
|
|
+ /**
|
|
|
+ * WebVR's attach control will start broadcasting frames to the device.
|
|
|
+ * Note that in certain browsers (chrome for example) this function must be called
|
|
|
+ * within a user-interaction callback. Example:
|
|
|
+ * <pre> scene.onPointerDown = function() { camera.attachControl(canvas); }</pre>
|
|
|
+ *
|
|
|
+ * @param {HTMLElement} element
|
|
|
+ * @param {boolean} [noPreventDefault]
|
|
|
+ *
|
|
|
+ * @memberOf WebVRFreeCamera
|
|
|
+ */
|
|
|
+ attachControl(element: HTMLElement, noPreventDefault?: boolean): void;
|
|
|
+ detachControl(element: HTMLElement): void;
|
|
|
+ getClassName(): string;
|
|
|
+ resetToCurrentRotation(): void;
|
|
|
+ _updateRigCameras(): void;
|
|
|
+ /**
|
|
|
+ * This function is called by the two RIG cameras.
|
|
|
+ * 'this' is the left or right camera (and NOT (!!!) the WebVRFreeCamera instance)
|
|
|
+ */
|
|
|
+ protected _getWebVRViewMatrix(): Matrix;
|
|
|
+ protected _getWebVRProjectionMatrix(): Matrix;
|
|
|
+ private _onGamepadConnectedObserver;
|
|
|
+ private _onGamepadDisconnectedObserver;
|
|
|
+ initControllers(): void;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+declare module BABYLON {
|
|
|
interface IOctreeContainer<T> {
|
|
|
blocks: Array<OctreeBlock<T>>;
|
|
|
}
|