Construct the manager and attach mousemove listener used for floating input positioning and live preview updates.
The view associated with the input manager
The flag to indicate whether it is currently in an “input acquisition” mode (e.g., point selection, distance/angle prompt, string prompt, etc.),
Request an angle in degrees from the user.
Prompt the user to specify a rectangular box by selecting two corners. Each corner may be specified by clicking on the canvas or typing "x,y". A live HTML overlay rectangle previews the box as the user moves the mouse.
Request a distance (number) from the user.
Request a double/float from the user.
Prompts the user to select a single entity. Similar to Editor.GetEntity() in AutoCAD.
Request an integer from the user.
Prompt the user to type a keyword. Resolved when Enter is pressed.
Prompts the user to select one or more entities by mouse interaction.
This method supports two selection modes:
The selection operation behaves similarly to AutoCAD's
Editor.GetSelection() API:
true, the selection
completes immediately after the first entity is selected.This method does not use floating input boxes. Instead, it relies entirely on mouse gestures and keyboard input. A floating prompt message and command line prompt are displayed during the operation.
Selection prompt options that control user messaging and whether only a single entity may be selected.
A promise that resolves to an array of selected entity IDs. The array is empty if no entities are selected and the user presses Enter. The promise is rejected if the operation is cancelled.
Prompt the user to type an arbitrary string. Resolved when Enter is pressed.
A fully type-safe TypeScript class providing CAD-style interactive user input using floating HTML input boxes and mouse events. Supports collecting points, distances, angles, numbers, strings, and selecting a 2-point rectangular box using an HTML overlay rectangle (suitable when the main canvas is a THREE.js WebGL canvas).