[Papervision3D] Pixels/Pixel3D
Andy Zupko
azupko at zupko.info
Thu Jan 10 15:10:14 PST 2008
You are putting all the pixels in the exact same XYZ coordinate. Try this:
var cor:uint = Math.random() * 0xFFFFFFFF;
var pX:int = Math.random() * 350;
var pY:int = Math.random() * 350;
var pZ:int = Math.random() * 350;
for(var i:int = 0; i < 10000; i++)
{
pX = Math.random() * 350;
pY = Math.random() * 350;
pZ = Math.random() * 350;
this.px.addPixel3D(new Pixel3D(cor, pX, pY, pZ));
}
From: papervision3d-bounces at osflash.org
[mailto:papervision3d-bounces at osflash.org] On Behalf Of Junio Gonçalves
Vitorino
Sent: Thursday, January 10, 2008 5:52 PM
To: b at turbulent.ca; papervision3d at osflash.org
Subject: Re: [Papervision3D] Pixels/Pixel3D
I also can't see.
Look my source code. I'm using ARGB
public class Main extends Sprite
{
private var cena
:Scene3D;
private var viewport
:Viewport3D;
private var render
:BasicRenderEngine;
private var camera
:Camera3D;
private var bfx
:BitmapEffectLayer;
private var px
:Pixels;
public function Main()
{
this.render = new BasicRenderEngine();
this.camera = new Camera3D();
this.buildEffect();
}
private function buildEffect(): void
{
var sWidth:int = stage.stageWidth;
var sHeight:int = stage.stageHeight;
this.bfx = new BitmapEffectLayer(sWidth, sHeight);
this.bfx.addEffect(new BitmapLayerEffect(new
BlurFilter(3, 3, 3)));
this.viewport = new Viewport3D(0,0,
true,false,true,true);
this.addChild(this.viewport);
this.viewport.addRenderLayer( this.bfx);
this.px = new Pixels( this.bfx);
var cor:uint = Math.random() * 0xFFFFFFFF;
var pX:int = Math.random() * 350;
var pY:int = Math.random() * 350;
var pZ:int = Math.random() * 350;
for(var i:int = 0; i < 10000; i++)
{
this.px.addPixel3D(new Pixel3D(cor, pX, pY, pZ));
}
this.cena = new Scene3D();
this.cena.addChild(this .px);
this.addEventListener(Event.ENTER_FRAME, loop);
}
private function loop (e:Event): void
{
this.render.renderScene(this .cena, this.camera,
this.viewport);
}
}
}
--
Junio Vitorino
Belo Horizonte - Brasil
jgvitorino at gmail.com
http://www.juniovitorino.com <http://www.juniovitorino.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080110/d12137bd/attachment-0001.html
More information about the Papervision3D
mailing list