milestone 4l. manyfold.sh: add default 3D assets/templates from XR Fragments (milestone)

This commit is contained in:
Leon van Kammen 2025-09-01 18:03:35 +02:00
parent 2c981e4060
commit a64694edc0
4 changed files with 85 additions and 99 deletions

View file

@ -731,21 +731,9 @@ The sidecar will define (or <strong>override</strong> already existing) extras,
<tbody> <tbody>
<tr> <tr>
<td><b>#pos</b>=0,0,0</td> <td><b>#</b>=room1</td>
<td>vector3</td>
<td>position camera to 0,0,0 (+userheight in VR)</td>
</tr>
<tr>
<td><b>#pos</b>=room</td>
<td>string</td> <td>string</td>
<td>position camera to position of objectname <code>room</code> (+userheight in VR)</td> <td>position camera to position of objectname <code>room1</code> (+userheight in VR)</td>
</tr>
<tr>
<td><b>#rot</b>=0,90,0</td>
<td>vector3</td>
<td>rotate camera</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -755,16 +743,10 @@ The sidecar will define (or <strong>override</strong> already existing) extras,
<p>Here&rsquo;s the basic <strong>level1</strong> flow (with optional level2 features):</p> <p>Here&rsquo;s the basic <strong>level1</strong> flow (with optional level2 features):</p>
<ol> <ol>
<li>the Y-coordinate of <code>pos</code> identifies the floorposition. This means that desktop-projections usually need to add 1.5m (average person height) on top (which is done automatically by VR/AR headsets), except in case of camera-switching.</li> <li>the Y-coordinate of `room1 identifies the floorposition. This means that desktop-projections usually need to add 1.5m (average person height) on top (which is done automatically by VR/AR headsets), except in case of camera-switching.</li>
<li>set the position of the camera accordingly to the vector3 values of <code>#pos</code></li> <li>set the position of the camera accordingly to the vector3 values of <code>room1</code></li>
<li>if the referenced <code>#pos</code> object is animated, parent the current camera to that object (so it animates too)</li> <li>if the referenced <code>#room1</code> object is animated, parent the current camera to that object (so it animates too)</li>
<li><code>rot</code> sets the rotation of the camera (only for non-VR/AR headsets, however a camera-value overrules this)</li> <li>in case a <code>href</code> does not mention any 3D object, the current position will be assumed</li>
<li><strong>level2</strong>: mediafragment <code>t</code> in the top-URL sets the playbackspeed and animation-range of the global scene animation</li>
<li>before scene load: the scene is cleared</li>
<li><strong>level2</strong>: after scene load: in case the scene (rootnode) contains an <code>#</code> default view with a fragment value: execute non-positional fragments via the hashbus (no top-level URL change)</li>
<li><strong>level2</strong>: after scene load: in case the scene (rootnode) contains an <code>#</code> default view with a fragment value: execute positional fragment via the hashbus + update top-level URL</li>
<li><strong>level2</strong>: in case of no default <code>#</code> view on the scene (rootnode), default player(rig) position <code>0,0,0</code> is assumed.</li>
<li>in case a <code>href</code> does not mention any <code>pos</code>-coordinate, the current position will be assumed</li>
</ol> </ol>
<p>Here&rsquo;s an ascii representation of a 3D scene-graph which contains 3D objects <code></code> and their metadata:</p> <p>Here&rsquo;s an ascii representation of a 3D scene-graph which contains 3D objects <code></code> and their metadata:</p>
@ -786,6 +768,17 @@ The sidecar will define (or <strong>override</strong> already existing) extras,
<p>An XR Fragment-compatible browser viewing this scene, allows the end-user to interact with the <code>buttonA</code> and <code>buttonB</code>.<br> <p>An XR Fragment-compatible browser viewing this scene, allows the end-user to interact with the <code>buttonA</code> and <code>buttonB</code>.<br>
In case of <code>buttonA</code> the end-user will be teleported to another location and time in the <strong>current loaded scene</strong>, but <code>buttonB</code> will <strong>replace the current scene</strong> with a new one, like <code>other.fbx</code>, and assume camera coordinate <code>0,0,0</code></p> In case of <code>buttonA</code> the end-user will be teleported to another location and time in the <strong>current loaded scene</strong>, but <code>buttonB</code> will <strong>replace the current scene</strong> with a new one, like <code>other.fbx</code>, and assume camera coordinate <code>0,0,0</code></p>
<p><strong>Non-normative</strong>:</p>
<ol start="5">
<li><code>rot</code> sets the rotation of the camera (only for non-VR/AR headsets, however a camera-value overrules this)</li>
<li><strong>level2</strong>: mediafragment <code>t</code> in the top-URL sets the playbackspeed and animation-range of the global scene animation</li>
<li>before scene load: the scene is cleared</li>
<li><strong>level2</strong>: after scene load: in case the scene (rootnode) contains an <code>#</code> default view with a fragment value: execute non-positional fragments via the hashbus (no top-level URL change)</li>
<li><strong>level2</strong>: after scene load: in case the scene (rootnode) contains an <code>#</code> default view with a fragment value: execute positional fragment via the hashbus + update top-level URL</li>
<li><strong>level2</strong>: in case of no default <code>#</code> view on the scene (rootnode), default player(rig) position <code>0,0,0</code> is assumed.</li>
</ol>
<h1 id="top-level-url-processing">Top-level URL processing</h1> <h1 id="top-level-url-processing">Top-level URL processing</h1>
<blockquote> <blockquote>

View file

@ -442,25 +442,17 @@ Example URI's:
| fragment | type | functionality | | fragment | type | functionality |
|----------|--------|------------------------------| |----------|--------|------------------------------|
| <b>#pos</b>=0,0,0 | vector3 |position camera to 0,0,0 (+userheight in VR) | | <b>#</b>=room1 | string | position camera to position of objectname `room1` (+userheight in VR) |
| <b>#pos</b>=room | string | position camera to position of objectname `room` (+userheight in VR) |
| <b>#rot</b>=0,90,0 | vector3 | rotate camera |
[» example implementation](https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/pos.js)<br> [» example implementation](https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/pos.js)<br>
[» discussion](https://github.com/coderofsalvation/xrfragment/issues/5)<br> [» discussion](https://github.com/coderofsalvation/xrfragment/issues/5)<br>
Here's the basic **level1** flow (with optional level2 features): Here's the basic **level1** flow (with optional level2 features):
1. the Y-coordinate of `pos` identifies the floorposition. This means that desktop-projections usually need to add 1.5m (average person height) on top (which is done automatically by VR/AR headsets), except in case of camera-switching. 1. the Y-coordinate of `room1 identifies the floorposition. This means that desktop-projections usually need to add 1.5m (average person height) on top (which is done automatically by VR/AR headsets), except in case of camera-switching.
2. set the position of the camera accordingly to the vector3 values of `#pos` 2. set the position of the camera accordingly to the vector3 values of `room1`
3. if the referenced `#pos` object is animated, parent the current camera to that object (so it animates too) 3. if the referenced `#room1` object is animated, parent the current camera to that object (so it animates too)
4. `rot` sets the rotation of the camera (only for non-VR/AR headsets, however a camera-value overrules this) 4. in case a `href` does not mention any 3D object, the current position will be assumed
5. **level2**: mediafragment `t` in the top-URL sets the playbackspeed and animation-range of the global scene animation
6. before scene load: the scene is cleared
7. **level2**: after scene load: in case the scene (rootnode) contains an `#` default view with a fragment value: execute non-positional fragments via the hashbus (no top-level URL change)
8. **level2**: after scene load: in case the scene (rootnode) contains an `#` default view with a fragment value: execute positional fragment via the hashbus + update top-level URL
9. **level2**: in case of no default `#` view on the scene (rootnode), default player(rig) position `0,0,0` is assumed.
10. in case a `href` does not mention any `pos`-coordinate, the current position will be assumed
Here's an ascii representation of a 3D scene-graph which contains 3D objects `◻` and their metadata: Here's an ascii representation of a 3D scene-graph which contains 3D objects `◻` and their metadata:
@ -482,6 +474,15 @@ Here's an ascii representation of a 3D scene-graph which contains 3D objects `
An XR Fragment-compatible browser viewing this scene, allows the end-user to interact with the `buttonA` and `buttonB`.<br> An XR Fragment-compatible browser viewing this scene, allows the end-user to interact with the `buttonA` and `buttonB`.<br>
In case of `buttonA` the end-user will be teleported to another location and time in the **current loaded scene**, but `buttonB` will **replace the current scene** with a new one, like `other.fbx`, and assume camera coordinate `0,0,0` In case of `buttonA` the end-user will be teleported to another location and time in the **current loaded scene**, but `buttonB` will **replace the current scene** with a new one, like `other.fbx`, and assume camera coordinate `0,0,0`
**Non-normative**:
5. `rot` sets the rotation of the camera (only for non-VR/AR headsets, however a camera-value overrules this)
6. **level2**: mediafragment `t` in the top-URL sets the playbackspeed and animation-range of the global scene animation
7. before scene load: the scene is cleared
8. **level2**: after scene load: in case the scene (rootnode) contains an `#` default view with a fragment value: execute non-positional fragments via the hashbus (no top-level URL change)
9. **level2**: after scene load: in case the scene (rootnode) contains an `#` default view with a fragment value: execute positional fragment via the hashbus + update top-level URL
10. **level2**: in case of no default `#` view on the scene (rootnode), default player(rig) position `0,0,0` is assumed.
# Top-level URL processing # Top-level URL processing
> Example URL: `://foo/world.gltf#room1&t=10` > Example URL: `://foo/world.gltf#room1&t=10`

View file

@ -870,18 +870,12 @@ Internet-Draft XR Fragments September 2025
11. Navigating 3D 11. Navigating 3D
+====================+=========+==========================+ +================+========+======================================+
| fragment | type | functionality | | fragment | type | functionality |
+====================+=========+==========================+ +================+========+======================================+
| <b>#pos</b>=0,0,0 | vector3 | position camera to 0,0,0 | | <b>#</b>=room1 | string | position camera to position of |
| | | (+userheight in VR) | | | | objectname room1 (+userheight in VR) |
+--------------------+---------+--------------------------+ +----------------+--------+--------------------------------------+
| <b>#pos</b>=room | string | position camera to |
| | | position of objectname |
| | | room (+userheight in VR) |
+--------------------+---------+--------------------------+
| <b>#rot</b>=0,90,0 | vector3 | rotate camera |
+--------------------+---------+--------------------------+
Table 7 Table 7
@ -891,6 +885,12 @@ Internet-Draft XR Fragments September 2025
» discussion (https://github.com/coderofsalvation/xrfragment/ » discussion (https://github.com/coderofsalvation/xrfragment/
issues/5) issues/5)
Here's the basic *level1* flow (with optional level2 features):
van Kammen Expires 5 March 2026 [Page 16] van Kammen Expires 5 March 2026 [Page 16]
@ -898,30 +898,15 @@ van Kammen Expires 5 March 2026 [Page 16]
Internet-Draft XR Fragments September 2025 Internet-Draft XR Fragments September 2025
Here's the basic *level1* flow (with optional level2 features): 1. the Y-coordinate of `room1 identifies the floorposition. This
1. the Y-coordinate of pos identifies the floorposition. This
means that desktop-projections usually need to add 1.5m (average means that desktop-projections usually need to add 1.5m (average
person height) on top (which is done automatically by VR/AR person height) on top (which is done automatically by VR/AR
headsets), except in case of camera-switching. headsets), except in case of camera-switching.
2. set the position of the camera accordingly to the vector3 values 2. set the position of the camera accordingly to the vector3 values
of #pos of room1
3. if the referenced #pos object is animated, parent the current 3. if the referenced #room1 object is animated, parent the current
camera to that object (so it animates too) camera to that object (so it animates too)
4. rot sets the rotation of the camera (only for non-VR/AR 4. in case a href does not mention any 3D object, the current
headsets, however a camera-value overrules this)
5. *level2*: mediafragment t in the top-URL sets the playbackspeed
and animation-range of the global scene animation
6. before scene load: the scene is cleared
7. *level2*: after scene load: in case the scene (rootnode)
contains an # default view with a fragment value: execute non-
positional fragments via the hashbus (no top-level URL change)
8. *level2*: after scene load: in case the scene (rootnode)
contains an # default view with a fragment value: execute
positional fragment via the hashbus + update top-level URL
9. *level2*: in case of no default # view on the scene (rootnode),
default player(rig) position 0,0,0 is assumed.
10. in case a href does not mention any pos-coordinate, the current
position will be assumed position will be assumed
Here's an ascii representation of a 3D scene-graph which contains 3D Here's an ascii representation of a 3D scene-graph which contains 3D
@ -946,6 +931,21 @@ Internet-Draft XR Fragments September 2025
*replace the current scene* with a new one, like other.fbx, and *replace the current scene* with a new one, like other.fbx, and
assume camera coordinate 0,0,0 assume camera coordinate 0,0,0
*Non-normative*:
5. rot sets the rotation of the camera (only for non-VR/AR headsets,
however a camera-value overrules this)
6. *level2*: mediafragment t in the top-URL sets the playbackspeed
and animation-range of the global scene animation
7. before scene load: the scene is cleared
8. *level2*: after scene load: in case the scene (rootnode) contains
an # default view with a fragment value: execute non-positional
fragments via the hashbus (no top-level URL change)
9. *level2*: after scene load: in case the scene (rootnode) contains
an # default view with a fragment value: execute positional
fragment via the hashbus + update top-level URL
10. *level2*: in case of no default # view on the scene (rootnode),
default player(rig) position 0,0,0 is assumed.

View file

@ -610,21 +610,9 @@ The sidecar will define (or <strong>override</strong> already existing) extras,
<tbody> <tbody>
<tr> <tr>
<td>&lt;b&gt;#pos&lt;/b&gt;=0,0,0</td> <td>&lt;b&gt;#&lt;/b&gt;=room1</td>
<td>vector3</td>
<td>position camera to 0,0,0 (+userheight in VR)</td>
</tr>
<tr>
<td>&lt;b&gt;#pos&lt;/b&gt;=room</td>
<td>string</td> <td>string</td>
<td>position camera to position of objectname <tt>room</tt> (+userheight in VR)</td> <td>position camera to position of objectname <tt>room1</tt> (+userheight in VR)</td>
</tr>
<tr>
<td>&lt;b&gt;#rot&lt;/b&gt;=0,90,0</td>
<td>vector3</td>
<td>rotate camera</td>
</tr> </tr>
</tbody> </tbody>
</table><t><eref target="https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/pos.js">» example implementation</eref><br /> </table><t><eref target="https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/pos.js">» example implementation</eref><br />
@ -634,16 +622,10 @@ The sidecar will define (or <strong>override</strong> already existing) extras,
<t>Here's the basic <strong>level1</strong> flow (with optional level2 features):</t> <t>Here's the basic <strong>level1</strong> flow (with optional level2 features):</t>
<ol spacing="compact"> <ol spacing="compact">
<li>the Y-coordinate of <tt>pos</tt> identifies the floorposition. This means that desktop-projections usually need to add 1.5m (average person height) on top (which is done automatically by VR/AR headsets), except in case of camera-switching.</li> <li>the Y-coordinate of `room1 identifies the floorposition. This means that desktop-projections usually need to add 1.5m (average person height) on top (which is done automatically by VR/AR headsets), except in case of camera-switching.</li>
<li>set the position of the camera accordingly to the vector3 values of <tt>#pos</tt></li> <li>set the position of the camera accordingly to the vector3 values of <tt>room1</tt></li>
<li>if the referenced <tt>#pos</tt> object is animated, parent the current camera to that object (so it animates too)</li> <li>if the referenced <tt>#room1</tt> object is animated, parent the current camera to that object (so it animates too)</li>
<li><tt>rot</tt> sets the rotation of the camera (only for non-VR/AR headsets, however a camera-value overrules this)</li> <li>in case a <tt>href</tt> does not mention any 3D object, the current position will be assumed</li>
<li><strong>level2</strong>: mediafragment <tt>t</tt> in the top-URL sets the playbackspeed and animation-range of the global scene animation</li>
<li>before scene load: the scene is cleared</li>
<li><strong>level2</strong>: after scene load: in case the scene (rootnode) contains an <tt>#</tt> default view with a fragment value: execute non-positional fragments via the hashbus (no top-level URL change)</li>
<li><strong>level2</strong>: after scene load: in case the scene (rootnode) contains an <tt>#</tt> default view with a fragment value: execute positional fragment via the hashbus + update top-level URL</li>
<li><strong>level2</strong>: in case of no default <tt>#</tt> view on the scene (rootnode), default player(rig) position <tt>0,0,0</tt> is assumed.</li>
<li>in case a <tt>href</tt> does not mention any <tt>pos</tt>-coordinate, the current position will be assumed</li>
</ol> </ol>
<t>Here's an ascii representation of a 3D scene-graph which contains 3D objects <tt></tt> and their metadata:</t> <t>Here's an ascii representation of a 3D scene-graph which contains 3D objects <tt></tt> and their metadata:</t>
@ -664,6 +646,16 @@ The sidecar will define (or <strong>override</strong> already existing) extras,
<t>An XR Fragment-compatible browser viewing this scene, allows the end-user to interact with the <tt>buttonA</tt> and <tt>buttonB</tt>.<br /> <t>An XR Fragment-compatible browser viewing this scene, allows the end-user to interact with the <tt>buttonA</tt> and <tt>buttonB</tt>.<br />
In case of <tt>buttonA</tt> the end-user will be teleported to another location and time in the <strong>current loaded scene</strong>, but <tt>buttonB</tt> will <strong>replace the current scene</strong> with a new one, like <tt>other.fbx</tt>, and assume camera coordinate <tt>0,0,0</tt></t> In case of <tt>buttonA</tt> the end-user will be teleported to another location and time in the <strong>current loaded scene</strong>, but <tt>buttonB</tt> will <strong>replace the current scene</strong> with a new one, like <tt>other.fbx</tt>, and assume camera coordinate <tt>0,0,0</tt></t>
<t><strong>Non-normative</strong>:</t>
<ol spacing="compact" start="5">
<li><tt>rot</tt> sets the rotation of the camera (only for non-VR/AR headsets, however a camera-value overrules this)</li>
<li><strong>level2</strong>: mediafragment <tt>t</tt> in the top-URL sets the playbackspeed and animation-range of the global scene animation</li>
<li>before scene load: the scene is cleared</li>
<li><strong>level2</strong>: after scene load: in case the scene (rootnode) contains an <tt>#</tt> default view with a fragment value: execute non-positional fragments via the hashbus (no top-level URL change)</li>
<li><strong>level2</strong>: after scene load: in case the scene (rootnode) contains an <tt>#</tt> default view with a fragment value: execute positional fragment via the hashbus + update top-level URL</li>
<li><strong>level2</strong>: in case of no default <tt>#</tt> view on the scene (rootnode), default player(rig) position <tt>0,0,0</tt> is assumed.</li>
</ol>
</section> </section>
<section anchor="top-level-url-processing"><name>Top-level URL processing</name> <section anchor="top-level-url-processing"><name>Top-level URL processing</name>