tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/13235-robotlegs-2-away3dRobotlegs: Discussion 2018-10-18T16:35:58Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/382756642015-10-23T11:39:15Z2015-10-23T11:39:15ZRobotlegs 2 - Away3D<div><p>Hi Jono,</p>
<p>Robotlegs 2 works the same way as robotlegs 1 with regards to
listening to added to stage events and creation of mediators.<br>
The new feature in rl2 is the ViewProcessorMapExtension:<br>
<a href="https://github.com/robotlegs/robotlegs-framework/tree/master/src/robotlegs/bender/extensions/viewProcessorMap">
https://github.com/robotlegs/robotlegs-framework/tree/master/src/ro...</a></p>
<p>But, the issues encountered with away3d, starling, feather and
the like remain: robotlegs can't handle 3DViews, either because, as
you said, they don't dispatch added to stage events, or because the
3D stage doesn't have a display list ...</p>
<p>My suggestion is to use this extension for robotlegs 2, which
works with away3d and starling:</p>
<p><a href="https://github.com/Vj3k0/robotlegs-extensions-SARS">https://github.com/Vj3k0/robotlegs-extensions-SARS</a></p>
<p>Here are a few other extensions listed:<br>
<a href="http://knowledge.robotlegs.org/discussions/robotlegs-2/13222-how-to-map-starlingeventevent-with-the-command#comment_38165664">
http://knowledge.robotlegs.org/discussions/robotlegs-2/13222-how-to...</a></p>
<p>Let me know if using sars solved your issues.</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/382756642015-10-23T13:54:35Z2015-10-23T13:54:35ZRobotlegs 2 - Away3D<div><p>Hi Ondina,</p>
<p>Thanks for your reply.</p>
<p>I looked at <a href="https://github.com/jamieowen/robotlegs2-away3d-viewmap">https://github.com/jamieowen/robotlegs2-away3d-viewmap</a>
also and tried implementing it, but had no luck.</p>
<p>I am actually using SARS already, a slightly modified version so
I could use the latest Starling. I've not yet had to use any Away3D
in it, but now when I try I'm not having much success.</p>
<p>I re-created the SARS demo with these modifications to use the
most recent components and put it here:<br>
<a href="https://bitbucket.org/jkafkaris/base-sars-application">https://bitbucket.org/jkafkaris/base-sars-application</a></p>
<p>Can you suggest the steps I would follow to add an Away3D
element with a Mediator in this example?</p>
<p>Many thanks,<br>
Jono</p></div>Jonotag:robotlegs.tenderapp.com,2009-10-18:Comment/382756642015-10-23T15:33:02Z2015-10-23T15:33:02ZRobotlegs 2 - Away3D<div><p>No problem, Jono.</p>
<p>In the robotlegs.bender.example.sarsintegration.config.Config.as
there is this:</p>
<pre>
<code>mediatorMap.map(IButton).toMediator(ButtonMediator);</code>
</pre>
<p>Button3D is an away3d.containers.ObjectContainer3D and it
implements IButton.</p>
<p>Thus a ButtonMediator will be created for a Button3D when it is
added as a child to a view3D.scene.</p>
<p>The ButtonMediator has:</p>
<pre>
<code>[Inject]
public var view:IButton;</code>
</pre>
<p>Does that not work for you?</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/382756642015-10-24T11:43:32Z2015-10-24T11:43:32ZRobotlegs 2 - Away3D<div><p>Hi Ondina,</p>
<p>Totally my bad - I dropped the ball on this one! When installing
he SARS Bundle I forgot to pass the view3D (as previously I had no
Away3D in this specific project) and then was attempting to add the
Away3D instance an incorrect way also...</p>
<p>After passing the "root" view3D and [Inject]ing the correct one
all is good.</p>
<p>Thanks for enlightening me : )</p>
<p>Jono.</p></div>Jono