Packageaway3d.materials
Classpublic class ShadingColorMaterial
InheritanceShadingColorMaterial Inheritance ColorMaterial Inheritance WireColorMaterial Inheritance WireframeMaterial Inheritance Material Inheritance flash.events.EventDispatcher

Color material with flat shading.

Public Properties
 PropertyDefined by
 Inheritedalpha : Number
Determines the alpha value of the material
WireColorMaterial
  ambient : uint
Defines a color value for ambient light.
ShadingColorMaterial
  cache : Boolean
Defines whether the resulting shaded color of the surface should be cached.
ShadingColorMaterial
  color : uint
Defines the color, A string, hex value or colorname representing the color of the material.
ShadingColorMaterial
 Inheriteddebug : Boolean
Toggles debug mode: textured triangles are drawn with white outlines, precision correction triangles are drawn with blue outlines.
ColorMaterial
  diffuse : uint
Defines a color value for diffuse light.
ShadingColorMaterial
 Inheritedid : int
Unique identifier
Material
  shininess : Number
Coefficient for shininess level
ShadingColorMaterial
  specular : uint
Defines a color value for specular light.
ShadingColorMaterial
 Inheritedthickness : Number
Determines the thickness value of the wire
WireframeMaterial
 Inheritedvisible : Boolean
Indicates whether the material is visible
WireColorMaterial
 InheritedwireAlpha : Number
Determines the alpha value of the wire
WireframeMaterial
 InheritedwireColor : uint
24 bit color value representing the wire color
WireframeMaterial
Protected Properties
 PropertyDefined by
 Inherited_alpha : Number
WireColorMaterial
 Inherited_color : uint
WireColorMaterial
 Inherited_debug : Boolean
ColorMaterial
 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.
WireframeMaterial
 Inherited_thickness : Number
WireframeMaterial
 Inherited_wireAlpha : Number
WireframeMaterial
 Inherited_wireColor : uint = 0x0
WireframeMaterial
Public Methods
 MethodDefined by
  
ShadingColorMaterial
(color:* = null, init:Object = null)
Creates a new ShadingColorMaterial object.
ShadingColorMaterial
 Inherited
addOnMaterialUpdate(listener:Function):void
Default method for adding a materialupdated event listener
Material
 Inherited
clone(material:Material = null):Material
Duplicates the material properties to another material object.
ColorMaterial
 Inherited
removeOnMaterialUpdate(listener:Function):void
Default method for removing a materialupdated event listener
Material
Protected Methods
 MethodDefined by
 Inherited
WireframeMaterial
Events
 EventSummaryDefined by
 Inherited Dispatched when the any visual aspect of the material changes.Material
Property detail
ambientproperty
public var ambient:uint

Defines a color value for ambient light.

cacheproperty 
public var cache:Boolean

Defines whether the resulting shaded color of the surface should be cached.

colorproperty 
color:uint  [read-write]

Defines the color, A string, hex value or colorname representing the color of the material.

Implementation
    public function get color():uint
    public function set color(value:uint):void
diffuseproperty 
public var diffuse:uint

Defines a color value for diffuse light.

shininessproperty 
public var shininess:Number

Coefficient for shininess level

specularproperty 
public var specular:uint

Defines a color value for specular light.

Constructor detail
ShadingColorMaterial()constructor
public function ShadingColorMaterial(color:* = null, init:Object = null)Parameters
color:* (default = null) — A string, hex value or colorname representing the color of the material.
 
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
Init Parameters
 ambient:Color (default = color)
 diffuse:Color (default = color)
 specular:Color (default = color)
 shininess:Number (default = 20)
 cache:Boolean (default = false)
Wiki link
Click to go to the wiki page for 'away3d.materials.ShadingColorMaterial'

Code examples

Comments