Adding reflection with ReflectionView
Another class included in Papervision3D is ReflectionView, which lets you add basic reflections to your scene. The download section of this chapter includes an example in which a carousel of planes is created. The example demonstrates how to work with ReflectionView. We will briefly run through the process of adding the reflections:
Import the
ReflectionViewclass. It is located in theorg.papervision3d.core.effects.viewpackage.Extend your document class with
ReflectionViewinstead ofBasicView.
The ReflectionView class does not override the onRenderTick() method that we have used in all our examples, so we need to change the way we call the rendering process. Replace the startRendering() method with the following line:
addEventListener(Event.ENTER_FRAME, render);
And replace the onRenderTick() method with the following:
public function render(e:Event):void
{
singleRender();
}
To position the reflection of an object you set the surfaceHeight property...