Skip to content

HoloPlayCore.js

This JavaScript library makes developing custom web-based holographic applications or integrating existing web-based rendering software with Looking Glass displays easy. With holoplaycore.js, developers can now interact with HoloPlay Service and obtain necessary information from the Looking Glass.

You can use this library to build a variety of web apps ranging from a simple gallery for displaying quilts to a complete 3D rendering program. For an example implementation of how to use holoplaycore.js to develop web-based 3D rendering program, review the holoplay.js source code and its documentation.

Features

  • A client to communicate with HoloPlay Service.
  • Shows calibration data and window information.
  • Pre-defined Messages makes communication easier.
  • Quilt loading and viewing functionality (see ShowMessage for more details).

Requirements

The end user must have HoloPlay Service installed on their machine.

Quick Start

Installation

From npm:

npm install --save holoplay-core 

From CDN:

<script src="https://unpkg.com/holoplay-core"></script>

Usage

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);
      });

API References

Visit our documentation on the holoplaycore.js API for more detailed support on how to effectively use and integrate holoplaycore.js into your application.

Examples

Visit our documentation on holoplaycore.js example code for more details on implementation.

Questions

Email us at support@lookingglassfactory.com if you have any further questions about how you can integrate HoloPlay Core into your software.