Hey Diomas The error you are experiencing is down the the fact that you are trying to render the view before adding it to the displaylist.
The stage property is accessed because when clipping values are not set, they default to the edges of the stage. This is so that clipping is a transparent task for those who don't want to concern themselves with it. For those that do, the clipping property can be set to whichever clipping object you require, and min/max values can be set for x y and z. These directly correspond to the 6 planes in the clipping frustum, now a standard part of the Away3d view. i can understand if you are wanting to render the view to a bitmapdata object, but have you tried using the BitmapRenderSession for this task instead of doing it manually? the session property on the view instance can be set to a new BitmapRenderSession instance, and then allows you to use the getBitmapData method directly on the view to grab a snapshot of the view contents after rendering. I do agree that the view should not necessarily be added to the stage for this to occur, but in this instance it would be necessary to set a default value for the clipping object's properties that do not take into account the width and height of the stage. this would impose a default width and height on the bitmapdata object returned from the BitmapRenderSession object, that could still be adjusted by setting the min/max values on the clipping object manually as before. thanx for the issue log - we'll take a look at this soon cheers Rob 2009/2/26 Diomas <[email protected]> > > Thanks! I'll be waiting. > > On 25 фев, 20:23, Peter Kapelyan <[email protected]> wrote: > > You are right, if something is broken it should be fixed. We try and find > > all bugs before releasing a "version". > > > > Sometimes bugs slip through the cracks, and luckily we have great support > > from our users (like you), to help us iron out any other problems. > > > > -Pete > > > > 2009/2/25 Diomas <[email protected]> > > > > > > > > > > > > > > > > > But it seems wrong way! Why do View3D should detect size changes by > > > itself? Application or some UI component should monitor changes in its > > > (or stage) size and apply properties of View3D. > > > > > Before (in 2.0.0 release) I was able to do anything to View3D, setting > > > its x, y and clip properties, depending on my needs. Now View3D > > > desides for me when to be resized or not. Am I totaly wrong or Away3D > > > should be flexible as it used to be before? > > > > > On 25 фев, 18:23, Peter Kapelyan <[email protected]> wrote: > > > > I think this was done so that the clipping can detect resizing the > SWF, I > > > > don't think it was working right before. > > > > > > Thanks for adding it to the issues. > > > > > > -Pete > > > > > > On Wed, Feb 25, 2009 at 5:08 AM, Diomas <[email protected]> > > > wrote: > > > > > > > Hello, > > > > > If I try to render View3D that is not included in display list, I > get > > > > > this error: > > > > > > > TypeError: Error #1009: Cannot access a property or method of a > null > > > > > object reference. > > > > > at > > > > > away3d.containers::View3D/updateScreenClipping()[I:\dev\lib\Away3D > > > > > \src\away3d\containers\View3D.as:801] > > > > > > > Same issue with View3D in flash10 branch (on 811th line). > > > > > > > The problem is View3D tries to use his stage property which is > null. > > > > > > > Why do View3D need any links to stage at all? Why not to use its > own > > > > > x, y properties for clipping? > > > > > > > Its a problem, because now if i want to get, for example, few > > > > > snapshots of some scene and hold it in memory or draw it into some > > > > > BitmapData, I have to put View3D somewhere in display list even if > I > > > > > don't need it actually. > > > > > > > Added to issues. > > > > > > -- > > > > ___________________ > > > > > > Actionscript 3.0 Flash 3D Graphics Engine > > > > > > HTTP://AWAY3D.COM <http://away3d.com/> > > > > -- > > ___________________ > > > > Actionscript 3.0 Flash 3D Graphics Engine > > > > HTTP://AWAY3D.COM > -- Rob Bateman Flash Development & Consultancy [email protected] www.infiniteturtles.co.uk www.away3d.com
