Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review #1

Open
wants to merge 1 commit into
base: review
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _posts/_defaults.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
date:
title:
categories:
description:
type: Document
---
52 changes: 52 additions & 0 deletions _posts/development-guide/2019-09-05-reality-tabs-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Reality Tabs Overview
description: Learn what reality tabs are from a high-level overview.
categories:
- development-guide
type: Document
set: development-guide
set_order: 16
---

Reality Tabs are `xr-iframes` which are like `iframes` but will extra spatial attributes like `position`, `scale`, `orientation`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like:

Much like iframes drawn on a 2d page, xr-iframes are 3d sites drawn in a 3d space.
xr-iframe works with any site or engine that uses WebXR or WebVR.

A high quality video would be good here.


### iframe

On the 2d web, an `iframe` is basically a window to another webpage, within a webpage. So you could be on a webpage and on that webpage there's an `<iframe>` that points to another webpage.

Example:
```html
<html>
<body>

<iframe src="http://google.com" />

</body>
</html>
```


### Position

Positioning an `iframe` on a 2d webpage only has 2 ways to move: up and down & left and right. In the 3d web, there is an additional `z` coordinate.

`xr-iframe` has an additional `position` attirbute, which allows creators to set where the `xr-iframe` site is in virtual space.

It looks something like this:
`xrIframe.positon = [x, y, z]`

### Orientation

`xr-iframe` has an additional `orientation` attirbute, which allows creators to set the rotational direction of the site in virtual space.

It looks something like this using threejs:
`xrIframe.orientation = new THREE.Quaternion().setFromEuler(new THREE.Euler(1, 1, 1, 'YXZ')).toArray()`



### Scale

Defining the size and scale of an `xr-iframe` is as simple as defining the `scale` attribute in three numbers for `x`, `y`, and `z`.

It looks something like this:
`xrIframe.scale = [x, y, z]`
60 changes: 60 additions & 0 deletions _posts/development-guide/2019-09-05-xr-iframe-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: xr-iframe API
description: How to create and manipulate reality tabs.
categories:
- development-guide
type: Document
set: development-guide
set_order: 21
---

This page will cover how to create and manipulate reality tabs (`xr-iframe`).

## Top-level creation
```js
// Import exokit-web
import('https://web.exokit.org/src/index.js'))
chrislatorres marked this conversation as resolved.
Show resolved Hide resolved
.then(() => {
// Create xr-iframe, define src attribute, and append/place it wherever you want as if it was a normal canvas
const xrIframe = document.createElement('xr-iframe');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should call this an xr-scene? It is different from the xr-iframe in usage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense conceptually, since it is possible to render multiple scenes in something like threejs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike three though, they would basically be completely separate.

xrIframe.src = 'child.html';
document.body.appendChild(xrIframe);
});
```

## xr-iframe manipulation

```js
// Set xr-iframe position
xrIframe.position = [1, 1, 1];
chrislatorres marked this conversation as resolved.
Show resolved Hide resolved
// Set xr-iframe orientation
xrIframe.orientation = new THREE.Quaternion().setFromEuler(new THREE.Euler(1, 1, 1, 'YXZ')).toArray();
// Set xr-iframe scale
xrIframe.scale = [1, 1, 1];
```

chrislatorres marked this conversation as resolved.
Show resolved Hide resolved
## Child xr-iframe creation

```js
// Create WebGL renderer and define layers
const renderer = new THREE.WebGLRenderer({
antialias: true,
});
document.body.appendChild(renderer.domElement);
const layers = [renderer.domElement];

...

// Request WebXR session and assign session layers
const session = await navigator.xr.requestSession({
chrislatorres marked this conversation as resolved.
Show resolved Hide resolved
exclusive: true,
});
session.layers = layers;

...

// Create xr-iframe, define src attribute, and push to layers
xrIframe = document.createElement('xr-iframe');
xrIframe.src = 'childschild.html';
layers.push(xrIframe);
```
18 changes: 18 additions & 0 deletions _posts/general/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
date: 2018-01-01
title: FAQ
redirect_from:
- /docs/faq
- /faq
- /docs/frequently-asked-questions
description: Frequently Asked Questions
categories:
- Exokit
type: Document
set: general
set_order: 1
---

## How can I visit

still under development
16 changes: 16 additions & 0 deletions _posts/general/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
date: 2018-01-01
title: Introduction
description: Exokit Engine
redirect_from:
- /introduction
- /docs
- /docs/
categories:
- Exokit
type: Document
set: general
set_order: 0
---

3d virtual space
20 changes: 20 additions & 0 deletions _posts/getting-started/coding-scenes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
date: 2018-01-01
title: Coding scenes
description: This set will help you understand how things work in the SDK.
redirect_from:
- /documentation/introduction/
- /docs/sdk-overview/
- /docs/command-line-interface/
- /docs/sdk-quick-start-guide/
- /sdk-reference/introduction/
categories:
- getting-started
type: Document
set: getting-started
set_order: 3
---

## The development tools

At a very high level, the SDK
14 changes: 14 additions & 0 deletions _posts/getting-started/installation-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
date: 2018-01-01
title: Installation Guide
description: Step-by-step guide to installing the SDK
redirect_from:
- /documentation/installation-guide/
categories:
- getting-started
type: Document
set: getting-started
set_order: 2
---

# Installation go