API Reference > imodeljs-frontend > Tools > LookAndMoveTool LookAndMoveTool Class A tool that performs the walk operation using mouse+keyboard or touch controls. Keyboard and mouse controls are similar to those used by many video games: Mouse motion: look around. W, A, S, D (or arrow keys): move forward, left, right, or backward respectively. E, Q (or PgUp, PgDn): move up and down respectively. +, - (or scroll wheel): increase or decrease velocity. Extends ViewManip Methods Name Description constructor(vp: ScreenViewport, oneShot: boolean = false, isDraggingRequired: boolean = false): LookAndMoveTool onReinitialize(): void Override Call to reset tool to initial state provideToolAssistance(mainInstrKey: string): void Beta Inherited methods Name Inherited from Description applyToolSettingPropertyChange(_updatedValue: DialogPropertySyncItem): boolean ViewManip Used to receive property changes from UI. beginDynamicUpdate(): void ViewManip beginDynamics(): void ViewManip Call to initialize dynamics mode. bumpToolSetting(_settingIndex?: number): Promise<boolean> ViewManip Used to "bump" the value of a tool setting. changeLocateState(enableLocate: boolean, enableSnap?: boolean, cursor?: string, coordLockOvr?: CoordinateLockOverrides): void ViewManip Helper method to keep the view cursor, display of locate circle, and coordinate lock overrides consistent with AccuSnap.isLocateEnabled and AccuSnap.isSnapEnabled. changeViewport(vp?: ScreenViewport): void ViewManip decorate(context: DecorateContext): void ViewManip Called to allow an active tool to display non-element decorations in overlay mode. decorateSuspended(_context: DecorateContext): void ViewManip Called to allow a suspended tool to display non-element decorations in overlay mode. endDynamicUpdate(): void ViewManip endDynamics(): void ViewManip Call to terminate dynamics mode. enforceZUp(pivotPoint: Point3d): boolean ViewManip exitTool(): void ViewManip Do not override. filterHit(_hit: HitDetail, _out?: LocateResponse): Promise<LocateFilterStatus> ViewManip Invoked to allow tools to filter which elements can be located. getCurrentButtonEvent(ev: BeButtonEvent): void ViewManip Fill the supplied button event from the current cursor location. getDecorationGeometry(_hit: HitDetail): undefined | GeometryStreamProps ViewManip Called to allow snapping to pickable decoration geometry. getToolTip(_hit: HitDetail): Promise<string | HTMLElement> ViewManip Invoked before the locate tooltip is displayed to retrieve the information about the located element. initLocateElements(enableLocate: boolean = true, enableSnap?: boolean, cursor?: string, coordLockOvr?: CoordinateLockOverrides): void ViewManip Helper method for tools that need to locate existing elements. isCompatibleViewport(_vp: ScreenViewport, _isSelectedViewChange: boolean): boolean ViewManip isPointVisible(testPt: Point3d): boolean ViewManip Determine whether the supplied point is visible in this Viewport. isValidLocation(_ev: BeButtonEvent, _isButtonEvent: boolean): boolean ViewManip lensAngleMatches(angle: Angle, tolerance: number): boolean ViewManip onCleanup(): void ViewManip Invoked when the tool becomes no longer active, to perform additional cleanup logic onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> ViewManip Invoked when the data button is pressed. onDataButtonUp(_ev: BeButtonEvent): Promise<EventHandled> ViewManip Invoked when the data button is released. onDynamicFrame(_ev: BeButtonEvent, _context: DynamicsContext): void ViewManip Called to allow Tool to display dynamic elements. onInstall(): boolean ViewManip Override to execute additional logic when tool is installed. onKeyTransition(wentDown: boolean, keyEvent: KeyboardEvent): Promise<EventHandled> ViewManip Called when any key is pressed or released. onMiddleButtonDown(_ev: BeButtonEvent): Promise<EventHandled> ViewManip Invoked when the middle mouse button is pressed. onMiddleButtonUp(_ev: BeButtonEvent): Promise<EventHandled> ViewManip Invoked when the middle mouse button is released. onModifierKeyTransition(wentDown: boolean, modifier: BeModifierKeys, event: KeyboardEvent): Promise<EventHandled> ViewManip Called when Control, Shift, or Alt modifier keys are pressed or released. onMouseEndDrag(ev: BeButtonEvent): Promise<EventHandled> ViewManip Invoked when the button is released after onMouseStartDrag. onMouseMotion(ev: BeButtonEvent): Promise<void> ViewManip Invoked when the cursor is moving onMouseStartDrag(ev: BeButtonEvent): Promise<EventHandled> ViewManip Invoked when the cursor begins moving while a button is depressed. onMouseWheel(inputEv: BeWheelEvent): Promise<EventHandled> ViewManip Invoked when the mouse wheel moves. onPostInstall(): void ViewManip Override to execute additional logic after tool becomes active onResetButtonDown(_ev: BeButtonEvent): Promise<EventHandled> ViewManip Invoked when the reset button is pressed. onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled> ViewManip Invoked when the reset button is released. onSelectedViewportChanged(_previous: undefined | ScreenViewport, _current: undefined | ScreenViewport): void ViewManip Called when active view changes. onSuspend(): void ViewManip Notification of a ViewTool or InputCollector starting and this tool is being suspended. onTouchCancel(ev: BeTouchEvent): Promise<void> ViewManip Called when a touch point is interrupted in some way and needs to be dropped from the list of target touches. onTouchComplete(ev: BeTouchEvent): Promise<void> ViewManip Called when the last touch point is removed from the surface completing the current gesture. onTouchEnd(ev: BeTouchEvent): Promise<void> ViewManip Called when user removes a touch point by lifting a finger or stylus from the surface. onTouchMove(ev: BeTouchEvent): Promise<void> ViewManip Called when a touch point moves along the surface. onTouchMoveStart(ev: BeTouchEvent, startEv: BeTouchEvent): Promise<EventHandled> ViewManip Called after at least one touch point has moved for an appreciable time and distance along the surface to not be considered a tap. onTouchStart(ev: BeTouchEvent): Promise<void> ViewManip Called when user adds a touch point by placing a finger or stylus on the surface. onTouchTap(ev: BeTouchEvent): Promise<EventHandled> ViewManip Called when touch point(s) are added and removed from a surface within a small time window without any touch point moving. onUnsuspend(): void ViewManip Notification of a ViewTool or InputCollector exiting and this tool is being unsuspended. parseAndRun(..._args: string[]): boolean ViewManip Run this instance of a tool using a series of string arguments. processFirstPoint(ev: BeButtonEvent): boolean ViewManip processPoint(ev: BeButtonEvent, inDynamics: boolean): boolean ViewManip reloadToolSettingsProperties(): void ViewManip Called by tool to inform UI to reload ToolSettings with new set of properties. run(..._args: any[]): boolean ViewManip Run this instance of a Tool. setCameraLensAngle(lensAngle: Angle, retainEyePoint: boolean): ViewStatus ViewManip setTargetCenterWorld(pt: Point3d, lockTarget: boolean, saveTarget: boolean): void ViewManip Set the center of rotation for rotate handle. supplyToolSettingsProperties(): undefined | DialogItem[] ViewManip Used to supply list of properties that can be used to generate ToolSettings. syncToolSettingsProperties(syncData: DialogPropertySyncItem[]): void ViewManip Called by tool to synchronize the UI with property changes made by tool. testDecorationHit(_id: string): boolean ViewManip Called to support operations on pickable decorations, like snapping. updateTargetCenter(): void ViewManip fitView(viewport: ScreenViewport, animateFrustumChange: boolean, options?: ViewChangeOptions): void Static ViewManip getDefaultTargetPointWorld(vp: Viewport): Point3d Static ViewManip getFocusPlaneNpc(vp: Viewport): number Static ViewManip register(namespace?: I18NNamespace, i18n?: I18N): void Static ViewManip Register this Tool class with the ToolRegistry. showPrompt(prompt: string): void Static ViewManip translate(val: string): string Static ViewManip zoomToAlwaysDrawnExclusive(viewport: ScreenViewport, options?: ViewChangeOptions): Promise<boolean> Static ViewManip Properties Name Type Description iconSpec Static string The icon for this Tool. toolId Static string The unique string that identifies this tool. Inherited properties Name Type Inherited from Description description Accessor ReadOnly string ViewManip Get the localized description string from this Tool's class description Accessor StaticReadOnly string ViewManip Get the localized description for this Tool class. This returns the value of "tools." + this.toolId + ".description" fromits registered Namespace (e.g. "en/MyApp.json"). If that key is not in the localization namespace,ViewManip.flyover is returned. englishKeyin Accessor StaticReadOnly string ViewManip Get the English keyin string for this Tool class. This returns the value of "tools." + this.toolId + ".keyin" fromits registered Namespace (e.g. "en/MyApp.json"). flyover Accessor ReadOnly string ViewManip Get the localized flyover string from this Tool's class flyover Accessor StaticReadOnly string ViewManip Get the localized flyover for this Tool class. This returns the value of "tools." + this.toolId + ".flyover" fromits registered Namespace (e.g. "en/MyApp.json"). If that key is not in the localization namespace,ViewManip.keyin is returned. frustumValid boolean ViewManip handleMask number ViewManip hidden Static boolean ViewManip If true, this Tool will not appear in the list from ToolRegistry.getToolList. i18n Static I18N ViewManip The internationalization services instance used to translate strings from the namespace. iconSpec Accessor ReadOnly string ViewManip Get the iconSpec from this Tool's class. inDynamicUpdate boolean ViewManip inHandleModify boolean ViewManip isControlDown Accessor ReadOnly boolean ViewManip Convenience method to check whether control key is currently down without needing a button event. isDragging boolean ViewManip isDraggingRequired boolean ViewManip isDynamicsStarted Accessor ReadOnly boolean ViewManip Call to find out if dynamics are currently active. isZUp Accessor ReadOnly boolean ViewManip keyin Accessor ReadOnly string ViewManip Get the localized keyin string from this Tool's class keyin Accessor StaticReadOnly string ViewManip Get the localized keyin string for this Tool class. This returns the value of "tools." + this.toolId + ".keyin" fromits registered Namespace (e.g. "en/MyApp.json"). maxArgs Accessor StaticReadOnly undefined | number ViewManip The maximum number of arguments allowed by ViewManip.parseAndRun, or undefined if there is no maximum.If subclasses override ViewManip.parseAndRun, they should also override this method to indicate the maximumnumber of arguments their implementation expects. minArgs Accessor StaticReadOnly number ViewManip The minimum number of arguments allowed by ViewManip.parseAndRun. If subclasses override ViewManip.parseAndRun, they should alsooverride this method to indicate the minimum number of arguments their implementation expects. UI controls can usethis information to ensure the tool has enough information to execute. namespace Static I18NNamespace ViewManip The I18NNamespace that provides localized strings for this Tool. nPts number ViewManip oneShot boolean ViewManip receivedDownEvent boolean ViewManip Used to avoid sending tools up events for which they did not receive the down event. targetCenterLocked boolean ViewManip targetCenterValid boolean ViewManip targetCenterWorld Readonly Point3d ViewManip toolId Accessor ReadOnly string ViewManip Get the toolId string for this Tool class. This string is used to identify the Tool in the ToolRegistry and is used to localizethe keyin, description, etc. from the current locale. viewport undefined | ScreenViewport ViewManip Defined in core/frontend/src/tools/ViewTool.ts Line 3014 Last Updated: 12 June, 2024