MCPcopy
hub / github.com/egret-labs/egret-core

github.com/egret-labs/egret-core @v5.4.1 sqlite

repository ↗ · DeepWiki ↗ · release v5.4.1 ↗
37,326 symbols 89,980 edges 618 files 6,168 documented · 17%
README
<img src="https://github.com/egret-labs/egret-core/raw/v5.4.1/docs/img/egret_logo.jpg"
     height="130">






<a href="https://github.com/egret-labs/egret-core/network">
    <img src="https://img.shields.io/github/forks/egret-labs/egret-core.svg"
         alt="forks">
</a>
<a href="https://github.com/egret-labs/egret-core/stargazers">
    <img src="https://img.shields.io/github/stars/egret-labs/egret-core.svg"
         alt="stars">
</a>
<a href="https://github.com/egret-labs/egret-core">
    <img src="https://img.shields.io/badge/version-5.4.1-green.svg"
         alt="version">
</a>
<a href="https://github.com/egret-labs/egret-core/raw/v5.4.1/LICENSE.md">
    <img src="https://img.shields.io/badge/license-New%20BSD-blue.svg"
         alt="license">
</a>

EN / CN

Egret Engine

The Egret Engine is a HTML5 game engine. It provides modules to handle common game development tasks such as 2D and 3D rendering, GUI systems, and audio and resource management. The Egret engine is flexible and suitable for 2D or 3D projects. It allows developers to work without worrying about low-level browser impelementation, HTML5 performance, or fragmentation issues.

Platform Coverage

Mobile

PC

Installation

To Install the Egret Engine:

Once installation is complete, Egret's engine and tools are easy to manage.

Getting Started

TypeScript

Egret projects are developed using TypeScript, which is a superset of JavaScript. Please refer to the TypeScript manual for more information. The Egret API and ActionScript3 (AS3) are very similar. It will be easy to get started with Egret if you are familiar with AS3.

Create a project by command line

Use following command to create a default game object:

egret create HelloWorld

You may also add parameters if required: Use empty | game | gui | eui to specify different projects.

After running this command, you should now see a folder called 'HelloWorld'.

Write your first line of code

By default, the entry point for an Egret game projects is src / Main.ts. To make write the first line of code for your project, find the createGameScene () function, and add console.log ("Hello World");

After making your changes, the code should now look like this:

private createGameScene():void {
        // log
        console.log("Hello World");
        var sky:egret.Bitmap = this.createBitmapByName("bgImage");
        this.addChild(sky);
        var stageW:number = this.stage.stageWidth;
        var stageH:number = this.stage.stageHeight;
        sky.width = stageW;
        sky.height = stageH;
        //...
    }

Here, we've called console.log("log content that we'd like to display"). This will display our log message in the browser's developer tool.

We recommend using Chrome to debug the Egret project.

Use the following command to build Egret projects:

egret build

Use the following command to run Egret projects:

egret startserver

For more information, please refer to the Learning Module documentation.

Demos

Tower Defence Demo Click here for online experience.

Click here for more 2D/3D demos.

Show Case

Click here to see Show Case

Learn

  • Access Doc to get Engine document
  • Access Example to learn demo source code
  • Access API to get API document
  • Access Video to get videos
  • Access Community to communicate with other developers

Tools

Third Party Library

  • Use base64texture to convert base64 String to egert Texture
  • Use dcagent DataEye SDK for Egret
  • Use ecs component system
  • Use euiextension EUI extension
  • Use gesture Gesture library
  • Use keyboard Keyboard event listener
  • Use Greensock Greensock animation library
  • Use jszip jszip Compression library
  • Use md5 A simple MD5 Library
  • Use mouse PC mouse support library
  • Use particle particle system
  • Use physics p2Physics engine,current version 0.7.0
  • Use socket socket.io
  • Use tiled tiledmap support library
  • Use weixinapi WeChat API
  • More third party libraries please visit here

Contributing

Asking a question is the first step to participating in an open-source community. You can report Egret issues here. It is recommended that issues be discussed in the official community portal, as it can help with solving problems efficiently.

License

This content is released under the (https://opensource.org/licenses/BSD-2-Clause) BSD License.

Extension points exported contracts — how you extend this code

DOMError (Interface)
(no doc) [6 implementers]
tools/lib/typescript-plus/lib/lib.esnext.full.d.ts
SoundChannel (Interface)
(no doc) [12 implementers]
src/egret/media/SoundChannel.ts
UIComponent (Interface)
(no doc) [12 implementers]
src/extension/eui/core/UIComponent.ts
Plugin (Interface)
(no doc) [5 implementers]
tools/tasks/index.ts
Request (Interface)
(no doc) [4 implementers]
tools/templates/empty/scripts/node.d.ts
Request (Interface)
(no doc) [4 implementers]
tools/typings/globals/node/index.d.ts
EngineVersion (Interface)
(no doc)
tools/selector.ts
EgretConfig (Interface)
(no doc)
tools/EngineData.ts

Core symbols most depended-on inside this repo

push
called by 3501
tools/lib/typescript-plus/lib/lib.es6.d.ts
n
called by 1070
tools/lib/resourcemanager/index.js
forEach
called by 967
tools/lib/typescript-plus/lib/lib.es6.d.ts
join
called by 901
tools/lib/typescript-plus/lib/lib.es6.d.ts
assert
called by 853
tools/typings/globals/node/index.d.ts
charCodeAt
called by 807
tools/lib/typescript-plus/lib/lib.es6.d.ts
indexOf
called by 712
tools/lib/typescript-plus/lib/lib.es6.d.ts
call
called by 699
tools/lib/typescript-plus/lib/lib.es6.d.ts

Shape

Method 15,247
Function 13,679
Interface 7,342
Class 959
Enum 99

Languages

TypeScript100%

Modules by API surface

tools/lib/typescript-plus/lib/tsserver.js4,950 symbols
tools/lib/typescript-plus/lib/typescript.js4,861 symbols
tools/lib/typescript-plus/lib/lib.es6.d.ts2,976 symbols
tools/lib/typescript-plus/lib/lib.d.ts2,754 symbols
tools/lib/typescript-plus/lib/lib.esnext.full.d.ts2,561 symbols
tools/lib/typescript-plus/lib/lib.es2017.full.d.ts2,561 symbols
tools/lib/typescript-plus/lib/lib.es2016.full.d.ts2,561 symbols
tools/lib/typescript-plus/lib/lib.dom.d.ts2,254 symbols
tools/lib/zip/EGTZipTool_v1.0.2.js1,122 symbols
tools/lib/resourcemanager/index.js916 symbols
tools/lib/typescript-plus/lib/typescriptServices.d.ts734 symbols
tools/lib/typescript-plus/lib/typescript.d.ts734 symbols

Dependencies from manifests, versioned

@egret/egret-webpack-bundler1.2.10 · 1×
@egret/eui-compiler1.4.8 · 1×
@types/browserifylatest · 1×
@types/chailatest · 1×
@types/convert-source-maplatest · 1×
@types/dellatest · 1×
@types/globlatest · 1×
@types/gulplatest · 1×
@types/gulp-concatlatest · 1×
@types/gulp-helplatest · 1×
@types/gulp-newerlatest · 1×
@types/gulp-sourcemapslatest · 1×

For agents

$ claude mcp add egret-core \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact