Skip to content

fernandojsg/webxr-pico8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webxr-pico8

WebXR Pico8 Player: https://fernandojsg.github.io/webxr-pico8/

screenshot

Introduction

Proof of concept on how to integrate already existing non immersive games in a WebXR application. I used pico-8 games in this example as you can export them to self-contained html&js without external dependencies, but this concept could be applied to any game as you just need to get the canvas where the game is being rendered.

I loaded the pico-8 carts using an iframe and I resend all the keyboard events the main document gets to that iframe.

The WebXR version is currently developed to work just with Oculus Quest at the moment, but I'll extend the support of other devices later on. I used the IW WG WebXR input profiles library to detect the buttons and axis state and convert it to key events and send them to the pico8 iframe.

It's important to notice that when entering VR, the window.requestAnimationFrame is not being called, so you should handle it correctly in your game in order to get it rendered and executed properly.

Credits

Assets:

Pico-8 Carts:

Releases

No releases published

Packages

No packages published