[Papervision3D] Group
Jason Farrell
jason at useallfive.com
Thu Aug 7 12:15:45 PDT 2008
oh wow, I was over-thinking
On Aug 7, 2008, at 12:07 PM, xero wrote:
> yes,
> and it is VERY easy.
>
> you just need to dump your
> objects in to a blank DisplayObject3D
> (aka DO3D) here's a sample
>
> [code]
>
> public var theHolder:DisplayObject3D
> public var total:Number = 5;
>
> private function init3D():void {
> var i:Numer = 0;
> while(i++ < total){
> var thePlane:Plane = new Plane(...);
> thePlane.x = Math.Random();
> thePlane.y = Math.Random();
> thePlane.z = Math.Random();
> theHolder.addChild(thePlane);
> }
> addEventListner(Event.ENTER_FRAME, loop3D);
> }
> private function loop3D(e:Event):void {
> holder.rotationX++;
> holder.rotationY--;
> render.renderScene(camera, scene, viewport);
> }
>
> [/code]
>
> so, now you have 5 randomly place planes
> all inside one DO3D. so on the renderloop
> when you call holder.rotationX/Y it will rotaite
> all the planes.
>
> hope that gets you started!
>
> ____ ___
> \ \/ /___________ ____
> .\ // __ \_ __ \/ _ \
> ./ \ ___/ | | \( <_> )
> /___/\ \___ >__|---\____/
> | \_/ \/ |
> | xero harrison |
> | xero.nu at gmail.com |
> | http://xero.nu |
> | http://fontvir.us |
> | http://hexarray.nu |
> | http://0x000000.nu |
> | http://xero.owns.us |
> `---------------------'
>
> ---------- Forwarded message ----------
> From: Jason Farrell <jason at useallfive.com>
> To: papervision3d at osflash.org
> Date: Thu, 7 Aug 2008 11:53:15 -0700
> Subject: [Papervision3D] Group
> Is it possible to create some sort of group object, that you can add
> children (such as papervision objects) to, and then be able to move
> around that group, instead of all the objects individually?
>
> For example, I want to add 5 planes to a group and give each plane
> their own x location. Then I want do to something like group.x =
> 500, and it moves everything in the group 500 points. Just like
> you'd do with a movieclip that contains multiple sprites.
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080807/d804f47a/attachment.html
More information about the Papervision3D
mailing list