Package | away3d.materials.utils |
Class | public class SimpleShadow |
Inheritance | SimpleShadow Object |
Property | Defined By | ||
---|---|---|---|
base : Number
Defines the base for the projection. | SimpleShadow | ||
blur : int
Defines the amount of blur for the projection
| SimpleShadow | ||
color : uint
return the color set for the shadow generation
| SimpleShadow | ||
object : Object3D [write-only]
Defines the object3d that will be used for the projection
Note that the update method is automaticaly called when set. | SimpleShadow | ||
plane : Plane [read-only]
return the plane where the shadow is set as Material
| SimpleShadow | ||
range : Number
Defines the range for the projection, the greater, the more alpha. | SimpleShadow | ||
source : BitmapData [read-only]
return the generated shadow projection BitmapData;
| SimpleShadow |
Method | Defined By | ||
---|---|---|---|
SimpleShadow(object3d:Object3D, color:uint = 0xFF666666, blur:Number = 4, base:Number, range:Number)
Creates a new SimpleShadow object. | SimpleShadow | ||
generates the shadow projection
| SimpleShadow | ||
positionPlane():void
adjusts the shadow position to the model according to pivot of the object
| SimpleShadow | ||
update(color:Number):void
generates the shadow projection
| SimpleShadow |
base | property |
base:Number
Defines the base for the projection. It defines the y position of the plane object By default the plane is located at the base of the object
public function get base():Number
public function set base(value:Number):void
blur | property |
blur:int
Defines the amount of blur for the projection
public function get blur():int
public function set blur(value:int):void
color | property |
color:uint
return the color set for the shadow generation
public function get color():uint
public function set color(value:uint):void
object | property |
object:Object3D
[write-only] Defines the object3d that will be used for the projection Note that the update method is automaticaly called when set. The handler is only to be used if the previous class object3d was nulled.
public function set object(value:Object3D):void
plane | property |
plane:Plane
[read-only] return the plane where the shadow is set as Material
public function get plane():Plane
range | property |
range:Number
Defines the range for the projection, the greater, the more alpha. when distance vertice to projection base is exceeded, no trace occurs.
public function get range():Number
public function set range(value:Number):void
source | property |
source:BitmapData
[read-only] return the generated shadow projection BitmapData;
public function get source():BitmapData
SimpleShadow | () | Constructor |
public function SimpleShadow(object3d:Object3D, color:uint = 0xFF666666, blur:Number = 4, base:Number, range:Number)
Creates a new SimpleShadow
object.
this class generate a projected shadow. Not suitable if shadows need to be updated at runtime in scenes with lots of polygons.
object3d:Object3D — Object3D: The object3d that will generate the shadow. Nested object3ds in ObjectContainer3Ds are also supported.
| |
color:uint (default = 0xFF666666 ) — [optional] uint: The color for the shadow. Note that the value must have alpha. Default value is 0xFF333333.
| |
blur:Number (default = 4 ) — [optional] Number: The blur value that defines the sharpness of the shadow. Default value is 4.
| |
base:Number (default = NaN ) — [optional] Number: The y value the shadow must be calculated from. Default value is the lowest y value of the object3d in the scene.
| |
range:Number (default = NaN ) — [optional] Number: The range value affects the blur and alpha according to distance. Default value is undefined.
|
apply | () | method |
public function apply(scene:Scene3D = null):BitmapData
generates the shadow projection
Parameters
scene:Scene3D (default = null )
|
BitmapData |
positionPlane | () | method |
public function positionPlane():void
adjusts the shadow position to the model according to pivot of the object
update | () | method |
public function update(color:Number):void
generates the shadow projection
Parameters
color:Number (default = NaN )
|