RE: Choosing a graphics library/framework

With respect to WebGL, three.js and A-Frame at least...

A-Frame is layered atop three.js, which is itself layered atop WebGL.

One nice thing about their implementations is that the lower layers are still accessible, so in fact it is common to have a mix in use simultaneously.

E.g. mostly declarative with A-Frame, with custom three.js (and plain Javascript) where needed encapsulated in a component for convenience, and with custom shaders where necessary that go all the way down to WebGL.

This may be true of other combinations as well.

Best,
Michael
________________________________________
From: Leonard Daly [web3d@realism.com]
Sent: Wednesday, August 23, 2017 5:09 PM
To: public-decwebvr@w3.org
Subject: Fwd: Choosing a graphics library/framework

Reposted with permission from WebVR mailing list.


-------- Forwarded Message --------

I'd recommend the following frameworks for building WebVR experiences:

• A-Frame – https://aframe.io/ (entity-component WebVR framework, built atop three.js)
• LÖVR – http://lovr.org/docs/WebVR (scenes can be written in Lua and executed natively, and packaged to WebVR using emscripten + asm.js: http://lovr.org/share)
• Primrose – https://www.primrosevr.com/ (built atop three.js)
• three.js – https://threejs.org/examples/?q=webvr (underlying and here's a good example of an open-source experience: https://github.com/stewdio/day-and-night-webvr)
• Babylon.js – https://docs.microsoft.com/en-us/windows/uwp/get-started/adding-webvr-to-a-babylonjs-game (WebGL engine, alternative to three.js)
• Vizor – https://vizor.io/ (easy WebVR content-creation tool + hosting service)
• PlayCanvas – https://developer.playcanvas.com/user-manual/vr/ (powerful WebGL 3D game engine with a custom WebGL engine, entity-component framework, and hosting service)
• Hologram – https://hologram.cool/ (easy-to-use macOS native application, built atop A-Frame)

IYCMI: Here's a case study of a recent experiment by Shopify built using PlayCanvas: https://medium.com/shopify-vr/building-a-vr-shopping-experience-for-the-web-tips-and-takeaways-shopify-4a8017d5f6f5


[Indirectly in response to...]


On Tue, Aug 22, 2017 at 11:53 AM, Leonard Daly <web3d@realism.com<mailto:web3d@realism.com>> wrote:
Hi John,

As others have pointed out, you are mixing different technologies/layers here. The closest two being THREE and Babylon.

>From my perspective, you are trying to build a Metaverse. That is a lot of content. As long as it works, people (as in users) are not going impressed with your underlying technology. So choose the technology that males your work (and that of user/developers) easy -- as long as it works.

WebGL is when you absolutely need it to run fast.  Unless you are going to write your own bower, this is about as low as you can go. BTW, I put shaders here. You probably want to have a decent library of them so people don't have to write one.

THREE/Babylon are programmatic interfaces to WebGL (there more than that, but it's a good first start). Writing code at this level is much easier to manage and maintain that WebGL code. If this is your choice, all metaverse developers will need to use one of these APIs -- meaning they will need to write JavaScript code.

A-Frame is a semi-declarative language. It abstracts some of the features of THREE into a declarative language. If this is your choice, developers will need to write HTML-like code (tags and attributes), unless the particular desired feature is not available. Then the developer will need to write using the A-Frame API to THREE. (This is what makes it semi-declarative.) Carefully check the A-Frame documentation to make sure that it provides the features you are looking for. Also note that A-Frame is still in pre-release development (V0.6). Things will probably change.

The W3C has a community group for Declarative VR (https://www.w3.org/community/decwebvr/). Membership is open to everyone. (I am co-chair). The group is working on a fully declarative language. We would like your inputs as you work through the issues of what is needed for a declarative language that will fully integrate with HTML, DOM, CSS, and other W3C technologies. If you are interested, I can provide further information as to my findings and preliminary development.

--
Leonard Daly
3D Systems Architect & Cloud Consultant
President, Daly Realism - Creating the Future

Received on Wednesday, 23 August 2017 22:28:32 UTC