Primitive3D Generates a Sphere 3D coordinates. The Sphere generated is a 3D object that can be rendered by Sandy's engine. You can play with the constructor's parameters to ajust it to your needs.
new Sphere()public function Sphere(radius:Number, quality:Number, mode:String)This is the constructor to call when you nedd to create a Sphere primitive.
This method will create a complete object with vertex, normales, texture coords and the faces. So it allows to have a custom 3D object easily
radius represents the radius of the Sphere, quality represent its quality (between 1 and 5), more quality is up, more faces there is
radius | Number |
quality | Number |
mode | String represent the two available modes to generates the faces. "tri" is necessary to have faces with 3 points, and "quad" for 4 points. |
public function getPrimitiveName(Void):StringgetPrimitiveName() returns the string "Sphere"
getPrimitiveName() in sandy.primitive.Primitive3D