zeroxr
v21.12.241
Published
ZeroXR is a lightweight React Renderer for WebGL run on WebXR devices
Maintainers
Readme
ZeroXR is a lightweight React Renderer for WebGL run on WebXR devices
Install
Package module
npm install zeroxr reactHTML script tag:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/zeroxr.js"></script>Example
import { Text, renderXR, requestXR } from 'zeroxr';
const HelloApp = () => {
return (
<Text translation={[0, 0, -1]} text={'Hello World!'} />
);
}
renderXR(<HelloApp />);
document.addEventListener('DOMContentLoaded', (event) => {
document.getElementById("btnEnterXR").onclick = requestXR;
});