jsngin
@thejsngin/jsngin is the core library that implements the constructs upon which the game is built. Eg. the game, gameInstance, gameObject, component are all modeled in @thejsngin/jsngin
.
Lets look at some basic constructs
component
components are responsible for providing behaviour to gameObjects. Eg. a light component would make the gameObject act as a light, further more a transform component would help define a position, rotation and scale for this gameObject.
INFO
components also define the inEngine functionality. This includes everything from what properties are to be displayed in the component editor to what 3d visuvalizations are shown.
gameObject
gameObjects act as a container for components and other gameObjects. Eg. a player can be a gameObject containing components like transform and mesh and other children gameObjects like weapons, a camera (that follows it) etc.
INFO
jsngin does not provide a separate construct for levels(or scenes). A gameObject with no parent can be instanciated as the root and acts as the level.
game
game helps in creating a running game instance by loading a gameObject as root (or level) and providing load updated.