zeroxr

21.12.241 • Public • Published

ZeroXR is a lightweight React Renderer for WebGL run on WebXR devices

Install

Package module

npm install zeroxr react

HTML script tag:

<script src="https://cdn.jsdelivr.net/npm/react@17.0.2/umd/react.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/zeroxr@21.12.24/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;
});

Package Sidebar

Install

npm i zeroxr

Weekly Downloads

7

Version

21.12.241

License

none

Unpacked Size

237 kB

Total Files

7

Last publish

Collaborators

  • dinhdu12