In previous versions, I could define a material like this:



Collada.parse (MeshData, { material: new WireColorMaterial () } );



I found this to be extraordinarily useful.


I also liked iterating through the material library, because it meant that it would work, regardless of the origin of the object. I could load an object for its geometry, then force it to use the material I want it to display. This system applied to planes, cubes, and a wide variety of Collada files I loaded. I honestly have no idea what texture names they use, or whether they are standard. If I can't do either of these things, how could I apply a material when I create an instance, like in the example above (I want to embed my graphics, and not have them loaded), and how would I swap out the material after the object is created?




On Tue, 13 Jul 2010 23:51:17 -0700, Michael Iv <[email protected]> wrote:

Access the material by name it was given in 3d modeling program,This way it should work.I do this all the time and have no problem swapping materials.

On Tue, Jul 13, 2010 at 9:59 PM, Joshua Granick
<[email protected]>wrote:


Hi everyone!

Updated to the latest version of Away3D, and it's caused some trouble in
my projects.

1.) I can't rotate the scene anymore. Is there a quick work-around for
this, like putting everything in an ObjectContainer3D, and rotating that?

2.) I can't change the material for a loaded Collada at runtime anymore.
Here is an example of the method I was using:


for each (var materialData:MaterialData in instance.materialLibrary) {

       materialData.material = new WireColorMaterial ();

}


Please help! Thanks!



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/






--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Reply via email to