在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:melonjs/melonJS开源软件地址:https://github.com/melonjs/melonJS开源编程语言:JavaScript 99.6%开源软件介绍:melonJS 2A fresh, modern & lightweight HTML5 game enginemelonJS 2 is a modern version of the melonJS game engine. It has been rebuilt almost entirely using ES6 class, inheritance and semantic, and is bundled using Rollup to provide modern features such as transpiling and tree-shaking.
melonJS is open-source, licensed under the MIT License, and actively developed and maintained with the help of a small team of enthusiasts at AltByte in Singapore. About melonJSmelonJS is a fully featured game engine : Compatibility
Graphics
Sound
Physic
Input
Level Editor
Assets
And Also
Tools integrationTools integration and usage with melonJS is documented in our Wiki. Using melonJSFor your first time using melonJS, use either of these tutorials for setting up the engine. These are where you start.
You may find it useful to skim the overview found at the wiki Details & Usage When starting your own projects, checkout our es6 boilerplate DemosA few demos of melonJS capabilities :
Hello World ExampleBasicimport * as me from "https://esm.run/melonjs";
me.device.onReady(function () {
// initialize the display canvas once the device/browser is ready
if (!me.video.init(1218, 562, {parent : "screen", scale : "auto"})) {
alert("Your browser does not support HTML5 canvas.");
return;
}
// add a gray background to the default Stage
me.game.world.addChild(new me.ColorLayer("background", "#202020"));
// add a font text display object
me.game.world.addChild(new me.Text(609, 281, {
font: "Arial",
size: 160,
fillStyle: "#FFFFFF",
textBaseline : "middle",
textAlign : "center",
text : "Hello World !"
}));
});
Documentation
Download melonJSThe latest builds with corresponding release note are available for direct download here. Since version 10.0.0 melonJS provides different build options :
Alternatively, the latest version of melonJS can be installed through NPM :
If you need to import the ES6 module of melonjs (e.g. for Webpack):
Or can simply be added to your html, using jsDeliver content delivery network (CDN) : <!-- load the ES6 module bundle of melonJS v10.0 -->
<script src="https://esm.run/[email protected]"></script>
<!-- omit the version completely to get the latest one -->
<!-- you should NOT use this in production -->
<script src="https://esm.run/melonjs"></script>
Building melonJSFor most users, all you probably want is to use melonJS, and all you need then is just to download the latest built release to get started. The only time you should need to build melonJS is if you want to contribute to the project and start developing on it. To build your own version of melonJS you will need to install : Once Node.js and NPM have been installed, you need to install build dependencies, by executing the following in the folder where you cloned the repository :
Then build the melonJS source by running:
The generated library will be available under the
To run the melonJS test suite simply use the following:
This will run the jasmine spec tests with the output displayed on the shell. Do note that the latest Chrome version is required, as the test unit will run the Browser in a headless mode (in case of failed tests, upgrade your browser). Last but not least, if you really want to contribute, but not sure how, you can always check our discussions list to get some idea on where to start. Building the documentationSimilarly, you can build your own copy of the docs locally by running :
The generated documentation will be available in the WIP BuildsmelonJS uses Travis-CI for automated testing and build uploads. The latest build artifacts can be downloaded from the melonjs-builds bucket. Questions, need help ?If you need technical support, you can contact us through the following channels :
SponsorsSupport the development of melonJS by becoming a sponsor. Get your logo in our README with a link to your site or become a backer and get your name in the BACKERS list. Any level of support is really appreciated and goes a long way ! |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论