Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/richpeck/engine_demo

Test/demo JS engine.
https://github.com/richpeck/engine_demo

Last synced: 22 days ago
JSON representation

Test/demo JS engine.

Awesome Lists containing this project

README

        

# Demo code to make a simple 3D engine with JS
Works by taking a standard webpage and implementing a number of elements which are used to update the UI etc

# Structure
```
Engine (main app)
├── Canvas (viewport)
├── World (top level worldview - basically includes mapping info)
├── HUD (heads up display shown at the bottom of viewport)
├── Player (player object)
├── other stuff
```

Each object is invoked within the context of the Engine --> IE "$engine = Engine.new; $player = $engine.player.new".

The point is to initialize the engine and within that instance, create a new instance of a player, world etc.

--

# Engine

The main ingress point into the app is the `Engine` class.

This is invoked in the HTML page and is designed to handle user inputs.