Skip to content

Best way to integrated argon and aframe #6

@blairmacintyre

Description

@blairmacintyre

Right now, argon and aframe are integrated via a new scene, the ar-scene. This has the advantage that developers explicitly choose if they want VR (via a-scene) or AR (via ar-scene) and means the internal implementation and structure of the two scenes can be different.

However, separating the scenes makes a few things difficult

  • it is harder to switch between AR and VR (or simply 3D-in-a-div) because the scene must change
  • it makes it harder to repurpose existing A-Frame samples and demo code (perhaps this is minor)
  • 3rd party components and extensions often search the DOM for an a-scene element, preventing them from working with argon (e.g., the inspector does this!)

There are two alternatives to the current implementation.

  1. cause argon-aframe.js to override the methods in the a-scene object, causing it to work with argon and AR. This is perhaps the "simplest" but it means that once you load argon-aframe.js, you can no longer do VR.

  2. cause argon-aframe.js to add new methods to the a-scene object, an analogous set of capabilities for AR as currently exist for VR (e.g., enterAR methods and events, etc, akin to the current enterVR ones). Additional methods/properties would allow the programmer to choose between AR and VR. If running in a browser that supports both, we could even put a second icon up beside the current "VR glasses" icon, to allow the end user to choose between AR and VR.

I'm curious what people think. I'm leaving toward implementing option 2. WebVR is moving toward supporting multiple kinds of displays, so we will eventually want AFrame to support having the user choose between different displays and modalities.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions