Closed realitylab-ruben closed 6 years ago
Thanks! Makes 100% sense :)
About putting it in a system, do not really know, is it because the flag is doing things 'outside' the component?
Well, it's more that I now have to define playOnClick: false
on every stereo
component that I have in a scene.
Technically, I think it makes more sense if I could set this parameter on an a-scene level, because you most likely want to use this behaviour on all stereo
components. So all I'd have to do is set <a-scene stereo="playOnClick: false">
, instead of having to set the parameter for each and every component in the scene.
I may have some time this evening to expand a bit on the subject. I'll create PR, so you can have a look at it.
ah, sounds great! didn't know you could do that with systems :)
https://aframe.io/docs/0.7.0/core/systems.html
Have to admit that I only started using them at the end of last year. They're essentially like services in other frameworks. Really handy.
For a project I'm working on, the feature to automatically add a click event to the canvas was causing me some issues, because the video needed to be paused and played according to the project's parameters. So I forked the code and added a parameter to the stereo component to make it optional.
Thought you might be interested as well. Personally, I do think that this setting should actually be placed in a system, but I'd first like to hear some feedback before doing any further work on it :)