Here is another Papervision3D example. This time I am extending a 3D carousel on the Y axis to create a spiral. There are 100 planes and the spiral rotates around 5 times. The Y of your mouse controls the Y of the spiral and the X position of the mouse controls the rotation. This could probably be useful for some type of list and it is at least somewhat different than the typical carousel.
[AS]import org.papervision3d.scenes.*;
import org.papervision3d.cameras.*;
import org.papervision3d.objects.*;
import org.papervision3d.materials.*;
// Create the container sprite
var con:Sprite = new Sprite();
con.x = stage.stageWidth * 0.5;
con.y = stage.stageHeight * 0.5;
addChild(con);
// Setup the scene
var scene:Scene3D = new Scene3D(con);
var cam:Camera3D = new Camera3D();
cam.zoom = 4;
// Create camera center
var pc:Plane = new Plane();
pc.visible = false;
cam.target = pc;
// Spiral properties
var num:int = 100;
var numOfRotations:Number = 5;
var anglePer:Number = ((Math.PI*2) * numOfRotations) / num;
var yPos:Number = 0;
// Create the planes
var pa:Array = new Array();
for(var i:uint=0; i
var cm:BitmapAssetMaterial = new BitmapAssetMaterial("air");
cm.oneSide = false;
var p:Plane = new Plane(cm, 100, 100);
p.x = Math.cos(i * anglePer) * 550;
p.z = Math.sin(i * anglePer) * 550;
p.y = yPos += 50;
p.rotationY = (-i*anglePer) * (180/Math.PI) + 270;
scene.addChild(p);
}
// Create the render loop
addEventListener(Event.ENTER_FRAME, render);
var angle:Number = 0;
function render(e:Event):void
{
var dist:Number = ((stage.mouseY) - stage.stageHeight * 0.5) * -0.1;
var dist2:Number = ((stage.mouseX) - stage.stageWidth * 0.5) * 0.0005;
angle += dist2;
cam.x = Math.cos(angle) * 1000;
cam.z = Math.sin(angle) * 1000;
cam.y += dist;
if(cam.y < 369) cam.y = 369;
if(cam.y > 4755) cam.y = 4755;
pc.y = cam.y;
scene.renderCamera(cam);
}
[/as]









NICE!
Wow, Lee! Incredible!
Very nice. I will try to do this in FlashDevelop.
Thank you.
Beautiful, incredible, and creative! I would love to see this being used as a search engine presentation, each little square has a picture preview of the website. Or a You Tube search with built-in player. Maybe even an eBay product search. The possibilities are endless! All in all, just brilliant!
Very nice, thank you.
Haha, i saw the new logo of Air!
nice work, thanks for sharing.
Lee you rock!!!
I don’n know if I place my post in the right place but I can’t acess your site.I recive a lot of error like this
“VerifyError: Error #1014: Class flash.events::FullScreenEvent could not be found.
at fl.video::FLVPlayback$iinit()
at flash.display::Sprite/flash.display:Sprite::constructChildren()
at flash.display::Sprite$iinit()
at flash.display::MovieClip$iinit()
at fotb_fla::MainTimeline$iinit()”
and mach more.
Any solution?
Thanks
I will send out my christmas wishlist like this…
)
You are really gone wild with these PV3D Examples ! :O
Can it be nicer?
Cool!
Very Nice Indeed.
Yeah Thanksgiving week is always a little boring for me so I have plenty of time to noodle around.
Looking good Lee!
Keep it up!
Great example
Splendide ! Thanks for sharing.
I love it. Makes the Helix mod to the original carousel look antiquated!!!!
(BTW, still waiting for my copy of CS3 before I get too into the PV3D stuff too much, but I’m DYING to get to work!!!)
This one is pretty sweet! I am starting to get into and work with Papervision3D, so learning from these examples is great!
Lee,
One thing I noticed was that to get the Air logos to properly align to their shapes, you had to move the following lines of code above the for loop they’re currently in:
var cm:BitmapAssetMaterial = new BitmapAssetMaterial(“air”);
cm.oneSide = false;
That’s lines 32 and 33.
Yes, Dean Mellis is right: the code is wrong.
Thanks anyway, cool example!
Hi Lee!
Could you explain how to use MovieMaterial class?
I just coldn’t make it work…
Wow!
Actually, you could use it to visualise a DNA helix…
You may have a new market there Lee,
Thanks
Looks like there are more fans:
http://www.flashden.net/item/3d-gallery/6153
Hmmm, just a coincidence?
Lee,
Awesome man! I want to say thanks for all your tutorials and excellent inspirations like this. Will you be offering source code for this so I can create some cool stuff as well?
Thanks again and God Bless,
Titus
elegant in it’s simplicity. great work, thanks for making it look so easy, ha.
Hi Lee,
Awesome example, I was just looking over it for fun. One request, can you try to not use “magic numbers” in future examples? I am not sure what a lot of those numbers are in some of the expressions your writing.
For an intermediate coder like me I would love to see these magic numbers stored into a descriptively named variable, or perhaps just some comments would be helpful as well.
Thanks. Keep up the great work!!
Tim
Hey Lee
How is it possible to load an external image or swf into the carrousel?
It is really amazing! I was trying your code, but he keep throwing to me this exception
1046: Type was not found or was not a compile-time constant: Event.
I am looking for a way to solve this…
How am I supposed to find stuff on here?
Ok, all solved!
Francesco De Collibus
OK…you can show the solved?
your an inspiration, keep it up.
buddy, am sorry, i could get a look of ur work.. if possible just guide me yaar
nice….I think paperVision is a great as3 tool. Check out my site. I have put a few things together using as3 and the paperVision lib
It would really be cool to see like a website built out of this effect. I can think of some pretty sweet ideas. A space theme would also be amazing with it make nebulas and such for a navigation.
Great Job though I like this a lot.
Really nice work !
a lot of thanx to u, because you r helping to me in the learning period, i learned from ur photogalleries, templates….etc.
Hi Lee,
This is a great script, thanks for sharing. I’ve modified it to take in a dynamic array of images using PHP remoting to make a scalable image gallery. I’ll credit your stuff in the source…
Cheers,
Sam
great stuff!
I am having a lot of fun with this example
I was wondering if it is possible to put the camera inside the spiral and therefore rotate on itself instead of rotating around the spiral.
Best,
Aurel
This is cool, but it’d look even better if you combined it with your Depth of Field demo!
Hi Lee..Am a very beginner to paper vision 3d and AS3. I tried lots and I failed…How i canconvert this spiral into z axis..I mean look from the top…? Can you please help me?
Hi,
I want to add some basic interactivity to my spiral.
Like when I click on a thumb(read as plane),the camera should seamlessly tween to bring it into focus.
Can you suggest how can I do that.
Thanks in advance.