Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query results #4

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Flecs Explorer
Web-based UI for monitoring Flecs applications, trying out queries & learning ECS

<img width="995" alt="Screen Shot 2021-11-07 at 10 20 51 PM" src="https://user-images.githubusercontent.com/9919222/140693729-12b9c7bb-3147-4040-9c15-d830e9bc1080.png">
<img width="1038" alt="Screen Shot 2022-06-01 at 3 42 48 PM" src="https://user-images.githubusercontent.com/9919222/171513654-894549df-8ad5-4d39-a82a-d57e425ece9e.png">

A live version of the explorer is running @ https://flecs.dev/explorer

Expand Down Expand Up @@ -72,6 +72,35 @@ docker run --name=explorer -p 80:80 --restart=unless-stopped -d sandermertens/fl

You can now go to http://localhost to open the explorer.

### Statistics
The explorer can visualize statistics from Flecs applications. Statistics collection is disabled by default as it is not free. To enable it, import the `flecs.monitor` module:

In C:
```c
ECS_IMPORT(world, FlecsMonitor);
```

In C++:
```c
world.import<flecs::monitor>();
```

Note that the statistics collection systems run as part of the default Flecs pipeline. If your application does not use systems, manually runs systems or uses a custom pipeline statistics collection will not run. To make sure the collection systems are ran, call this once in the main loop of your game:

In C:
```c
ecs_progress(world, 0);
```

In C++
```c
world.progress();
```

You should now be able to see statistics in the explorer, which should look like this:

<img width="1231" alt="Screen Shot 2022-06-04 at 1 14 49 AM" src="https://user-images.githubusercontent.com/9919222/171993359-d3d31208-6e7e-46ad-909e-c5f80fa492d3.png">

### URL options
The following options can be added to the URL:

Expand Down
Loading