Open joshmarinacci opened 4 years ago
If we're willing to assume ES2015 or later (i.e., classes) we could provide a class that developers implement (where we call the various methods at the correct time). We would provide the context, scene, etc., but also let them override certain things as appropriate.
There should be a component which creates a new scene for you, possibly with default lighting, but contains nothing. You can then hook into it using threejs. The advantage of this is that supporting immersive mode, entering and exiting vr, detecting browser support, etc. is handled for you. it should also let you specify an image or button to use instead of initializing the threejs scene immediately. At the correct time it will start three and invoke your callback. This is to address needs for @blairmacintyre ex: New York Times style interactive pages.