Egret Engine Egret Getting Started knowledge supplement

Source: Internet
Author: User

"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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.