Packageorg.papervision3d.core.components.as3.collections
Classpublic class MaterialsListItem

MaterialsListItem is used by the component to provided settings for materials to be used in a collada scene. The 3 Material types it supports are "File", "Bitmap" and "MovieClip".

When setting a material to "File", the external bitmap will be loaded at Design-time.

When setting a meterial to "MovieClip" or "Bitmap", a ColorMaterial (green) will be used to represent the material at design-time. At run-time, you should see your material used on the models.

One feature of the MaterialsListItem is that you can set the properties for a Bitmap or MovieClip and still setup up a temporary File location for Designtime.

  1. Create a new texture by hitting the "+" sign after you bring up the dialog.
  2. Define your properties for the Material
  3. Include not only the LinkageID, but a file location as well. The file location would point to a bitmap for designtime adjustments and rendering.
  4. When you're ready to compile, change the materialType back to it's intended type ("Bitmap" or "MovieClip").

This allows you to keep all of your settings while allowing a stand-in bitmap to be loaded at designtime.



Public Properties
 PropertyDefined by
  animated : Boolean = true
Boolean flag indicating whether or not the material should be redrawn in the render loop
MaterialsListItem
  interactive : Boolean = false
Boolean flag indicating whether or not the material is Interactive.
MaterialsListItem
  materialLocation : String = ""
If an external file is being used, this is the relative or absolute URL of the file
MaterialsListItem
  materialName : String = ""
The name given to a texture after importing into a 3D application (IE: 3D Studio Max, Maya, Blender).
MaterialsListItem
  materialType : String = "BitmapAssetMaterial"
There are 3 types of materials that can be used with this component:

  • BitmapAssetMaterial: BitmapAssetMaterial - a bitmap defined in the library
  • BitmapFileMaterial: BitmapFileMaterial - an external bitmap file
  • MovieMaterial: MovieMaterial - an external bitmap file
  • MovieAssetMaterial: MovieAssetMaterial - a MovieClip defined in the library

MaterialsListItem
  minimumRenderSize : Number = 2
If you're using a precision material, this is the setting for how small your triangles can be before the recursion loop will draw the face
MaterialsListItem
  precision : Number = 1
If you're using a precision material, this is the setting for how precise you want it to be.
MaterialsListItem
  precisionMaterial : Boolean = false
Boolean flag indicating whether or not the material is Interactive.
MaterialsListItem
  singleSided : Boolean = true
Boolean flag indicating whether or not the material should be drawn on both sides
MaterialsListItem
  smooth : Boolean = false
whether or not to apply smoothing to the bitmap fill on the triangles of this material
MaterialsListItem
  transparent : Boolean = true
If set to true, preserves the alpha information of the Material being used
MaterialsListItem
Property detail
animatedproperty
public var animated:Boolean = true

Boolean flag indicating whether or not the material should be redrawn in the render loop

interactiveproperty 
public var interactive:Boolean = false

Boolean flag indicating whether or not the material is Interactive. If set to true, the DisplayObject3D this material is assigned to will dispatch mouse events.

materialLocationproperty 
public var materialLocation:String = ""

If an external file is being used, this is the relative or absolute URL of the file

materialNameproperty 
public var materialName:String = ""

The name given to a texture after importing into a 3D application (IE: 3D Studio Max, Maya, Blender). The Collada object will use this as reference as to which material to use for texturing the objects that have been assigned the same material.

materialTypeproperty 
public var materialType:String = "BitmapAssetMaterial"

There are 3 types of materials that can be used with this component:

minimumRenderSizeproperty 
public var minimumRenderSize:Number = 2

If you're using a precision material, this is the setting for how small your triangles can be before the recursion loop will draw the face

precisionproperty 
public var precision:Number = 1

If you're using a precision material, this is the setting for how precise you want it to be. A setting of one is pretty accurate.

precisionMaterialproperty 
public var precisionMaterial:Boolean = false

Boolean flag indicating whether or not the material is Interactive. If set to true, the DisplayObject3D this material is assigned to will dispatch mouse events.

singleSidedproperty 
public var singleSided:Boolean = true

Boolean flag indicating whether or not the material should be drawn on both sides

smoothproperty 
public var smooth:Boolean = false

whether or not to apply smoothing to the bitmap fill on the triangles of this material

transparentproperty 
public var transparent:Boolean = true

If set to true, preserves the alpha information of the Material being used