同步操作将从 star/eva.js 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Eva.js is a front-end game engine for create project of gamification.
Efficient: Eva.js provides common and basic game component in the development of gamification projects, Eva makes it easy to develop project of gamification.
High-performace: Eva.js provides efficient runtime and rendering capabilities, you can create complex game scenes.
Scalable: Based on the ECS(Entity-Component-System) design pattern, you can freely expand functions of engine and build a more prosperous ecosystem.
Finding the Eva.js Documentation on eva.js.org, you can improve it by sending pull requests to this repository.
Checking out the Live example.
npm i @eva/eva.js @eva/plugin-renderer @eva/plugin-renderer-img --save
<canvas id="canvas" ></canvas>
import { Game, GameObject, resource, RESOURCE_TYPE } from '@eva/eva.js';
import { RendererSystem } from '@eva/plugin-renderer';
import { Img, ImgSystem } from '@eva/plugin-renderer-img';
resource.addResource([
{
name: 'imageName',
type: RESOURCE_TYPE.IMAGE,
src: {
image: {
type: 'png',
url:
'https://gw.alicdn.com/tfs/TB1DNzoOvb2gK0jSZK9XXaEgFXa-658-1152.webp',
},
},
preload: true,
},
]);
const game = new Game({
systems: [
new RendererSystem({
canvas: document.querySelector('#canvas'),
width: 750,
height: 1000,
}),
new ImgSystem(),
],
});
const image = new GameObject('image', {
size: { width: 750, height: 1319 },
origin: { x: 0, y: 0 },
position: {
x: 0,
y: -319,
},
anchor: {
x: 0,
y: 0,
},
});
image.addComponent(
new Img({
resource: 'imageName',
})
);
game.scene.addChild(image);
For questions and support please use DingTalk (钉钉) to scan this QR Code.
Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.
release notes in documentation.
The Eva.js is released under the MIT license. See LICENSE file.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。