Hi Kevin, I think with all the craziness going on (Molehill etc), the "old" examples may have been overlooked. If I were you I would just use the older version of Away3D for a time being, such as 3.5. There haven't been any amazing speed increases reported, so using 3.6 might not yield much of an advantage. And, when the examples are updated, or the bugs/migration to 3.6 all ironed out, it shouldn't be too hard to switch just the few lines that used to use Number3D.
Also, if you are a newcomer from PV3D, I think you'll get a faster grasp of the engine overall, since the Number3D sort of operates in the background and you can overlook it, while you get up to full speed with Away3D :) Hope it helps any, -Pete On Fri, Nov 5, 2010 at 1:18 PM, KevinBurke <[email protected]> wrote: > Hi, > Thank you for taking the time to respond. My question may not have > been clear because I do not think the suggestion helps very much. I am > having this problem in more places than just the book's working files. > Some better questions might be 'What are the methods with Vector3D for > adding two Vectors as you would with Number 3D in this code?': > p2.add(p2, p1); > > The same with the clone method in this code. How would this operation > be performed with Vector3D? > p1.clone(p2); > > Finally, since the LineSegment class only accepts 'Vertex' for it's > start and end properties, how would I change this code so it can pass > a Vector3D? > seg = new LineSegment(); > seg.start = p1; > seg.end = p2; > _view.scene.addChild(seg); > > Now, on to the second part of my question- why do the 3.6 example > files for Flex appear to be using Away3D 3.5's classes which use > Number3D? As showed with the screen shot in my original post, they are > almost all broken. Perhaps I have set something up wrong? Could > someone please verify? > > Thank you, > Kevin > > > On Nov 5, 3:26 am, Michael Iv <[email protected]> wrote: > > Away3d 3.6 replaces all the math classes to Flash Player natives . > > MatrixAway3D--> Matrix3D , Number3d----->Vector3D .If you are good on 3d > > math you will have no pain to convert these examples and if you are not > ,as > > for beginner I would suggest you may be to revert to Away3D 3.5 version > and > > learn the basics with the book. > > > > > > > > On Fri, Nov 5, 2010 at 2:37 AM, KevinBurke <[email protected]> > wrote: > > > Hi, > > > I'm new to Away3D and I've downloaded Away 3.6, the Flex 3.6 examples, > > > as well as the working files for the Friends of Ed book 'The Essential > > > Guide to 3D in Flash.' Both of the example class collections are > > > almost unusable because of the many errors from Number3D to Vector3D > > > and MatrixAway3D to Matrix3D. The book was written for Away3D 3.5. The > > > Flex class examples for 3.6 seem like they should work with 3.6 but > > > don't because of the changes (see image) > > >http://www.kevinburkeportfolio.com/screenshot.png > > > > > Could someone please advise on how to get this straight? It has really > > > held back my diving into this exciting Flash 3D engine. Thank you! > > > > > Here's a more specific example from the book: > > > Description Resource Path Location Type > > > 1067: Implicit coercion of a value of type flash.geom:Vector3D to an > > > unrelated type away3d.core.base:Vertex. line 26 > > > 1067: Implicit coercion of a value of type flash.geom:Vector3D to an > > > unrelated type away3d.core.base:Vertex. line 27 > > > 1137: Incorrect number of arguments. Expected no more than 0. line 29 > > > 1137: Incorrect number of arguments. Expected no more than 1. line 24 > > > > > package > > > { > > > import away3d.core.math.*; > > > import away3d.primitives.*; > > > import flash3dbook.ch04.*; > > > [SWF(width="800", height="600")] > > > public class LinesInSpaceWithLineSegment extends Chapter04SampleBase > > > { > > > public function LinesInSpaceWithLineSegment () > > > { > > > super(); > > > } > > > protected override function _createScene() : void > > > { > > > var i : int, p1 : Vector3D, p2 : Vector3D, seg : LineSegment; > > > p1 = new Vector3D(); > > > p2 = new Vector3D(); > > > for (i=0; i < 500; i++) { > > > p2.x = (Math.random()-0.5) * 200; > > > p2.y = (Math.random()-0.5) * 200; > > > p2.z = (Math.random()-0.5) * 200; > > > *error* p2.add(p2, p1); > > > seg = new LineSegment(); > > > *error* seg.start = p1; > > > *error* seg.end = p2; > > > _view.scene.addChild(seg); > > > *error* p1.clone(p2); > > > } > > > } > > > } > > > > -- > > Michael Ivanov ,Programmer > > Neurotech Solutions Ltd. > > Flex|Air > |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.nethttp:// > www.meetup.com/GO3D-Games-Opensource-3D/ > > Tel:054-4962254 > > [email protected] > > [email protected] -- ___________________ Actionscript 3.0 Flash 3D Graphics Engine HTTP://AWAY3D.COM
