PaperVision

From Whirled Club Wiki
Revision as of 18:14, 4 September 2018 by Whirled vox (talk | contribs) (Text replacement - "<" to "<")
Jump to navigation Jump to search

PaperVision3D is a toolkit for creating 3D objects and animations in flash. It is available here.

Unfortunately, PaperVision, like many flash libraries, assumes that it can install listeners on the stage. In Whirled, nothing can do that because every piece of media is loaded into a security boundary.

Luckily, it's easy to patch PaperVision.

In Viewport3D, find the place where it's adding a listener to the stage:

<code>

               protected function onAddedToStage(event:Event):void
               { 
                       stage.addEventListener(Event.RESIZE, onStageResize);
                       onStageResize();
               }

</code>

And change this to: <code>

               protected function onAddedToStage(event:Event):void
               { 
                       try {
                           stage.addEventListener(Event.RESIZE, onStageResize);
                       } catch (err :Error) {
                       }
                       onStageResize();
               }

</code>

This means that you can't make use of the autoScaleToStage feature.

See Also

  • QuakeMix 3D - a remixable avatar framework using PaperVision