In this engine, each file has it's dependencies listed at the top of it and in this file. The core of this engine are the resourceLoader.js, resourceManager.js and the inputs.js files:
- engine/resourceLoader.js Allows the loading of resources, both
textures,soundsand json files. - engine/resourceManager.js It provides a lot of useful functions, for interacting with loaded resources. For example:
renderingthe loaded textures, starting and stoppinganimations, playing the loaded sounds, etc. - engine/inputs.js Provides a great interface for the keyboard and mouse, through the
inputobject. It can handle,keypresses,single-framepresses, andmulti-keypressses, while also being fast and fully configurable.
Other features build on top of these. Because each file has it's own dependencies, the include order matters! Here is the correct one if you want all of the features:
- engine/vector.js Implements a Vector class, capable of doing vector math. (Like
dot product,normalisation, creatingunit vectors, etc.) - engine/pid.js Implements a simple PID controller. (
current value,setpointand the control values:PID) - engine/path.js Allows the use of
Pathobjects to be created, and then walked by agents, in the form of thePathFollowclass. It also has support for junctions, via thePathConnection - engine/grid.js Provides lots of functions, for manipulating any 2D arays, like grids. (It adds:
copying,cutting,merging,filteringoperations.)
If you want to have all of functionalities, you can include thye obfuscated version: engine/engine.min.js, but if you want to include, onjly specific features, you can also do that, but pay attention to the dependency tree!