Last Updated:30 July, 2015
Welcome to Egret Engine !
Egret EXP community experience Edition is the first version of a community experience of Egret Engine v2.4. In this version, we focused primarily on the dirty rectangle rendering mechanism.
This time’s update aggregates all the changes since the release of 2.0.
Egret currently support three types of languages, TypeScript, JavaScript and JavaScript 2.0 ( ES6 ).
- Discarded the calling of explicitWidth, explicitHeight, measuredHeight, measuredWidth, and needDraw in DisplayObject.
- Discarded anchorX and anchorY. Please use anchorOffsetX and anchorOffsetY instead.
- DisplayObject abandoned in hitTest method, no longer provide an override hit area method, if you want to call the point is within DisplayObject, please call hitTestPoint
- Discarded run, setTimeScale, getTimeScale, pause and resume in Ticker.
- Discarded ctrlKey, altKey and shiftKey in Event.
- For Stage alpha, visible, x, y, scaleX, scaleY, rotation, cacheAsBitmap, scrollRect, filters, blendMode, touchEnabled or matrix can no longer be set.
-
Graphics collision is not the same, specifically by the Rectangle collision becomes completely Depending on the graphics graphic collisions.
-
In TouchEvent, dispatchTouchEvent changed from target:IEventDispatcher,type:string,touchPointID:number = 0, stageX:number = 0, stageY:number = 0, ctrlKey:boolean=false,altKey:boolean=false,shiftKey:boolean=false,touchDown:boolean=false to target:IEventDispatcher, type:string, bubbles?:boolean, cancelable?:boolean, stageX?:number, stageY?:number, touchPointID?:number, touchDown:boolean = false
-
In TouchEvent, localX local’s implementation changed from localX localY VS currentTarget to localX localY VS target. If it was used,please implement by stageX stageY.
-
fps implementation changes from controlling fps through Profiler to directly setting index.html. Open Close data-show-fps = "true", set fps position size color data-show-fps-style = "x: 0, y: 600, size: 50, textColor: 0xff0000"
-
Screen adaptation of NO_SCALE inconsistent. From stage.stageWdith remains unchanged to stage.stageWidth range varies depending on the display
-
Screen adaptation of NO_BORDER inconsistent. From matching height or width with a different anchor to a mode that after NO_BORDER matching, stage height and width will not change but extra part will be cut. If NO_BORDER was used, please replace it with FIXED_WIDTH or FIXED_HEIGHT. For details please refer to StageScaleMode.
-
Texture scaling implementation changed from setting egret.MainContext.instance.rendererContext.texture_scale_factor with corresponding image and config file to just changing image size, which means config file stays unchanged in all texture scaling settings but image size changes. Also, the setting method is to set stage’s textureScaleFactor or directly set texture-scale-factor="1" in index.html. texture-scale-factor="2" means resource shrinks to its original’s half in height and width.
-
Property stage display changed from calling stage.changeSize to calling egret.updateAllScreens().
-
Container’s blank area can not be clicked anymore.
-
Multi-touch changed from settingTouchContext.maxTouches to setting stage.maxTouches. Default value changed from 99 to 2.
-
Entrance file changed from egret.loader calling to calling egret.runEgret() directly in index.html and configuring relevant file class name, scale mode and stage width and height and etc.
-
js file loading changed from on-the-fly creating and loading to placing inindex.html through script commands.
-
HTML file’s canvas creation changed from
to
-
In DisplayObject , mask can support Rectangle and DisplayObjec simultaneously.
-
Screen matching supports rotation and can assign landscape mode. In index.html, data-orientation="auto" sets portrait and landscape modes,for details please refer to OrientationMode; data-content-width="480" sets width
data-content-height="800" sets height -
Set dirty rectangle display area Set data-show-paint-rect="false" in index.html.
-
Since parent class property calling is not supported, a new API is added. egret.superSetter(this, "alpha", 1); replaces super.alpha = 1; in other languages. egret.superGetter(this, "alpha"); replaces super.alpha in other languages.
-
Added Bitmap smoothing property, after setting the picture will be smoothed
-
Added Bitmap pixelHitTest property, after setting the picture support pixel collision.
- webGL, filter
- native
- If methods and properties in engine were called , please refer to latest corresponding methods and properties.