Packageaway3d.materials
Classpublic class WhiteShadingBitmapMaterial
InheritanceWhiteShadingBitmapMaterial Inheritance CenterLightingMaterial Inheritance flash.events.EventDispatcher
ImplementsIUVMaterial

Bitmap material with flat white lighting

Public Properties
 PropertyDefined by
 Inheritedambient_brightness : Number = 1
Coefficient for ambient light level
CenterLightingMaterial
  bitmap : BitmapData
[read-only] Returns the bitmapData object being used as the material texture.
WhiteShadingBitmapMaterial
 Inheriteddiffuse_brightness : Number = 1
Coefficient for diffuse light level
CenterLightingMaterial
  height : Number
[read-only] Returns the height of the bitmapData being used as the material texture.
WhiteShadingBitmapMaterial
 Inheritedid : int
Unique identifier
CenterLightingMaterial
  repeat : Boolean
Determines if texture bitmap will tile in uv-space
WhiteShadingBitmapMaterial
 Inheritedshininess : Number = 20
Coefficient for shininess level
CenterLightingMaterial
  smooth : Boolean
Determines if texture bitmap is smoothed (bilinearly filtered) when drawn to screen
WhiteShadingBitmapMaterial
 Inheritedspecular_brightness : Number = 1
Coefficient for specular light level
CenterLightingMaterial
  visible : Boolean
[read-only] Indicates whether the material is visible
WhiteShadingBitmapMaterial
  width : Number
[read-only] Returns the width of the bitmapData being used as the material texture.
WhiteShadingBitmapMaterial
Protected Properties
 PropertyDefined by
 Inheritedini : Init
Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.
CenterLightingMaterial
Public Methods
 MethodDefined by
  
WhiteShadingBitmapMaterial
(bitmap:BitmapData, init:Object = null)
Creates a new WhiteShadingBitmapMaterial object.
WhiteShadingBitmapMaterial
 Inherited
addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
CenterLightingMaterial
  
clearFaces(source:Object3D = null, view:View3D = null):void
Clears facematerial value objects when bitmap requires updating
WhiteShadingBitmapMaterial
  
doubleStepTo(limit:int):void
WhiteShadingBitmapMaterial
  
getFaceMaterialVO(faceVO:FaceVO, source:Object3D = null, view:View3D = null):FaceMaterialVO
WhiteShadingBitmapMaterial
  
getPixel32(u:Number, v:Number):uint
Returns the argb value of the bitmapData pixel at the given u v coordinate.
WhiteShadingBitmapMaterial
  
invalidateFaces(source:Object3D = null, view:View3D = null):void
Invalidates facematerial value objects when texturemapping requires updating
WhiteShadingBitmapMaterial
 Inherited
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
CenterLightingMaterial
 Inherited
Sends data from the material coupled with data from the DrawTriangle primitive to the render session.
CenterLightingMaterial
 Inherited
updateMaterial(source:Object3D, view:View3D):void
Called once per render loop when material is visible.
CenterLightingMaterial
Protected Methods
 MethodDefined by
  
getMapping(tri:DrawTriangle):Matrix
Calculates the mapping matrix required to draw the triangle texture to screen.
WhiteShadingBitmapMaterial
  
getUVData(tri:DrawTriangle):Vector
WhiteShadingBitmapMaterial
Property detail
bitmapproperty
bitmap:BitmapData  [read-only]

Returns the bitmapData object being used as the material texture.

Implementation
    public function get bitmap():BitmapData
heightproperty 
height:Number  [read-only]

Returns the height of the bitmapData being used as the material texture.

Implementation
    public function get height():Number
repeatproperty 
public var repeat:Boolean

Determines if texture bitmap will tile in uv-space

smoothproperty 
public var smooth:Boolean

Determines if texture bitmap is smoothed (bilinearly filtered) when drawn to screen

visibleproperty 
visible:Boolean  [read-only]

Indicates whether the material is visible

Implementation
    public function get visible():Boolean
widthproperty 
width:Number  [read-only]

Returns the width of the bitmapData being used as the material texture.

Implementation
    public function get width():Number
Constructor detail
WhiteShadingBitmapMaterial()constructor
public function WhiteShadingBitmapMaterial(bitmap:BitmapData, init:Object = null)Parameters
bitmap:BitmapData — The bitmapData object to be used as the material's texture.
 
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
Init Parameters
 smooth:Boolean (default = false)
 repeat:Boolean (default = false)
Method detail
clearFaces()method
public override function clearFaces(source:Object3D = null, view:View3D = null):void

Clears facematerial value objects when bitmap requires updating

Parameters
source:Object3D (default = null) — [optional] The parent 3d object of the face.
 
view:View3D (default = null) — [optional] The view rendering the draw triangle.
doubleStepTo()method 
public function doubleStepTo(limit:int):void Parameters
limit:int
getFaceMaterialVO()method 
public function getFaceMaterialVO(faceVO:FaceVO, source:Object3D = null, view:View3D = null):FaceMaterialVO Parameters
faceVO:FaceVO
 
source:Object3D (default = null)
 
view:View3D (default = null)

Returns
FaceMaterialVO
getMapping()method 
protected function getMapping(tri:DrawTriangle):Matrix

Calculates the mapping matrix required to draw the triangle texture to screen.

Parameters
tri:DrawTriangle — The data object holding all information about the triangle to be drawn.

Returns
Matrix — The required matrix object.
getPixel32()method 
public function getPixel32(u:Number, v:Number):uint

Returns the argb value of the bitmapData pixel at the given u v coordinate.

Parameters
u:Number — The u (horizontal) texture coordinate.
 
v:Number — The v (verical) texture coordinate.

Returns
uint — The argb pixel value.
getUVData()method 
protected function getUVData(tri:DrawTriangle):Vector Parameters
tri:DrawTriangle

Returns
Vector
invalidateFaces()method 
public function invalidateFaces(source:Object3D = null, view:View3D = null):void

Invalidates facematerial value objects when texturemapping requires updating

Parameters
source:Object3D (default = null) — [optional] The parent 3d object of the face.
 
view:View3D (default = null) — [optional] The view rendering the draw triangle.
Wiki link
Click to go to the wiki page for 'away3d.materials.WhiteShadingBitmapMaterial'

Code examples

Comments