亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? distortimage.as

?? Flex三維特效 examples - see DistortionExamples.mxml bin - Use the included SWC component for productio
?? AS
字號:
/*# ***** BEGIN LICENSE BLOCK *****Copyright the original author or authors.Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at	http://www.mozilla.org/MPL/MPL-1.1.htmlUnless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.# ***** END LICENSE BLOCK ******//****************************** From a first idea and first implementation of Andre Michelle www.andre-michelle.com* @version 2.0* @author Thomas Pfeiffer - kiroukou - http://www.thomas-pfeiffer.info* @author Richard Lester - RichL* @author Didier Brun - foxy - http://www.foxaweb.com* @author Alex Uhlmann* @website: http://sandy.media-box.net* @description: Tesselate a movieclip into several triangles to allow free transform distorsion.*/package sandy.util{		import flash.display.BitmapData;	import flash.display.DisplayObject;	import flash.display.Graphics;	import flash.display.Shape;	import flash.display.Sprite;	import flash.geom.Matrix;	import flash.geom.Rectangle;		public class DistortImage	{		public var smooth : Boolean;		// -- texture to distort		public var texture:BitmapData;				// -- container Sprite or Shape : the display object containing the distorted picture drawn via graphics.				private var _container:Object;				public function get container() : Object		{			return _container;		}					public function set container( value : Object ) : void		{			if( ( value is Shape ) || ( value is Sprite ) )			{				_container = value;			}			else			{				throw new Error('container must be flash.display.Shape or flash.display.Sprite');			}		}					// -- target Object : either a BitmapData or a sprite			public var target:Object;		// -- arrays of differents datas types		public var points:Array;				/////////////////////////		/// PRIVATE PROPERTIES //		/////////////////////////		private var offsetRect:Rectangle;		private var _w:Number;		private var _h:Number;		private var _xMin:Number; 		private var _xMax:Number; 		private var _yMin:Number		private var _yMax:Number;		// -- picture segmentation properties		private var _hseg:Number;		private var _vseg:Number;		private var _hsLen:Number;		private var _vsLen:Number;		private var _tri:Array;		private var _aMcs:Array;						public function DistortImage()		{			smooth = true;		}				/*		* @param vseg Number : the vertical precision		* @param hseg Number : the horizontal precision		* @param offsetRect Rectangle : optional, the real bounds to use.		* @throws: An error if target property isn't a BitmapData or a DisplayObject		*/		public function initialize( vseg: Number, hseg: Number, offsetRect: Rectangle = null ) : void		{			if( target is BitmapData )			{				texture = target as BitmapData;				_w = texture.width;				_h = texture.height;							}			else if( target is DisplayObject )			{				renderVector( offsetRect );			}			else			{				throw new Error('target must be flash.display.BitmapData or flash.display.DisplayObject');			}			_vseg = vseg || 0;			_hseg = hseg || 0;			// --			_aMcs 	= new Array();			points 		= new Array();			_tri 	= new Array();			// --			__init();					}				public function render() : void		{			__render();		}					/** 		* setTransform		*		* @param x0 Number the horizontal coordinate of the first point		* @param y0 Number the vertical coordinate of the first point			* @param x1 Number the horizontal coordinate of the second point		* @param y1 Number the vertical coordinate of the second point			* @param x2 Number the horizontal coordinate of the third point		* @param y2 Number the vertical coordinate of the third point			* @param x3 Number the horizontal coordinate of the fourth point		* @param y3 Number the vertical coordinate of the fourth point	 		*		* @description : Distort the bitmap to adjust it to those points.		*/		public function setTransform( x0:Number , y0:Number , 										x1:Number , y1:Number , 										x2:Number , y2:Number , 										x3:Number , y3:Number ): void		{			var w:Number = _w, h:Number = _h, dx30:Number = x3 - x0, dy30:Number = y3 - y0, dx21:Number = x2 - x1, dy21:Number = y2 - y1, l:int = points.length;			while( --l > -1 )			{				var point:SandyPoint = points[ l ], gx:Number = ( point.x - _xMin ) / w, gy:Number = ( point.y - _yMin ) / h, bx:Number = x0 + gy * ( dx30 ), by:Number = y0 + gy * ( dy30 );								point.sx = bx + gx * ( ( x1 + gy * ( dx21 ) ) - bx );				point.sy = by + gx * ( ( y1 + gy * ( dy21 ) ) - by );			}			__render();		}								/////////////////////////		///  PRIVATE METHODS  ///		/////////////////////////		private function renderVector( offsetRect: Rectangle = null ) : void		{			var vector : DisplayObject = target as DisplayObject;			if( offsetRect != null )			{				texture = new BitmapData( offsetRect.width , offsetRect.height, true, 0x00000000 );			}			else			{				texture = new BitmapData( vector.width , vector.height, true, 0x00000000 );				offsetRect = new Rectangle( 0, 0, texture.width, texture.height );					}						var m : Matrix = new Matrix();			m.translate( offsetRect.x * -1, offsetRect.y * -1 );			texture.draw( vector, m );			container.transform.matrix.translate( vector.transform.matrix.tx, vector.transform.matrix.ty );			_w = offsetRect.width;			_h = offsetRect.height;		}				private function __init(): void		{			points = new Array();			_tri = new Array();			var ix:int, iy:int, w2: Number = _w >> 1, h2: Number = _h >> 1;			_xMin = _yMin = 0;			_xMax = _w; _yMax = _h;			_hsLen = _w / ( _hseg + 1 );			_vsLen = _h / ( _vseg + 1 );			var x:Number, y:Number, p0:SandyPoint, p1:SandyPoint, p2:SandyPoint;						// -- we create the points			for ( ix = 0 ; ix < _hseg + 2 ; ix++ )			{				for ( iy = 0 ; iy < _vseg + 2 ; iy++ )				{					x = ix * _hsLen;					y = iy * _vsLen;					points.push( new SandyPoint( x, y, x, y ) );				}			}			// -- we create the triangles			for ( ix = 0 ; ix < _vseg + 1 ; ix++ )			{				for ( iy = 0 ; iy < _hseg + 1 ; iy++ )				{					p0 = points[ iy + ix * ( _hseg + 2 ) ];					p1 = points[ iy + ix * ( _hseg + 2 ) + 1 ];					p2 = points[ iy + ( ix + 1 ) * ( _hseg + 2 ) ];					__addTriangle( p0, p1, p2 );					// --					p0 = points[ iy + ( ix + 1 ) * ( _vseg + 2 ) + 1 ];					p1 = points[ iy + ( ix + 1 ) * ( _vseg + 2 ) ];					p2 = points[ iy + ix * ( _vseg + 2 ) + 1 ];					__addTriangle( p0, p1, p2 );				}			}					}				private function __addTriangle( p0:SandyPoint, p1:SandyPoint, p2:SandyPoint ):void		{			var u0:Number, v0:Number, u1:Number, v1:Number, u2:Number, v2:Number, tMat:Matrix = new Matrix();			// --					u0 = p0.x; v0 = p0.y;			u1 = p1.x; v1 = p1.y;			u2 = p2.x; v2 = p2.y;			tMat.tx = -v0*(_w / (v1 - v0));			tMat.ty = -u0*(_h / (u2 - u0));			tMat.a = tMat.d = 0;			tMat.b = _h / (u2 - u0);			tMat.c = _w / (v1 - v0);			// --			_tri.push( new Triangle( p0, p1, p2, tMat ) );			}		private function __render(): void		{			var vertices: Array, p0:SandyPoint, p1:SandyPoint, p2:SandyPoint, x0:Number, y0:Number, ih:Number = 1/_h, iw:Number = 1/_w;			var c : Graphics = Graphics( container.graphics );			c.clear();						var a:Triangle, sM:Matrix = new Matrix(), tM:Matrix = new Matrix(), l:int = _tri.length;		   			while( --l > -1 )			{				a 	= Triangle( _tri[ l ] );				p0 	= a.p0;				p1 	= a.p1;				p2 	= a.p2;				tM = a.tMat;				// --				sM.a = ( p1.sx - ( x0 = p0.sx ) ) * iw;				sM.b = ( p1.sy - ( y0 = p0.sy ) ) * iw;				sM.c = ( p2.sx - x0 ) * ih;				sM.d = ( p2.sy - y0 ) * ih;				sM.tx = x0;				sM.ty = y0;				// --				sM = __concat( sM, tM );				c.beginBitmapFill( texture, sM, false, smooth );				c.moveTo( x0, y0 );				c.lineTo( p1.sx, p1.sy );				c.lineTo( p2.sx, p2.sy );				c.endFill();							}					}				private function __concat( m1:Matrix, m2:Matrix ):Matrix 		{			//Relies on the original triangles being right angled with p0 being the right angle. 			//Therefore a = d = zero (before and after invert)			var mat : Matrix = new Matrix();						mat.a  = m1.c * m2.b;			mat.b  = m1.d * m2.b;			mat.c  = m1.a * m2.c;			mat.d  = m1.b * m2.c;			mat.tx = m1.a * m2.tx + m1.c * m2.ty + m1.tx;			mat.ty = m1.b * m2.tx + m1.d * m2.ty + m1.ty;				return mat;		}	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一区二区三区久久久| 欧美午夜不卡在线观看免费| 午夜不卡av在线| 亚洲日本成人在线观看| 免费视频最近日韩| 国产日本欧洲亚洲| 日韩精品一区在线观看| kk眼镜猥琐国模调教系列一区二区| 国产精品私人影院| 制服丝袜亚洲网站| 成人网页在线观看| 激情文学综合丁香| 国产精品中文欧美| 国产精品1区二区.| 成人av中文字幕| 一本大道av伊人久久综合| 一道本成人在线| 欧美日韩午夜影院| 亚洲色图清纯唯美| 91视频com| 色又黄又爽网站www久久| 色综合久久中文综合久久97| 色欲综合视频天天天| 欧美日韩日日摸| 欧美国产欧美亚州国产日韩mv天天看完整 | 国产亚洲综合在线| 7777精品伊人久久久大香线蕉超级流畅 | 粉嫩av一区二区三区| 精品一区中文字幕| 天天色图综合网| 亚洲男人天堂av网| 制服丝袜中文字幕亚洲| 2023国产精品视频| 日韩视频一区在线观看| 欧美在线不卡视频| 日韩欧美激情在线| 欧美一区二区日韩一区二区| 欧美色区777第一页| 色综合久久久久| 91精品国产综合久久精品图片| 色偷偷88欧美精品久久久| 不卡av免费在线观看| 国产一区二区精品在线观看| 成人av电影免费在线播放| 国产成人精品aa毛片| 国产精品一卡二卡| 天天操天天干天天综合网| 亚洲精品乱码久久久久久黑人| 国产一区二区三区精品视频| 亚洲国产一区二区三区| 经典三级在线一区| 国产在线看一区| 国产福利一区在线| 欧美色区777第一页| 欧美在线观看视频在线| 欧美午夜一区二区三区免费大片| 成人av免费网站| 日韩一区二区精品| 久久久.com| 国产无人区一区二区三区| 亚洲国产精品视频| 日本中文一区二区三区| 日韩av电影免费观看高清完整版在线观看 | 日韩主播视频在线| 日韩av中文字幕一区二区三区| 亚洲免费大片在线观看| 一个色妞综合视频在线观看| 亚洲精品五月天| 亚洲6080在线| 色拍拍在线精品视频8848| 日本精品一级二级| 欧美肥妇bbw| 国产精品久久777777| 伊人一区二区三区| 奇米色一区二区| 国内精品写真在线观看| 7777女厕盗摄久久久| 精品精品欲导航| 中文字幕一区二区三区视频| 国产精品久久久久久福利一牛影视 | 日韩av电影免费观看高清完整版| 蓝色福利精品导航| 精品欧美一区二区三区精品久久| 不卡视频一二三四| 欧美三级一区二区| 久久精品视频网| 国产成人在线看| 欧美tk丨vk视频| 亚洲精品乱码久久久久久久久| 午夜欧美大尺度福利影院在线看 | 色欧美乱欧美15图片| 欧美一区二区免费视频| 91精品国产黑色紧身裤美女| 亚洲国产精品视频| 成人一区二区三区中文字幕| 成人黄色片在线观看| 国产欧美日韩精品在线| 午夜精品久久久久久| 高清国产一区二区| 久久九九久精品国产免费直播| 亚洲老妇xxxxxx| 韩国av一区二区| 精品久久人人做人人爰| 亚洲免费观看高清完整| 激情久久五月天| 国产馆精品极品| 欧美色精品在线视频| 337p粉嫩大胆噜噜噜噜噜91av| 3d动漫精品啪啪1区2区免费| 日本不卡在线视频| 色老综合老女人久久久| 国产亚洲精品福利| 亚洲国产视频在线| 成人精品电影在线观看| 99免费精品在线| 亚洲男人的天堂在线观看| 国产乱对白刺激视频不卡| 在线免费精品视频| 日日骚欧美日韩| 欧美影院一区二区三区| 欧美一级国产精品| 国产精品中文字幕欧美| 日韩欧美国产综合在线一区二区三区| 久久嫩草精品久久久久| 成人性色生活片| 久久婷婷国产综合国色天香| 夜夜嗨av一区二区三区网页| 欧美精品自拍偷拍动漫精品| 亚洲精品写真福利| www.欧美.com| 一区精品在线播放| 亚洲曰韩产成在线| 色噜噜狠狠色综合中国| 成人欧美一区二区三区小说| 色婷婷综合五月| 国产精品国产三级国产a| 91麻豆免费看片| 欧美三级韩国三级日本一级| a4yy欧美一区二区三区| 激情五月婷婷综合| 亚洲午夜久久久久中文字幕久| 欧美性猛片aaaaaaa做受| 成人动漫视频在线| 日韩av在线发布| 色一情一伦一子一伦一区| 国产精品看片你懂得| 久久av资源网| 亚洲少妇30p| 色婷婷狠狠综合| 国产精品久久网站| 欧美乱熟臀69xxxxxx| 亚洲成人精品在线观看| 久久99精品一区二区三区| 亚洲丝袜另类动漫二区| 色琪琪一区二区三区亚洲区| 亚洲一区二区视频在线观看| 久久影视一区二区| 国产成人精品亚洲午夜麻豆| 国产三级欧美三级日产三级99| 欧美自拍丝袜亚洲| 亚洲毛片av在线| 欧美日韩成人高清| 国产成人av影院| 国产女人aaa级久久久级| 国内精品伊人久久久久av一坑| 一区二区欧美国产| 欧美久久久久久蜜桃| 国产精品高清亚洲| 9i在线看片成人免费| 欧美午夜不卡在线观看免费| 亚洲欧洲日产国码二区| 色综合久久66| 中文字幕在线一区| 日韩视频中午一区| 国产99久久久精品| 午夜精品久久久久久久99樱桃| 一区二区三区日韩欧美精品| 欧美日韩国产高清一区二区| 成人在线综合网站| 亚洲视频一二三| 69堂精品视频| 欧美日韩精品是欧美日韩精品| 日韩电影在线免费观看| 久久看人人爽人人| 欧美日韩国产综合一区二区三区 | 欧美美女bb生活片| 亚洲欧美另类在线| 国产美女在线观看一区| 国产精品一品二品| 成人高清伦理免费影院在线观看| 国产suv一区二区三区88区| 东方aⅴ免费观看久久av| 99久久国产免费看| 偷拍一区二区三区| 国产精品一区二区x88av| 日韩欧美亚洲国产另类| 精品精品国产高清a毛片牛牛| 综合色天天鬼久久鬼色| 日本一区二区三区在线观看| 欧洲生活片亚洲生活在线观看|