Skip to content

Conversation

@ngokevin
Copy link
Member

@ngokevin ngokevin commented Jun 29, 2016

Description:

Configurable systems. Use cases so far have been configurable Firebase system for API credentials, and configurable Physics system such as for gravity.

<a-scene firebase="apiKey: dsakldasd; authDomain: github.com">

So far we've had to work around using proxy components.

Currently does not support updates.

Changes proposed:

  • Add schema and initial parsing to Systems.
  • Have Scene.getAttribute and Scene.setAttribute to return system data (if exists) rather than component data that might have the same name (e.g., if you had a physics system and physics component, sceneEl.getAttribute('physics') should return physics system data.
  • No actual changes to Entity, just shuffled code (to do early returns) around from leftover implementation.

@ngokevin ngokevin changed the title allow system configuration (fixes #1464) [wip] allow system configuration (fixes #1464) Jun 29, 2016

// If attribute is not a component or if attribute is a system for the scene.
// If attribute is a system that exists for the scene, then we ignore the component.
if (!components[attr] || (this.isScene && systems[attr])) {
Copy link
Member

@dmarcos dmarcos Jun 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code should probably be part of a a-scene implementation of setAttribute

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, updated + ready.

@ngokevin ngokevin force-pushed the systemschema branch 2 times, most recently from d836ade to 2eddbd7 Compare June 29, 2016 22:33
@ngokevin ngokevin changed the title [wip] allow system configuration (fixes #1464) allow system configuration (fixes #1464) Jun 29, 2016
@dmarcos
Copy link
Member

dmarcos commented Jul 1, 2016

@fernandojsg Do you see any problem with the editor handling this?

@dmarcos dmarcos merged commit 6edb276 into aframevr:master Jul 6, 2016
@dmarcos
Copy link
Member

dmarcos commented Jul 6, 2016

After this change I'm starting to think that A-Frame should prescribe a physics engine for 0.4.0. You want one that works well and integrates consistently with components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants