Zed.lua (3d library)
Posted: Fri May 16, 2014 10:35 pm
So I've been making 3d in love since I've seen hugobdesigner's 3d thread.
At first I didn't really wan't to make a 3d lib because people would think I'm crazy for trying to make 3d in a 2d engine instead of using a 3d engine but after I saw oysi's thread I know people like 3d.
So yea, hope you like it.
BIG THANKS TO http://petercollingridge.appspot.com/3D-tutorial
For LOVE 0.9.0/0.9.1
Guide
Here is how to make a simple cube
I don't have time to write descriptions for every function.
Examples
3d 3d Rectangular Prism (cross eye 3d)
Coming soon: simple 3d Physics
Download
I really don't want to cause trouble with licenses so I'll make it simple.
You can edit and/or use it only if you give me and http://petercollingridge.appspot.com/3D-tutorial credit
Download
there's still a lot to do.
I'll add more set and get functions and a drawObjects function (It draws the objects that are in front first)
It's usable, but it doesn't have enough function for a full game.
I would like some tips to make my library better, so if you think something could be improved tell me
Enjoy
At first I didn't really wan't to make a 3d lib because people would think I'm crazy for trying to make 3d in a 2d engine instead of using a 3d engine but after I saw oysi's thread I know people like 3d.
So yea, hope you like it.
BIG THANKS TO http://petercollingridge.appspot.com/3D-tutorial
For LOVE 0.9.0/0.9.1
Guide
Here is how to make a simple cube
Code: Select all
function love.load()
zed = require("zed")
cube = zed.newCube(0, 0, 0, 50)
zed.rotateFormX(cube, -.5)
zed.rotateFormY(cube, -.5)
end
function love.draw()
love.graphics.translate(love.window.getWidth()/2, love.window.getHeight()/2)
zed.drawForm(cube, {faces = true, shadows = true})
end
- zed.setPointColor(r, g, b, a)
zed.setEdgeColor(r, g, b, a)
zed.newCube(x, y, z, facesize)
zed.newRectangularPrism(x, y, z, width, height, depth)
zed.newForm(nodes, edges, faces, facecolors)
zed.setFaceColors(obj, colors)
zed.setFaceColor(obj, face, color)
zed.setLightVector(x, y, z)
zed.getLightVector()
zed.setCamera(x, y, z)
zed.getCamera()
zed.setFOV(fov)
zed.getFOV()
zed.drawForm(obj, tasks)
zed.getNodes(obj)
zed.getEdges(obj)
zed.getFaces(obj)
zed.rotateFormX(obj, theta)
zed.rotateFormY(obj, theta)
zed.rotateFormZ(obj, theta)
zed.rotateForm(obj, thetax, thetay, thetaz)
zed.getFormRotation(obj)
zed.translateForm(obj, x, y, z)
Examples
3d 3d Rectangular Prism (cross eye 3d)
Coming soon: simple 3d Physics
Download
I really don't want to cause trouble with licenses so I'll make it simple.
You can edit and/or use it only if you give me and http://petercollingridge.appspot.com/3D-tutorial credit
Download
there's still a lot to do.
I'll add more set and get functions and a drawObjects function (It draws the objects that are in front first)
It's usable, but it doesn't have enough function for a full game.
I would like some tips to make my library better, so if you think something could be improved tell me
Enjoy