Meanwhile, glTF is gaining major traction and allows for 3D documents to be designed in a number of industry standard programs which 3D artists use to ship billions of dollars of games.
Hence providing a dedicated API for glTF rather than trying to pretend that it’s XML.
(Come to think of it, this is a pretty similar situation to JSON v XML in Matrix itself…)
If you want that contents to be modelled in the DOM instead, go look at A-Frame, I guess - but, trying to coerce glTF into XML so it's part of the HTML of the page would be as crazy as telling JavaScript that it's only allowed to store its state in the DOM and isn't allowed a heap any more.
What you are talking about is not hypermedia. It has no user malleability. You can't as a user go change a vertex. You can easily do that in aframe.
Canvas may be an html element but it's an opaque portal no better than Flash was. It's a low level hack to jump outside of the hypermedia page. The actual web is higher level elements.
Meanwhile, WebSG gives you malleability alongside a perfectly matched API to manipulating glTF. Okay, to browse the resulting object graph you use TR’s inspector rather than your browser’s devtools, but a dedicated 3D editor UI is obviously going to be better than flailing around in the HTML DOM.
Fonts & bitmaps seem like bad counter examples to me, disingenuous. Whether we use every outside resource as an excuse to say this doesn't need to be hypermedium, or whether we look opportunistically to build hypermedium as we can seems like a clash of dispositions.
I can try to check out this TR TP2 but I really think you are being extremely resistant to what makes the web excellent & throwing chaff. There's a lot of shallow prejudice that html should be kept small, is only for X or Y but not Z, and we keep getting better and better & making more & more excellent componentry that defies this eternal limited-minded doomsaying.
The data structure here is glTF.
> Web data structures should ideally be DOM.
WebSG is very close to DOM, as is obvious if you look at https://thirdroom.io/docs/websg-js/classes/WebSG.Node.html - complete with addChild, getChild etc. However, it's tuned for 3D scene graphs rather than ending up shoehorning graphics into the DOM API like SVG does.
Just a Canvas is also not DOM, but instead focuses on the specific problem of providing an API for immediate-mode graphics.