xrfragment/doc/RFC.md

1.8 KiB

version 1.0.0

date: 2023-04-27T22:44:39+0200
Actions Status

XRFragment Grammar

    reserved    = gen-delims / sub-delims
    gen-delims  = "#" / "&"                      
    sub-delims  = "," / "|" / "="

Example: ://foo.com/my3d.asset#pos=1,0,0&prio=-5&t=0,100|100,200


Explanation
x=1,2,3 vector/coordinate argument e.g.
`x=foo|bar 1,2,3
`https://x.co/1.gltf
.mygroup query-alias for class:mygroup

Focus: hasslefree 3D vector-data (,), multi-protocol/fallback-linking & dynamic values (|), and CSS-piggybacking (.mygroup)

URI parser

icanhazcode? yes, see URI.hx

  1. fragment URI starts with #
  2. fragments are split by &
  3. store key/values into a associative array or dynamic object
  4. loop thru each fragment
  5. for each fragment split on = to separate key/values
  6. fragment-values are urlencoded (space becomes + using encodeUriComponent e.g.)
  7. every recognized fragment key/value-pair is added to a central map/associative array/object

XR Fragments parser

icanhazcode? yes, see Parser.hx the gist of it:

  1. check if param exist