update documentation
This commit is contained in:
parent
48d5ac5f73
commit
630508a0f8
2 changed files with 35 additions and 3 deletions
20
doc/RFC.md
20
doc/RFC.md
|
|
@ -4,10 +4,26 @@
|
||||||
|
|
||||||
> version 1.0.0
|
> version 1.0.0
|
||||||
|
|
||||||
date: 2023-04-02T21:37:32+0200<br>
|
date: 2023-04-06T18:27:40+0200<br>
|
||||||
[](https://github.com/coderofsalvation/xrfragment/actions)
|
[](https://github.com/coderofsalvation/xrfragment/actions)
|
||||||
|
|
||||||
# `://foo.com/my3d.asset#pos=1,0,0&prio=-5`
|
# 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`
|
||||||
|
|
||||||
|
| Delimiter example | info |
|
||||||
|
|-|-|
|
||||||
|
| x=1,2,3 | vector/coordinate argument e.g. |
|
||||||
|
| x=foo\|bar\|1\,2,3\|1.0 | the `\|` character is used for:<br>1.specifying `n` arguments for xrfragment `x`<br>2. fallback urls (`src=https://x.co/f.gltf\|xyz://f.gltf`)<br>3. roundrobin of values (in case provided arguments exceeds `n` of `x` for #1) when triggered by browser URI (clicking `href` e.g.)|
|
||||||
|
| .mygroup | query-alias for `class:mygroup` |
|
||||||
|
|
||||||
|
> This allows hasslefree 3D vector-data (`,`), multi-protocol/fallback-linking & dynamic values (`|`), and CSS-piggybacking (`.mygroup`)
|
||||||
|
|
||||||
# URI parser
|
# URI parser
|
||||||
> icanhazcode? yes, see [URI.hx](https://github.com/coderofsalvation/xrfragment/blob/main/src/xrfragment/URI.hx)
|
> icanhazcode? yes, see [URI.hx](https://github.com/coderofsalvation/xrfragment/blob/main/src/xrfragment/URI.hx)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,23 @@ import xrfragment.Parser;
|
||||||
* date: $(date +"%Y-%m-%dT%H:%M:%S%z") (generated by \`./make doc\`)<br>
|
* date: $(date +"%Y-%m-%dT%H:%M:%S%z") (generated by \`./make doc\`)<br>
|
||||||
* [](https://github.com/coderofsalvation/xrfragment/actions)
|
* [](https://github.com/coderofsalvation/xrfragment/actions)
|
||||||
*
|
*
|
||||||
* # `://foo.com/my3d.asset#pos=1,0,0&prio=-5`
|
* # 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`
|
||||||
|
*
|
||||||
|
* | Delimiter example | info |
|
||||||
|
* |-|-|
|
||||||
|
* | x=1,2,3 | vector/coordinate argument e.g. |
|
||||||
|
* | x=foo\|bar\|1\,2,3\|1.0 | the `\|` character is used for:<br>1.specifying `n` arguments for xrfragment `x`<br>2. fallback urls (`src=https://x.co/f.gltf\|xyz://f.gltf`)<br>3. roundrobin of values (in case provided arguments exceeds `n` of `x` for #1) when triggered by browser URI (clicking `href` e.g.)|
|
||||||
|
* | .mygroup | query-alias for `class:mygroup` |
|
||||||
|
*
|
||||||
|
* > This allows hasslefree 3D vector-data (`,`), multi-protocol/fallback-linking & dynamic values (`|`), and CSS-piggybacking (`.mygroup`)
|
||||||
*
|
*
|
||||||
* # URI parser
|
* # URI parser
|
||||||
* > icanhazcode? yes, see [URI.hx](https://github.com/coderofsalvation/xrfragment/blob/main/src/xrfragment/URI.hx)
|
* > icanhazcode? yes, see [URI.hx](https://github.com/coderofsalvation/xrfragment/blob/main/src/xrfragment/URI.hx)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue