<commit_before>### three-vr-renderer

VR renderer for THREE.js utilizing the upcoming VR APIs in popular browsers.

#### Overview

_Because Firefox is the sole browser with this support available, this short tutorial will be specific to Firefox._

##### Create the HMD and sensor objects

{% highlight javascript %}
window.addEventListener("load", function() {
    navigator.mozGetVRDevices(vrDeviceCallback);
}, false);

function vrDeviceCallback(vrdevs) {
    for (var i = 0; i < vrdevs.length; ++i) {
        if (vrdevs[i] instanceof HMDVRDevice) {
            vrHMD = vrdevs[i];
            break;
        }
    }
    for (var i = 0; i < vrdevs.length; ++i) {
        if (vrdevs[i] instanceof PositionSensorVRDevice &&
            vrdevs[i].hardwareUnitId == vrHMD.hardwareUnitId) {
            vrPosDev = vrdevs[i];
            break;
        }
    }
}
{% endhighlight %}

##### Create a VRRenderer

{% highlight javascript %}
renderer = new THREE.WebGLRenderer();
vrrenderer = new THREE.VRRenderer(renderer, vrHMD);
{% endhighlight %}

##### Orient the camera and render

{% highlight javascript %}
var state = vrPosDev.getState();
camera.quaternion.set(state.orientation.x, 
                      state.orientation.y, 
                      state.orientation.z, 
                      state.orientation.w);
vrrenderer.render(scene, camera);
{% endhighlight %}
<commit_msg>readme update<commit_after>### three-vr-renderer

VR renderer for THREE.js utilizing the upcoming VR APIs in popular browsers.

#### Overview

_Because Firefox is the sole browser with this support available, this short tutorial will be specific to Firefox._

##### Create the HMD and sensor objects

```javascript
window.addEventListener("load", function() {
    navigator.mozGetVRDevices(vrDeviceCallback);
}, false);

function vrDeviceCallback(vrdevs) {
    for (var i = 0; i < vrdevs.length; ++i) {
        if (vrdevs[i] instanceof HMDVRDevice) {
            vrHMD = vrdevs[i];
            break;
        }
    }
    for (var i = 0; i < vrdevs.length; ++i) {
        if (vrdevs[i] instanceof PositionSensorVRDevice &&
            vrdevs[i].hardwareUnitId == vrHMD.hardwareUnitId) {
            vrPosDev = vrdevs[i];
            break;
        }
    }
}
```

##### Create a VRRenderer

```javascript
renderer = new THREE.WebGLRenderer();
vrrenderer = new THREE.VRRenderer(renderer, vrHMD);
```

##### Orient the camera and render

```javascript
var state = vrPosDev.getState();
camera.quaternion.set(state.orientation.x, 
                      state.orientation.y, 
                      state.orientation.z, 
                      state.orientation.w);
vrrenderer.render(scene, camera);
```
{'fraction_non_alphanumeric': 0.12046389824167603, 'fraction_numerical': 0.0014964459408903852, 'mean_word_length': 2.75561797752809, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2290391', 'n_tokens_mistral': 844, 'n_tokens_neox': 796, 'n_words': 211}