Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- Added playOnClick to stereo_component's schema #25

Merged

Conversation

realitylab-ruben
Copy link

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 :)

@oscarmarinmiro oscarmarinmiro merged commit 80eaacd into c-frame:master Mar 4, 2018
@oscarmarinmiro
Copy link
Collaborator

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?

@realitylab-ruben
Copy link
Author

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.

@oscarmarinmiro
Copy link
Collaborator

ah, sounds great! didn't know you could do that with systems :)

@realitylab-ruben
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants