Package | away3d.materials.utils |
Class | public class SimpleShadow |
Property | Defined by | ||
---|---|---|---|
base : Number | SimpleShadow | ||
blur : int | 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 | 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
[read-write]Implementation
public function get base():Number
public function set base(value:Number):void
blur | property |
blur:int
[read-write]Implementation
public function get blur():int
public function set blur(value:int):void
color | property |
color:uint
[read-write]return the color set for the shadow generation
Implementation 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.
Implementation public function set object(value:Object3D):void
plane | property |
plane:Plane
[read-only]return the plane where the shadow is set as Material
Implementation public function get plane():Plane
range | property |
range:Number
[read-write]Implementation
public function get range():Number
public function set range(value:Number):void
source | property |
source:BitmapData
[read-only]return the generated shadow projection BitmapData;
Implementation public function get source():BitmapData
SimpleShadow | () | constructor |
public function SimpleShadow(object3d:Object3D, color:uint = 0xFF666666, blur:Number = 4, base:Number, range:Number)
Parameters
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 — [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 — [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
Parametersscene: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
Parameterscolor:Number |