From 27035bf7ed7c22f593141e7b9aea3de66532904c Mon Sep 17 00:00:00 2001 From: Leon van Kammen Date: Thu, 6 Apr 2023 18:29:31 +0200 Subject: [PATCH] update documentation --- doc/RFC.md | 16 +++++++--------- src/xrfragment/URI.hx | 14 ++++++-------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/doc/RFC.md b/doc/RFC.md index 28d21c0..5492065 100644 --- a/doc/RFC.md +++ b/doc/RFC.md @@ -4,7 +4,7 @@ > version 1.0.0 -date: 2023-04-06T18:27:40+0200
+date: 2023-04-06T18:29:21+0200
[![Actions Status](https://github.com/coderofsalvation/xrfragment/workflows/test/badge.svg)](https://github.com/coderofsalvation/xrfragment/actions) # XRFragment Grammar @@ -14,16 +14,14 @@ date: 2023-04-06T18:27:40+0200
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:
1.specifying `n` arguments for xrfragment `x`
2. fallback urls (`src=https://x.co/f.gltf\|xyz://f.gltf`)
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`) +Hasslefree 3D vector-data (`,`), multi-protocol/fallback-linking & dynamic values (`|`), and CSS-piggybacking (`.mygroup`) +
+| `x=1,2,3` | vector/coordinate argument e.g. | +| `x=foo\|bar\|1\,2,3\|1.0` | the `\|` character is used for:
1.specifying `n` arguments for xrfragment `x`
2. fallback urls (`src=https://x.co/f.gltf\|xyz://f.gltf`)
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` | # URI parser > icanhazcode? yes, see [URI.hx](https://github.com/coderofsalvation/xrfragment/blob/main/src/xrfragment/URI.hx) diff --git a/src/xrfragment/URI.hx b/src/xrfragment/URI.hx index dbb444f..37dcae1 100644 --- a/src/xrfragment/URI.hx +++ b/src/xrfragment/URI.hx @@ -18,16 +18,14 @@ import xrfragment.Parser; * 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:
1.specifying `n` arguments for xrfragment `x`
2. fallback urls (`src=https://x.co/f.gltf\|xyz://f.gltf`)
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`) + * Hasslefree 3D vector-data (`,`), multi-protocol/fallback-linking & dynamic values (`|`), and CSS-piggybacking (`.mygroup`) + *
+ * | `x=1,2,3` | vector/coordinate argument e.g. | + * | `x=foo\|bar\|1\,2,3\|1.0` | the `\|` character is used for:
1.specifying `n` arguments for xrfragment `x`
2. fallback urls (`src=https://x.co/f.gltf\|xyz://f.gltf`)
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` | * * # URI parser * > icanhazcode? yes, see [URI.hx](https://github.com/coderofsalvation/xrfragment/blob/main/src/xrfragment/URI.hx)