[Papervision3D] Has anyone built a 4 sided pyramid in PV3D
Brian Russel Davis
b at brickabracka.com
Thu Nov 15 11:24:56 PST 2007
Yah! That helped! :-)
On Nov 15, 2007, at 11:01 AM, xero wrote:
> yeah,
> i "try" not to include that stuff on code i post to the list...
> but the only custom component i used was canvas3D
>
> take a look at:
> http://the.fontvir.us/pv3d/spineSound/1.5/srcview/index.html
>
> in the source path on the right i included com.fontvirus.Canvas3D
>
> its basically just a flex UIcomponent (canvas) thats been
> extended for easly creating PV3D scenes in flex.
>
> you can see in the code i posted...
>
> i add my own "xx" namespace to the application
> for MXML access to my custom classes
>
> [code]
>
> <mx:Application
> xmlns:mx=" http://www.adobe.com/2006/mxml "
> xmlns:xx="com.fontvirus.*" />
>
> [/code]
>
> then after the script i create a canvas3D
> called paperCanvas, thats 100% by 100%,
> with a transparent background.
>
> [code]
>
> <xx:Canvas3D id="paperCanvas" backgroundAlpha="0" left="0"
> right="0" top="0" bottom="0"/>
>
> [/code]
>
> and in the code where i create the PV3D scene i point it to our canvas
>
> [code]
>
> scene = new Scene3D(paperCanvas.canvas);
>
> [/code]
>
> hope that helps!
> enjoy!
> ____ ___
> \ \/ /___________ ____
> .\ // __ \_ __ \/ _ \
> ./ \ ___/| | \( <_> )
> /___/\ \___ >__|---\____/
> | \_/ \/ |
> | xero harrison |
> | x at xero.nu |
> | http://xero.nu |
> | http://fontvir.us |
> | http://xero.owns.us |
> `---------------------'
>
> ---------- Forwarded message ----------
> From: Brian Russel Davis < b at brickabracka.com>
> To: papervision3d at osflash.org
> Date: Thu, 15 Nov 2007 10:46:05 -0800
> Subject: Re: [Papervision3D] Has anyone built a 4 sided pyramid in
> PV3D
> Yo. I like your sample, but I think it requires
> "com.fontvirus.*" ... but of course I don't have that.
>
>
> On Nov 14, 2007, at 6:05 AM, xero wrote:
>
>> sorry!
>> i forgot to post the code.
>> so here it is (very basic)
>> this is an mxml app made in flex
>>
>> [code]
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <mx:Application
>> xmlns:mx=" http://www.adobe.com/2006/mxml"
>> xmlns:xx="com.fontvirus.*"
>> layout="absolute"
>> frameRate="25"
>> pageTitle=" ://fontvir.us/ pv3d / sinewave"
>> backgroundGradientColors="[#000000, #2E2C2C]"
>> creationComplete="init3D()">
>> <mx:Script>
>> <![CDATA[/*
>> 00XXXX XXXX00
>> 00XXxx xxXX00
>> ee0000eeeeRR RReeee0000ee
>> xxXX00 00XXxx
>> XXXX00 00XXXX
>> eexxXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxee
>> 00XXXXeeee00XXXXXXXXXXXX00eeeeXXXX00
>> xxXXXXXXXX 00XXXXXXXXXXXX00 XXXXXXXXxx
>> XXXXXXXXXX 00XXXXXXXXXXXX00 XXXXXXXXXX
>> eeeeXXXXXXXXXXeeeeRRXXXXXXXXXXXXRReeeeXXXXXXXXXXeeee
>> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>> XXXX""""RRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXRR""""XXXX
>> XXXX 00XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX00 XXXX
>> XXXX 00XXXX""""""""""""""""""""""""XXXX00 XXXX
>> XXRR 00XXXX XXXX00 RRXX
>> eeXX 00xxxxRR000000ee ee000000RRxxxx00 XXee
>> xxXXXXXXxx xxXXXXXXxx
>> XXXXXXXXXX XXXXXXXXXX
>> _____ __ .__
>> _/ ____\___ _____/ |____ _|__|______ __ __ ______
>> \ __/ _ \ / \ __\ \/ / \_ __ \| | | ___/
>> | |( <_> ) | \ | \ /| || | \/| | |___ \
>> |__| \____/|___| /__| \_/ |__||__| /\____/____ >
>> \/ \/ \/
>> . . p y r a m i d . t e s t e r . .
>> */
>> //____________________________________________
>> // importz
>> import flash.display.*;
>> import flash.events.*;
>> //filmed in papervison3d
>> import org.papervision3d.utils.*;
>> import org.papervision3d.scenes.*;
>> import org.papervision3d.events.*;
>> import org.papervision3d.cameras.* ;
>> import org.papervision3d.objects.*;
>> import org.papervision3d.materials.*;
>> import org.papervision3d.core.geom.*;
>> import org.papervision3d.core.proto.*;
>> //____________________________________________
>> // varz
>> private var cam :Camera3D;
>> private var scene :Scene3D;
>> private var pyramid :Pyramid;
>> //____________________________________________
>> // constructor
>> public function init3D():void
>> {
>> //init papervison
>> cam = new Camera3D( new DisplayObject3D() );
>> cam.zoom = 500;
>> cam.focus = 10;
>> scene = new Scene3D(paperCanvas.canvas);
>> //create the pyramid object
>> pyramid = new Pyramid(new ShadedColorMaterial(0xFFCC00));
>> pyramid.name = "pyramid";
>> pyramid.scale = 0.75;
>> scene.addChild(pyramid);
>>
>> //create loop for rendering 3D scene
>> addEventListener(Event.ENTER_FRAME , loop3D);
>> }
>> //____________________________________________
>> // loop3D
>> private function loop3D(e:Event):void {
>> pyramid.rotationX = -(paperCanvas.mouseY -
>> (paperCanvas.height/2)) * 0.5;
>> pyramid.rotationY = -(paperCanvas.mouseX - (paperCanvas.width/
>> 2)) * 0.5;
>>
>> //render scene
>> scene.renderCamera(cam);
>> }
>> ]]>
>> </mx:Script>
>> <xx:Canvas3D id="paperCanvas" backgroundAlpha="0" left="0"
>> right="0" top="0" bottom="0"/>
>> <mx:Label text="< pyramid . tester ( http://fontvir.us ) >"
>> fontFamily="Verdana" color="#ffffff" bottom="10" left="10"/>
>> </mx:Application>
>>
>> [/code]
>> ____ ___
>> \ \/ /___________ ____
>> .\ // __ \_ __ \/ _ \
>> ./ \ ___/| | \( <_> )
>> /___/\ \___ >__|---\____/
>> | \_/ \/ |
>> | xero harrison |
>> | x at xero.nu |
>> | http://xero.nu |
>> | http://fontvir.us |
>> | http://xero.owns.us |
>> `---------------------'
>> _______________________________________________
>> Papervision3D mailing list
>> Papervision3D at osflash.org
>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
> Brian Russel Davis
> Bricka Bracka, Inc.
> "We Build Web Software That Rocks!"
> http://www.brickabracka.com
> b at brickabracka.com
> - - - - - - - - - - - - - - - - - - - - - - - - - - *
> Offices :
> (415) 738-7667 SF
> (718) 841-7133 NY
> (312) 423-1852 CHI
> (678) 325-1445 ATL
> (888) 744-7861 toll free
> - - - - - - - - - - - - - - - - - - - - - - - - - - *
> Current Events :
> http://pv3d.eventbrite.com
>
>
>
>
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Brian Russel Davis
Bricka Bracka, Inc.
"We Build Web Software That Rocks!"
http://www.brickabracka.com
b at brickabracka.com
- - - - - - - - - - - - - - - - - - - - - - - - - - *
Offices :
(415) 738-7667 SF
(718) 841-7133 NY
(312) 423-1852 CHI
(678) 325-1445 ATL
(888) 744-7861 toll free
- - - - - - - - - - - - - - - - - - - - - - - - - - *
Current Events :
http://pv3d.eventbrite.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20071115/e2403b67/attachment-0001.html
More information about the Papervision3D
mailing list