- 浏览: 384337 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
yanmie:
您的文章已被我们收录地址:http://www.airmyth ...
学习一下 Pixel Bender -
chaimzane:
我现在自己都有点看不懂了 实际上很简单, LocaleModu ...
Flex 优化技巧 -- 全局CSS样式模块实现RSLS 方式加载 -
muqingren:
以我现在对flex的了解,没看懂你说的........... ...
Flex 优化技巧 -- 全局CSS样式模块实现RSLS 方式加载 -
cony138:
卤煮碉堡了啊
A*寻路 -- 更加真实 的路径(一) -
jack_ye:
[/flash][/flash][/fl[u][u]ash][ ...
Alternativa3D 8 基础理论 / 概念
做项目遇到flash player的bug真的是很头疼,
当本身或父容器的cacheAsBitmap = true 时,就会对,该对象 的matrix 产生扰乱,就是取值设置不准确,这是 flash 的bug http://bugs.adobe.com/jira/browse/FP-121 。
什么东西呢,就是
A: mask.png B: frame.png C: Image.*
几张图要实现这样的效果
自然就想到了用 flash的遮罩来实现。哦对了,其中mask.png还要做下补色,然后对frame.png和Image.*组成的图
进行apha遮罩,但是这样做会有个问题因为,对Image.*的操作是基于 matrix的,而alpha遮罩是要设置cacheAsBitmap = true 的,但是这样做会有我一开始提到的那个问题,虽然http://www.sephiroth.it/weblog /a ... heasbitmap_hell.php 上面给出了解决办法,但是我发现还是没有根本解决问题。怎么办勒,终于被我发现另外一种实现alpha通道遮罩的办法,而不用设置cacheAsBitmap=true,那就是用blendMode。将父层的blend设置为
BlendMode.LAYER,在将mask层放在被遮罩层上并设置blend = BlendMode.ALPHA,嘿嘿,一切都解决啦。
package { import flash.display.BlendMode; import flash.events.MouseEvent; import mx.containers.Canvas; import mx.controls.Image; import mx.core.ScrollPolicy; import mx.core.mx_internal; use namespace mx_internal; public class BlendTestContainer extends Canvas { [Embed(source="testPicture.jpg")] private var testPictureClass:Class; [Embed(source="frameImage.png")] private var frameImageClass:Class; [Embed(source="maskImage.png")] private var maskImageClass:Class; public function BlendTestContainer() { _horizontalScrollPolicy = ScrollPolicy.OFF; _verticalScrollPolicy = ScrollPolicy.OFF; blendMode = BlendMode.LAYER; } private var testPicture:Image; private var frameImage:Image; private var maskImage:Image; override protected function createChildren():void { super.createChildren(); if(!testPicture) { testPicture = new Image(); testPicture.addEventListener(MouseEvent.MOUSE_DOWN,testPictureMouseDownHandler); testPicture.source = testPictureClass; addChild(testPicture); } if(!frameImage) { frameImage = new Image(); frameImage.mouseEnabled = false; frameImage.mouseChildren = false; frameImage.maintainAspectRatio = false; frameImage.source = frameImageClass; addChild(frameImage); } if(!maskImage) { maskImage = new Image(); maskImage.mouseEnabled = false; maskImage.mouseChildren = false; maskImage.maintainAspectRatio = false; maskImage.source = maskImageClass; maskImage.blendMode = BlendMode.ERASE; addChild(maskImage); } } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth,unscaledHeight); frameImage.setActualSize(unscaledWidth,unscaledHeight); maskImage.setActualSize(unscaledWidth,unscaledHeight); } private function testPictureMouseDownHandler(e:MouseEvent):void { testPicture.startDrag(); this.stage.addEventListener(MouseEvent.MOUSE_UP,stageMouseUpHandler); } private function stageMouseUpHandler(e:MouseEvent):void { testPicture.stopDrag(); this.stage.removeEventListener(MouseEvent.MOUSE_UP,stageMouseUpHandler); } } }
评论
发表评论
-
blog
2014-01-21 13:37 842http://www.catalinzima.com/ -
在cocos2d-x中实践数据驱动的游戏开发
2014-01-21 09:33 3274from: http://elvisco.de/2013/0 ... -
Inside the AS3 Date class: Timezones and Daylight Saving Time
2014-01-17 13:54 1171from: http://www.computus.org/ ... -
Make an AS3 Flash Component with Custom UI Controls
2013-06-28 22:24 2117from: http://studio.barliesqu ... -
234234234234
2013-06-25 21:17 0http://howtonode.org/how-to-ins ... -
AdobeMax: Deep Dive into Flash Player Rendering
2013-06-21 10:41 1484from http://www.developria.com ... -
网络游戏的对时以及同步问题
2013-05-15 16:27 1093from: http://blog.codingnow.co ... -
111
2013-04-27 22:24 0http://flashgamedojo.com -
Bitmap 海浪实现方式
2013-03-13 17:10 933Bitmap 海浪实现方式 package { ... -
Developing Flash Platform games
2012-12-25 16:37 1225转: http://www.adobe.com/inspire ... -
AS3地图拼接与战争迷雾的实现
2012-11-05 12:44 2183转:http://bbs.9ria.com/thread-1 ... -
终极优化你的游戏 —— 使用脏矩形技术
2012-10-17 10:30 1696转载: http://dev.gameres.com/arti ... -
A*寻路 -- 更加真实 的路径(一)
2012-08-11 11:58 11371转:http://bbs.9ria.com/threa ... -
仿photoshop中的取色器,制作思路
2012-07-10 16:41 2392早期在论坛的帖子,保存留念。有点感慨那时的学习尽头。 ... -
transformTool matrix
2012-07-10 15:46 1759以前在论坛发的贴,转存 原地址: http://b ... -
排序算法复习 之 AS3
2012-07-06 18:38 3958以前在论坛的贴子,保存之。 原链接: http: ... -
AS3速成-从Flash的内容中移除右键菜单
2012-07-06 14:00 2531转: http://bbs.9ria.com/thread-1 ... -
AS3 四叉树
2012-07-06 10:09 1475转载:http://developbbs.com/?p=115 ... -
深入理解Flash的沙箱 – Application Domains
2012-07-04 14:18 1195转: http://kevincao.com/2010/1 ... -
2D动画实现效率评测
2012-07-02 22:31 4294转:http://www.todoair.com/2d%E5% ...
相关推荐
对于wpf实现会复杂一些,因为提供自绘没有BlendMode之类的东西,无法直接消除底部画面,能够使用的方式是Clip,这种方式限制比较多。不过最终还是实现了功能。本资源为文章附件资源,原文链接:...
之前上传的csdn上没有显示出来,不知道为什么。 这是根据openv3编程入门自己手打的代码,配置好opencv3.2获取它版本x64库即可运行
演示可用方法+ (UIImage *)mark_colorizeImage:(UIImage *)image withColor:(UIColor *)color blendMode:( CGBlendMode )blendMode;- (UIImage *)mark_colorizedCopyWithColor:(UIColor *)color blendMode:(
快速的p5.js草图测试blendMode函数,并使用CCapture生成草图的gif! 为了制作gif,您需要将'recording'变量设置为true,并且可以使用index.html中的'gifLength'变量(在sketch.js中)设置gif中的帧数。的gif。
通过CSS3的mix-blend-mode实现的图形表达演示网址拖动鼠标进行操作。屏幕上绘制了一张彩色的图。评论文章有关详细信息,请参见用ICS LAB编写的文章。 它是使用CSS3的mix-blend-mode属性创建的。使用的图书馆 2015.05...
blendmode-filter-video 为我在CSS Paris Meetup上的演讲而创建的小型应用程序( )滑梯
作为程序员我们肯定会想怎么可以实现的, 我简单研究了10分钟, flutter中只要在整体外面套一个ShaderMask, 然后修改blendMode即可 核心代码: class MyApp extends StatelessWidget { // This widget is the root of...
three.js资源包
- overContext : A CanvasRenderingContext2D - underContext : A CanvasRenderingContext2D - blendMode : A string with the blend mode to use, e.g. 'screen' - offsetOptions : [optional] JS Object with ...
在Flutter中实现整个App变为灰色是非常简单的,只需要在最外层的控件上包裹ColorFiltered,用法如下: @override Widget build(BuildContext context) { return ColorFiltered( colorFilter: ColorFilter.mode...
功能包括: 绘制路径,形状和曲线复杂遮罩阴影,辉光和效果加载图像文件格式(PNG,BMP,JPG,SVG及更多正在开发中的图像) 该库正在积极开发中,尚无法使用。 由于您已成功发现它,因此请给它加星标并尽快回来查看...
实现了以下混合模式: 普通的减轻变暗乘划分平均数添加减去区别否定屏幕排除覆盖柔光强光颜色道奇颜色燃烧线性道奇线性燃烧线性光亮光点灯硬混合反映辉光凤凰 这些功能可用于自动组装最终图片的过程。 例如,这个...
<blendMode>normal</blendMode> <transDuration>1 <windowOpen>_self <btnSetMargin>auto 5 5 auto <btnDistance>20 <titleBgColor>0xff6600</titleBgColor> <titleTextColor>...
Glow11插件是Unity Asset Store中非常强大的自发光插件 内含3个版本 可以做自发光, 光晕等。 支持mobile High Precision:高精度 ...Downsample BlendMode:下采样混合模式 Inner Strength Outer Strength Boost
FlxSpotlightShader Flixel中的聚光灯着色器创建一些具有黑色轮廓,没有Venn-diagram样式轮廓相交的聚光灯,在其中应用混合... 有关肉类和土豆,请参见SpotlightShader.hx,文件的最后lil blendmode位是炖肉。 例子:
颜色的相乘是对应的四个分量分别相乘的结果,即:alpha 通道的值与alpha 通道的 值相乘,红色的值与红色的值相乘,绿色的值与绿色的值相乘,蓝色的值与蓝色的值相乘。 <2> 颜色是可以相加的 同上,对应分量相加。 ...
纯碱 GPL下的一些纯基本应用程序和代码。 附件: animatoon:一个2D位图应用程序,用于绘制和变换图像... 图像:blendmode,圆形笔刷,调色板 游戏:screen_mouse,tuto2D windows_gadget:Windows创建者 干杯!
不幸的是,一些小部件和元素无法在网络上运行,例如ShaderMask和BlendMode.srcOut。 网络版本的性能也明显低于桌面版本。 要使其中一些效果在#4等网络上起作用,请确保使用canvaskit作为渲染器( --web-renderer...
- FIXED: A BlendMode bug. 3.1.0 - NEW: Draw extra 8 directions instead of 4 directions to archive text outline effect. Toggle option is UIConfig.enhancedTextOutlineEffect. - IMPROVED: Eexecution ...