PageRenderTime 61ms CodeModel.GetById 32ms RepoModel.GetById 0ms app.codeStats 0ms

/mad-components/MadComponentsStage3D/src/com/danielfreeman/stage3Dacceleration/PageTransitions.as

http://mad-components.googlecode.com/
ActionScript | 580 lines | 407 code | 135 blank | 38 comment | 21 complexity | f6b2a55d3191f2515d7958006ff6837a MD5 | raw file
  1. /**
  2. * <p>Original Author: Daniel Freeman</p>
  3. *
  4. * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
  5. * of this software and associated documentation files (the "Software"), to deal
  6. * in the Software without restriction, including without limitation the rights
  7. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. * copies of the Software, and to permit persons to whom the Software is
  9. * furnished to do so, subject to the following conditions:</p>
  10. *
  11. * <p>The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.</p>
  13. *
  14. * <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. * THE SOFTWARE.</p>
  21. *
  22. * <p>Licensed under The MIT License</p>
  23. * <p>Redistributions of files must retain the above copyright notice.</p>
  24. */
  25. package com.danielfreeman.stage3Dacceleration {
  26. import com.danielfreeman.madcomponents.*;
  27. import flash.display.DisplayObject;
  28. import com.adobe.utils.*;
  29. import flash.display.Sprite;
  30. import flash.display.Stage3D;
  31. import flash.display.StageAlign;
  32. import flash.display.StageScaleMode;
  33. import flash.display3D.Context3D;
  34. import flash.display3D.Context3DProgramType;
  35. import flash.display3D.Context3DTriangleFace;
  36. import flash.display3D.Context3DTextureFormat;
  37. import flash.display3D.Context3DVertexBufferFormat;
  38. import flash.display3D.IndexBuffer3D;
  39. import flash.display3D.Program3D;
  40. import flash.display3D.VertexBuffer3D;
  41. import flash.display3D.textures.Texture;
  42. import flash.events.Event;
  43. import flash.geom.Matrix3D;
  44. import flash.geom.Vector3D;
  45. import flash.utils.ByteArray;
  46. import flash.display3D.textures.Texture;
  47. import flash.display.Bitmap;
  48. import flash.display.BitmapData;
  49. import flash.geom.Rectangle;
  50. import flash.geom.Matrix;
  51. public class PageTransitions extends Stage3DAcceleration {
  52. public static const SIMPLE:String = "simple";
  53. public static const SLIDE_LEFT:String = "slideLeft";
  54. public static const SLIDE_RIGHT:String = "slideRight";
  55. public static const SLIDE_UP:String = "slideUp";
  56. public static const SLIDE_DOWN:String = "slideDown";
  57. public static const FLIP_LEFT:String = "flipLeft";
  58. public static const FLIP_RIGHT:String = "flipRight";
  59. public static const SWAP_LEFT:String = "swapLeft";
  60. public static const SWAP_RIGHT:String = "swapRight";
  61. public static const CUBE_LEFT:String = "cubeLeft";
  62. public static const CUBE_RIGHT:String = "cubeRight";
  63. public static const DOOR_LEFT:String = "doorLeft";
  64. public static const DOOR_RIGHT:String = "doorRight";
  65. public static const DRAWER_UP:String = "drawerUp";
  66. public static const DRAWER_DOWN:String = "drawerDown";
  67. public static const TRASH_UP:String = "trashUp";
  68. public static const TRASH_DOWN:String = "trashDown";
  69. public static const TRANSITION_INITIAL:String = "transitionInitial";
  70. public static const TRANSITION_COMPLETE:String = "transitionComplete";
  71. protected static const ZOOM:Number = 1.73;
  72. protected static const INCREMENT:Number = 0.1;
  73. protected static const INDICES:Vector.<uint> =
  74. Vector.<uint> ([ 0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7]);
  75. protected static const SCREEN_REGION:Vector.<Number> =
  76. Vector.<Number> ([
  77. // X, Y, Z,
  78. -1.0, -1.0, 0.001,
  79. 1.0, -1.0, 0.001,
  80. 1.0, 1.0, 0.001,
  81. -1.0, 1.0, 0.001
  82. ]);
  83. protected static const FLIPPED:Vector.<Number> =
  84. Vector.<Number> ([
  85. // X, Y, Z,
  86. 1.0, -1.0, 0.001,
  87. -1.0, -1.0, 0.001,
  88. -1.0, 1.0, 0.001,
  89. 1.0, 1.0, 0.001
  90. ]);
  91. protected static const LEFT_REGION:Vector.<Number> =
  92. Vector.<Number> ([
  93. // X, Y, Z,
  94. -3.0, -1.0, 0.0,
  95. -1.0, -1.0, 0.0,
  96. -1.0, 1.0, 0.0,
  97. -3.0, 1.0, 0.0
  98. ]);
  99. protected static const RIGHT_REGION:Vector.<Number> =
  100. Vector.<Number> ([
  101. // X, Y, Z,
  102. 1.0, -1.0, 0.0,
  103. 3.0, -1.0, 0.0,
  104. 3.0, 1.0, 0.0,
  105. 1.0, 1.0, 0.0
  106. ]);
  107. protected static const BELOW_REGION:Vector.<Number> =
  108. Vector.<Number> ([
  109. // X, Y, Z,
  110. -1.0, -3.0, 0.0,
  111. 1.0, -3.0, 0.0,
  112. 1.0, -1.0, 0.0,
  113. -1.0, -1.0, 0.0
  114. ]);
  115. protected static const SINGULARITY:Vector.<Number> =
  116. Vector.<Number> ([
  117. // X, Y, Z,
  118. 1.0, -3.0, -0.01,
  119. -1.0, -3.0, -0.01,
  120. 0.0, -1.0, -0.01,
  121. 0.0, -1.0, -0.01
  122. ]);
  123. protected static const LEFT_SCREEN_REGION:Vector.<Number> =
  124. Vector.<Number> ([
  125. // X, Y, Z,
  126. -3.2, -0.5, 2.0,
  127. -1.2, -0.5, 2.0,
  128. -1.2, 0.5, 2.0,
  129. -3.2, 0.5, 2.0
  130. ]);
  131. protected static const RIGHT_SCREEN_REGION:Vector.<Number> =
  132. Vector.<Number> ([
  133. // X, Y, Z,
  134. 1.0, -0.5, 2.0,
  135. 3.0, -0.5, 2.0,
  136. 3.0, 0.5, 2.0,
  137. 1.0, 0.5, 2.0
  138. ]);
  139. protected static const LEFT_CUBE:Vector.<Number> =
  140. Vector.<Number> ([
  141. // X, Y, Z,
  142. -1.5, -1.0, 1.0,
  143. -1.0, -1.0, 0.0,
  144. -1.0, 1.0, 0.0,
  145. -1.5, 1.0, 1.0
  146. ]);
  147. protected static const RIGHT_CUBE:Vector.<Number> =
  148. Vector.<Number> ([
  149. // X, Y, Z,
  150. 1.0, -1.0, 0.0,
  151. 1.5, -1.0, 1.0,
  152. 1.5, 1.0, 1.0,
  153. 1.0, 1.0, 0.0
  154. ]);
  155. protected static const LEFT_EDGE:Vector.<Number> =
  156. Vector.<Number> ([
  157. // X, Y, Z,
  158. -1.0, -1.0, 0.0,
  159. -1.0, -1.0, 2.0,
  160. -1.0, 1.0, 2.0,
  161. -1.0, 1.0, 0.0
  162. ]);
  163. protected static const RIGHT_EDGE:Vector.<Number> =
  164. Vector.<Number> ([
  165. // X, Y, Z,
  166. 1.0, -1.0, 2.0,
  167. 1.0, -1.0, 0.0,
  168. 1.0, 1.0, 0.0,
  169. 1.0, 1.0, 2.0
  170. ]);
  171. protected static const N:int = 6;
  172. protected static var _indexBuffer:IndexBuffer3D;
  173. protected var _uvtVertices:VertexBuffer3D;
  174. protected var _startKeyVertices:VertexBuffer3D;
  175. protected var _finishKeyVertices:VertexBuffer3D;
  176. protected var _pageTransitionVertexShader:AGALMiniAssembler = new AGALMiniAssembler();
  177. protected var _pageTransitionFragmentShader:AGALMiniAssembler = new AGALMiniAssembler();
  178. protected var _pageTransitionShaderProgram:Program3D;
  179. protected var _finalMatrix:Matrix3D = new Matrix3D();
  180. protected var _projectionMatrix:PerspectiveMatrix3D = new PerspectiveMatrix3D();
  181. protected var _count:Number = 0.0;
  182. protected var _transition:String = SLIDE_UP;
  183. protected var _page:int = -1;
  184. protected var _uiPages:UIPages = null;
  185. protected var _sourceBitmapData:BitmapData;
  186. protected var _destinationBitmapData:BitmapData;
  187. protected var _transitionSourceTexture:Texture;
  188. protected var _transitionDestinationTexture:Texture;
  189. protected function uvt(scaleX:Number, scaleY:Number, reverse:Boolean = false):Vector.<Number> {
  190. if (reverse) {
  191. return Vector.<Number> ([
  192. // U, V,
  193. 0.0, scaleY, 1.0,
  194. scaleX, scaleY, 1.0,
  195. scaleX, 0.0, 1.0,
  196. 0.0, 0.0, 1.0,
  197. 0.0, scaleY, 0.0,
  198. scaleX, scaleY, 0.0,
  199. scaleX, 0.0, 0.0,
  200. 0.0, 0.0, 0.0
  201. ]);
  202. }
  203. else {
  204. return Vector.<Number> ([
  205. // U, V,
  206. 0.0, scaleY, 0.0,
  207. scaleX, scaleY, 0.0,
  208. scaleX, 0.0, 0.0,
  209. 0.0, 0.0, 0.0,
  210. 0.0, scaleY, 1.0,
  211. scaleX, scaleY, 1.0,
  212. scaleX, 0.0, 1.0,
  213. 0.0, 0.0, 1.0
  214. ]);
  215. }
  216. }
  217. public function PageTransitions() {
  218. initialise();
  219. }
  220. public function initialise():void {
  221. _startKeyVertices = _context3D.createVertexBuffer(8, 3);
  222. _finishKeyVertices = _context3D.createVertexBuffer(8, 3);
  223. _uvtVertices = _context3D.createVertexBuffer(8, 3);
  224. _indexBuffer = _context3D.createIndexBuffer( INDICES.length );
  225. _indexBuffer.uploadFromVector(INDICES, 0, INDICES.length );
  226. _projectionMatrix.perspectiveFieldOfViewLH(60.0*Math.PI/180, 1.0, 0.1, 1000.0);
  227. _context3D.setProgramConstantsFromMatrix(Context3DProgramType.VERTEX, 0, _finalMatrix, true); //vc0 - vc3
  228. _pageTransitionVertexShader.assemble( Context3DProgramType.VERTEX,
  229. "mul vt0, va0, vc4.xxxx \n" + // t * start position
  230. "mul vt1, va1, vc4.yyyy \n" + // (1-t) * end position
  231. "add vt2, vt0, vt1 \n" + // add
  232. "m44 op, vt2, vc0 \n" + // transform and output
  233. "mov v0, va2 \n" // interpolate UVT
  234. );
  235. _pageTransitionFragmentShader.assemble( Context3DProgramType.FRAGMENT,
  236. "tex ft0, v0, fs0 <2d,linear,nomip> \n" + // output texture
  237. "sub ft2.x, fc0.w, v0.z \n" +
  238. "mul ft0, ft0, ft2.xxxx \n" + // if t=1, texture
  239. "tex ft1, v0, fs1 <2d,linear,nomip> \n" + // output texture
  240. "mul ft1, ft1, v0.zzzz \n" +
  241. "add oc, ft0, ft1 \n"
  242. );
  243. _pageTransitionShaderProgram = _context3D.createProgram();
  244. _pageTransitionShaderProgram.upload( _pageTransitionVertexShader.agalcode, _pageTransitionFragmentShader.agalcode);
  245. }
  246. override public function contextResumed(running:Boolean):void {
  247. _pageTransitionShaderProgram = _context3D.createProgram();
  248. _pageTransitionShaderProgram.upload( _pageTransitionVertexShader.agalcode, _pageTransitionFragmentShader.agalcode);
  249. _startKeyVertices = _context3D.createVertexBuffer(8, 3);
  250. _finishKeyVertices = _context3D.createVertexBuffer(8, 3);
  251. _uvtVertices = _context3D.createVertexBuffer(8, 3);
  252. _indexBuffer = _context3D.createIndexBuffer( INDICES.length );
  253. _indexBuffer.uploadFromVector(INDICES, 0, INDICES.length );
  254. _transitionSourceTexture = _context3D.createTexture(_sourceBitmapData.width, _sourceBitmapData.height, Context3DTextureFormat.BGRA, false);
  255. _transitionSourceTexture.uploadFromBitmapData(_sourceBitmapData);
  256. _transitionDestinationTexture = _context3D.createTexture(_destinationBitmapData.width, _destinationBitmapData.height, Context3DTextureFormat.BGRA, false);
  257. _transitionDestinationTexture.uploadFromBitmapData(_destinationBitmapData);
  258. if (running) {
  259. setRegisters();
  260. onEnterFrame(this, onEnterFramePageTransition);
  261. }
  262. }
  263. protected function setRegisters():void {
  264. _context3D.setVertexBufferAt( 0, _startKeyVertices, 0, Context3DVertexBufferFormat.FLOAT_3 ); //va0
  265. _context3D.setVertexBufferAt( 1, _finishKeyVertices, 0, Context3DVertexBufferFormat.FLOAT_3 ); //va1
  266. _context3D.setVertexBufferAt( 2, _uvtVertices, 0, Context3DVertexBufferFormat.FLOAT_3 ); //va2
  267. _context3D.setTextureAt(0, _transitionSourceTexture); //fs0
  268. _context3D.setTextureAt(1, _transitionDestinationTexture); //fs1
  269. _context3D.setProgram(_pageTransitionShaderProgram);
  270. }
  271. protected function unSetRegisters():void {
  272. _context3D.setVertexBufferAt( 0, null ); //va0
  273. _context3D.setVertexBufferAt( 1, null ); //va1
  274. _context3D.setVertexBufferAt( 2, null ); //va2
  275. _context3D.setTextureAt(0, null); //fs0
  276. _context3D.setTextureAt(1, null); //fs1
  277. }
  278. override public function enable():void {
  279. setRegisters();
  280. }
  281. override public function disable():void {
  282. unSetRegisters();
  283. }
  284. protected function power2(value:Number):Number {
  285. return Math.pow(2, Math.ceil(Math.log(value)/Math.LN2));
  286. }
  287. public function pageTransitionTextures(page0:Sprite, page1:Sprite, reverse:Boolean = false):void {
  288. var width:Number = _screen.stage.stageWidth;
  289. var height:Number = _screen.stage.stageHeight;
  290. var widthP2:Number = power2(scale*width);
  291. var heightP2:Number = power2(scale*height);
  292. if (page0 && page1) {
  293. var sourceBitmapData:BitmapData = new BitmapData(widthP2, heightP2, false, 0x333333);
  294. var destinationBitmapData:BitmapData = new BitmapData(widthP2, heightP2, false, 0x333333);
  295. saveTexture(sourceBitmapData, page0, new Rectangle(0, 0, width, height));
  296. saveTexture(destinationBitmapData, page1, new Rectangle(0, 0, width, height));
  297. _transitionSourceTexture = _context3D.createTexture(sourceBitmapData.width, sourceBitmapData.height, Context3DTextureFormat.BGRA, false);
  298. _transitionSourceTexture.uploadFromBitmapData(sourceBitmapData);
  299. _transitionDestinationTexture = _context3D.createTexture(destinationBitmapData.width, destinationBitmapData.height, Context3DTextureFormat.BGRA, false);
  300. _transitionDestinationTexture.uploadFromBitmapData(destinationBitmapData);
  301. }
  302. _context3D.setTextureAt(0, _transitionSourceTexture); //fs0
  303. _context3D.setTextureAt(1, _transitionDestinationTexture); //fs1
  304. _uvtVertices.uploadFromVector(uvt(width/widthP2, height/heightP2, reverse), 0, 8);
  305. }
  306. public function pageTransition(nextPage:Sprite, thisPage:Sprite, transition:String, reverse:Boolean = false):void {
  307. _transition = transition;
  308. if (transition == SIMPLE) {
  309. _uiPages.goToPage(_page);
  310. _page = -1;
  311. _screen.dispatchEvent(new Event(TRANSITION_COMPLETE));
  312. return;
  313. }
  314. pageTransitionTextures(nextPage, thisPage, reverse);
  315. switch(transition) {
  316. case SLIDE_LEFT:
  317. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(LEFT_REGION), 0, 8);
  318. _finishKeyVertices.uploadFromVector(RIGHT_REGION.concat(SCREEN_REGION), 0, 8);
  319. break;
  320. case SLIDE_RIGHT:
  321. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(RIGHT_REGION), 0, 8);
  322. _finishKeyVertices.uploadFromVector(LEFT_REGION.concat(SCREEN_REGION), 0, 8);
  323. break;
  324. case SLIDE_DOWN:
  325. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(BELOW_REGION), 0, 8);
  326. _finishKeyVertices.uploadFromVector(SCREEN_REGION.concat(SCREEN_REGION), 0, 8);
  327. break;
  328. case SLIDE_UP:
  329. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(SCREEN_REGION), 0, 8);
  330. _finishKeyVertices.uploadFromVector(BELOW_REGION.concat(SCREEN_REGION), 0, 8);
  331. break;
  332. case SWAP_LEFT:
  333. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(LEFT_SCREEN_REGION), 0, 8);
  334. _finishKeyVertices.uploadFromVector(RIGHT_SCREEN_REGION.concat(SCREEN_REGION), 0, 8);
  335. break;
  336. case SWAP_RIGHT:
  337. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(RIGHT_SCREEN_REGION), 0, 8);
  338. _finishKeyVertices.uploadFromVector(LEFT_SCREEN_REGION.concat(SCREEN_REGION), 0, 8);
  339. break;
  340. case CUBE_RIGHT:
  341. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(RIGHT_CUBE), 0, 8);
  342. _finishKeyVertices.uploadFromVector(LEFT_CUBE.concat(SCREEN_REGION), 0, 8);
  343. break;
  344. case CUBE_LEFT:
  345. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(LEFT_CUBE), 0, 8);
  346. _finishKeyVertices.uploadFromVector(RIGHT_CUBE.concat(SCREEN_REGION), 0, 8);
  347. break;
  348. case DOOR_RIGHT:
  349. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(RIGHT_EDGE), 0, 8);
  350. _finishKeyVertices.uploadFromVector(LEFT_EDGE.concat(SCREEN_REGION), 0, 8);
  351. break;
  352. case DOOR_LEFT:
  353. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(LEFT_EDGE), 0, 8);
  354. _finishKeyVertices.uploadFromVector(RIGHT_EDGE.concat(SCREEN_REGION), 0, 8);
  355. break;
  356. case TRASH_DOWN:
  357. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(SINGULARITY), 0, 8);
  358. _finishKeyVertices.uploadFromVector(SCREEN_REGION.concat(SCREEN_REGION), 0, 8);
  359. break;
  360. case TRASH_UP:
  361. _startKeyVertices.uploadFromVector(SCREEN_REGION.concat(SCREEN_REGION), 0, 8);
  362. _finishKeyVertices.uploadFromVector(SINGULARITY.concat(SCREEN_REGION), 0, 8);
  363. break;
  364. case FLIP_LEFT:
  365. case FLIP_RIGHT:
  366. _startKeyVertices.uploadFromVector(FLIPPED.concat(SCREEN_REGION), 0, 8);
  367. _finishKeyVertices.uploadFromVector(FLIPPED.concat(SCREEN_REGION), 0, 8);
  368. break;
  369. }
  370. _count = INCREMENT;
  371. setTransformation();
  372. UI.uiLayer.visible = false;
  373. activate(this);
  374. onEnterFrame(this, onEnterFramePageTransition);
  375. }
  376. public function opposite(transition:String = ""):String {
  377. var position:int;
  378. if (transition=="") {
  379. transition = _transition;
  380. }
  381. if ((position=transition.indexOf("Left"))>0) {
  382. return transition.substr(0,position)+"Right";
  383. }
  384. else if ((position=transition.indexOf("Right"))>0) {
  385. return transition.substr(0,position)+"Left";
  386. }
  387. else if ((position=transition.indexOf("Up"))>0) {
  388. return transition.substr(0,position)+"Down";
  389. }
  390. else if ((position=transition.indexOf("Down"))>0) {
  391. return transition.substr(0,position)+"Up";
  392. }
  393. return SLIDE_UP;
  394. }
  395. public function goBack(nextPage:Sprite = null, thisPage:Sprite = null):void {
  396. pageTransition(nextPage, thisPage, opposite(_transition), true);
  397. }
  398. public function goToPage(uiPages:UIPages, page:int):void {
  399. _uiPages = uiPages;
  400. _page = page;
  401. _screen.dispatchEvent(new Event(TRANSITION_INITIAL));
  402. }
  403. protected function setTransformation(rotation:Number = 0.0):void {
  404. _finalMatrix.identity();
  405. _finalMatrix.appendRotation(rotation, Vector3D.Y_AXIS);
  406. _finalMatrix.appendTranslation(0, 0, ZOOM);
  407. _finalMatrix.append(_projectionMatrix);
  408. _context3D.setProgramConstantsFromMatrix(Context3DProgramType.VERTEX, 0, _finalMatrix, true); //vc0 - vc3
  409. _context3D.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT, 0, Vector.<Number>([ 0.0, 0.0, 0.0, 1.0 ]) ); //fc0
  410. }
  411. protected function onEnterFramePageTransition(event:Event = null):void {
  412. _context3D.clear(0x33/0xff,0x33/0xff,0x33/0xff);
  413. var easedCount:Number = easing(_count);
  414. _context3D.setProgramConstantsFromVector(Context3DProgramType.VERTEX, 4, Vector.<Number>([ easedCount, (1.0 - easedCount), 0.0, 1.0 ]) ); //vc4
  415. if (_transition==FLIP_LEFT) {
  416. setTransformation(_count*180);
  417. }
  418. else if (_transition==FLIP_RIGHT) {
  419. setTransformation(-_count*180);
  420. }
  421. _context3D.drawTriangles(_indexBuffer);
  422. _context3D.present();
  423. _count+=INCREMENT;
  424. if (_count>1.0) {
  425. completePageTransition();
  426. }
  427. }
  428. protected function completePageTransition():void {
  429. if (_uiPages && _page>=0) {
  430. _uiPages.goToPage(_page);
  431. _page = -1;
  432. }
  433. UI.uiLayer.visible = true;
  434. deactivate(this);
  435. _screen.dispatchEvent(new Event(TRANSITION_COMPLETE));
  436. }
  437. override public function destructor():void {
  438. super.destructor();
  439. _sourceBitmapData.dispose();
  440. _destinationBitmapData.dispose();
  441. _transitionSourceTexture.dispose();
  442. _transitionDestinationTexture.dispose();
  443. }
  444. }
  445. }