[Papervision3D] BitmapEffectLayer - How do I prevent the effect from getting slower?
mobilebmx1988 at aim.com
mobilebmx1988 at aim.com
Fri Jan 18 19:32:50 PST 2008
Sorry for many times.
I don't know much about "html" . Actually the first programming language for me is this AS3.
the link I posted earlier is not working....... for me.
If you failed the link above, try following link.
http://flatland.nm.land.to/WebProject.html
And sorry for the annoying ads below the window. You don't have to click that, it's not mine.
-----Original Message-----
From: mobilebmx1988 at aim.com
To: papervision3d at osflash.org
Sent: Fri, 18 Jan 2008 6:59 pm
Subject: [Papervision3D] BitmapEffectLayer - How do I prevent the effect from getting slower?
Hi!
I'm using "Effects" Brunch and applied effect to Plane. But this gets slower as I do "ObjectOver" and "ObjectOut" several times.
You can check the swf, here
http://blog51.fc2.com/f/furnituregiver/file/InteractiveDemo.swf
I don't know why this happens. Gime me some advice?
The code is like following...
// _______________________________________________________________________
// setup Plane
private function setupPlane():void {
var interactiveMat:ColorMaterial = new ColorMaterial(0x00f0ff);
interactiveMat.interactive = true;
interactiveMat.doubleSided = true;
myPlane = new Plane (interactiveMat, 500, 500, 5, 5);
myPlane.name = "InteractivePlane";
scene.addChild(myPlane);
myPlane.addEventListener(InteractiveScene3DEvent.OBJECT_OVER, onObjectOver);
myPlane.addEventListener(InteractiveScene3DEvent.OBJECT_OUT, onObjectOut);
}
// _______________________________________________________________________
// onObjectOver
private function onObjectOver(e:InteractiveScene3DEvent):void {
// Setup BitmapEffectlayer
bfx = new BitmapEffectLayer(550, 400);
bfx.addEffect(new BitmapLayerEffect(new BlurFilter()));5
//bfx.addEffect(new BitmapConvolutionEffect(ConvolutionMatrices.EMBOSS, 9));
viewport.addRenderLayer(bfx);
bfx.drawCommand = new BitmapDrawCommand(null, new ColorTransform(0.1, .001, 22, 0.25), BlendMode.NORMAL);
bfx.clippingPoint = new Point(0, -20);
bfx.drawLayer.blendMode = BlendMode.LAYER;
RenderLayerManager.getInstance().sortMode = RenderLayerSortMode.Z_SORT;
trace(e.target.name)
e.target.material.renderLayer = bfx;
}
// _______________________________________________________________________
// onObjectOut
private function onObjectOut(e:InteractiveScene3DEvent):void {
bfx = null;
e.target.material.renderLayer = null;
//Flipping Plane
flag = !flag;
if (flag) {
Tweener.addTween(e.target, { x:1000, rotationX: 180, rotationY:0, time:2, transition:"easeOutBounce" } );
}else {
Tweener.addTween(e.target, { x: -1000, rotationX:0, rotationY:180, time:2, transition:"easeOutBounce" } );
}
}
More new features than ever. Check out the new AIM(R) Mail!
_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
________________________________________________________________________
More new features than ever. Check out the new AIM(R) Mail ! - http://webmail.aim.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080118/229f616b/attachment-0001.html
More information about the Papervision3D
mailing list