Live data from Hacker News

Apple proposes adding "model" element to HTML that displays 3D content

github.com

171–180 of 241 posts

Re: Apple proposes adding "model" element to HTML that displays 3D content

#171

Earlier quoted context omitted.

Seems already possible using a custom web component.

You can also just render a complete OS in a canvas using wasm. Heck, why use the browser at all, just let them download a custom binary... You see where this is going right?

Mistake was made when adding Javascript.

Re: Apple proposes adding "model" element to HTML that displays 3D content

#173

Earlier quoted context omitted.

Apple isn't doing anything that's incompatible with X3D. In fact, they didn't even specify which kinds of models they would accept (there's a `type` on the elements). You could easily point one of those at an X3D file. Sure, you could put an tag into a HTML document, but there's no ` ` equivalent (like you can use with SVG) to load that content from another URI. When dealing with extremely large (byte-wise) or comple…

> Sure, you could put an tag into a HTML document, but there's no ` ` equivalent (like you can use with SVG) to load that content from another URI. Yes, there is, the HTML tag. https://www.web3d.org/x3d/content/HtmlObjectTagForX3d.html

The object tag is problematic because it has a single interface for every supported content type. Want to expose functionality? Can't, unless it's a param that is passed as a string. Having a dedicated element type enables it to be used in many ways (like drawing images to a canvas) that an object tag does not support.

It's also hardly a case of NIH to update a spec with a more specific element than another one in the same spec. We've done this numerous times in the last decade. The object tag isn't an X3D concept.

Re: Apple proposes adding "model" element to HTML that displays 3D content

#174

No need for such an element. It's such a private use case to display 3D models that it's better suited as a web component than an element in the standard. See for example https://modelviewer.dev/

This should be much further up than where I found it!

Re: Apple proposes adding "model" element to HTML that displays 3D content

#175

Earlier quoted context omitted.

Apple isn't doing anything that's incompatible with X3D. In fact, they didn't even specify which kinds of models they would accept (there's a `type` on the elements). You could easily point one of those at an X3D file. Sure, you could put an tag into a HTML document, but there's no ` ` equivalent (like you can use with SVG) to load that content from another URI. When dealing with extremely large (byte-wise) or comple…

Re-iterating the quote from my comment: > X3D is designed to be as integrated into HTML5 pages as other XML standards such as MathML and SVG. X3DOM[...]

And as I said, there's exactly nothing that makes the proposed tag incompatible with that idea. It's just another way of linking to that file. Inlining content is not universally desirable.

Re: Apple proposes adding "model" element to HTML that displays 3D content

#176
post #152

Counterproposal: let's add a new element . It accepts children. You can do and it does... interactive stuff of some sort, but nothing that could be visible from JS because that would leak privacy info, so really it would get direct mouse/keyboard/camera input and do something with it according to the vast list of standardized possibilities. Which would be length 1, because any more than that would be an interoperabil…

Blobs. Enjoy.

https://developer.mozilla.org/en-US/docs/Web/API/Blob

Re: Apple proposes adding "model" element to HTML that displays 3D content

#177

Earlier quoted context omitted.

We have a 3D model format for the web in glTF. This is Apple having Not Invented Here Syndrome again. USD was developed at Pixar, of which Steve Jobs was the founding investor. Apple is the only one who wants USDZ on the Web. Everyone else is already using glTF.

Nvidia are also leaning very hard into USD with their meta- verse project. In that case USD matches requirements perfectly. glTF 2.0 is widely supported although the quality of that support is variable. The spec is fairly large and every tool that exports glTF does so in a subtly different way. For instance Blender adds a rotation transform node before every mesh to convert from Y-up (Blender) to Z-up (glTF). Animati…

Blender is Z-up and glTF is Y-up, but regardless, this is a long standing issue of Blender. These problems exist for all of the model export formats coming out of Blender. How is that glTF's fault?

Re: Apple proposes adding "model" element to HTML that displays 3D content

#178
post #119

Earlier quoted context omitted.

>This proposal does not aim to define a mechanism that allows the creation of a 3D scene within a browser using declarative primitives or a programmatic API. the goal isn't to fully render scenes, it's simply to gain the ability to include a 3d resource in the page semantically. heavier solutions to render scenes already exist.

Seems already possible using a custom web component.

Sure, but that doesn't make standardization useless so people stop reinventing this same wheel over and over again for very basic needs.

Re: Apple proposes adding "model" element to HTML that displays 3D content

#179

Earlier quoted context omitted.

You can also just render a complete OS in a canvas using wasm. Heck, why use the browser at all, just let them download a custom binary... You see where this is going right?

Mistake was made when adding Javascript.

So true. I'd be curious about developing modern web standards without JavaScript. I'm aware of gopher/gemini but somehow i like the semantic aspects of the web.

Re: Apple proposes adding "model" element to HTML that displays 3D content

#180
post #118

Earlier quoted context omitted.

I don't understand why passing a new view matrix to webGL is such a security risk or why that needs to be shared with he site owner. I also think a window with a dynamic view matrix would make more sense in certain cases. Some techniques work when rendered to a surface that would not work in VR, ie screen space effects.

It’s not exactly eye tracking, but you know some advertisers are going to use it to make ads that turn to point directly at you. But I’m not sure the proposed tag is a good idea either. I have not used VR but I think it might be a good thing if web browsers in VR stay flat and can’t take over the space in front or behind them?

> it might be a good thing if web browsers in VR stay flat and can’t take over the space in front or behind them

IMO the preferred implementation would be for the tag to be a window into a 3d space "behind" the browser that's only visible if you look through that window. Maybe a small area in front of the window would also be acceptable. You wouldn't want it taking over space outside its designated area though without either going "fullscreen" or getting some other form of permission.

Post reply on HN