export default StreetControls; /** * Camera controls that can follow a path. * It is used to simulate a street view. * It stores a currentPosition and nextPosition, and do a camera traveling to go to next position. * It also manages picking on the ground and on other object, like building. * * * * * Note that it only works in globe view. * @property {number} keyGoToNextPosition key code to go to next position, default to 90 for key Z * @property {number} keyGoToPreviousPosition key code to go to previous position, default to 83 for key S * @property {number} keySetCameraToCurrentPositionAndLookAtNext key code set camera to current position, default to 65 for key A * @property {number} keySetCameraToCurrentPositionAndLookAtPrevious key code set camera to current position, default to 81 for key Q * @extends FirstPersonControls */ declare class StreetControls extends FirstPersonControls { /** * @param { View } view - View where this control will be used * @param { Object } options - Configuration of this controls * @param { number } [options.wallMaxDistance=1000] - Maximum distance to click on a wall, in meter. * @param { number } [options.animationDurationWall=200] - Time in millis for the animation when clicking on a wall. * @param { THREE.Mesh } [options.surfaceGround] - Surface helper to see when mouse is on the ground, default is a transparent circle. * @param { THREE.Mesh } [options.surfaceWall] - Surface helper to see when mouse is on a wall, default is a transparent rectangle. * @param { string } [options.buildingsLayer='Buildings'] - Name of the building layer (used to pick on wall). * @param { function } [options.computeTime] - Function to compute time (in millis), used for the animation to move to a distance (in meter) * @param { number } [options.offset=4] - Altitude in meter up to the ground to move to when click on a target on the ground. */ constructor(view: View, options?: { wallMaxDistance?: number | undefined; animationDurationWall?: number | undefined; surfaceGround?: THREE.Mesh, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | undefined; surfaceWall?: THREE.Mesh, THREE.Material | THREE.Material[], THREE.Object3DEventMap> | undefined; buildingsLayer?: string | undefined; computeTime?: Function | undefined; offset?: number | undefined; }); isStreetControls: boolean; _onMouseOut: () => void; previousPosition: any; currentPosition: any; nextPosition: any; keyGoToNextPosition: number; keyGoToPreviousPosition: number; keySetCameraToCurrentPositionAndLookAtNext: number; keySetCameraToCurrentPositionAndLookAtPrevious: number; tweenGroup: import("@tweenjs/tween.js").Group; surfaceGround: THREE.Mesh, THREE.Material | THREE.Material[], THREE.Object3DEventMap>; surfaceWall: THREE.Mesh, THREE.Material | THREE.Material[], THREE.Object3DEventMap>; surfaces: THREE.Object3D; wallMaxDistance: number; animationDurationWall: number; buildingsLayer: string | undefined; computeTime: Function; offset: number; transformationPositionPickOnTheGround: any; end: any; setCurrentPosition(newCurrentPosition: any): void; setNextPosition(newNextPosition: any): void; setPreviousPosition(newPreviousPosition: any): void; onMouseUp(event: any): void; _stateOnMouseDrag: boolean | undefined; /** * Sets the camera to the current position (stored in this controls), looking at the next position (also stored in this controls). * * @param { boolean } lookAtPrevious look at the previous position rather than the next one */ setCameraToCurrentPosition(lookAtPrevious: boolean): void; /** * Set the camera on a position, looking at another position. * * @param { THREE.Vector3 } position The position to set the camera * @param { THREE.Vector3 } lookAt The position where the camera look at. */ setCameraOnPosition(position: THREE.Vector3, lookAt: THREE.Vector3): void; /** * Method called when user click on the ground.
* Note that this funtion contains default values that can be overrided, by overriding this class. * * @param {THREE.Vector3} position - The position */ onClickOnGround(position: THREE.Vector3): void; /** * Method called when user click on oject that is not the ground.
* Note that this function contains default values that can be overrided, by overriding this class. * * @param {THREE.Vector3} position - The position */ onClickOnWall(position: THREE.Vector3): void; /** * Animate the camera to make it look at a position, in a given time * * @param { THREE.Vector3 } position - Position to look at * @param { number } time - Time in millisecond */ animateCameraLookAt(position: THREE.Vector3, time: number): void; tween: import("@tweenjs/tween.js").Tween<{ t: number; }> | import("@tweenjs/tween.js").Tween | undefined; animationFrameRequester: (() => void) | (() => void) | null | undefined; /** * Move the camera smoothly to the position, in a given time. * * @param { THREE.Vector3 } position - Destination of the movement. * @param { number } time - Time in millisecond * @return { Promise } */ moveCameraTo(position: THREE.Vector3, time?: number): Promise; stopAnimations(): void; /** * Move the camera to the 'currentPosition' stored in this control. */ moveCameraToCurrentPosition(): void; } import FirstPersonControls from '../Controls/FirstPersonControls'; import * as THREE from 'three';