More readme stuff!
This commit is contained in:
parent
eb01e2bb2b
commit
fbd1cefd44
83
README.md
83
README.md
@ -1,57 +1,60 @@
|
|||||||
# Simple FPS Rendering Engine
|
# FP Rendering Engine
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
The intention of this project is to learn about the intersection of 3 different
|
TLDR; [Play it here](https://ferano.io/3d-fp/
|
||||||
topics; graphics, web, and functional programming. It uses Elm with WebGL to
|
|
||||||
create a basic 3D first-person scene implementing several lower level graphics
|
The goal of this project is to learn about the intersection of 3 different
|
||||||
techniques including matrix transformations to model parent/child local
|
topics; graphics, web, and functional programming. The FP acronym refers to both
|
||||||
transforms, texture mapping, and basic lighting with shaders. Consider it the
|
the fact that it's a First Person camera, as well as being implemented using
|
||||||
humble beginnings of a functional 3D graphics engine. The last major work done
|
Functional Programming. It uses Elm with WebGL to create a basic 3D first-person
|
||||||
on this was in 2019, however, it was just thrown into a git repo without much
|
scene implementing several lower level graphics techniques including matrix
|
||||||
consideration, along with other another small graphics project. Here's the
|
transformations to model parent/child local transforms, texture mapping, and
|
||||||
original [project](https://github.com/JosephFerano/elm-graphics)
|
basic lighting with shaders. Consider it the humble beginnings of a functional
|
||||||
|
3D graphics engine. The last major work done on this was in 2019, however, it
|
||||||
|
was just thrown into a git repo without much consideration, along with other
|
||||||
|
another small graphics project. I felt it deserved a little bit more TLC than
|
||||||
|
that. Here's the original
|
||||||
|
[project](https://github.com/JosephFerano/elm-graphics).
|
||||||
|
|
||||||
|
## Showcase
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## Update 2023
|
## Building with Elm 0.18.0
|
||||||
|
|
||||||
|
To install the binaries manually, follow this short guide;
|
||||||
|
- [Install Binaries](https://sirfitz.medium.com/install-elm-0-18-0-in-2021-3f64ce298801)
|
||||||
|
|
||||||
|
If you want to use `npm` instead;
|
||||||
|
- `npm install -g elm@elm0.19.0`
|
||||||
|
|
||||||
|
If you use `npm`, note that you will likely need an older version of Node.js, so
|
||||||
|
it is recommended to use [`npm`](https://github.com/nvm-sh/nvm) for that.
|
||||||
|
|
||||||
|
Once you have the Elm compiler, go ahead and run
|
||||||
|
|
||||||
|
```elm make Scene.elm```
|
||||||
|
|
||||||
|
And that should first pull in all the dependencies then generate an `index.html` file.
|
||||||
|
|
||||||
|
### Issues with dependencies
|
||||||
|
|
||||||
It seems like one of the dependencies for this project, `Zinggi/elm-obj-loader`,
|
It seems like one of the dependencies for this project, `Zinggi/elm-obj-loader`,
|
||||||
is getting a 404. Therefore this dependency will be included in version control,
|
is getting a 404. Therefore this dependency will be included in version control,
|
||||||
so as long as you have Elm 0.18.0 tooling, you should be able to just run `elm
|
on the off chance someone actually wants to build this.
|
||||||
init`.
|
|
||||||
|
|
||||||
|
|
||||||
## Building
|
|
||||||
|
|
||||||
This project is Elm 0.18.0, so you need to have that version installed.
|
|
||||||
|
|
||||||
To install the binaries manually, use
|
|
||||||
- [Install Binaries](https://sirfitz.medium.com/install-elm-0-18-0-in-2021-3f64ce298801)
|
|
||||||
|
|
||||||
If you want to use `npm`, here's a quick guide;
|
|
||||||
- [Install with npm](https://discourse.elm-lang.org/t/downgrade-to-v18/2005/2)
|
|
||||||
|
|
||||||
Note that for `npm`, you will likely need an older version of Node.js, so it
|
|
||||||
is recommended to use the [`npm`](https://github.com/nvm-sh/nvm).
|
|
||||||
|
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
In order to be able to load the textures and models, the website must be served
|
In order to be able to load the textures and models, the files must be served
|
||||||
by an HTTP server because of browser security, see
|
by an HTTP server because of browser security, see
|
||||||
[SOP](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)
|
[SOP](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)
|
||||||
and [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS) if curious.
|
and [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS) if curious.
|
||||||
|
|
||||||
If you have Python 3 installed, simply run `python3 -m http.server`
|
If you have Python 3 installed, simply run `python3 -m http.server`. If you
|
||||||
|
would like to use `elm-reactor`, run the command and then click on `index.html`
|
||||||
|
in the nice project webview provided.
|
||||||
Then open up Either open up `Scene.html`, or use the command `elm-reactor`, if you want to be
|
|
||||||
able to modify the source file and compile;
|
|
||||||
|
|
||||||
You can walk around the scene with simple FPS controls. Open `scene.html` with
|
|
||||||
an HTTP server, you can use the following;
|
|
||||||
|
|
||||||
## Controls
|
## Controls
|
||||||
|
|
||||||
@ -61,11 +64,11 @@ an HTTP server, you can use the following;
|
|||||||
|
|
||||||
- Robot Movement: `◀ ▼ ▲ ▶`
|
- Robot Movement: `◀ ▼ ▲ ▶`
|
||||||
|
|
||||||
- Rotate Robot: `N and M`
|
- Rotate Robot: `N | M`
|
||||||
|
|
||||||
- Rotate Robot Arm: `Y and H`
|
- Rotate Robot Arm: `Y | H`
|
||||||
|
|
||||||
- Rotate Robot Hand: `U and J`
|
- Rotate Robot Hand: `U | J`
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
Loading…
x
Reference in New Issue
Block a user