Thanks to Luke I am the new proud owner of Papervision2.com. He is keeping busy and just ran out of time. I know he is sad to see it go, but glad that someone can take over and continue helping the Flash / Papervision community.
To introduce myself, I decided to take a tutorial from my site and add it to this new site.
The ole, doublesided plane. Lets get started.
Here are your options as we see it to create a double-sided plane.
Option 1:
Create two planes. Plane 1 with a z sorting of 1 and the other with 0 and the rotationY of one of those planes set to 180. You could then contain this in one display container.
Version 2:
Create one cube with a depth of 0. Then you just apply a material to the front and back. OK OK OK so this is not really a Plane... but I like this approach because it allows me to more easily use things like Bend Modifier.
If anyone has a better or more improved approach we would love to hear about it.
Here is what the code for Option 1:
-
package com.cs54.ui
-
{
-
import org.papervision3d.objects.primitives.Plane;
-
import org.papervision3d.materials.MovieMaterial;
-
import org.papervision3d.materials.utils.MaterialsList;
-
import org.papervision3d.objects.DisplayObject3D;
-
import com.everydayflash.pv3d.modifiers.Bend;
-
import flash.display.DisplayObject;public class Tree2Planes extends DisplayObject3D
-
{
-
[Embed(source="/assets/tree-side-1.png")]
-
public var TreeFront :Class;[Embed(source="/assets/tree-side-2.png")]
-
public var TreeBack :Class;
-
-
protected var treeFront :DisplayObject;
-
protected var treeBack :DisplayObject;
-
-
protected var treeFrontMat :MovieMaterial;
-
protected var treeBackMat :MovieMaterial;
-
-
protected var treeMatList :MaterialsList;
-
-
protected var _height :Number = 175;
-
protected var _width :Number = 191;
-
protected var _container :DisplayObject3D;
-
-
protected var plane1 :Plane;
-
protected var plane2 :Plane;
-
-
public function Tree2Planes():void
-
{
-
treeMatList = new MaterialsList();
-
treeFront = new TreeFront();
-
treeBack = new TreeBack();
-
-
//Tree Materials
-
treeFrontMat = new MovieMaterial(treeFront, true);
-
treeBackMat = new MovieMaterial(treeBack, true);
-
-
treeFrontMat.allowAutoResize = false;
-
-
plane1 = new Plane(treeFrontMat,_width,_height);
-
plane2 = new Plane(treeBackMat,_width,_height);
-
-
plane1.z = 1;
-
plane1.rotationY = 180;
-
-
_container = new DisplayObject3D();
-
-
addChild(_container);
-
_container.addChild(plane1);
-
_container.addChild(plane2);
-
-
}
-
-
public function get height():Number
-
{
-
return _height;
-
}
-
public function get width():Number
-
{
-
return _width;
-
}
-
-
}
-
-
}
Here is what the code for Option 2:
-
package com.cs54.ui
-
{
-
import org.papervision3d.materials.MovieMaterial;
-
import org.papervision3d.materials.utils.MaterialsList;
-
import org.papervision3d.objects.DisplayObject3D;
-
import org.papervision3d.objects.primitives.Cube;
-
import com.everydayflash.pv3d.modifiers.Bend;
-
import flash.display.DisplayObject;
-
-
public class Tree extends DisplayObject3D
-
{
-
[Embed(source="/assets/tree-side-1.png")]
-
public var TreeFront :Class;
-
-
[Embed(source="/assets/tree-side-2.png")]
-
public var TreeBack :Class;
-
-
protected var treeFront :DisplayObject;
-
protected var treeBack :DisplayObject;
-
-
protected var treeFrontMat :MovieMaterial;
-
protected var treeBackMat :MovieMaterial;
-
-
protected var treeMatList :MaterialsList;
-
-
protected var treeCube :Cube;
-
protected var _height :Number = 175;
-
protected var _width :Number = 191;
-
protected var _container :DisplayObject3D;
-
-
public function Tree():void
-
{
-
-
treeMatList = new MaterialsList();
-
treeFront = new TreeFront();
-
treeBack = new TreeBack();
-
-
//Tree Materials
-
treeFrontMat = new MovieMaterial(treeFront, true);
-
treeBackMat = new MovieMaterial(treeBack, true);
-
-
treeFrontMat.allowAutoResize = false;
-
-
treeFrontMat.animated = true;
-
-
treeMatList.addMaterial( treeFrontMat, "front" );
-
treeMatList.addMaterial( treeBackMat, "back" );
-
-
treeCube = new Cube(treeMatList, _width, 0, _height, 6, 6, 6);
-
-
var bend:Bend = new Bend(treeCube);
-
-
bend.quickBend(1, .1);
-
-
addChild(treeCube);
-
-
}
-
-
public function get height():Number
-
{
-
return _height;
-
}
-
public function get width():Number
-
{
-
return _width;
-
}
-
-
}
-
-
}
More to come in the weeks ahead. New papervision tutorials, full source, and support will all be provided.
Thanks for your continued support.
Charles Schulze,
CS54, LLC


Very nice example. The double sided plane is a super handy option. I recently used it on the video wall on this site:
http://www.endfootwear.com
If you open a video, the object that pulls up can be flipped over to add more information. Super handy..
Hi Charles,
I am really glad to hear that this fine page is going on. :)
Mike
hello, nice post., i think something is wrong with the tutorial list which i am really interested in reading. somehow i think the pretty URLs of Wrodpress are not working. can you check and repair that Charles??
Thanks
Hey Asil,
Thanks for letting me know those were broken. We had a corrupt database that required maintenance. This was left over from that issue. Everything should be back in running order. Please let us know if you find anything else.
Thanks,
Charlie
I love the END Footware site. Very cool!
Hi, where is the base class now kept that was on this site? Is the one in the download area for the page turner the latest one??
Thanks,
jkaris
You can download the papervision base class here:
http://papervision2.com/PaperBase.as
Charlie
hey thanks for the tutorial.
you stated that you brought this tutorials from your site
Would like to know what is your website address Charles. love to go and see what’s there.
thanks.
Hello everyboby !
I’m looking for the box texture, used on this site in the header few month ago. I would like to get it for my flash game. If anyone can help me, just contact me @ matthieu.mallet at gmail dot com
Thanks a lot for your work, you’re very helpfull :)
My other site is:
http://www.cs54.com
and
http://www.cs54.com/blog/
Hi Charlie, I’m getting these errors…
1172: Definition com.everydayflash.pv3d.modifiers:Bend could not be found.
You should end that “RENDERING” trace being outputted. It runs sluggish on firefox w / debug client 10