update documentation

This commit is contained in:
Leon van Kammen 2023-04-06 18:29:31 +02:00
parent 630508a0f8
commit 27035bf7ed
2 changed files with 13 additions and 17 deletions

View file

@ -4,7 +4,7 @@
> version 1.0.0 > version 1.0.0
date: 2023-04-06T18:27:40+0200<br> date: 2023-04-06T18:29:21+0200<br>
[![Actions Status](https://github.com/coderofsalvation/xrfragment/workflows/test/badge.svg)](https://github.com/coderofsalvation/xrfragment/actions) [![Actions Status](https://github.com/coderofsalvation/xrfragment/workflows/test/badge.svg)](https://github.com/coderofsalvation/xrfragment/actions)
# XRFragment Grammar # XRFragment Grammar
@ -14,16 +14,14 @@ date: 2023-04-06T18:27:40+0200<br>
gen-delims = "#" / "&" gen-delims = "#" / "&"
sub-delims = "," / "|" / "=" sub-delims = "," / "|" / "="
``` ```
<br>
> Example: `://foo.com/my3d.asset#pos=1,0,0&prio=-5&t=0,100|100,200` > Example: `://foo.com/my3d.asset#pos=1,0,0&prio=-5&t=0,100|100,200`
| Delimiter example | info | Hasslefree 3D vector-data (`,`), multi-protocol/fallback-linking & dynamic values (`|`), and CSS-piggybacking (`.mygroup`)
|-|-| <br>
| x=1,2,3 | vector/coordinate argument e.g. | | `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.)| | `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` | | `.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)

View file

@ -18,16 +18,14 @@ import xrfragment.Parser;
* gen-delims = "#" / "&" * gen-delims = "#" / "&"
* sub-delims = "," / "|" / "=" * sub-delims = "," / "|" / "="
* ``` * ```
* * <br>
* > Example: `://foo.com/my3d.asset#pos=1,0,0&prio=-5&t=0,100|100,200` * > Example: `://foo.com/my3d.asset#pos=1,0,0&prio=-5&t=0,100|100,200`
* *
* | Delimiter example | info | * Hasslefree 3D vector-data (`,`), multi-protocol/fallback-linking & dynamic values (`|`), and CSS-piggybacking (`.mygroup`)
* |-|-| * <br>
* | x=1,2,3 | vector/coordinate argument e.g. | * | `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.)| * | `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` | * | `.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)