{"id":22941006,"url":"https://github.com/zetaphor/ovrt-helper","last_synced_at":"2025-10-06T13:24:30.564Z","repository":{"id":141655755,"uuid":"247242825","full_name":"Zetaphor/ovrt-helper","owner":"Zetaphor","description":"Wrapper around OVR Toolkit's JS API to make it more sane","archived":false,"fork":false,"pushed_at":"2020-03-29T22:16:54.000Z","size":121,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-12T21:40:55.607Z","etag":null,"topics":["javascript","ovr","ovr-toolkit","virtual-reality","vr"],"latest_commit_sha":null,"homepage":"http://wiki.ovrtoolkit.co.uk","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zetaphor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-14T08:53:57.000Z","updated_at":"2025-04-09T03:40:06.000Z","dependencies_parsed_at":"2023-05-09T13:16:28.248Z","dependency_job_id":null,"html_url":"https://github.com/Zetaphor/ovrt-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Zetaphor/ovrt-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zetaphor%2Fovrt-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zetaphor%2Fovrt-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zetaphor%2Fovrt-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zetaphor%2Fovrt-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zetaphor","download_url":"https://codeload.github.com/Zetaphor/ovrt-helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zetaphor%2Fovrt-helper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278617712,"owners_count":26016606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","ovr","ovr-toolkit","virtual-reality","vr"],"created_at":"2024-12-14T13:35:42.777Z","updated_at":"2025-10-06T13:24:30.558Z","avatar_url":"https://github.com/Zetaphor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OVR Toolkit API Helper\r\n\r\nThis library wraps the OVR Toolkit API and provides properties and helper methods to make accessing and controlling windows easier. This script will only work when executed within a Custom App browser window in OVR Toolkit.\r\n\r\nTODO: Add note on request flow in library/OVR Toolkit\r\nRename references to `transform` to `details`\r\n\r\n\r\n#### **[OVR Toolkit Custom Apps Wiki Page](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps)**\r\n\r\n## **Table Of Contents**\r\n* [Methods](#methods)\r\n  * [Setup](#setup)\r\n  * [Setup Logging](#setup-logging)\r\n  * [Creating Windows](#creating-windows)\r\n    * [Web Window](#web-window)\r\n    * [Desktop Window](#desktop-window)\r\n    * [Application Window](#application-window)\r\n    * [Spawn Window](#spawn-window)\r\n  * [Using Windows](#using-windows)\r\n    * [Get Window Details](#get-window-details)\r\n    * [Get Window Type](#get-window-type)\r\n    * [Close Window](#close-window)\r\n    * [Refresh Web Window](#refresh-web-window)\r\n    * [Get Window Boundaries](#get-window-boundaries)\r\n    * [Set Window Position](#set-window-position)\r\n    * [Set Window Rotation](#set-window-rotation)\r\n    * [Set Window Setting](#set-window-setting)\r\n  * [Messaging](#messaging)\r\n    * [Broadcast To All Web Windows](#broadcast-to-all-web-windows)\r\n    * [Send To A Specific Web Window](#send-to-a-specific-web-window)\r\n  * [Update Properties](#update-properties)\r\n    * [Get Monitor Count](#get-monitor-count)\r\n    * [Get Window Titles](#get-window-titles)\r\n  * [Enable/Disable Updates](#enabledisable-updates)\r\n* [Properties](#properties)\r\n  * [Data Properties](#data-properties)\r\n    * [Total Monitors](#total-monitors)\r\n    * [Window List](#window-list)\r\n    * [Knuckles Finger Curls](#knuckles-finger-curls)\r\n    * [HMD/Controller Positions](#hmdcontroller-positions)\r\n  * [Update Flags](#update-flags)\r\n    * [Toggle Knuckles Finger Curl Updates](#toggle-knuckles-finger-curl-updates)\r\n    * [Toggle Window List Updates](#toggle-window-list-updates)\r\n    * [Toggle HMD/Controller Position Updates](#toggle-hmdcontroller-position-updates)\r\n    * [Toggle Window List Updates](#toggle-window-list-updates)\r\n    * [Toggle Window Move/Resize Updates](#toggle-window-moveresize-updates)\r\n  * [Constants](#constants)\r\n    * [Window Attached Device](#window-attached-device)\r\n    * [Window Types](#window-types)\r\n    * [Window Settings](#window-settings)\r\n    * [New Transform](#new-transform)\r\n* [Events](#events)\r\n  * [Window Opened](#window-opened)\r\n  * [Window Closed](#window-closed)\r\n  * [Window Mouse Enter/Leave](#window-mouse-enterleave)\r\n  * [Message Received](#message-received)\r\n* [Notes](#notes)\r\n\r\n## Methods\r\n\r\n### Setup\r\n```javascript\r\novrt.setup(selector)\r\n```\r\n\r\nThis function calls [`ovrt.setupLogging(selector)`](#setup-logging) and populates the value of [`ovrt.totalMonitors`](#total-monitors)\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nselector | String | A valid HTML selector\r\n\r\n### Setup Logging\r\n```javascript\r\novrt.setupLogging(selector)\r\n```\r\n\r\nThis library includes logging functions that will override the windows `console.log` method and error handlers and redirects their output to a DOM element. This means you can write regular `console.log` commands and the output of that and any errors will be appended to the `innerHTML` of the element you specify.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nselector | String | A valid HTML selector\r\n\r\n\r\n**Example Output:**\r\n```html\r\n\u003c!-- console.log --\u003e\r\n\u003cp class=\"console-item log-item\"\u003e\r\n  \u003cspan class=\"timestamp\"\u003e12:46:26:160\u003c/span\u003e\u0026nbsp;\r\n  \u003cspan class=\"prefix\"\u003e[LOG]\u003c/span\u003e\u0026nbsp;\r\n  \u003cspan class=\"message\"\u003eConsole log test\u003c/span\u003e\r\n\u003c/p\u003e\r\n\r\n\u003c!-- Error output --\u003e\r\n\u003cp class=\"error-item log-item\"\u003e\r\n  \u003cspan class=\"timestamp\"\u003e${time}\u003c/span\u003e\u0026nbsp;\r\n  \u003cspan class=\"prefix\"\u003e[ERROR]\u003c/span\u003e\u0026nbsp;\r\n  \u003cspan class=\"message\"\u003e${errorMsg}\u003c/span\u003e\r\n  \u0026nbsp;-\u0026nbsp;\r\n  \u003cspan class=\"lineNumber\"\u003eL${lineNumber}\u003c/span\u003e\r\n  \u0026nbsp;-\u0026nbsp;\r\n  \u003cspan class=\"url\"\u003e${url}\u003c/span\u003e\r\n\u003c/p\u003e\r\n```\r\n\r\n\r\n\r\n### Creating Windows\r\nThis library abstracts the window creation process with type-specific helper functions that accept a function definition for a callback instead of a string. These functions will also accept a data object that will be passed to the callback as a final parameter.\r\n\r\n#### Web Window\r\n```javascript\r\novrt.createWebWin(url, width, height, callback, data)\r\n```\r\n\r\nArgument | Type | Description | Optional\r\n-------- | ---- | ----------- | --------\r\nurl | String | URL to open the web screen to\r\nwidth | Number | The width of the screen in pixels\r\nheight | Number | The height of the screen in pixels\r\ncallback | Function | A function definition to callback once the window is created | True\r\ndata | Any | This value will be passed as a second parameter to the callback after the window uid | True\r\n\r\n#### Desktop Window\r\n```javascript\r\novrt.createDesktopWin(monitorId, callback, data)\r\n```\r\n\r\nArgument | Type | Description | Optional\r\n-------- | ---- | ----------- | --------\r\nmonitorId | Number | Which physical display to capture\r\ncallback | Function | A function definition to callback once the window is created | True\r\ndata | Any | This value will be passed as a second parameter to the callback after the window uid | True\r\n\r\n#### Application Window\r\n```javascript\r\novrt.createWin(windowHandle, callback, data)\r\n```\r\n\r\nArgument | Type | Description | Optional\r\n-------- | ---- | ----------- | --------\r\nwindowHandle | Number | A window handle from [`ovrt.windowTitles`](#window-list)\r\ncallback | Function | A function definition to callback once the window is created | True\r\ndata | Any | This value will be passed as a second parameter to the callback after the window uid | True\r\n\r\n#### Spawn Window\r\n```javascript\r\novrt.requestWinSpawn(type, contents, callback, data, transform)\r\n```\r\n\r\nMakes a request to OVRToolkit for a new window to be spawned with the specified properties. `type` must match an [OVR Toolkit window type constant](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#Window_types).\r\n\r\nContents value is determined by the window type. Desktops require a Number monitorId, applicaitions require a Number windowHandle, and web screens require an [OVRWebContents object](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#OVRWebContents). This method is used internally by [`createWin`](#application-window), [`createDesktopWin`](#desktop-window), and [`createWebWin`](#web-window).\r\n\r\nArgument | Type | Description | Optional\r\n-------- | ---- | ----------- | --------\r\ntype | Number | A window type as defined in [`ovrt.winTypes`](#window-types)\r\ncontents | Any | This window contents, can be OVRWebContents or Number\r\ncallback | Function | A function definition to callback once the window is created | True\r\ndata | Any | This value will be passed as a second parameter to the callback after the window uid | True\r\ntransform | Object | An [OVROverlayTransform](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#OVROverlayTransform) to create the window with, if undefined then [`ovrt.newTransform`](#new-transform) is used | True\r\n\r\n\r\n### Using Windows\r\n\r\n#### Get Window Details\r\n```javascript\r\novrt.requestWinDetails(uid, callback, data)\r\n```\r\n\r\nMakes a request to OVR Toolkit for a windows [OVROverlayTransform](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#OVROverlayTransform) object.\r\n\r\nArgument | Type | Description | Optional\r\n-------- | ---- | ----------- | --------\r\nuid | Number | The uid of the window to get a transform for\r\ncallback | Function | A function definition to callback once the window is created\r\ndata | Any | This value will be passed as a second parameter to the callback after the window details | True\r\n\r\n#### Get Window Type\r\n```javascript\r\novrt.getWinType(uid, callback, data)\r\n```\r\n\r\nMakes a request to OVR Toolkit for a windows [overlay type](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#Types).\r\n\r\nArgument | Type | Description | Optional\r\n-------- | ---- | ----------- | --------\r\nuid | Number | The uid of the window to get a type for\r\ncallback | Function | A function definition to callback with the window type\r\ndata | Any | This value will be passed as a second parameter to the callback after the window type | True\r\n\r\n#### Close Window\r\n```javascript\r\novrt.closeWin(uid)\r\n```\r\n\r\nClose a window.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nuid | Number | The uid of the window to close\r\n\r\n#### Refresh Web Window\r\n```javascript\r\novrt.refreshWin(uid)\r\n```\r\n\r\nRefresh the browser in a web window.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nuid | Number | The uid of the window to refresh\r\n\r\n#### Get Window Boundaries\r\n```javascript\r\novrt.getWinBounds(uid, callback, data)\r\n```\r\n\r\nGet a windows boundaries. Returns an [OVROverlayBounds](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#OVROverlayBounds) object, which is a wrapper for the [Unity's `Bounds` type](https://docs.unity3d.com/ScriptReference/Bounds.html).\r\n\r\nArgument | Type | Description | Optional\r\n-------- | ---- | ----------- | --------\r\nuid | Number | The uid of the window to get boundaries for\r\ncallback | Function | A function definition to callback once the window is created\r\ndata | Any | This value will be passed as a second parameter to the callback after the window boundaries | True\r\n\r\n#### Set Window Position\r\n```javascript\r\novrt.setWinPosition(uid, pos)\r\n```\r\n\r\nSet the windows position in 3D space.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nuid | Number | The uid of the window to update position for\r\npos | Object | An object containing the properties x, y, and z\r\n\r\n#### Set Window Rotation\r\n```javascript\r\novrt.setWinPosition(uid, rot)\r\n```\r\n\r\nSet the windows rotation in 3D space.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nuid | Number | The uid of the window to update position for\r\nrot | Object | An object containing the properties x, y, and z\r\n\r\n#### Set Window Setting\r\n```javascript\r\novrt.setWinSetting(uid, setting, value)\r\n```\r\n\r\nSet the setting of a window to `value`. See [`ovrt.winSettings`](#window-settings) or the list of [OVR Tookit window settings](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#Settings).\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nuid | Number | The uid of the window to update position for\r\nsetting | Number | The number for the setting you want to change\r\nvalue | Any | The new value for the setting\r\n\r\n### Messaging\r\n\r\n#### Broadcast To All Web Windows\r\n```javascript\r\novrt.broadcastMessage(event, data)\r\n```\r\n\r\nBroadcasts a message of type `event` with the payload `data` to all other open web windows.\r\nOnly web windows will receive this event.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nevent | String | A unique identifier for the message\r\ndata | String | The payload to send with the message event\r\n\r\n#### Send To A Specific Web Window\r\n```javascript\r\novrt.sendMessage(event, data, senderId, targetId)\r\n```\r\n\r\nSends a message of type `event` with the payload `data` to the window `targetId`.\r\nOnly the window with whose `uid` matches `targetId` will receive this messaage.\r\nOnly web windows will receive this event.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nevent | String | A unique identifier for the message\r\ndata | String | The payload to send with the message event\r\nsenderId | Number | The uid of the sender window\r\ntargetId | Number | The uid of the target window\r\n\r\n### Update Properties\r\n\r\n### Get Monitor Count\r\n```javascript\r\novrt.requestMonitorCount(callback, data)\r\n```\r\n\r\nGet a count of the total number of physical displays. This is called automatically when this library is first loaded and the value is saved in [`ovrt.totalMonitors`](#total-monitors).\r\n\r\nArgument | Type | Description | Optional\r\n-------- | ---- | ----------- | --------\r\ncallback | Function | A function definition to callback once the monitor count is retreived\r\ndata | Any | This value will be passed as a second parameter to the callback after the monitor count | True\r\n\r\n### Get Window Titles\r\n```javascript\r\novrt.requestWinTitles(callback, data)\r\n```\r\n\r\nGet a count of the total number of physical displays. This function is used internally to update [`ovrt.winTitles`](#window-list) when [`ovrt.updateTitles`](#update-window-list) is `true`. When called directly it will update the value of [`ovrt.winTitles`](#window-list) on completion.\r\n\r\nArgument | Type | Description | Optional\r\n-------- | ---- | ----------- | --------\r\ncallback | Function | A function definition to callback once the monitor count is retreived | True\r\ndata | Any | This value will be passed as a second parameter to the callback after the window titles | True\r\n\r\n### Enable/Disable Updates\r\n\r\n#### Toggle HMD/Controller Position Updates\r\n```javascript\r\novrt.setDeviceUpdateFlag(enable)\r\n```\r\n\r\nUpdates the value of [`ovrt.updateDeviceInfo`](#hmdcontroller-positions). When set to `true` the [`ovrt.deviceInfo`](#hmdcontroller-positions) property will be automatically updated with HMD and controller position data.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nenable | Boolean | Whether to allow device updates\r\n\r\n#### Toggle Knuckles Finger Curl Updates\r\n```javascript\r\novrt.setFingerUpdateFlag(enable)\r\n```\r\n\r\nUpdates the value of [`ovrt.updateFingers`](#update-knuckles-finger-curls). When set to `true` the [`ovrt.fingerCurls`](#knuckles-finger-curls) property will be automatically updated with the curls of each finger as read by Knuckles controllers.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nenable | Boolean | Whether to allow finger curl updates\r\n\r\n#### Toggle Window List Updates\r\n```javascript\r\novrt.setTitlesUpdateFlag(enable)\r\n```\r\n\r\nUpdates the value of [`ovrt.updateTitles`](#update-window-list). When set to `true` the [`ovrt.winTitles`](#window-list) property will be automatically updated with the list of open windows.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nenable | Boolean | Whether to allow window list updates\r\n\r\n#### Toggle Window Move/Resize Updates\r\n```javascript\r\novrt.setWinUpdateFlag(enable)\r\n```\r\n\r\nUpdates the value of [`ovrt.updateWindows`](#window-moveresize-updates). When set to `true` the [`ovrt.onWinTransformChanged`](#window-movedresized) event will be called when the window is moved or resized.\r\n\r\nArgument | Type | Description\r\n-------- | ---- | -----------\r\nenable | Boolean | Whether to allow window move/resize updates\r\n\r\n## Properties\r\nThe following properties are available for reading the state of the OVR Toolkit settings or window update toggles.\r\n\r\n### Data Properties\r\n\r\n#### Total Monitors\r\n```javascript\r\novrt.totalMonitors // Number\r\n```\r\n\r\nContains the total number of attached physical displays. For use with [`ovrt.createDesktopWin`](#desktop-window).\r\n\r\n#### Window List\r\n```javascript\r\novrt.winTitles // Object\r\n```\r\n\r\nWhen [`ovrt.updateWindows`](#window-list) is `true` this property Contains a list of all currently open windows.\r\n\r\n#### Knuckles Finger Curls\r\n```javascript\r\novrt.fingerCurls // Object\r\n```\r\n\r\nWhen [`ovrt.updateFingers`](#update-knuckles-finger-curls) is `true` this property contains a list of the curl of each finger as read by Knuckles controllers.\r\n\r\n#### HMD/Controller Positions\r\n```javascript\r\novrt.deviceInfo // Object\r\n```\r\n\r\nWhen [`ovrt.updateDeviceInfo`](#hmdcontroller-position-updates) is `true` this property contains the positions of the HMD and controllers.\r\n\r\n### Update Flags\r\n\r\n#### Update Knuckles Finger Curls\r\n```javascript\r\novrt.updateFingers // Default: false\r\n```\r\n\r\nWhen set to `true` with [`ovrt.setFingerUpdateFlag`](#toggle-knuckles-finger-curl-updates) the values of the fingers for Knuckles controllers will be stored in [`ovrt.fingerCurls`](#knuckles-finger-curls).\r\n\r\n#### Update Window List\r\n```javascript\r\novrt.updateTitles // Default: false\r\n```\r\n\r\nWhen set to `true` with [`ovrt.setTitlesUpdateFlag`](#toggle-window-list-updates) the list of open windows will be stored in [`ovrt.winTitles`](#window-list).\r\n\r\n#### Window Move/Resize Updates\r\n```javascript\r\novrt.updateWindows // Default: false\r\n```\r\n\r\nWhen set to `true` with [`ovrt.setWinUpdateFlag`](#toggle-window-moveresize-updates) the `ovrt.onWinTransformChanged` event will be called whenever a window is moved or resized.\r\n\r\n#### HMD/Controller Position Updates\r\n```javascript\r\novrt.updateDeviceInfo // Default: false\r\n```\r\n\r\nWhen set to `true` the [`ovrt.deviceInfo`](#hmdcontroller-positions) property will be automatically updated with HMD and controller position data.\r\n\r\n### Constants\r\n\r\nThis library abstracts the integer [constants from the wiki](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#Constants) into objects with memorable keys.\r\n\r\n#### Window Attached Device\r\n```javascript\r\novrt.winDevices = {\r\n  world: 0,\r\n  hmd: 1,\r\n  leftHand: 2,\r\n  rightHand: 3\r\n}\r\n```\r\n\r\n**[Wiki page on devices](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#Devices)**\r\n\r\n#### Window Types\r\n```javascript\r\novrt.winTypes = {\r\n  web: 0,\r\n  desktop: 1,\r\n  window: 2\r\n}\r\n```\r\n\r\n**[Wiki page on window types](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#Window_types)**\r\n\r\n#### Window Settings\r\n```javascript\r\novrt.winSettings = {\r\n  size: 0,\r\n  opacity: 1,\r\n  curvature: 2,\r\n  framerate: 3,\r\n  ecoMode: 4,\r\n  lookHiding: 5,\r\n  attachedDevice: 6\r\n}\r\n```\r\n\r\n**[Wiki page on settings values](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#Settings)**\r\n\r\n\r\n#### New Transform\r\n```javascript\r\novrt.newTransform = {\r\n  posX: 0.0,\r\n  posY: 0.0,\r\n  posZ: 0.0,\r\n  rotX: 0.0,\r\n  rotY: 0.0,\r\n  rotZ: 0.0,\r\n  size: 0.25, // Meters\r\n  opacity: 1.0,\r\n  curvature: 0.0,\r\n  framerate: 60,\r\n  ecoMode: true,\r\n  lookHiding: false,\r\n  attachedDevice: 0,\r\n  shouldSave: false\r\n}\r\n```\r\n\r\n**[Wiki page on OVROverlayTransform](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#OVROverlayTransform)**\r\n\r\nThis object is used if no transform is provided to [`ovrt.requestWinSpawn`](#spawn-window).\r\n\r\n## Events\r\nThese events are available for you to override with your own function definitions.\r\n### Window Moved/Resized\r\n```javascript\r\novrt.onWinTransformChanged(transformUpdate)\r\n```\r\n\r\nOnly triggers if [`ovrt.updateWindows`](#hmdcontroller-position-updates) is `true`. Sends an [OVRTransformUpdate](http://wiki.ovrtoolkit.co.uk/index.php?title=CustomApps#OVRTransformUpdate) object.\r\n\r\n\r\n### Window Opened\r\n```javascript\r\novrt.onWinOpened(uid)\r\n```\r\n\r\n`uid` is the ID of the newly opened window.\r\n\r\n### Window Closed\r\n```javascript\r\novrt.onWinClosed(uid)\r\n```\r\n\r\n`uid` is the ID of the closed window.\r\n\r\n\r\n### Window Mouse Enter/Leave\r\n```javascript\r\novrt.onWinInteractionChanged(isInteracting)\r\n```\r\n\r\n`isInteracting` is a boolean flag for whether or not the mouse is interacting with this window.\r\n\r\n### Message Received\r\n```javascript\r\novrt.onMessageReceived(message)\r\n```\r\n\r\n`message` is a string containing the data sent by [`ovrt.broadcast`](#broadcast-to-all-web-windows) or [`ovrt.sendMessage`](#send-to-a-specific-web-window).\r\n\r\n### Error Thrown\r\n```javascript\r\novrt.onLogError(errorData)\r\n```\r\n\r\nThis function is called if [`ovrt.setupLogging`](#setup-logging) was used to overried the windows logging outputs. `errorData` is an object that contains the data about the error that occured\r\n\r\n### Console Log\r\n```javascript\r\novrt.onLog(message)\r\n```\r\n\r\nThis function is called if [`ovrt.setupLogging`](#setup-logging) was used to overried the windows logging outputs. `message` is a string that contains the contents of any calls to `console.log`.\r\n\r\n## Notes\r\n\r\n* When using Virtual Desktop with Chrome remote debugger: It seems that after a while of taking the headset off VD returns control of the audio device to the PC. It also appears to be suspending input from SteamVR, which makes the OVRT functions no longer bound to the window object on a reload in the Chrome debugger. The fix is to just put on the headset and reload the page. This seems to happen even if the \"suspend input on idle\" setting is disabled in SteamVR.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetaphor%2Fovrt-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzetaphor%2Fovrt-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetaphor%2Fovrt-helper/lists"}