Packageaway3dlite.sprites
Classpublic class Sprite3D

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
[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  [read-write]

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  [read-write]

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  [read-write]

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  [read-only]

Implementation
    public function get vertices():Vector
widthproperty 
width:Number  [read-write]

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)Parameters
material:Material (default = null) — Determines the material used on the faces in the Sprite3D object.
 
scale:Number (default = 1)
Init Parameters
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
Wiki link
Click to go to the wiki page for 'away3dlite.sprites.Sprite3D'

Code examples

Comments