-
Sandy3d
Hi,
I am using sandy3d engine for an panoramic image box.I am creating a cylinder and assigning an image to the cylinder and focusing the cylinder with a camera 3d.Then i am constantly rotating the cylinder in a constant speed.The problem is that, there are some jitter and flickering in it.Can you please help me out.
I am attaching the code i have wrote.
private var camera:Camera3D = new Camera3D(500,400,106);
private var panoCylinder:Cylinder = new Cylinder( "Pano",313,400,60,10,NaN,true,true,true);
scene = new Scene3D("scene", spriteContainer, camera, root3D);
The spriteContainer is my own UIComponent
scene.rectClipping = true;
camera.fov=57.8;//2 * Math.atan2 (h / 2, d) * (180 / Math.PI);
camera.tilt=0;
camera.near=283;
camera.far=286;
camera.z=50;
camera.lookAt(0,0,40);
camera.scaleX = -1;
panoCylinder.enableBackFaceCulling = true;
panoCylinder.swapCulling();
panoCylinder.enableNearClipping = true;
panoCylinder.enableEvents = false;
panoCylinder.enableClipping = true;
panoCylinder.appearance.backMaterial.lightingEnabl e = false
scene.root.addChild( panoCylinder );
rotateTimer.addEventListener(TimerEvent.TIMER, RotateCylinder);
isInitialized = true
private function RotateCylinder(event:Event):void
{
panoCylinder.rotateY -= .4;
this.Render();
}
private function Render():void {
{
camera.update(scene, null, false);
panoCylinder.update(scene, null, false);
panoCylinder.cull(scene, camera.frustrum, camera.invModelMatrix, camera.changed);
panoCylinder.render(scene, camera);
materialManager.begin(scene);
camera.renderDisplayList(scene);
materialManager.finish(scene);
}
Pls reply ASAP.Thanks in advance
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|