GithubHelp home page GithubHelp logo

starlingfeathers's Introduction

StarlingFeathers

#####整合Starling+Feathers 还有一些Starling扩展 #####Starling 1.7.1+ Feathers 2.0.1

Starling源码的优化

1.关闭Enterframe事件。

(1.3的包 1.4引擎自己已经优化)
starling本身会每一帧遍历所有对象派发enterframe事件。如果对象很多效率自然下降。
改用starling.events.EnterFrameManager统一管理无需每帧遍历所有对象。
注册enterframe事件的方式不变。

2.VertexData优化。

(1.3的包 1.4引擎自己已经优化)
mRawData改为bytearray上传数据速度提升.

3.为DisplayObjectContainer添加了3个方法

addQuiackChild()快速添加子对象
removeQuickChild()快速移除子对象
clearChild()一键清理子对象
使用上面3个方法都不会派发ADD_TO_STAGE,REMOVE_FROME_STAGE事件。当平凡添加和移除子对象时效率可大大提升.

4.使用跳帧策略.

当任务繁忙的时候渲染部分主动丢帧。

应用级别优化

1.简化starling创建流程.

程序主类继承STLStarup
Starling入口类继承STLMainClass
STLStarup主类中调用
initStarlingWithWH->根据宽高初始化starling
或
initStarling->初始化的starling将会充满屏幕
进行初一键初始化自动适应屏幕大小。具体效果请运行查看

2.封装了一部分手势

lzm.starling.gestures包

3.添加动态纹理

lzm.starling.texture.DynamicTextureAtlas
可以很好的优化drw数量。底层是renderTexture

4.添加一些自定义组建

lzm.starling.display
DistortImage,DistortImageContainer四角拉伸图片可拉升的图片
ImageViewer类似于手机上的图片查看器
ScrollContainer,ScrollContainerItem优化过的feathers滚动面板
BaseScene通用场景 做手游比较试用.
其他。。。

starlingfeathers's People

Contributors

zmliu avatar textian avatar wally7 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.