Mojoc modules have a dependency hierarchy, the upper layer can reference the lower layer, but the lower layer cannot reference the upper layer, and parallel modules cannot reference each other. This ensures minimal dependency compilation of modules.
- Toolkit Module
- ThirdParty Module
- Graphics Module
- Physics Module
- Audio Module
- Extension Module
- Application Module
The Toolkit module is a development kit for the C language. It provides basic data structure and algorithm support.
- Math provides mathematical algorithms implementation.
- Utils provides basic data storage tools and algorithms.
- HeaderUtils provides independent structure definitions or functions (with no
.c
file implementation). - Platform provides platform-related tools.
The ThirdParty module contains third party libraries, that can be directly called by the Mojoc engine. So the third party needs to provide different prebuilt lib files for native platforms supported by Mojoc.
- Currently only contains PNG library.
- ThirdPartyBuild is a multi-platform build project of the ThirdParty module.
Graphics module is draw layer implemented with OpenGLES3, and provides drawing tools and implementations.
- Draw provides basic abstract drawing layer.
- OpenGL provides OpenGLES rendering functions.
- Platform provides platform-related EGL implementation.
- Tween provides tween animation implementation.
- Utils provides drawing support tools.
Physics module provides simple physical simulation.
- Audio.h is an interface for the audio API.
- Platform is a cross-platform audio implementation.
- Android/Audio.c is OpenSLES implementation in Android.
- IOS/Audio.m is OpenAL implementation in IOS.
Extension module contains editor-related implementations.
- Spine is runtime implementation of Spine 2D skeleton animation.
Application module contains the app control and interaction layer. It provides app lifecycle callbacks, input events, native platform functions, component architecture and so on.
- Platform contains platform-related implementations.
- Platform/Android contains native function implementations of Android.
- Platform/IOS contains native function implementations of IOS.
📖