The HoloPlay Core SDK unlocks the ability to integrate your existing 3D software with Looking Glass displays, making the Looking Glass a holographic second monitor. This JavaScript version is ideal for web front-end and Node development. There's also a native dynamic library version for Windows, Mac, and Linux.
NPM Package — Documentation — Forum — Discord — Official Site
From npm:
npm install --save holoplay-core
From CDN:
<script src="https://unpkg.com/holoplay-core"></script>
Include in html with script tag: (use holoplaycore.min.js for the minified version)
<script src="./node_modules/holoplay-core/dist/holoplaycore.js"></script>
<script>
const client = new HoloPlayCore.Client(
(msg) => {
console.log('Calibration values:', msg);
},
(err) => {
console.error('Error creating HoloPlay client:', err);
});
</script>
or skip the script tag and import the ES6 module (note the different filename!):
<script type="module">
import * as HoloPlayCore from './node_modules/holoplay-core/dist/holoplaycore.module.js';
const client = new HoloPlayCore.Client(
(msg) => {
console.log('Calibration values:', msg);
},
(err) => {
console.error('Error creating HoloPlay client:', err);
});
</script>
or in node:
const HoloPlayCore = require('holoplay-core');
const client = new HoloPlayCore.Client(
(msg) => {
console.log('Calibration values:', msg);
},
(err) => {
console.error('Error creating HoloPlay client:', err);
});
If you're developing HoloPlayCore.js and want to rebuild the dist version of this library, see BUILD.md.