"Surround the nerve cat" one Night leap Red, let a H5 game engine also followed fiery up--egret.
(Website Portal:http://www.egret-labs.org/)
The demo website of the installation and HelloWorld gives a very easy to understand document, here is not verbose. However, the official website of the HelloWorld demo background picture, really can't let people do not spit groove.
The project directory is as follows: There are two folders to be concerned about: launcher, SRC.
Under the Launcher folder, you need to be concerned about index.html files, and changing the file is the entry for the project. Egret Help to build, you can modify the contents of their own, as long as not to load the frame part of the kill on the line.
It is necessary to note that the Id of Gamediv <div> is the game engine used to operate the place. The framework automatically creates a <canvas> under Change <div>, and then draws the game interface on it. You can control the style of the gamediv, do not delete or modify the ID on the line. There is nothing else to focus on under the Launcher folder.
SRC folder The following two files, the suffix named ts, is a typescript file, in fact, is a superset of JavaScript. Which loadingui.ts, temporarily do not need to care, this is the loading of the Web page when the user is relieved to wait for a prompt interface.
Okay, here's the most important main.ts.
The two methods of labeling are what Egret does with HTML. The entire Hello World analysis is over.
To summarize:
Egret uses the typescript language, in the entry (index.html) file Operation ID Gamediv label (add a canvas under the Change tab <canvas>). Project launch to main.ts (change file name replaceable), Main.ts will load the pre-prepared resources, after the completion of the resource loading, start drawing <canvas> content.
Do not know can add my QQ group: 226508420 (Egret Engine Egret Exchange Group) welcome you to the arrival Oh, read the blog to some footprints Bai, thank you ~ ~
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Egret Engine Egret Getting Started knowledge supplement