How to draw lines in away4.0??

Software: Away3D 4.x

Welborne, Newbie
Posted: 08 November 2011 06:19 AM   Total Posts: 5

As you know ,in away3.6,Face class has the material property and moveTo as well as lineTo method to accomplish it .But now ,it seems that Face class does’t have these property or method.So,how to draw lines ??

   

sargon, Member
Posted: 08 November 2011 12:04 PM   Total Posts: 51   [ # 1 ]

to draw the line you use :LineSegment and SegmentSet.

var line:LineSegment = new LineSegment(v0:Vector3D, v1:Vector3D, color0:uint = 0x333333, color1:uint = 0x333333, thickness:Number = 1);
var lineSet:SegmentSet = new SegmentSet();
lineSet.addSegment(line);
scene.addChild(lineSet);

I hope this will help.

 

   

Welborne, Newbie
Posted: 09 November 2011 12:28 AM   Total Posts: 5   [ # 2 ]
sargon - 08 November 2011 12:04 PM

to draw the line you use :LineSegment and SegmentSet.

var line:LineSegment = new LineSegment(v0:Vector3D, v1:Vector3D, color0:uint = 0x333333, color1:uint = 0x333333, thickness:Number = 1);
var lineSet:SegmentSet = new SegmentSet();
lineSet.addSegment(line);
scene.addChild(lineSet);

I hope this will help.

Thanks,it does work.But,a little weird.

 

   

sargon, Member
Posted: 09 November 2011 04:56 PM   Total Posts: 51   [ # 3 ]

and what’s wierd in this :> ?

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X