We Desperately Need Vector Drawing in 3D Space !

Software: Away3D 4.x

Concept Z, Sr. Member
Posted: 21 July 2011 03:37 AM   Total Posts: 124

It’s so easy to draw vector line or shape in OpenGL, but it’s so hard to achieve in Stage3D!

I don’t know why adobe is so slow to support such basic and nice things in Stage3D!

Anyone has the same request ? please keep requiring!

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Avatar
theMightyAtom, Sr. Member
Posted: 21 July 2011 10:14 AM   Total Posts: 669   [ # 1 ]

I think what your looking for is already there.
Check out LineSegment.as

There’s an example here, but requires incubator player.
http://not-so-stupid.com/line-experiment-in-away3d-4/

Syntax is like this:

var seg:LineSegment = new LineSegment(new Vector3D(), new Vector3D(500500500), 0xFF00000x0000FF20);
   var 
segSet:SegmentSet = new SegmentSet();
   
segSet.addSegment(seg);
   
_view.scene.addChild(segSet); 

I’ve just tested in the latest branch and it’s working smile
From there you can draw whatever you like. Curves are merely a collection of straight lines. Note that you can’t add a lineSegment directly to the scene even though it is a primitive(!?). It need to be in a SegementSet.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X