Packageaway3dlite.sprites
Classpublic class Sprite3D
InheritanceSprite3D Inheritance Object

Single billboard object (one that always faces the camera). Draws 2d objects inline with z-sorted triangles in a scene.



Public Properties
 PropertyDefined By
  alignmentType : String
Defines the way the sprite aligns its plane to face the viewer.
Sprite3D
  height : Number
Defines the height of the Sprite3D object.
Sprite3D
  material : Material
Determines the material used on the sprite.
Sprite3D
  position : Vector3D
[read-only] Returns a 3d vector representing the local position of the 3d sprite.
Sprite3D
  scale : Number
Defines the overall scale of the Sprite3D object.
Sprite3D
  vertices : Vector.<Number>
[read-only]
Sprite3D
  width : Number
Defines the width of the Sprite3D object.
Sprite3D
  x : Number = 0
Defines the x position of the Sprite3D object.
Sprite3D
  y : Number = 0
Defines the y position of the Sprite3D object.
Sprite3D
  z : Number = 0
Defines the z position of the Sprite3D object.
Sprite3D
Public Methods
 MethodDefined By
  
Sprite3D(material:Material = null, scale:Number = 1)
Creates a new Sprite3D object.
Sprite3D
  
clone(object:Sprite3D = null):Sprite3D
Duplicates the sprite3d properties to another Sprite3D object.
Sprite3D
Protected Methods
 MethodDefined By
  
Sprite3D
Property Detail
alignmentTypeproperty
public var alignmentType:String

Defines the way the sprite aligns its plane to face the viewer. Allowed values are "viewplane" or "viewpoint". Defaults to "viewplane".

See also

heightproperty 
height:Number

Defines the height of the Sprite3D object. Defaults to the material height if BitmapMaterial, otherwise 100.


Implementation
    public function get height():Number
    public function set height(value:Number):void
materialproperty 
material:Material

Determines the material used on the sprite.


Implementation
    public function get material():Material
    public function set material(value:Material):void
positionproperty 
position:Vector3D  [read-only]

Returns a 3d vector representing the local position of the 3d sprite.


Implementation
    public function get position():Vector3D
scaleproperty 
scale:Number

Defines the overall scale of the Sprite3D object. Defaults to 1.


Implementation
    public function get scale():Number
    public function set scale(value:Number):void
verticesproperty 
vertices:Vector.<Number>  [read-only]


Implementation
    public function get vertices():Vector.<Number>
widthproperty 
width:Number

Defines the width of the Sprite3D object. Defaults to the material width if BitmapMaterial, otherwise 100.


Implementation
    public function get width():Number
    public function set width(value:Number):void
xproperty 
public var x:Number = 0

Defines the x position of the Sprite3D object. Defaults to 0.

yproperty 
public var y:Number = 0

Defines the y position of the Sprite3D object. Defaults to 0.

zproperty 
public var z:Number = 0

Defines the z position of the Sprite3D object. Defaults to 0.

Constructor Detail
Sprite3D()Constructor
public function Sprite3D(material:Material = null, scale:Number = 1)

Creates a new Sprite3D object.

Parameters
material:Material (default = null) — Determines the material used on the faces in the Sprite3D object.
 
scale:Number (default = 1)
####INIT####
Method Detail
clone()method
public function clone(object:Sprite3D = null):Sprite3D

Duplicates the sprite3d properties to another Sprite3D object.

Parameters

object:Sprite3D (default = null) — [optional] The new object instance into which all properties are copied. The default is Sprite3D.

Returns
Sprite3D — The new object instance with duplicated properties applied.
updateVertices()method 
protected function updateVertices():void