updated doc: added immersive demo
This commit is contained in:
parent
2e5a50466c
commit
cb11c5d609
File diff suppressed because one or more lines are too long
|
@ -1,18 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* navigation, portals & mutations
|
||||
*
|
||||
*
|
||||
* | fragment | type | scope | example value |
|
||||
* |`href`| string (uri or [predefined view](#predefined_view )) | 🔒 |`#pos=1,1,0`<br>`#pos=1,1,0&rot=90,0,0`<br>`#pos=pyramid`<br>`#pos=lastvisit\|pyramid`<br>`://somefile.gltf#pos=1,1,0`<br> |
|
||||
* |`href`| string (uri or predefined view) | 🔒 |`#pos=1,1,0`<br>`#pos=1,1,0&rot=90,0,0`<br>`#pos=pyramid`<br>`#pos=lastvisit\|pyramid`<br>`://somefile.gltf#pos=1,1,0`<br> |
|
||||
*
|
||||
* [[» example implementation|https://github.com/coderofsalvation/xrfragment/blob/main/src/three/xrf/pos.js]]<br>
|
||||
* [[» example 3D asset|https://github.com/coderofsalvation/xrfragment/blobl/main/src/example/assets/href.gltf]]<br>
|
||||
* [[» discussion|https://github.com/coderofsalvation/xrfragment/issues/1]]<br>
|
||||
*
|
||||
* [img[xrfragment.jpg]]
|
||||
*
|
||||
*
|
||||
*
|
||||
* !!!spec 1.0
|
||||
*
|
||||
* 1. a ''external''- or ''file URI'' fully replaces the current scene and assumes `pos=0,0,0&rot=0,0,0` by default (unless specified)
|
||||
*
|
||||
*
|
||||
* 1. an ''external''- or ''file URI'' fully replaces the current scene and assumes `pos=0,0,0&rot=0,0,0` by default (unless specified)
|
||||
*
|
||||
* 2. navigation should not happen when queries (`q=`) are present in local url: queries will apply (`pos=`, `rot=` e.g.) to the targeted object(s) instead.
|
||||
*
|
||||
*
|
||||
* 3. navigation should not happen ''immediately'' when user is more than 2 meter away from the portal/object containing the href (to prevent accidental navigation e.g.)
|
||||
*
|
||||
* 4. URL navigation should always be reflected in the client (in case of javascript: see [[here|https://github.com/coderofsalvation/xrfragment/blob/dev/src/3rd/three/navigator.js]] for an example navigator).
|
||||
*
|
||||
* 5. In XR mode, the navigator back/forward-buttons should be always visible (using a wearable e.g., see [[here|https://github.com/coderofsalvation/xrfragment/blob/dev/example/aframe/sandbox/index.html#L26-L29]] for an example wearable)
|
||||
*
|
||||
* [img[navigation.png]]
|
||||
*
|
||||
*/
|
||||
|
||||
xrf.frag.href = function(v, opts){
|
||||
|
@ -127,8 +140,13 @@ xrf.frag.href = function(v, opts){
|
|||
}
|
||||
|
||||
/**
|
||||
* > above was abducted from [[this|https://i.imgur.com/E3En0gJ.png]] and [[this|https://i.imgur.com/lpnTz3A.png]] survey result
|
||||
* > above solutions were abducted from [[this|https://i.imgur.com/E3En0gJ.png]] and [[this|https://i.imgur.com/lpnTz3A.png]] survey result
|
||||
*
|
||||
* [[» discussion|https://github.com/coderofsalvation/xrfragment/issues/1]]<br>
|
||||
* [[» implementation example|https://github.com/coderofsalvation/xrfragment/blob/main/src/three/xrf/pos.js]]<br>
|
||||
* !!!Demo
|
||||
*
|
||||
* > taken from <a href="./example/aframe/sandbox" target="_blank">aframe/sandbox</a>
|
||||
*
|
||||
* <video width="100%" autoplay="" muted="" loop="">
|
||||
* <source src="https://coderofsalvation.github.io/xrfragment.media/href.mp4" type="video/mp4">Your browser does not support the video element.
|
||||
* </video>
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue