{"id":23587905,"url":"https://github.com/arkenidar/graphic","last_synced_at":"2026-05-03T11:34:08.563Z","repository":{"id":63721882,"uuid":"568842385","full_name":"arkenidar/graphic","owner":"arkenidar","description":"#claude_ai Love2D with CPU-based 3D and common code with a custom LuaJIT FFI + libSDL2 backend , that mimics Love2D but it's indipendent .","archived":false,"fork":false,"pushed_at":"2026-04-01T22:49:17.000Z","size":17387,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-02T07:26:22.833Z","etag":null,"topics":["3d","algebra","common","love2d","lua","luajit","math","msys2-mingw64","obj","physics","polygons","render","sdl2","stl","transformations"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arkenidar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-11-21T14:25:08.000Z","updated_at":"2026-04-01T22:49:22.000Z","dependencies_parsed_at":"2023-02-17T03:15:41.380Z","dependency_job_id":"d5fb6cd5-5f47-42ea-b189-c1cfb6ae9b30","html_url":"https://github.com/arkenidar/graphic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arkenidar/graphic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkenidar%2Fgraphic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkenidar%2Fgraphic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkenidar%2Fgraphic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkenidar%2Fgraphic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arkenidar","download_url":"https://codeload.github.com/arkenidar/graphic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkenidar%2Fgraphic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32567417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","algebra","common","love2d","lua","luajit","math","msys2-mingw64","obj","physics","polygons","render","sdl2","stl","transformations"],"created_at":"2024-12-27T05:10:32.998Z","updated_at":"2026-05-03T11:34:08.558Z","avatar_url":"https://github.com/arkenidar.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphic\n\nA software 3D renderer written in Lua, running on **LuaJIT + SDL3** (primary) or **Love2D** (alternative backend). Implements triangle rasterization, z-buffering, perspective-correct texture mapping, and multi-light shading — entirely in Lua with no native rendering pipeline.\n\n## Screenshots\n\n![Smooth-shading 3D mesh from OBJ](docs/head--Peek--04-01-2024--00-37.gif \"Smooth shading demo\")\n\n![Flat-shading 3D mesh from STL](docs/3d-teapot-from-2d.gif \"First demo\")\n\n## Features\n\n- Scanline rasterizer with barycentric coordinate interpolation\n- Z-buffer depth testing\n- Backface culling\n- Perspective-correct UV texture mapping\n- Gouraud (per-vertex) and flat shading\n- Multi-source diffuse lighting (3 directional lights + ambient)\n- OBJ and STL (ASCII) model loading\n- BMP texture loading\n\n## Requirements\n\n**LuaJIT + SDL3 (recommended)**\n- [LuaJIT](https://luajit.org/) — included in `luajit/` for Windows\n- [SDL3](https://libsdl.org/) — `SDL3.dll` included in `luajit/` for Windows; on Linux install `libSDL3`\n\n**Love2D (alternative)**\n- [Love2D](https://love2d.org/) 11.x or newer\n\n## Running\n\n**Windows (LuaJIT):**\n```cmd\nrun-app.cmd\n```\nor directly:\n```cmd\nluajit\\luajit.exe app.lua\n```\n\n**Linux (LuaJIT via Wine):**\n```bash\nbash wine-luajit-app.bash\n```\n\n**Linux/macOS (native LuaJIT):**\n```bash\nluajit app.lua\n```\n\n**Love2D (any platform):**\n```bash\nlove .\n```\n\n## Project Structure\n\n| File | Description |\n|------|-------------|\n| `app.lua` | LuaJIT + SDL3 entry point (window, event loop, FFI) |\n| `main.lua` | Love2D entry point |\n| `common.lua` | Shared rendering: rasterizer, lighting, texture sampling |\n| `algebra.lua` | Vector and matrix math (dot, cross, normalize, perspective projection) |\n| `loader.lua` | OBJ and STL model loaders |\n| `ffi_defs.h` | SDL3 C type definitions for LuaJIT FFI |\n| `assets/` | 3D models (OBJ, STL) and textures (BMP) |\n| `luajit/` | Bundled LuaJIT + SDL3.dll for Windows |\n\n## Assets\n\n| File | Description |\n|------|-------------|\n| `assets/head.obj` | Human head mesh |\n| `assets/ToughGuy2.obj` | Character model |\n| `assets/teapot.obj` | Classic Utah teapot |\n| `assets/stl-ascii-teapot-axes.stl` | Teapot in STL format |\n| `assets/floor_plane.obj` | Floor plane with UV |\n| `assets/axes.obj` | XYZ axis display helper |\n| `assets/checker.bmp` | Checkerboard test texture |\n\n## Controls\n\n| Input | Action |\n|-------|--------|\n| `ESC` / close window | Quit |\n| — | Scene rotates automatically at 45°/s |\n\n## Links\n\n- [SDL3](https://libsdl.org/)\n- [LuaJIT](https://luajit.org/)\n- [Love2D](https://love2d.org/)\n- [Renderer techniques documentation](docs/index.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkenidar%2Fgraphic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farkenidar%2Fgraphic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkenidar%2Fgraphic/lists"}