diff --git a/doc/RFC_XR_Fragments.html b/doc/RFC_XR_Fragments.html index ac26fdf..340c480 100644 --- a/doc/RFC_XR_Fragments.html +++ b/doc/RFC_XR_Fragments.html @@ -81,7 +81,7 @@ value: draft-XRFRAGMENTS-leonvankammen-00

Abstract

This draft is a specification for 4D URI’s & hypermediatic navigation, which links together space, time & text together, for hypermedia browsers with- or without a network-connection.
-The specification promotes spatial addressibility, sharing, navigation, filtering and databinding objects for (XR) Browsers.
+The specification uses W3C Media Fragments and URI Templates (RFC6570) to promote spatial addressibility, sharing, navigation, filtering and databinding objects for (XR) Browsers.
XR Fragments allows us to better use existing metadata inside 3D scene(files), by connecting it to proven technologies like URI Fragments.

@@ -377,13 +377,14 @@ That way, if the link gets shared, the XR Fragments implementation at http

Supported popular compatible 3D fileformats: .gltf, .obj, .fbx, .usdz, .json (THREE.js), .dae and so on.

-

Dynamic XR Fragments (+databindings)

+

Fragment-to-metadata mapping

-

These are automatic fragment-to-metadata mappings, which only trigger if the 3D scene metadata matches a specific identifier (aliasname e.g.)

+

These are automatic fragment-to-metadata mappings, which only trigger if the 3D scene metadata matches a specific identifier:

+ @@ -393,59 +394,59 @@ That way, if the link gets shared, the XR Fragments implementation at http - + + - + + - + - + + - + + - + - + + - + + - + - - - - - - - - - - - + + + + +
fragment type example
#<aliasname>PRESET#<preset> string #cubesevaluate predefined view (#foo&bar) defined in 3D Object metadata (#cubes: #foo&bar e.g.)evaluates preset (#foo&bar) defined in 3D Object metadata (#cubes: #foo&bar e.g.) while URL-browserbar reflects #cubes. Only works when metadata-key starts with #
FOCUS #<tag_or_objectname> string #personfocus object(s) with tag: person or name person by looking up XRWG(and show) object(s) with tag: person or name person (XRWG lookup)
#[-]<tag_or_objectname>FILTERS#[!][-]<tag_or_objectname>[*] string #person (#-person)focus/show (or hide) object(s) with tag: person or name person by looking up XRWGwill reset (!), show/focus or hide (-) focus object(s) with tag: person or name person by looking up XRWG (*=including children)
CAMERASWITCH #<cameraname> string #cam01set camera with name cam01 as active camerasets camera with name cam01 as active camera
#<tag_or_objectname>=<material>MATERIALUPDATE#<tag_or_objectname>[*]=<materialname> string=string #car=metallicset material of car to material with name metallicsets material of car to material with name metallic (*=including children)
r #product=metallic#soldout*=halfopacity set material of objects tagged with product to material with name metallic
#<tag_or_objectname>=<mediafrag>string=media frag#foo=0,1 `play 3D animation (or src media) using media fragment URI with looping/speed/texturescroll abilities
#foo=uv:0,0.5 `texturescroll to uv-coordinate 0,0.05 (see looping/speed/texturescroll abilities hereVARIABLE UPDATE#<variable>=<metadata-key>string=string#foo=barsets URI Template variable foo to the value #t=0 from existing object metadata (bar:#t=0 e.g.), This allows for reactive URI Template defined in object metadata elsewhere (src:://m.com/cat.mp4#{foo} e.g., to play media using media fragment URI). NOTE: metadata-key should not start with #
@@ -495,13 +496,6 @@ That way, if the link gets shared, the XR Fragments implementation at http 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 @@ -511,20 +505,27 @@ That way, if the link gets shared, the XR Fragments implementation at http temporal W3C media fragment * -s=x[,y] +uv=u,v +uv:0,0,1,1 +set uv offset (default 0,0) + + + +temporal W3C media fragment * +s=x 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] +suv=[l:]uspeed,vspeed +uv:l:0.1,0.2 +set uv scroll speed of (default 1,1 is instant) [l: means infinite texturescrolling] otherwise new u,v values will be lerped to -temporal W3C media fragment * +media parameter (shader uniform) u:= float vec2 @@ -533,7 +534,7 @@ That way, if the link gets shared, the XR Fragments implementation at http
-

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

+

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

@@ -550,60 +551,60 @@ That way, if the link gets shared, the XR Fragments implementation at http + + + + + + + + + + - - - - - - - - - -
t=0,2 specifies oneshot-play (default) whereas t=l:0,2 indicates looped-play
#uv= specifies uv-coordinatesallows offsetting the uv-coordinates
#suv= specifies scrollspeed of uv-coordinatesallows single/infinite uv-scrolling
#s specifies playback speed being able to specify loop(speed) of audio/video
#sxy= specifies lerping of xy(wh) valuesallows animated cropping and infinite texturescroll with configurable speed for u/v coordinates
#u:<uniform>=specifies updating a uniform value
+ +
+

The rationale not to extend the xywh-media fragment is that 3D geometries deal with triangular polygons (not rectangular).

+
+

Example URI’s:

    +
  • https://images.org/credits.jpg#t=0&suv=l:0,0.1 (infinite vertical texturescrolling)
  • +
  • https://video.org/organogram.mp4#t=0&suv:0.1,0.1&uv=0.3,0.3 (animated zoom towards region in video)
  • 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
+  │    ├ #        : #t=0&shared=play                         │ apply default XR Fragment on load (`t` plays global 3D animation timeline)
+  │    ├ play     : #t=l:0,2                                 │ variable for [URI Templates (RFC6570)](https://www.rfc-editor.org/rfc/rfc6570)
   │    │                                                     │ 
-  │    ├── ◻ playbutton                                      │    
-  │    │      └ 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
+  │    ├── ◻ plane (with material)                           │    
+  │    │      └ #: #suv=l:0,0.1                              │ infinite texturescroll `v` of uv·coordinates with 0.1/fps
+  │    │                                                     │ 
+  │    ├── ◻ plane                                           │    
+  │    │      └ src: foo.jpg#suv=l:0,0.1                     │ infinite texturescroll `v` of uv·coordinates with 0.1/fps
+  │    │                                                     │ 
+  │    ├── ◻ media                                           │   
+  │    │      └ src:  cat.mp4#t=l:2,10&uv=0.5,0.5            │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds (uv's shifted with 0.5,0.5)
+  │    │                                                     │ 
+  │    └── ◻ wall                                            │        
+  │           ├ href:  #color=blue                           │ updates uniform values (IFS shader e.g.)
+  │           ├ blue:  t=0&u:col=0,0,1                       │ variable for [Level1 URI Templates (RFC6570)](https://www.rfc-editor.org/rfc/rfc6570)
+  │           └ src:   ://a.com/art.glsl#{color}&{shared}    │ .fs/.vs/.glsl/.wgsl etc shader [Level1 URI Template (RFC6570)](https://www.rfc-editor.org/rfc/rfc6570)
   │                                                          │    
   │                                                          │
   +──────────────────────────────────────────────────────────+
 
-> 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.).
+> NOTE: URI Template variables are immutable and respect scope: in other words, the end-user cannot modify `blue` by entering an URL like `#blue=.....` in the browser URL, and `blue` is not accessible by the plane/media-object (however `{play}` would work).
 
 
@@ -834,6 +835,8 @@ Resizing will be happen accordingly to its placeholder object aquariumcube
  • in case of navigating to a new [[pos)ition, “first” navigate to the “current position” so that the “back-button” of the “browser-history” always refers to the previous position (see [here)

  • ignore previous rule in special cases, like clicking an href using camera-portal collision (the back-button would cause a teleport-loop)

  • + +
  • href-events should bubble upward the node-tree

  • » example implementation
    @@ -1231,7 +1234,7 @@ Some pointers for good UX (but not necessary to be XR Fragment compatible):

    The src-values work as expected (respecting mime-types), however:

    -

    The XR Fragment specification bumps the traditional default browser-mimetype

    +

    The XR Fragment specification advices to bump the traditional default browser-mimetype

    text/plain;charset=US-ASCII

    @@ -1428,12 +1431,12 @@ here are some hashtagbibs followed by bibtex: │ │ │ index.gltf │ │ │ │ - │ │ #: #-offlinetext │ + │ │ #: #-offlinetext │ │ │ │ │ ├── ◻ buttonA │ │ │ └ href: http://foo.io/campagne.fbx │ │ │ └ href@404: ipfs://foo.io/campagne.fbx │ - │ │ └ href@400: #clienterrortext │ + │ │ └ href@400: #clienterrortext │ │ │ └ ◻ offlinetext │ │ │ │ │ └── ◻ embeddedObject <--------- the meshdata inside embeddedObject will (not) @@ -1471,13 +1474,38 @@ To filter out non-related objects one could take it a step further using filters

    This makes spatial content multi-purpose, without the need to separate content into separate files, or show/hide things using a complex logiclayer like javascript.

    +

    URI Templates (RFC6570)

    + +

    XR Fragments adopts Level1 URI Fragment expansion to provide safe interactivity.
    +The following demonstrates a simple video player:

    + +
    
    +  +─────────────────────────────────────────────+
    +  │                                             │
    +  │   foo.usdz                                  │          
    +  │     │                                       │          
    +  │     │                                       │          
    +  │     ├── ◻ stopbutton                        │
    +  │     │      ├ #:    #-stopbutton             │
    +  │     │      └ href: #player=stop&-stopbutton │  (stop and hide stop-button)
    +  │     │                                       │          
    +  │     └── ◻ plane                             │
    +  │            ├ play: #t=l:0,10                │
    +  │            ├ stop: #t=0,0                   │
    +  │            ├ href: #player=play&stopbutton  │  (play and show stop-button)
    +  │            └ src:  cat.mp4#{player}         │
    +  │                                             │
    +  │                                             │
    +  +─────────────────────────────────────────────+
    +
    +
    +
    +

    Security Considerations

    -

    Since XR Text contains metadata too, the user should be able to set up tagging-rules, so the copy-paste feature can :

    - -
      -
    • filter out sensitive data when copy/pasting (XR text with tag:secret e.g.)
    • -
    +

    The only dynamic parts are W3C Media Fragments and URI Templates (RFC6570).
    +The use of URI Templates is limited to pre-defined variables and Level0 fragments-expansion only, which makes it quite safe.
    +In fact, it is much safer than relying on a scripting language (javascript) which can change URN too.

    FAQ

    @@ -1486,12 +1514,19 @@ To filter out non-related objects one could take it a step further using filters
    -

    Q: Why isn’t there support for scripting, while we have things like WASM -A: This is out of scope as it unhyperifies hypermedia, and this is up to XR hypermedia browser-extensions.
    Historically scripting/Javascript seems to been able to turn webpages from hypermedia documents into its opposite (hyperscripted nonhypermedia documents).
    In order to prevent this backward-movement (hypermedia tends to liberate people from finnicky scripting) XR Fragments should never unhyperify itself by hardcoupling to a particular markup or scripting language. XR Macro’s are an example of something which is probably smarter and safer for hypermedia browsers to implement, instead of going full-in with a turing-complete scripting language (and suffer the security consequences later).
    +

    Q: Why isn’t there support for scripting, URI Template Fragments are so limited compared to WASM & javascript +A: This is out of scope as it unhyperifies hypermedia, and this is up to XR hypermedia browser-extensions.
    Historically scripting/Javascript seems to been able to turn webpages from hypermedia documents into its opposite (hyperscripted nonhypermedia documents).
    In order to prevent this backward-movement (hypermedia tends to liberate people from finnicky scripting) XR Fragment uses W3C Media Fragments and URI Templates (RFC6570), to prevent unhyperifying itself by hardcoupling to a particular markup or scripting language.
    XR Fragments supports filtering objects in a scene only, because in the history of the javascript-powered web, showing/hiding document-entities seems to be one of the most popular basic usecases.
    -Doing advanced scripting & networkrequests under the hood are obviously interesting endavours, but this is something which should not be hardcoupled with hypermedia.
    This belongs to browser extensions.
    +Doing advanced scripting & networkrequests under the hood are obviously interesting endavours, but this is something which should not be hardcoupled with XR Fragments or hypermedia.
    This perhaps belongs more to browser extensions.
    Non-HTML Hypermedia browsers should make browser extensions the right place, to ‘extend’ experiences, in contrast to code/javascript inside hypermedia documents (this turned out as a hypermedia antipattern).

    +

    authors

    + +
      +
    • Leon van Kammen (@lvk@mastodon.online)
    • +
    • Jens Finkhäuser (@jens@social.finkhaeuser.de)
    • +
    +

    IANA Considerations

    This document has no IANA actions.

    @@ -1549,6 +1584,11 @@ Non-HTML Hypermedia browsers should make browser extensions the right place, to something somewhere via someprotocol (http://me.com/foo.glb) + +URN +something at some domain (me.com/foo.glb) + + metadata custom properties of text, 3D Scene or Object(nodes), relevant to machines and a human minority (academics/developers) diff --git a/doc/RFC_XR_Fragments.md b/doc/RFC_XR_Fragments.md index 236bc75..82b5a52 100644 --- a/doc/RFC_XR_Fragments.md +++ b/doc/RFC_XR_Fragments.md @@ -246,7 +246,7 @@ That way, if the link gets shared, the XR Fragments implementation at `https://m > Supported popular compatible 3D fileformats: `.gltf`, `.obj`, `.fbx`, `.usdz`, `.json` (THREE.js), `.dae` and so on. -## Dynamic XR Fragments (+databindings) +## Fragment-to-metadata mapping These are automatic fragment-to-metadata mappings, which only trigger if the 3D scene metadata matches a specific identifier: @@ -257,7 +257,7 @@ These are automatic fragment-to-metadata mappings, which only trigger if the 3D | **FILTERS** | `#[!][-][*]` | string | `#person` (`#-person`) | will reset (`!`), show/focus or hide (`-`) focus object(s) with `tag: person` or name `person` by looking up XRWG (`*`=including children) | | **CAMERASWITCH** | `#` | string | `#cam01` | sets camera with name `cam01` as active camera | | **MATERIALUPDATE** | `#[*]=` | string=string | `#car=metallic`| sets material of car to material with name `metallic` (`*`=including children)| -| | r | | `#soldout*=halfopacity`| set material of objects tagged with `product` to material with name `metallic` | +| | | | `#soldout*=halfopacity`| set material of objects tagged with `product` to material with name `metallic` | | **VARIABLE UPDATE** | `#=` | string=string | `#foo=bar` | sets [URI Template](https://www.rfc-editor.org/rfc/rfc6570) variable `foo` to the value `#t=0` from **existing** object metadata (`bar`:`#t=0` e.g.), This allows for reactive [URI Template](https://www.rfc-editor.org/rfc/rfc6570) defined in object metadata elsewhere (`src`:`://m.com/cat.mp4#{foo}` e.g., to play media using [media fragment URI](https://www.w3.org/TR/media-frags/#valid-uri)). NOTE: metadata-key should not start with `#` | ## media fragments and datatypes diff --git a/doc/RFC_XR_Fragments.png b/doc/RFC_XR_Fragments.png index d741316..5e68453 100644 Binary files a/doc/RFC_XR_Fragments.png and b/doc/RFC_XR_Fragments.png differ diff --git a/doc/RFC_XR_Fragments.txt b/doc/RFC_XR_Fragments.txt index eef08e0..8216629 100644 --- a/doc/RFC_XR_Fragments.txt +++ b/doc/RFC_XR_Fragments.txt @@ -2,8 +2,8 @@ -Internet Engineering Task Force L.R. van Kammen -Internet-Draft 5 February 2024 +Jens & Leon Internet Engineering Task Force L.R. van Kammen +Internet-Draft 8 February 2024 Intended status: Informational @@ -17,7 +17,9 @@ Abstract (https://github.com/coderofsalvation/hypermediatic) navigation, which links together space, time & text together, for hypermedia browsers with- or without a network-connection. - The specification promotes spatial addressibility, sharing, + The specification uses W3C Media Fragments (https://www.w3.org/TR/ + media-frags/) and URI Templates (RFC6570) (https://www.rfc- + editor.org/rfc/rfc6570) to promote spatial addressibility, sharing, navigation, filtering and databinding objects for (XR) Browsers. XR Fragments allows us to better use existing metadata inside 3D scene(files), by connecting it to proven technologies like URI @@ -41,7 +43,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 8 August 2024. + This Internet-Draft will expire on 11 August 2024. Copyright Notice @@ -51,9 +53,7 @@ Copyright Notice - - -van Kammen Expires 8 August 2024 [Page 1] +van Kammen Expires 11 August 2024 [Page 1] Internet-Draft XR Fragments February 2024 @@ -75,41 +75,41 @@ Table of Contents 3.1. XR Fragment URL Grammar . . . . . . . . . . . . . . . . . 6 4. List of URI Fragments . . . . . . . . . . . . . . . . . . . . 7 4.1. List of metadata for 3D nodes . . . . . . . . . . . . . . 8 - 4.2. Dynamic XR Fragments (+databindings) . . . . . . . . . . 8 - 4.3. media fragments and datatypes . . . . . . . . . . . . . . 9 + 4.2. Fragment-to-metadata mapping . . . . . . . . . . . . . . 8 + 4.3. media fragments and datatypes . . . . . . . . . . . . . . 10 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.1. Walking surfaces . . . . . . . . . . . . . . . . . . . . 18 + 9.2. UX spec . . . . . . . . . . . . . . . . . . . . . . . . . 18 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 + 10. XR Fragment: pos . . . . . . . . . . . . . . . . . . . . . . 19 + 11. XR Fragment: rot . . . . . . . . . . . . . . . . . . . . . . 19 + 12. XR Fragment: t . . . . . . . . . . . . . . . . . . . . . . . 19 + 13. XR audio/video integration . . . . . . . . . . . . . . . . . 20 + 14. XR Fragment filters . . . . . . . . . . . . . . . . . . . . . 20 + 14.1. including/excluding . . . . . . . . . . . . . . . . . . 21 14.2. Filter Parser . . . . . . . . . . . . . . . . . . . . . 22 - 15. Visible links . . . . . . . . . . . . . . . . . . . . . . . . 23 + 15. Visible links . . . . . . . . . . . . . . . . . . . . . . . . 22 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 + 19. URI Templates (RFC6570) . . . . . . . . . . . . . . . . . . . 33 + 20. Security Considerations . . . . . . . . . . . . . . . . . . . 33 + 21. FAQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 + 22. authors . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 + 23. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 + 24. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 34 + 25. Appendix: Definitions . . . . . . . . . . . . . . . . . . . . 35 - - -van Kammen Expires 8 August 2024 [Page 2] +van Kammen Expires 11 August 2024 [Page 2] Internet-Draft XR Fragments February 2024 @@ -165,7 +165,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 8 August 2024 [Page 3] +van Kammen Expires 11 August 2024 [Page 3] Internet-Draft XR Fragments February 2024 @@ -221,7 +221,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 8 August 2024 [Page 4] +van Kammen Expires 11 August 2024 [Page 4] Internet-Draft XR Fragments February 2024 @@ -277,7 +277,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 8 August 2024 [Page 5] +van Kammen Expires 11 August 2024 [Page 5] Internet-Draft XR Fragments February 2024 @@ -333,7 +333,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 8 August 2024 [Page 6] +van Kammen Expires 11 August 2024 [Page 6] Internet-Draft XR Fragments February 2024 @@ -389,7 +389,7 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 8 August 2024 [Page 7] +van Kammen Expires 11 August 2024 [Page 7] Internet-Draft XR Fragments February 2024 @@ -424,67 +424,87 @@ Internet-Draft XR Fragments February 2024 | Supported popular compatible 3D fileformats: .gltf, .obj, .fbx, | .usdz, .json (THREE.js), .dae and so on. -4.2. Dynamic XR Fragments (+databindings) +4.2. Fragment-to-metadata mapping These are automatic fragment-to-metadata mappings, which only trigger - if the 3D scene metadata matches a specific identifier (aliasname - e.g.) + if the 3D scene metadata matches a specific identifier: + + +================+======================================+=============+=====================+=======================+ + | |fragment |type |example |info | + +================+======================================+=============+=====================+=======================+ + |*PRESET* |# |string |#cubes |evaluates preset | + | | | | |(#foo&bar) defined in | + | | | | |3D Object metadata | + | | | | |(#cubes: #foo&bar e.g.)| + | | | | |while URL-browserbar | + | | | | |reflects #cubes. Only | + | | | | |works when metadata-key| + | | | | |starts with # | + +----------------+--------------------------------------+-------------+---------------------+-----------------------+ + |*FOCUS* |# |string |#person |(and show) object(s) | - - - - - - - - - - - - - -van Kammen Expires 8 August 2024 [Page 8] +van Kammen Expires 11 August 2024 [Page 8] Internet-Draft XR Fragments February 2024 - +================================+=======================+=================+======================================+ - |fragment |type |example |info | - +================================+=======================+=================+======================================+ - |# |string |#cubes |evaluate predefined view (#foo&bar) | - | | | |defined in 3D Object metadata (#cubes:| - | | | |#foo&bar e.g.) | - +--------------------------------+-----------------------+-----------------+--------------------------------------+ - |# |string |#person |focus object(s) with tag: person or | - | | | |name person by looking up XRWG | - +--------------------------------+-----------------------+-----------------+--------------------------------------+ - |#[-] |string |#person |focus/show (or hide) object(s) with | - | | |(#-person) |tag: person or name person by looking | - | | | |up XRWG | - +--------------------------------+-----------------------+-----------------+--------------------------------------+ - |# |string |#cam01 |set camera with name cam01 as active | - | | | |camera | - +--------------------------------+-----------------------+-----------------+--------------------------------------+ - |#= |string=string |#car=metallic |set material of car to material with | - | | | |name metallic | - +--------------------------------+-----------------------+-----------------+--------------------------------------+ - | | |#product=metallic|set material of objects tagged with | - | | | |product to material with name metallic| - +--------------------------------+-----------------------+-----------------+--------------------------------------+ - |#=|string=media frag |#foo=0,1 ` |play 3D animation (or src media) using| - | |(https://www.w3.org/TR/| |media fragment URI | - | |media-frags/#valid-uri)| |(https://www.w3.org/TR/media- | - | | | |frags/#valid-uri) with looping/speed/ | - | | | |texturescroll abilities | - | | | |(#media%20fragments%20and%20datatypes)| - +--------------------------------+-----------------------+-----------------+--------------------------------------+ - | | |#foo=uv:0,0.5 ` |texturescroll to uv-coordinate 0,0.05 | - | | | |(see looping/speed/texturescroll | - | | | |abilities here | - | | | |(#media%20fragments%20and%20datatypes)| - +--------------------------------+-----------------------+-----------------+--------------------------------------+ + | | | | |with tag: person or | + | | | | |name person (XRWG | + | | | | |lookup) | + +----------------+--------------------------------------+-------------+---------------------+-----------------------+ + |*FILTERS* |#[!][-][*] |string |#person (#-person) |will reset (!), show/ | + | | | | |focus or hide (-) focus| + | | | | |object(s) with tag: | + | | | | |person or name person | + | | | | |by looking up XRWG | + | | | | |(*=including children) | + +----------------+--------------------------------------+-------------+---------------------+-----------------------+ + |*CAMERASWITCH* |# |string |#cam01 |sets camera with name | + | | | | |cam01 as active camera | + +----------------+--------------------------------------+-------------+---------------------+-----------------------+ + |*MATERIALUPDATE*|#[*]=|string=string|#car=metallic |sets material of car to| + | | | | |material with name | + | | | | |metallic (*=including | + | | | | |children) | + +----------------+--------------------------------------+-------------+---------------------+-----------------------+ + | |r | |#soldout*=halfopacity|set material of objects| + | | | | |tagged with product to | + | | | | |material with name | + | | | | |metallic | + +----------------+--------------------------------------+-------------+---------------------+-----------------------+ + |*VARIABLE |#= |string=string|#foo=bar |sets URI Template | + |UPDATE* | | | |(https://www.rfc- | + | | | | |editor.org/rfc/rfc6570)| + | | | | |variable foo to the | + | | | | |value #t=0 from | + | | | | |*existing* object | + | | | | |metadata (bar:#t=0 | + | | | | |e.g.), This allows for | + | | | | |reactive URI Template | + | | | | |(https://www.rfc- | + | | | | |editor.org/rfc/rfc6570)| + | | | | |defined in object | + | | | | |metadata elsewhere | + | | | | |(src:://m.com/ | + | | | | |cat.mp4#{foo} e.g., to | + | | | | |play media using media | + | | | | |fragment URI | + | | | | |(https://www.w3.org/TR/| + | | | | |media-frags/#valid- | + | | | | |uri)). NOTE: metadata-| + | | | | |key should not start | + | | | | |with # | + +----------------+--------------------------------------+-------------+---------------------+-----------------------+ + + + + +van Kammen Expires 11 August 2024 [Page 9] + +Internet-Draft XR Fragments February 2024 + Table 5 @@ -494,126 +514,106 @@ Internet-Draft XR Fragments February 2024 | 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 | t=x |0 | play from 0 | + |W3C media| | | seconds to end | + |fragment | | | (and stop) | + +---------+-----------------------+------------+--------------------+ + |temporal | t=x,y |0,2 | play from 0 | + |W3C media| | | seconds till 2 | + |fragment | | | seconds (and | + | | | | stop) | + +---------+-----------------------+------------+--------------------+ + |temporal | t=[l:]x,y |l:0,1 | play [as loop] | + |W3C media| | | between x and y | + |fragment | | | | + |* | | | | + +---------+-----------------------+------------+--------------------+ + |temporal | uv=u,v |uv:0,0,1,1 | set uv offset | + |W3C media| | | (default 0,0) | + |fragment | | | | + |* | | | | + +---------+-----------------------+------------+--------------------+ + |temporal | s=x |1 | set playback | + |W3C media| | | speed of audio/ | + |fragment | | | video/3D anim | + |* | | | | + +---------+-----------------------+------------+--------------------+ + |temporal | suv=[l:]uspeed,vspeed |uv:l:0.1,0.2| set uv scroll | + |W3C media| | | speed of (default | + |fragment | | | 1,1 is instant) | + |* | | | [l: means | + | | | | infinite | + | | | | texturescrolling] | + | | | | otherwise new u,v | - - - - -van Kammen Expires 8 August 2024 [Page 9] +van Kammen Expires 11 August 2024 [Page 10] 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 | 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 | - +-------------------------+----------------------------------------+ + +=================+========================================+ + | extension | info | + +=================+========================================+ + | l: specifices | t=0,2 specifies oneshot-play (default) | + | loop | whereas t=l:0,2 indicates looped-play | + +-----------------+----------------------------------------+ + | #uv= specifies | allows offsetting the uv-coordinates | + | uv-coordinates | | + +-----------------+----------------------------------------+ + | #suv= specifies | allows single/infinite uv-scrolling | + | scrollspeed of | | + | uv-coordinates | | + +-----------------+----------------------------------------+ + | #s specifies | being able to specify loop(speed) of | + | playback speed | audio/video | + +-----------------+----------------------------------------+ Table 7 + | The rationale not to extend the xywh-media fragment is that 3D + | geometries deal with triangular polygons (not rectangular). + Example URI's: + * https://images.org/credits.jpg#t=0&suv=l:0,0.1 (infinite vertical + texturescrolling) + * https://video.org/organogram.mp4#t=0&suv:0.1,0.1&uv=0.3,0.3 + (animated zoom towards region in video) * 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) - - - - - - - -van Kammen Expires 8 August 2024 [Page 11] +van Kammen Expires 11 August 2024 [Page 11] Internet-Draft XR Fragments February 2024 @@ -622,58 +622,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 + │ ├ # : #t=0&shared=play │ apply default XR Fragment on load (`t` plays global 3D animation timeline) + │ ├ play : #t=l:0,2 │ variable for [URI Templates (RFC6570)](https://www.rfc-editor.org/rfc/rfc6570) │ │ │ - │ ├── ◻ playbutton │ - │ │ └ 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 + │ ├── ◻ plane (with material) │ + │ │ └ #: #suv=l:0,0.1 │ infinite texturescroll `v` of uv·coordinates with 0.1/fps + │ │ │ + │ ├── ◻ plane │ + │ │ └ src: foo.jpg#suv=l:0,0.1 │ infinite texturescroll `v` of uv·coordinates with 0.1/fps + │ │ │ + │ ├── ◻ media │ + │ │ └ src: cat.mp4#t=l:2,10&uv=0.5,0.5 │ loop cat.mp4 (or mp3/wav/jpg) between 2 and 10 seconds (uv's shifted with 0.5,0.5) + │ │ │ + │ └── ◻ wall │ + │ ├ href: #color=blue │ updates uniform values (IFS shader e.g.) + │ ├ blue: t=0&u:col=0,0,1 │ variable for [Level1 URI Templates (RFC6570)](https://www.rfc-editor.org/rfc/rfc6570) + │ └ src: ://a.com/art.glsl#{color}&{shared} │ .fs/.vs/.glsl/.wgsl etc shader [Level1 URI Template (RFC6570)](https://www.rfc-editor.org/rfc/rfc6570) │ │ │ │ +──────────────────────────────────────────────────────────+ -> 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.). +> NOTE: URI Template variables are immutable and respect scope: in other words, the end-user cannot modify `blue` by entering an URL like `#blue=.....` in the browser URL, and `blue` is not accessible by the plane/media-object (however `{play}` would work). 5. Spatial Referencing 3D XR Fragments assume the following objectname-to-URIFragment mapping: - - - - - - - - - - - - - - - - -van Kammen Expires 8 August 2024 [Page 12] - -Internet-Draft XR Fragments February 2024 - - my.io/scene.fbx +─────────────────────────────+ │ sky │ src: http://my.io/scene.fbx#sky (includes building,mainobject,floor) @@ -692,6 +666,14 @@ Internet-Draft XR Fragments February 2024 | Every 3D fileformat supports named 3D object, and this name allows | URLs (fragments) to reference them (and their children objects). + + + +van Kammen Expires 11 August 2024 [Page 12] + +Internet-Draft XR Fragments February 2024 + + Clever nested design of 3D scenes allow great ways for re-using content, and/or previewing scenes. For example, to render a portal with a preview-version of the scene, @@ -721,19 +703,10 @@ Internet-Draft XR Fragments February 2024 Table 8 - - - - -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 @@ -748,8 +721,17 @@ Internet-Draft XR Fragments February 2024 5. after scene load: in case an href does not mention any pos- coordinate, pos=0,0,0 will be assumed + + + + +van Kammen Expires 11 August 2024 [Page 13] + +Internet-Draft XR Fragments February 2024 + + Here's an ascii representation of a 3D scene-graph which contains 3D - objects ◻ and their metadata: + objects ◻ and their metadata: +────────────────────────────────────────────────────────+ │ │ @@ -776,16 +758,6 @@ Internet-Draft XR Fragments February 2024 The URL-processing-flow for hypermedia browsers goes like this: - - - - - -van Kammen Expires 8 August 2024 [Page 14] - -Internet-Draft XR Fragments February 2024 - - 1. IF a #cube matches a custom property-key (of an object) in the 3D file/scene (#cube: #......) THEN execute that predefined_view. @@ -802,6 +774,18 @@ Internet-Draft XR Fragments February 2024 5. IF a #cube matches anything else in the XR Word Graph (XRWG) draw wires to them (text or related objects). + + + + + + + +van Kammen Expires 11 August 2024 [Page 14] + +Internet-Draft XR Fragments February 2024 + + 8. Embedding XR content using src src is the 3D version of the based on the scale-property (of a geometry-less placeholder, an 'empty'-object in blender e.g.). For more info see Chapter Scaling. - - - - -van Kammen Expires 8 August 2024 [Page 16] - -Internet-Draft XR Fragments February 2024 - - 6. external src values should be served with appropriate mimetype (so the XR Fragment-compatible browser will now how to render it). The bare minimum supported mimetypes are: @@ -919,6 +888,16 @@ Internet-Draft XR Fragments February 2024 position to 0,0,0 13. when the enduser clicks an href with #t=1,0,0 (play) will be applied to all src mediacontent with a timeline (mp4/mp3 e.g.) + + + + + +van Kammen Expires 11 August 2024 [Page 16] + +Internet-Draft XR Fragments February 2024 + + 14. a non-euclidian portal can be rendered for flat 3D objects (using stencil buffer e.g.) in case ofspatial src-values (an object #world3 or URL world3.fbx e.g.). @@ -929,31 +908,19 @@ 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 navigation, portals & mutations - - - - - - - -van Kammen Expires 8 August 2024 [Page 17] - -Internet-Draft XR Fragments February 2024 - - +==========+==================+============================+ | fragment | type | example value | +==========+==================+============================+ @@ -980,6 +947,13 @@ Internet-Draft XR Fragments February 2024 (https://github.com/coderofsalvation/xrfragment/blob/dev/src/3rd/ js/three/navigator.js) for an example navigator). + + +van Kammen Expires 11 August 2024 [Page 17] + +Internet-Draft XR Fragments February 2024 + + 5. In XR mode, the navigator back/forward-buttons should be always visible (using a wearable e.g., see [here (https://github.com/coderofsalvation/xrfragment/blob/dev/example/ @@ -995,28 +969,15 @@ Internet-Draft XR Fragments February 2024 using camera-portal collision (the back-button would cause a teleport-loop) + 8. href-events should bubble upward the node-tree - - - - - - - - - -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 @@ -1040,6 +1001,15 @@ Internet-Draft XR Fragments February 2024 another scene/file (and coordinate e.g. in case the URL contains XR Fragments). + + + + +van Kammen Expires 11 August 2024 [Page 18] + +Internet-Draft XR Fragments February 2024 + + 9.3. Scaling instanced content Sometimes embedded properties (like src) instance new objects. @@ -1058,14 +1028,6 @@ Internet-Draft XR Fragments February 2024 (maxsize=1.4 e.g.) * hide the ''placeholder'' object (material e.g.) * instance the src scene as a child of the existing object - - - -van Kammen Expires 8 August 2024 [Page 19] - -Internet-Draft XR Fragments February 2024 - - * calculate the bounding box of the instanced scene, and scale it accordingly (to 1.4 e.g.) @@ -1094,6 +1056,16 @@ Internet-Draft XR Fragments February 2024 * playposition is reset to framestart, when framestart or framestop is greater than 0 | + + + + + +van Kammen Expires 11 August 2024 [Page 19] + +Internet-Draft XR Fragments February 2024 + + | Example Value | Explanation | |-|-| | 1,1,100 | play loop between frame 1 and 100 | | 1,1,0 | play once from frame 1 (oneshot) | | 1,0,0 | play (previously set looprange if any) | | 0,0,0 | pause | | @@ -1111,17 +1083,6 @@ Internet-Draft XR Fragments February 2024 issues/10] (https://github.com/coderofsalvation/xrfragment/ issues/10])] - - - - - - -van Kammen Expires 8 August 2024 [Page 20] - -Internet-Draft XR Fragments February 2024 - - 13. XR audio/video integration To play global audio/video items: @@ -1144,6 +1105,23 @@ Internet-Draft XR Fragments February 2024 Include, exclude, hide/shows objects using space-separated strings: + + + + + + + + + + + + +van Kammen Expires 11 August 2024 [Page 20] + +Internet-Draft XR Fragments February 2024 + + +====================+===========================================+ | example | outcome | +====================+===========================================+ @@ -1169,15 +1147,6 @@ Internet-Draft XR Fragments February 2024 which used a dedicated q= variable (now deprecated and usable directly) - - - - -van Kammen Expires 8 August 2024 [Page 21] - -Internet-Draft XR Fragments February 2024 - - 14.1. including/excluding By default, selectors work like photoshop-layers: they scan for @@ -1202,6 +1171,13 @@ Internet-Draft XR Fragments February 2024 Table 12 + + +van Kammen Expires 11 August 2024 [Page 21] + +Internet-Draft XR Fragments February 2024 + + | NOTE 1: after an external embedded object has been instanced (src: | https://y.com/bar.fbx#room e.g.), filters do not affect them | anymore (reason: local tag/name collisions can be mitigated @@ -1212,11 +1188,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 @@ -1225,15 +1201,6 @@ Internet-Draft XR Fragments February 2024 1. create an associative array/object to store filter-arguments as objects - - - - -van Kammen Expires 8 August 2024 [Page 22] - -Internet-Draft XR Fragments February 2024 - - 2. detect object id's & properties foo=1 and foo (reference regex= ~/^.*=[><=]?/ ) 3. detect excluders like -foo,-foo=1,-.foo,-/foo (reference regex= @@ -1259,6 +1226,14 @@ Internet-Draft XR Fragments February 2024 #mytag e.g.) are triggered by the enduser (via toplevel URL or clicking href): + + + +van Kammen Expires 11 August 2024 [Page 22] + +Internet-Draft XR Fragments February 2024 + + 1. draw a wire from the enduser (preferabbly a bit below the camera, heartposition) to object(s) matching that ID (objectname) 2. draw a wire from the enduser (preferabbly a bit below the camera, @@ -1282,14 +1257,6 @@ Internet-Draft XR Fragments February 2024 How does XR Fragments interlink text with objects? - - - -van Kammen Expires 8 August 2024 [Page 23] - -Internet-Draft XR Fragments February 2024 - - | The XR Fragments does this by collapsing space into a *Word Graph* | (the *XRWG* example | (https://github.com/coderofsalvation/xrfragment/blob/feat/macros/ @@ -1315,6 +1282,14 @@ Internet-Draft XR Fragments February 2024 1. XR Fragments promotes (de)serializing a scene to the XRWG (example (https://github.com/coderofsalvation/xrfragment/blob/fe at/macros/src/3rd/js/XRWG.js)) + + + +van Kammen Expires 11 August 2024 [Page 23] + +Internet-Draft XR Fragments February 2024 + + 2. XR Fragments primes the XRWG, by collecting words from the tag and name-property of 3D objects. 3. XR Fragments primes the XRWG, by collecting words from @@ -1339,13 +1314,6 @@ Internet-Draft XR Fragments February 2024 scroll-to-text-fragment (https://github.com/WICG/scroll-to-text- fragment) will be considered) - - -van Kammen Expires 8 August 2024 [Page 24] - -Internet-Draft XR Fragments February 2024 - - Example: http://y.io/z.fbx | Derived XRWG (expressed as BibTex) @@ -1370,6 +1338,14 @@ Internet-Draft XR Fragments February 2024 | the #john@baroque-bib associates both text John and objectname | john, with tag baroque + + + +van Kammen Expires 11 August 2024 [Page 24] + +Internet-Draft XR Fragments February 2024 + + Another example: http://y.io/z.fbx | Derived XRWG (expressed as BibTex) @@ -1395,13 +1371,6 @@ Internet-Draft XR Fragments February 2024 | same XRWG, however on top of that 2 tages (house and todo) are now | associated with text/objectname/tag 'baroque'. - - -van Kammen Expires 8 August 2024 [Page 25] - -Internet-Draft XR Fragments February 2024 - - As seen above, the XRWG can expand bibs (https://github.com/coderofsalvation/hashtagbibs) (and the whole scene) to BibTeX. @@ -1423,6 +1392,16 @@ Internet-Draft XR Fragments February 2024 Table 13 + + + + + +van Kammen Expires 11 August 2024 [Page 25] + +Internet-Draft XR Fragments February 2024 + + | hashtagbibs (https://github.com/coderofsalvation/hashtagbibs) | potentially allow the enduser to annotate text/objects by | *speaking/typing/scanning associations*, which the XR Browser @@ -1450,14 +1429,6 @@ Internet-Draft XR Fragments February 2024 (contextmenu e.g.) of any XR text, anywhere anytime. 11. respect multi-line BiBTeX metadata in text because of the core principle (#core-principle) - - - -van Kammen Expires 8 August 2024 [Page 26] - -Internet-Draft XR Fragments February 2024 - - 12. Default font (unless specified otherwise) is a modern monospace font, for maximized tabular expressiveness (see the core principle (#core-principle)). @@ -1474,6 +1445,19 @@ Internet-Draft XR Fragments February 2024 Fictional chat: + + + + + + + + +van Kammen Expires 11 August 2024 [Page 26] + +Internet-Draft XR Fragments February 2024 + + 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? @@ -1494,8 +1478,8 @@ Internet-Draft XR Fragments February 2024 The src-values work as expected (respecting mime-types), however: - The XR Fragment specification bumps the traditional default browser- - mimetype + The XR Fragment specification advices to bump the traditional default + browser-mimetype text/plain;charset=US-ASCII @@ -1506,14 +1490,6 @@ Internet-Draft XR Fragments February 2024 This indicates that: * utf-8 is supported by default - - - -van Kammen Expires 8 August 2024 [Page 27] - -Internet-Draft XR Fragments February 2024 - - * lines beginning with @ will not be rendered verbatim by default (read more (https://github.com/coderofsalvation/ hashtagbibs#hashtagbib-mimetypes)) @@ -1530,6 +1506,14 @@ Internet-Draft XR Fragments February 2024 Advantages: + + + +van Kammen Expires 11 August 2024 [Page 27] + +Internet-Draft XR Fragments February 2024 + + * auto-expanding of hashtagbibs (https://github.com/coderofsalvation/hashtagbibs) associations * out-of-the-box (de)multiplex human text and metadata in one go @@ -1553,23 +1537,6 @@ Internet-Draft XR Fragments February 2024 16.2. URL and Data URI - - - - - - - - - - - - -van Kammen Expires 8 August 2024 [Page 28] - -Internet-Draft XR Fragments February 2024 - - +--------------------------------------------------------------+ +------------------------+ | | | author.com/article.txt | | index.gltf | +------------------------+ @@ -1596,6 +1563,13 @@ Internet-Draft XR Fragments February 2024 | object note_canvas with 'todo', the enduser can type or speak | #note_canvas@todo + + +van Kammen Expires 11 August 2024 [Page 28] + +Internet-Draft XR Fragments February 2024 + + 16.3. XR Text example parser To prime the XRWG with text from plain text src-values, here's an @@ -1618,14 +1592,6 @@ xrtext = { }, decode: (str) => { - - - -van Kammen Expires 8 August 2024 [Page 29] - -Internet-Draft XR Fragments February 2024 - - // bibtex: ↓@ ↓ ↓property ↓end let pat = [ /@/, /^\S+[,{}]/, /},/, /}/ ] let tags = [], text='', i=0, prop='' @@ -1653,6 +1619,13 @@ Internet-Draft XR Fragments February 2024 return {text, tags} }, + + +van Kammen Expires 11 August 2024 [Page 29] + +Internet-Draft XR Fragments February 2024 + + encode: (text,tags) => { let str = text+"\n" for( let i in tags ){ @@ -1675,13 +1648,6 @@ Internet-Draft XR Fragments February 2024 | above can be used as a startingpoint for LLVM's to translate/ | steelman to a more formal form/language. - - -van Kammen Expires 8 August 2024 [Page 30] - -Internet-Draft XR Fragments February 2024 - - str = ` hello world here are some hashtagbibs followed by bibtex: @@ -1702,6 +1668,20 @@ console.log( xrtext.encode(text,tags) ) // multiplex text & bibtex back to This expands to the following (hidden by default) BibTex appendix: + + + + + + + + + +van Kammen Expires 11 August 2024 [Page 30] + +Internet-Draft XR Fragments February 2024 + + hello world here are some hashtagbibs followed by bibtex: @@ -1729,15 +1709,6 @@ console.log( xrtext.encode(text,tags) ) // multiplex text & bibtex back to 1. defining a different transport protocol (https vs ipfs or DAT) in src or href values can make a difference - - - - -van Kammen Expires 8 August 2024 [Page 31] - -Internet-Draft XR Fragments February 2024 - - 2. mirroring files on another protocol using (HTTP) errorcode tags in src or href properties 3. in case of src: nesting a copy of the embedded object in the @@ -1750,16 +1721,33 @@ Internet-Draft XR Fragments February 2024 For example: + + + + + + + + + + + + +van Kammen Expires 11 August 2024 [Page 31] + +Internet-Draft XR Fragments February 2024 + + +────────────────────────────────────────────────────────+ │ │ │ index.gltf │ │ │ │ - │ │ #: #-offlinetext │ + │ │ #: #-offlinetext │ │ │ │ │ ├── ◻ buttonA │ │ │ └ href: http://foo.io/campagne.fbx │ │ │ └ href@404: ipfs://foo.io/campagne.fbx │ - │ │ └ href@400: #clienterrortext │ + │ │ └ href@400: #clienterrortext │ │ │ └ ◻ offlinetext │ │ │ │ │ └── ◻ embeddedObject <--------- the meshdata inside embeddedObject will (not) @@ -1786,14 +1774,6 @@ Internet-Draft XR Fragments February 2024 * href: schoolA.edu/projects.gltf#math&-topics math * href: schoolB.edu/projects.gltf#math&-courses math - - - -van Kammen Expires 8 August 2024 [Page 32] - -Internet-Draft XR Fragments February 2024 - - * href: university.edu/projects.gltf#math&-theme math | This would hide all object tagged with topic, courses or theme @@ -1804,15 +1784,51 @@ Internet-Draft XR Fragments February 2024 separate content into separate files, or show/hide things using a complex logiclayer like javascript. -19. Security Considerations - Since XR Text contains metadata too, the user should be able to set - up tagging-rules, so the copy-paste feature can : - * filter out sensitive data when copy/pasting (XR text with - tag:secret e.g.) -20. FAQ + + +van Kammen Expires 11 August 2024 [Page 32] + +Internet-Draft XR Fragments February 2024 + + +19. URI Templates (RFC6570) + + XR Fragments adopts Level1 URI *Fragment* expansion to provide safe + interactivity. + The following demonstrates a simple video player: + + +─────────────────────────────────────────────+ + │ │ + │ foo.usdz │ + │ │ │ + │ │ │ + │ ├── ◻ stopbutton │ + │ │ ├ #: #-stopbutton │ + │ │ └ href: #player=stop&-stopbutton │ (stop and hide stop-button) + │ │ │ + │ └── ◻ plane │ + │ ├ play: #t=l:0,10 │ + │ ├ stop: #t=0,0 │ + │ ├ href: #player=play&stopbutton │ (play and show stop-button) + │ └ src: cat.mp4#{player} │ + │ │ + │ │ + +─────────────────────────────────────────────+ + +20. Security Considerations + + The only dynamic parts are W3C Media Fragments + (https://www.w3.org/TR/media-frags/) and URI Templates (RFC6570) + (https://www.rfc-editor.org/rfc/rfc6570). + The use of URI Templates is limited to pre-defined variables and + Level0 fragments-expansion only, which makes it quite safe. + In fact, it is much safer than relying on a scripting language + (javascript) which can change URN too. + +21. FAQ *Q:* Why is everything HTTP GET-based, what about POST/PUT/DELETE HATEOS @@ -1821,44 +1837,48 @@ Internet-Draft XR Fragments February 2024 (for example, an XR Hypermedia browser can decide to support POST/PUT/DELETE requests for embedded HTML thru src values) - *Q:* Why isn't there support for scripting, while we have things like - WASM *A:* This is out of scope as it unhyperifies hypermedia, and - this is up to XR hypermedia browser-extensions. + *Q:* Why isn't there support for scripting, URI Template Fragments + are so limited compared to WASM & javascript *A:* This is out of + scope as it unhyperifies hypermedia, and this is up to XR hypermedia + browser-extensions. Historically scripting/Javascript seems to been able to turn webpages + + + +van Kammen Expires 11 August 2024 [Page 33] + +Internet-Draft XR Fragments February 2024 + + from hypermedia documents into its opposite (hyperscripted nonhypermedia documents). In order to prevent this backward-movement (hypermedia tends to - liberate people from finnicky scripting) XR Fragments should never - unhyperify itself by hardcoupling to a particular markup or scripting - language. XR Macro's (https://xrfragment.org/doc/RFC_XR_Macros.html) - are an example of something which is probably smarter and safer for - hypermedia browsers to implement, instead of going full-in with a - turing-complete scripting language (and suffer the security - consequences later). + liberate people from finnicky scripting) XR Fragment uses W3C Media + Fragments (https://www.w3.org/TR/media-frags/) and URI Templates + (RFC6570) (https://www.rfc-editor.org/rfc/rfc6570), to prevent + unhyperifying itself by hardcoupling to a particular markup or + scripting language. XR Fragments supports filtering objects in a scene only, because in the history of the javascript-powered web, showing/hiding document- entities seems to be one of the most popular basic usecases. Doing advanced scripting & networkrequests under the hood are obviously interesting endavours, but this is something which should - not be hardcoupled with hypermedia. - This belongs to browser extensions. - - - -van Kammen Expires 8 August 2024 [Page 33] - -Internet-Draft XR Fragments February 2024 - - + not be hardcoupled with XR Fragments or hypermedia. + This perhaps belongs more to browser extensions. Non-HTML Hypermedia browsers should make browser extensions the right place, to 'extend' experiences, in contrast to code/javascript inside hypermedia documents (this turned out as a hypermedia antipattern). -21. IANA Considerations +22. authors + + * Leon van Kammen (@lvk@mastodon.online) + * Jens Finkhäuser (@jens@social.finkhaeuser.de) + +23. IANA Considerations This document has no IANA actions. -22. Acknowledgments +24. Acknowledgments * NLNET (https://nlnet.nl) * Future of Text (https://futureoftext.org) @@ -1866,14 +1886,27 @@ 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 * Brandel Zackernuk * Mark Anderson -23. Appendix: Definitions + + + + + + + + +van Kammen Expires 11 August 2024 [Page 34] + +Internet-Draft XR Fragments February 2024 + + +25. Appendix: Definitions +=================+=============================================+ | definition | explanation | @@ -1896,16 +1929,10 @@ Internet-Draft XR Fragments February 2024 | URL | something somewhere via someprotocol | | | (http://me.com/foo.glb) | +-----------------+---------------------------------------------+ + | URN | something at some domain (me.com/foo.glb) | + +-----------------+---------------------------------------------+ | metadata | custom properties of text, 3D Scene or | | | Object(nodes), relevant to machines and a | - - - -van Kammen Expires 8 August 2024 [Page 34] - -Internet-Draft XR Fragments February 2024 - - | | human minority (academics/developers) | +-----------------+---------------------------------------------+ | XR fragment | URI Fragment with spatial hints like | @@ -1927,6 +1954,14 @@ Internet-Draft XR Fragments February 2024 | placeholder | a 3D object which with src-metadata (which | | object | will be replaced by the src-data.) | +-----------------+---------------------------------------------+ + + + +van Kammen Expires 11 August 2024 [Page 35] + +Internet-Draft XR Fragments February 2024 + + | src | (HTML-piggybacked) metadata of a 3D object | | | which instances content | +-----------------+---------------------------------------------+ @@ -1954,17 +1989,9 @@ Internet-Draft XR Fragments February 2024 | | that") | +-----------------+---------------------------------------------+ | extrospective | outward sensemaking ("I'm fairly sure John | - - - -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 | @@ -1984,6 +2011,13 @@ Internet-Draft XR Fragments February 2024 | | XML | +-----------------+---------------------------------------------+ + + +van Kammen Expires 11 August 2024 [Page 36] + +Internet-Draft XR Fragments February 2024 + + Table 14 @@ -2013,4 +2047,26 @@ Internet-Draft XR Fragments February 2024 -van Kammen Expires 8 August 2024 [Page 36] + + + + + + + + + + + + + + + + + + + + + + +van Kammen Expires 11 August 2024 [Page 37] diff --git a/doc/RFC_XR_Fragments.xml b/doc/RFC_XR_Fragments.xml index dfdbdb7..f325cb9 100644 --- a/doc/RFC_XR_Fragments.xml +++ b/doc/RFC_XR_Fragments.xml @@ -7,12 +7,12 @@
    Internet -Internet Engineering Task Force +Jens & Leon Internet Engineering Task Force This draft is a specification for 4D URI's & hypermediatic navigation, which links together space, time & text together, for hypermedia browsers with- or without a network-connection.
    -The specification promotes spatial addressibility, sharing, navigation, filtering and databinding objects for (XR) Browsers.
    +The specification uses W3C Media Fragments and URI Templates (RFC6570) to promote spatial addressibility, sharing, navigation, filtering and databinding objects for (XR) Browsers.
    XR Fragments allows us to better use existing metadata inside 3D scene(files), by connecting it to proven technologies like URI Fragments.
    Almost every idea in this document is demonstrated at https://xrfragment.org @@ -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.
    - +───────────────────────────────────────────────────────────────────────────────────────────────+ + 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: - +───────────────────────────────────────────────────────────────────────────────────────────────+ + ?other.glb ─> #view ───> hashbus │ │ │ #filter │ │ │ │ #tag │ │ │ │ (hypermediatic) #material │ │ @@ -88,13 +89,14 @@ 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: @@ -172,9 +174,10 @@ 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
    @@ -286,11 +289,12 @@ That way, if the link gets shared, the XR Fragments implementation at https:
    Supported popular compatible 3D fileformats: .gltf, .obj, .fbx, .usdz, .json (THREE.js), .dae and so on.
    -
    Dynamic XR Fragments (+databindings) -These are automatic fragment-to-metadata mappings, which only trigger if the 3D scene metadata matches a specific identifier (aliasname e.g.) +
    Fragment-to-metadata mapping +These are automatic fragment-to-metadata mappings, which only trigger if the 3D scene metadata matches a specific identifier: + @@ -300,59 +304,59 @@ That way, if the link gets shared, the XR Fragments implementation at https: - + + - + + - + - + + - + + - + - + + - + + - + - - - - - - - - - - - + + + + +
    fragment type example
    #<aliasname>PRESET#<preset> string #cubesevaluate predefined view (#foo&bar) defined in 3D Object metadata (#cubes: #foo&bar e.g.)evaluates preset (#foo&bar) defined in 3D Object metadata (#cubes: #foo&bar e.g.) while URL-browserbar reflects #cubes. Only works when metadata-key starts with #
    FOCUS #<tag_or_objectname> string #personfocus object(s) with tag: person or name person by looking up XRWG(and show) object(s) with tag: person or name person (XRWG lookup)
    #[-]<tag_or_objectname>FILTERS#[!][-]<tag_or_objectname>[*] string #person (#-person)focus/show (or hide) object(s) with tag: person or name person by looking up XRWGwill reset (!), show/focus or hide (-) focus object(s) with tag: person or name person by looking up XRWG (*=including children)
    CAMERASWITCH #<cameraname> string #cam01set camera with name cam01 as active camerasets camera with name cam01 as active camera
    #<tag_or_objectname>=<material>MATERIALUPDATE#<tag_or_objectname>[*]=<materialname> string=string #car=metallicset material of car to material with name metallicsets material of car to material with name metallic (*=including children)
    r #product=metallic#soldout*=halfopacity set material of objects tagged with product to material with name metallic
    #<tag_or_objectname>=<mediafrag>string=media frag#foo=0,1 `play 3D animation (or src media) using media fragment URI with looping/speed/texturescroll abilities
    #foo=uv:0,0.5 `texturescroll to uv-coordinate 0,0.05 (see looping/speed/texturescroll abilities hereVARIABLE UPDATE#<variable>=<metadata-key>string=string#foo=barsets URI Template variable foo to the value #t=0 from existing object metadata (bar:#t=0 e.g.), This allows for reactive URI Template defined in object metadata elsewhere (src:://m.com/cat.mp4#{foo} e.g., to play media using media fragment URI). NOTE: metadata-key should not start with #
    @@ -398,13 +402,6 @@ That way, if the link gets shared, the XR Fragments implementation at https: 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 @@ -414,26 +411,33 @@ That way, if the link gets shared, the XR Fragments implementation at https: temporal W3C media fragment * -s=x[,y] +uv=u,v +uv:0,0,1,1 +set uv offset (default 0,0) + + + +temporal W3C media fragment * +s=x 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] +suv=[l:]uspeed,vspeed +uv:l:0.1,0.2 +set uv scroll speed of (default 1,1 is instant) [l: means infinite texturescrolling] otherwise new u,v values will be lerped to -temporal W3C media fragment * +media parameter (shader uniform) u:<uniform>=<string float vec2 -
    * = this is extending the W3C media fragments with finer playback/viewport-control: +
    * = this is extending the W3C media fragments with finergrained playback/viewport-control:
    @@ -448,60 +452,57 @@ That way, if the link gets shared, the XR Fragments implementation at https: + + + + + + + + + + - - - - - - - - - - -
    t=0,2 specifies oneshot-play (default) whereas t=l:0,2 indicates looped-play
    #uv= specifies uv-coordinatesallows offsetting the uv-coordinates
    #suv= specifies scrollspeed of uv-coordinatesallows single/infinite uv-scrolling
    #s specifies playback speed being able to specify loop(speed) of audio/video
    #sxy= specifies lerping of xy(wh) valuesallows animated cropping and infinite texturescroll with configurable speed for u/v coordinates
    #u:<uniform>=specifies updating a uniform value
    Example URI's: +
    The rationale not to extend the xywh-media fragment is that 3D geometries deal with triangular polygons (not rectangular). +
    Example URI's:
      +
    • https://images.org/credits.jpg#t=0&suv=l:0,0.1 (infinite vertical texturescrolling)
    • +
    • https://video.org/organogram.mp4#t=0&suv:0.1,0.1&uv=0.3,0.3 (animated zoom towards region in video)
    • 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)
    - +──────────────────────────────────────────────────────────+ + NOTE: URI Template variables are immutable and respect scope: in other words, the end-user cannot modify `blue` by entering an URL like `#blue=.....` in the browser URL, and `blue` is not accessible by the plane/media-object (however `{play}` would work). +]]>
    @@ -509,7 +510,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: - +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.
    @@ -575,18 +577,19 @@ 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: - +────────────────────────────────────────────────────────+ + An XR Fragment-compatible browser viewing this scene, allows the end-user to interact with the buttonA and buttonB.
    @@ -634,7 +637,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: - +────────────────────────────────────────────────────────+ +─────────────────────────+ + │ └ 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).
    @@ -730,6 +734,8 @@ Resizing will be happen accordingly to its placeholder object aquariumcube
  • ignore previous rule in special cases, like clicking an href using camera-portal collision (the back-button would cause a teleport-loop)
  • +
  • href-events should bubble upward the node-tree +
  • » example implementation
    @@ -967,7 +973,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) +
    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) +
    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.
    @@ -1060,26 +1068,27 @@ 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: -<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: + 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: #event#YELLO #2025@YELLO -<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 + 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 +]]>
    Default Data URI mimetype The src-values work as expected (respecting mime-types), however: -The XR Fragment specification bumps the traditional default browser-mimetype +The XR Fragment specification advices to bump the traditional default browser-mimetype text/plain;charset=US-ASCII to a hashtagbib(tex)-friendly one: text/plain;charset=utf-8;bib=^@ @@ -1110,7 +1119,7 @@ to connect text further with its environment ( setup links between textual/spati
    URL and Data URI - +--------------------------------------------------------------+ +------------------------+ + 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). @@ -1133,14 +1143,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 = { + { 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}` @@ -1148,16 +1158,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: ↓@ ↓<tag|tag{phrase,|{ruler}> ↓property ↓end + decode: (str) => { + // bibtex: ↓@ ↓ ↓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 @@ -1166,9 +1176,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) } @@ -1176,8 +1186,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 ){ @@ -1191,11 +1201,12 @@ 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 = ` + 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 +
    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.
    @@ -1246,25 +1259,26 @@ 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: - +────────────────────────────────────────────────────────+ +
    @@ -1291,31 +1305,68 @@ To filter out non-related objects one could take it a step further using filters This makes spatial content multi-purpose, without the need to separate content into separate files, or show/hide things using a complex logiclayer like javascript.
    -
    Security Considerations -Since XR Text contains metadata too, the user should be able to set up tagging-rules, so the copy-paste feature can : +
    URI Templates (RFC6570) +XR Fragments adopts Level1 URI Fragment expansion to provide safe interactivity.
    -
      -
    • filter out sensitive data when copy/pasting (XR text with tag:secret e.g.)
    • -
    +The following demonstrates a simple video player:
    + + + +
    + +
    Security Considerations +The only dynamic parts are W3C Media Fragments and URI Templates (RFC6570).
    + +The use of URI Templates is limited to pre-defined variables and Level0 fragments-expansion only, which makes it quite safe.
    + +In fact, it is much safer than relying on a scripting language (javascript) which can change URN too.
    FAQ Q: Why is everything HTTP GET-based, what about POST/PUT/DELETE HATEOS
    A: Because it's out of scope: XR Fragment specifies a read-only way to surf XR documents. These things belong in the application layer (for example, an XR Hypermedia browser can decide to support POST/PUT/DELETE requests for embedded HTML thru src values)
    -Q: Why isn't there support for scripting, while we have things like WASM +Q: Why isn't there support for scripting, URI Template Fragments are so limited compared to WASM & javascript A: This is out of scope as it unhyperifies hypermedia, and this is up to XR hypermedia browser-extensions.
    Historically scripting/Javascript seems to been able to turn webpages from hypermedia documents into its opposite (hyperscripted nonhypermedia documents).
    -In order to prevent this backward-movement (hypermedia tends to liberate people from finnicky scripting) XR Fragments should never unhyperify itself by hardcoupling to a particular markup or scripting language. XR Macro's are an example of something which is probably smarter and safer for hypermedia browsers to implement, instead of going full-in with a turing-complete scripting language (and suffer the security consequences later).
    +In order to prevent this backward-movement (hypermedia tends to liberate people from finnicky scripting) XR Fragment uses W3C Media Fragments and URI Templates (RFC6570), to prevent unhyperifying itself by hardcoupling to a particular markup or scripting language.
    XR Fragments supports filtering objects in a scene only, because in the history of the javascript-powered web, showing/hiding document-entities seems to be one of the most popular basic usecases.
    -Doing advanced scripting & networkrequests under the hood are obviously interesting endavours, but this is something which should not be hardcoupled with hypermedia.
    -This belongs to browser extensions.
    +Doing advanced scripting & networkrequests under the hood are obviously interesting endavours, but this is something which should not be hardcoupled with XR Fragments or hypermedia.
    +This perhaps belongs more to browser extensions.
    Non-HTML Hypermedia browsers should make browser extensions the right place, to 'extend' experiences, in contrast to code/javascript inside hypermedia documents (this turned out as a hypermedia antipattern).
    +
    authors + +
      +
    • Leon van Kammen (@lvk@mastodon.online)
    • +
    • Jens Finkhäuser (@jens@social.finkhaeuser.de)
    • +
    +
    +
    IANA Considerations This document has no IANA actions.
    @@ -1373,6 +1424,11 @@ Non-HTML Hypermedia browsers should make browser extensions the right place, to something somewhere via someprotocol (http://me.com/foo.glb) + +URN +something at some domain (me.com/foo.glb) + + metadata custom properties of text, 3D Scene or Object(nodes), relevant to machines and a human minority (academics/developers) diff --git a/doc/RFC_XR_Macros.txt b/doc/RFC_XR_Macros.txt index a3f4472..ab0dc15 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 5 February 2024 +Internet-Draft 8 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 8 August 2024. + This Internet-Draft will expire on 11 August 2024. Copyright Notice @@ -53,7 +53,7 @@ Copyright Notice -van Kammen Expires 8 August 2024 [Page 1] +van Kammen Expires 11 August 2024 [Page 1] Internet-Draft XR Macros February 2024 @@ -109,13 +109,13 @@ Table of Contents -van Kammen Expires 8 August 2024 [Page 2] +van Kammen Expires 11 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 8 August 2024 [Page 3] +van Kammen Expires 11 August 2024 [Page 3] Internet-Draft XR Macros February 2024 @@ -221,7 +221,7 @@ Internet-Draft XR Macros February 2024 -van Kammen Expires 8 August 2024 [Page 4] +van Kammen Expires 11 August 2024 [Page 4] Internet-Draft XR Macros February 2024 @@ -277,7 +277,7 @@ Internet-Draft XR Macros February 2024 -van Kammen Expires 8 August 2024 [Page 5] +van Kammen Expires 11 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 8 August 2024 [Page 6] +van Kammen Expires 11 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 8 August 2024 [Page 7] +van Kammen Expires 11 August 2024 [Page 7] diff --git a/doc/RFC_XR_Macros.xml b/doc/RFC_XR_Macros.xml index b08a4f2..0150e79 100644 --- a/doc/RFC_XR_Macros.xml +++ b/doc/RFC_XR_Macros.xml @@ -282,16 +282,17 @@ 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.) - ◻ + click object with (!clickme:#AR|#VR e.g.) - ◻ + ◻ │
    diff --git a/index.html b/index.html index 7bb9b39..6ab6f9b 100644 --- a/index.html +++ b/index.html @@ -428,6 +428,8 @@ Error message and password prompt
  • (non)positional audio
  • +
  • #
  • +
  • #pos
  • #rot
  • @@ -460,7 +462,7 @@ Error message and password prompt
  • 🔨 XR Fragments parser
  • -
  • 🖇 Fragment auto-mapping
  • +
  • 🖇 auto-generated fragments
  • 🧩 Object metadata
  • @@ -728,6 +730,8 @@ Error message and password prompt
  • conflict.jpg
  • +
  • create a button
  • +
  • Draft of '↪ URI.parse(url,flags)'
  • Draft of '📜 XR fragments'
  • @@ -736,6 +740,8 @@ Error message and password prompt
  • Draft of 'How it works'
  • +
  • Draft of 'XR Fragments'
  • +
  • feedback.png
  • Getting started
  • @@ -770,6 +776,8 @@ Error message and password prompt
  • popper.png
  • +
  • positioning the user/camera
  • +
  • Potential future additions
  • predefined_view
  • @@ -872,12 +880,13 @@ Error message and password prompt