1, set the spheregeometry to the skin of the pure color
Because only set the color, so if the stage does not add lights can not see the corner of the stereo effect.
The code is as follows |
Copy Code |
var material:colormaterial = new Colormaterial (0XFFFFFF);
Create a sphere on a three-dimensional stage var Sphere:mesh = new Mesh (new Spheregeometry (), material); _view3d.scene.addchild (Sphere);
|
2, set the texture skin for spheregeometry
By default, if you set a texture to the sphere, the picture is wrapped around the whole circle of the sphere.
code is as follows |
copy code |
[Embed ( Source= "Assets/beachball_diffuse.jpg")] public static var beachballdiffuse:class; var material:texturematerial = new Texturematerial (Cast.bitmaptexture (beachballdiffuse)); //Create a sphere in the three-dimensional stage var sphere:mesh = new Mesh (New Spheregeometry, MA Terial); _view3d.scene.addchild (sphere); |