diff --git a/doc/RFC_XR_Fragments.md b/doc/RFC_XR_Fragments.md
index a4655cc..7205603 100644
--- a/doc/RFC_XR_Fragments.md
+++ b/doc/RFC_XR_Fragments.md
@@ -552,6 +552,8 @@ 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.
+
# HYPER copy/paste
The previous example, offers something exciting compared to simple copy/paste of 3D objects or text.
diff --git a/doc/RFC_XR_Macros.html b/doc/RFC_XR_Macros.html
new file mode 100644
index 0000000..7bccf41
--- /dev/null
+++ b/doc/RFC_XR_Macros.html
@@ -0,0 +1,374 @@
+
+
+
+ XR Macros
+
+
+
+
+
+
+
+
+
+
+
+XR Macros
+
+
+
+stream: IETF
+area: Internet
+status: informational
+author: Leon van Kammen
+date: 2023-04-12T00:00:00Z
+workgroup: Internet Engineering Task Force
+value: draft-XRMACROS-leonvankammen-00
+
+
+
+
+Abstract
+
+This draft offers a specification for embedding macros in existing 3D scenes/assets, to offer simple interactions and configure the renderer further.
+Together with URI Fragments, it allows for rich immersive experiences without the need of a complicated sandboxed scripting languages.
+
+
+Almost every idea in this document is demonstrated at https://xrfragment.org, as this spec was created during the XR Fragments spec.
+
+
+Introduction
+
+How can we add more features to existing text & 3D scenes, without introducing new dataformats?
+Historically, there’s many attempts to create the ultimate markuplanguage or 3D fileformat.
+Their lowest common denominator is: (co)authoring using plain text.
+Therefore, XR Macros allows us to enrich/connect existing dataformats, by offering a polyglot notation based on existing notations:
+
+
+- getting/setting common used 3D properties using querystring- or JSON-notation
+- querying 3D properties using the lightweight searchengine notation used in XR Fragments
+
+
+
+NOTE: The chapters in this document are ordered from highlevel to lowlevel (technical) as much as possible
+
+
+Core principle
+
+
+- XR Macros use querystrings, but are HTML-agnostic (though pseudo-XR Fragment browsers can be implemented on top of HTML/Javascript).
+- XR Macros represents setting/getting common used properties found in all popular 3D frameworks/(game)editors/internet browsers.
+- XR Macros acts as simple eventhandlers for URI Fragments
+
+
+Conventions and Definitions
+
+See appendix below in case certain terms are not clear.
+
+List of XR Macros
+
+(XR) Macros can be embedded in 3D assets/scenes.
+Macros enrich existing spatial content with a lowcode, limited logic-layer, by recursive (economic) use of the querystring syntax (which search engines and XR Fragments already uses.
+This is done by allowing string/integer variables, and the | symbol to roundrobin variable values.
+Macros also act as events, so more serious scripting languages can react to them as well.
+
+Usecase: click object
+
+
+
+
+| custom property |
+value |
+trigger when |
+
+
+
+
+
+| !clickme |
+bg=1,1,1&foo=2 |
+object clicked |
+
+
+
+
+Usecase: conditional click object
+
+
+
+
+| custom property |
+value |
+trigger when |
+
+
+
+
+
+| # |
+foo=1 |
+scene |
+
+
+
+| !clickme |
+q=foo>2&bg=1,1,1 |
+object clicked and foo > 2 |
+
+
+
+
+
+when a user clicks an object with the custom properties above, it should set the backgroundcolor to 1,1,1 when foo is greater than 2 (see previous example)
+
+
+Usecase: click object (roundrobin)
+
+
+
+
+| custom property |
+value |
+trigger when |
+
+
+
+
+
+| !clickme |
+day|noon|night |
+object clicked |
+
+
+
+| day |
+bg=1,1,1 |
+roundrobin |
+
+
+
+| noon |
+bg=0.5,0.5,0.5 |
+roundrobin |
+
+
+
+| night |
+bg=0,0,0&foo=2 |
+roundrobin |
+
+
+
+
+
+when a user clicks an object with the custom properties above, it should trigger either day noon or night in roundrobin fashion.
+
+
+Usecase: click object, URI fragment and scene load
+
+
+
+
+| custom property |
+value |
+trigger when |
+
+
+
+
+
+| # |
+random |
+scene loaded |
+
+
+
+| #random |
+random |
+URL contains #random |
+
+
+
+| !random |
+day|noon|night |
+#random, # or click |
+
+
+
+| day |
+bg=1,1,1 |
+roundrobin |
+
+
+
+| noon |
+bg=0.5,0.5,0.5 |
+roundrobin |
+
+
+
+| night |
+bg=0,0,0&foo=2 |
+roundrobin |
+
+
+
+
+
+
+
+
+
+| custom property |
+value |
+trigger when |
+
+
+
+
+
+| !random |
+day |
+noon |
+
+
+
+| !day |
+bg=1,1,1 |
+clicked in contextmenu |
+
+
+
+| !noon |
+bg=0.5,0.5,0.5 |
+clicked in contextmenu |
+
+
+
+| !night |
+bg=0,0,0&foo=2 |
+clicked in contextmenu |
+
+
+
+
+
+The XR Browser should offer a contextmenu with these options when more than one !-macro is present on an object.
+
+
+Security Considerations
+
+IANA Considerations
+
+This document has no IANA actions.
+
+Acknowledgments
+
+
+
+Appendix: Definitions
+
+
+
+
+| definition |
+explanation |
+
+
+
+
+
+| scene |
+a (local/remote) 3D scene or 3D file (index.gltf e.g.) |
+
+
+
+| 3D object |
+an object inside a scene characterized by vertex-, face- and customproperty data. |
+
+
+
+| XR fragments |
+URI Fragment with spatial hints like #pos=0,0,0&t=1,100 e.g. |
+
+
+
+| query |
+an URI Fragment-operator which queries object(s) from a scene like #q=cube |
+
+
+
+| FPS |
+frames per second in spatial experiences (games,VR,AR e.g.), should be as high as possible |
+
+
+
+◻ |
+ascii representation of an 3D object/mesh |
+
+
+
+| (un)obtrusive |
+obtrusive: wrapping human text/thought in XML/HTML/JSON obfuscates human text into a salad of machine-symbols and words |
+
+
+
+
+
+
+
+
diff --git a/doc/RFC_XR_Macros.md b/doc/RFC_XR_Macros.md
index 6516f12..fbf5449 100644
--- a/doc/RFC_XR_Macros.md
+++ b/doc/RFC_XR_Macros.md
@@ -1,11 +1,11 @@
%%%
-Title = "XR Fragments"
+Title = "XR Macros"
area = "Internet"
workgroup = "Internet Engineering Task Force"
[seriesInfo]
-name = "XR-Fragments"
-value = "draft-XRFRAGMENTS-leonvankammen-00"
+name = "XR-Macros"
+value = "draft-XRMACROS-leonvankammen-00"
stream = "IETF"
status = "informational"
@@ -75,7 +75,7 @@ fullname="L.R. van Kammen"
-XR Fragments
+XR Macros
@@ -85,7 +85,7 @@ status: informational
author: Leon van Kammen
date: 2023-04-12T00:00:00Z
workgroup: Internet Engineering Task Force
-value: draft-XRFRAGMENTS-leonvankammen-00
+value: draft-XRMACROS-leonvankammen-00
@@ -93,11 +93,10 @@ value: draft-XRFRAGMENTS-leonvankammen-00
.# Abstract
-This draft offers a specification for 4D URLs & navigation, to link 3D scenes and text together with- or without a network-connection.
-The specification promotes spatial addressibility, sharing, navigation, query-ing and tagging interactive (text)objects across for (XR) Browsers.
-XR Fragments allows us to enrich existing dataformats, by recursive use of existing proven technologies like [URI Fragments](https://en.wikipedia.org/wiki/URI_fragment) and BibTags notation.
+This draft offers a specification for embedding macros in existing 3D scenes/assets, to offer simple interactions and configure the renderer further.
+Together with URI Fragments, it allows for rich immersive experiences without the need of a complicated sandboxed scripting languages.
-> Almost every idea in this document is demonstrated at [https://xrfragment.org](https://xrfragment.org)
+> Almost every idea in this document is demonstrated at [https://xrfragment.org](https://xrfragment.org), as this spec was created during the [XR Fragments](https://xrfragment.org) spec.
{mainmatter}
@@ -109,6 +108,7 @@ Their lowest common denominator is: (co)authoring using plain text.
Therefore, XR Macros allows us to enrich/connect existing dataformats, by offering a polyglot notation based on existing notations:
1. getting/setting common used 3D properties using querystring- or JSON-notation
+1. querying 3D properties using the lightweight searchengine notation used in [XR Fragments](https://xrfragment.org)
> NOTE: The chapters in this document are ordered from highlevel to lowlevel (technical) as much as possible
@@ -116,6 +116,7 @@ Therefore, XR Macros allows us to enrich/connect existing dataformats, by offeri
1. XR Macros use querystrings, but are HTML-agnostic (though pseudo-XR Fragment browsers **can** be implemented on top of HTML/Javascript).
1. XR Macros represents setting/getting common used properties found in all popular 3D frameworks/(game)editors/internet browsers.
+1. XR Macros acts as simple eventhandlers for URI Fragments
# Conventions and Definitions
@@ -123,39 +124,58 @@ See appendix below in case certain terms are not clear.
# List of XR Macros
-(XR) Macros can be embedded in 3D assets/scenes.
-The only addition is the `|` symbol to roundrobin variable values.
+(XR) Macros can be embedded in 3D assets/scenes.
+Macros enrich existing spatial content with a lowcode, limited logic-layer, by recursive (economic) use of the querystring syntax (which search engines and [XR Fragments](https://xrfragment.org) already uses.
+This is done by allowing string/integer variables, and the `|` symbol to roundrobin variable values.
Macros also act as events, so more serious scripting languages can react to them as well.
-| custom property | value | assign (rr) variable ? | execute opcode? | show contextmenu? |
-|-----------------|--------------------------|------------------------|-----------------|-------------------------------------------|
-| !clickme | day|noon|night | yes | not yet | only when multiple props start with ! |
-| day | bg=1,1,1 | no | yes | no |
-| noon | bg=0.5,0.5,0.5 | yes | yes | no |
-| night | bg=0,0,0&foo=2 | yes | yes | no |
+## Usecase: click object
----
+| custom property | value | trigger when |
+|-----------------|--------------------------|------------------------|
+| !clickme | bg=1,1,1&foo=2 | object clicked |
-| custom property | value | assign (rr) variable ? | execute opcode? | show contextmenu? |
-|--------------------|--------------------------|------------------------|-----------------|-----------------------------|
-| !turnofflights | night | no | yes | yes because of !clickme |
-| !clickme | day|noon|night | yes | not yet | yes because of !clickme |
-| day | bg=1,1,1 | no | yes | no |
-| noon | bg=0.5,0.5,0.5 | yes | yes | no |
-| night | bg=0,0,0&foo=2 | yes | yes | no |
+## Usecase: conditional click object
+| custom property | value | trigger when |
+|-----------------|--------------------------|-----------------------------|
+| # | foo=1 | scene |
+| !clickme | q=foo>2&bg=1,1,1 | object clicked and foo > 2 |
-lazy evaluation:
+> when a user clicks an object with the custom properties above, it should set the backgroundcolor to `1,1,1` when `foo` is greater than `2` (see previous example)
-| custom property | value | copy verbatim to URL? | (rr) variable [assingment]? |
-|-----------------|--------------------------|-----------------------|-----------------------------|
-| href | #cyclepreset | yes | no |
-| cyclepreset | day|noon|night | no | (yes) yes |
-| day | bg=1,1,1 | no | yes [yes] |
-| noon | bg=0.5,0.5,0.5 | no | yes [yes] |
-| night | bg=0,0,0&foo=2 | no | yes [yes] |
+## Usecase: click object (roundrobin)
+| custom property | value | trigger when |
+|-----------------|--------------------------|------------------------|
+| !clickme | day|noon|night | object clicked |
+| day | bg=1,1,1 | roundrobin |
+| noon | bg=0.5,0.5,0.5 | roundrobin |
+| night | bg=0,0,0&foo=2 | roundrobin |
+
+> when a user clicks an object with the custom properties above, it should trigger either `day` `noon` or `night` in roundrobin fashion.
+
+## Usecase: click object, URI fragment and scene load
+
+| custom property | value | trigger when |
+|-----------------|--------------------------|------------------------|
+| # | random | scene loaded |
+| #random | random | URL contains #random |
+| !random | day|noon|night | #random, # or click |
+| day | bg=1,1,1 | roundrobin |
+| noon | bg=0.5,0.5,0.5 | roundrobin |
+| night | bg=0,0,0&foo=2 | roundrobin |
+
+## Usecase: present context menu with options
+
+| custom property | value | trigger when |
+|-----------------|--------------------------|------------------------|
+| !random | day|noon|night | clicked in contextmenu |
+| !day | bg=1,1,1 | clicked in contextmenu |
+| !noon | bg=0.5,0.5,0.5 | clicked in contextmenu |
+| !night | bg=0,0,0&foo=2 | clicked in contextmenu |
+
+> The XR Browser should offer a contextmenu with these options when more than one `!`-macro is present on an object.
# Security Considerations
@@ -174,21 +194,11 @@ This document has no IANA actions.
|definition | explanation |
|----------------------|-------------------------------------------------------------------------------------------------------------------------------|
-|human | a sentient being who thinks fuzzy, absorbs, and shares thought (by plain text, not markuplanguage) |
|scene | a (local/remote) 3D scene or 3D file (index.gltf e.g.) |
|3D object | an object inside a scene characterized by vertex-, face- and customproperty data. |
-|metadata | custom properties of text, 3D Scene or Object(nodes), relevant to machines and a human minority (academics/developers) |
-|XR fragment | URI Fragment with spatial hints like `#pos=0,0,0&t=1,100` e.g. |
-|src | (HTML-piggybacked) metadata of a 3D object which instances content |
-|href | (HTML-piggybacked) metadata of a 3D object which links to content |
+|XR fragments | URI Fragment with spatial hints like `#pos=0,0,0&t=1,100` e.g. |
|query | an URI Fragment-operator which queries object(s) from a scene like `#q=cube` |
-|visual-meta | [visual-meta](https://visual.meta.info) data appended to text/books/papers which is indirectly visible/editable in XR. |
-|requestless metadata | metadata which never spawns new requests (unlike RDF/HTML, which can cause framerate-dropping, hence not used a lot in games) |
|FPS | frames per second in spatial experiences (games,VR,AR e.g.), should be as high as possible |
-|introspective | inward sensemaking ("I feel this belongs to that") |
-|extrospective | outward sensemaking ("I'm fairly sure John is a person who lives in oklahoma") |
|`◻` | ascii representation of an 3D object/mesh |
|(un)obtrusive | obtrusive: wrapping human text/thought in XML/HTML/JSON obfuscates human text into a salad of machine-symbols and words |
-|BibTeX | simple tagging/citing/referencing standard for plaintext |
-|BibTag | a BibTeX tag |
diff --git a/doc/RFC_XR_Macros.txt b/doc/RFC_XR_Macros.txt
new file mode 100644
index 0000000..cdfa990
--- /dev/null
+++ b/doc/RFC_XR_Macros.txt
@@ -0,0 +1,336 @@
+
+
+
+
+Internet Engineering Task Force L.R. van Kammen
+Internet-Draft 7 September 2023
+Intended status: Informational
+
+
+
+ XR Macros
+ draft-XRMACROS-leonvankammen-00
+
+Abstract
+
+ This draft offers a specification for embedding macros in existing 3D
+ scenes/assets, to offer simple interactions and configure the
+ renderer further.
+ Together with URI Fragments, it allows for rich immersive experiences
+ without the need of a complicated sandboxed scripting languages.
+
+ Almost every idea in this document is demonstrated at
+ https://xrfragment.org (https://xrfragment.org), as this spec was
+ created during the XR Fragments (https://xrfragment.org) spec.
+
+Status of This Memo
+
+ This Internet-Draft is submitted in full conformance with the
+ provisions of BCP 78 and BCP 79.
+
+ Internet-Drafts are working documents of the Internet Engineering
+ Task Force (IETF). Note that other groups may also distribute
+ working documents as Internet-Drafts. The list of current Internet-
+ Drafts is at https://datatracker.ietf.org/drafts/current/.
+
+ Internet-Drafts are draft documents valid for a maximum of six months
+ and may be updated, replaced, or obsoleted by other documents at any
+ 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 10 March 2024.
+
+Copyright Notice
+
+ Copyright (c) 2023 IETF Trust and the persons identified as the
+ document authors. All rights reserved.
+
+ This document is subject to BCP 78 and the IETF Trust's Legal
+ Provisions Relating to IETF Documents (https://trustee.ietf.org/
+ license-info) in effect on the date of publication of this document.
+ Please review these documents carefully, as they describe your rights
+ and restrictions with respect to this document. Code Components
+
+
+
+van Kammen Expires 10 March 2024 [Page 1]
+
+Internet-Draft XR Macros September 2023
+
+
+ extracted from this document must include Revised BSD License text as
+ described in Section 4.e of the Trust Legal Provisions and are
+ provided without warranty as described in the Revised BSD License.
+
+Table of Contents
+
+ 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
+ 2. Core principle . . . . . . . . . . . . . . . . . . . . . . . 2
+ 3. Conventions and Definitions . . . . . . . . . . . . . . . . . 3
+ 4. List of XR Macros . . . . . . . . . . . . . . . . . . . . . . 3
+ 4.1. Usecase: click object . . . . . . . . . . . . . . . . . . 3
+ 4.2. Usecase: conditional click object . . . . . . . . . . . . 3
+ 4.3. Usecase: click object (roundrobin) . . . . . . . . . . . 4
+ 4.4. Usecase: click object, URI fragment and scene load . . . 4
+ 4.5. Usecase: present context menu with options . . . . . . . 4
+ 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5
+ 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
+ 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 5
+ 8. Appendix: Definitions . . . . . . . . . . . . . . . . . . . . 5
+
+1. Introduction
+
+ How can we add more features to existing text & 3D scenes, without
+ introducing new dataformats?
+ Historically, there's many attempts to create the ultimate
+ markuplanguage or 3D fileformat.
+ Their lowest common denominator is: (co)authoring using plain text.
+ Therefore, XR Macros allows us to enrich/connect existing
+ dataformats, by offering a polyglot notation based on existing
+ notations:
+
+ 1. getting/setting common used 3D properties using querystring- or
+ JSON-notation
+ 2. querying 3D properties using the lightweight searchengine
+ notation used in XR Fragments (https://xrfragment.org)
+
+ | NOTE: The chapters in this document are ordered from highlevel to
+ | lowlevel (technical) as much as possible
+
+2. Core principle
+
+ 1. XR Macros use querystrings, but are HTML-agnostic (though pseudo-
+ XR Fragment browsers *can* be implemented on top of HTML/
+ Javascript).
+ 2. XR Macros represents setting/getting common used properties found
+ in all popular 3D frameworks/(game)editors/internet browsers.
+ 3. XR Macros acts as simple eventhandlers for URI Fragments
+
+
+
+
+van Kammen Expires 10 March 2024 [Page 2]
+
+Internet-Draft XR Macros September 2023
+
+
+3. Conventions and Definitions
+
+ See appendix below in case certain terms are not clear.
+
+4. List of XR Macros
+
+ (XR) Macros can be embedded in 3D assets/scenes.
+ Macros enrich existing spatial content with a lowcode, limited logic-
+ layer, by recursive (economic) use of the querystring syntax (which
+ search engines and XR Fragments (https://xrfragment.org) already
+ uses.
+ This is done by allowing string/integer variables, and the | symbol
+ to roundrobin variable values.
+ Macros also act as events, so more serious scripting languages can
+ react to them as well.
+
+4.1. Usecase: click object
+
+ +=================+================+================+
+ | custom property | value | trigger when |
+ +=================+================+================+
+ | !clickme | bg=1,1,1&foo=2 | object clicked |
+ +-----------------+----------------+----------------+
+
+ Table 1
+
+4.2. Usecase: conditional click object
+
+ +=================+==================+============================+
+ | custom property | value | trigger when |
+ +=================+==================+============================+
+ | # | foo=1 | scene |
+ +-----------------+------------------+----------------------------+
+ | !clickme | q=foo>2&bg=1,1,1 | object clicked and foo > 2 |
+ +-----------------+------------------+----------------------------+
+
+ Table 2
+
+ | when a user clicks an object with the custom properties above, it
+ | should set the backgroundcolor to 1,1,1 when foo is greater than 2
+ | (see previous example)
+
+
+
+
+
+
+
+
+
+
+van Kammen Expires 10 March 2024 [Page 3]
+
+Internet-Draft XR Macros September 2023
+
+
+4.3. Usecase: click object (roundrobin)
+
+ +=================+================+================+
+ | custom property | value | trigger when |
+ +=================+================+================+
+ | !clickme | day|noon|night | object clicked |
+ +-----------------+----------------+----------------+
+ | day | bg=1,1,1 | roundrobin |
+ +-----------------+----------------+----------------+
+ | noon | bg=0.5,0.5,0.5 | roundrobin |
+ +-----------------+----------------+----------------+
+ | night | bg=0,0,0&foo=2 | roundrobin |
+ +-----------------+----------------+----------------+
+
+ Table 3
+
+ | when a user clicks an object with the custom properties above, it
+ | should trigger either day noon or night in roundrobin fashion.
+
+4.4. Usecase: click object, URI fragment and scene load
+
+ +=================+================+======================+
+ | custom property | value | trigger when |
+ +=================+================+======================+
+ | # | random | scene loaded |
+ +-----------------+----------------+----------------------+
+ | #random | random | URL contains #random |
+ +-----------------+----------------+----------------------+
+ | !random | day|noon|night | #random, # or click |
+ +-----------------+----------------+----------------------+
+ | day | bg=1,1,1 | roundrobin |
+ +-----------------+----------------+----------------------+
+ | noon | bg=0.5,0.5,0.5 | roundrobin |
+ +-----------------+----------------+----------------------+
+ | night | bg=0,0,0&foo=2 | roundrobin |
+ +-----------------+----------------+----------------------+
+
+ Table 4
+
+4.5. Usecase: present context menu with options
+
+ +=================+================+========================+
+ | custom property | value | trigger when |
+ +=================+================+========================+
+ | !random | day | noon |
+ +-----------------+----------------+------------------------+
+ | !day | bg=1,1,1 | clicked in contextmenu |
+ +-----------------+----------------+------------------------+
+
+
+
+van Kammen Expires 10 March 2024 [Page 4]
+
+Internet-Draft XR Macros September 2023
+
+
+ | !noon | bg=0.5,0.5,0.5 | clicked in contextmenu |
+ +-----------------+----------------+------------------------+
+ | !night | bg=0,0,0&foo=2 | clicked in contextmenu |
+ +-----------------+----------------+------------------------+
+
+ Table 5
+
+ | The XR Browser should offer a contextmenu with these options when
+ | more than one !-macro is present on an object.
+
+5. Security Considerations
+
+6. IANA Considerations
+
+ This document has no IANA actions.
+
+7. Acknowledgments
+
+ * NLNET (https://nlnet.nl)
+ * Future of Text (https://futureoftext.org)
+ * visual-meta.info (https://visual-meta.info)
+
+8. Appendix: Definitions
+
+ +===============+===================================================+
+ | definition | explanation |
+ +===============+===================================================+
+ | scene | a (local/remote) 3D scene or 3D file |
+ | | (index.gltf e.g.) |
+ +---------------+---------------------------------------------------+
+ | 3D object | an object inside a scene characterized by |
+ | | vertex-, face- and customproperty data. |
+ +---------------+---------------------------------------------------+
+ | XR fragments | URI Fragment with spatial hints like |
+ | | #pos=0,0,0&t=1,100 e.g. |
+ +---------------+---------------------------------------------------+
+ | query | an URI Fragment-operator which queries |
+ | | object(s) from a scene like #q=cube |
+ +---------------+---------------------------------------------------+
+ | FPS | frames per second in spatial experiences |
+ | | (games,VR,AR e.g.), should be as high as |
+ | | possible |
+ +---------------+---------------------------------------------------+
+ | ◻ | ascii representation of an 3D object/mesh |
+ +---------------+---------------------------------------------------+
+ | (un)obtrusive | obtrusive: wrapping human text/thought in |
+ | | XML/HTML/JSON obfuscates human text into |
+ | | a salad of machine-symbols and words |
+
+
+
+van Kammen Expires 10 March 2024 [Page 5]
+
+Internet-Draft XR Macros September 2023
+
+
+ +---------------+---------------------------------------------------+
+
+ Table 6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+van Kammen Expires 10 March 2024 [Page 6]
diff --git a/doc/RFC_XR_Macros.xml b/doc/RFC_XR_Macros.xml
new file mode 100644
index 0000000..e077f7b
--- /dev/null
+++ b/doc/RFC_XR_Macros.xml
@@ -0,0 +1,299 @@
+
+
+
+
+
+XR Macros
+
+
+Internet
+Internet Engineering Task Force
+
+
+This draft offers a specification for embedding macros in existing 3D scenes/assets, to offer simple interactions and configure the renderer further.
+
+Together with URI Fragments, it allows for rich immersive experiences without the need of a complicated sandboxed scripting languages.
+Almost every idea in this document is demonstrated at https://xrfragment.org, as this spec was created during the XR Fragments spec.
+
+
+
+
+
+
+Introduction
+How can we add more features to existing text & 3D scenes, without introducing new dataformats?
+
+Historically, there's many attempts to create the ultimate markuplanguage or 3D fileformat.
+
+Their lowest common denominator is: (co)authoring using plain text.
+
+Therefore, XR Macros allows us to enrich/connect existing dataformats, by offering a polyglot notation based on existing notations:
+
+
+
+- getting/setting common used 3D properties using querystring- or JSON-notation
+- querying 3D properties using the lightweight searchengine notation used in XR Fragments
+
+NOTE: The chapters in this document are ordered from highlevel to lowlevel (technical) as much as possible
+
+
+Core principle
+
+
+- XR Macros use querystrings, but are HTML-agnostic (though pseudo-XR Fragment browsers can be implemented on top of HTML/Javascript).
+- XR Macros represents setting/getting common used properties found in all popular 3D frameworks/(game)editors/internet browsers.
+- XR Macros acts as simple eventhandlers for URI Fragments
+
+
+
+Conventions and Definitions
+See appendix below in case certain terms are not clear.
+
+
+List of XR Macros
+(XR) Macros can be embedded in 3D assets/scenes.
+
+Macros enrich existing spatial content with a lowcode, limited logic-layer, by recursive (economic) use of the querystring syntax (which search engines and XR Fragments already uses.
+
+This is done by allowing string/integer variables, and the | symbol to roundrobin variable values.
+
+Macros also act as events, so more serious scripting languages can react to them as well.
+
+
+Usecase: click object
+
+
+
+| custom property |
+value |
+trigger when |
+
+
+
+
+
+| !clickme |
+bg=1,1,1&foo=2 |
+object clicked |
+
+
+
+
+Usecase: conditional click object
+
+
+
+| custom property |
+value |
+trigger when |
+
+
+
+
+
+| # |
+foo=1 |
+scene |
+
+
+
+| !clickme |
+q=foo>2&bg=1,1,1 |
+object clicked and foo > 2 |
+
+
+
when a user clicks an object with the custom properties above, it should set the backgroundcolor to 1,1,1 when foo is greater than 2 (see previous example)
+
+
+Usecase: click object (roundrobin)
+
+
+
+| custom property |
+value |
+trigger when |
+
+
+
+
+
+| !clickme |
+day|noon|night |
+object clicked |
+
+
+
+| day |
+bg=1,1,1 |
+roundrobin |
+
+
+
+| noon |
+bg=0.5,0.5,0.5 |
+roundrobin |
+
+
+
+| night |
+bg=0,0,0&foo=2 |
+roundrobin |
+
+
+
when a user clicks an object with the custom properties above, it should trigger either day noon or night in roundrobin fashion.
+
+
+Usecase: click object, URI fragment and scene load
+
+
+
+| custom property |
+value |
+trigger when |
+
+
+
+
+
+| # |
+random |
+scene loaded |
+
+
+
+| #random |
+random |
+URL contains #random |
+
+
+
+| !random |
+day|noon|night |
+#random, # or click |
+
+
+
+| day |
+bg=1,1,1 |
+roundrobin |
+
+
+
+| noon |
+bg=0.5,0.5,0.5 |
+roundrobin |
+
+
+
+| night |
+bg=0,0,0&foo=2 |
+roundrobin |
+
+
+
+
+Usecase: present context menu with options
+
+
+
+| custom property |
+value |
+trigger when |
+
+
+
+
+
+| !random |
+day |
+noon |
+
+
+
+| !day |
+bg=1,1,1 |
+clicked in contextmenu |
+
+
+
+| !noon |
+bg=0.5,0.5,0.5 |
+clicked in contextmenu |
+
+
+
+| !night |
+bg=0,0,0&foo=2 |
+clicked in contextmenu |
+
+
+
The XR Browser should offer a contextmenu with these options when more than one !-macro is present on an object.
+
+
+
+Security Considerations
+
+
+IANA Considerations
+This document has no IANA actions.
+
+
+Acknowledgments
+
+
+- NLNET
+- Future of Text
+- visual-meta.info
+
+
+
+Appendix: Definitions
+
+
+
+| definition |
+explanation |
+
+
+
+
+
+| scene |
+a (local/remote) 3D scene or 3D file (index.gltf e.g.) |
+
+
+
+| 3D object |
+an object inside a scene characterized by vertex-, face- and customproperty data. |
+
+
+
+| XR fragments |
+URI Fragment with spatial hints like #pos=0,0,0&t=1,100 e.g. |
+
+
+
+| query |
+an URI Fragment-operator which queries object(s) from a scene like #q=cube |
+
+
+
+| FPS |
+frames per second in spatial experiences (games,VR,AR e.g.), should be as high as possible |
+
+
+
+| ◻ |
+ascii representation of an 3D object/mesh |
+
+
+
+| (un)obtrusive |
+obtrusive: wrapping human text/thought in XML/HTML/JSON obfuscates human text into a salad of machine-symbols and words |
+
+
+
+
+
+
+
diff --git a/doc/RFC_XR_Text_Fragments.md b/doc/RFC_XR_Text_Fragments.md
new file mode 100644
index 0000000..ec2892f
--- /dev/null
+++ b/doc/RFC_XR_Text_Fragments.md
@@ -0,0 +1,204 @@
+%%%
+Title = "XR Macros"
+area = "Internet"
+workgroup = "Internet Engineering Task Force"
+
+[seriesInfo]
+name = "XR-Macros"
+value = "draft-XRTEXTFRAGMENTS-leonvankammen-00"
+stream = "IETF"
+status = "informational"
+
+date = 2023-04-12T00:00:00Z
+
+[[author]]
+initials="L.R."
+surname="van Kammen"
+fullname="L.R. van Kammen"
+
+%%%
+
+
+
+
+
+.# Abstract
+
+This draft offers a specification for embedding macros in existing 3D scenes/assets, to offer simple interactions and configure the renderer further.
+Together with URI Fragments, it allows for rich immersive experiences without the need of a complicated sandboxed scripting languages.
+
+> Almost every idea in this document is demonstrated at [https://xrfragment.org](https://xrfragment.org), as this spec was created during the [XR Fragments](https://xrfragment.org) spec.
+
+{mainmatter}
+
+# Introduction
+
+How can we add more features to existing text & 3D scenes, without introducing new dataformats?
+Historically, there's many attempts to create the ultimate markuplanguage or 3D fileformat.
+Their lowest common denominator is: (co)authoring using plain text.
+Therefore, XR Macros allows us to enrich/connect existing dataformats, by offering a polyglot notation based on existing notations:
+
+1. getting/setting common used 3D properties using querystring- or JSON-notation
+1. querying 3D properties using the lightweight searchengine notation used in [XR Fragments](https://xrfragment.org)
+
+> NOTE: The chapters in this document are ordered from highlevel to lowlevel (technical) as much as possible
+
+# Core principle
+
+1. XR Macros use querystrings, but are HTML-agnostic (though pseudo-XR Fragment browsers **can** be implemented on top of HTML/Javascript).
+1. XR Macros represents setting/getting common used properties found in all popular 3D frameworks/(game)editors/internet browsers.
+1. XR Macros acts as simple eventhandlers for URI Fragments
+
+# Conventions and Definitions
+
+See appendix below in case certain terms are not clear.
+
+# List of XR Macros
+
+(XR) Macros can be embedded in 3D assets/scenes.
+Macros enrich existing spatial content with a lowcode, limited logic-layer, by recursive (economic) use of the querystring syntax (which search engines and [XR Fragments](https://xrfragment.org) already uses.
+This is done by allowing string/integer variables, and the `|` symbol to roundrobin variable values.
+Macros also act as events, so more serious scripting languages can react to them as well.
+
+## Usecase: click object
+
+| custom property | value | trigger when |
+|-----------------|--------------------------|------------------------|
+| !clickme | bg=1,1,1&foo=2 | object clicked |
+
+## Usecase: conditional click object
+
+| custom property | value | trigger when |
+|-----------------|--------------------------|-----------------------------|
+| # | foo=1 | scene |
+| !clickme | q=foo>2&bg=1,1,1 | object clicked and foo > 2 |
+
+> when a user clicks an object with the custom properties above, it should set the backgroundcolor to `1,1,1` when `foo` is greater than `2` (see previous example)
+
+## Usecase: click object (roundrobin)
+
+| custom property | value | trigger when |
+|-----------------|--------------------------|------------------------|
+| !clickme | day|noon|night | object clicked |
+| day | bg=1,1,1 | roundrobin |
+| noon | bg=0.5,0.5,0.5 | roundrobin |
+| night | bg=0,0,0&foo=2 | roundrobin |
+
+> when a user clicks an object with the custom properties above, it should trigger either `day` `noon` or `night` in roundrobin fashion.
+
+## Usecase: click object, URI fragment and scene load
+
+| custom property | value | trigger when |
+|-----------------|--------------------------|------------------------|
+| # | random | scene loaded |
+| #random | random | URL contains #random |
+| !random | day|noon|night | #random, # or click |
+| day | bg=1,1,1 | roundrobin |
+| noon | bg=0.5,0.5,0.5 | roundrobin |
+| night | bg=0,0,0&foo=2 | roundrobin |
+
+## Usecase: present context menu with options
+
+| custom property | value | trigger when |
+|-----------------|--------------------------|------------------------|
+| !random | day|noon|night | clicked in contextmenu |
+| !day | bg=1,1,1 | clicked in contextmenu |
+| !noon | bg=0.5,0.5,0.5 | clicked in contextmenu |
+| !night | bg=0,0,0&foo=2 | clicked in contextmenu |
+
+> The XR Browser should offer a contextmenu with these options when more than one `!`-macro is present on an object.
+
+# Security Considerations
+
+
+# IANA Considerations
+
+This document has no IANA actions.
+
+# Acknowledgments
+
+* [NLNET](https://nlnet.nl)
+* [Future of Text](https://futureoftext.org)
+* [visual-meta.info](https://visual-meta.info)
+
+# Appendix: Definitions
+
+|definition | explanation |
+|----------------------|-------------------------------------------------------------------------------------------------------------------------------|
+|scene | a (local/remote) 3D scene or 3D file (index.gltf e.g.) |
+|3D object | an object inside a scene characterized by vertex-, face- and customproperty data. |
+|XR fragments | URI Fragment with spatial hints like `#pos=0,0,0&t=1,100` e.g. |
+|query | an URI Fragment-operator which queries object(s) from a scene like `#q=cube` |
+|FPS | frames per second in spatial experiences (games,VR,AR e.g.), should be as high as possible |
+|`◻` | ascii representation of an 3D object/mesh |
+|(un)obtrusive | obtrusive: wrapping human text/thought in XML/HTML/JSON obfuscates human text into a salad of machine-symbols and words |
+