Simple example help

Software: Away3D 3.x

Avatar
Fabrice Closier, Administrator
Posted: 09 September 2012 08:32 PM   Total Posts: 1265   [ # 16 ]

The WireframeSphere and Spheregeometry are calculated same way (their vertices). But one extends SegmentSet (another entity dealing with straight lines), the other Geometry. The Mesh class expects a Geometry object, not a SegmentSet. Hence the error.

A Mesh is empty on construct. You simply had its content by adding a geometry and a material. In this case, you fill it with a predefined geometry representing a Sphere.

If you would addChild a new Mesh(new Geometry()); you will have no errors, but also nothing on screen because this geometry would be empty.

Just play arround with basic settings and add complexity to your tests once you are comfortable with their respective rules and logics.

Regarding using 3.x tutorials/examples, many concepts are exactly the same in 4.0, but indeed synthax and internals have changed. So if you are new to AS3 in general, this might add some rough bumps on your road…

Good luck!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X