main: update documentation
This commit is contained in:
parent
91b08014fa
commit
0dc2b1f2e4
|
@ -181,6 +181,148 @@ Instead of forcing authors to combine 3D/2D objects programmatically (publishing
|
|||
|
||||
<p>Traditional webbrowsers can become 4D document-ready by:</p>
|
||||
|
||||
<h1 id="the-xr-fragments-trinity">The XR Fragments Trinity</h1>
|
||||
|
||||
<p>XR Fragments utilizes URLs:</p>
|
||||
|
||||
<ol>
|
||||
<li>for 3D viewers/browser to manipulate the camera or objects (via URLbar)</li>
|
||||
<li>as <strong>implicit</strong> metadata to reference (nested) objects <strong>inside</strong> 3D scene-file (local and remote)</li>
|
||||
<li>via <strong>explicit</strong> metadata (‘extras’) <strong>inside</strong> 3D scene-files (interaction e.g.) or <strong>outside</strong> 3D scene-files (via <a href="https://en.wikipedia.org/wiki/Sidecar_file">sidecarfile</a>)</li>
|
||||
</ol>
|
||||
|
||||
<h1 id="list-of-uri-fragments">List of URI Fragments</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>fragment</th>
|
||||
<th>type</th>
|
||||
<th>example</th>
|
||||
<th>info</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>#pos</code></td>
|
||||
<td>vector3</td>
|
||||
<td><code>#pos=0.5,0,0</code></td>
|
||||
<td>positions camera (or XR floor) to xyz-coord 0.5,0,0,</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>#rot</code></td>
|
||||
<td>vector3</td>
|
||||
<td><code>#rot=0,90,0</code></td>
|
||||
<td>rotates camera to xyz-coord 0.5,0,0</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><a href="https://www.w3.org/TR/media-frags/">Media Fragments</a></td>
|
||||
<td><a href="#media%20fragments%20and%20datatypes">media fragment</a></td>
|
||||
<td><code>#t=0,2&loop</code></td>
|
||||
<td>play (and loop) 3D animation from 0 seconds till 2 seconds</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>but can also crop, animate & configure uv-coordinates/shader uniforms</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h1 id="list-of-explicit-metadata">List of *<em>explicit</em> metadata</h1>
|
||||
|
||||
<p>These are the possible ‘extras’ for 3D nodes and sidecar-files</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>key</th>
|
||||
<th>type</th>
|
||||
<th>example (JSON)</th>
|
||||
<th>function</th>
|
||||
<th>existing compatibility</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>href</code></td>
|
||||
<td>string</td>
|
||||
<td><code>"href": "b.gltf"</code></td>
|
||||
<td>XR teleport</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>src</code></td>
|
||||
<td>string</td>
|
||||
<td><code>"src": "#cube"</code></td>
|
||||
<td>XR embed / teleport</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>tag</code></td>
|
||||
<td>string</td>
|
||||
<td><code>"tag": "cubes geo"</code></td>
|
||||
<td>tag object (for filter-use / XRWG highlighting)</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>#</code></td>
|
||||
<td>string</td>
|
||||
<td><code>"#": "#mypreset</code></td>
|
||||
<td>trigger default fragment on load</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<blockquote>
|
||||
<p>Supported popular compatible 3D fileformats: <code>.gltf</code>, <code>.obj</code>, <code>.fbx</code>, <code>.usdz</code>, <code>.json</code> (THREE.js), <code>.dae</code> and so on.</p>
|
||||
</blockquote>
|
||||
|
||||
<h2 id="sidecar-file">Sidecar-file</h2>
|
||||
|
||||
<p>Sidecar-file can allow for defining <strong>explicit</strong> XR Fragments metadata, outside of the 3D file.<br>
|
||||
This can be done via a JSON <a href="https://en.wikipedia.org/wiki/Sidecar_file">sidecar-file</a>:</p>
|
||||
|
||||
<ul>
|
||||
<li>experience.glb</li>
|
||||
<li>experience.json</li>
|
||||
</ul>
|
||||
|
||||
<pre><code class="language-json">{
|
||||
"#": "#-penguin",
|
||||
"aria-description": "this scene shows an chair and a hidden penguin",
|
||||
"room/chair": {
|
||||
href: "#penguin"
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<blockquote>
|
||||
<p>This would mean: hide object ‘penguin’ upon scene-load, and show it when the user clicks the chair</p>
|
||||
</blockquote>
|
||||
|
||||
<p>So when loading <code>experience.glb</code> the existence of <code>experience.json</code> is detected, to apply the explicit metadata.<br></p>
|
||||
|
||||
<blockquote>
|
||||
<p>In THREE.js-code this would boil down to:</p>
|
||||
</blockquote>
|
||||
|
||||
<pre><code class="language-javascript"> scene.userData['#'] = "#chair&penguin"
|
||||
scene.getObjectByName("room").getObjectByName("chair").userData.href = "#penguin"
|
||||
|
||||
// now the XR Fragments parser can process the XR Fragments userData 'extras' in the scene
|
||||
</code></pre>
|
||||
|
||||
<h1 id="hypermediatic-feedbackloop-for-xr-browsers">Hypermediatic FeedbackLoop for XR browsers</h1>
|
||||
|
||||
<p><code>href</code> metadata traditionally implies <strong>click</strong> AND <strong>navigate</strong>, however XR Fragments adds stateless <strong>click</strong> (<code>xrf://#....</code>) or <strong>navigate</strong> (<code>xrf://#pos=...</code>)
|
||||
|
@ -361,101 +503,6 @@ For example, to render a portal with a preview-version of the scene, create an 3
|
|||
<p>It also allows <strong>sourceportation</strong>, which basically means the enduser can teleport to the original XR Document of an <code>src</code> embedded object, and see a visible connection to the particular embedded object. Basically an embedded link becoming an outbound link by activating it.</p>
|
||||
</blockquote>
|
||||
|
||||
<h1 id="list-of-uri-fragments">List of URI Fragments</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>fragment</th>
|
||||
<th>type</th>
|
||||
<th>example</th>
|
||||
<th>info</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>#pos</code></td>
|
||||
<td>vector3</td>
|
||||
<td><code>#pos=0.5,0,0</code></td>
|
||||
<td>positions camera (or XR floor) to xyz-coord 0.5,0,0,</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>#rot</code></td>
|
||||
<td>vector3</td>
|
||||
<td><code>#rot=0,90,0</code></td>
|
||||
<td>rotates camera to xyz-coord 0.5,0,0</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><a href="https://www.w3.org/TR/media-frags/">Media Fragments</a></td>
|
||||
<td><a href="#media%20fragments%20and%20datatypes">media fragment</a></td>
|
||||
<td><code>#t=0,2&loop</code></td>
|
||||
<td>play (and loop) 3D animation from 0 seconds till 2 seconds</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>but can also crop, animate & configure uv-coordinates/shader uniforms</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2 id="list-of-metadata-for-3d-nodes">List of metadata for 3D nodes</h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>key</th>
|
||||
<th>type</th>
|
||||
<th>example (JSON)</th>
|
||||
<th>function</th>
|
||||
<th>existing compatibility</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>href</code></td>
|
||||
<td>string</td>
|
||||
<td><code>"href": "b.gltf"</code></td>
|
||||
<td>XR teleport</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>src</code></td>
|
||||
<td>string</td>
|
||||
<td><code>"src": "#cube"</code></td>
|
||||
<td>XR embed / teleport</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>tag</code></td>
|
||||
<td>string</td>
|
||||
<td><code>"tag": "cubes geo"</code></td>
|
||||
<td>tag object (for filter-use / XRWG highlighting)</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><code>#</code></td>
|
||||
<td>string</td>
|
||||
<td><code>"#": "#mypreset</code></td>
|
||||
<td>trigger default fragment on load</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<blockquote>
|
||||
<p>Supported popular compatible 3D fileformats: <code>.gltf</code>, <code>.obj</code>, <code>.fbx</code>, <code>.usdz</code>, <code>.json</code> (THREE.js), <code>.dae</code> and so on.</p>
|
||||
</blockquote>
|
||||
|
||||
<h2 id="fragment-to-metadata-mapping">Fragment-to-metadata mapping</h2>
|
||||
|
||||
<p>These are automatic fragment-to-metadata mappings, which only trigger if the 3D scene metadata matches a specific identifier:</p>
|
||||
|
|
|
@ -188,6 +188,71 @@ Below you can see how this translates back into good-old URLs:
|
|||
|
||||
Traditional webbrowsers can become 4D document-ready by:
|
||||
|
||||
# The XR Fragments Trinity
|
||||
|
||||
XR Fragments utilizes URLs:
|
||||
|
||||
1. for 3D viewers/browser to manipulate the camera or objects (via URLbar)
|
||||
2. as **implicit** metadata to reference (nested) objects **inside** 3D scene-file (local and remote)
|
||||
3. via **explicit** metadata ('extras') **inside** 3D scene-files (interaction e.g.) or **outside** 3D scene-files (via [sidecarfile](https://en.wikipedia.org/wiki/Sidecar_file))
|
||||
|
||||
# List of URI Fragments
|
||||
|
||||
| fragment | type | example | info |
|
||||
|-------------------|------------|--------------------|----------------------------------------------------------------------|
|
||||
| `#pos` | vector3 | `#pos=0.5,0,0` | positions camera (or XR floor) to xyz-coord 0.5,0,0, |
|
||||
| `#rot` | vector3 | `#rot=0,90,0` | rotates camera to xyz-coord 0.5,0,0 |
|
||||
| [Media Fragments](https://www.w3.org/TR/media-frags/) | [media fragment](#media%20fragments%20and%20datatypes) | `#t=0,2&loop` | play (and loop) 3D animation from 0 seconds till 2 seconds|
|
||||
| | | | but can also crop, animate & configure uv-coordinates/shader uniforms |
|
||||
|
||||
# List of **explicit* metadata
|
||||
|
||||
These are the possible 'extras' for 3D nodes and sidecar-files
|
||||
|
||||
| key | type | example (JSON) | function | existing compatibility |
|
||||
|--------------|----------|------------------------|---------------------|----------------------------------------|
|
||||
| `href` | string | `"href": "b.gltf"` | XR teleport | custom property in 3D fileformats |
|
||||
| `src` | string | `"src": "#cube"` | XR embed / teleport | custom property in 3D fileformats |
|
||||
| `tag` | string | `"tag": "cubes geo"` | tag object (for filter-use / XRWG highlighting) | custom property in 3D fileformats |
|
||||
| `#` | string | `"#": "#mypreset` | trigger default fragment on load | custom property in 3D fileformats |
|
||||
|
||||
> Supported popular compatible 3D fileformats: `.gltf`, `.obj`, `.fbx`, `.usdz`, `.json` (THREE.js), `.dae` and so on.
|
||||
|
||||
## Sidecar-file
|
||||
|
||||
Sidecar-file can allow for defining **explicit** XR Fragments metadata, outside of the 3D file.<br>
|
||||
This can be done via a JSON [sidecar-file](https://en.wikipedia.org/wiki/Sidecar_file):
|
||||
|
||||
* experience.glb
|
||||
* experience.json
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"#": "#-penguin",
|
||||
"aria-description": "this scene shows an chair and a hidden penguin",
|
||||
"room/chair": {
|
||||
href: "#penguin"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> This would mean: hide object 'penguin' upon scene-load, and show it when the user clicks the chair
|
||||
|
||||
So when loading `experience.glb` the existence of `experience.json` is detected, to apply the explicit metadata.<br>
|
||||
|
||||
> In THREE.js-code this would boil down to:
|
||||
|
||||
```javascript
|
||||
scene.userData['#'] = "#chair&penguin"
|
||||
scene.getObjectByName("room").getObjectByName("chair").userData.href = "#penguin"
|
||||
|
||||
// now the XR Fragments parser can process the XR Fragments userData 'extras' in the scene
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
# Hypermediatic FeedbackLoop for XR browsers
|
||||
|
||||
`href` metadata traditionally implies **click** AND **navigate**, however XR Fragments adds stateless **click** (`xrf://#....`) or **navigate** (`xrf://#pos=...`)
|
||||
|
@ -280,27 +345,6 @@ For example, to render a portal with a preview-version of the scene, create an 3
|
|||
|
||||
> It also allows **sourceportation**, which basically means the enduser can teleport to the original XR Document of an `src` embedded object, and see a visible connection to the particular embedded object. Basically an embedded link becoming an outbound link by activating it.
|
||||
|
||||
|
||||
# List of URI Fragments
|
||||
|
||||
| fragment | type | example | info |
|
||||
|-------------------|------------|--------------------|----------------------------------------------------------------------|
|
||||
| `#pos` | vector3 | `#pos=0.5,0,0` | positions camera (or XR floor) to xyz-coord 0.5,0,0, |
|
||||
| `#rot` | vector3 | `#rot=0,90,0` | rotates camera to xyz-coord 0.5,0,0 |
|
||||
| [Media Fragments](https://www.w3.org/TR/media-frags/) | [media fragment](#media%20fragments%20and%20datatypes) | `#t=0,2&loop` | play (and loop) 3D animation from 0 seconds till 2 seconds|
|
||||
| | | | but can also crop, animate & configure uv-coordinates/shader uniforms |
|
||||
|
||||
## List of metadata for 3D nodes
|
||||
|
||||
| key | type | example (JSON) | function | existing compatibility |
|
||||
|--------------|----------|------------------------|---------------------|----------------------------------------|
|
||||
| `href` | string | `"href": "b.gltf"` | XR teleport | custom property in 3D fileformats |
|
||||
| `src` | string | `"src": "#cube"` | XR embed / teleport | custom property in 3D fileformats |
|
||||
| `tag` | string | `"tag": "cubes geo"` | tag object (for filter-use / XRWG highlighting) | custom property in 3D fileformats |
|
||||
| `#` | string | `"#": "#mypreset` | trigger default fragment on load | custom property in 3D fileformats |
|
||||
|
||||
> Supported popular compatible 3D fileformats: `.gltf`, `.obj`, `.fbx`, `.usdz`, `.json` (THREE.js), `.dae` and so on.
|
||||
|
||||
## Fragment-to-metadata mapping
|
||||
|
||||
These are automatic fragment-to-metadata mappings, which only trigger if the 3D scene metadata matches a specific identifier:
|
||||
|
@ -1035,6 +1079,7 @@ String-templatevalues are evaluated as per [URI Templates (RFC6570)](https://www
|
|||
|
||||
> This 'separating of mechanism from policy' (unix rule) does **somewhat** break portability of an XR experience, but still prevents (E-waste of) handcoded virtual worlds. It allows for (XR experience) metadata to survive in future 3D engines and scene-fileformats.
|
||||
|
||||
|
||||
# Security Considerations
|
||||
|
||||
The only dynamic parts are [W3C Media Fragments](https://www.w3.org/TR/media-frags/) and [URI Templates (RFC6570)](https://www.rfc-editor.org/rfc/rfc6570).<br>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -109,6 +109,139 @@ But approaches things from a higherlevel feedbackloop/hypermedia browser-perspec
|
|||
</blockquote><t>Traditional webbrowsers can become 4D document-ready by:</t>
|
||||
</section>
|
||||
|
||||
<section anchor="the-xr-fragments-trinity"><name>The XR Fragments Trinity</name>
|
||||
<t>XR Fragments utilizes URLs:</t>
|
||||
|
||||
<ol spacing="compact">
|
||||
<li>for 3D viewers/browser to manipulate the camera or objects (via URLbar)</li>
|
||||
<li>as <strong>implicit</strong> metadata to reference (nested) objects <strong>inside</strong> 3D scene-file (local and remote)</li>
|
||||
<li>via <strong>explicit</strong> metadata ('extras') <strong>inside</strong> 3D scene-files (interaction e.g.) or <strong>outside</strong> 3D scene-files (via <eref target="https://en.wikipedia.org/wiki/Sidecar_file">sidecarfile</eref>)</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section anchor="list-of-uri-fragments"><name>List of URI Fragments</name>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>fragment</th>
|
||||
<th>type</th>
|
||||
<th>example</th>
|
||||
<th>info</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><tt>#pos</tt></td>
|
||||
<td>vector3</td>
|
||||
<td><tt>#pos=0.5,0,0</tt></td>
|
||||
<td>positions camera (or XR floor) to xyz-coord 0.5,0,0,</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>#rot</tt></td>
|
||||
<td>vector3</td>
|
||||
<td><tt>#rot=0,90,0</tt></td>
|
||||
<td>rotates camera to xyz-coord 0.5,0,0</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><eref target="https://www.w3.org/TR/media-frags/">Media Fragments</eref></td>
|
||||
<td><eref target="#media%20fragments%20and%20datatypes">media fragment</eref></td>
|
||||
<td><tt>#t=0,2&loop</tt></td>
|
||||
<td>play (and loop) 3D animation from 0 seconds till 2 seconds</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>but can also crop, animate & configure uv-coordinates/shader uniforms</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></section>
|
||||
|
||||
<section anchor="list-of-explicit-metadata"><name>List of *<em>explicit</em> metadata</name>
|
||||
<t>These are the possible 'extras' for 3D nodes and sidecar-files</t>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>key</th>
|
||||
<th>type</th>
|
||||
<th>example (JSON)</th>
|
||||
<th>function</th>
|
||||
<th>existing compatibility</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><tt>href</tt></td>
|
||||
<td>string</td>
|
||||
<td><tt>"href": "b.gltf"</tt></td>
|
||||
<td>XR teleport</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>src</tt></td>
|
||||
<td>string</td>
|
||||
<td><tt>"src": "#cube"</tt></td>
|
||||
<td>XR embed / teleport</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>tag</tt></td>
|
||||
<td>string</td>
|
||||
<td><tt>"tag": "cubes geo"</tt></td>
|
||||
<td>tag object (for filter-use / XRWG highlighting)</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>#</tt></td>
|
||||
<td>string</td>
|
||||
<td><tt>"#": "#mypreset</tt></td>
|
||||
<td>trigger default fragment on load</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><blockquote><t>Supported popular compatible 3D fileformats: <tt>.gltf</tt>, <tt>.obj</tt>, <tt>.fbx</tt>, <tt>.usdz</tt>, <tt>.json</tt> (THREE.js), <tt>.dae</tt> and so on.</t>
|
||||
</blockquote>
|
||||
<section anchor="sidecar-file"><name>Sidecar-file</name>
|
||||
<t>Sidecar-file can allow for defining <strong>explicit</strong> XR Fragments metadata, outside of the 3D file.<br />
|
||||
|
||||
This can be done via a JSON <eref target="https://en.wikipedia.org/wiki/Sidecar_file">sidecar-file</eref>:</t>
|
||||
|
||||
<ul spacing="compact">
|
||||
<li>experience.glb</li>
|
||||
<li>experience.json</li>
|
||||
</ul>
|
||||
|
||||
<sourcecode type="json"><![CDATA[{
|
||||
"#": "#-penguin",
|
||||
"aria-description": "this scene shows an chair and a hidden penguin",
|
||||
"room/chair": {
|
||||
href: "#penguin"
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</sourcecode>
|
||||
<blockquote><t>This would mean: hide object 'penguin' upon scene-load, and show it when the user clicks the chair</t>
|
||||
</blockquote><t>So when loading <tt>experience.glb</tt> the existence of <tt>experience.json</tt> is detected, to apply the explicit metadata.<br />
|
||||
</t>
|
||||
<blockquote><t>In THREE.js-code this would boil down to:</t>
|
||||
</blockquote>
|
||||
<sourcecode type="javascript"><![CDATA[ scene.userData['#'] = "#chair&penguin"
|
||||
scene.getObjectByName("room").getObjectByName("chair").userData.href = "#penguin"
|
||||
|
||||
// now the XR Fragments parser can process the XR Fragments userData 'extras' in the scene
|
||||
]]>
|
||||
</sourcecode>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section anchor="hypermediatic-feedbackloop-for-xr-browsers"><name>Hypermediatic FeedbackLoop for XR browsers</name>
|
||||
<t><tt>href</tt> metadata traditionally implies <strong>click</strong> AND <strong>navigate</strong>, however XR Fragments adds stateless <strong>click</strong> (<tt>xrf://#....</tt>) or <strong>navigate</strong> (<tt>xrf://#pos=...</tt>)
|
||||
as well (which allows many extra interactions which otherwise need a scripting language). This is known as <strong>hashbus</strong>-only events (see image above).</t>
|
||||
|
@ -266,97 +399,7 @@ For example, to render a portal with a preview-version of the scene, create an 3
|
|||
<li>src: <tt>https://otherworld.gltf#mainobject</tt></li>
|
||||
</ul>
|
||||
<blockquote><t>It also allows <strong>sourceportation</strong>, which basically means the enduser can teleport to the original XR Document of an <tt>src</tt> embedded object, and see a visible connection to the particular embedded object. Basically an embedded link becoming an outbound link by activating it.</t>
|
||||
</blockquote></section>
|
||||
|
||||
<section anchor="list-of-uri-fragments"><name>List of URI Fragments</name>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>fragment</th>
|
||||
<th>type</th>
|
||||
<th>example</th>
|
||||
<th>info</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><tt>#pos</tt></td>
|
||||
<td>vector3</td>
|
||||
<td><tt>#pos=0.5,0,0</tt></td>
|
||||
<td>positions camera (or XR floor) to xyz-coord 0.5,0,0,</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>#rot</tt></td>
|
||||
<td>vector3</td>
|
||||
<td><tt>#rot=0,90,0</tt></td>
|
||||
<td>rotates camera to xyz-coord 0.5,0,0</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><eref target="https://www.w3.org/TR/media-frags/">Media Fragments</eref></td>
|
||||
<td><eref target="#media%20fragments%20and%20datatypes">media fragment</eref></td>
|
||||
<td><tt>#t=0,2&loop</tt></td>
|
||||
<td>play (and loop) 3D animation from 0 seconds till 2 seconds</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>but can also crop, animate & configure uv-coordinates/shader uniforms</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<section anchor="list-of-metadata-for-3d-nodes"><name>List of metadata for 3D nodes</name>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>key</th>
|
||||
<th>type</th>
|
||||
<th>example (JSON)</th>
|
||||
<th>function</th>
|
||||
<th>existing compatibility</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><tt>href</tt></td>
|
||||
<td>string</td>
|
||||
<td><tt>"href": "b.gltf"</tt></td>
|
||||
<td>XR teleport</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>src</tt></td>
|
||||
<td>string</td>
|
||||
<td><tt>"src": "#cube"</tt></td>
|
||||
<td>XR embed / teleport</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>tag</tt></td>
|
||||
<td>string</td>
|
||||
<td><tt>"tag": "cubes geo"</tt></td>
|
||||
<td>tag object (for filter-use / XRWG highlighting)</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><tt>#</tt></td>
|
||||
<td>string</td>
|
||||
<td><tt>"#": "#mypreset</tt></td>
|
||||
<td>trigger default fragment on load</td>
|
||||
<td>custom property in 3D fileformats</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><blockquote><t>Supported popular compatible 3D fileformats: <tt>.gltf</tt>, <tt>.obj</tt>, <tt>.fbx</tt>, <tt>.usdz</tt>, <tt>.json</tt> (THREE.js), <tt>.dae</tt> and so on.</t>
|
||||
</blockquote></section>
|
||||
|
||||
</blockquote>
|
||||
<section anchor="fragment-to-metadata-mapping"><name>Fragment-to-metadata mapping</name>
|
||||
<t>These are automatic fragment-to-metadata mappings, which only trigger if the 3D scene metadata matches a specific identifier:</t>
|
||||
<table>
|
||||
|
|
Loading…
Reference in New Issue