[Papervision3D] Revision 10

Carlos Ulloa c4rl054321 at gmail.com
Sun Dec 17 19:31:48 EST 2006


Hello,

I've just committed a new revision that incorporates the new package
structure, on both AS2 and AS3.

This is a major revision that has affected almost every class. Your existing
code won't work, but it shouldn't be difficult to update. In case of doubt,
read below and take a look at the updated examples.

Except for the Collada object, the AS3 version is now up to date and the AS2
examples have been ported to plain AS3.

As usual, it's all in http://svn1.cvsdude.com/osflash/papervision3d

Still on the todo list: the new AS2 and AS3 Collada objects and, quaternion
rotation for objects and cameras. I've also got to review the api docs and
take a look at ASDoc for the AS3 version.

Everything takes so much time, but I think we are finally getting there.

There's more than 200 people on this list, but don't be shy and feel free to
leave your opinions and suggestions.

C4
// noventaynueve.com
// papervision3d.org



----8<------------8<------------8<------------8<------------8<------------8<------------8<------------8<------------8<------------8<--------

Papervision3D Beta RC0 (Revision 10)

Scenes
Scene3D replaces Papervision3D class
And it's located in the scenes subpackage.

New MovieScene3D
This scene renders each object in a separate MovieClip or Sprite container,
so you can add events to them easily. You don't need to care about canvas
anymore, because it has been deprecated.

Scene canvas replaced by container
It's the MovieClip (AS2) or Sprite (AS3) you render into.

Object canvas also replaced by container
The object container property will be automatically created if needed (i.e.
in MovieScene). In AS2, from the container movieclip you can access the 3d
object with displayObject3D property. For example:

plane.graphics.onRollOver = function() { this.displayObject3D.scaleX = 2; };
// Don't Delegate

This only happens in AS2 because I don't know how to add a property to a
Sprite in AS3. Suggestions are very welcome.

The ability to render each object in its own container is key for
interactive 3d content. I think it's much easier to use now. Check out the
new HelloHotspot example.


Materials
New materials package

BitmapMaterial, a BitmapData object. This is the material to expand from
when creating bitmap effects.

MovieMaterial, copies the content of an existing movieclip instance.

BitmapAssetMaterial, loads a bitmap asset from the library. You can work
with library Bitmaps without even importing BitmapData.

MovieAssetMaterial, attaches a movieclip asset from the library.

Plus MaterialColor and MaterialWireframe, that take the usual colour and
alpha values.


Planes
Plane object constructor
Now accepts width and height arguments, so you can specify the size of the
plane. If no size is given, it uses the size of the material texture or the
default size if else.

Poster object
If you want more control over a texture-sized plane, use the new Poster
object. It works like the previous version of Plane (i.e. it maintains the
aspect ratio of the texture).

Other
Optimization
As discussed before, the triangle render code has been slightly optimized.
I've also taken all local vars creation outside the critical loops. No more var
x:Number inside a critical loop. Although I haven't seen much difference in
benchmarks, it has to be faster to use an existing register that to prepare
an unused one. Might also help with garbage collection.

New universal import block
That imports the whole thing:

// Import Papervision3D
import org.papervision3d.scenes.*;
import org.papervision3d.cameras.* ;
import org.papervision3d.objects.*;
import org.papervision3d.materials.*;

New examples
Updated with all this, plus the new HelloHotspot example. Also in AS3.

+++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20061218/4c5fc57b/attachment.htm


More information about the Papervision3D mailing list