守望者--AIR技术交流

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
热搜: ANE FlasCC 炼金术
查看: 3234|回复: 0
打印 上一主题 下一主题

[GhostCat] GhostCat 介绍

[复制链接]
  • TA的每日心情
    擦汗
    2018-4-10 15:18
  • 签到天数: 447 天

    [LV.9]以坛为家II

    1742

    主题

    2094

    帖子

    13万

    积分

    超级版主

    Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18

    威望
    562
    贡献
    29
    金币
    52695
    钢镚
    1422

    开源英雄守望者

    跳转到指定楼层
    楼主
    发表于 2015-2-6 15:04:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    http://code.google.com/p/ghostcat/
    GhostCatTools已经发布,使用Flex Spark框架以及AIR和部分GhostCat功能制作。 包含大量开发常用的功能。




    GhostCat是一个功能非常丰富的开源工具库,(同时也包含有一套完整的UI组件,但它只是类库的一个衍生品。)
    它基本可以涵盖你可能遇到大部分问题。
    使用UI将会增加50K左右的体积,使用非UI显示对象会增加20K以上的体积,而非显示类可以非常小。

    GhostCat采用BSD协议可以自由地应用于商业及非商业应用中。如果您使用了GhostCat,甚至用于实际项目中,希望能通过邮件给予回馈。
    实际应用项目
    升职记 CeoDream
    http://app.pengyou.qq.com/appframe.html?appid=608&height=950&frame=http%3A%2F%2Fceo.qzoneapp.com%2Findex.phphttp://apps.renren.com/ceodream
    http://apps.facebook.com/ceodreamGhostCat is a feature-rich open source tools forlibraries, (which also contains a complete set of UI components, but it is onlya class library derivatives.)
    It basically can cover most of the problems you may encounter.

    Using the UI will increase the size of 50K or so, use of non-UI display objectwill increase more than 20K in size, rather than display type can be verysmall.


    GhostCat using BSD agreement may be freely used incommercial and non-commercial applications. If you use a GhostCat, even for the actual project, we hope togive feedback through e-mail.
    The practical application of project
    renren.com: ceodream
    http://apps.renren.com/ceodream?origin=103&_vip_flag=32@author flashyiyi
    blog:
    http://uh.actionscript3.cn/space.php?uid=12147参考
    http://ghostcat.googlecode.com/svn/trunk/GhostCat/asdoc-output.chmSWC下载
    http://ghostcat.googlecode.com/svn/trunk/GhostCat/bin/GhostCat.swcSVN工具
    http://tortoisesvn.net/downloads.html
    教程可查看wiki
    示例(打不开就用IE):
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/AStarExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/BindingExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/CollisionExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/ControlRectExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/GIFExample.html
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/GXMLExample2.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/GXMLExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/IFrameExample.html
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/IMEExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/LangageExample.html
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/LightExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/Paper3DExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/RightClickExample.html
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/SkewExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/SmoothCurveExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/SWFDecoderExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/TestExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/Tile45Example.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/TileExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/TweenExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/SortExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/EllipseLayoutExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/PixelExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/TableExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/StringTweenExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/BitmapScreenExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/SoundExample.html
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/TransitionExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/FrameRateExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/WalkExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/MazeExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/BombExample.swf几个简单的UI示例
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/UIBoxExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/UIBuilderExampler.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/UIComboBoxExample.swf
    http://ghostcat.googlecode.com/svn/trunk/example/bin-release/UIScrollExample.swf

    GhostCat原名ASGameUI,初期设计只是想做一个轻量化的UI组件库。FLEX暂且不提,就算AsWing实际上都未能实现和Sprite的完美结合,而且体积依然很抱歉。因此,很多开发者最终被迫选择了自行开发。然而,他们开发的东西要不功能不够,不要是针对性工具,缺乏通用性,因此并无法补齐这个空缺。
    ASGameUI
    来源于一个逻辑注入的设想,牺牲了布局的便利性,并充分利用FLASH IDE为自身服务,使得它在符合面向对象的编程方式的同时,亦实现了和原始时间线开发类似的自由度和便利性,从而可以在纯代码环境下直接套用原本动画网站丰富的表现方式,达到两种互斥方式的结合。从而,使得在开发丰富表现的UI时,开发成本大幅度降低。
    值得一提的是,虽然GhostCat在底层引入了与UI无关的大量内容,在使用UI时体积依然只有50K出头(不使用UI会很低)。这主要来源于松散的类库设计。你可以将大量内容引用,并在项目中充分使用其功能,也可以仅仅引用一个功能点,你并不会因为引入了一个功能而使得SWF体积大幅度上升。
    GhostCatUI充分考虑了其表现。除了亲和MovieClip之外,它同时在组件内部自带了缓动和动画效果。这是目前其他类库所没有的。而且,和一些自写类库相比,GhostCat在控制体积的同时,亦提供了布局,ListItemRender等高级特性,使得它在基本功能上同样不亚于ASWingFLEX等组件,仅仅是效率和便利程度上不及。

    GhostCat之所以改名,是因为这个类库目前已经远远超出了UI的概念。它利用自己的基层类库进行发散,诞生了许多有用而独特的功能,诸如:

    提供了MovieClip的扩展:
    你可以用同一种方式操作矢量动画,位图动画,以及代码动画并可将动画进行拼接处理。动画自带倒放,帧速控制,播放队列功能,并可将矢量动画转换为位图动画播放。

    一个奇特的动态内容显示模块:
    可以很简单的使用(你可以假想它只是一个超大的重复内容图形),由它自动进行重复对象的创建,移动,删除,完美处理缩放和移动。而且,它甚至是List实现的基础!仅仅是重写了几个方法,它便可以立即实现45度角的游戏地图效果。你也可以把它仅仅作为一个逻辑类,并利用事件,实现你想要的任何功能。

    一个非常完善的XML反序列化器:
    你可以用它表述任何种类的类(可以包含构造函数参数列表),并且模仿FLEX实现了事件自动监听,属性外链等功能。可以是多层显示对象的序列化,也可以是一组包含复杂类的数据。扩展它也很简单。你只需要理解并重写它的3个方法,而如果仅仅是想进行属性名称的转义,只需要设置一个属性即可,而这也是自定义解析器最常见的需求。

    一个通用型队列系统:
    它不仅仅用来进行资源的排队加载,而且可以排队任何东西!函数,声音,弹窗,以及判断,转向,循环。某种程度上,它甚至像是一个脚本引擎。而使用和扩展亦非常简单。使用它,new,然后commit()即可,要扩展它,你只需要实现一个普通的命令模式,有效代码可以只有几行。作为例子,我已经提供了一个简单的任务系统,在这种需求里,命令模式的优势被表现得淋漓尽致。这也是一个处理AS3没有多线程时的代替方案。

    一个简便的位图引擎:
    是的,虽然同样是addChild,但通过这种方式加上去的东西,就是用自带的优化渲染方式实现的。在大量物品移动时,它可以比默认渲染方式获得更好的性能。并且,它还可以即时地在多种渲染模式内切换,使用风险较低。位图引擎亦实现了基本的鼠标事件模拟功能。从这个地方开始扩展,提供了一个使用很简单的位图特效类,只需要一个行代码和简单的设置便可让对象拥有平滑残影和扩散特效。再配合物理类,便可以形成一个完整的粒子引擎。

    GhostCat的功能远不止上面所说,事实上,大部分的通用功能它都已经在内部获得了实现(诸如Tween),这些就不就再提了。仅仅列出一些特殊功能。
    -
    判断矢量边缘实现不规则物品碰撞检测(非位图)
    -
    高效位图碰撞及重叠矢量检测
    -A
    ,/广度,2D/3D/路点,寻路方式统一处理。
    -
    二次贝尔法曲线,按长度切割和计算法线,光滑曲线拟合(过点或者不过点)
    -SWF
    解析器,从ByteArray中播放声音,直接控制AVM1的动画类容。
    -
    丰富的文本缓动,部分文字Filter,渐变色文字,字符差异对比,ANSI转码,URL解码,中文数字,拼音码,这是一个单独的底层包
    -
    完全由FLASH实现的拼音输入法,需要加载200K的词库,光标跟随并可词语输入(感觉和智能ABC差不多)
    -
    缩略图,倒影,梯形变换,马赛克,各种特效,火焰什么的
    -
    完整功能的自定制过渡,不仅能用,也能创造。如果不会用,可以使用Creater中的模板
    -
    粒子,物理,景深
    -
    QQ那样截屏!
    -
    流方式读取文本和图片。HTML可以,FLASH也可以
    -
    FXG类似的道理,用对象保存绘制操作,简化绘制过程
    -
    多种拖拽工具,变形工具,编辑形状工具。单个拖动点也可单独使用。
    -
    单文件自加载
    -
    右键,双击,三击,键盘管理,鼠标手势
    -
    影子生成器。FLASH也是可以模拟出效果不错的光影的。影子可以折墙壁
    -
    防客户端修改解决方案(内存修改,加速)
    -
    切割图形,同时支持矢量,位图,而且,你可以按45度角来切!
    -
    颜色模式转换
    -
    去背景,魔法棒
    -
    图文混排的简单实现。也可以显示Table表格
    -
    滤镜代理:修改了滤镜的属性便能立即生效,你可以直接对它Tween!当然,水波放大镜,对比度饱和度顺便也提供了。
    -
    常用的JS扩展:IFrame,便捷的提供接口给外部JS,调用浏览器音乐播放器播放MID,以及一些常用的防刷新,防鼠标滚轮干扰。当然,deeplink是不可少的。
    -
    扇形,圆环,虚线
    -
    四则运算(字符串分析)
    FP10
    限定
    -Beep
    音乐,变速播放
    也许在使用上,GhostCat还是需要一些成本(至少你需要知道各个功能都在哪个位置),但是这是值得的,一些问题可能你现在不会遇到,将来也可能会遇到。这是一件一劳永逸的事情。同时,我也希望GhostCat也能给你一些启发,让你去做一些以前认为无法做到或者过于麻烦而不去做的事,如此,提高FLASH产品的质量,从而促进行业发展,使所有人受益。
    GhostCat formerly ASGameUI, just wanted to do thepreliminary design of a lightweight UI component library. FLEX put aside, evenAsWing actually failed to achieve and the perfect combination of Sprite, butthe volume is still I am sorry. Therefore, many developers finally forced tochoose a self-development. However, they function not something to be developedOtherwise, not a specific tool, the lack of universal and, therefore, can notbe padded to this vacancy.
    ASGameUI from a "logic into" the idea of sacrificing the convenienceof the layout, and take full advantage of FLASH IDE for their own services,making it consistent with object-oriented programming approach, they alsorealized and the original timeline to develop similar degree of freedom andconvenience, which can be directly applied to pure code environment rich in theperformance of the original animated web site means to achieve a combination ofthe two mutually exclusive ways. Thus, making the performance in thedevelopment of a rich UI, the development costs significantly reduced.

    It is worth mentioning that, although the
    GhostCat with the UI at the bottom of theintroduction of a large number of unrelated content, when the volume using theUI still only 50K Chutou (without using the UI to be low). This is mainly aloose class library from the design. You can reference large amounts of content,and the project to fully use its capabilities, you can simply refer to afunction point, you will not be because of the introduction of a feature makesthe SWF volume increased significantly.
    GhostCat the UI fully considered its performance.In addition to affinity than MovieClip, which also comes in the slow movement ofinternal components and animation effects. This is currently not available inother libraries. Moreover, when compared with some self-written classlibraries, GhostCat in the control volume, they also providethe layout, List, ItemRender and other advanced features, making it inferior tothe same basic functions ASWing, FLEX and other components, only the efficiencyof and facilitate the level of that.

    GhostCat reason to change its name because thislibrary is now far beyond the UI concept. It uses its own grass-roots librariesto divergent, the birth of a number of useful and unique features, such as:

    Provides a
    MovieClip extension:
    You can operate the same way vector animation, bitmap animation, as well as thecode is animated and can be spliced animation processing. Animation own upsidedown, frame rate control, playback queue function, and may convert a bitmapvector animation animation playback.


    A peculiar dynamic content display module:

    Can be very simple to use (you can supposedly it's just a repetition of thecontents of large graphics), which it automatically create a duplicate object,move, delete, perfect handle scaling and moving. Moreover, it is even the basisfor achieving List! Simply override a few methods, which can be an immediate45-degree angle of the game map results. You can also put it simply as alogical class, and use the event to achieve any of the features you want.


    A very well-established XML deserializer:

    You can use it to express any kind of class (may contain constructor argumentlist), and the imitation of FLEX to achieve automatic monitoring of events,properties outside the chain of functions. Can be a multi-layer display objectserialization, it can be a complex type that contains data. It is also verysimple extension. You just need to understand and rewrite it three ways, and ifthe property name just want to escape, only need to set a property can be,which is also the custom parser the most common needs.


    A universal queue system:

    It is not only used for resources in queuing load, and can queue up anything!Function, sound, pop, and the judge, steering, loop. To some extent, it even likea script engine. The use and expansion is also very simple. To use it, new, andthen commit () can, to extend it, you only need to achieve a normal commandmode, efficient code can be only a few lines. As an example, I have provided asimple task system, in this demand, the command mode the performance advantageswill be realized.


    A simple bitmap Engine:

    Yes, although it is equally addChild, but by things that go together in thisway is to use native methods to achieve optimal rendering. Move a large numberof items, it can be better than the default rendering performance. Also, it caninstantly render the model in a variety of switching, the use of lower risk.Bitmap engine has achieved the basic mouse event simulation capabilities. Fromthis place began to expand, providing a very simple to use bitmap effectscategories, only one line of code and simple set-up so that objects can have asmooth blur and diffusion effects. Coupled with the physical type, they canform a complete particle engine.


    GhostCat features far more than the abovementioned, in fact, most of the common functions which have been obtainedin-house to achieve (such as Tween), not to mention they had. Just a list ofless frequently used functions.
    - To determine the edge vector objects to achieve an irregular collisiondetection (non-bitmap)

    -A(
    ), depth / breadth, 2D/3D / way point, look for a unifiedtreatment approach road.
    - Secondary Belfast curve, according to the length ofcutting and calculating normal and smooth curve fitting (over-point or a point,however)
    -SWF parser, from the ByteArray to play sound, directcontrol of the animation class AVM1 capacity.
    - Rich text slow moving, some of the text Filter, gradienttext, character differences in contrast, ANSI transcoding, URL decoding,Chinese numbers, alphabet code, which is a separate low-level packet
    - FLASH implemented entirely by phonetic input methodneeds to load the 200K of the thesaurus, the cursor follows the words and caninput (sensory and intellectual ABC almost)
    - Thumbnails, reflection, trapezoidal transformation,mosaic, all kinds of special effects, the flame of what
    - Full-featured customized transition, not only can beused, but also to create. If not available, you can use the Creater of thetemplate
    - Particle physics, depth of field
    - Like the QQ as screenshot!
    - Stream mode to read the text and pictures. HTML can be,FLASH can also be
    - And FXG similar reasoning, using objects to savedrawing operation, to simplify the process of drawing
    - Drag and drop a variety of tools, deformation tools,editing tool shapes. Drag a single point can also be used alone.
    - Single-file self-loading
    - Right, double-click, three hit, keyboard management,mouse gestures
    - Shadow Generator. FLASH is also can simulate theeffects of a good light and shadow. The shadow of the wall can be folded
    - Anti-modified on the client solutions (memory modify,acceleration)
    - Cutting graphics, while supporting vectors, bitmaps,and that you can press a 45-degree angle to cut!
    - Color mode switching
    - To the background, the magic wand
    - Photo-text simple to achieve. Table table can alsodisplay
    - Filter Agent: Modify the properties of the filters cantake effect immediately, you can direct it Tween! Of course, water magnifier,contrast, saturation, by the way also provided.
    - JS commonly used extensions: IFrame, to provideconvenient interface to an external JS, call the music player, browser, MID, aswell as some commonly used anti-refreshing, anti-mouse wheel interference. Ofcourse, deeplink is indispensable.

    GhostCat also with aMVC framework, it is a small object-oriented projects and a small team,including all the necessary communications functions, the successful completionof the three MVC decoupling, while the use of extremely stupid. No one wouldthink it is a burden.

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
    收藏收藏 分享分享 支持支持 反对反对 微信
    守望者AIR技术交流社区(www.airmyth.com)
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    
    关闭

    站长推荐上一条 /4 下一条

    QQ|手机版|Archiver|网站地图|小黑屋|守望者 ( 京ICP备14061876号

    GMT+8, 2024-4-20 14:24 , Processed in 0.054631 second(s), 31 queries .

    守望者AIR

    守望者AIR技术交流社区

    本站成立于 2014年12月31日

    快速回复 返回顶部 返回列表