This is working well for me at the moment:

Away3DView.as (init view, scene & camera)
Away3DMediator.as (had reference to all the Away3D objects needed and
performs any logic they may require as well as camera and standard
notifications in and out for the application)

Then just create Away3D objects as if they were views:

Away3DMyObject1.as
Away3DMyObject2.as
Away3DMyObject3.as
etc

Nice and simple.

One mediator to rule them all, so to speak...





On 1 April 2011 09:46, Roger Domenech <[email protected]> wrote:

> Hi all,
>
> I'm building a game using away3dlite and robotlegs, and I thing that
> this combination solve the problem. The lite branch object3d inherit
> from Sprite, so you can create you 3d objects and mediate them as any
> other view. The obtec3d child classes are auto-mediated when you add
> them to a scene 3d or to any other object3dContainer, and you don't
> need to break any rule, or hack anything.
>
> My aproach is keep an Away3dView with a single onEnterFrame, plus a
> view for every 3d component, that I mediate in the regular robotlegs
> way.
>
> The only issue is if away3dlite is not enough for your project...
>
> On Mar 23, 7:39 pm, John Lindquist <[email protected]> wrote:
> > I honestly just don't think it's a good idea to have rendering/
> > collision/etc handled in an mvc framework and I'm afraid that if I
> > made an example of how you "could" do it than people would think
> > that's how you "should" do it :/
> >
> > Besides, robotlegs is meant to mediate regular DisplayObjects, so
> > you'd have to go against all those "guidelines" you're trying to
> > follow just to even get it working.
> >
> > On Mar 23, 3:28 pm, Darcey Lloyd <[email protected]> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > I never get a say in it... I just get phone calls like,
> >
> > > "can you use robotlegs?", "yes"
> > > "know papervision?", "yes"
> >
> > > and when I get there, I convert them to the light which is Away3D but
> when I
> > > suggest not implementing Robotlegs or PureMVC for some of the tiny
> projects
> > > they have me work on, the parrot learned extensibility lecture begins,
> so
> > > now I don't bother trying.
> >
> > > D
> >
> > > On 23 March 2011 19:23, rhys thomas <[email protected]> wrote:
> >
> > > > Cool cool, I would recomend it though as bojinx works the same as
> robot
> > > > legs but much better at the same time and no need for half the stuff
> that
> > > > robot legs forces you to use, I understand what your saying though as
> > > > perhaps the client has requested robot legs but its worth suggesting
> bojinx
> > > > to them as its soooooo much better :)
> > > > On 23 Mar 2011 19:18, "Darcey Lloyd" <[email protected]> wrote:
> > > > > *@Rhys:*
> >
> > > > > I have to use Robotlegs or PureMVC - they are nearly always the job
> > > > > requirements.
> >
> > > > > *@John*
> > > > > Nice video, very clean, very efficient...
> > > > > You have converted me to IntelliJ (installed and using) very nice,
> now I
> > > > > just need a list of shortcuts ;)
> >
> > > > > The issue I have is where in RobotLegs would I place the logic for
> > > > > processing logic to render (enter frame), camera tweening and logic
> to
> > > > > handle a collision multiple objects (if 3D objects are considered
> as
> > > > > separate views).
> > > > > After watching the video I get this far:
> >
> > > > > *Away3DContext.as *(mapViews to mediators and instantiate view
> > > > components)
> > > > > *Away3DEvent.as* (event constants)
> >
> > > > > *Away3DViewComponent.as* (setup)
> > > > > *Away3DMediator.as*
> >
> > > > > - Handle enter frame render
> > > > > - Handle render enable / disable notifications
> > > > > - Handle camera setup
> > > > > - Handle camera tweening notifications
> >
> > > > > *Away3DCube1ViewComponent.as *(setup)
> > > > > *Away3DCubeMediator.as* (onClick handlers for change to random
> colour)
> >
> > > > > *Away3DCube2ViewComponent.as* (setup)
> > > > > *Away3DCube2Mediator.as *(onClick handlers for change to random
> colour)
> >
> > > > > but where would the logic go for handling the two view components
> (cube 1
> > > > > and cube 2) if I was to animate them bouncing around:
> > > > > where would be the correct place to process logic for a collision
> and
> > > > > change of animation direction.
> >
> > > > > From here I am not sure:
> >
> > > > > 1. Where would the correct place be for the logic to handle the
> animation
> >
> > > > > of cube 1 and cube 2 view components (in the
> Away3DViewComponent.as)?
> > > > > 2. Where would the correct place be for the logic to handle
> collision
> >
> > > > > detection (in the Away3DViewComponent.as)?
> >
> > > > > If I am correct (not 100%), a view component should not be aware of
> other
> > > > > view components and should only handle logic for themselves.
> >
> > > > > I understand the event system (I hope lol), just when it comes to
> > > > > implementing Away3D or enter frame handlers on views / components
> which
> > > > > require handling multiple interactive views at the same time,
> things get
> > > > a
> > > > > unclear. A great example would be.. Each time I click on the stage
> it
> > > > would
> > > > > add a Cube which bounces around much like a bat and ball game, but
> each
> > > > time
> > > > > a cube collides they would bounce off at an angle from each other.
> >
> > > > > Or am I just missing something obvious which is staring me in the
> face?
> >
> > > > > Thanks
> >
> > > > > Darcey
> >
> > > > > On 23 March 2011 18:08, rhys thomas <[email protected]>
> wrote:
> >
> > > > >> Have you had a look at bojinx I believe it to be a much nicer and
> easier
> > > > >> set up than robot legs
> > > > >> On 23 Mar 2011 17:32, "John Brookes" <[email protected]>
> wrote:
> > > > >> >http://www.youtube.com/watch?v=lsrbDkW7pVw
>

Reply via email to