Egretia Engine Upgrade!

Egretia Io
Egretia
Published in
4 min readFeb 10, 2021

Release to Taobao creative interactive platform-widget

>Create a project

Use the latest version of Egretia Launcher to create a game project, or import the original Egretia project;

After importing or creating, you will see the project on the list of Egretia Launcher. Click Publish Settings

Select the Creative Interactive Widget tab and click DONE button to create a Taobao project;

After the creation is completed, click the publish tab to publish the mini game package;

Game code type: compile the code in the Bailu project into the Taobao project;

• debug: js code is not obfuscated by uglify, which make it easier for debugging;

• release: uglify obfuscation compression for js code;

Taobao creative interactive project structure;

Widget/Component directory:

• index.css: style file for widgets, which is not necessary to modify in general;

• egret.tbgame.js: Egretia adaptation layer file;

• index.axml: the page structure of the widget entry page;

• index.js: widget entry file;

• index.json: the configuration file of the widget;

  • tools folder: some tools (do not modify);

Widget directory:

• js folder: the game code compiled by the Egretia project;

• resource folder: resource files such as pictures and audio of the game. Currently widgets do not support local file reading, so resources need to be deployed to the network environment for loading;

• manifest.js: is used to load dependencies of js file;

• plugin.json: Plug-in configuration for widgets, see Taobao Open Platform/Document Center·Merchant Application/Plugin Development & Launch/Plugin Development Document for details;

• mini.project.json: is used to configure the file format in the project. Any special file format needs to be configured here;

  • client folder: the main part of Taobao creative interactive application;

>Debugging is available in the phone

Download developer tools

Click [Mini Program] -> [Open Project], and select the Taobao creative interactive widget project just created;

Project type, select [Mini Program Plugin];

Associate the application in the upper left of the panel and click the real device debugging on the upper right. After the compilation is completed, use Taobao APP to scan the code for debugging;

The build pipeline

Introduce the egretia run command into the build pipeline. Now developers can customize the trigger logic when the egretia run command is executed by modifying the relevant code in scripts/config.ts;

Modify the call of WebpackDevServerPlugin from the default egretia build trigger to egretia run trigger;

StartServerPlugin is available. Developers can use this plug-in to complete the debugging server of the original egretia run command;

The default build pipeline configuration for new projects has been modified.

JavaScript renderer

• [Newly-added] Component adds unwatchAll method to remove data monitoring;

• [Optimization] Optimized the rendering method for ios14;

• [Fix] Fix the problem that the Android phone cannot be restored after switching to the secure keyboard;

• [Fix] Fix the problem that RES.loadGroup encounters a load error and cannot be caught;

• [Fix] Fix the problem of abnormal text display when the rich text font size is 0 and the color is pure black (0x000000);

  • [Fix] Fix the problem that the sound cannot be resumed after the page loses focus;

• [Fix] Fix the problem that the data obtained by getPixels in webgl mode is different from that in canvas mode;

• [Fix] Modify socket library, provide URI method, and modify protocol to wss/ws;

• [Fix] Fix some abnormal playback status of gotoAndPlay method in MovieClip;

• [Fix] Fix the abnormal usage problem in eui commonjs mode;

• [Fix] Fix the problem of repeated loading of image resources of bitmap fonts;

• [Fix] After fixing the bitmap text cacheAsBitmap, the modified text does not trigger re-rendering;

• [Fix] Repair the text input mechanism to prevent some input methods from being triggered multiple times;

Upcoming updates

1. Minor code optimizations and bug fixes based on the current version of Egretia engine.

2. Add the following new features in next version of Egretia engine:

· More powerful type checking;

· The skin size of eui will be greatly improved;

· Provide better support for music sound effects;

· The brand new resource compiler brings a more seamless development experience

Stay tuned for updates from the Egretia official channels below so that you can be involved in all the exciting things to come!

Egretia Telegram: https://t.me/Egretia

Egretia Twitter: https://twitter.com/Egretia_io

Egretia Website: https://egretia.io/

--

--