Packageaway3d.textures
Classpublic class WebcamTexture
InheritanceWebcamTexture Inheritance BitmapTexture Inheritance Texture2DBase Inheritance TextureProxyBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only]
TextureProxyBase
  autoUpdate : Boolean
Defines whether the texture should automatically update while camera stream is playing.
WebcamTexture
 InheritedbitmapData : BitmapData
BitmapTexture
  camera : Camera
[read-only] The Camera instance (webcam) used by this texture.
WebcamTexture
 Inheritedformat : String
[read-only]
TextureProxyBase
 InheritedhasMipMaps : Boolean
[read-only]
TextureProxyBase
 Inheritedheight : int
[read-only]
TextureProxyBase
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : 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
 Inheritedwidth : int
[read-only]
TextureProxyBase
Protected Properties
 PropertyDefined By
 Inherited_dirty : Vector.<Context3D>
TextureProxyBase
 Inherited_format : String = bgra
TextureProxyBase
 Inherited_hasMipmaps : Boolean = true
TextureProxyBase
 Inherited_height : int
TextureProxyBase
 Inherited_textures : Vector.<TextureBase>
TextureProxyBase
 Inherited_width : int
TextureProxyBase
Public Methods
 MethodDefined By
  
WebcamTexture(cameraWidth:uint = 320, cameraHeight:uint = 240, materialSize:uint = 256, autoStart:Boolean = true, camera:Camera = null, smoothing:Boolean = true)
WebcamTexture
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
  
dispose():void
[override] Clean up used resources.
WebcamTexture
  
Flips the image from the webcam horizontally
WebcamTexture
  
Flips the image from the webcam vertically
WebcamTexture
 Inherited
getTextureForStage3D(stage3DProxy:Stage3DProxy):TextureBase
TextureProxyBase
 Inherited
TextureProxyBase
 Inherited
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
Protected Methods
 MethodDefined By
 Inherited
createTexture(context:Context3D):TextureBase
[override]
Texture2DBase
 Inherited
TextureProxyBase
 Inherited
setSize(width:int, height:int):void
TextureProxyBase
  
uploadContent(texture:TextureBase):void
[override]
WebcamTexture
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
autoUpdateproperty
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.


Implementation
    public function get autoUpdate():Boolean
    public function set autoUpdate(value:Boolean):void
cameraproperty 
camera:Camera  [read-only]

The Camera instance (webcam) used by this texture.


Implementation
    public function get camera():Camera
smoothingproperty 
smoothing:Boolean

Toggles smoothing on the texture as it's drawn (and potentially scaled) from the video stream to a BitmapData object.


Implementation
    public function get smoothing():Boolean
    public function set smoothing(value:Boolean):void
Constructor Detail
WebcamTexture()Constructor
public function WebcamTexture(cameraWidth:uint = 320, cameraHeight:uint = 240, materialSize:uint = 256, autoStart:Boolean = true, camera:Camera = null, smoothing:Boolean = true)



Parameters
cameraWidth:uint (default = 320)
 
cameraHeight:uint (default = 240)
 
materialSize:uint (default = 256)
 
autoStart:Boolean (default = true)
 
camera:Camera (default = null)
 
smoothing:Boolean (default = true)
Method Detail
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