Repository navigation
Conversation
|
I've talked about this PR with some of the other MDN maintainers, and we don't think this feature is ready to be documented on MDN yet (and therefore isn't ready for a review yet). We use two main criteria for deciding when a feature is ready: the extent to which it's implemented in browsers, and the extent to which there's a stable, detailed, specification for it. The key place these criteria are described is https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/What_we_write#when_we_document_a_new_technology . In particular, this lists the following as a reason not to document a feature:
This seems applicable to the spec as it stands: https://immersive-web.github.io/model-element/. I know the PR description here says:
...but the explainer is also not detailed enough to function as a spec. It's my understanding that this is shipping in a technical preview of VisionOS. AFAIK only shipping in a technical preview doesn't count as "shipping" for our purposes, because it doesn't represent evidence that the feature is stable. The underlying reason for these criteria is that we don't want to document things that are likely to change a lot or potentially not be adopted at all. When we document things too early, one of these things happens quite often. I think the best plan would be to mark this PR a draft, and continue to update it as the specification matures, and ask for a review when the specification is stable and it is shipping. |
|
Thank you for the reasoned response, @wbamberg. I’ll aim to revisit this if/when a browser releases the feature and we have a better basis to reason about what the spec needs to clarify. |
|
HTML Model element is now available by default in visionOS 26! Now that more folks will actually be able to see it, I believe we'll be able to start negotiating and filling out specification-class descriptions for multiple vendors to agree on. @wbamberg I'm open to your recommendations as to whether we add detail to MDN piecemeal, as it's added to a spec, or if we can provide the current state as-is and revise/refine once other vendors are in a position to help us define mandatory algorithm structures etc. |
I think it makes sense to wait until the specification is stable and detailed and then file a PR to document the whole thing. |
|
We need to set a deadline for this: if the API does not meet our documentation criteria by then, then we need to close this PR until it does. When would be good? I'm thinking when this PR becomes 6 months old, so Dec 5th. |
|
I just noticed this comment:
So, we would be expecting at least 1-2 years before even a draft spec is available, after which there's still an unknown timespan for editors review, during which time it's entirely possible for the feature to change. So I don't think it's productive for MDN to wait for that. FYI MDN encourages the spec PR to be merged before you start working on content; it's definitely fine for you to work on this in advance but we won't want to allocate resources for it, and a place in the PR queue counts as a resource. Temporal has gone down that path: its initial docs were written in around 2018, 7 years before its official release, and during that time it sat as a branch in a forked repo and the main repo allocates zero resources for it. |
|
I think it's a mistake to not document
It would be great if technologies were treated consistently, regardless of which vendor it comes from. |
|
Safari 27 is shipping model on macOS/iOS in addition to on visionOS (which shipped last year): https://webkit.org/blog/17967/news-from-wwdc26-webkit-in-safari-27-beta/#spatial-web so the likelihood of change is lesser. |
|
Both of those things being documented is somewhat controversial internally, especially since the future of Happy to reopen if there is browser compat data. |
|
Let's reopen this PR:
It's here to stay, even if in just one browser. It happens. But developers still need documentation to be able to implement these features. |
|
@Josh-Cena Could we re-open this given there is compat data? Thanks! |
|
|
||
| The **`HTMLModelElement.stageMode`** property reflects the [`stagemode`](/en-US/docs/Web/HTML/Reference/Elements/model#stagemode) HTML attribute, which indicates the current stage mode for the model element. | ||
|
|
||
| ### Value |
There was a problem hiding this comment.
[markdownlint] reported by reviewdog 🐶
error MD001/heading-increment Heading levels should only increment by one level at a time [Expected: h2; Actual: h3]
|
I tend to agree... if the Google ones are in, then this should be in. Otherwise, the Google ones should be removed also. MDN has a long history of clearly publishing experimental things, but also clearly marking them as such. |
|
Shall we continue with this one? |
Yes. NOw there is compat data this is reviewable. I won't have bandwidth for this until my FF project review queue is fixed, but it is now on my list/radar. Probably later next week. |
This branch is a clean rebuild of the substantive content about the `HTML Model element` from the earlier PR at mdn#39710 where I had alterations to a .lock file. Since I'm not familiar enough with Git to revert one single file in the overall process, I thought it would be best to start fresh. Apologies for the clutter!
Promote the first h3 to the h2 it should be
37486f0 to
fc4788b
Compare
|
We should continue this one, but realistically I won't even be present for a review for a month. Unassigning myself. |
|
I'll try to get this mergeable before end of month. @estelle do you intend to do reviews or should I just take this over? |
|
Thank you to everyone participating in this! I am available to make any required changes or answer any questions about the underlying features. Especially following TPAC, there has been a lot of positive movement in the spec and other potential implementations coming forth. |
Josh-Cena
left a comment
There was a problem hiding this comment.
A few comments about overall structure. Did not read too closely
|
|
||
| {{APIRef("HTML DOM")}} | ||
|
|
||
| The **`HTMLModelElement.autoplay`** property reflects the [`autoplay`](/en-US/docs/Web/HTML/Reference/Elements/model#autoplay) HTML attribute, indicating whether playback should automatically begin as soon as the model resource is ready and renderable. |
There was a problem hiding this comment.
Use the following structure:
The
autoplayproperty of the {{domxref("HTMLModelElement")}} interface indicates ... It reflects the {{HTMLElement("model")}} element'sautoplaycontent attribute.
|
|
||
| ```js | ||
| // false is the default value | ||
| document.querySelector("#model").autoplay = false; |
There was a problem hiding this comment.
If it's the default then this example is useless. It should set to true instead, or just show reading the value.
|
|
||
| ## See also | ||
|
|
||
| - {{domxref("HTMLModelElement")}}: Interface used to define the `HTMLModelElement.autoplay` property |
There was a problem hiding this comment.
We don't add descriptions. Just link to HTMLModelElement
| ## See also | ||
|
|
||
| - {{domxref("HTMLModelElement")}}: Interface used to define the `HTMLModelElement.autoplay` property | ||
| - {{HTMLElement("audio")}}, {{HTMLElement("video")}} |
There was a problem hiding this comment.
Weird link targets. Maybe link to their autoplay IDL properties. In general, we avoid linking to HTML docs from API docs as much as possible to avoid confusion and change of context.
|
|
||
| {{APIRef("HTML DOM")}} | ||
|
|
||
| Once a model resource is ready and renderable, the **`HTMLModelElement.boundingBoxCenter`** property indicates the center of the axis-aligned bounding box (AABB) of a model resource's contents, irrespective of their size. |
There was a problem hiding this comment.
Again, all intro paragraphs must begin with "The boundingBoxCenter property of the {{domxref("HTMLModelElement")}} interface indicates..."
| <table><tr><td> | ||
|
|
||
|  | ||
| An equirectangular projection of Earth | ||
|
|
||
| </td><td> | ||
|
|
||
|  | ||
| The projection of the equirectangular back to a sphere | ||
|
|
||
| </td></tr></table> |
There was a problem hiding this comment.
If you want to use a table, the image and its caption should be separate rows
|
|
||
| ```html | ||
| <model | ||
| environmentMap="grassland.exr" |
There was a problem hiding this comment.
HTML attributes are lowercase
|
|
||
| - Transform is **`orbit-fit`**: | ||
| The scale and position reflected by the model's `entityTransform` is forced to be centered on its `boundingBoxCenter` and to accommodate the full size of the model's `boundingBoxExtents`. This differs to - and is likely smaller than - the model's default, [object fit](/en-US/docs/Web/HTML/Reference/Elements/model#object_fit) transformation. | ||
|
|
There was a problem hiding this comment.
Never add line breaks between list items
| > [!NOTE] | ||
| > While environment map resources are provided as images, an appropriate resource should contain a very high dynamic range of luminance values, and may not be appropriate to display directly. | ||
|
|
||
| - [`autoplay`](/en-US/docs/Web/API/HTMLModelElement/autoplay) |
There was a problem hiding this comment.
We don't link to IDL properties from the HTML docs to avoid the implication that the API docs document HTML. You should keep the API docs as thin as possible, and move anything substantial to this HTML page. See for example: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt, https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset
| ```html live-sample___basic-model | ||
| <model alt="a model of a teapot"> | ||
| <source src="./teapot.usdz" type="model/vnd.usdz+zip" /> | ||
| <source src="./teapot.glb" type="model/gltf+binary" /> | ||
| <img src="./teapot-fallback.png" alt="a fallback image of the 3D teapot" /> | ||
| </model> | ||
| ``` | ||
|
|
||
| {{EmbedLiveSample('basic-model')}} |
There was a problem hiding this comment.
You have no assets so this live sample can't work.
|
Hi, would you have time to look at the suggestions this week? If not, I'll just make any edits myself as I see fit. |
( This is a rebuild of the Model element PR from #39710 )
Preface to the new PR
This branch is a clean rebuild of the substantive content about the HTML Model element from the earlier PR at #39710
where I had alterations to a
.lockfile. Since I'm not familiar enough with Git to revert one single file in the overall process, I thought it would be best to start fresh. Apologies for the clutter!Description
This PR adds API documentation about the proposed HTML Model element, a browser-native feature for the in-line display of 3D content. It includes illustrations of some core concepts like perspective, lighting and appropriate file formats.
Motivation
The Model element is a totally new web feature and it'll be exceptionally difficult to add documentation in a piecemeal fashion. I'm hoping that this covers the core concepts enough to author new pages from, and matches the MDN house style well enough that other folks can improve them to the point that they are real!
Additional details
I am submitting provisional documentation for the HTML model element, a feature that is the major source of discussion in the W3C Immersive Web CG (https://github.com/immersive-web/model-element/ )
and which is available as a feature preview in visionOS 2.4. I am an editor of the specification and have been facilitating the discussion around it.
While the specification doesn’t have a lot of detail, the API in visionOS is based on the consensus discussion in the CG, and is described in the Model Element explainer: (https://github.com/immersive-web/model-element/blob/main/explainer.md )
There is also a WebGL/WebXR-based interactive explainer demo available here:
https://immersive-web.github.io/model-element/explainer_demo.html
We also have public samples being contributed by multiple browser vendors in the model element samples repository.
https://immersive-web.github.io/model-element-samples/
We have previously submitted related additions to the WHATWG HTML specification as via an introductory issue and initial PR for the specification stub.
whatwg/html#10901
whatwg/html#11191
Related issues and pull requests
WHATWG/HTML
modelelement for display of inline 3D models whatwg/html#11191the Web Platform Tests repository
HTML-ARIA