Skip to content

mattbearman/zion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧊 Zion

A very basic 3D engine written entirely in vanilla JavaScript

Screen.Recording.2023-12-12.at.08.25.25.mov

Why?

My aim with Zion was to create a 3D engine as if it was 1993, with as little prior knowledge as possible, and see what I could figure out on my own.

I can't come in completely blind as 15 years ago I did a degree in computer games development, however after finishing my degree I went into web development, and left game dev behind.

This is why there is no matrix maths in this repo - I know matrices exist, and are used for 3D graphics transformations, but I don't remember how exactly to use them. So instead I've relied on good old trigonometry, which I do remember.

What?

So far Zion supports flat shaded polygons, a mostly working z-buffer, and that's about it. Coming in future updates is:

  • Separate engine from content
  • Back face culling
  • Full object transformations
  • Lighting
  • Gouraud shading

Things I may also add if I have the time/inclination:

  • Texture mapping
  • Gravity

Should I use this?

Absolutely not. If you want to do 3D graphics in Javascript WebGL will serve you much better. This is just a learning experiment for me.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages