> Yes, it is flawless! It works!!  (tested with f10 version).
yeepi :)

> I assume when as3 exports, different scaling and x/y offset is normal? 
unless you do not apply the scale, yes, the vertexes are not affected.

you can pass scale in constructor of the as3 output like:

new MyClass({scaling:10});

the phong looks indeed a bit weird, like if the normals are not averaged 
properly...

Fabrice

On Feb 9, 2010, at 10:49 PM, antoniolea wrote:

> Yes, it is flawless! It works!!  (tested with f10 version).
> 
> (before exporting, using the collada parser)
> http://www.antoniolea.com/temp/Bullet.swf
> 
> (using the as3 export)
> http://www.antoniolea.com/temp/BulletPhongMaterial.swf
> 
> I assume when as3 exports, different scaling and x/y offset is
> normal?  I can manually adjust that so it's not a problem.  Also,
> although I've applied the phong material, it looks like a flat
> material.. (I'm assuming I'm applying the material in a wrong
> manner?).
> 
> These are two methods I used:
> 
>               /**
>               * Using the as3 exporter
>               */
>               private function initBulletModelObj() : void
>               {
> 
>                       //create model as
>                       _bulletModel = new BulletModel();
> 
>                       // scale is off but I assume this is normal?
>                       _bulletModel.scale(.15);
>                       _bulletModel.y -= 30;
> 
>                       // add material
>                       _phongMaterial = new 
> PhongBitmapMaterial(Cast.bitmap(BulletUVW));
>                       var mesh : Mesh = _bulletModel.meshes[0];
>                       mesh = _bulletModel.meshes[0];
>                       mesh.material = _phongMaterial;
>                       _scene.addChild(_bulletModel);
> 
>                       addEventListener(Event.ENTER_FRAME, updateHandler, 
> false, 0, true);
>               }
> 
>               /**
>               * Using collada parser
>               */
>               private function initBulletObj() : void
>               {
> 
>                       var material : BitmapMaterial = new
> BitmapMaterial(Cast.bitmap(BulletUVW), { smooth: true });
>                       material.smooth = true;
>                       var collada : Collada = new 
> Collada({material:material});
>                       _model1 = collada.parseGeometry(BulletMesh) as 
> ObjectContainer3D;
>                       _scene.addChild(_model1);
> 
>                       addEventListener(Event.ENTER_FRAME, updateHandler, 
> false, 0, true);
>               }
> 
> 
> 
> 
> On Feb 9, 1:26 pm, Fabrice3D <[email protected]> wrote:
>> Let me know if it works propperly now
>> 
>> Fabrice
>> On Feb 9, 2010, at 10:12 PM, antoniolea wrote:
>> 
>>> Great, thank you soooooo much!
>> 
>>> On Feb 9, 12:53 pm, Fabrice3D <[email protected]> wrote:
>>>> svn f9 as3exporter updated,
>>>> let me know if it does the job now...
>> 
>>>> looking at the output i see the expected flaw
>> 
>>>> mesh.pushback = ref.pushback;
>>>> mesh.ownCanvas = ref.ownCanvas;
>>>> // here the following is missing...
>>>> aC[ref.container].addChild(mesh);
>> 
>>>> oList.push(mesh);
>>>> So basically internally the meshes were not addchilded to the class
>>>> as a result you attach an empty container to the scene
>> 
>>>>> I made some adjustments (package name, etc)
>> 
>>>> you can pass the packagename in constructor
>> 
>>>> Fabrice
>> 
>>>> On Feb 9, 2010, at 9:27 PM, antoniolea wrote:
>> 
>>>>> I have two questions..  First one is simple.
>>>>> What is the latest version.
>>>>> ASDoc says latest is v 2.3, yet when I use the away3D v3.4.2 (svn
>>>>> tag), the as3 exporter says version 2.2.  The constructor syntax is
>>>>> different (it has none).
>>>>> I had to use these lines:
>> 
>>>>> private someFunction ()
>>>>> {
>>>>> collada = new Collada();
>>>>> model1 = collada.parse(BuletDAE) as ObjectContainer3D;
>>>>> _as3exporter = new AS3Exporter();
>>>>> _as3exporter.addOnExportComplete(as3completeHandler);
>>>>> _as3exporter.export(_model1, "BulletModel", "");
>>>>> }
>> 
>>>>> private function as3completeHandler(e:ExporterEvent) : void
>>>>> {
>>>>> trace ("export completed");
>>>>> trace(_as3exporter.as3File);
>>>>> }
>> 
>>>>> Which exports just fine without a problem.
>>>>> I made some adjustments (package name, etc) and then saved it as
>>>>> BulletModel.as.  Then I compiled by creating the instance of
>>>>> BulletModel and replaced my model1.
>>>>> However, I don't see anything at all.  It compiles without an error
>>>>> but I don't see anything on the screen.  Model worked with the var
>>>>> model1.  Has anyone encountered this problem before?
>> 
>>>>> The path to the as3 exported class file is
>>>>> www.antoniolea.com/temp/BulletModel.as
>>>>> in case...  Thanks..

Reply via email to