Skip to content

Commit

Permalink
Added support for alpha in VideoTexture. Fixes #54
Browse files Browse the repository at this point in the history
  • Loading branch information
richardolsson committed Jun 4, 2012
1 parent be02861 commit 1faeb25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/away3d/textures/VideoTexture.as
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package away3d.textures
import away3d.materials.utils.IVideoPlayer;
import away3d.materials.utils.SimpleVideoPlayer;
import away3d.tools.utils.TextureUtils;

import flash.display.BitmapData;
import flash.display.Sprite;
import flash.events.Event;
Expand Down Expand Up @@ -41,7 +41,7 @@ package away3d.textures
_autoPlay = autoPlay;

// Sets up the bitmap material
super(new BitmapData(_materialWidth, _materialHeight, false, 0x00ffffff));
super(new BitmapData(_materialWidth, _materialHeight, true, 0));

// if autoplay start video
if (autoPlay)
Expand All @@ -61,6 +61,7 @@ package away3d.textures
if (_player.playing && !_player.paused) {

bitmapData.lock();
bitmapData.fillRect(_clippingRect, 0);
bitmapData.draw(_player.container, null, null, null, _clippingRect);
bitmapData.unlock();
invalidateContent();
Expand Down

0 comments on commit 1faeb25

Please # to comment.