Application examples
The engine's application examples: what each one shows, whether it runs in a browser and the command that runs it.
Setting up an app: plugins, runners, headless apps, exiting, logging and settings. There are 19 examples on this page. For the concepts behind them, see The app.
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 |
|---|---|---|---|
| Advanced log layers | Illustrate how to transfer data between log layers and NEO's ECS | No | cargo run --example log_layers_ecs |
| Custom Loop | Demonstrates how to create a custom runner (to update an app manually) | No | cargo run --example custom_loop |
| Drag and Drop | An example that shows how to handle drag and drop in an app | No | cargo run --example drag_and_drop |
| Empty | An empty application (does nothing) | No | cargo run --example empty |
| Empty with Defaults | An empty application with default plugins | Yes | cargo run --example empty_defaults |
| Externally Driven Headless Renderer | Using neo with manually driven update to render images | No | cargo run --example externally_driven_headless_renderer |
| Headless | An application that runs without default plugins | No | cargo run --example headless --features neo_log |
| Headless Renderer | An application that runs with no window, but renders into image file | No | cargo run --example headless_renderer |
| Log layers | Illustrate how to add custom log layers | No | cargo run --example log_layers |
| Logs | Illustrate how to use generate log output | Yes | cargo run --example logs |
| No Renderer | An application that runs with default plugins and displays an empty window, but without an actual renderer | No | cargo run --example no_renderer |
| Plugin | Demonstrates the creation and registration of a custom plugin | Yes | cargo run --example plugin |
| Plugin Group | Demonstrates the creation and registration of a custom plugin group | Yes | cargo run --example plugin_group |
| Render Recovery | Demonstrates how neo can recover from rendering failures. | No | cargo run --example render_recovery |
| Return after Run | Show how to return to main after the NEO app has exited | No | cargo run --example return_after_run |
| Save Window Position | Demonstrates saving window position settings | No | cargo run --example persisting_window_settings --features neo_settings |
| Settings | Demonstrates persistence of settings | Yes | cargo run --example settings --features neo_settings |
| Thread Pool Resources | Creates and customizes the internal thread pool | No | cargo run --example thread_pool_resources |
| Without Winit | Create an application without winit (runs single time, no event loop) | No | cargo run --example without_winit |