Picking examples
The engine's picking examples: what each one shows, whether it runs in a browser and the command that runs it.
Pointer events on meshes, sprites and UI: hover, click, drag and drop. There are 7 examples on this page. For the concepts behind them, see Picking.
Run any of them from the engine core's workspace (the folder of the engine source that holds the neo crate's Cargo.toml); see Run an example.
Examples#
| Example | What it shows | Web | Run |
|---|---|---|---|
| Custom Hit Data | Demonstrates a custom picking backend with custom hit data. | Yes | cargo run --example custom_hit_data --features mesh_picking |
| Drag and Drop | Demonstrates drag and drop using picking events | Yes | cargo run --example dragdrop_picking --features mesh_picking |
| Draggable Slider | Demonstrates pointer capture using a draggable slider | Yes | cargo run --example draggable_slider |
| Mesh Picking | Demonstrates picking meshes | Yes | cargo run --example mesh_picking --features mesh_picking |
| Picking Debug Tools | Demonstrates picking debug overlay | Yes | cargo run --example debug_picking --features neo_dev_tools |
| Showcases simple picking events and usage | Demonstrates how to use picking events to spawn simple objects | Yes | cargo run --example simple_picking --features ui_picking |
| Sprite Picking | Demonstrates picking sprites and sprite atlases | Yes | cargo run --example sprite_picking --features sprite_picking |