added l: and uv: primitive to mediafragments

This commit is contained in:
Leon van Kammen 2024-02-02 13:51:50 +00:00
parent 0e6eb302fe
commit 01a4814149
11 changed files with 335 additions and 216 deletions

View File

@ -497,16 +497,44 @@ That way, if the link gets shared, the XR Fragments implementation at <code>http
<tr>
<td>temporal W3C media fragment *</td>
<td>t=x,y, &hellip;</td>
<td>0,1,4,5</td>
<td>XD parameters: pass values as positional uniform values to shader (if loaded with <code>src</code>)</td>
<td>t=[uv:][l:][pl:]x,y,&hellip;</td>
<td><sub>0,1,4,5</sub></td>
<td>XD parameters: play [or scroll uvcoordinates] [as loop] or [as pingpongloop] between <code>x</code> and <code>y</code></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>more args (<code>...</code>) means passing all values as positional uniform values to shader in case its loaded with <code>src</code>)</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>uv-coordinate playback equals <code>U = xywh.x + (t.x*(s.x/fps))</code> and <code>V = t.y*(s.y/fps)</code></td>
</tr>
<tr>
<td>temporal W3C media fragment *</td>
<td>s=x,y, &hellip;</td>
<td>1,1,1,1</td>
<td>XD speed: set playback speed of audio/video (or uv-coordinate texturescroll)</td>
<td>s=[uv:]x, &hellip;</td>
<td><sub>1,1,1,1</sub></td>
<td>XD speed: set playback speed of audio/video [or uv-coordinates]</td>
</tr>
<tr>
<td></td>
<td></td>
<td>uv:1,1</td>
<td>(texture)scroll uv-coordinates with <code>0.1</code> units/per second</td>
</tr>
<tr>
<td>temporal W3C media fragment</td>
<td>xywh=x,y,w,h</td>
<td>0,0,1,1</td>
<td>crop (uv) coordinates (default for uv-coordinates is <code>0,0,1,1</code>)</td>
</tr>
</tbody>
</table>
@ -525,24 +553,34 @@ That way, if the link gets shared, the XR Fragments implementation at <code>http
<tbody>
<tr>
<td>multidimensional values beyond <code>t=x,y</code></td>
<td>allows passing temporal mediafragment values as shader-uniforms (like <a href="https://isf.video/">IFS parameters</a>).</td>
<td><code>l:</code> specifices loop</td>
<td><code>t=0,2</code> specifies oneshot-play (default) whereas <code>t=l:0,2</code> indicates looped-play</td>
</tr>
<tr>
<td></td>
<td>The temporal relationship is that shaders are &lsquo;players&rsquo; too, but which require loose-coupled positional values (parameters) for temporal control (like <a href="https://isf.video/">IFS parameters</a>)</td>
<td><code>pl:</code> specifices pingpongloop</td>
<td><code>t=0,2</code> specifies oneshot-play (default) whereas <code>t=pl:0,2</code> indicates looped-play</td>
</tr>
<tr>
<td><code>~</code> specifies loop</td>
<td><code>t=0,2</code> specifies oneshot-play (default) whereas <code>t=~0,2</code> indicates looped-play</td>
<td><code>uv:</code> specifies uv-coordinates</td>
<td><code>t=0,2</code> specifies <code>src</code> loaded media (or 3D animations in 3D models) whereas <code>t=uv:0,1</code> plays uv-coordinate texturescroller</td>
</tr>
<tr>
<td><code>s</code> specifies speed</td>
<td>being able to specify loop(speed) of audio/video/uv timeline-coordinates which is <code>1,[[1],[1]]</code> by default (translates to uv-coordinate <code>0.1</code> units p/second)</td>
</tr>
<tr>
<td><code>t=x,y,...</code> forwarded as shadervalues</td>
<td><code>t=x,y,...</code> values are forwarded as positional shader-uniform values (like <a href="https://isf.video/">IFS parameters</a>).</td>
</tr>
<tr>
<td></td>
<td>The rationale that shaders are temporal &lsquo;players&rsquo; too, but which require loose-coupled positional values (parameters) for temporal control (like <a href="https://isf.video/">IFS parameters</a>)</td>
</tr>
</tbody>
</table>
@ -557,23 +595,22 @@ That way, if the link gets shared, the XR Fragments implementation at <code>http
│ │ └ href: #media.play&amp;wall.calm │ trigger #play on object 'media' and #calm on 'wall'
│ │ │
│ ├── ◻ plane │
│ │ └ src: foo.jpg#t=~0,0.2&amp;xywh=0.2,0.2,0.4,0.4 │ texturescroll between uv-coordinate `0.2,0.2` and `0.4,0.4`
│ │ └ src: foo.jpg#t=uv:l:0,0.2&amp;s=1 │ infinite texturescroll `v` of uv-coordinates with 0.2/fps
│ │ │ with u-speed `0.1` and v-speed `0.1` (`#s` defaults) units p/second
│ │ │
│ ├── ◻ media │
│ │ ├ play: #t=0 │ play cat.mp4 from 0 sec
│ │ ├ stop: #t=0,0 │ stop
│ │ ├ loop: #t=~1,2&amp;s=2 │ loop cat.mp4 between 1 and 2 sec with double speed
│ │ ├ loop: #t=l:1,2&amp;s=2 │ loop cat.mp4 between 1 and 2 sec with double speed
│ │ ├ crop: #xywh=0,0,0.5,0.5 │ crop uv-coordinates
│ │ ├ #: #play │ apply default XR fragment (on load)
│ │ │ │
│ │ └ src: cat.mp4#t=~2,10 │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds
│ │ └ src: cat.mp4#t=l:2,10 │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds
│ │ │
│ └── ◻ wall │
│ ├ href: #calm │
│ ├ calm: #t=1,2,3,4 &gt;-----+--&gt; updates uniform values (IFS shader e.g.)
│ ├ #: #calm │ apply default XR Fragment (on load)
│ └ src: ://a.com/art.fs#t=0,0,0,0 │ .fs/.vs/.glsl/.wgsl etc
│ ├ calm: #t=1,2,3,4 &gt;--+--+--&gt; updates uniform values (IFS shader e.g.)
│ ├ #: #calm | │ apply default XR Fragment (on load)
│ └ src: ://a.com/art.fs#t=0,0,0,0 &gt;--- │ .fs/.vs/.glsl/.wgsl etc
│ │
│ │
+──────────────────────────────────────────────────────────+

View File

@ -266,23 +266,29 @@ These are automatic fragment-to-metadata mappings, which only trigger if the 3D
> NOTE: below the word 'play' applies to 3D animations embedded in the 3D scene(file) **but also** media defined in `src`-metadata like audio/video-files (mp3/mp4 e.g.)
| type | syntax | example | info |
|-------------------------------|-----------------------------|-----------------|----------------------|
|-------------------------------|------------------------|-----------------|----------------------|
| vector2 | x,y | 2,3.0 | 2-dimensional vector |
| vector3 | x,y,z | 2,3.0,4 | 3-dimensional vector |
| temporal W3C media fragment | t=x | 0 | 1D parameters: play from 0 seconds to end (and stop) |
| temporal W3C media fragment | t=x,y | 0,2 | 1D parameters: play from 0 seconds till 2 seconds (and stop) |
| temporal W3C media fragment * | t=x,y, ... | 0,1,4,5 | XD parameters: pass values as positional uniform values to shader (if loaded with `src`) |
| temporal W3C media fragment * | s=x,y, ... | 1,1,1,1 | XD speed: set playback speed of audio/video (or uv-coordinate texturescroll) |
| temporal W3C media fragment * | t=[uv:][l:]x,y,... | l:0,1,4,5 | XD parameters: play [or scroll uvcoordinates] [as loop] between `x` and `y` |
| | | | more args (`...`) means passing all values as positional uniform values to shader in case its loaded with `src`) |
| | | | uv-coordinate playback equals `U = xywh.x + (t.x*(s.x/fps))` and `V = t.y*(s.y/fps)` |
| temporal W3C media fragment * | s=[uv:]x, ... | 1,1,1,1 | XD speed: set playback speed of audio/video [or uv-coordinates] |
| | | uv:1,1 | (texture)scroll uv-coordinates with `0.1` units/per second |
| temporal W3C media fragment | xywh=x,y,w,h | 0,0,1,1 | crop (uv) coordinates (default for uv-coordinates is `0,0,1,1`) |
> \* = this is extending the [W3C media fragments](https://www.w3.org/TR/media-frags/#mf-advanced) with:
| extension | info |
|------------------|---------|
| multidimensional values beyond `t=x,y` | allows passing temporal mediafragment values as shader-uniforms (like [IFS parameters](https://isf.video/)). |
| | The temporal relationship is that shaders are 'players' too, but which require loose-coupled positional values (parameters) for temporal control (like [IFS parameters](https://isf.video/)) |
| `~` specifies loop | `t=0,2` specifies oneshot-play (default) whereas `t=~0,2` indicates looped-play |
| `l:` specifices loop | `t=0,2` specifies oneshot-play (default) whereas `t=l:0,2` indicates looped-play |
| `uv:` specifies uv-coordinates | `t=0,2` specifies `src` loaded media (or 3D animations in 3D models) whereas `t=uv:0,1` plays uv-coordinate texturescroller |
| `s` specifies speed | being able to specify loop(speed) of audio/video/uv timeline-coordinates which is `1,[[1],[1]]` by default (translates to uv-coordinate `0.1` units p/second) |
| `t=x,y,...` forwarded as shadervalues | `t=x,y,...` values are forwarded as positional shader-uniform values (like [IFS parameters](https://isf.video/)). |
| | The rationale that shaders are temporal 'players' too, but which require loose-coupled positional values (parameters) for temporal control (like [IFS parameters](https://isf.video/)) |
```
@ -297,23 +303,22 @@ These are automatic fragment-to-metadata mappings, which only trigger if the 3D
│ │ └ href: #media.play&wall.calm │ trigger #play on object 'media' and #calm on 'wall'
│ │ │
│ ├── ◻ plane │
│ │ └ src: foo.jpg#t=~0,0.2&xywh=0.2,0.2,0.4,0.4 │ texturescroll between uv-coordinate `0.2,0.2` and `0.4,0.4`
│ │ └ src: foo.jpg#t=uv:l:0,0.2&s=1 │ infinite texturescroll `v` of uv-coordinates with 0.2/fps
│ │ │ with u-speed `0.1` and v-speed `0.1` (`#s` defaults) units p/second
│ │ │
│ ├── ◻ media │
│ │ ├ play: #t=0 │ play cat.mp4 from 0 sec
│ │ ├ stop: #t=0,0 │ stop
│ │ ├ loop: #t=~1,2&s=2 │ loop cat.mp4 between 1 and 2 sec with double speed
│ │ ├ loop: #t=l:1,2&s=2 │ loop cat.mp4 between 1 and 2 sec with double speed
│ │ ├ crop: #xywh=0,0,0.5,0.5 │ crop uv-coordinates
│ │ ├ #: #play │ apply default XR fragment (on load)
│ │ │ │
│ │ └ src: cat.mp4#t=~2,10 │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds
│ │ └ src: cat.mp4#t=l:2,10 │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds
│ │ │
│ └── ◻ wall │
│ ├ href: #calm
│ ├ calm: #t=1,2,3,4 >-----+--> updates uniform values (IFS shader e.g.)
│ ├ #: #calm │ apply default XR Fragment (on load)
│ └ src: ://a.com/art.fs#t=0,0,0,0 │ .fs/.vs/.glsl/.wgsl etc
│ ├ calm: #t=1,2,3,4 >--+--+--> updates uniform values (IFS shader e.g.)
│ ├ #: #calm | │ apply default XR Fragment (on load)
│ └ src: ://a.com/art.fs#t=0,0,0,0 >--- │ .fs/.vs/.glsl/.wgsl etc
│ │
│ │
+──────────────────────────────────────────────────────────+

View File

@ -77,33 +77,33 @@ Table of Contents
4.1. List of metadata for 3D nodes . . . . . . . . . . . . . . 8
4.2. Dynamic XR Fragments (+databindings) . . . . . . . . . . 8
4.3. media fragments and datatypes . . . . . . . . . . . . . . 9
5. Spatial Referencing 3D . . . . . . . . . . . . . . . . . . . 12
6. Navigating 3D . . . . . . . . . . . . . . . . . . . . . . . . 13
7. Top-level URL processing . . . . . . . . . . . . . . . . . . 14
8. Embedding XR content using src . . . . . . . . . . . . . . . 15
9. Navigating content href portals . . . . . . . . . . . . . . . 17
9.1. Walking surfaces . . . . . . . . . . . . . . . . . . . . 19
9.2. UX spec . . . . . . . . . . . . . . . . . . . . . . . . . 19
9.3. Scaling instanced content . . . . . . . . . . . . . . . . 19
10. XR Fragment: pos . . . . . . . . . . . . . . . . . . . . . . 20
11. XR Fragment: rot . . . . . . . . . . . . . . . . . . . . . . 20
12. XR Fragment: t . . . . . . . . . . . . . . . . . . . . . . . 20
13. XR audio/video integration . . . . . . . . . . . . . . . . . 21
14. XR Fragment filters . . . . . . . . . . . . . . . . . . . . . 21
14.1. including/excluding . . . . . . . . . . . . . . . . . . 22
14.2. Filter Parser . . . . . . . . . . . . . . . . . . . . . 22
15. Visible links . . . . . . . . . . . . . . . . . . . . . . . . 23
16. Text in XR (tagging,linking to spatial objects) . . . . . . . 23
16.1. Default Data URI mimetype . . . . . . . . . . . . . . . 27
16.2. URL and Data URI . . . . . . . . . . . . . . . . . . . . 28
16.3. XR Text example parser . . . . . . . . . . . . . . . . . 29
17. Transclusion (broken link) resolution . . . . . . . . . . . . 31
18. Topic-based index-less Webrings . . . . . . . . . . . . . . . 32
19. Security Considerations . . . . . . . . . . . . . . . . . . . 33
20. FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
21. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34
22. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 34
23. Appendix: Definitions . . . . . . . . . . . . . . . . . . . . 34
5. Spatial Referencing 3D . . . . . . . . . . . . . . . . . . . 13
6. Navigating 3D . . . . . . . . . . . . . . . . . . . . . . . . 14
7. Top-level URL processing . . . . . . . . . . . . . . . . . . 15
8. Embedding XR content using src . . . . . . . . . . . . . . . 16
9. Navigating content href portals . . . . . . . . . . . . . . . 18
9.1. Walking surfaces . . . . . . . . . . . . . . . . . . . . 20
9.2. UX spec . . . . . . . . . . . . . . . . . . . . . . . . . 20
9.3. Scaling instanced content . . . . . . . . . . . . . . . . 20
10. XR Fragment: pos . . . . . . . . . . . . . . . . . . . . . . 21
11. XR Fragment: rot . . . . . . . . . . . . . . . . . . . . . . 21
12. XR Fragment: t . . . . . . . . . . . . . . . . . . . . . . . 21
13. XR audio/video integration . . . . . . . . . . . . . . . . . 22
14. XR Fragment filters . . . . . . . . . . . . . . . . . . . . . 22
14.1. including/excluding . . . . . . . . . . . . . . . . . . 23
14.2. Filter Parser . . . . . . . . . . . . . . . . . . . . . 23
15. Visible links . . . . . . . . . . . . . . . . . . . . . . . . 24
16. Text in XR (tagging,linking to spatial objects) . . . . . . . 24
16.1. Default Data URI mimetype . . . . . . . . . . . . . . . 28
16.2. URL and Data URI . . . . . . . . . . . . . . . . . . . . 29
16.3. XR Text example parser . . . . . . . . . . . . . . . . . 30
17. Transclusion (broken link) resolution . . . . . . . . . . . . 32
18. Topic-based index-less Webrings . . . . . . . . . . . . . . . 33
19. Security Considerations . . . . . . . . . . . . . . . . . . . 34
20. FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
21. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35
22. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 35
23. Appendix: Definitions . . . . . . . . . . . . . . . . . . . . 35
@ -506,29 +506,75 @@ van Kammen Expires 5 August 2024 [Page 9]
Internet-Draft XR Fragments February 2024
+================+========+=========+===============================+
| type | syntax | example | info |
+================+========+=========+===============================+
| vector2 | x,y | 2,3.0 | 2-dimensional vector |
+----------------+--------+---------+-------------------------------+
| vector3 | x,y,z | 2,3.0,4 | 3-dimensional vector |
+----------------+--------+---------+-------------------------------+
| temporal | t=x | 0 | 1D parameters: play from 0 |
| W3C media | | | seconds to end (and stop) |
| fragment | | | |
+----------------+--------+---------+-------------------------------+
| temporal | t=x,y | 0,2 | 1D parameters: play from 0 |
| W3C media | | | seconds till 2 seconds (and |
| fragment | | | stop) |
+----------------+--------+---------+-------------------------------+
| temporal | t=x,y, | 0,1,4,5 | XD parameters: pass values as |
| W3C media | ... | | positional uniform values to |
| fragment * | | | shader (if loaded with src) |
+----------------+--------+---------+-------------------------------+
| temporal | s=x,y, | 1,1,1,1 | XD speed: set playback speed |
| W3C media | ... | | of audio/video (or uv- |
| fragment * | | | coordinate texturescroll) |
+----------------+--------+---------+-------------------------------+
+========+=========================+============+=================+
|type | syntax | example | info |
+========+=========================+============+=================+
|vector2 | x,y | 2,3.0 | 2-dimensional |
| | | | vector |
+--------+-------------------------+------------+-----------------+
|vector3 | x,y,z | 2,3.0,4 | 3-dimensional |
| | | | vector |
+--------+-------------------------+------------+-----------------+
|temporal| t=x | 0 | 1D parameters: |
|W3C | | | play from 0 |
|media | | | seconds to end |
|fragment| | | (and stop) |
+--------+-------------------------+------------+-----------------+
|temporal| t=x,y | 0,2 | 1D parameters: |
|W3C | | | play from 0 |
|media | | | seconds till 2 |
|fragment| | | seconds (and |
| | | | stop) |
+--------+-------------------------+------------+-----------------+
|temporal| t=[uv:][l:][pl:]x,y,... | _(0,1,4,5) | XD parameters: |
|W3C | | | play [or scroll |
|media | | | uvcoordinates] |
|fragment| | | [as loop] or |
|* | | | [as |
| | | | pingpongloop] |
| | | | between x and y |
+--------+-------------------------+------------+-----------------+
| | | | more args (...) |
| | | | means passing |
| | | | all values as |
| | | | positional |
| | | | uniform values |
| | | | to shader in |
| | | | case its loaded |
| | | | with src) |
+--------+-------------------------+------------+-----------------+
| | | | uv-coordinate |
| | | | playback equals |
| | | | U = xywh.x + |
| | | | (t.x*(s.x/fps)) |
| | | | and V = |
| | | | t.y*(s.y/fps) |
+--------+-------------------------+------------+-----------------+
|temporal| s=[uv:]x, ... | _(1,1,1,1) | XD speed: set |
|W3C | | | playback speed |
|media | | | of audio/video |
|fragment| | | [or uv- |
van Kammen Expires 5 August 2024 [Page 10]
Internet-Draft XR Fragments February 2024
|* | | | coordinates] |
+--------+-------------------------+------------+-----------------+
| | | uv:1,1 | (texture)scroll |
| | | | uv-coordinates |
| | | | with 0.1 units/ |
| | | | per second |
+--------+-------------------------+------------+-----------------+
|temporal| xywh=x,y,w,h | 0,0,1,1 | crop (uv) |
|W3C | | | coordinates |
|media | | | (default for |
|fragment| | | uv-coordinates |
| | | | is 0,0,1,1) |
+--------+-------------------------+------------+-----------------+
Table 6
@ -554,52 +600,6 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 10]
Internet-Draft XR Fragments February 2024
+==================+=========================================+
| extension | info |
+==================+=========================================+
| multidimensional | allows passing temporal mediafragment |
| values beyond | values as shader-uniforms (like IFS |
| t=x,y | parameters (https://isf.video/)). |
+------------------+-----------------------------------------+
| | The temporal relationship is that |
| | shaders are 'players' too, but which |
| | require loose-coupled positional values |
| | (parameters) for temporal control (like |
| | IFS parameters (https://isf.video/)) |
+------------------+-----------------------------------------+
| ~ specifies loop | t=0,2 specifies oneshot-play (default) |
| | whereas t=~0,2 indicates looped-play |
+------------------+-----------------------------------------+
| s specifies | being able to specify loop(speed) of |
| speed | audio/video/uv timeline-coordinates |
| | which is 1,[[1],[1]] by default |
| | (translates to uv-coordinate 0.1 units |
| | p/second) |
+------------------+-----------------------------------------+
Table 7
@ -618,6 +618,62 @@ van Kammen Expires 5 August 2024 [Page 11]
Internet-Draft XR Fragments February 2024
+================+===========================================+
| extension | info |
+================+===========================================+
| l: specifices | t=0,2 specifies oneshot-play (default) |
| loop | whereas t=l:0,2 indicates looped-play |
+----------------+-------------------------------------------+
| pl: specifices | t=0,2 specifies oneshot-play (default) |
| pingpongloop | whereas t=pl:0,2 indicates looped-play |
+----------------+-------------------------------------------+
| uv: specifies | t=0,2 specifies src loaded media (or 3D |
| uv-coordinates | animations in 3D models) whereas t=uv:0,1 |
| | plays uv-coordinate texturescroller |
+----------------+-------------------------------------------+
| s specifies | being able to specify loop(speed) of |
| speed | audio/video/uv timeline-coordinates which |
| | is 1,[[1],[1]] by default (translates to |
| | uv-coordinate 0.1 units p/second) |
+----------------+-------------------------------------------+
| t=x,y,... | t=x,y,... values are forwarded as |
| forwarded as | positional shader-uniform values (like |
| shadervalues | IFS parameters (https://isf.video/)). |
+----------------+-------------------------------------------+
| | The rationale that shaders are temporal |
| | 'players' too, but which require loose- |
| | coupled positional values (parameters) |
| | for temporal control (like IFS parameters |
| | (https://isf.video/)) |
+----------------+-------------------------------------------+
Table 7
van Kammen Expires 5 August 2024 [Page 12]
Internet-Draft XR Fragments February 2024
+──────────────────────────────────────────────────────────+
│ │
│ index.gltf#playall │
@ -629,23 +685,22 @@ Internet-Draft XR Fragments February 2024
│ │ └ href: #media.play&wall.calm │ trigger #play on object 'media' and #calm on 'wall'
│ │ │
│ ├── ◻ plane │
│ │ └ src: foo.jpg#t=~0,0.2&xywh=0.2,0.2,0.4,0.4 │ texturescroll between uv-coordinate `0.2,0.2` and `0.4,0.4`
│ │ └ src: foo.jpg#t=uv:l:0,0.2&s=1 │ infinite texturescroll `v` of uv-coordinates with 0.2/fps
│ │ │ with u-speed `0.1` and v-speed `0.1` (`#s` defaults) units p/second
│ │ │
│ ├── ◻ media │
│ │ ├ play: #t=0 │ play cat.mp4 from 0 sec
│ │ ├ stop: #t=0,0 │ stop
│ │ ├ loop: #t=~1,2&s=2 │ loop cat.mp4 between 1 and 2 sec with double speed
│ │ ├ loop: #t=l:1,2&s=2 │ loop cat.mp4 between 1 and 2 sec with double speed
│ │ ├ crop: #xywh=0,0,0.5,0.5 │ crop uv-coordinates
│ │ ├ #: #play │ apply default XR fragment (on load)
│ │ │ │
│ │ └ src: cat.mp4#t=~2,10 │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds
│ │ └ src: cat.mp4#t=l:2,10 │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds
│ │ │
│ └── ◻ wall │
│ ├ href: #calm │
│ ├ calm: #t=1,2,3,4 >-----+--> updates uniform values (IFS shader e.g.)
│ ├ #: #calm │ apply default XR Fragment (on load)
│ └ src: ://a.com/art.fs#t=0,0,0,0 │ .fs/.vs/.glsl/.wgsl etc
│ ├ calm: #t=1,2,3,4 >--+--+--> updates uniform values (IFS shader e.g.)
│ ├ #: #calm | │ apply default XR Fragment (on load)
│ └ src: ://a.com/art.fs#t=0,0,0,0 >--- │ .fs/.vs/.glsl/.wgsl etc
│ │
│ │
+──────────────────────────────────────────────────────────+
@ -669,7 +724,8 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 12]
van Kammen Expires 5 August 2024 [Page 13]
Internet-Draft XR Fragments February 2024
@ -725,7 +781,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 13]
van Kammen Expires 5 August 2024 [Page 14]
Internet-Draft XR Fragments February 2024
@ -781,7 +837,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 14]
van Kammen Expires 5 August 2024 [Page 15]
Internet-Draft XR Fragments February 2024
@ -837,7 +893,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 15]
van Kammen Expires 5 August 2024 [Page 16]
Internet-Draft XR Fragments February 2024
@ -893,7 +949,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 16]
van Kammen Expires 5 August 2024 [Page 17]
Internet-Draft XR Fragments February 2024
@ -949,7 +1005,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 17]
van Kammen Expires 5 August 2024 [Page 18]
Internet-Draft XR Fragments February 2024
@ -1005,7 +1061,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 18]
van Kammen Expires 5 August 2024 [Page 19]
Internet-Draft XR Fragments February 2024
@ -1061,7 +1117,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 19]
van Kammen Expires 5 August 2024 [Page 20]
Internet-Draft XR Fragments February 2024
@ -1117,7 +1173,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 20]
van Kammen Expires 5 August 2024 [Page 21]
Internet-Draft XR Fragments February 2024
@ -1173,7 +1229,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 21]
van Kammen Expires 5 August 2024 [Page 22]
Internet-Draft XR Fragments February 2024
@ -1229,7 +1285,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 22]
van Kammen Expires 5 August 2024 [Page 23]
Internet-Draft XR Fragments February 2024
@ -1285,7 +1341,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 23]
van Kammen Expires 5 August 2024 [Page 24]
Internet-Draft XR Fragments February 2024
@ -1341,7 +1397,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 24]
van Kammen Expires 5 August 2024 [Page 25]
Internet-Draft XR Fragments February 2024
@ -1397,7 +1453,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 25]
van Kammen Expires 5 August 2024 [Page 26]
Internet-Draft XR Fragments February 2024
@ -1453,7 +1509,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 26]
van Kammen Expires 5 August 2024 [Page 27]
Internet-Draft XR Fragments February 2024
@ -1509,7 +1565,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 27]
van Kammen Expires 5 August 2024 [Page 28]
Internet-Draft XR Fragments February 2024
@ -1565,7 +1621,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 28]
van Kammen Expires 5 August 2024 [Page 29]
Internet-Draft XR Fragments February 2024
@ -1621,7 +1677,7 @@ xrtext = {
van Kammen Expires 5 August 2024 [Page 29]
van Kammen Expires 5 August 2024 [Page 30]
Internet-Draft XR Fragments February 2024
@ -1677,7 +1733,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 30]
van Kammen Expires 5 August 2024 [Page 31]
Internet-Draft XR Fragments February 2024
@ -1733,7 +1789,7 @@ console.log( xrtext.encode(text,tags) ) // multiplex text & bibtex back to
van Kammen Expires 5 August 2024 [Page 31]
van Kammen Expires 5 August 2024 [Page 32]
Internet-Draft XR Fragments February 2024
@ -1789,7 +1845,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 32]
van Kammen Expires 5 August 2024 [Page 33]
Internet-Draft XR Fragments February 2024
@ -1845,7 +1901,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 33]
van Kammen Expires 5 August 2024 [Page 34]
Internet-Draft XR Fragments February 2024
@ -1901,7 +1957,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 34]
van Kammen Expires 5 August 2024 [Page 35]
Internet-Draft XR Fragments February 2024
@ -1957,7 +2013,7 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 35]
van Kammen Expires 5 August 2024 [Page 36]
Internet-Draft XR Fragments February 2024
@ -2013,4 +2069,4 @@ Internet-Draft XR Fragments February 2024
van Kammen Expires 5 August 2024 [Page 36]
van Kammen Expires 5 August 2024 [Page 37]

View File

@ -403,16 +403,44 @@ That way, if the link gets shared, the XR Fragments implementation at <tt>https:
<tr>
<td>temporal W3C media fragment *</td>
<td>t=x,y, ...</td>
<td>0,1,4,5</td>
<td>XD parameters: pass values as positional uniform values to shader (if loaded with <tt>src</tt>)</td>
<td>t=[uv:][l:][pl:]x,y,...</td>
<td><sub>0,1,4,5</sub></td>
<td>XD parameters: play [or scroll uvcoordinates] [as loop] or [as pingpongloop] between <tt>x</tt> and <tt>y</tt></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>more args (<tt>...</tt>) means passing all values as positional uniform values to shader in case its loaded with <tt>src</tt>)</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>uv-coordinate playback equals <tt>U = xywh.x + (t.x*(s.x/fps))</tt> and <tt>V = t.y*(s.y/fps)</tt></td>
</tr>
<tr>
<td>temporal W3C media fragment *</td>
<td>s=x,y, ...</td>
<td>1,1,1,1</td>
<td>XD speed: set playback speed of audio/video (or uv-coordinate texturescroll)</td>
<td>s=[uv:]x, ...</td>
<td><sub>1,1,1,1</sub></td>
<td>XD speed: set playback speed of audio/video [or uv-coordinates]</td>
</tr>
<tr>
<td></td>
<td></td>
<td>uv:1,1</td>
<td>(texture)scroll uv-coordinates with <tt>0.1</tt> units/per second</td>
</tr>
<tr>
<td>temporal W3C media fragment</td>
<td>xywh=x,y,w,h</td>
<td>0,0,1,1</td>
<td>crop (uv) coordinates (default for uv-coordinates is <tt>0,0,1,1</tt>)</td>
</tr>
</tbody>
</table><blockquote><t>* = this is extending the <eref target="https://www.w3.org/TR/media-frags/#mf-advanced">W3C media fragments</eref> with:</t>
@ -426,24 +454,34 @@ That way, if the link gets shared, the XR Fragments implementation at <tt>https:
<tbody>
<tr>
<td>multidimensional values beyond <tt>t=x,y</tt></td>
<td>allows passing temporal mediafragment values as shader-uniforms (like <eref target="https://isf.video/">IFS parameters</eref>).</td>
<td><tt>l:</tt> specifices loop</td>
<td><tt>t=0,2</tt> specifies oneshot-play (default) whereas <tt>t=l:0,2</tt> indicates looped-play</td>
</tr>
<tr>
<td></td>
<td>The temporal relationship is that shaders are 'players' too, but which require loose-coupled positional values (parameters) for temporal control (like <eref target="https://isf.video/">IFS parameters</eref>)</td>
<td><tt>pl:</tt> specifices pingpongloop</td>
<td><tt>t=0,2</tt> specifies oneshot-play (default) whereas <tt>t=pl:0,2</tt> indicates looped-play</td>
</tr>
<tr>
<td><tt>~</tt> specifies loop</td>
<td><tt>t=0,2</tt> specifies oneshot-play (default) whereas <tt>t=~0,2</tt> indicates looped-play</td>
<td><tt>uv:</tt> specifies uv-coordinates</td>
<td><tt>t=0,2</tt> specifies <tt>src</tt> loaded media (or 3D animations in 3D models) whereas <tt>t=uv:0,1</tt> plays uv-coordinate texturescroller</td>
</tr>
<tr>
<td><tt>s</tt> specifies speed</td>
<td>being able to specify loop(speed) of audio/video/uv timeline-coordinates which is <tt>1,[[1],[1]]</tt> by default (translates to uv-coordinate <tt>0.1</tt> units p/second)</td>
</tr>
<tr>
<td><tt>t=x,y,...</tt> forwarded as shadervalues</td>
<td><tt>t=x,y,...</tt> values are forwarded as positional shader-uniform values (like <eref target="https://isf.video/">IFS parameters</eref>).</td>
</tr>
<tr>
<td></td>
<td>The rationale that shaders are temporal 'players' too, but which require loose-coupled positional values (parameters) for temporal control (like <eref target="https://isf.video/">IFS parameters</eref>)</td>
</tr>
</tbody>
</table>
<artwork><![CDATA[ +──────────────────────────────────────────────────────────+
@ -457,23 +495,22 @@ That way, if the link gets shared, the XR Fragments implementation at <tt>https:
│ │ └ href: #media.play&wall.calm │ trigger #play on object 'media' and #calm on 'wall'
│ │ │
│ ├── ◻ plane │
│ │ └ src: foo.jpg#t=~0,0.2&xywh=0.2,0.2,0.4,0.4 │ texturescroll between uv-coordinate `0.2,0.2` and `0.4,0.4`
│ │ └ src: foo.jpg#t=uv:l:0,0.2&s=1 │ infinite texturescroll `v` of uv-coordinates with 0.2/fps
│ │ │ with u-speed `0.1` and v-speed `0.1` (`#s` defaults) units p/second
│ │ │
│ ├── ◻ media │
│ │ ├ play: #t=0 │ play cat.mp4 from 0 sec
│ │ ├ stop: #t=0,0 │ stop
│ │ ├ loop: #t=~1,2&s=2 │ loop cat.mp4 between 1 and 2 sec with double speed
│ │ ├ loop: #t=l:1,2&s=2 │ loop cat.mp4 between 1 and 2 sec with double speed
│ │ ├ crop: #xywh=0,0,0.5,0.5 │ crop uv-coordinates
│ │ ├ #: #play │ apply default XR fragment (on load)
│ │ │ │
│ │ └ src: cat.mp4#t=~2,10 │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds
│ │ └ src: cat.mp4#t=l:2,10 │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds
│ │ │
│ └── ◻ wall │
│ ├ href: #calm │
│ ├ calm: #t=1,2,3,4 >-----+--> updates uniform values (IFS shader e.g.)
│ ├ #: #calm │ apply default XR Fragment (on load)
│ └ src: ://a.com/art.fs#t=0,0,0,0 │ .fs/.vs/.glsl/.wgsl etc
│ ├ calm: #t=1,2,3,4 >--+--+--> updates uniform values (IFS shader e.g.)
│ ├ #: #calm | │ apply default XR Fragment (on load)
│ └ src: ://a.com/art.fs#t=0,0,0,0 >--- │ .fs/.vs/.glsl/.wgsl etc
│ │
│ │
+──────────────────────────────────────────────────────────+

View File

@ -3,7 +3,7 @@
Internet Engineering Task Force L.R. van Kammen
Internet-Draft 1 February 2024
Internet-Draft 2 February 2024
Intended status: Informational
@ -38,7 +38,7 @@ Status of This Memo
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on 4 August 2024.
This Internet-Draft will expire on 5 August 2024.
Copyright Notice
@ -53,7 +53,7 @@ Copyright Notice
van Kammen Expires 4 August 2024 [Page 1]
van Kammen Expires 5 August 2024 [Page 1]
Internet-Draft XR Macros February 2024
@ -109,7 +109,7 @@ Table of Contents
van Kammen Expires 4 August 2024 [Page 2]
van Kammen Expires 5 August 2024 [Page 2]
Internet-Draft XR Macros February 2024
@ -165,7 +165,7 @@ Internet-Draft XR Macros February 2024
van Kammen Expires 4 August 2024 [Page 3]
van Kammen Expires 5 August 2024 [Page 3]
Internet-Draft XR Macros February 2024
@ -221,7 +221,7 @@ Internet-Draft XR Macros February 2024
van Kammen Expires 4 August 2024 [Page 4]
van Kammen Expires 5 August 2024 [Page 4]
Internet-Draft XR Macros February 2024
@ -277,7 +277,7 @@ Internet-Draft XR Macros February 2024
van Kammen Expires 4 August 2024 [Page 5]
van Kammen Expires 5 August 2024 [Page 5]
Internet-Draft XR Macros February 2024
@ -333,7 +333,7 @@ click object with (`!clickme`:`!foo|!bar|!flop` e.g.)
van Kammen Expires 4 August 2024 [Page 6]
van Kammen Expires 5 August 2024 [Page 6]
Internet-Draft XR Macros February 2024
@ -389,4 +389,4 @@ Internet-Draft XR Macros February 2024
van Kammen Expires 4 August 2024 [Page 7]
van Kammen Expires 5 August 2024 [Page 7]

Binary file not shown.

View File

@ -19,6 +19,7 @@ class Test {
test( "pos.json", Spec.load("src/spec/pos.json") );
test( "t.json", Spec.load("src/spec/t.json") );
test( "xywh.json", Spec.load("src/spec/xywh.json") );
test( "speed.json", Spec.load("src/spec/speed.json") );
test( "filter.selectors.json", Spec.load("src/spec/filter.selectors.json") );
//test( Spec.load("src/spec/tmp.json") );
if( errors > 1 ) trace("\n-----\n[ ] "+errors+" errors :/");
@ -49,8 +50,7 @@ class Test {
if( item.expect.fn == "equal.xyz" ) valid = equalXYZ(res,item);
if( item.expect.fn == "equal.mediafragmentT" ) valid = equalMediaFragment(res,item,"t");
if( item.expect.fn == "equal.mediafragmentXYWH") valid = equalMediaFragment(res,item,"xywh");
if( item.expect.fn == "equal.mediafragmentTSpd") valid = equalMediaFragmentSpd(res,item,"t");
if( item.expect.fn == "equal.mediafragmentXYWHSpd") valid = equalMediaFragmentSpd(res,item,"xywh");
if( item.expect.fn == "equal.mediafragmentSpeed") valid = equalMediaFragment(res,item,"speed");
if( item.expect.fn == "testFilterRoot" ) valid = res.exists(item.expect.input[0]) && res.get(item.expect.input[0]).filter.get().root == item.expect.out;
if( item.expect.fn == "testFilterDeep" ) valid = res.exists(item.expect.input[0]) && res.get(item.expect.input[0]).filter.get().deep == item.expect.out;
var ok:String = valid ? "[ ] " : "[ ] ";
@ -76,14 +76,7 @@ class Test {
static public function equalMediaFragment(res:haxe.DynamicAccess<Dynamic>, item:Dynamic, key:String):Bool {
if( !item.expect.out && !res.get(item.expect.input) ) return true;
else return res.get( key ).floats[ Std.parseInt(item.expect.input) ] == Std.parseInt(item.expect.out);
}
static public function equalMediaFragmentSpd(res:haxe.DynamicAccess<Dynamic>, item:Dynamic, key:String ):Bool {
if( !item.expect.out && !res.get(item.expect.input) ) return true;
else{
return res.get( key ).speed[ Std.parseInt(item.expect.input) ] == Std.parseFloat(item.expect.out);
}
else return res.get( key ).floats[ Std.parseInt(item.expect.input) ] == Std.parseFloat(item.expect.out);
}
static public function testUrl():Void {

3
src/spec/speed.json Normal file
View File

@ -0,0 +1,3 @@
[
{"fn":"url","data":"http://foo.com?foo=1#speed=0,0,1.2,1", "expect":{ "fn":"equal.mediafragmentSpeed", "input":"2","out":"1.2"},"label":"speed"}
]

View File

@ -7,6 +7,5 @@
{"fn":"url","data":"http://foo.com?foo=1#t=1,-2,3", "expect":{ "fn":"equal.xyz", "input":"t","out":"1,-2,3"},"label":"a equal.xyz"},
{"fn":"url","data":"http://foo.com?foo=1#t=1,100", "expect":{ "fn":"equal.xy", "input":"t","out":"1,100"},"label":"a equal.xy"},
{"fn":"url","data":"http://foo.com?foo=1#t=2,500", "expect":{ "fn":"testBrowserOverride", "input":"t","out":true},"label":"browser URI can override t (defined in asset)"},
{"fn":"url","data":"http://foo.com?foo=1#t=1,100,400,500*1.2,2.3", "expect":{ "fn":"equal.mediafragmentT", "input":"3","out":"500"},"label":"a equal.mediafragment"},
{"fn":"url","data":"http://foo.com?foo=1#t=1,100,400,500*1.2,2.3", "expect":{ "fn":"equal.mediafragmentTSpd", "input":"1","out":"2.3"},"label":"a equal.mediafragmentSpeed"}
{"fn":"url","data":"http://foo.com?foo=1#t=1,100,400,500*1.2,2.3", "expect":{ "fn":"equal.mediafragmentT", "input":"3","out":"500"},"label":"a equal.mediafragment"}
]

View File

@ -1,5 +1,4 @@
[
{"fn":"url","data":"http://foo.com?foo=1#xywh=0,0,1,1", "expect":{ "fn":"equal.mediafragmentXYWH", "input":"2","out":"1"},"label":"xywh"},
{"fn":"url","data":"http://foo.com?foo=1#xywh=1,100,400,500*1.2,2.3", "expect":{ "fn":"equal.mediafragmentXYWH", "input":"3","out":"500"},"label":"a equal.mediafragment"},
{"fn":"url","data":"http://foo.com?foo=1#xywh=1,100,400,500*1.2,2.3", "expect":{ "fn":"equal.mediafragmentXYWHSpd", "input":"1","out":"2.3"},"label":"a equal.mediafragmentSpeed"}
{"fn":"url","data":"http://foo.com?foo=1#xywh=1,100,400,500", "expect":{ "fn":"equal.mediafragmentXYWH", "input":"3","out":"500"},"label":"a equal.mediafragment"}
]

View File

@ -118,16 +118,6 @@ class XRF {
v.int = Std.parseInt(str);
v.x = cast(v.int);
}
if( isMediaFrag.match(str) ){
var speed:Array<String> = str.split("*");
v.speed = new Array<Float>();
if( speed.length > 1 ){
var values:Array<String> = speed[1].split(",");
for( i in 0...values.length ){
v.speed.push( Std.parseFloat(values[i]) );
}
}
}
v.filter = new Filter(v.fragment+"="+v.string);
}else v.filter = new Filter(v.fragment);
}