# What would this code be in p5js?

**URL:** https://discourse.processing.org/t/what-would-this-code-be-in-p5js/32541
**Category:** Libraries
**Created:** [October 1, 2021, 5:49am UTC](https://discourse.processing.org/t/what-would-this-code-be-in-p5js/32541 "2021-10-01T05:49:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MoonAlien822](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)
#### Post date: [October 1, 2021, 5:49am UTC](https://discourse.processing.org/t/what-would-this-code-be-in-p5js/32541/1 "2021-10-01T05:49:03Z")

</div>

how to translate this to p5js?

```auto
OpenVRLibrary openVR;
public void setup() {
    frameRate(90);
    openVR = new OpenVRLibrary(this);
}

```

---

<div class="post-metadata">

### Author: ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)
#### Post date: [October 1, 2021, 7:40am UTC](https://discourse.processing.org/t/what-would-this-code-be-in-p5js/32541/2 "2021-10-01T07:40:37Z")

</div>

First of all, here’s where that code is from:

> **[GitHub - Dawars/openvr-for-processing: OpenVR Library for Processing](https://github.com/Dawars/openvr-for-processing)**
>
> OpenVR Library for Processing. Contribute to Dawars/openvr-for-processing development by creating an account on GitHub.

It’s unlikely that this will work in P5.js. Mainly because the library is for Processing, and not for P5.js, but also because I don’t think your web browser can easily access your VR headset.

What is your end goal? Are you trying to make a VR app? There are probably better tutorial for that in other languages.

---

<div class="post-metadata">

### Author: ![MoonAlien822](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)
#### Post date: [October 1, 2021, 9:16am UTC](https://discourse.processing.org/t/what-would-this-code-be-in-p5js/32541/3 "2021-10-01T09:16:32Z")

</div>

I just wanted to try it out but i couldn’t figure out how to get it into processing but in p5js i could find it so i tried that.
