3DEngine.Assets
6.2.8
dotnet add package 3DEngine.Assets --version 6.2.8
NuGet\Install-Package 3DEngine.Assets -Version 6.2.8
<PackageReference Include="3DEngine.Assets" Version="6.2.8" />
<PackageVersion Include="3DEngine.Assets" Version="6.2.8" />
<PackageReference Include="3DEngine.Assets" />
paket add 3DEngine.Assets --version 6.2.8
#r "nuget: 3DEngine.Assets, 6.2.8"
#:package 3DEngine.Assets@6.2.8
#addin nuget:?package=3DEngine.Assets&version=6.2.8
#tool nuget:?package=3DEngine.Assets&version=6.2.8
<div align="center">
3D Engine
A C# engine on SDL3, Vulkan, ImGui and Slang. Raylib's design over a Bevy-style ECS and scheduler, scripted with its own Unity-style behaviors. Implementing Radiance Cascades. [e3d.cs]
</div>
using Engine;
using static Engine.E3D;
InitWindow(800, 450, "[core] basic window");
SetTargetFPS(60);
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(Color.RayWhite);
DrawText("Congrats! You created your first window!", 190, 200, 20, Color.LightGray);
EndDrawing();
}
CloseWindow();
That is raylib's first example, and why not raylib itself is a fair question. This engine keeps its flat API and its loop, in C# with no binding, and adds a Vulkan renderer with shadows and reflections, an ECS, physics, skeletal animation, scene files and ImGui in the frame. It costs raylib's reach, the web, phones and small boards, and asks for Vulkan. The comparison, with what was measured, is Compared with raylib.
A scene is lit by global illumination worked out in real time by radiance cascades, the light that leaves every surface it reaches lighting what it falls on next, tinted by its color, each frame and with nothing baked. A lamp carried through a cave lights it round its corners, a red wall tints the floor beside it, and every light and mesh of a game may move. Global illumination says how, and what it costs.
[Behavior]
public struct Ball
{
public Vector3 Position;
public Vector3 Velocity;
[OnUpdate]
public void Move(BehaviorContext ctx)
{
var dt = (float)ctx.Time.DeltaSeconds;
Velocity.Y -= 9.81f * dt;
Position += Velocity * dt;
}
}
A program opens a window, draws each frame with static calls and closes the window, and every
call it can make is on one cheatsheet. Dear ImGui works between
BeginDrawing and EndDrawing with no setup. Beside the flat API is an ECS, this engine's own,
whose behaviors are [Behavior] structs like Ball, whose fields are each entity's state and
whose methods a source generator turns into systems. It runs inside the same frames, and both are
the engine's way, the loop for the frame, the drawing and the interface and the ECS for the things
that move and the data that lives across frames, as The loop and the ECS
says. DESIGN.md shows the rest of it, and
ARCHITECTURE.md how it is built.
Contents
A program of your own
The engine is the 3DEngine package on nuget.org, and 3DEngine.Templates beside it makes a
game from it in one command:
dotnet new install 3DEngine.Templates
dotnet new 3dengine -n Hello && cd Hello
dotnet run
The project has a window, a loop and a cube in Program.cs, a resources folder for what it
loads, and a source/behaviors folder for scripts the running game compiles again when they are
saved. dotnet new 3dengine-ecs makes one whose state is in behaviors instead, with a script in
that folder setting how fast its cubes turn. Where there is no display,
dotnet run -- --offscreen --frames 30 draws thirty frames with no window and exits.
Without the templates, a console project takes the package:
dotnet new console -n Hello && cd Hello
dotnet add package 3DEngine
and the program at the top of this page goes into Program.cs. A program can use a package built
from a checkout of this repository instead, as
BUILDING.md
shows.
Examples
Each example is a short program in 3DEngine.Examples, run by name:
build/fetch-slang.sh # once, for the shader compiler
build/fetch-raylib-resources.sh # once, for the files raylib's examples load
dotnet run --project 3DEngine.Examples -- core_3d_camera_free
A picture opens the program that drew it, and the name under it is the one it runs by. Each of raylib's own examples, and what is written of it here, is a row of the examples table. A folder's row scrolls sideways where it is wider than the page. The games, the last row, are built from the package as a game of your own would be, each with a README of what it shows.
Of raylib's 222 examples 221 are written here and 1 does not apply, and beside them are 44 examples of the engine's own and 19 games.
Audio (12)
Benchmarks (2)
![]() |
![]() |
|---|---|
textures_bunnymark |
models_stress |
Core (50)
Ecs (6)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|
ecs_behaviors |
ecs_mesh_entities |
ecs_animated_models |
ecs_states |
ecs_physics |
ecs_parented_particles |
Gui (1)
![]() |
|---|
gui_imgui_window |
Models (42)
Physics (1)
![]() |
|---|
physics_boxes |
Scenes (2)
![]() |
![]() |
|---|---|
scenes_level |
scenes_sponza |
Shaders (52)
Shapes (45)
Text (17)
Textures (35)
Games (19)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Hopper |
Summit |
Swarm |
Rally |
Manor |
Tactics |
Tempo |
Sumo |
Wordfall |
Slide |
Jelly |
Wick |
Ore |
Pinball |
Span |
Siege |
Tumble |
Tones |
Blockout |
Guide
The guide in docs/ is for somebody
using the engine, a page an area, each built on an example that runs, read in order or by area.
| CHEATSHEET.md | Every public function of the library on one line, grouped as the pages are |
| A first game | From dotnet new 3dengine to a small finished game in twelve steps, each a few lines and a picture |
| The loop and the ECS | The engine's two ways, which fits where, a behavior that moves things and a loop that draws them, and the voxel game's split |
| The window and the frame | Opening a window, the loop, time, the window's state and ImGui in the frame |
| Drawing in 2D | Shapes, colors, text, splines, a 2D camera and collision |
| Drawing in 3D and cameras | 3D shapes, moving a camera, projections, picking and drawing into a texture |
| Textures and images | Loading and drawing textures, filtering, editing images, sprites and many sprites |
| Text and fonts | The default font, fonts from files, other scripts, typed text and distance field fonts |
| Models and animation | Loading and generating models, terrain, skeletal animation, layered clips, morph targets, a sky and instancing |
| Modeling | Edit meshes shaped by primitives and operations on a selection, their recipe and its files, and the models and colliders built from them |
| Materials, light and shadows | Metallic and rough surfaces, maps, emissive and see-through surfaces, bloom and effects over the frame, lights and shadows, global illumination, reflection probes |
| Global illumination | Radiance cascades, the scene's field and the probes, emissive surfaces as lights, the qualities and their cost, and the tools that read it against a reference |
| Shaders and compute | Slang shaders for 2D drawing and models, post processing, compute shaders, their buffers and the textures they write |
| Audio | Sounds, streamed music, volume, pitch and pan, and sound placed in a 3D world |
| Input | Keys, the mouse, touch and gestures, gamepads, and input shared with ImGui |
| Physics | Bodies that fall and collide, rays, contacts, triggers, joints and a character |
| Behaviors and the ECS | Behaviors, stages, spawning entities, filters, and the world from the loop |
| States | Screens and modes as a state, behaviors that follow it, and states within states |
| Scenes | Saving and loading levels, the file, a program's own components, and scenes inside scenes |
| Editing while it runs | Shaders, textures, models, levels and behaviors saved while the program runs and seen in it at the next frame, where that holds and how e3d lists it |
| The command line | Asking a running program about its world, input, captures, the log, commands of its own and C# typed at it |
| Shipping a game | A game of its own on the package, and one native executable a player runs |
| Compared with raylib | What is the same as raylib, what this engine adds, what it costs, and what was measured |
| Moving from 5.1 to 6.0 | What a game written for 5.1 writes for 6.0, name by name, raylib's names for keys, buttons and log levels among them |
Controlling a running app
./e3d controls any program built on the engine from a terminal, which is how changes are checked
without opening a visible window:
./e3d open models_loading --offscreen # renders, with no window and no display needed
./e3d command entity.count
./e3d command input.key W 40 # input through the engine
./e3d eval 'ecs.Query<Transform>().Count()' # C# compiled against the running world
./e3d shot after.png # the next frame, as a PNG
./e3d stop
Programs take --serve, --hidden, --offscreen, --headless, --frames N and
--frame-time S, and a game adds commands with
[Command] on a static method. E3D.md lists the commands.
Building
You need the .NET 10 SDK and a Vulkan 1.4 driver. SDL3, Assimp and Dear ImGui come with their NuGet
packages, and build/fetch-slang.sh downloads the Slang compiler into build/tools.
build/fetch-slang.sh
dotnet build 3DEngine.slnx
dotnet test 3DEngine.Tests
BUILDING.md has the layout, the platforms and how shaders are compiled.
Status
Early, and used for small games. The flat API carries most of raylib's API, the window and input, 2D and 3D shapes, images and textures, models through Assimp with skeletal animation, sounds, music, audio streams, text in fonts, render targets, Slang shaders for shapes and models, compute shaders, lights with shadows, an environment map and reflection probes, global illumination and glossy reflections, physics, states and scenes, with ImGui in the same frame. The ECS, the scheduler and behaviors run in the same frames as the loop, and a game ships as one native executable through native AOT. What is missing:
- Some of raylib is not carried, as the shapes texture and the file callbacks, and the comparison with raylib answers each function left out with what C# has in its place or why it is left out.
- The effects over the frame are bloom, exposure, a choice of curve, color grading, a vignette, FXAA, temporal antialiasing, depth of field and motion blur, with ambient occlusion and volumetric fog beside them, past what a program draws through a render texture and a shader of its own.
- CI draws on Linux and Windows through lavapipe and on macOS through MoltenVK, under the validation layer, on every push, and the pack run plays every game on all three and captures every example on Linux and macOS.
TODO.md lists the rest, in the order it blocks making a game.
Documents
| DESIGN.md | The rules the API follows, and the dependency policy |
| ARCHITECTURE.md | The app, the schedule, the ECS and the renderer |
| RENDERING.md | The renderer and the order it grows in |
| BUILDING.md | Building, testing and platforms |
| TODO.md | Outstanding work |
License
Mozilla Public License 2.0. The libraries the engine depends on, and their licenses, are in THIRD-PARTY-NOTICES.md, which the package carries beside the license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- 3DEngine.Core (>= 6.2.8)
- 3DEngine.Diagnostics (>= 6.2.8)
- 3DEngine.Graphics (>= 6.2.8)
- AssimpNetter (>= 6.0.4)
- StbImageSharp (>= 2.30.15)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on 3DEngine.Assets:
| Package | Downloads |
|---|---|
|
3DEngine
A C# game engine in which a program opens a window, draws each frame with plain static calls named as raylib's functions are, and draws Dear ImGui in the same frame, over SDL3, Vulkan and Slang, with an ECS and source-generated behaviors underneath. |
|
|
3DEngine.Gui
Dear ImGui's context, its input and its Vulkan pass. |
|
|
3DEngine.Physics
Rigid bodies over BepuPhysics. |
|
|
3DEngine.Audio
Sounds and music over SDL3, with their decoders. |
|
|
3DEngine.Modeling
The edit meshes the flat API shapes by operations, and their store. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.2.8 | 0 | 11/9/2026 |
A model or scene loaded by name is read again into what the program holds as its file is saved, with the guide to editing while a program runs.
A live program reads a texture again as its file is saved and draws it under the same handle, at its new size where it has one.
A live program compiles a shader again as its file is saved and draws with it under the same handle, keeping the old one where the save does not compile.
The measure against raylib finds the SDL version in the library's projects, and the first wait after a game opens gives a cold compile ten minutes.
A program is live where it runs from its own project's build folder or says so, watching the files the flat API loads by name and loading each again once quiet, which e3d's live lists.
Two comments say what the code does, the glow lights' share and the games the pack run plays on Windows and macOS.
Comments say the reason alone, their readings before and after, their measured costs and their accounts of trials left to the documents and the review.




















































































































































































































































































