[Papervision3D] Lines3D, LineMaterial, and the new system example
Noah Aronsson-Brown
noah at rdai.com
Sat Dec 15 12:46:49 PST 2007
Awesome! Thanks Speedok!
This helps immensely. Now that I know there is an .addNeLine and
.addNewSegmentedLine method in Lines3D, well that's just swell!
Thanks ever so much for the source code.
Noah
speedok wrote:
>
> Hi Andy,
>
> Guess that was me who asked you how it works:)
>
> Had some spare time and made a basic example:
> http://www.flashbookmarks.com/demos/linetest/index.html
> http://www.flashbookmarks.com/demos/linetest/index.html
>
> Source:
> http://www.flashbookmarks.com/demos/linetest/srcview/index.html
> http://www.flashbookmarks.com/demos/linetest/srcview/
>
> Hope this helps.
>
>
>
> Andy Zupko wrote:
>>
>> Line3d was rebuilt for 2.0 - so you dont' need to try to make the 1.5
>> work
>> with it. Take a look in core.geom.Lines3D as it has changed a bit.
>>
>> Sorry if you wrote me before (i know someone did) and i didn't get back
>> to
>> you yet - things have been crazy lately.
>>
>>>
>>> Hello all,
>>>
>>> I'm not the greatest coder but I have managed to do some things with
>>> Pv3D
>>> and Andy Zupko's Line3D class in v1.5, however I am having so much
>>> trouble
>>> getting anything to work in v2.0 and I really don't understand how the
>>> new
>>> Line implementation works! If anyone could shed some light on this I
>>> would
>>> really appreciate it!
>>>
>>> Btw: To make things worse (or more complicated for myself anyway) I am
>>> now
>>> working in Flex beta 3 instead of the Flash IDE!
>>>
>>> Here is the source that is giving me no output:
>>>
>>> public function init():void
>>> {
>>> //set up stage ---
>>> stage.quality = StageQuality.LOW;
>>> stage.align = StageAlign.TOP_LEFT;
>>> stage.scaleMode = StageScaleMode.NO_SCALE;
>>>
>>> //set up viewport, add to stage
>>> viewport = new Viewport3D(0,0,true);
>>> viewport.opaqueBackground = 0;
>>> addChild(viewport)
>>>
>>> //set up renderer
>>> renderer = new BasicRenderEngine();
>>>
>>> //set up camera
>>> camera = new Camera3D();
>>> camera.z = -2000;
>>>
>>> //set up light
>>> //light = new PointLight3D(true);
>>>
>>> //set up scene
>>> myScene = new Scene3D();
>>>
>>> //listen to enter frame
>>> addEventListener(Event.ENTER_FRAME, onEnterFrame);
>>>
>>> buildLine();
>>>
>>> }
>>>
>>> public function buildLine():void
>>> {
>>> //set up lines array
>>> apoint = new Vertex3D(0,0,0);
>>> bpoint = new Vertex3D(100,100,0);
>>>
>>> nabContainer = new DisplayObject3D();
>>> //create line material
>>> nabLineMaterial = new LineMaterial(0xFFFFFF, 100);
>>>
>>> //create line
>>> nabLines = new Lines3D(nabLineMaterial)
>>> nabLine = new Line3D(nabLines, nabLineMaterial, 8, apoint, bpoint);
>>>
>>> //set up line container add line and add to scene
>>> nabContainer.addChild(nabLines);
>>> myScene.addChild(nabContainer);
>>> //scene.addChild(lineContainer);
>>>
>>> }
>>>
>>> private function onEnterFrame(e:Event):void
>>> {
>>> //do something like rotate
>>> //camera.lookAt(nabContainer);
>>> nabContainer.yaw(2);
>>> //render scene
>>> renderer.renderScene(myScene, camera, viewport);
>>> }
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Lines3D%2C-LineMaterial%2C-and-the-new-system.-tp14339844p14339844.html
>>> Sent from the Papervision3D mailing list archive at Nabble.com.
>>>
>>>
>>> _______________________________________________
>>> Papervision3D mailing list
>>> Papervision3D at osflash.org
>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>
>>
>>
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Lines3D%2C-LineMaterial%2C-and-the-new-system.-tp14339844p14354931.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list