Adding Geometry to the view

Software: Away3D 4.x

Qbrain, Member
Posted: 21 February 2012 01:59 PM   Total Posts: 92

Hey Everyone,

First of all nice work and grats on the release of the Beta!  I’m currently “porting” my project from alpha to beta, but I have one question.

in Alpha, you could just make a 3D primitive with a material attached to it. In beta, I already found that I need to use for example CapsuleGeometry() instead of the normal Capsule().

Could someone give me an example of how to create the same result (creating a capsule with a colormaterial over it) to the view?

That way, I can port all my objects to this. (the reason I ask this is that I couln’t figure how to add the geometry to the DisplayObject3D, and how to assign a Material to it.)

Thanks!

-Q

   

Avatar
Fabrice Closier, Administrator
Posted: 21 February 2012 04:28 PM   Total Posts: 1265   [ # 1 ]

Where you were doing new Sphere();
you do now new Mesh(new SphereGeometry(), someMaterial);

Mesh constructor was: (material, geometry);
In latest version it’s simply inverted: (geometry, material);

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X