Packageaway3d.materials
Classpublic class ShadingColorMaterial
InheritanceShadingColorMaterial Inheritance CenterLightingMaterial Inheritance flash.events.EventDispatcher

Color material with flat shading.

Public Properties
 PropertyDefined by
  alpha : Number
Defines an alpha value for the texture.
ShadingColorMaterial
  ambient : uint
Defines a color value for ambient light.
ShadingColorMaterial
 Inheritedambient_brightness : Number = 1
Coefficient for ambient light level
CenterLightingMaterial
  cache : Boolean
Defines whether the resulting shaded color of the surface should be cached.
ShadingColorMaterial
  diffuse : uint
Defines a color value for diffuse light.
ShadingColorMaterial
 Inheriteddiffuse_brightness : Number = 1
Coefficient for diffuse light level
CenterLightingMaterial
 Inheritedshininess : Number = 20
Coefficient for shininess level
CenterLightingMaterial
  specular : uint
Defines a color value for specular light.
ShadingColorMaterial
 Inheritedspecular_brightness : Number = 1
Coefficient for specular light level
CenterLightingMaterial
  visible : Boolean
[read-only] Indicates whether the material is visible
ShadingColorMaterial
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
  
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
CenterLightingMaterial
 Inherited
clearFaces(source:Object3D = null, view:View3D = null):void
CenterLightingMaterial
 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
  
renderTri(tri:DrawTriangle, session:AbstractRenderSession, kar:Number, kag:Number, kab:Number, kdr:Number, kdg:Number, kdb:Number, ksr:Number, ksg:Number, ksb:Number):void
ShadingColorMaterial
Property detail
alphaproperty
public var alpha:Number

Defines an alpha value for the texture.

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.

diffuseproperty 
public var diffuse:uint

Defines a color value for diffuse light.

specularproperty 
public var specular:uint

Defines a color value for specular light.

visibleproperty 
visible:Boolean  [read-only]

Indicates whether the material is visible

Implementation
    public function get visible():Boolean
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)
 alpha:Number (default = 1)
 cache:Boolean (default = false)
Method detail
renderTri()method
protected override function renderTri(tri:DrawTriangle, session:AbstractRenderSession, kar:Number, kag:Number, kab:Number, kdr:Number, kdg:Number, kdb:Number, ksr:Number, ksg:Number, ksb:Number):void

Parameters
tri:DrawTriangle
 
session:AbstractRenderSession
 
kar:Number
 
kag:Number
 
kab:Number
 
kdr:Number
 
kdg:Number
 
kdb:Number
 
ksr:Number
 
ksg:Number
 
ksb:Number
Wiki link
Click to go to the wiki page for 'away3d.materials.ShadingColorMaterial'

Code examples

Comments