[Papervision3D] New revision: Material3D updated
c4rl054321 at gmail.com
Sun Dec 10 17:58:42 EST 2006
Loading external assets is a good idea. The as3 version would be able handle
that nicely. But on as2 I would prefer to load the bitmaps and swfs myself.
In any case, if handled well it could be a nice feature.
We might expand Material3D into a package where you could have different
materials, so external files could be one of them. But it'd also be cool to
have an effects package! : )
On 10/12/06, Jared Lukes <jared.lukes at gmail.com> wrote:
> Thanks Carlos! This is exactly what I was hoping would become of
> MovieClips as textures so I don't have to shove my first instance off the
> stage anywhere! Great work.
> Any thoughts on the possibility of not limiting the MovieClip textures to
> library items? What about external rasters and swfs?
> On 12/9/06, Carlos Ulloa < c4rl054321 at gmail.com> wrote:
> > Hello,
> > I've just committed to the svn a new revision.
> > The major change is that Material3D now it also accepts Bitmap and
> > MovieClip library ids as constructor argument and texture property.
> > In other words, if the provided texture is a String, it tries to
> > load/attach the asset from the library. You just don't care. But you know
> > where to find the assets if needed later.
> > A few examples:
> > // loadBitmap from library (libBitmap the linkage id of a Bitmap symbol
> > in the library)
> > var material:Material3D = new Material3D( "libBitmap" );
> > // attachMovie from library (libMovie the linkage id of a MovieClip
> > symbol in the library)
> > var material:Material3D = new Material3D( "libMovie" );
> > Nothing has changed if the texture is a MovieClip instance or a
> > BitmapData object. Previous code should work without any correction. This
> > code is very early and what it needs now is to be tested.
> > A few people have requested this feature. I think it makes materials
> > even more usable. Now you can provide bitmap ids from the library without
> > even importing the BitmapData class. And there's no need to instantiate a
> > MovieClip to use it as a texture.
> > If the same id is provided for more than one material, only one copy of
> > the asset will be attached. So if you use the same bitmap texture in three
> > materials, only one BitmapData will be created. It should be possible to
> > change the texture at any time, with automatic removal of generated
> > BitmapDatas and MovieClips if not needed anymore.
> > The texture property will now always reflect the original argument (i.e.
> > String, MovieClip or BitmapData). The new bitmap property is the BitmapData
> > that we are using for rendering, and the movie property only exists when
> > using MovieClips as textures.
> > There's also some error checking. Everything else works as usual.
> > Materials with animated MovieClips still need to be pushed into the scene
> > and have it's movieAnimated property set.
> > And the size of the first frame of an mc defines the size of that
> > texture. In other words, if your movie clip texture starts with an empty
> > frame or something small, you need to put a transparent rectangle of the
> > size you want.
> > Let me know what you think.
> > C4
> > // noventaynueve.com
> > // papervision3d.org
> > _______________________________________________
> > Papervision3D mailing list
> > Papervision3D at osflash.org
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Papervision3D