
groverburger's 3D engine (g3d) simplifies LÖVE's 3d capabilities to be as simple as possible.
Get the latest version of g3d and check out the wiki on the Github page here:
https://github.com/groverburger/g3d
Features:
- 3D Model rendering
- .obj file loading
- Basic first person movement and camera controls
- Perspective and orthographic projections
- No dependencies
- Friendly documentation
- Simple, commented, and organized

The entire code for the demo is only 30 lines:
Code: Select all
-- written by groverbuger for g3d
-- january 2021
-- MIT license
g3d = require "g3d"
function love.load()
Earth = g3d.newModel("assets/sphere.obj", "assets/earth.png", {0,0,4})
Moon = g3d.newModel("assets/sphere.obj", "assets/moon.png", {5,0,4}, nil, {0.5,0.5,0.5})
Background = g3d.newModel("assets/sphere.obj", "assets/starfield.png", {0,0,0}, nil, {500,500,500})
Timer = 0
end
function love.mousemoved(x,y, dx,dy)
g3d.camera.firstPersonLook(dx,dy)
end
function love.update(dt)
Timer = Timer + dt
Moon:setTranslation(math.cos(Timer)*5, 0, math.sin(Timer)*5 +4)
Moon:setRotation(0,-1*Timer,0)
g3d.camera.firstPersonMovement(dt)
end
function love.draw()
Earth:draw()
Moon:draw()
Background:draw()
end
Need help on getting started? Want to know how 3D works in Love2D? Check out the wiki documentation on g3d's Github!
Wiki documentation link here: https://github.com/groverburger/g3d/wiki
Games made with g3d:
Hoarder's Horrible House of Stuff by alesan99

Flamerunner by groverburger (that's me!)

This project started when I worked on a Minecraft clone in Love back in 2019. I took the 3D engine I made for that project, and that eventually became g3d! This project's 3D code is old and horrible. Don't look at it!

Feedback and suggestions are greatly appreciated!
g3d is offered under the MIT license. Check the LICENSE file on Github for more details.