Skip to content

A WebGL starter project with hot reloading and a component entity system

License

Notifications You must be signed in to change notification settings

mrsharpoblunto/webgl-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webgl-starter

A WebGL starter project with hot reloading and a component entity system

Building

Run npm install

Development

Run npm run dev to start up a development server, then browse to http://localhost:8080. Any changes made to the sim or render systems will be hot reloaded without the need to refresh the browser.

Production

Run npm run build. All built assets will be created in dist/.

Component Entity system

The starter comes with a simple component entity system (see here and here for some background on the component entity system pattern) that allows separation of state, simulation logic, and rendering logic.

Components

All relevant entity states should be attached via some combination of components on an entity.

Builders

Builders are factory functions that allow a known configuration of components to be attached to an entity.

Sim systems

Sim systems represent all the games logic and are responsible for simulating the world. Sim systems should be completely stateless (all state should reside in components) in order for them to be hot reloadable.

Render systems

Render systems are responsible for rendering entities and thier components. Render systems should be completely stateless, and also should not alter the world state - i.e. they should only read the world state.

About

A WebGL starter project with hot reloading and a component entity system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published