An interactive graph visualization library for C++ with real-time rendering and ECS-based architecture.
- Interactive Visualization - Real-time rendering of complex graphs and neural networks
- ECS Architecture - Entity Component System design for flexible and extensible graph management
- Physics-based Layout - Automatic node positioning with physics simulation
- Editor Framework - Built-in editor interface for graph manipulation and inspection
- Modern C++ - Written in C++23 with best practices and clean API design
- C++23 compatible compiler
- CLang 20 or higher
- CMake 3.30.0 or higher
- Dependencies (managed via CMake):
- raylib - Graphics rendering
- imgui - UI framework
- rlImGui - raylib + ImGui integration
- EnTT - Entity Component System library
-
Create
CMakeLists.txt -
Create
externaldirectory -
Run command:
cd external git submodule add --depth=1 https://github.com/dadencukillia/CrocobyGraph.git cd CrocobyGraph git submodule update --init --recursive --progress --depth=1 cd ../..
-
Add into
CMakeLists.txtthis line:add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/CrocobyGraph)
-
And link it to your executable:
target_link_libraries(YOUR_EXECUTABLE PRIVATE CrocobyGraph)
#include "crocobygraph/graphs.hpp"
#include "crocobygraph/ecs.hpp"
#include "crocobygraph/visual.hpp"
#include <vector>
namespace cg = CrocobyGraph;
int main() {
// Create a simple graph
std::vector<cg::LayoutGraphNode> nodes = {
{
.label = "Start",
.color = cg::ColorPresets::RED,
.points_to = { "finish" },
.id = "start",
},
{
.label = "Finish",
.color = { 0x00FF00FF },
.points_to = { "start" },
.id = "finish",
},
};
// Create ECS and visualize
cg::GraphECS ecs {};
ecs.get_scene().append(cg::decompose(std::move(nodes)));
ecs.add_system(cg::get_window_system<cg::PhysicsFrame, cg::EditorFrame>());
ecs.run_loop();
return 0;
}std::string nodes[3] = { "Parent", "Child 1", "Child 2" };
const bool connections[3][3] = {
{ true, true, true },
{ false, true, false },
{ false, false, true }
};
auto graph = cg::layout_from_adjacency_matrix<3>(
std::move(nodes),
connections
);auto neural_net = cg::neural_network({
"Ticket class",
"Gender",
"Age",
"Parch",
"Fare"
}, { 32, 16 }, {
"Survivance chance"
});
cg::GraphECS ecs {};
ecs.get_scene().append(std::move(neural_net));
ecs.add_system(cg::get_window_system<cg::PhysicsFrame, cg::EditorFrame>());
ecs.run_loop();More features and more detailed documentation are coming soon.
skypjack/entt- Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much moreocornut/imgui- Bloat-free Graphical User interface for C++ with minimal dependenciesraysan5/raylib- A simple and easy-to-use library to enjoy videogames programmingraylib-extras/rlImGui- A Raylib integration with DearImGuigooglefonts/opensans- Open Sans font
This project is licensed under the MIT License - see the LICENSE file for details.
Code and documentation Copyright (c) 2026 Illia Diadenchuk.
The project is distributing as a library, so if you've compiled a binary you can choose any way how to include notices in the binary.