Package | away3d.textures |
Class | public class WebcamTexture |
Inheritance | WebcamTexture BitmapTexture Texture2DBase TextureProxyBase NamedAssetBase flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
assetFullPath : Array [read-only] | NamedAssetBase | ||
assetNamespace : String [read-only] | NamedAssetBase | ||
assetType : String [read-only] | TextureProxyBase | ||
autoUpdate : Boolean
Defines whether the texture should automatically update while camera stream is
playing. | WebcamTexture | ||
bitmapData : BitmapData | BitmapTexture | ||
camera : Camera [read-only]
The Camera instance (webcam) used by this texture. | WebcamTexture | ||
height : int [read-only] | TextureProxyBase | ||
name : String | NamedAssetBase | ||
originalName : String [read-only]
The original name used for this asset in the resource (e.g. | NamedAssetBase | ||
smoothing : Boolean
Toggles smoothing on the texture as it's drawn (and potentially scaled)
from the video stream to a BitmapData object. | WebcamTexture | ||
width : int [read-only] | TextureProxyBase |
Method | Defined By | ||
---|---|---|---|
WebcamTexture(cameraWidth:uint = 320, cameraHeight:uint = 240, materialSize:uint = 256, autoStart:Boolean = true, camera:Camera = null, smoothing:Boolean = true) | WebcamTexture | ||
assetPathEquals(name:String, ns:String):Boolean | NamedAssetBase | ||
dispose():void [override]
Clean up used resources. | WebcamTexture | ||
flipHorizontal():void
Flips the image from the webcam horizontally
| WebcamTexture | ||
flipVertical():void
Flips the image from the webcam vertically
| WebcamTexture | ||
getTextureForStage3D(stage3DProxy:Stage3DProxy):TextureBase | TextureProxyBase | ||
invalidateContent():void | TextureProxyBase | ||
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void | NamedAssetBase | ||
start():void
Start subscribing to camera stream. | WebcamTexture | ||
stop():void
Detaches from the camera stream. | WebcamTexture | ||
update():void
Draws the video and updates the bitmap texture
If autoUpdate is false and this function is not called the bitmap texture will not update!
| WebcamTexture |
Method | Defined By | ||
---|---|---|---|
createTexture(context:Context3D):TextureBase [override] | Texture2DBase | ||
invalidateSize():void | TextureProxyBase | ||
setSize(width:int, height:int):void | TextureProxyBase | ||
uploadContent(texture:TextureBase):void [override] | WebcamTexture |
autoUpdate | property |
autoUpdate:Boolean
Defines whether the texture should automatically update while camera stream is playing. If false, the update() method must be invoked for the texture to redraw.
public function get autoUpdate():Boolean
public function set autoUpdate(value:Boolean):void
camera | property |
camera:Camera
[read-only] The Camera instance (webcam) used by this texture.
public function get camera():Camera
smoothing | property |
smoothing:Boolean
Toggles smoothing on the texture as it's drawn (and potentially scaled) from the video stream to a BitmapData object.
public function get smoothing():Boolean
public function set smoothing(value:Boolean):void
WebcamTexture | () | Constructor |
public function WebcamTexture(cameraWidth:uint = 320, cameraHeight:uint = 240, materialSize:uint = 256, autoStart:Boolean = true, camera:Camera = null, smoothing:Boolean = true)
cameraWidth:uint (default = 320 )
| |
cameraHeight:uint (default = 240 )
| |
materialSize:uint (default = 256 )
| |
autoStart:Boolean (default = true )
| |
camera:Camera (default = null )
| |
smoothing:Boolean (default = true )
|
dispose | () | method |
override public function dispose():void
Clean up used resources.
flipHorizontal | () | method |
public function flipHorizontal():void
Flips the image from the webcam horizontally
flipVertical | () | method |
public function flipVertical():void
Flips the image from the webcam vertically
start | () | method |
public function start():void
Start subscribing to camera stream. For the texture to update the update() method must be repeatedly invoked, or autoUpdate set to true.
stop | () | method |
public function stop():void
Detaches from the camera stream.
update | () | method |
public function update():void
Draws the video and updates the bitmap texture If autoUpdate is false and this function is not called the bitmap texture will not update!
uploadContent | () | method |
override protected function uploadContent(texture:TextureBase):void
Parameters
texture:TextureBase |