Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/freakmangd/zentig_raylib
Raylib bindings and ecs wrappers for zentig
https://github.com/freakmangd/zentig_raylib
Last synced: 9 days ago
JSON representation
Raylib bindings and ecs wrappers for zentig
- Host: GitHub
- URL: https://github.com/freakmangd/zentig_raylib
- Owner: freakmangd
- License: mit
- Created: 2023-07-20T07:32:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-15T19:02:08.000Z (6 months ago)
- Last Synced: 2024-11-09T20:12:53.262Z (2 months ago)
- Language: Zig
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zentig_raylib
Raylib bindings and ecs wrappers for zentig## Usage
Mods available for the `WorldBuilder` are:
(assuming `zrl == @import("zentig-raylib");`)
+ `zrl` contains: `Sprite`, `Camera2d`
+ `zrl.physics` - contains: `ColBox`## Installation
### Locally
Clone this and raylib into a folder in your project root (ex: `lib`) and add these lines to your `build.zig`
```zig
// ztg comes from zentig.addAsLocalModule
_ = zrl.addAsLocalModule(ztg, @import("lib/raylib/src/build.zig"), .{
.name = "zrl",
.rl_include_path = "lib/raylib/src/",
});
```You can also choose to import raylib as its own module into your project:
```zig
_ = zrl.addAsLocalModule(ztg, @import("lib/raylib/src/build.zig"), .{
.name = "zrl",
.rl_include_path = "lib/raylib/src/",.import_raylib_as = "raylib", // add this line
});
```### Package Manager
After adding your dependency to `build.zig.zon` do this in your `build.zig`:
```zig
const zrl_dep = b.dependency("zentig_raylib", .{
.target = target,
.optimize = optimize,
});
exe.addModule("zentig", zrl_dep.module("zentig")); // Zentig raylib exposes zentig so you only need one dependency
exe.addModule("zrl", zrl_dep.module("zentig-raylib"));
exe.linkLibrary(zrl_dep.artifact("raylib"));
```