Yes Lami, it does!

But there's a further problem I didn't considered at first: the
tweening engine. I mean, suppose that a generic interaction (which
enables rendering) is coded with a tween: at the moment the
interaction occurs (the interaction frame) the frame buffer is
correctly painted as it should, but in the succeeding frame no other
modifications will be shown because of the absence of a call to
view.render() inside the enterFrame()! But maybe I'm wrong because I
didn't test it...

Now, I heard that PV3D has the ability to enable/disable the rendering
process even if there's a view.render() inside the enterFrame(). I'm
going to check if this ability is available even in Away3D.

Again, thanks for your help Lami, I'll try to recode my app following
your guidelines... I'll let you know my results!

Bye!


On 22 Lug, 13:55, Lami <[email protected]> wrote:
> Hi Francesco!
>
> I was looking for my old project where I did this and this is my
> solution:
>
> basically i just needed to render after the user pressed/released a
> key
>
> public function Test() {
>  //Here I initalize my objects and after everything was initialized
> view.render() is called once, to render the first time.
> init();
>
> this.stage.addEventListener(KeyboardEvent.KEY_DOWN,onKeyDown);  //
> There i put the view.render();
>
> this.stage.addEventListener(KeyboardEvent.KEY_UP,onKeyUp);  //There i
> put view.render() too;
>
> this.addEventListener(Event.ENTER_FRAME,onEnterFrame);
> //There is just my switch-case statement, checking which key was
> pressed and what interaction should be done, e.g. (move forward)
>
> }
>
> So I've got no view.render() in the onEnterFrame Function!
>
> As you see I didn't rerender all the time, but just when there was
> interaction.
> Maybe this works in your case too!?
>
> On 22 Jul., 13:13, francesco <[email protected]> wrote:
>
>
>
> > HI Steve!
>
> > Let me point out this issue: do you mean that the only place where to
> > put the:
>
> > > this.view.render()
>
> > is inside the listener handler and not inside the enterFrame()?
>
> > Thanks!
>
> > On 22 Lug, 12:49, Lami <[email protected]> wrote:
>
> > > Hi!
>
> > > I guess I implementend something like that:
>
> > > //Viewpoint is my camera, i just render when camera is mooved
>
> > > viewPoint.addEventListener
> > > (Object3DEvent.SCENETRANSFORM_CHANGED,reRender);
>
> > > private function reRender(e:Object3DEvent):void {
> > > view.render();
>
> > > }
>
> > > Tell me if that works for you!
>
> > > greetz. Steve
>
> > > On 22 Jul., 12:08, francesco <[email protected]> wrote:
>
> > > > Hi everyone,
>
> > > > is there a way to stop the rendering inside a enterFrame() via a
> > > > predefined Away3D property or something like that? I'd like the engine
> > > > not to render the scene until something moves on the stage.
>
> > > > Thank you!

Reply via email to