About

The Desktop Vision JS SDK makes it simple to bring Desktop Vision Computers into your 2D and WebXR applications. Currently the SDK is separated into two different modules that include numerous classes: Babylon, and THREE.

Prerequisites

  1. API Keys - If you are an approved Desktop Vision Partner then you can create API keys at partners.desktop.vision otherwise you should contact devon@vali.ventures.
  2. A recent version of Babylon or THREE lib

Installation

To install the Babylon version of the Destkop Vision SDK add the following to the head of your applications html head element (ideally before your application logic, but it shouldn't matter):

<script src"https://js.desktop.vision/babylon.min.js"></script>

Then use window.DesktopVision

or

	npm install @desktop.vision/js-sdk

Then to initialize the SDK you use the DesktopVision.loadSDK function:

// this dependency is excluded from the Desktop Vision SDK for the sake of bundle size
// the loadSDK function injects the dependency
import * as BABYLON from 'babylonjs'
import DesktopVision from '@desktop.vision/js-sdk/dist/babylon.min'

const { Computer, Keyboard, Controls, ComputerConnection } = DesktopVision.loadSDK(BABYLON)

To install the Three version of the Destkop Vision SDK add the following to the head of your applications html head element (ideally before your application logic):

<script src"https://js.desktop.vision/three.min.js"></script>

Then use window.DesktopVision

or

	npm install @desktop.vision/js-sdk

Then to initialize the SDK you use the DesktopVision.loadSDK function:

// these dependencies are excluded from the Desktop Vision SDK for the sake of bundle size
// the loadSDK function injects the dependencies
import * as THREE from 'three';
import { XRControllerModelFactory } from 'three/examples/jsm/webxr/XRControllerModelFactory'
import { XRHandModelFactory } from 'three/examples/jsm/webxr/XRHandModelFactory.js'
import DesktopVision from '@desktop.vision/js-sdk/dist/three.min'

const {
	Computer, 
	ComputerConnection
} = DesktopVision.loadSDK(THREE, XRControllerModelFactory, XRHandModelFactory);

Example Apps