From 1c7c6cc93c1ab8367ebae4613b048502cc9827cc Mon Sep 17 00:00:00 2001 From: Leon van Kammen Date: Mon, 5 Feb 2024 11:17:16 +0100 Subject: [PATCH] update documentation --- doc/RFC_XR_Fragments.html | 139 ++++++------ doc/RFC_XR_Fragments.md | 70 +++--- doc/RFC_XR_Fragments.txt | 434 +++++++++++++++++--------------------- doc/RFC_XR_Fragments.xml | 264 +++++++++++------------ doc/RFC_XR_Macros.txt | 24 +-- doc/RFC_XR_Macros.xml | 6 +- 6 files changed, 425 insertions(+), 512 deletions(-) diff --git a/doc/RFC_XR_Fragments.html b/doc/RFC_XR_Fragments.html index 998c549..b11bf6f 100644 --- a/doc/RFC_XR_Fragments.html +++ b/doc/RFC_XR_Fragments.html @@ -485,49 +485,14 @@ That way, if the link gets shared, the XR Fragments implementation at http temporal W3C media fragment t=x 0 -1D parameters: play from 0 seconds to end (and stop) +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=[uv:][l:][pl:]x,y,… -0,1,4,5 -XD parameters: play [or scroll uvcoordinates] [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 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 +play from 0 seconds till 2 seconds (and stop) @@ -536,11 +501,39 @@ That way, if the link gets shared, the XR Fragments implementation at http 0,0,1,1 crop (uv) coordinates (default for uv-coordinates is 0,0,1,1) + + +temporal W3C media fragment * +t=[l:]x,y +l:0,1 +play [as loop] between x and y + + + +temporal W3C media fragment * +s=x[,y] +1 +set playback speed of audio/video/3D anim + + + +temporal W3C media fragment * +sxy=[l:]x,y +0.1,0.2 +xy scrollspeed of new xywh viewport/uvcoordinates (default 1,1 is instant): allows lerping to new xywh values [or infinite texturescrolling] + + + +temporal W3C media fragment * +u:= +float +vec2 +
-

* = this is extending the W3C media fragments with:

+

* = this is extending the W3C media fragments with finer playback/viewport-control:

@@ -558,62 +551,60 @@ That way, if the link gets shared, the XR Fragments implementation at http - - + + - - + + - - - - - - - - - - - - + +
pl: specifices pingpongloopt=0,2 specifies oneshot-play (default) whereas t=pl:0,2 indicates looped-plays: specifies playback speedbeing able to specify loop(speed) of audio/video/uv timeline-coordinates (default: 1[,1] which translates to uv-coordinate 0.1,0.1 units p/second)
uv: specifies uv-coordinatest=0,2 specifies src loaded media (or 3D animations in 3D models) whereas t=uv:0,1 plays uv-coordinate texturescrollersxy= specifies lerping of xy(wh) valuesallows animated cropping and infinite texturescroll with configurable speed for u/v coordinates
s specifies speedbeing 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 shadervaluest=x,y,... values are forwarded as positional shader-uniform values (like IFS parameters).
The rationale that shaders are temporal ‘players’ too, but which require loose-coupled positional values (parameters) for temporal control (like IFS parameters)u:<uniform>=specifies updating a uniform value
+

Example URI’s:

+ +
    +
  • https://shaders.org/plasma.glsl#t=0&u.col1=1,0,0&u.col2=0,1,0 (red-green shader plasma starts playing from time-offset 0)
  • +
  • https://images.org/credits.jpg#t=0&sxy=l:0,0.1 (infinite vertical texturescrolling)
  • +
  • https://video.org/organogram.mp4#t=0&sxy:0.1,0.1&xywh=500,500,480,640 (animated zoom towards region in video)
  • +
  +──────────────────────────────────────────────────────────+  
   │                                                          │ 
   │  index.gltf#playall                                      │ 
   │    │                                                     │ 
   │    ├ #       : #playall                                  │ apply default XR Fragment on load 
-  │    ├ #playall: #media.play&wall.calm&t=1                 │ here `t` plays the 3D animations inside index.gltf from 1 seconds
+  │    ├ #playall: #media=play&wall=calm&t=1                 │ here `t` plays the 3D animations inside index.gltf from 1 seconds
   │    │                                                     │ 
   │    ├── ◻ playbutton                                      │    
-  │    │      └ href: #media.play&wall.calm                  │ trigger #play on object 'media' and #calm on 'wall' 
-  │    │                                                     │ 
-  │    ├── ◻ plane                                           │    
-  │    │      └ 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=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=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
+  │    │      └ href: #media=play&wall=calm   ·······        │ (re)trigger `play` on object 'media' and `calm` on 'wall' 
+  │    │                                            ·        │ 
+  │    ├── ◻ plane                                  ·        │    
+  │    │      └ src: foo.jpg#sxy=l:0,0.1            ·        │ infinite texturescroll `v` of uv·coordinates with 0.1/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
+  │    │      ├ #:    #play   ···^              ·   ·        │ apply default XR fragment (on load)
+  │    │      ├ stop: #t=0,0          ···········   ·        │ stop 
+  │    │      ├ 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 viewport/uv·coordinates
+  │    │      └ src:  cat.mp4#t=l:2,10  <<·······   ·        │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds
+  │    │                                            ·        │ 
+  │    └── ◻ wall                                   ·        │        
+  │           ├ calm: #u:color=1,0,0    ················     │ updates uniform values (IFS shader e.g.)
+  │           ├ #:    #wall=calm     ···^              ·     │ apply default XR Fragment (on load)
+  │           └ src:  ://a.com/art.fs#sxy:l:0,0.1  <<···     │ .fs/.vs/.glsl/.wgsl etc
   │                                                          │    
   │                                                          │
   +──────────────────────────────────────────────────────────+
+
+> NOTE: node-metadata (without #-prefix) applies XR Fragments to its `src` URL, otherwise it applies it to the browser URL. Full addressibility can be maintained, since top-level `href` values can trigger node-specific aliases (`media=play` e.g.).
+
 

Spatial Referencing 3D

diff --git a/doc/RFC_XR_Fragments.md b/doc/RFC_XR_Fragments.md index 02703ef..08551ce 100644 --- a/doc/RFC_XR_Fragments.md +++ b/doc/RFC_XR_Fragments.md @@ -269,26 +269,29 @@ These are automatic fragment-to-metadata mappings, which only trigger if the 3D |-------------------------------|------------------------|-----------------|----------------------| | 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=[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 | t=x | 0 | play from 0 seconds to end (and stop) | +| temporal W3C media fragment | t=x,y | 0,2 | play from 0 seconds till 2 seconds (and stop) | | 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`) | +| temporal W3C media fragment * | t=[l:]x,y | l:0,1 | play [as loop] between `x` and `y` | +| temporal W3C media fragment * | s=x[,y] | 1 | set playback speed of audio/video/3D anim | +| temporal W3C media fragment * | sxy=[l:]x,y | 0.1,0.2 | xy scrollspeed of new xywh viewport/uvcoordinates (default `1,1` is instant): allows lerping to new `xywh` values [or infinite texturescrolling] | +| temporal W3C media fragment * | u:= | u.color=1,0,0 | set shader uniform value | - -> \* = this is extending the [W3C media fragments](https://www.w3.org/TR/media-frags/#mf-advanced) with: +> \* = this is extending the [W3C media fragments](https://www.w3.org/TR/media-frags/#mf-advanced) with finer playback/viewport-control: | extension | info | |------------------|---------| | `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/)) | +| `s:` specifies playback speed | being able to specify loop(speed) of audio/video/uv timeline-coordinates (default: `1[,1]` which translates to uv-coordinate `0.1,0.1` units p/second) | +| `sxy=` specifies lerping of xy(wh) values | allows animated cropping and infinite texturescroll with configurable speed for u/v coordinates | +| `u:=` | specifies updating a uniform value | + +Example URI's: + +* `https://shaders.org/plasma.glsl#t=0&u.col1=1,0,0&u.col2=0,1,0` (red-green shader plasma starts playing from time-offset 0) +* `https://images.org/credits.jpg#t=0&sxy=l:0,0.1` (infinite vertical texturescrolling) +* `https://video.org/organogram.mp4#t=0&sxy:0.1,0.1&xywh=500,500,480,640` (animated zoom towards region in video) ``` @@ -297,31 +300,32 @@ These are automatic fragment-to-metadata mappings, which only trigger if the 3D │ index.gltf#playall │ │ │ │ │ ├ # : #playall │ apply default XR Fragment on load - │ ├ #playall: #media.play&wall.calm&t=1 │ here `t` plays the 3D animations inside index.gltf from 1 seconds + │ ├ #playall: #media=play&wall=calm&t=1 │ here `t` plays the 3D animations inside index.gltf from 1 seconds │ │ │ │ ├── ◻ playbutton │ - │ │ └ href: #media.play&wall.calm │ trigger #play on object 'media' and #calm on 'wall' - │ │ │ - │ ├── ◻ plane │ - │ │ └ 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=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=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 + │ │ └ href: #media=play&wall=calm ······· │ (re)trigger `play` on object 'media' and `calm` on 'wall' + │ │ · │ + │ ├── ◻ plane · │ + │ │ └ src: foo.jpg#sxy=l:0,0.1 · │ infinite texturescroll `v` of uv·coordinates with 0.1/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 + │ │ ├ #: #play ···^ · · │ apply default XR fragment (on load) + │ │ ├ stop: #t=0,0 ··········· · │ stop + │ │ ├ 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 viewport/uv·coordinates + │ │ └ src: cat.mp4#t=l:2,10 <<······· · │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds + │ │ · │ + │ └── ◻ wall · │ + │ ├ calm: #u:color=1,0,0 ················ │ updates uniform values (IFS shader e.g.) + │ ├ #: #wall=calm ···^ · │ apply default XR Fragment (on load) + │ └ src: ://a.com/art.fs#sxy:l:0,0.1 <<··· │ .fs/.vs/.glsl/.wgsl etc │ │ │ │ +──────────────────────────────────────────────────────────+ + +> NOTE: node-metadata (without #-prefix) applies XR Fragments to its `src` URL, otherwise it applies it to the browser URL. Full addressibility can be maintained, since top-level `href` values can trigger node-specific aliases (`media=play` e.g.). + ``` # Spatial Referencing 3D diff --git a/doc/RFC_XR_Fragments.txt b/doc/RFC_XR_Fragments.txt index 7115c8f..5d086d0 100644 --- a/doc/RFC_XR_Fragments.txt +++ b/doc/RFC_XR_Fragments.txt @@ -3,7 +3,7 @@ Internet Engineering Task Force L.R. van Kammen -Internet-Draft 2 February 2024 +Internet-Draft 5 February 2024 Intended status: Informational @@ -41,7 +41,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 5 August 2024. + This Internet-Draft will expire on 8 August 2024. Copyright Notice @@ -53,7 +53,7 @@ Copyright Notice -van Kammen Expires 5 August 2024 [Page 1] +van Kammen Expires 8 August 2024 [Page 1] Internet-Draft XR Fragments February 2024 @@ -77,39 +77,39 @@ 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 . . . . . . . . . . . . . . . . . . . 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 + 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 -van Kammen Expires 5 August 2024 [Page 2] +van Kammen Expires 8 August 2024 [Page 2] Internet-Draft XR Fragments February 2024 @@ -165,7 +165,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 3] +van Kammen Expires 8 August 2024 [Page 3] Internet-Draft XR Fragments February 2024 @@ -221,7 +221,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 4] +van Kammen Expires 8 August 2024 [Page 4] Internet-Draft XR Fragments February 2024 @@ -277,7 +277,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 5] +van Kammen Expires 8 August 2024 [Page 5] Internet-Draft XR Fragments February 2024 @@ -333,7 +333,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 6] +van Kammen Expires 8 August 2024 [Page 6] Internet-Draft XR Fragments February 2024 @@ -389,7 +389,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 7] +van Kammen Expires 8 August 2024 [Page 7] Internet-Draft XR Fragments February 2024 @@ -445,7 +445,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 8] +van Kammen Expires 8 August 2024 [Page 8] Internet-Draft XR Fragments February 2024 @@ -501,85 +501,109 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 9] +van Kammen Expires 8 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: | - |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- | + +==========+=====================+=========+=====================+ + | 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 | play from 0 seconds | + | W3C | | | to end (and stop) | + | media | | | | + | fragment | | | | + +----------+---------------------+---------+---------------------+ + | temporal | t=x,y | 0,2 | play from 0 seconds | + | W3C | | | till 2 seconds (and | + | media | | | stop) | + | fragment | | | | + +----------+---------------------+---------+---------------------+ + | temporal | xywh=x,y,w,h | 0,0,1,1 | crop (uv) | + | W3C | | | coordinates | + | media | | | (default for uv- | + | fragment | | | coordinates is | + | | | | 0,0,1,1) | + +----------+---------------------+---------+---------------------+ + | temporal | t=[l:]x,y | l:0,1 | play [as loop] | + | W3C | | | between x and y | + | media | | | | + | fragment | | | | + | * | | | | + +----------+---------------------+---------+---------------------+ + | temporal | s=x[,y] | 1 | set playback speed | + | W3C | | | of audio/video/3D | + | media | | | anim | + | fragment | | | | + | * | | | | + +----------+---------------------+---------+---------------------+ + | temporal | sxy=[l:]x,y | 0.1,0.2 | xy scrollspeed of | + | W3C | | | new xywh viewport/ | + | media | | | uvcoordinates | + | fragment | | | (default 1,1 is | + | * | | | instant): allows | + | | | | lerping to new xywh | + | | | | values [or infinite | + | | | | texturescrolling] | + +----------+---------------------+---------+---------------------+ + | temporal | u:== | specifies updating a uniform value | + +---------------+---------------------------------------+ + + Table 7 + + Example URI's: + + * https://shaders.org/plasma.glsl#t=0&u.col1=1,0,0&u.col2=0,1,0 + (red-green shader plasma starts playing from time-offset 0) + * https://images.org/credits.jpg#t=0&sxy=l:0,0.1 (infinite vertical + texturescrolling) + * https://video.org/ + organogram.mp4#t=0&sxy:0.1,0.1&xywh=500,500,480,640 (animated zoom + towards region in video) @@ -589,87 +613,7 @@ Internet-Draft XR Fragments February 2024 - - - - - - - - - - - - - - - - - - - - - - - - -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] +van Kammen Expires 8 August 2024 [Page 11] Internet-Draft XR Fragments February 2024 @@ -679,32 +623,32 @@ Internet-Draft XR Fragments February 2024 │ index.gltf#playall │ │ │ │ │ ├ # : #playall │ apply default XR Fragment on load - │ ├ #playall: #media.play&wall.calm&t=1 │ here `t` plays the 3D animations inside index.gltf from 1 seconds + │ ├ #playall: #media=play&wall=calm&t=1 │ here `t` plays the 3D animations inside index.gltf from 1 seconds │ │ │ │ ├── ◻ playbutton │ - │ │ └ href: #media.play&wall.calm │ trigger #play on object 'media' and #calm on 'wall' - │ │ │ - │ ├── ◻ plane │ - │ │ └ 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=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=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 + │ │ └ href: #media=play&wall=calm ······· │ (re)trigger `play` on object 'media' and `calm` on 'wall' + │ │ · │ + │ ├── ◻ plane · │ + │ │ └ src: foo.jpg#sxy=l:0,0.1 · │ infinite texturescroll `v` of uv·coordinates with 0.1/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 + │ │ ├ #: #play ···^ · · │ apply default XR fragment (on load) + │ │ ├ stop: #t=0,0 ··········· · │ stop + │ │ ├ 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 viewport/uv·coordinates + │ │ └ src: cat.mp4#t=l:2,10 <<······· · │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds + │ │ · │ + │ └── ◻ wall · │ + │ ├ calm: #u:color=1,0,0 ················ │ updates uniform values (IFS shader e.g.) + │ ├ #: #wall=calm ···^ · │ apply default XR Fragment (on load) + │ └ src: ://a.com/art.fs#sxy:l:0,0.1 <<··· │ .fs/.vs/.glsl/.wgsl etc │ │ │ │ +──────────────────────────────────────────────────────────+ +> NOTE: node-metadata (without #-prefix) applies XR Fragments to its `src` URL, otherwise it applies it to the browser URL. Full addressibility can be maintained, since top-level `href` values can trigger node-specific aliases (`media=play` e.g.). + 5. Spatial Referencing 3D XR Fragments assume the following objectname-to-URIFragment mapping: @@ -725,7 +669,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 13] +van Kammen Expires 8 August 2024 [Page 12] Internet-Draft XR Fragments February 2024 @@ -781,15 +725,15 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 14] +van Kammen Expires 8 August 2024 [Page 13] Internet-Draft XR Fragments February 2024 - » example implementation + » example implementation (https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/ three/xrf/pos.js) - » discussion (https://github.com/coderofsalvation/xrfragment/ + » discussion (https://github.com/coderofsalvation/xrfragment/ issues/5) 1. the Y-coordinate of pos identifies the floorposition. This means @@ -805,7 +749,7 @@ Internet-Draft XR Fragments February 2024 coordinate, pos=0,0,0 will be assumed Here's an ascii representation of a 3D scene-graph which contains 3D - objects ◻ and their metadata: + objects ◻ and their metadata: +────────────────────────────────────────────────────────+ │ │ @@ -837,7 +781,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 15] +van Kammen Expires 8 August 2024 [Page 14] Internet-Draft XR Fragments February 2024 @@ -881,8 +825,9 @@ Internet-Draft XR Fragments February 2024 Table 9 - Here's an ascii representation of a 3D scene-graph with 3D objects ◻ - which embeds remote & local 3D objects ◻ with/out using filters: + Here's an ascii representation of a 3D scene-graph with 3D objects + ◻ which embeds remote & local 3D objects ◻ with/out using + filters: @@ -892,8 +837,7 @@ Internet-Draft XR Fragments February 2024 - -van Kammen Expires 5 August 2024 [Page 16] +van Kammen Expires 8 August 2024 [Page 15] Internet-Draft XR Fragments February 2024 @@ -949,7 +893,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 17] +van Kammen Expires 8 August 2024 [Page 16] Internet-Draft XR Fragments February 2024 @@ -985,13 +929,13 @@ Internet-Draft XR Fragments February 2024 * image/jpg * text/plain;charset=utf-8 - » example implementation + » example implementation (https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/ three/xrf/src.js) - » example 3D asset + » example 3D asset (https://github.com/coderofsalvation/xrfragment/blob/main/example/ assets/src.gltf#L192) - » discussion (https://github.com/coderofsalvation/xrfragment/ + » discussion (https://github.com/coderofsalvation/xrfragment/ issues/4) 9. Navigating content href portals @@ -1005,7 +949,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 18] +van Kammen Expires 8 August 2024 [Page 17] Internet-Draft XR Fragments February 2024 @@ -1061,18 +1005,18 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 19] +van Kammen Expires 8 August 2024 [Page 18] Internet-Draft XR Fragments February 2024 - » example implementation + » example implementation (https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/ three/xrf/href.js) - » example 3D asset + » example 3D asset (https://github.com/coderofsalvation/xrfragment/blob/main/example/ assets/href.gltf#L192) - » discussion (https://github.com/coderofsalvation/xrfragment/ + » discussion (https://github.com/coderofsalvation/xrfragment/ issues/1) 9.1. Walking surfaces @@ -1117,7 +1061,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 20] +van Kammen Expires 8 August 2024 [Page 19] Internet-Draft XR Fragments February 2024 @@ -1173,7 +1117,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 21] +van Kammen Expires 8 August 2024 [Page 20] Internet-Draft XR Fragments February 2024 @@ -1229,7 +1173,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 22] +van Kammen Expires 8 August 2024 [Page 21] Internet-Draft XR Fragments February 2024 @@ -1268,11 +1212,11 @@ Internet-Draft XR Fragments February 2024 | colorbuffer (to allow children being still visible while their | parents are invisible). - » example implementation + » example implementation (https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/ - three/xrf/q.js) » example 3D asset + three/xrf/q.js) » example 3D asset (https://github.com/coderofsalvation/xrfragment/blob/main/example/ - assets/filter.gltf#L192) » discussion + assets/filter.gltf#L192) » discussion (https://github.com/coderofsalvation/xrfragment/issues/3) 14.2. Filter Parser @@ -1285,7 +1229,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 23] +van Kammen Expires 8 August 2024 [Page 22] Internet-Draft XR Fragments February 2024 @@ -1341,7 +1285,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 24] +van Kammen Expires 8 August 2024 [Page 23] Internet-Draft XR Fragments February 2024 @@ -1397,7 +1341,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 25] +van Kammen Expires 8 August 2024 [Page 24] Internet-Draft XR Fragments February 2024 @@ -1453,7 +1397,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 26] +van Kammen Expires 8 August 2024 [Page 25] Internet-Draft XR Fragments February 2024 @@ -1509,7 +1453,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 27] +van Kammen Expires 8 August 2024 [Page 26] Internet-Draft XR Fragments February 2024 @@ -1565,7 +1509,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 28] +van Kammen Expires 8 August 2024 [Page 27] Internet-Draft XR Fragments February 2024 @@ -1621,7 +1565,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 29] +van Kammen Expires 8 August 2024 [Page 28] Internet-Draft XR Fragments February 2024 @@ -1677,7 +1621,7 @@ xrtext = { -van Kammen Expires 5 August 2024 [Page 30] +van Kammen Expires 8 August 2024 [Page 29] Internet-Draft XR Fragments February 2024 @@ -1733,7 +1677,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 31] +van Kammen Expires 8 August 2024 [Page 30] Internet-Draft XR Fragments February 2024 @@ -1789,7 +1733,7 @@ console.log( xrtext.encode(text,tags) ) // multiplex text & bibtex back to -van Kammen Expires 5 August 2024 [Page 32] +van Kammen Expires 8 August 2024 [Page 31] Internet-Draft XR Fragments February 2024 @@ -1845,7 +1789,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 33] +van Kammen Expires 8 August 2024 [Page 32] Internet-Draft XR Fragments February 2024 @@ -1901,7 +1845,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 34] +van Kammen Expires 8 August 2024 [Page 33] Internet-Draft XR Fragments February 2024 @@ -1922,7 +1866,7 @@ Internet-Draft XR Fragments February 2024 * Michiel Leenaars * Gerben van der Broeke * Mauve - * Jens Finkhäuser + * Jens Finkhäuser * Marc Belmont * Tim Gerritsen * Frode Hegland @@ -1957,7 +1901,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 35] +van Kammen Expires 8 August 2024 [Page 34] Internet-Draft XR Fragments February 2024 @@ -2013,14 +1957,14 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 36] +van Kammen Expires 8 August 2024 [Page 35] Internet-Draft XR Fragments February 2024 | | is a person who lives in oklahoma") | +-----------------+---------------------------------------------+ - | ◻ | ascii representation of an 3D object/mesh | + | ◻ | ascii representation of an 3D object/mesh | +-----------------+---------------------------------------------+ | (un)obtrusive | obtrusive: wrapping human text/thought in | | | XML/HTML/JSON obfuscates human text into a | @@ -2069,4 +2013,4 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 5 August 2024 [Page 37] +van Kammen Expires 8 August 2024 [Page 36] diff --git a/doc/RFC_XR_Fragments.xml b/doc/RFC_XR_Fragments.xml index e5f15b9..64180c4 100644 --- a/doc/RFC_XR_Fragments.xml +++ b/doc/RFC_XR_Fragments.xml @@ -48,18 +48,18 @@ XR Fragments exploits the fact that all 3D models already contain such metadata: Instead of forcing authors to combine 3D/2D objects programmatically (publishing thru a game-editor e.g.), XR Fragments integrates all which allows a universal viewing experience.
- +───────────────────────────────────────────────────────────────────────────────────────────────+ │ │ │ U R N │ │ U R L | │ │ | |-----------------+--------| │ │ +--------------------------------------------------| │ │ | │ - │ + https://foo.com/some/foo/scene.glb#someview <-- http URI (=URL and has URN) │ + │ + https://foo.com/some/foo/scene.glb#someview <-- http URI (=URL and has URN) │ │ | │ - │ + ipfs://cfe0987ec9r9098ecr/cats.fbx#someview <-- an IPFS URI (=URL and has URN) │ + │ + ipfs://cfe0987ec9r9098ecr/cats.fbx#someview <-- an IPFS URI (=URL and has URN) │ │ │ - │ ec09f7e9cf8e7f09c8e7f98e79c09ef89e000efece8f7ecfe9fe <-- an interpeer URI │ + │ ec09f7e9cf8e7f09c8e7f98e79c09ef89e000efece8f7ecfe9fe <-- an interpeer URI │ │ │ │ │ │ |------------------------+-------------------------| │ @@ -68,20 +68,19 @@ Instead of forcing authors to combine 3D/2D objects programmatically (publishing │ │ +───────────────────────────────────────────────────────────────────────────────────────────────+ -]]> Fact: our typical browser URL's are just a possible implementation of URI's (for untapped humancentric potential of URI's see interpeer.io)
XR Fragments does not look at XR (or the web) thru the lens of HTML or URLs.
But approaches things from a higherlevel feedbackloop/hypermedia browser-perspective.
Below you can see how this translates back into good-old URLs: - +───────────────────────────────────────────────────────────────────────────────────────────────+ │ │ │ the soul of any URL: ://macro /meso ?micro #nano │ │ │ │ 2D URL: ://library.com /document ?search #chapter │ │ │ - │ 4D URL: ://park.com /4Dscene.fbx ─> ?other.glb ─> #view ───> hashbus │ + │ 4D URL: ://park.com /4Dscene.fbx ─> ?other.glb ─> #view ───> hashbus │ │ │ #filter │ │ │ │ #tag │ │ │ │ (hypermediatic) #material │ │ @@ -89,14 +88,13 @@ But approaches things from a higherlevel feedbackloop/hypermedia browser-perspec │ │ ( loop ) #texture │ │ │ │ #variable │ │ │ │ │ │ - │ XRWG <─────────────────────<─────────────+ │ + │ XRWG <─────────────────────<─────────────+ │ │ │ │ │ - │ └─ objects ──────────────>─────────────+ │ + │ └─ objects ──────────────>─────────────+ │ │ │ │ │ +───────────────────────────────────────────────────────────────────────────────────────────────+ -]]>
?-linked and #-linked navigation allows a Hypermediatic FeedbackLoop (HFL) between external and internal 4D navigation.
Traditional webbrowsers can become 4D document-ready by: @@ -174,10 +172,9 @@ But approaches things from a higherlevel feedbackloop/hypermedia browser-perspec
XR Fragment URL Grammar For typical HTTP-like browsers/applications: - +reserved = gen-delims / sub-delims +gen-delims = "#" / "&" +sub-delims = "," / "="
Example: ://foo.com/my3d.gltf#pos=1,0,0&prio=-5&t=0,100
@@ -391,49 +388,14 @@ That way, if the link gets shared, the XR Fragments implementation at https: - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -442,8 +404,36 @@ That way, if the link gets shared, the XR Fragments implementation at https: + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
temporal W3C media fragment t=x 01D parameters: play from 0 seconds to end (and stop)play from 0 seconds to end (and stop)
temporal W3C media fragment t=x,y 0,21D parameters: play from 0 seconds till 2 seconds (and stop)
temporal W3C media fragment *t=[uv:][l:][pl:]x,y,...0,1,4,5XD parameters: play [or scroll uvcoordinates] [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 W3C media fragment *s=[uv:]x, ...1,1,1,1XD speed: set playback speed of audio/video [or uv-coordinates]
uv:1,1(texture)scroll uv-coordinates with 0.1 units/per secondplay from 0 seconds till 2 seconds (and stop)
0,0,1,1 crop (uv) coordinates (default for uv-coordinates is 0,0,1,1)
temporal W3C media fragment *t=[l:]x,yl:0,1play [as loop] between x and y
temporal W3C media fragment *s=x[,y]1set playback speed of audio/video/3D anim
temporal W3C media fragment *sxy=[l:]x,y0.1,0.2xy scrollspeed of new xywh viewport/uvcoordinates (default 1,1 is instant): allows lerping to new xywh values [or infinite texturescrolling]
temporal W3C media fragment *u:<uniform>=<stringfloatvec2
* = this is extending the W3C media fragments with: +
* = this is extending the W3C media fragments with finer playback/viewport-control:
@@ -459,62 +449,59 @@ That way, if the link gets shared, the XR Fragments implementation at https: - - + + - - + + - - - - - - - - - - - - + + -
pl: specifices pingpongloopt=0,2 specifies oneshot-play (default) whereas t=pl:0,2 indicates looped-plays: specifies playback speedbeing able to specify loop(speed) of audio/video/uv timeline-coordinates (default: 1[,1] which translates to uv-coordinate 0.1,0.1 units p/second)
uv: specifies uv-coordinatest=0,2 specifies src loaded media (or 3D animations in 3D models) whereas t=uv:0,1 plays uv-coordinate texturescrollersxy= specifies lerping of xy(wh) valuesallows animated cropping and infinite texturescroll with configurable speed for u/v coordinates
s specifies speedbeing 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 shadervaluest=x,y,... values are forwarded as positional shader-uniform values (like IFS parameters).
The rationale that shaders are temporal 'players' too, but which require loose-coupled positional values (parameters) for temporal control (like IFS parameters)u:<uniform>=specifies updating a uniform value
-Example URI's: + +
    +
  • https://shaders.org/plasma.glsl#t=0&u.col1=1,0,0&u.col2=0,1,0 (red-green shader plasma starts playing from time-offset 0)
  • +
  • https://images.org/credits.jpg#t=0&sxy=l:0,0.1 (infinite vertical texturescrolling)
  • +
  • https://video.org/organogram.mp4#t=0&sxy:0.1,0.1&xywh=500,500,480,640 (animated zoom towards region in video)
  • +
+ + +──────────────────────────────────────────────────────────+ │ │ │ index.gltf#playall │ │ │ │ │ ├ # : #playall │ apply default XR Fragment on load - │ ├ #playall: #media.play&wall.calm&t=1 │ here `t` plays the 3D animations inside index.gltf from 1 seconds + │ ├ #playall: #media=play&wall=calm&t=1 │ here `t` plays the 3D animations inside index.gltf from 1 seconds │ │ │ │ ├── ◻ playbutton │ - │ │ └ href: #media.play&wall.calm │ trigger #play on object 'media' and #calm on 'wall' - │ │ │ - │ ├── ◻ plane │ - │ │ └ 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=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=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 + │ │ └ href: #media=play&wall=calm ······· │ (re)trigger `play` on object 'media' and `calm` on 'wall' + │ │ · │ + │ ├── ◻ plane · │ + │ │ └ src: foo.jpg#sxy=l:0,0.1 · │ infinite texturescroll `v` of uv·coordinates with 0.1/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 + │ │ ├ #: #play ···^ · · │ apply default XR fragment (on load) + │ │ ├ stop: #t=0,0 ··········· · │ stop + │ │ ├ 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 viewport/uv·coordinates + │ │ └ src: cat.mp4#t=l:2,10 <<······· · │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds + │ │ · │ + │ └── ◻ wall · │ + │ ├ calm: #u:color=1,0,0 ················ │ updates uniform values (IFS shader e.g.) + │ ├ #: #wall=calm ···^ · │ apply default XR Fragment (on load) + │ └ src: ://a.com/art.fs#sxy:l:0,0.1 <<··· │ .fs/.vs/.glsl/.wgsl etc │ │ │ │ +──────────────────────────────────────────────────────────+ -]]> + +> NOTE: node-metadata (without #-prefix) applies XR Fragments to its `src` URL, otherwise it applies it to the browser URL. Full addressibility can be maintained, since top-level `href` values can trigger node-specific aliases (`media=play` e.g.). +
@@ -522,7 +509,7 @@ That way, if the link gets shared, the XR Fragments implementation at https:
Spatial Referencing 3D XR Fragments assume the following objectname-to-URIFragment mapping: - my.io/scene.fbx +─────────────────────────────+ │ sky │ src: http://my.io/scene.fbx#sky (includes building,mainobject,floor) @@ -538,7 +525,6 @@ That way, if the link gets shared, the XR Fragments implementation at https: │ +─────────────────────────+ │ +─────────────────────────────+ -]]>
Every 3D fileformat supports named 3D object, and this name allows URLs (fragments) to reference them (and their children objects).
Clever nested design of 3D scenes allow great ways for re-using content, and/or previewing scenes.
@@ -589,19 +575,18 @@ For example, to render a portal with a preview-version of the scene, create an 3 Here's an ascii representation of a 3D scene-graph which contains 3D objects and their metadata: - +────────────────────────────────────────────────────────+ │ │ │ index.gltf │ │ │ │ │ ├── ◻ buttonA │ - │ │ └ href: #pos=1,0,1&t=100,200 │ + │ │ └ href: #pos=1,0,1&t=100,200 │ │ │ │ │ └── ◻ buttonB │ - │ └ href: other.fbx │ <── file─agnostic (can be .gltf .obj etc) + │ └ href: other.fbx │ <── file─agnostic (can be .gltf .obj etc) │ │ +────────────────────────────────────────────────────────+ -]]> An XR Fragment-compatible browser viewing this scene, allows the end-user to interact with the buttonA and buttonB.
@@ -649,7 +634,7 @@ It instances content (in objects) in the current scene/asset.
Here's an ascii representation of a 3D scene-graph with 3D objects which embeds remote & local 3D objects with/out using filters: - +────────────────────────────────────────────────────────+ +─────────────────────────+ │ │ │ │ │ index.gltf │ │ ocean.com/aquarium.fbx │ │ │ │ │ ├ room │ @@ -666,7 +651,6 @@ It instances content (in objects) in the current scene/asset.
│ └ src: #canvas │ │ │ +────────────────────────────────────────────────────────+ -]]> An XR Fragment-compatible browser viewing this scene, lazy-loads and projects painting.png onto the (plane) object called canvas (which is copy-instanced in the bed and livingroom).
@@ -983,7 +967,7 @@ XR Fragments does this by detecting Bib(s)Tex, without introducing a new languag Example: - http://y.io/z.fbx | Derived XRWG (expressed as BibTex) ----------------------------------------------------------------------------+-------------------------------------- | @house{castle, +-[src: data:.....]----------------------+ +-[3D mesh]-+ | url = {https://y.io/z.fbx#castle} @@ -1001,12 +985,11 @@ XR Fragments does this by detecting Bib(s)Tex, without introducing a new languag | /|\ | | | / \ | | +--------+ | -]]>
the #john@baroque-bib associates both text John and objectname john, with tag baroque
Another example: - http://y.io/z.fbx | Derived XRWG (expressed as BibTex) ----------------------------------------------------------------------------+-------------------------------------- | +-[src: data:.....]----------------------+ +-[3D mesh]-+ | @house{castle, @@ -1024,7 +1007,6 @@ XR Fragments does this by detecting Bib(s)Tex, without introducing a new languag | #baroque@todo@house | | /|\ | | | ... | | / \ | | +----------------------------------------+ +--------+ | -]]>
both #john@baroque-bib and BibTex @baroque{john} result in the same XRWG, however on top of that 2 tages (house and todo) are now associated with text/objectname/tag 'baroque'.
As seen above, the XRWG can expand bibs (and the whole scene) to BibTeX.
@@ -1078,22 +1060,21 @@ Some pointers for good UX (but not necessary to be XR Fragment compatible):
The simplicity of appending metadata (and leveling the metadata-playfield between humans and machines) is also demonstrated by visual-meta in greater detail.
Fictional chat: - Hey what about this: https://my.com/station.gltf#pos=0,0,1&rot=90,2,0&t=500,1000 - I'm checking it right now - I don't see everything..where's our text from yesterday? - Ah wait, that's tagged with tag 'draft' (and hidden)..hold on, try this: - https://my.com/station.gltf#.draft&pos=0,0,1&rot=90,2,0&t=500,1000 - how about we link the draft to the upcoming YELLO-event? - ok I'm adding #draft@YELLO - Yesterday I also came up with other usefull assocations between other texts in the scene: +<John> Hey what about this: https://my.com/station.gltf#pos=0,0,1&rot=90,2,0&t=500,1000 +<Sarah> I'm checking it right now +<Sarah> I don't see everything..where's our text from yesterday? +<John> Ah wait, that's tagged with tag 'draft' (and hidden)..hold on, try this: +<John> https://my.com/station.gltf#.draft&pos=0,0,1&rot=90,2,0&t=500,1000 +<Sarah> how about we link the draft to the upcoming YELLO-event? +<John> ok I'm adding #draft@YELLO +<Sarah> Yesterday I also came up with other usefull assocations between other texts in the scene: #event#YELLO #2025@YELLO - thanks, added. - Btw. I stumbled upon this spatial book which references station.gltf in some chapters: - https://thecommunity.org/forum/foo/mytrainstory.txt - interesting, I'm importing mytrainstory.txt into station.gltf - ah yes, chapter three points to trainterminal_2A in the scene, cool -]]> +<John> thanks, added. +<Sarah> Btw. I stumbled upon this spatial book which references station.gltf in some chapters: +<Sarah> https://thecommunity.org/forum/foo/mytrainstory.txt +<John> interesting, I'm importing mytrainstory.txt into station.gltf +<John> ah yes, chapter three points to trainterminal_2A in the scene, cool
Default Data URI mimetype @@ -1129,7 +1110,7 @@ to connect text further with its environment ( setup links between textual/spati
URL and Data URI - +--------------------------------------------------------------+ +------------------------+ | | | author.com/article.txt | | index.gltf | +------------------------+ | │ | | | @@ -1141,7 +1122,6 @@ to connect text further with its environment ( setup links between textual/spati | | +------------------------+ | | +--------------------------------------------------------------+ -]]> The enduser will only see welcome human and Hello friends rendered verbatim (see mimetype). The beauty is that text in Data URI automatically promotes rich copy-paste (retaining metadata). @@ -1153,14 +1133,14 @@ The XR Fragment-compatible browser can let the enduser access visual-meta(data)-
XR Text example parser To prime the XRWG with text from plain text src-values, here's an example XR Text (de)multiplexer in javascript (which supports inline bibs & bibtex): -xrtext = { - expandBibs: (text) => { + expandBibs: (text) => { let bibs = { regex: /(#[a-zA-Z0-9_+@\-]+(#)?)/g, tags: {}} - text.replace( bibs.regex , (m,k,v) => { - tok = m.substr(1).split("@") + text.replace( bibs.regex , (m,k,v) => { + tok = m.substr(1).split("@") match = tok.shift() - if( tok.length ) tok.map( (t) => bibs.tags[t] = `@${t}{${match},\n}` ) + if( tok.length ) tok.map( (t) => bibs.tags[t] = `@${t}{${match},\n}` ) else if( match.substr(-1) == '#' ) bibs.tags[match] = `@{${match.replace(/#/,'')}}` else bibs.tags[match] = `@${match}{${match},\n}` @@ -1168,16 +1148,16 @@ The XR Fragment-compatible browser can let the enduser access visual-meta(data)- return text.replace( bibs.regex, '') + Object.values(bibs.tags).join('\n') }, - decode: (str) => { - // bibtex: ↓@ ↓ ↓property ↓end + decode: (str) => { + // bibtex: ↓@ ↓<tag|tag{phrase,|{ruler}> ↓property ↓end let pat = [ /@/, /^\S+[,{}]/, /},/, /}/ ] let tags = [], text='', i=0, prop='' let lines = xrtext.expandBibs(str).replace(/\r?\n/g,'\n').split(/\n/) - for( let i = 0; i < lines.length && !String(lines[i]).match( /^@/ ); i++ ) + for( let i = 0; i < lines.length && !String(lines[i]).match( /^@/ ); i++ ) text += lines[i]+'\n' bibtex = lines.join('\n').substr( text.length ) - bibtex.split( pat[0] ).map( (t) => { + bibtex.split( pat[0] ).map( (t) => { try{ let v = {} if( !(t = t.trim()) ) return @@ -1186,9 +1166,9 @@ The XR Fragment-compatible browser can let the enduser access visual-meta(data)- if( tag.match( /}$/ ) ) return tags.push({k: tag.replace(/}$/,''), v: {}}) t = t.substr( tag.length ) t.split( pat[2] ) - .map( kv => { - if( !(kv = kv.trim()) || kv == "}" ) return - v[ kv.match(/\s?(\S+)\s?=/)[1] ] = kv.substr( kv.indexOf("{")+1 ) + .map( kv => { + if( !(kv = kv.trim()) || kv == "}" ) return + v[ kv.match(/\s?(\S+)\s?=/)[1] ] = kv.substr( kv.indexOf("{")+1 ) }) tags.push( { k:tag, v } ) }catch(e){ console.error(e) } @@ -1196,8 +1176,8 @@ The XR Fragment-compatible browser can let the enduser access visual-meta(data)- return {text, tags} }, - encode: (text,tags) => { - let str = text+"\n" + encode: (text,tags) => { + let str = text+"\n" for( let i in tags ){ let item = tags[i] if( item.ruler ){ @@ -1211,12 +1191,11 @@ The XR Fragment-compatible browser can let the enduser access visual-meta(data)- return str } } -]]> The above functions (de)multiplexe text/metadata, expands bibs, (de)serialize bibtex and vice versa
above can be used as a startingpoint for LLVM's to translate/steelman to a more formal form/language.
-str = ` hello world here are some hashtagbibs followed by bibtex: @@ -1229,15 +1208,14 @@ here are some hashtagbibs followed by bibtex: asdf = {23423} }` -var {tags,text} = xrtext.decode(str) // demultiplex text & bibtex -tags.find( (t) => t.k == 'flap{' ).v.asdf = 1 // edit tag +var {tags,text} = xrtext.decode(str) // demultiplex text & bibtex +tags.find( (t) => t.k == 'flap{' ).v.asdf = 1 // edit tag tags.push({ k:'bar{', v:{abc:123} }) // add tag -console.log( xrtext.encode(text,tags) ) // multiplex text & bibtex back together -]]> +console.log( xrtext.encode(text,tags) ) // multiplex text & bibtex back together This expands to the following (hidden by default) BibTex appendix: -hello world here are some hashtagbibs followed by bibtex: @{some-section} @@ -1252,7 +1230,6 @@ here are some hashtagbibs followed by bibtex: @bar{ abc = {123} } -]]>
when an XR browser updates the human text, a quick scan for nonmatching tags (@book{nonmatchingbook e.g.) should be performed and prompt the enduser for deleting them.
@@ -1269,7 +1246,7 @@ here are some hashtagbibs followed by bibtex:
due to the popularity, maturity and extensiveness of HTTP codes for client/server communication, non-HTTP protocols easily map to HTTP codes (ipfs ERR_NOT_FOUND maps to 404 e.g.)
For example: - +────────────────────────────────────────────────────────+ │ │ │ index.gltf │ │ │ │ @@ -1281,14 +1258,13 @@ here are some hashtagbibs followed by bibtex: │ │ └ href@400: #clienterrortext │ │ │ └ ◻ offlinetext │ │ │ │ - │ └── ◻ embeddedObject <--------- the meshdata inside embeddedObject will (not) + │ └── ◻ embeddedObject <--------- the meshdata inside embeddedObject will (not) │ └ src: https://foo.io/bar.gltf │ be flushed when the request (does not) succeed. │ └ src@404: http://foo.io/bar.gltf │ So worstcase the 3D data (of the time of publishing index.gltf) │ └ src@400: https://archive.org/l2kj43.gltf │ will be displayed. │ │ +────────────────────────────────────────────────────────+ -]]>
diff --git a/doc/RFC_XR_Macros.txt b/doc/RFC_XR_Macros.txt index fb7ef97..a3f4472 100644 --- a/doc/RFC_XR_Macros.txt +++ b/doc/RFC_XR_Macros.txt @@ -3,7 +3,7 @@ Internet Engineering Task Force L.R. van Kammen -Internet-Draft 2 February 2024 +Internet-Draft 5 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 5 August 2024. + This Internet-Draft will expire on 8 August 2024. Copyright Notice @@ -53,7 +53,7 @@ Copyright Notice -van Kammen Expires 5 August 2024 [Page 1] +van Kammen Expires 8 August 2024 [Page 1] Internet-Draft XR Macros February 2024 @@ -109,13 +109,13 @@ Table of Contents -van Kammen Expires 5 August 2024 [Page 2] +van Kammen Expires 8 August 2024 [Page 2] Internet-Draft XR Macros February 2024 - 3. Metadata-values can contain the | symbol to 🎲 roundrobin variable - values (!toggleme: fog=0,10|fog=0,1000 e.g.) + 3. Metadata-values can contain the | symbol to 🎲 roundrobin + variable values (!toggleme: fog=0,10|fog=0,1000 e.g.) 4. XR Macros acts as simple eventhandlers for URI Fragments: they are automatically published on the (XR Fragments (https://xrfragment.org)) hashbus, to act as events (so more @@ -165,7 +165,7 @@ Internet-Draft XR Macros February 2024 -van Kammen Expires 5 August 2024 [Page 3] +van Kammen Expires 8 August 2024 [Page 3] Internet-Draft XR Macros February 2024 @@ -221,7 +221,7 @@ Internet-Draft XR Macros February 2024 -van Kammen Expires 5 August 2024 [Page 4] +van Kammen Expires 8 August 2024 [Page 4] Internet-Draft XR Macros February 2024 @@ -277,7 +277,7 @@ Internet-Draft XR Macros February 2024 -van Kammen Expires 5 August 2024 [Page 5] +van Kammen Expires 8 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 5 August 2024 [Page 6] +van Kammen Expires 8 August 2024 [Page 6] Internet-Draft XR Macros February 2024 @@ -375,7 +375,7 @@ Internet-Draft XR Macros February 2024 | | (games,VR,AR e.g.), should be as high as | | | possible | +---------------+---------------------------------------------------+ - | ◻ | ascii representation of an 3D object/mesh | + | ◻ | ascii representation of an 3D object/mesh | +---------------+---------------------------------------------------+ | (un)obtrusive | obtrusive: wrapping human text/thought in | | | XML/HTML/JSON obfuscates human text into | @@ -389,4 +389,4 @@ Internet-Draft XR Macros February 2024 -van Kammen Expires 5 August 2024 [Page 7] +van Kammen Expires 8 August 2024 [Page 7] diff --git a/doc/RFC_XR_Macros.xml b/doc/RFC_XR_Macros.xml index 0150e79..b08a4f2 100644 --- a/doc/RFC_XR_Macros.xml +++ b/doc/RFC_XR_Macros.xml @@ -282,17 +282,16 @@ Macros also act as events, so more serious scripting languages can react to them
Event Bubble-flow click object with (!clickme:AR or !clickme: !reset e.g.) - ◻ │ └── does current object contain this property-key (`AR` or `!reset` e.g.)? └── no: is there any (root)object containing property `AR` └── yes: evaluate its (roundrobin) XR macro-value(s) (and exit) └── no: trigger URL: #AR -]]> click object with (!clickme:#AR|#VR e.g.) - ◻ │ └── apply the roundrobin (rotate the options, value `#AR` becomes `#VR` upon next click) └── is there any object with property-key (`#AR` e.g.)? @@ -300,7 +299,6 @@ Macros also act as events, so more serious scripting languages can react to them └── yes: apply its value to the scene, and update the URL to `#AR` click object with (`!clickme`:`!foo|!bar|!flop` e.g.) -]]> ◻ │