FastModelPicker
A fast model picker that uses color coding to identify fragment models under the mouse cursor. This is much faster than raycasting for simple model identification.
Implements
Properties
components
components:
Components
The components instance to which this FastModelPicker belongs.
debugMode
debugMode:
boolean=false
Whether debug mode is enabled. When enabled, shows the color-coded canvas.
enabled
enabled:
boolean=true
mouse
readonlymouse:Mouse
The position of the mouse in the screen.
onDisposed
readonlyonDisposed:Event<unknown>
Implementation of
world
world:
World
A reference to the world instance to which this FastModelPicker belongs. This is used to access the camera and scene.
Methods
dispose()
dispose():
void
Returns
void
Implementation of
getModelAt()
getModelAt(
position?):Promise<null|string>
Gets the model ID at the given screen position.
Parameters
| Parameter | Type | Description |
|---|---|---|
position? | Vector2 | Optional screen position. If not provided, uses current mouse position. |
Returns
Promise<null | string>
The model ID at the position, or null if no model is found.
setDebugMode()
setDebugMode(
enabled):void
Enables or disables debug mode. When enabled, shows a canvas with the color-coded render.
Parameters
| Parameter | Type |
|---|---|
enabled | boolean |
Returns
void