From 6e92f80eeb58a629e25dd1ba330cfe4c8959d9b8 Mon Sep 17 00:00:00 2001 From: milad Date: Mon, 8 Oct 2018 16:15:28 -0700 Subject: [PATCH] updated js snippets and ts definitions --- .../hifi-vscode.js | 114 + .../hifiJSDoc.json | 57171 ++++++++++++++++ .../hifiTSStubGenerator.js | 197 + .../out/hifiStubs.d.ts | 14619 ++++ .../out/hifiVsCode.json | 1870 + .../VSCode_TS-Definitions_Snippets/readme.md | 9 + hifiVsCode.json | 1870 + hifistubs.d.ts | 27899 ++++---- 8 files changed, 90149 insertions(+), 13600 deletions(-) create mode 100644 Utilities/Editor/VSCode_TS-Definitions_Snippets/hifi-vscode.js create mode 100644 Utilities/Editor/VSCode_TS-Definitions_Snippets/hifiJSDoc.json create mode 100644 Utilities/Editor/VSCode_TS-Definitions_Snippets/hifiTSStubGenerator.js create mode 100644 Utilities/Editor/VSCode_TS-Definitions_Snippets/out/hifiStubs.d.ts create mode 100644 Utilities/Editor/VSCode_TS-Definitions_Snippets/out/hifiVsCode.json create mode 100644 Utilities/Editor/VSCode_TS-Definitions_Snippets/readme.md create mode 100644 hifiVsCode.json diff --git a/Utilities/Editor/VSCode_TS-Definitions_Snippets/hifi-vscode.js b/Utilities/Editor/VSCode_TS-Definitions_Snippets/hifi-vscode.js new file mode 100644 index 000000000..2b225614c --- /dev/null +++ b/Utilities/Editor/VSCode_TS-Definitions_Snippets/hifi-vscode.js @@ -0,0 +1,114 @@ +// +// Created by Milad Nazeri on 1/31/18 +// Copyright 2018 High Fidelity, Inc. +// +// Creates VSCode Javascript Snippets from the JSDOC output json +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +const fs = require('fs'); +const path = require('path') + +var vsCodeArray = []; + +// load jsdoc + var hifiDoc = require('./hifiJSDoc.json'); + // console.log("hifiDoc \n", hifiDoc); + +// create VsCode mapping + function VSCodeMappingObject(name, prefix, body, description){ + this.name = name; + this.prefix = prefix; + this.body = body; + this.description = description; + } + +// {$1:ray: PickRay} +// iterate hifiDoc + hifiDoc.forEach( item => { + let body = ``; + let bodyParams = []; + item.longname = item.longname.replace(/\(0\)/g,""); + if (item.params){ + bodyParams = item.params.map( (param, index) => { + return `\${${index+1}:${param.name}${param.type?`\: ${param.type.names[0]}`:''}}` + }) + body = [`${item.longname}(${`${bodyParams.join(',')}`})`]; + } else { + body = [item.longname]; + } + + + vsCodeArray.push( + new VSCodeMappingObject( + item.name, + item.longname, + body, + item.description + ) + ) + }); + // console.log("VSCodeMappingObject \n", vsCodeArray); + + +// Convert to JSON format + function JSONConvert(VSCodeMappingObject){ + var ObjectForJSON = {}; + + ObjectForJSON[VSCodeMappingObject.prefix] = { + prefix: VSCodeMappingObject.prefix, + body: VSCodeMappingObject.body, + description: VSCodeMappingObject.description + } + + return JSON.stringify(ObjectForJSON); + } + +// convert array + var convertedArray = vsCodeArray.map(vcObject => JSONConvert(vcObject)) + // console.log("convertedArray \n", convertedArray); + +// write file + + var stringToWrite = ` + [ + \t${convertedArray.join(",\n\t")} + ] + ` + // console.log(stringToWrite); + + fs.writeFileSync(path.join(__dirname, 'out', 'hifiVsCode.json'), stringToWrite); + + + +/* + https://code.visualstudio.com/docs/editor/userdefinedsnippets + How VSCODE snipets are formated: + + { + "For_Loop": { + "prefix": "for", + "body": [ + "for (const ${2:element} of ${1:array}) {", + "\t$0", + "}" + ], + "description": "For Loop" + }, + } + + For Loop + is the snippet name. + prefix + defines how this snippet is selected from + IntelliSense and tab completion. In this case for. + body + is the content and either a single string or + an array of strings of which each element will be + inserted as separate line. + description + is the description used in the IntelliSense drop down. + +*/ \ No newline at end of file diff --git a/Utilities/Editor/VSCode_TS-Definitions_Snippets/hifiJSDoc.json b/Utilities/Editor/VSCode_TS-Definitions_Snippets/hifiJSDoc.json new file mode 100644 index 000000000..98fc2512f --- /dev/null +++ b/Utilities/Editor/VSCode_TS-Definitions_Snippets/hifiJSDoc.json @@ -0,0 +1,57171 @@ +[ + { + "kind": "namespace", + "name": "Agent", + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isAvatar" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Read-only.", + "name": "isPlayingAvatarSound" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isListeningToAudioStream" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isNoiseGateEnabled" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "lastReceivedAudioLoudness" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "Read-only.", + "name": "sessionUUID" + } + ], + "longname": "Agent", + "scope": "global", + "description": "
Available in:Assignment Client Scripts

" + }, + { + "kind": "function", + "name": "setIsAvatar", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isAvatar" + } + ], + "memberof": "Agent", + "longname": "Agent.setIsAvatar", + "scope": "static" + }, + { + "kind": "function", + "name": "isAvatar", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Agent", + "longname": "Agent.isAvatar", + "scope": "static" + }, + { + "kind": "function", + "name": "playAvatarSound", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "avatarSound" + } + ], + "memberof": "Agent", + "longname": "Agent.playAvatarSound", + "scope": "static" + }, + { + "description": "
Available in:Assignment Client Scripts

The Avatar API is used to manipulate scriptable avatars on the domain. This API is a subset of the \r{@link MyAvatar} API.\r\r

Note: In the examples, use \"Avatar\" instead of \"MyAvatar\".

", + "kind": "namespace", + "name": "Avatar", + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "scale" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "density" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "handPosition" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation left or right about an axis running from the head to the feet of the avatar. \r Yaw is sometimes called \"heading\".", + "name": "bodyYaw" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation about an axis running from shoulder to shoulder of the avatar. Pitch is\r sometimes called \"elevation\".", + "name": "bodyPitch" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation about an axis running from the chest to the back of the avatar. Roll is\r sometimes called \"bank\".", + "name": "bodyRoll" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "orientation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the avatar's head.", + "name": "headOrientation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation about an axis running from ear to ear of the avatar's head. Pitch is\r sometimes called \"elevation\".", + "name": "headPitch" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation left or right about an axis running from the base to the crown of the avatar's\r head. Yaw is sometimes called \"heading\".", + "name": "headYaw" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation about an axis running from the nose to the back of the avatar's head. Roll is\r sometimes called \"bank\".", + "name": "headRoll" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "velocity" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "angularVelocity" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "audioLoudness" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "audioAverageLoudness" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "displayName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Sanitized, defaulted version displayName that is defined by the AvatarMixer\r rather than by Interface clients. The result is unique among all avatars present at the time.", + "name": "sessionDisplayName" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "lookAtSnappingEnabled" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "skeletonModelURL" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "name": "attachmentData" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The list of joints in the current avatar model. Read-only.", + "name": "jointNames" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "Read-only.", + "name": "sessionUUID" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "Read-only.", + "name": "sensorToWorldMatrix" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "Read-only.", + "name": "controllerLeftHandMatrix" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "Read-only.", + "name": "controllerRightHandMatrix" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "sensorToWorldScale" + } + ], + "longname": "Avatar", + "scope": "global" + }, + { + "kind": "function", + "name": "startAnimation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 30, + "name": "fps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 1, + "name": "priority" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "loop" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "hold" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 0, + "name": "firstFrame" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 3.403e+38, + "name": "lastFrame" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "name": "maskedJoints" + } + ], + "memberof": "Avatar", + "longname": "Avatar.startAnimation", + "scope": "static" + }, + { + "kind": "function", + "name": "stopAnimation", + "memberof": "Avatar", + "longname": "Avatar.stopAnimation", + "scope": "static" + }, + { + "kind": "function", + "name": "getAnimationDetails", + "returns": [ + { + "type": { + "names": [ + "Avatar.AnimationDetails" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getAnimationDetails", + "scope": "static" + }, + { + "kind": "namespace", + "name": "EntityViewer", + "hifiAssignmentClient": true, + "longname": "EntityViewer", + "scope": "global", + "description": "
Available in:Assignment Client Scripts

" + }, + { + "kind": "function", + "name": "queryOctree", + "memberof": "EntityViewer", + "longname": "EntityViewer.queryOctree", + "scope": "static" + }, + { + "kind": "function", + "name": "setPosition", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "position" + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.setPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "setOrientation", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "orientation" + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.setOrientation", + "scope": "static" + }, + { + "kind": "function", + "name": "setCenterRadius", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "radius" + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.setCenterRadius", + "scope": "static" + }, + { + "kind": "function", + "name": "setKeyholeRadius", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "radius" + } + ], + "deprecated": "Use {@link EntityViewer.setCenterRadius|setCenterRadius} instead.", + "memberof": "EntityViewer", + "longname": "EntityViewer.setKeyholeRadius", + "scope": "static" + }, + { + "kind": "function", + "name": "setVoxelSizeScale", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "sizeScale" + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.setVoxelSizeScale", + "scope": "static" + }, + { + "kind": "function", + "name": "setBoundaryLevelAdjust", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "boundaryLevelAdjust" + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.setBoundaryLevelAdjust", + "scope": "static" + }, + { + "kind": "function", + "name": "setMaxPacketsPerSecond", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "maxPacketsPerSecond" + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.setMaxPacketsPerSecond", + "scope": "static" + }, + { + "kind": "function", + "name": "getPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.getPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getOrientation", + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + } + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.getOrientation", + "scope": "static" + }, + { + "kind": "function", + "name": "getVoxelSizeScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.getVoxelSizeScale", + "scope": "static" + }, + { + "kind": "function", + "name": "getBoundaryLevelAdjust", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.getBoundaryLevelAdjust", + "scope": "static" + }, + { + "kind": "function", + "name": "getMaxPacketsPerSecond", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.getMaxPacketsPerSecond", + "scope": "static" + }, + { + "kind": "function", + "name": "getOctreeElementsCount", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "EntityViewer", + "longname": "EntityViewer.getOctreeElementsCount", + "scope": "static" + }, + { + "kind": "namespace", + "name": "HifiAbout", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "buildDate" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "buildVersion" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "qtVersion" + } + ], + "longname": "HifiAbout", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "openUrl", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "memberof": "HifiAbout", + "longname": "HifiAbout.openUrl", + "scope": "static" + }, + { + "description": "

The Controller.Hardware.Application object has properties representing Interface's state. The property\rvalues are integer IDs, uniquely identifying each output. Read-only. These can be mapped to actions or functions or\rController.Standard items in a {@link RouteObject} mapping (e.g., using the {@link RouteObject#when} method).\rEach data value is either 1.0 for \"true\" or 0.0 for \"false\".

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
CameraFirstPersonnumbernumberThe camera is in first-person mode.\r
CameraThirdPersonnumbernumberThe camera is in third-person mode.\r
CameraFSMnumbernumberThe camera is in full screen mirror mode.
CameraIndependentnumbernumberThe camera is in independent mode.
CameraEntitynumbernumberThe camera is in entity mode.
InHMDnumbernumberThe user is in HMD mode.
AdvancedMovementnumbernumberAdvanced movement controls are enabled.\r
SnapTurnnumbernumberSnap turn is enabled.
GroundednumbernumberThe user's avatar is on the ground.
NavigationFocusednumbernumberNot used.
", + "kind": "typedef", + "name": "Hardware-Application", + "type": { + "names": [ + "object" + ] + }, + "memberof": "Controller", + "longname": "Controller.Hardware-Application", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

This API helps manage adding and deleting avatar bookmarks.", + "kind": "namespace", + "name": "AvatarBookmarks", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "AvatarBookmarks", + "scope": "global" + }, + { + "description": "Add the current Avatar to your avatar bookmarks.", + "kind": "function", + "name": "addBookMark", + "memberof": "AvatarBookmarks", + "longname": "AvatarBookmarks.addBookMark", + "scope": "static" + }, + { + "description": "This function gets triggered after avatar loaded from bookmark", + "kind": "function", + "name": "bookmarkLoaded", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "bookmarkName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarBookmarks", + "longname": "AvatarBookmarks.bookmarkLoaded", + "scope": "static" + }, + { + "description": "This function gets triggered after avatar bookmark deleted", + "kind": "function", + "name": "bookmarkDeleted", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "bookmarkName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarBookmarks", + "longname": "AvatarBookmarks.bookmarkDeleted", + "scope": "static" + }, + { + "description": "This function gets triggered after avatar bookmark added", + "kind": "function", + "name": "bookmarkAdded", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "bookmarkName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarBookmarks", + "longname": "AvatarBookmarks.bookmarkAdded", + "scope": "static" + }, + { + "kind": "function", + "name": "deleteBookmark", + "memberof": "AvatarBookmarks", + "longname": "AvatarBookmarks.deleteBookmark", + "scope": "static" + }, + { + "kind": "function", + "name": "deleteBookmark", + "memberof": "LocationBookmarks", + "longname": "LocationBookmarks.deleteBookmark", + "scope": "static" + }, + { + "description": "Get the ID of the entity that the camera is set to use the position and orientation from when it's in entity mode. You can\r also get the entity ID using the Camera.cameraEntity property.", + "kind": "function", + "name": "getCameraEntity", + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that the camera is set to follow when in entity mode; null if no camera\r entity has been set." + } + ], + "memberof": "Camera", + "longname": "Camera.getCameraEntity", + "scope": "static" + }, + { + "description": "Set the entity that the camera should use the position and orientation from when it's in entity mode. You can also set the\r entity using the Camera.cameraEntity property.", + "kind": "function", + "name": "setCameraEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The entity that the camera should follow when it's in entity mode.", + "name": "entityID" + } + ], + "examples": [ + "Move your camera to the position and orientation of the closest entity.\rCamera.setModeString(\"entity\");\rvar entity = Entities.findClosestEntity(MyAvatar.position, 100.0);\rCamera.setCameraEntity(entity);\r\n " + ], + "memberof": "Camera", + "longname": "Camera.setCameraEntity", + "scope": "static" + }, + { + "kind": "namespace", + "name": "LocationBookmarks", + "hifiClientEntity": true, + "hifiInterface": true, + "longname": "LocationBookmarks", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "addBookmark", + "memberof": "LocationBookmarks", + "longname": "LocationBookmarks.addBookmark", + "scope": "static" + }, + { + "kind": "function", + "name": "setHomeLocationToAddress", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "address" + } + ], + "memberof": "LocationBookmarks", + "longname": "LocationBookmarks.setHomeLocationToAddress", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The LOD class manages your Level of Detail functions within Interface.", + "kind": "namespace", + "name": "LODManager", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "presentTime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "engineRunTime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuTime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "avgRenderTime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "fps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "lodLevel" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "lodDecreaseFPS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "lodIncreaseFPS" + } + ], + "longname": "LODManager", + "scope": "global" + }, + { + "kind": "function", + "name": "setAutomaticLODAdjust", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "value" + } + ], + "memberof": "LODManager", + "longname": "LODManager.setAutomaticLODAdjust", + "scope": "static" + }, + { + "kind": "function", + "name": "getAutomaticLODAdjust", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "LODManager", + "longname": "LODManager.getAutomaticLODAdjust", + "scope": "static" + }, + { + "kind": "function", + "name": "setDesktopLODTargetFPS", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "value" + } + ], + "memberof": "LODManager", + "longname": "LODManager.setDesktopLODTargetFPS", + "scope": "static" + }, + { + "kind": "function", + "name": "getDesktopLODTargetFPS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "LODManager", + "longname": "LODManager.getDesktopLODTargetFPS", + "scope": "static" + }, + { + "kind": "function", + "name": "setHMDLODTargetFPS", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "value" + } + ], + "memberof": "LODManager", + "longname": "LODManager.setHMDLODTargetFPS", + "scope": "static" + }, + { + "kind": "function", + "name": "getHMDLODTargetFPS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "LODManager", + "longname": "LODManager.getHMDLODTargetFPS", + "scope": "static" + }, + { + "kind": "function", + "name": "getLODFeedbackText", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "LODManager", + "longname": "LODManager.getLODFeedbackText", + "scope": "static" + }, + { + "kind": "function", + "name": "setOctreeSizeScale", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "sizeScale" + } + ], + "memberof": "LODManager", + "longname": "LODManager.setOctreeSizeScale", + "scope": "static" + }, + { + "kind": "function", + "name": "getOctreeSizeScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "LODManager", + "longname": "LODManager.getOctreeSizeScale", + "scope": "static" + }, + { + "kind": "function", + "name": "setBoundaryLevelAdjust", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "boundaryLevelAdjust" + } + ], + "memberof": "LODManager", + "longname": "LODManager.setBoundaryLevelAdjust", + "scope": "static" + }, + { + "kind": "function", + "name": "getBoundaryLevelAdjust", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "LODManager", + "longname": "LODManager.getBoundaryLevelAdjust", + "scope": "static" + }, + { + "kind": "function", + "name": "getLODTargetFPS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "LODManager", + "longname": "LODManager.getLODTargetFPS", + "scope": "static" + }, + { + "kind": "function", + "name": "LODIncreased", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "LODManager", + "longname": "LODManager.LODIncreased", + "scope": "static" + }, + { + "kind": "function", + "name": "LODDecreased", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "LODManager", + "longname": "LODManager.LODDecreased", + "scope": "static" + }, + { + "kind": "namespace", + "name": "SpeechRecognizer", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "SpeechRecognizer", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "setEnabled", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "SpeechRecognizer", + "longname": "SpeechRecognizer.setEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "addCommand", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "command" + } + ], + "memberof": "SpeechRecognizer", + "longname": "SpeechRecognizer.addCommand", + "scope": "static" + }, + { + "kind": "function", + "name": "removeCommand", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "command" + } + ], + "memberof": "SpeechRecognizer", + "longname": "SpeechRecognizer.removeCommand", + "scope": "static" + }, + { + "kind": "function", + "name": "commandRecognized", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "command" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "SpeechRecognizer", + "longname": "SpeechRecognizer.commandRecognized", + "scope": "static" + }, + { + "kind": "function", + "name": "enabledUpdated", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "SpeechRecognizer", + "longname": "SpeechRecognizer.enabledUpdated", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The AudioScope API helps control the Audio Scope features in Interface", + "kind": "namespace", + "name": "AudioScope", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "scopeInput" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "scopeOutputLeft" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "scopeOutputRight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "triggerInput" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "triggerOutputLeft" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "triggerOutputRight" + } + ], + "longname": "AudioScope", + "scope": "global" + }, + { + "kind": "function", + "name": "toggle", + "memberof": "AudioScope", + "longname": "AudioScope.toggle", + "scope": "static" + }, + { + "kind": "function", + "name": "setVisible", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "visible" + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.setVisible", + "scope": "static" + }, + { + "kind": "function", + "name": "getVisible", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getVisible", + "scope": "static" + }, + { + "kind": "function", + "name": "togglePause", + "memberof": "AudioScope", + "longname": "AudioScope.togglePause", + "scope": "static" + }, + { + "kind": "function", + "name": "setPause", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "paused" + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.setPause", + "scope": "static" + }, + { + "kind": "function", + "name": "getPause", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getPause", + "scope": "static" + }, + { + "kind": "function", + "name": "toggleTrigger", + "memberof": "AudioScope", + "longname": "AudioScope.toggleTrigger", + "scope": "static" + }, + { + "kind": "function", + "name": "getAutoTrigger", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getAutoTrigger", + "scope": "static" + }, + { + "kind": "function", + "name": "setAutoTrigger", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "autoTrigger" + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.setAutoTrigger", + "scope": "static" + }, + { + "kind": "function", + "name": "setTriggerValues", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "y" + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.setTriggerValues", + "scope": "static" + }, + { + "kind": "function", + "name": "setTriggered", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "triggered" + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.setTriggered", + "scope": "static" + }, + { + "kind": "function", + "name": "getTriggered", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getTriggered", + "scope": "static" + }, + { + "kind": "function", + "name": "getFramesPerSecond", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getFramesPerSecond", + "scope": "static" + }, + { + "kind": "function", + "name": "getFramesPerScope", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getFramesPerScope", + "scope": "static" + }, + { + "kind": "function", + "name": "selectAudioScopeFiveFrames", + "memberof": "AudioScope", + "longname": "AudioScope.selectAudioScopeFiveFrames", + "scope": "static" + }, + { + "kind": "function", + "name": "selectAudioScopeTwentyFrames", + "memberof": "AudioScope", + "longname": "AudioScope.selectAudioScopeTwentyFrames", + "scope": "static" + }, + { + "kind": "function", + "name": "selectAudioScopeFiftyFrames", + "memberof": "AudioScope", + "longname": "AudioScope.selectAudioScopeFiftyFrames", + "scope": "static" + }, + { + "kind": "function", + "name": "getScopeInput", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getScopeInput", + "scope": "static" + }, + { + "kind": "function", + "name": "getScopeOutputLeft", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getScopeOutputLeft", + "scope": "static" + }, + { + "kind": "function", + "name": "getScopeOutputRight", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getScopeOutputRight", + "scope": "static" + }, + { + "kind": "function", + "name": "getTriggerInput", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getTriggerInput", + "scope": "static" + }, + { + "kind": "function", + "name": "getTriggerOutputLeft", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getTriggerOutputLeft", + "scope": "static" + }, + { + "kind": "function", + "name": "getTriggerOutputRight", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.getTriggerOutputRight", + "scope": "static" + }, + { + "kind": "function", + "name": "setLocalEcho", + "tags": [ + { + "originalTitle": "parm", + "title": "parm", + "text": "{boolean} localEcho", + "value": "{boolean} localEcho" + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.setLocalEcho", + "scope": "static" + }, + { + "kind": "function", + "name": "setServerEcho", + "tags": [ + { + "originalTitle": "parm", + "title": "parm", + "text": "{boolean} serverEcho", + "value": "{boolean} serverEcho" + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.setServerEcho", + "scope": "static" + }, + { + "kind": "function", + "name": "pauseChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.pauseChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "triggered", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioScope", + "longname": "AudioScope.triggered", + "scope": "static" + }, + { + "description": "The \"far-grab\" {@link Entities.ActionType|ActionType} moves and rotates an entity to a target position and \rorientation, optionally relative to another entity. Collisions between the entity and the user's avatar are disabled during \rthe far-grab.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.", + "kind": "typedef", + "name": "ActionArguments-FarGrab", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The target position.", + "name": "targetPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "defaultvalue": "0,0,0,1", + "description": "The target rotation.", + "name": "targetRotation" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "If an entity ID, the targetPosition and targetRotation are \r relative to this entity's position and rotation.", + "name": "otherID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 3.4e+38, + "description": "Controls how long it takes for the entity's position to catch up with the\r target position. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action \r is applied using an exponential decay.", + "name": "linearTimeScale" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 3.4e+38, + "description": "Controls how long it takes for the entity's orientation to catch up with the\r target orientation. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the \r action is applied using an exponential decay.", + "name": "angularTimeScale" + } + ], + "memberof": "Entities", + "longname": "Entities.ActionArguments-FarGrab", + "scope": "static" + }, + { + "description": "The \"hold\" {@link Entities.ActionType|ActionType} positions and rotates an entity relative to an avatar's hand. \rCollisions between the entity and the user's avatar are disabled during the hold.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.", + "kind": "typedef", + "name": "ActionArguments-Hold", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": "MyAvatar.sessionUUID", + "description": "The ID of the avatar holding the entity.", + "name": "holderID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The target position relative to the avatar's hand.", + "name": "relativePosition" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0,1", + "description": "The target rotation relative to the avatar's hand.", + "name": "relativeRotation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 3.4e+38, + "description": "Controls how long it takes for the entity's position and rotation to catch up with \r the target. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is \r applied using an exponential decay.", + "name": "timeScale" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "right", + "description": "The hand holding the entity: \"left\" or \"right\".", + "name": "hand" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the entity is made kinematic during the action; the entity won't \r lag behind the hand but constraint actions such as \"hinge\" won't act properly.", + "name": "kinematic" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true and kinematic is true, the \r entity's velocity property will be set during the action, e.g., so that other scripts may use the value.", + "name": "kinematicSetVelocity" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the entity follows the HMD controller rather than the avatar's \r hand.", + "name": "ignoreIK" + } + ], + "memberof": "Entities", + "longname": "Entities.ActionArguments-Hold", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The AvatarManager API has properties and methods which manage Avatars within the same domain.\r\r

Note: This API is also provided to Interface and client entity scripts as the synonym, \rAvatarList. For assignment client scripts, see the separate {@link AvatarList} API.", + "kind": "namespace", + "name": "AvatarManager", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "AvatarManager", + "scope": "global" + }, + { + "kind": "function", + "name": "getAvatar", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "avatarID" + } + ], + "returns": [ + { + "type": { + "names": [ + "AvatarData" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.getAvatar", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatarDataRate", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "rateName" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.getAvatarDataRate", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatarUpdateRate", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "rateName" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.getAvatarUpdateRate", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatarSimulationRate", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "rateName" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.getAvatarSimulationRate", + "scope": "static" + }, + { + "kind": "function", + "name": "findRayIntersection", + "params": [ + { + "type": { + "names": [ + "PickRay" + ] + }, + "name": "ray" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "name": "avatarsToInclude" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "name": "avatarsToDiscard" + } + ], + "returns": [ + { + "type": { + "names": [ + "RayToAvatarIntersectionResult" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.findRayIntersection", + "scope": "static" + }, + { + "kind": "function", + "name": "findRayIntersectionVector", + "params": [ + { + "type": { + "names": [ + "PickRay" + ] + }, + "name": "ray" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "name": "avatarsToInclude" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "name": "avatarsToDiscard" + } + ], + "returns": [ + { + "type": { + "names": [ + "RayToAvatarIntersectionResult" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.findRayIntersectionVector", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatarSortCoefficient", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.getAvatarSortCoefficient", + "scope": "static" + }, + { + "kind": "function", + "name": "setAvatarSortCoefficient", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "value" + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.setAvatarSortCoefficient", + "scope": "static" + }, + { + "description": "Used in the PAL for getting PAL-related data about avatars nearby. Using this method is faster\rthan iterating over each avatar and obtaining data about them in JavaScript, as that method\rlocks and unlocks each avatar's data structure potentially hundreds of times per update tick.", + "kind": "function", + "name": "getPalData", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "A list of specific Avatar Identifiers about\rwhich you want to get PAL data", + "name": "specificAvatarIdentifiers" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.getPalData", + "scope": "static" + }, + { + "kind": "function", + "name": "updateAvatarRenderStatus", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "shouldRenderAvatars" + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.updateAvatarRenderStatus", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

Your avatar is your in-world representation of you. The MyAvatar API is used to manipulate the avatar.\rFor example, you can customize the avatar's appearance, run custom avatar animations,\rchange the avatar's position within the domain, or manage the avatar's collisions with other objects.", + "kind": "namespace", + "name": "MyAvatar", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "A synonym for position for use by QML.", + "name": "qmlPosition" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true then your avatar is rendered for you in Interface,\r otherwise it is not rendered for you (but it is still rendered for other users).", + "name": "shouldRenderLocally" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "Vec3.ZERO", + "description": "The target velocity of your avatar to be achieved by a scripted motor.", + "name": "motorVelocity" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1000000, + "description": "The timescale for the scripted motor to achieve the target \r motorVelocity avatar velocity. Smaller values result in higher acceleration.", + "name": "motorTimescale" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"camera\"", + "description": "Reference frame of the motorVelocity. Must be one of the \r following: \"camera\", \"avatar\", and \"world\".", + "name": "motorReferenceFrame" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"simple\"", + "description": "The Type of scripted motor behavior: \"simple\" to use the \r motorTimescale time scale; \"dynamic\" to use character controller timescales.", + "name": "motorMode" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"Body_Hits_Impact.wav\"", + "description": "The sound that's played when the avatar experiences a \r collision. It can be a mono or stereo 16-bit WAV file running at either 24kHz or 48kHz. The latter is down-sampled \r by the audio mixer, so all audio effectively plays back at a 24khz. 48kHz RAW files are also supported.", + "name": "collisionSoundURL" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Specifies the listening position when hearing spatialized audio. Must be one \r of the following property values:
\r audioListenerModeHead
\r audioListenerModeCamera
\r audioListenerModeCustom", + "name": "audioListenerMode" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The audio listening position is at the avatar's head. Read-only.", + "name": "audioListenerModeHead" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The audio listening position is at the camera. Read-only.", + "name": "audioListenerModeCamera" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 2, + "description": "The audio listening position is at a the position specified by set by the \r customListenPosition and customListenOrientation property values. Read-only.", + "name": "audioListenerModeCustom" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Blendshapes will be transmitted over the network if set to true.", + "name": "hasScriptedBlendshapes" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "procedural blinking will be turned on if set to true.", + "name": "hasProceduralBlinkFaceMovement" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "procedural eye movement will be turned on if set to true.", + "name": "hasProceduralEyeFaceMovement" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If set to true, voice audio will move the mouth Blendshapes while MyAvatar.hasScriptedBlendshapes is enabled.", + "name": "hasAudioEnabledFaceMovement" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "Vec3.ZERO", + "description": "The listening position used when the audioListenerMode\r property value is audioListenerModeCustom.", + "name": "customListenPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "defaultvalue": "Quat.IDENTITY", + "description": "The listening orientation used when the \r audioListenerMode property value is audioListenerModeCustom.", + "name": "customListenOrientation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the left hand in avatar coordinates if it's being positioned by \r controllers, otherwise {@link Vec3(0)|Vec3.ZERO}. Read-only.", + "name": "leftHandPosition" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the right hand in avatar coordinates if it's being positioned by\r controllers, otherwise {@link Vec3(0)|Vec3.ZERO}. Read-only.", + "name": "rightHandPosition" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position 30cm offset from the left hand in avatar coordinates if it's being \r positioned by controllers, otherwise {@link Vec3(0)|Vec3.ZERO}. Read-only.", + "name": "leftHandTipPosition" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position 30cm offset from the right hand in avatar coordinates if it's being\r positioned by controllers, otherwise {@link Vec3(0)|Vec3.ZERO}. Read-only.", + "name": "rightHandTipPosition" + }, + { + "type": { + "names": [ + "Pose" + ] + }, + "description": "The pose of the left hand as determined by the hand controllers. Read-only.", + "name": "leftHandPose" + }, + { + "type": { + "names": [ + "Pose" + ] + }, + "description": "The pose right hand position as determined by the hand controllers. Read-only.", + "name": "rightHandPose" + }, + { + "type": { + "names": [ + "Pose" + ] + }, + "description": "The pose of the left hand as determined by the hand controllers, with the position \r by 30cm. Read-only.", + "name": "leftHandTipPose" + }, + { + "type": { + "names": [ + "Pose" + ] + }, + "description": "The pose of the right hand as determined by the hand controllers, with the position\r by 30cm. Read-only.", + "name": "rightHandTipPose" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true then the avatar hips are placed according to the center of\r gravity model that balance the center of gravity over the base of support of the feet. Setting the value false \r will result in the default behaviour where the hips are placed under the head.", + "name": "centerOfGravityModelEnabled" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true then the avatar is re-centered to be under the \r head's position. In room-scale VR, this behavior is what causes your avatar to follow your HMD as you walk around \r the room. Setting the value false is useful if you want to pin the avatar to a fixed position.", + "name": "hmdLeanRecenterEnabled" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Set to true to enable collisions for the avatar, false \r to disable collisions. May return true even though the value was set false because the \r zone may disallow collisionless avatars.", + "name": "collisionsEnabled" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Synonym of collisionsEnabled. \r Deprecated: Use collisionsEnabled instead.", + "name": "characterControllerEnabled" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Returns and sets the value of the Interface setting, Settings > \r Walking and teleporting. Note: Setting the value has no effect unless Interface is restarted.", + "name": "useAdvancedMovementControls" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Returns and sets the value of the Interface setting, Settings > Show room boundaries \r while teleporting. Note: Setting the value has no effect unless Interface is restarted.", + "name": "showPlayArea" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 75, + "name": "yawSpeed" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 50, + "name": "pitchSpeed" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the roll angle of your HMD turns your avatar \r while flying.", + "name": "hmdRollControlEnabled" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 8, + "description": "The amount of HMD roll, in degrees, required before your avatar turns if \r hmdRollControlEnabled is enabled.", + "name": "hmdRollControlDeadZone" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "If hmdRollControlEnabled is true, this value determines the maximum turn rate of\r your avatar when rolling your HMD in degrees per second.", + "name": "hmdRollControlRate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1.75, + "description": "The height of the user in sensor space.", + "name": "userHeight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1.65, + "description": "The estimated height of the user's eyes in sensor space. Read-only.", + "name": "userEyeHeight" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "UUID representing \"my avatar\". Only use for local-only entities and overlays in situations \r where MyAvatar.sessionUUID is not available (e.g., if not connected to a domain). Note: Likely to be deprecated. \r Read-only.", + "name": "SELF_ID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "walkSpeed" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "walkBackwardSpeed" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "sprintSpeed" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Can be used to apply a translation offset between the avatar's position and the\r registration point of the 3D model.", + "name": "skeletonOffset" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Returns the clamped scale of the avatar.", + "name": "scale" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "density" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "handPosition" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation left or right about an axis running from the head to the feet of the avatar. \r Yaw is sometimes called \"heading\".", + "name": "bodyYaw" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation about an axis running from shoulder to shoulder of the avatar. Pitch is \r sometimes called \"elevation\".", + "name": "bodyPitch" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation about an axis running from the chest to the back of the avatar. Roll is \r sometimes called \"bank\".", + "name": "bodyRoll" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "orientation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the avatar's head.", + "name": "headOrientation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation about an axis running from ear to ear of the avatar's head. Pitch is \r sometimes called \"elevation\".", + "name": "headPitch" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation left or right about an axis running from the base to the crown of the avatar's \r head. Yaw is sometimes called \"heading\".", + "name": "headYaw" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation about an axis running from the nose to the back of the avatar's head. Roll is \r sometimes called \"bank\".", + "name": "headRoll" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "velocity" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "angularVelocity" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "audioLoudness" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "audioAverageLoudness" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "displayName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Sanitized, defaulted version displayName that is defined by the AvatarMixer \r rather than by Interface clients. The result is unique among all avatars present at the time.", + "name": "sessionDisplayName" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "lookAtSnappingEnabled" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "skeletonModelURL" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "name": "attachmentData" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The list of joints in the current avatar model. Read-only.", + "name": "jointNames" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "Read-only.", + "name": "sessionUUID" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "Read-only.", + "name": "sensorToWorldMatrix" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "Read-only.", + "name": "controllerLeftHandMatrix" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "Read-only.", + "name": "controllerRightHandMatrix" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "sensorToWorldScale" + } + ], + "longname": "MyAvatar", + "scope": "global" + }, + { + "kind": "function", + "name": "resetSensorsAndBody", + "memberof": "MyAvatar", + "longname": "MyAvatar.resetSensorsAndBody", + "scope": "static" + }, + { + "description": "Moves and orients the avatar, such that it is directly underneath the HMD, with toes pointed forward.", + "kind": "function", + "name": "centerBody", + "memberof": "MyAvatar", + "longname": "MyAvatar.centerBody", + "scope": "static" + }, + { + "description": "The internal inverse-kinematics system maintains a record of which joints are \"locked\". Sometimes it is useful to forget this history, to prevent\rcontorted joints.", + "kind": "function", + "name": "clearIKJointLimitHistory", + "memberof": "MyAvatar", + "longname": "MyAvatar.clearIKJointLimitHistory", + "scope": "static" + }, + { + "kind": "function", + "name": "setOrientationVar", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "newOrientationVar" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setOrientationVar", + "scope": "static" + }, + { + "kind": "function", + "name": "getOrientationVar", + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getOrientationVar", + "scope": "static" + }, + { + "description": "Get the position in world coordinates of the point directly between your avatar's eyes assuming your avatar was in its\rdefault pose. This is a reference position; it does not change as your avatar's head moves relative to the avatar \rposition.", + "kind": "function", + "name": "getDefaultEyePosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Default position between your avatar's eyes in world coordinates." + } + ], + "examples": [ + "Report your avatar's default eye position.\rvar defaultEyePosition = MyAvatar.getDefaultEyePosition();\rprint(JSON.stringify(defaultEyePosition));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getDefaultEyePosition", + "scope": "static" + }, + { + "description": "The avatar animation system includes a set of default animations along with rules for how those animations are blended\rtogether with procedural data (such as look at vectors, hand sensors etc.). overrideAnimation() is used to completely\roverride all motion from the default animation system (including inverse kinematics for hand and head controllers) and\rplay a set of specified animations. To end these animations and restore the default animations, use \r{@link MyAvatar.restoreAnimation}.
\r

Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target \rrig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, \rthe avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see \rAvatar Standards.

", + "kind": "function", + "name": "overrideAnimation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL to the animation file. Animation files need to be .FBX format, but only need to contain the \ravatar skeleton and animation data.", + "name": "url" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The frames per second (FPS) rate for the animation playback. 30 FPS is normal speed.", + "name": "fps" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Set to true if the animation should loop.", + "name": "loop" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The frame the animation should start at.", + "name": "firstFrame" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The frame the animation should end at.", + "name": "lastFrame" + } + ], + "examples": [ + " Play a clapping animation on your avatar for three seconds. \r// Clap your hands for 3 seconds then restore animation back to the avatar.\rvar ANIM_URL = \"https://s3.amazonaws.com/hifi-public/animations/ClapAnimations/ClapHands_Standing.fbx\";\rMyAvatar.overrideAnimation(ANIM_URL, 30, true, 0, 53);\rScript.setTimeout(function () {\r MyAvatar.restoreAnimation();\r}, 3000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.overrideAnimation", + "scope": "static" + }, + { + "description": "The avatar animation system includes a set of default animations along with rules for how those animations are blended together with\rprocedural data (such as look at vectors, hand sensors etc.). Playing your own custom animations will override the default animations.\rrestoreAnimation() is used to restore all motion from the default animation system including inverse kinematics for hand and head\rcontrollers. If you aren't currently playing an override animation, this function will have no effect.", + "kind": "function", + "name": "restoreAnimation", + "examples": [ + " Play a clapping animation on your avatar for three seconds. \r// Clap your hands for 3 seconds then restore animation back to the avatar.\rvar ANIM_URL = \"https://s3.amazonaws.com/hifi-public/animations/ClapAnimations/ClapHands_Standing.fbx\";\rMyAvatar.overrideAnimation(ANIM_URL, 30, true, 0, 53);\rScript.setTimeout(function () {\r MyAvatar.restoreAnimation();\r}, 3000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.restoreAnimation", + "scope": "static" + }, + { + "description": "Each avatar has an avatar-animation.json file that defines which animations are used and how they are blended together with procedural data\r(such as look at vectors, hand sensors etc.). Each animation specified in the avatar-animation.json file is known as an animation role.\rAnimation roles map to easily understandable actions that the avatar can perform, such as \"idleStand\", \"idleTalk\", or \"walkFwd.\"\rgetAnimationRoles() is used get the list of animation roles defined in the avatar-animation.json.", + "kind": "function", + "name": "getAnimationRoles", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Array of role strings." + } + ], + "examples": [ + "Print the list of animation roles defined in the avatar's avatar-animation.json file to the debug log.\rvar roles = MyAvatar.getAnimationRoles();\rprint(\"Animation Roles:\");\rfor (var i = 0; i < roles.length; i++) {\r print(roles[i]);\r}" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAnimationRoles", + "scope": "static" + }, + { + "description": "Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions\rthat the avatar can perform, such as \"idleStand\", \"idleTalk\", or \"walkFwd\". To get the full list of roles, use getAnimationRoles().\rFor each role, the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended\rtogether with procedural data (such as look at vectors, hand sensors etc.).\roverrideRoleAnimation() is used to change the animation clip (.FBX) associated with a specified animation role. To end \rthe animations and restore the default animations, use {@link MyAvatar.restoreRoleAnimation}.
\r

Note: Hand roles only affect the hand. Other 'main' roles, like 'idleStand', 'idleTalk', 'takeoffStand' are full body.

\r

Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target\rrig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different,\rthe avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see \rAvatar Standards.", + "kind": "function", + "name": "overrideRoleAnimation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The animation role to override", + "name": "role" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL to the animation file. Animation files need to be .FBX format, but only need to contain the avatar skeleton and animation data.", + "name": "url" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The frames per second (FPS) rate for the animation playback. 30 FPS is normal speed.", + "name": "fps" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Set to true if the animation should loop", + "name": "loop" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The frame the animation should start at", + "name": "firstFrame" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The frame the animation should end at", + "name": "lastFrame" + } + ], + "examples": [ + "The default avatar-animation.json defines an \"idleStand\" animation role. This role specifies that when the avatar is not moving,\ran animation clip of the avatar idling with hands hanging at its side will be used. It also specifies that when the avatar moves, the animation\rwill smoothly blend to the walking animation used by the \"walkFwd\" animation role.\rIn this example, the \"idleStand\" role animation clip has been replaced with a clapping animation clip. Now instead of standing with its arms\rhanging at its sides when it is not moving, the avatar will stand and clap its hands. Note that just as it did before, as soon as the avatar\rstarts to move, the animation will smoothly blend into the walk animation used by the \"walkFwd\" animation role.\r// An animation of the avatar clapping its hands while standing. Restore default after 30s.\rvar ANIM_URL = \"https://s3.amazonaws.com/hifi-public/animations/ClapAnimations/ClapHands_Standing.fbx\";\rMyAvatar.overrideRoleAnimation(\"idleStand\", ANIM_URL, 30, true, 0, 53);\rScript.setTimeout(function () {\r MyAvatar.restoreRoleAnimation();\r}, 30000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.overrideRoleAnimation", + "scope": "static" + }, + { + "description": "Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions that\rthe avatar can perform, such as \"idleStand\", \"idleTalk\", or \"walkFwd\". To get the full list of roles, use getAnimationRoles(). For each role,\rthe avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended together with\rprocedural data (such as look at vectors, hand sensors etc.). You can change the animation clip (.FBX) associated with a specified animation\rrole using overrideRoleAnimation().\rrestoreRoleAnimation() is used to restore a specified animation role's default animation clip. If you have not specified an override animation\rfor the specified role, this function will have no effect.", + "kind": "function", + "name": "restoreRoleAnimation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The animation role clip to restore.", + "name": "role" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.restoreRoleAnimation", + "scope": "static" + }, + { + "kind": "function", + "name": "removeAnimationStateHandler", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "handler" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.removeAnimationStateHandler", + "scope": "static" + }, + { + "kind": "function", + "name": "getSnapTurn", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getSnapTurn", + "scope": "static" + }, + { + "kind": "function", + "name": "setSnapTurn", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "on" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setSnapTurn", + "scope": "static" + }, + { + "kind": "function", + "name": "setDominantHand", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "hand" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setDominantHand", + "scope": "static" + }, + { + "kind": "function", + "name": "getDominantHand", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getDominantHand", + "scope": "static" + }, + { + "kind": "function", + "name": "setCenterOfGravityModelEnabled", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setCenterOfGravityModelEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "getCenterOfGravityModelEnabled", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getCenterOfGravityModelEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "setHMDLeanRecenterEnabled", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setHMDLeanRecenterEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "getHMDLeanRecenterEnabled", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getHMDLeanRecenterEnabled", + "scope": "static" + }, + { + "description": "Request to enable hand touch effect globally", + "kind": "function", + "name": "requestEnableHandTouch", + "memberof": "MyAvatar", + "longname": "MyAvatar.requestEnableHandTouch", + "scope": "static" + }, + { + "description": "Request to disable hand touch effect globally", + "kind": "function", + "name": "requestDisableHandTouch", + "memberof": "MyAvatar", + "longname": "MyAvatar.requestDisableHandTouch", + "scope": "static" + }, + { + "description": "Disables hand touch effect on a specific entity", + "kind": "function", + "name": "disableHandTouchForID", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "ID of the entity that will disable hand touch effect", + "name": "entityID" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.disableHandTouchForID", + "scope": "static" + }, + { + "description": "Enables hand touch effect on a specific entity", + "kind": "function", + "name": "enableHandTouchForID", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "ID of the entity that will enable hand touch effect", + "name": "entityID" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.enableHandTouchForID", + "scope": "static" + }, + { + "kind": "function", + "name": "getRawDriveKey", + "params": [ + { + "type": { + "names": [ + "DriveKeys" + ] + }, + "name": "key" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getRawDriveKey", + "scope": "static" + }, + { + "kind": "function", + "name": "disableDriveKey", + "params": [ + { + "type": { + "names": [ + "DriveKeys" + ] + }, + "name": "key" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.disableDriveKey", + "scope": "static" + }, + { + "kind": "function", + "name": "enableDriveKey", + "params": [ + { + "type": { + "names": [ + "DriveKeys" + ] + }, + "name": "key" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.enableDriveKey", + "scope": "static" + }, + { + "kind": "function", + "name": "isDriveKeyDisabled", + "params": [ + { + "type": { + "names": [ + "DriveKeys" + ] + }, + "name": "key" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.isDriveKeyDisabled", + "scope": "static" + }, + { + "description": "Recenter the avatar in the vertical direction, if {@link MyAvatar|MyAvatar.hmdLeanRecenterEnabled} is \rfalse.", + "kind": "function", + "name": "triggerVerticalRecenter", + "memberof": "MyAvatar", + "longname": "MyAvatar.triggerVerticalRecenter", + "scope": "static" + }, + { + "description": "Recenter the avatar's rotation, if {@link MyAvatar|MyAvatar.hmdLeanRecenterEnabled} is false.", + "kind": "function", + "name": "triggerRotationRecenter", + "memberof": "MyAvatar", + "longname": "MyAvatar.triggerRotationRecenter", + "scope": "static" + }, + { + "description": "The isRecenteringHorizontally function returns true if MyAvatar\ris translating the root of the Avatar to keep the center of gravity under the head.\risActive(Horizontal) is returned.", + "kind": "function", + "name": "isRecenteringHorizontally", + "memberof": "MyAvatar", + "longname": "MyAvatar.isRecenteringHorizontally", + "scope": "static" + }, + { + "description": "Get the current position of the avatar's \"Head\" joint.", + "kind": "function", + "name": "getHeadPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The current position of the avatar's \"Head\" joint." + } + ], + "examples": [ + "Report the current position of your avatar's head.\rprint(JSON.stringify(MyAvatar.getHeadPosition()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getHeadPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getHeadFinalYaw", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getHeadFinalYaw", + "scope": "static" + }, + { + "kind": "function", + "name": "getHeadFinalRoll", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getHeadFinalRoll", + "scope": "static" + }, + { + "kind": "function", + "name": "getHeadFinalPitch", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getHeadFinalPitch", + "scope": "static" + }, + { + "kind": "function", + "name": "getHeadDeltaPitch", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getHeadDeltaPitch", + "scope": "static" + }, + { + "description": "Get the current position of the point directly between the avatar's eyes.", + "kind": "function", + "name": "getEyePosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The current position of the point directly between the avatar's eyes." + } + ], + "examples": [ + "Report your avatar's current eye position.\rvar eyePosition = MyAvatar.getEyePosition();\rprint(JSON.stringify(eyePosition));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getEyePosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getTargetAvatarPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the avatar you're currently looking at." + } + ], + "examples": [ + "Report the position of the avatar you're currently looking at.\rprint(JSON.stringify(MyAvatar.getTargetAvatarPosition()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getTargetAvatarPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getTargetAvatar", + "returns": [ + { + "type": { + "names": [ + "AvatarData" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getTargetAvatar", + "scope": "static" + }, + { + "description": "Get the position of the avatar's left hand as positioned by a hand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.)

", + "kind": "function", + "name": "getLeftHandPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the left hand in avatar coordinates if positioned by a hand controller, otherwise \r {@link Vec3(0)|Vec3.ZERO}." + } + ], + "examples": [ + "Report the position of your left hand relative to your avatar.\rprint(JSON.stringify(MyAvatar.getLeftHandPosition()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getLeftHandPosition", + "scope": "static" + }, + { + "description": "Get the position of the avatar's right hand as positioned by a hand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.)

", + "kind": "function", + "name": "getRightHandPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the right hand in avatar coordinates if positioned by a hand controller, otherwise \r {@link Vec3(0)|Vec3.ZERO}." + } + ], + "examples": [ + "Report the position of your right hand relative to your avatar.\rprint(JSON.stringify(MyAvatar.getLeftHandPosition()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getRightHandPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getLeftHandTipPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getLeftHandTipPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getRightHandTipPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getRightHandTipPosition", + "scope": "static" + }, + { + "description": "Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a \rhand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.) If you are using the Leap Motion, the return value's valid property will be \rfalse and any pose values returned will not be meaningful.

", + "kind": "function", + "name": "getLeftHandPose", + "returns": [ + { + "type": { + "names": [ + "Pose" + ] + } + } + ], + "examples": [ + "Report the pose of your avatar's left hand.\rprint(JSON.stringify(MyAvatar.getLeftHandPose()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getLeftHandPose", + "scope": "static" + }, + { + "description": "Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a \rhand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.) If you are using the Leap Motion, the return value's valid property will be \rfalse and any pose values returned will not be meaningful.

", + "kind": "function", + "name": "getRightHandPose", + "returns": [ + { + "type": { + "names": [ + "Pose" + ] + } + } + ], + "examples": [ + "Report the pose of your avatar's right hand.\rprint(JSON.stringify(MyAvatar.getRightHandPose()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getRightHandPose", + "scope": "static" + }, + { + "kind": "function", + "name": "getLeftHandTipPose", + "returns": [ + { + "type": { + "names": [ + "Pose" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getLeftHandTipPose", + "scope": "static" + }, + { + "kind": "function", + "name": "getRightHandTipPose", + "returns": [ + { + "type": { + "names": [ + "Pose" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getRightHandTipPose", + "scope": "static" + }, + { + "kind": "function", + "name": "worldToJointPoint", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.worldToJointPoint", + "scope": "static" + }, + { + "kind": "function", + "name": "worldToJointDirection", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "direction" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.worldToJointDirection", + "scope": "static" + }, + { + "kind": "function", + "name": "worldToJointRotation", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "rotation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.worldToJointRotation", + "scope": "static" + }, + { + "kind": "function", + "name": "jointToWorldPoint", + "params": [ + { + "type": { + "names": [ + "vec3" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.jointToWorldPoint", + "scope": "static" + }, + { + "kind": "function", + "name": "jointToWorldDirection", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "direction" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.jointToWorldDirection", + "scope": "static" + }, + { + "kind": "function", + "name": "jointToWorldRotation", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "rotation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.jointToWorldRotation", + "scope": "static" + }, + { + "kind": "function", + "name": "pinJoint", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "orientation" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.pinJoint", + "scope": "static" + }, + { + "kind": "function", + "name": "clearPinOnJoint", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.clearPinOnJoint", + "scope": "static" + }, + { + "kind": "function", + "name": "getIKErrorOnLastSolve", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getIKErrorOnLastSolve", + "scope": "static" + }, + { + "kind": "function", + "name": "useFullAvatarURL", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "fullAvatarURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "modelName" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.useFullAvatarURL", + "scope": "static" + }, + { + "description": "Get the complete URL for the current avatar.", + "kind": "function", + "name": "getFullAvatarURLFromPreferences", + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The full avatar model name." + } + ], + "examples": [ + "Report the URL for the current avatar.\rprint(MyAvatar.getFullAvatarURLFromPreferences());" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getFullAvatarURLFromPreferences", + "scope": "static" + }, + { + "description": "Get the full avatar model name for the current avatar.", + "kind": "function", + "name": "getFullAvatarModelName", + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The full avatar model name." + } + ], + "examples": [ + "Report the current full avatar model name.\rprint(MyAvatar.getFullAvatarModelName());" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getFullAvatarModelName", + "scope": "static" + }, + { + "description": "Function returns list of avatar entities", + "kind": "function", + "name": "getAvatarEntitiesVariant()", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAvatarEntitiesVariant()", + "scope": "static" + }, + { + "kind": "function", + "name": "isFlying", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.isFlying", + "scope": "static" + }, + { + "kind": "function", + "name": "isInAir", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.isInAir", + "scope": "static" + }, + { + "kind": "function", + "name": "setFlyingEnabled", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setFlyingEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "getFlyingEnabled", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getFlyingEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "setFlyingDesktopPref", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setFlyingDesktopPref", + "scope": "static" + }, + { + "kind": "function", + "name": "getFlyingDesktopPref", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getFlyingDesktopPref", + "scope": "static" + }, + { + "kind": "function", + "name": "setFlyingDesktopPref", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setFlyingDesktopPref", + "scope": "static" + }, + { + "kind": "function", + "name": "getFlyingDesktopPref", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getFlyingDesktopPref", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatarScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAvatarScale", + "scope": "static" + }, + { + "kind": "function", + "name": "setAvatarScale", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "scale" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setAvatarScale", + "scope": "static" + }, + { + "kind": "function", + "name": "setCollisionsEnabled", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setCollisionsEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "getCollisionsEnabled", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getCollisionsEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "getCollisionCapsule", + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getCollisionCapsule", + "scope": "static" + }, + { + "kind": "function", + "name": "setCharacterControllerEnabled", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "deprecated": true, + "memberof": "MyAvatar", + "longname": "MyAvatar.setCharacterControllerEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "getCharacterControllerEnabled", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "deprecated": true, + "memberof": "MyAvatar", + "longname": "MyAvatar.getCharacterControllerEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "isUp", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "direction" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.isUp", + "scope": "static" + }, + { + "kind": "function", + "name": "isDown", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "direction" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.isDown", + "scope": "static" + }, + { + "description": "Increase the avatar's scale by five percent, up to a minimum scale of 1000.", + "kind": "function", + "name": "increaseSize", + "examples": [ + "Reset your avatar's size to default then grow it 5 times.\rMyAvatar.resetSize();\r\rfor (var i = 0; i < 5; i++){\r print (\"Growing by 5 percent\");\r MyAvatar.increaseSize();\r}" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.increaseSize", + "scope": "static" + }, + { + "description": "Decrease the avatar's scale by five percent, down to a minimum scale of 0.25.", + "kind": "function", + "name": "decreaseSize", + "examples": [ + "Reset your avatar's size to default then shrink it 5 times.\rMyAvatar.resetSize();\r\rfor (var i = 0; i < 5; i++){\r print (\"Shrinking by 5 percent\");\r MyAvatar.decreaseSize();\r}" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.decreaseSize", + "scope": "static" + }, + { + "description": "Reset the avatar's scale back to the default scale of 1.0.", + "kind": "function", + "name": "resetSize", + "memberof": "MyAvatar", + "longname": "MyAvatar.resetSize", + "scope": "static" + }, + { + "kind": "function", + "name": "animGraphLoaded", + "memberof": "MyAvatar", + "longname": "MyAvatar.animGraphLoaded", + "scope": "static" + }, + { + "kind": "function", + "name": "setGravity", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "gravity" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setGravity", + "scope": "static" + }, + { + "kind": "function", + "name": "getGravity", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getGravity", + "scope": "static" + }, + { + "description": "Move the avatar to a new position and/or orientation in the domain, while taking into account Avatar leg-length.", + "kind": "function", + "name": "goToFeetLocation", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The new position for the avatar, in world coordinates.", + "name": "position" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Set to true to set the orientation of the avatar.", + "name": "hasOrientation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "optional": true, + "defaultvalue": "Quat.IDENTITY", + "description": "The new orientation for the avatar.", + "name": "orientation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Set to true to position the avatar a short distance away from\r the new position and orientate the avatar to face the position.", + "name": "shouldFaceLocation" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.goToFeetLocation", + "scope": "static" + }, + { + "description": "Move the avatar to a new position and/or orientation in the domain.", + "kind": "function", + "name": "goToLocation", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The new position for the avatar, in world coordinates.", + "name": "position" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Set to true to set the orientation of the avatar.", + "name": "hasOrientation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "optional": true, + "defaultvalue": "Quat.IDENTITY", + "description": "The new orientation for the avatar.", + "name": "orientation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Set to true to position the avatar a short distance away from", + "name": "shouldFaceLocation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "Set to false MyAvatar::safeLanding will not be called (used when teleporting).\r the new position and orientate the avatar to face the position.", + "name": "withSafeLanding" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.goToLocation", + "scope": "static" + }, + { + "kind": "function", + "name": "goToLocation", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "properties" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.goToLocation", + "scope": "static" + }, + { + "kind": "function", + "name": "goToLocationAndEnableCollisions", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "position" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.goToLocationAndEnableCollisions", + "scope": "static" + }, + { + "kind": "function", + "name": "safeLanding", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "position" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.safeLanding", + "scope": "static" + }, + { + "kind": "function", + "name": "restrictScaleFromDomainSettings", + "params": [ + { + "type": { + "names": [ + "objecct" + ] + }, + "name": "domainSettingsObject" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.restrictScaleFromDomainSettings", + "scope": "static" + }, + { + "kind": "function", + "name": "clearScaleRestriction", + "memberof": "MyAvatar", + "longname": "MyAvatar.clearScaleRestriction", + "scope": "static" + }, + { + "kind": "function", + "name": "addThrust", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "thrust" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.addThrust", + "scope": "static" + }, + { + "kind": "function", + "name": "getThrust", + "returns": [ + { + "type": { + "names": [ + "vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getThrust", + "scope": "static" + }, + { + "kind": "function", + "name": "setThrust", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "thrust" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setThrust", + "scope": "static" + }, + { + "kind": "function", + "name": "updateMotionBehaviorFromMenu", + "memberof": "MyAvatar", + "longname": "MyAvatar.updateMotionBehaviorFromMenu", + "scope": "static" + }, + { + "kind": "function", + "name": "setToggleHips", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setToggleHips", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableDebugDrawBaseOfSupport", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableDebugDrawBaseOfSupport", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableDebugDrawDefaultPose", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableDebugDrawDefaultPose", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableDebugDrawAnimPose", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableDebugDrawAnimPose", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableDebugDrawPosition", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableDebugDrawPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableDebugDrawHandControllers", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableDebugDrawHandControllers", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableDebugDrawSensorToWorldMatrix", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableDebugDrawSensorToWorldMatrix", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableDebugDrawIKTargets", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableDebugDrawIKTargets", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableDebugDrawIKConstraints", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableDebugDrawIKConstraints", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableDebugDrawIKChains", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableDebugDrawIKChains", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableDebugDrawDetailedCollision", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableDebugDrawDetailedCollision", + "scope": "static" + }, + { + "description": "Get whether or not your avatar mesh is visible.", + "kind": "function", + "name": "getEnableMeshVisible", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if your avatar's mesh is visible, otherwise false." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getEnableMeshVisible", + "scope": "static" + }, + { + "description": "Set whether or not your avatar mesh is visible.", + "kind": "function", + "name": "setEnableMeshVisible", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true to set your avatar mesh visible; false to set it invisible.", + "name": "visible" + } + ], + "examples": [ + "Make your avatar invisible for 10s.\rMyAvatar.setEnableMeshVisible(false);\rScript.setTimeout(function () {\r MyAvatar.setEnableMeshVisible(true);\r}, 10000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableMeshVisible", + "scope": "static" + }, + { + "kind": "function", + "name": "setEnableInverseKinematics", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setEnableInverseKinematics", + "scope": "static" + }, + { + "kind": "function", + "name": "getAnimGraphOverrideUrl", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAnimGraphOverrideUrl", + "scope": "static" + }, + { + "kind": "function", + "name": "setAnimGraphOverrideUrl", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setAnimGraphOverrideUrl", + "scope": "static" + }, + { + "kind": "function", + "name": "getAnimGraphUrl", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAnimGraphUrl", + "scope": "static" + }, + { + "kind": "function", + "name": "setAnimGraphUrl", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setAnimGraphUrl", + "scope": "static" + }, + { + "kind": "function", + "name": "getPositionForAudio", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getPositionForAudio", + "scope": "static" + }, + { + "kind": "function", + "name": "getOrientationForAudio", + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getOrientationForAudio", + "scope": "static" + }, + { + "kind": "function", + "name": "setModelScale", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "scale" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setModelScale", + "scope": "static" + }, + { + "kind": "function", + "name": "audioListenerModeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.audioListenerModeChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "transformChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.transformChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "newCollisionSoundURL", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.newCollisionSoundURL", + "scope": "static" + }, + { + "description": "Triggered when the avatar collides with an entity.", + "kind": "function", + "name": "collisionWithEntity", + "params": [ + { + "type": { + "names": [ + "Collision" + ] + }, + "name": "collision" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report each time your avatar collides with an entity.\rMyAvatar.collisionWithEntity.connect(function (collision) {\r print(\"Your avatar collided with an entity.\");\r});" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.collisionWithEntity", + "scope": "static" + }, + { + "description": "Triggered when collisions with avatar enabled or disabled", + "kind": "function", + "name": "collisionsEnabledChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.collisionsEnabledChanged", + "scope": "static" + }, + { + "description": "Triggered when avatar's animation url changes", + "kind": "function", + "name": "animGraphUrlChanged", + "params": [ + { + "type": { + "names": [ + "url" + ] + }, + "name": "url" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.animGraphUrlChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "energyChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "energy" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.energyChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "positionGoneTo", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.positionGoneTo", + "scope": "static" + }, + { + "kind": "function", + "name": "onLoadComplete", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.onLoadComplete", + "scope": "static" + }, + { + "kind": "function", + "name": "wentAway", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.wentAway", + "scope": "static" + }, + { + "kind": "function", + "name": "wentActive", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.wentActive", + "scope": "static" + }, + { + "kind": "function", + "name": "skeletonChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.skeletonChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "dominantHandChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "hand" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.dominantHandChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sensorToWorldScaleChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "scale" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.sensorToWorldScaleChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "attachmentsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.attachmentsChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "scaleChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.scaleChanged", + "scope": "static" + }, + { + "description": "Triggered when hand touch is globally enabled or disabled", + "kind": "function", + "name": "shouldDisableHandTouchChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "shouldDisable" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.shouldDisableHandTouchChanged", + "scope": "static" + }, + { + "description": "Triggered when hand touch is enabled or disabled for an specific entity", + "kind": "function", + "name": "disableHandTouchForIDChanged", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "ID of the entity that will enable hand touch effect", + "name": "entityID" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "disable" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.disableHandTouchForIDChanged", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The FaceTracker API helps manage facial tracking hardware.", + "kind": "namespace", + "name": "FaceTracker", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "FaceTracker", + "scope": "global" + }, + { + "kind": "function", + "name": "setEnabled", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "memberof": "FaceTracker", + "longname": "FaceTracker.setEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "calibrate", + "memberof": "FaceTracker", + "longname": "FaceTracker.calibrate", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

Synonym for {@link Pointers} as used for laser pointers.", + "kind": "namespace", + "name": "LaserPointers", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "LaserPointers", + "scope": "global" + }, + { + "kind": "function", + "name": "createLaserPointer", + "params": [ + { + "type": { + "names": [ + "Pointers.LaserPointerProperties" + ] + }, + "name": "properties" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.createLaserPointer", + "scope": "static" + }, + { + "kind": "function", + "name": "enableLaserPointer", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.enableLaserPointer", + "scope": "static" + }, + { + "kind": "function", + "name": "disableLaserPointer", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.disableLaserPointer", + "scope": "static" + }, + { + "kind": "function", + "name": "removeLaserPointer", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.removeLaserPointer", + "scope": "static" + }, + { + "kind": "function", + "name": "editRenderState", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "renderState" + }, + { + "type": { + "names": [ + "Pointers.RayPointerRenderState" + ] + }, + "name": "properties" + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.editRenderState", + "scope": "static" + }, + { + "kind": "function", + "name": "setRenderState", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "renderState" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.setRenderState", + "scope": "static" + }, + { + "kind": "function", + "name": "getPrevRayPickResult", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "RayPickResult" + ] + } + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.getPrevRayPickResult", + "scope": "static" + }, + { + "kind": "function", + "name": "setPrecisionPicking", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "precisionPicking" + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.setPrecisionPicking", + "scope": "static" + }, + { + "kind": "function", + "name": "setLaserLength", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "laserLength" + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.setLaserLength", + "scope": "static" + }, + { + "kind": "function", + "name": "setIgnoreItems", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "name": "ignoreItems" + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.setIgnoreItems", + "scope": "static" + }, + { + "kind": "function", + "name": "setIncludeItems", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "name": "includeItems" + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.setIncludeItems", + "scope": "static" + }, + { + "kind": "function", + "name": "setLockEndUUID", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "itemID" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isOverlay" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "optional": true, + "name": "offsetMat" + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.setLockEndUUID", + "scope": "static" + }, + { + "kind": "function", + "name": "isLeftHand", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.isLeftHand", + "scope": "static" + }, + { + "kind": "function", + "name": "isRightHand", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.isRightHand", + "scope": "static" + }, + { + "kind": "function", + "name": "isMouse", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "LaserPointers", + "longname": "LaserPointers.isMouse", + "scope": "static" + }, + { + "description": "A set of properties that can be passed to {@link Picks.createPick} to create a new Ray Pick.", + "kind": "typedef", + "name": "RayPickProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If this Pick should start enabled or not. Disabled Picks do not updated their pick results.", + "name": "enabled" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "Picks.PICK_NOTHING", + "description": "The filter for this Pick to use, constructed using filter flags combined using bitwise OR.", + "name": "filter" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "0.0", + "description": "The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.", + "name": "maxDistance" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the parent, either an avatar, an entity, an overlay, or a pick.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 0, + "description": "The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "If \"Mouse,\" parents the pick to the mouse. If \"Avatar,\" parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar.", + "name": "joint" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "defaultvalue": "Vec3.ZERO", + "description": "Only for Joint Ray Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral", + "name": "posOffset" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "defaultvalue": "Vec3.UP", + "description": "Only for Joint Ray Picks. A local joint direction offset. x = upward, y = forward, z = lateral", + "name": "dirOffset" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "description": "Only for Static Ray Picks. The world-space origin of the ray.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "defaultvalue": "-Vec3.UP", + "description": "Only for Static Ray Picks. The world-space direction of the ray.", + "name": "direction" + } + ], + "memberof": "Picks", + "longname": "Picks.RayPickProperties", + "scope": "static" + }, + { + "description": "A set of properties that can be passed to {@link Picks.createPick} to create a new Stylus Pick.", + "kind": "typedef", + "name": "StylusPickProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "description": "An integer. 0 == left, 1 == right. Invalid otherwise.", + "name": "hand" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If this Pick should start enabled or not. Disabled Picks do not updated their pick results.", + "name": "enabled" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "Picks.PICK_NOTHING", + "description": "The filter for this Pick to use, constructed using filter flags combined using bitwise OR.", + "name": "filter" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "0.0", + "description": "The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.", + "name": "maxDistance" + } + ], + "memberof": "Picks", + "longname": "Picks.StylusPickProperties", + "scope": "static" + }, + { + "description": "A set of properties that can be passed to {@link Picks.createPick} to create a new Parabola Pick.", + "kind": "typedef", + "name": "ParabolaPickProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If this Pick should start enabled or not. Disabled Picks do not updated their pick results.", + "name": "enabled" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "Picks.PICK_NOTHING", + "description": "The filter for this Pick to use, constructed using filter flags combined using bitwise OR.", + "name": "filter" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "0.0", + "description": "The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.", + "name": "maxDistance" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the parent, either an avatar, an entity, an overlay, or a pick.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 0, + "description": "The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "If \"Mouse,\" parents the pick to the mouse. If \"Avatar,\" parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar.", + "name": "joint" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "defaultvalue": "Vec3.ZERO", + "description": "Only for Joint Parabola Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral", + "name": "posOffset" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "defaultvalue": "Vec3.UP", + "description": "Only for Joint Parabola Picks. A local joint direction offset. x = upward, y = forward, z = lateral", + "name": "dirOffset" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "description": "Only for Static Parabola Picks. The world-space origin of the parabola segment.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "defaultvalue": "-Vec3.FRONT", + "description": "Only for Static Parabola Picks. The world-space direction of the parabola segment.", + "name": "direction" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 1, + "description": "The initial speed of the parabola, i.e. the initial speed of the projectile whose trajectory defines the parabola.", + "name": "speed" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "defaultvalue": "-Vec3.UP", + "description": "The acceleration of the parabola, i.e. the acceleration of the projectile whose trajectory defines the parabola, both magnitude and direction.", + "name": "accelerationAxis" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "Whether or not the acceleration axis should rotate with the avatar's local Y axis.", + "name": "rotateAccelerationWithAvatar" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Whether or not the acceleration axis should rotate with the parent's local Y axis, if available.", + "name": "rotateAccelerationWithParent" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "If true, the velocity and acceleration of the Pick will scale linearly with the parent, if available. scaleWithAvatar is an alias but is deprecated.", + "name": "scaleWithParent" + } + ], + "memberof": "Picks", + "longname": "Picks.ParabolaPickProperties", + "scope": "static" + }, + { + "description": "A Shape defines a physical volume.", + "kind": "typedef", + "name": "Shape", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The type of shape to use. Can be one of the following: \"box\", \"sphere\", \"capsule-x\", \"capsule-y\", \"capsule-z\", \"cylinder-x\", \"cylinder-y\", \"cylinder-z\"", + "name": "shapeType" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The size to scale the shape to.", + "name": "dimensions" + } + ], + "longname": "Shape", + "scope": "global" + }, + { + "description": "A set of properties that can be passed to {@link Picks.createPick} to create a new Collision Pick.", + "kind": "typedef", + "name": "CollisionPickProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If this Pick should start enabled or not. Disabled Picks do not updated their pick results.", + "name": "enabled" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "Picks.PICK_NOTHING", + "description": "The filter for this Pick to use, constructed using filter flags combined using bitwise OR.", + "name": "filter" + }, + { + "type": { + "names": [ + "Shape" + ] + }, + "description": "The information about the collision region's size and shape. Dimensions are in world space, but will scale with the parent if defined.", + "name": "shape" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the collision region, relative to a parent if defined.", + "name": "position" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the collision region, relative to a parent if defined.", + "name": "orientation" + }, + { + "type": { + "names": [ + "float" + ] + }, + "description": "The approximate minimum penetration depth for a test object to be considered in contact with the collision region.\rThe depth is measured in world space, but will scale with the parent if defined.", + "name": "threshold" + }, + { + "type": { + "names": [ + "CollisionMask" + ] + }, + "optional": true, + "defaultvalue": 8, + "description": "The type of object this collision pick collides as. Objects whose collision masks overlap with the pick's collision group\rwill be considered colliding with the pick.", + "name": "collisionGroup" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the parent, either an avatar, an entity, an overlay, or a pick.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 0, + "description": "The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "If \"Mouse,\" parents the pick to the mouse. If \"Avatar,\" parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar.", + "name": "joint" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "If true, the collision pick's dimensions and threshold will adjust according to the scale of the parent.", + "name": "scaleWithParent" + } + ], + "memberof": "Picks", + "longname": "Picks.CollisionPickProperties", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Picks API lets you create and manage objects for repeatedly calculating intersections in different ways.", + "kind": "namespace", + "name": "Picks", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "A filter flag. Don't intersect with anything. Read-only.", + "name": "PICK_NOTHING" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "A filter flag. Include entities when intersecting. Read-only.", + "name": "PICK_ENTITIES" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "A filter flag. Include overlays when intersecting. Read-only.", + "name": "PICK_OVERLAYS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "A filter flag. Include avatars when intersecting. Read-only.", + "name": "PICK_AVATARS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "A filter flag. Include the HUD sphere when intersecting in HMD mode. Read-only.", + "name": "PICK_HUD" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "A filter flag. Pick against coarse meshes, instead of exact meshes. Read-only.", + "name": "PICK_COARSE" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "A filter flag. Include invisible objects when intersecting. Read-only.", + "name": "PICK_INCLUDE_INVISIBLE" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "A filter flag. Include non-collidable objects when intersecting. \r Read-only.", + "name": "PICK_INCLUDE_NONCOLLIDABLE" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "PICK_ALL_INTERSECTIONS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "An intersection type. Intersected nothing with the given filter flags. \r Read-only.", + "name": "INTERSECTED_NONE" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "An intersection type. Intersected an entity. Read-only.", + "name": "INTERSECTED_ENTITY" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "An intersection type. Intersected an overlay. Read-only.", + "name": "INTERSECTED_OVERLAY" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "An intersection type. Intersected an avatar. Read-only.", + "name": "INTERSECTED_AVATAR" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "An intersection type. Intersected the HUD sphere. Read-only.", + "name": "INTERSECTED_HUD" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The max number of usec to spend per frame updating Pick results. Read-only.", + "name": "perFrameTimeBudget" + } + ], + "longname": "Picks", + "scope": "global" + }, + { + "description": "Adds a new Pick.\rDifferent {@link PickType}s use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example,\r with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pick, a Mouse Ray Pick, or a Joint Ray Pick.", + "kind": "function", + "name": "createPick", + "params": [ + { + "type": { + "names": [ + "PickType" + ] + }, + "description": "A PickType that specifies the method of picking to use", + "name": "type" + }, + { + "type": { + "names": [ + "Picks.RayPickProperties", + "Picks.StylusPickProperties", + "Picks.ParabolaPickProperties", + "Picks.CollisionPickProperties" + ] + }, + "description": "A PickProperties object, containing all the properties for initializing this Pick", + "name": "properties" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the created Pick. Used for managing the Pick. 0 if invalid." + } + ], + "memberof": "Picks", + "longname": "Picks.createPick", + "scope": "static" + }, + { + "description": "Enables a Pick.", + "kind": "function", + "name": "enablePick", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pick, as returned by {@link Picks.createPick}.", + "name": "uid" + } + ], + "memberof": "Picks", + "longname": "Picks.enablePick", + "scope": "static" + }, + { + "description": "Disables a Pick.", + "kind": "function", + "name": "disablePick", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pick, as returned by {@link Picks.createPick}.", + "name": "uid" + } + ], + "memberof": "Picks", + "longname": "Picks.disablePick", + "scope": "static" + }, + { + "description": "Removes a Pick.", + "kind": "function", + "name": "removePick", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pick, as returned by {@link Picks.createPick}.", + "name": "uid" + } + ], + "memberof": "Picks", + "longname": "Picks.removePick", + "scope": "static" + }, + { + "description": "An intersection result for a Ray Pick.", + "kind": "typedef", + "name": "RayPickResult", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The intersection type.", + "name": "type" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If there was a valid intersection (type != INTERSECTED_NONE)", + "name": "intersects" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the intersected object. Uuid.NULL for the HUD or invalid intersections.", + "name": "objectID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The distance to the intersection point from the origin of the ray.", + "name": "distance" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The intersection point in world-space.", + "name": "intersection" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The surface normal at the intersected point. All NANs if type == INTERSECTED_HUD.", + "name": "surfaceNormal" + }, + { + "type": { + "names": [ + "Variant" + ] + }, + "description": "Additional intersection details when available for Model objects.", + "name": "extraInfo" + }, + { + "type": { + "names": [ + "PickRay" + ] + }, + "description": "The PickRay that was used. Valid even if there was no intersection.", + "name": "searchRay" + } + ], + "longname": "RayPickResult", + "scope": "global" + }, + { + "description": "An intersection result for a Stylus Pick.", + "kind": "typedef", + "name": "StylusPickResult", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The intersection type.", + "name": "type" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If there was a valid intersection (type != INTERSECTED_NONE)", + "name": "intersects" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the intersected object. Uuid.NULL for the HUD or invalid intersections.", + "name": "objectID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The distance to the intersection point from the origin of the ray.", + "name": "distance" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The intersection point in world-space.", + "name": "intersection" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The surface normal at the intersected point. All NANs if type == INTERSECTED_HUD.", + "name": "surfaceNormal" + }, + { + "type": { + "names": [ + "Variant" + ] + }, + "description": "Additional intersection details when available for Model objects.", + "name": "extraInfo" + }, + { + "type": { + "names": [ + "StylusTip" + ] + }, + "description": "The StylusTip that was used. Valid even if there was no intersection.", + "name": "stylusTip" + } + ], + "longname": "StylusPickResult", + "scope": "global" + }, + { + "description": "An intersection result for a Parabola Pick.", + "kind": "typedef", + "name": "ParabolaPickResult", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The intersection type.", + "name": "type" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If there was a valid intersection (type != INTERSECTED_NONE)", + "name": "intersects" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the intersected object. Uuid.NULL for the HUD or invalid intersections.", + "name": "objectID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The distance to the intersection point from the origin of the parabola, not along the parabola.", + "name": "distance" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The distance to the intersection point from the origin of the parabola, along the parabola.", + "name": "parabolicDistance" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The intersection point in world-space.", + "name": "intersection" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The surface normal at the intersected point. All NANs if type == INTERSECTED_HUD.", + "name": "surfaceNormal" + }, + { + "type": { + "names": [ + "Variant" + ] + }, + "description": "Additional intersection details when available for Model objects.", + "name": "extraInfo" + }, + { + "type": { + "names": [ + "PickParabola" + ] + }, + "description": "The PickParabola that was used. Valid even if there was no intersection.", + "name": "parabola" + } + ], + "longname": "ParabolaPickResult", + "scope": "global" + }, + { + "description": "An intersection result for a Collision Pick.", + "kind": "typedef", + "name": "CollisionPickResult", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If there was at least one valid intersection (intersectingObjects.length > 0)", + "name": "intersects" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The collision information of each object which intersect with the CollisionRegion.", + "name": "intersectingObjects" + }, + { + "type": { + "names": [ + "CollisionRegion" + ] + }, + "description": "The CollisionRegion that was used. Valid even if there was no intersection.", + "name": "collisionRegion" + } + ], + "longname": "CollisionPickResult", + "scope": "global" + }, + { + "description": "Information about the Collision Pick's intersection with an object", + "kind": "typedef", + "name": "IntersectingObject", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "QUuid" + ] + }, + "description": "The ID of the object.", + "name": "id" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The type of the object, either Picks.INTERSECTED_ENTITY() or Picks.INTERSECTED_AVATAR()", + "name": "type" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Pairs of points representing penetration information between the pick and the object", + "name": "collisionContacts" + } + ], + "longname": "IntersectingObject", + "scope": "global" + }, + { + "description": "A pair of points that represents part of an overlap between a Collision Pick and an object in the physics engine. Points which are further apart represent deeper overlap", + "kind": "typedef", + "name": "CollisionContact", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "A point representing a penetration of the object's surface into the volume of the pick, in world space.", + "name": "pointOnPick" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "A point representing a penetration of the pick's surface into the volume of the found object, in world space.", + "name": "pointOnObject" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The normalized vector pointing away from the pick, representing the direction of collision.", + "name": "normalOnPick" + } + ], + "longname": "CollisionContact", + "scope": "global" + }, + { + "description": "Get the most recent pick result from this Pick. This will be updated as long as the Pick is enabled.", + "kind": "function", + "name": "getPrevPickResult", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pick, as returned by {@link Picks.createPick}.", + "name": "uid" + } + ], + "returns": [ + { + "type": { + "names": [ + "RayPickResult", + "StylusPickResult", + "ParabolaPickResult", + "CollisionPickResult" + ] + }, + "description": "The most recent intersection result. This will be different for different PickTypes." + } + ], + "memberof": "Picks", + "longname": "Picks.getPrevPickResult", + "scope": "static" + }, + { + "description": "Sets whether or not to use precision picking.", + "kind": "function", + "name": "setPrecisionPicking", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pick, as returned by {@link Picks.createPick}.", + "name": "uid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Whether or not to use precision picking", + "name": "precisionPicking" + } + ], + "memberof": "Picks", + "longname": "Picks.setPrecisionPicking", + "scope": "static" + }, + { + "description": "Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Picks.", + "kind": "function", + "name": "setIgnoreItems", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pick, as returned by {@link Picks.createPick}.", + "name": "uid" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "A list of IDs to ignore.", + "name": "ignoreItems" + } + ], + "memberof": "Picks", + "longname": "Picks.setIgnoreItems", + "scope": "static" + }, + { + "description": "Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus\r Picks only intersect with objects in their include list.", + "kind": "function", + "name": "setIncludeItems", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pick, as returned by {@link Picks.createPick}.", + "name": "uid" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "A list of IDs to include.", + "name": "includeItems" + } + ], + "memberof": "Picks", + "longname": "Picks.setIncludeItems", + "scope": "static" + }, + { + "description": "Check if a Pick is associated with the left hand.", + "kind": "function", + "name": "isLeftHand", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pick, as returned by {@link Picks.createPick}.", + "name": "uid" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "True if the Pick is a Joint Ray or Parabola Pick with joint == \"_CONTROLLER_LEFTHAND\" or \"_CAMERA_RELATIVE_CONTROLLER_LEFTHAND\", or a Stylus Pick with hand == 0." + } + ], + "memberof": "Picks", + "longname": "Picks.isLeftHand", + "scope": "static" + }, + { + "description": "Check if a Pick is associated with the right hand.", + "kind": "function", + "name": "isRightHand", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pick, as returned by {@link Picks.createPick}.", + "name": "uid" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "True if the Pick is a Joint Ray or Parabola Pick with joint == \"_CONTROLLER_RIGHTHAND\" or \"_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND\", or a Stylus Pick with hand == 1." + } + ], + "memberof": "Picks", + "longname": "Picks.isRightHand", + "scope": "static" + }, + { + "description": "Check if a Pick is associated with the system mouse.", + "kind": "function", + "name": "isMouse", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pick, as returned by {@link Picks.createPick}.", + "name": "uid" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "True if the Pick is a Mouse Ray or Parabola Pick, false otherwise." + } + ], + "memberof": "Picks", + "longname": "Picks.isMouse", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_NOTHING", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.PICK_NOTHING", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_ENTITIES", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.PICK_ENTITIES", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_OVERLAYS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.PICK_OVERLAYS", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_AVATARS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.PICK_AVATARS", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_HUD", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.PICK_HUD", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_COARSE", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.PICK_COARSE", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_INCLUDE_INVISIBLE", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.PICK_INCLUDE_INVISIBLE", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_INCLUDE_NONCOLLIDABLE", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.PICK_INCLUDE_NONCOLLIDABLE", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_ALL_INTERSECTIONS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.PICK_ALL_INTERSECTIONS", + "scope": "static" + }, + { + "kind": "function", + "name": "INTERSECTED_NONE", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.INTERSECTED_NONE", + "scope": "static" + }, + { + "kind": "function", + "name": "INTERSECTED_ENTITY", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.INTERSECTED_ENTITY", + "scope": "static" + }, + { + "kind": "function", + "name": "INTERSECTED_OVERLAY", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.INTERSECTED_OVERLAY", + "scope": "static" + }, + { + "kind": "function", + "name": "INTERSECTED_AVATAR", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.INTERSECTED_AVATAR", + "scope": "static" + }, + { + "kind": "function", + "name": "INTERSECTED_HUD", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Picks", + "longname": "Picks.INTERSECTED_HUD", + "scope": "static" + }, + { + "description": "A set of properties that can be passed to {@link Pointers.createPointer} to create a new Pointer. Contains the relevant {@link Picks.PickProperties} to define the underlying Pick.", + "kind": "typedef", + "name": "StylusPointerProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If this pointer should generate hover events.", + "name": "hover" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "enabled" + } + ], + "memberof": "Pointers", + "longname": "Pointers.StylusPointerProperties", + "scope": "static" + }, + { + "description": "A set of properties used to define the visual aspect of a Ray Pointer in the case that the Pointer is not intersecting something. Same as a {@link Pointers.RayPointerRenderState},\rbut with an additional distance field.", + "kind": "typedef", + "name": "DefaultRayPointerRenderState", + "type": { + "names": [ + "object" + ] + }, + "augments": [ + "Pointers.RayPointerRenderState" + ], + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The distance at which to render the end of this Ray Pointer, if one is defined.", + "name": "distance" + } + ], + "memberof": "Pointers", + "longname": "Pointers.DefaultRayPointerRenderState", + "scope": "static" + }, + { + "description": "A set of properties which define the visual aspect of a Ray Pointer in the case that the Pointer is intersecting something.", + "kind": "typedef", + "name": "RayPointerRenderState", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "When using {@link Pointers.createPointer}, the name of this render state, used by {@link Pointers.setRenderState} and {@link Pointers.editRenderState}", + "name": "name" + }, + { + "type": { + "names": [ + "Overlays.OverlayProperties", + "QUuid" + ] + }, + "optional": true, + "description": "When using {@link Pointers.createPointer}, an optionally defined overlay to represent the beginning of the Ray Pointer,\rusing the properties you would normally pass to {@link Overlays.addOverlay}, plus the type (as a type field).\rWhen returned from {@link Pointers.getPointerProperties}, the ID of the created overlay if it exists, or a null ID otherwise.", + "name": "start" + }, + { + "type": { + "names": [ + "Overlays.OverlayProperties", + "QUuid" + ] + }, + "optional": true, + "description": "When using {@link Pointers.createPointer}, an optionally defined overlay to represent the path of the Ray Pointer,\rusing the properties you would normally pass to {@link Overlays.addOverlay}, plus the type (as a type field), which must be \"line3d\".\rWhen returned from {@link Pointers.getPointerProperties}, the ID of the created overlay if it exists, or a null ID otherwise.", + "name": "path" + }, + { + "type": { + "names": [ + "Overlays.OverlayProperties", + "QUuid" + ] + }, + "optional": true, + "description": "When using {@link Pointers.createPointer}, an optionally defined overlay to represent the end of the Ray Pointer,\rusing the properties you would normally pass to {@link Overlays.addOverlay}, plus the type (as a type field).\rWhen returned from {@link Pointers.getPointerProperties}, the ID of the created overlay if it exists, or a null ID otherwise.", + "name": "end" + } + ], + "memberof": "Pointers", + "longname": "Pointers.RayPointerRenderState", + "scope": "static" + }, + { + "description": "A set of properties that can be passed to {@link Pointers.createPointer} to create a new Pointer. Contains the relevant {@link Picks.PickProperties} to define the underlying Pick.", + "kind": "typedef", + "name": "LaserPointerProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, the end of the Pointer will always rotate to face the avatar.", + "name": "faceAvatar" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "If false, the end of the Pointer will be moved up by half of its height.", + "name": "centerEndY" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, the end of the Pointer will lock on to the center of the object at which the pointer is pointing.", + "name": "lockEnd" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, the dimensions of the end of the Pointer will scale linearly with distance.", + "name": "distanceScaleEnd" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, the width of the Pointer's path will scale linearly with the pick parent's scale. scaleWithAvatar is an alias but is deprecated.", + "name": "scaleWithParent" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, the end of the Pointer will rotate to follow the normal of the intersected surface.", + "name": "followNormal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "0.0", + "description": "The strength of the interpolation between the real normal and the visual normal if followNormal is true. 0-1. If 0 or 1,\rthe normal will follow exactly.", + "name": "followNormalStrength" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "enabled" + }, + { + "type": { + "names": [ + "Array.", + "Object." + ] + }, + "optional": true, + "description": "A collection of different visual states to switch between.\rWhen using {@link Pointers.createPointer}, a list of RayPointerRenderStates.\rWhen returned from {@link Pointers.getPointerProperties}, a map between render state names and RayPointRenderStates.", + "name": "renderStates" + }, + { + "type": { + "names": [ + "Array.", + "Object." + ] + }, + "optional": true, + "description": "A collection of different visual states to use if there is no intersection.\rWhen using {@link Pointers.createPointer}, a list of DefaultRayPointerRenderStates.\rWhen returned from {@link Pointers.getPointerProperties}, a map between render state names and DefaultRayPointRenderStates.", + "name": "defaultRenderStates" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If this Pointer should generate hover events.", + "name": "hover" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "description": "A list of different triggers mechanisms that control this Pointer's click event generation.", + "name": "triggers" + } + ], + "memberof": "Pointers", + "longname": "Pointers.LaserPointerProperties", + "scope": "static" + }, + { + "description": "The rendering properties of the parabolic path", + "kind": "typedef", + "name": "ParabolaProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the parabola.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "1.0", + "description": "The alpha of the parabola.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.01, + "description": "The width of the parabola, in meters.", + "name": "width" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "The width of the parabola, in meters.", + "name": "isVisibleInSecondaryCamera" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the parabola is rendered in front of other items in the scene.", + "name": "drawInFront" + } + ], + "memberof": "Pointers", + "longname": "Pointers.ParabolaProperties", + "scope": "static" + }, + { + "description": "A set of properties used to define the visual aspect of a Parabola Pointer in the case that the Pointer is not intersecting something. Same as a {@link Pointers.ParabolaPointerRenderState},\rbut with an additional distance field.", + "kind": "typedef", + "name": "DefaultParabolaPointerRenderState", + "type": { + "names": [ + "object" + ] + }, + "augments": [ + "Pointers.ParabolaPointerRenderState" + ], + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The distance along the parabola at which to render the end of this Parabola Pointer, if one is defined.", + "name": "distance" + } + ], + "memberof": "Pointers", + "longname": "Pointers.DefaultParabolaPointerRenderState", + "scope": "static" + }, + { + "description": "A set of properties used to define the visual aspect of a Parabola Pointer in the case that the Pointer is intersecting something.", + "kind": "typedef", + "name": "ParabolaPointerRenderState", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "When using {@link Pointers.createPointer}, the name of this render state, used by {@link Pointers.setRenderState} and {@link Pointers.editRenderState}", + "name": "name" + }, + { + "type": { + "names": [ + "Overlays.OverlayProperties", + "QUuid" + ] + }, + "optional": true, + "description": "When using {@link Pointers.createPointer}, an optionally defined overlay to represent the beginning of the Parabola Pointer,\rusing the properties you would normally pass to {@link Overlays.addOverlay}, plus the type (as a type field).\rWhen returned from {@link Pointers.getPointerProperties}, the ID of the created overlay if it exists, or a null ID otherwise.", + "name": "start" + }, + { + "type": { + "names": [ + "Pointers.ParabolaProperties" + ] + }, + "optional": true, + "description": "When using {@link Pointers.createPointer}, the optionally defined rendering properties of the parabolic path defined by the Parabola Pointer.\rNot defined in {@link Pointers.getPointerProperties}.", + "name": "path" + }, + { + "type": { + "names": [ + "Overlays.OverlayProperties", + "QUuid" + ] + }, + "optional": true, + "description": "When using {@link Pointers.createPointer}, an optionally defined overlay to represent the end of the Parabola Pointer,\rusing the properties you would normally pass to {@link Overlays.addOverlay}, plus the type (as a type field).\rWhen returned from {@link Pointers.getPointerProperties}, the ID of the created overlay if it exists, or a null ID otherwise.", + "name": "end" + } + ], + "memberof": "Pointers", + "longname": "Pointers.ParabolaPointerRenderState", + "scope": "static" + }, + { + "description": "A set of properties that can be passed to {@link Pointers.createPointer} to create a new Pointer. Contains the relevant {@link Picks.PickProperties} to define the underlying Pick.", + "kind": "typedef", + "name": "ParabolaPointerProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, the end of the Pointer will always rotate to face the avatar.", + "name": "faceAvatar" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "If false, the end of the Pointer will be moved up by half of its height.", + "name": "centerEndY" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, the end of the Pointer will lock on to the center of the object at which the pointer is pointing.", + "name": "lockEnd" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, the dimensions of the end of the Pointer will scale linearly with distance.", + "name": "distanceScaleEnd" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "If true, the width of the Pointer's path will scale linearly with the pick parent's scale. scaleWithAvatar is an alias but is deprecated.", + "name": "scaleWithParent" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, the end of the Pointer will rotate to follow the normal of the intersected surface.", + "name": "followNormal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "0.0", + "description": "The strength of the interpolation between the real normal and the visual normal if followNormal is true. 0-1. If 0 or 1,\rthe normal will follow exactly.", + "name": "followNormalStrength" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "enabled" + }, + { + "type": { + "names": [ + "Array.", + "Object." + ] + }, + "optional": true, + "description": "A collection of different visual states to switch between.\rWhen using {@link Pointers.createPointer}, a list of ParabolaPointerRenderStates.\rWhen returned from {@link Pointers.getPointerProperties}, a map between render state names and ParabolaPointerRenderStates.", + "name": "renderStates" + }, + { + "type": { + "names": [ + "Array.", + "Object." + ] + }, + "optional": true, + "description": "A collection of different visual states to use if there is no intersection.\rWhen using {@link Pointers.createPointer}, a list of DefaultParabolaPointerRenderStates.\rWhen returned from {@link Pointers.getPointerProperties}, a map between render state names and DefaultParabolaPointerRenderStates.", + "name": "defaultRenderStates" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If this Pointer should generate hover events.", + "name": "hover" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "description": "A list of different triggers mechanisms that control this Pointer's click event generation.", + "name": "triggers" + } + ], + "memberof": "Pointers", + "longname": "Pointers.ParabolaPointerProperties", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Pointers API lets you create and manage objects for repeatedly calculating intersections in different ways, as well as the visual representation of those objects.\r Pointers can also be configured to automatically generate {@link PointerEvent}s on {@link Entities} and {@link Overlays}.", + "kind": "namespace", + "name": "Pointers", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "Pointers", + "scope": "global" + }, + { + "description": "A trigger mechanism for Ray and Parabola Pointers.", + "kind": "typedef", + "name": "Trigger", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Controller.Standard", + "Controller.Actions", + "function" + ] + }, + "description": "This can be a built-in Controller action, like Controller.Standard.LTClick, or a function that evaluates to >= 1.0 when you want to trigger button.", + "name": "action" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Which button to trigger. \"Primary\", \"Secondary\", \"Tertiary\", and \"Focus\" are currently supported. Only \"Primary\" will trigger clicks on web surfaces. If \"Focus\" is triggered,\rit will try to set the entity or overlay focus to the object at which the Pointer is aimed. Buttons besides the first three will still trigger events, but event.button will be \"None\".", + "name": "button" + } + ], + "memberof": "Pointers", + "longname": "Pointers.Trigger", + "scope": "static" + }, + { + "description": "Adds a new Pointer\rDifferent {@link PickType}s use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example,\r with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pointer, a Mouse Ray Pointer, or a Joint Ray Pointer.", + "kind": "function", + "name": "createPointer", + "params": [ + { + "type": { + "names": [ + "PickType" + ] + }, + "description": "A PickType that specifies the method of picking to use", + "name": "type" + }, + { + "type": { + "names": [ + "Pointers.LaserPointerProperties", + "Pointers.StylusPointerProperties", + "Pointers.ParabolaPointerProperties" + ] + }, + "description": "A PointerProperties object, containing all the properties for initializing this Pointer and the {@link Picks.PickProperties} for the Pick that\r this Pointer will use to do its picking.", + "name": "properties" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the created Pointer. Used for managing the Pointer. 0 if invalid." + } + ], + "examples": [ + "Create a left hand Ray Pointer that triggers events on left controller trigger click and changes color when it's intersecting something.\r\rvar end = {\r type: \"sphere\",\r dimensions: {x:0.5, y:0.5, z:0.5},\r solid: true,\r color: {red:0, green:255, blue:0},\r ignoreRayIntersection: true\r};\rvar end2 = {\r type: \"sphere\",\r dimensions: {x:0.5, y:0.5, z:0.5},\r solid: true,\r color: {red:255, green:0, blue:0},\r ignoreRayIntersection: true\r};\r\rvar renderStates = [ {name: \"test\", end: end} ];\rvar defaultRenderStates = [ {name: \"test\", distance: 10.0, end: end2} ];\rvar pointer = Pointers.createPointer(PickType.Ray, {\r joint: \"_CAMERA_RELATIVE_CONTROLLER_LEFTHAND\",\r filter: Picks.PICK_OVERLAYS | Picks.PICK_ENTITIES | Picks.PICK_INCLUDE_NONCOLLIDABLE,\r renderStates: renderStates,\r defaultRenderStates: defaultRenderStates,\r distanceScaleEnd: true,\r triggers: [ {action: Controller.Standard.LTClick, button: \"Focus\"}, {action: Controller.Standard.LTClick, button: \"Primary\"} ],\r hover: true,\r enabled: true\r});\rPointers.setRenderState(pointer, \"test\");" + ], + "memberof": "Pointers", + "longname": "Pointers.createPointer", + "scope": "static" + }, + { + "description": "Enables a Pointer.", + "kind": "function", + "name": "enablePointer", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + } + ], + "memberof": "Pointers", + "longname": "Pointers.enablePointer", + "scope": "static" + }, + { + "description": "Disables a Pointer.", + "kind": "function", + "name": "disablePointer", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + } + ], + "memberof": "Pointers", + "longname": "Pointers.disablePointer", + "scope": "static" + }, + { + "description": "Removes a Pointer.", + "kind": "function", + "name": "removePointer", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + } + ], + "memberof": "Pointers", + "longname": "Pointers.removePointer", + "scope": "static" + }, + { + "description": "Edit some visual aspect of a Pointer. Currently only supported for Ray Pointers.", + "kind": "function", + "name": "editRenderState", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the render state you want to edit.", + "name": "renderState" + }, + { + "type": { + "names": [ + "Pointers.RayPointerRenderState" + ] + }, + "description": "The new properties for renderStates item.", + "name": "properties" + } + ], + "memberof": "Pointers", + "longname": "Pointers.editRenderState", + "scope": "static" + }, + { + "description": "Set the render state of a Pointer. For Ray Pointers, this means switching between their {@link Pointers.RayPointerRenderState}s, or \"\" to turn off rendering and hover/trigger events.\r For Stylus Pointers, there are three built-in options: \"events on\" (render and send events, the default), \"events off\" (render but don't send events), and \"disabled\" (don't render, don't send events).", + "kind": "function", + "name": "setRenderState", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the render state to which you want to switch.", + "name": "renderState" + } + ], + "memberof": "Pointers", + "longname": "Pointers.setRenderState", + "scope": "static" + }, + { + "description": "Get the most recent pick result from this Pointer. This will be updated as long as the Pointer is enabled, regardless of the render state.", + "kind": "function", + "name": "getPrevPickResult", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + } + ], + "returns": [ + { + "type": { + "names": [ + "RayPickResult", + "StylusPickResult" + ] + }, + "description": "The most recent intersection result. This will be slightly different for different PickTypes." + } + ], + "memberof": "Pointers", + "longname": "Pointers.getPrevPickResult", + "scope": "static" + }, + { + "description": "Sets whether or not to use precision picking.", + "kind": "function", + "name": "setPrecisionPicking", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Whether or not to use precision picking", + "name": "precisionPicking" + } + ], + "memberof": "Pointers", + "longname": "Pointers.setPrecisionPicking", + "scope": "static" + }, + { + "description": "Sets the length of this Pointer. No effect on Stylus Pointers.", + "kind": "function", + "name": "setLength", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The desired length of the Pointer.", + "name": "length" + } + ], + "memberof": "Pointers", + "longname": "Pointers.setLength", + "scope": "static" + }, + { + "description": "Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Pointers.", + "kind": "function", + "name": "setIgnoreItems", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "A list of IDs to ignore.", + "name": "ignoreItems" + } + ], + "memberof": "Pointers", + "longname": "Pointers.setIgnoreItems", + "scope": "static" + }, + { + "description": "Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus\r Pointers only intersect with objects in their include list.", + "kind": "function", + "name": "setIncludeItems", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "A list of IDs to include.", + "name": "includeItems" + } + ], + "memberof": "Pointers", + "longname": "Pointers.setIncludeItems", + "scope": "static" + }, + { + "description": "Lock a Pointer onto a specific object (overlay, entity, or avatar). Optionally, provide an offset in object-space, otherwise the Pointer will lock on to the center of the object.\r Not used by Stylus Pointers.", + "kind": "function", + "name": "setLockEndUUID", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the object to which to lock on.", + "name": "objectID" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "False for entities or avatars, true for overlays", + "name": "isOverlay" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "optional": true, + "description": "The offset matrix to use if you do not want to lock on to the center of the object.", + "name": "offsetMat" + } + ], + "memberof": "Pointers", + "longname": "Pointers.setLockEndUUID", + "scope": "static" + }, + { + "description": "Check if a Pointer is associated with the left hand.", + "kind": "function", + "name": "isLeftHand", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "True if the Pointer is a Joint Ray Pointer with joint == \"_CONTROLLER_LEFTHAND\" or \"_CAMERA_RELATIVE_CONTROLLER_LEFTHAND\", or a Stylus Pointer with hand == 0" + } + ], + "memberof": "Pointers", + "longname": "Pointers.isLeftHand", + "scope": "static" + }, + { + "description": "Check if a Pointer is associated with the right hand.", + "kind": "function", + "name": "isRightHand", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "True if the Pointer is a Joint Ray Pointer with joint == \"_CONTROLLER_RIGHTHAND\" or \"_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND\", or a Stylus Pointer with hand == 1" + } + ], + "memberof": "Pointers", + "longname": "Pointers.isRightHand", + "scope": "static" + }, + { + "description": "Check if a Pointer is associated with the system mouse.", + "kind": "function", + "name": "isMouse", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "True if the Pointer is a Mouse Ray Pointer, false otherwise." + } + ], + "memberof": "Pointers", + "longname": "Pointers.isMouse", + "scope": "static" + }, + { + "description": "Returns information about an existing Pointer", + "kind": "function", + "name": "getPointerProperties", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the Pointer, as returned by {@link Pointers.createPointer}.", + "name": "uid" + } + ], + "returns": [ + { + "type": { + "names": [ + "Pointers.LaserPointerProperties", + "Pointers.StylusPointerProperties", + "Pointers.ParabolaPointerProperties" + ] + }, + "description": "The information about the Pointer.\rCurrently only includes renderStates and defaultRenderStates with associated overlay IDs." + } + ], + "memberof": "Pointers", + "longname": "Pointers.getPointerProperties", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

Synonym for {@link Picks} as used for ray picks.", + "kind": "namespace", + "name": "RayPick", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "PICK_NOTHING" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "PICK_ENTITIES" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "PICK_OVERLAYS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "PICK_AVATARS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "PICK_HUD" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "PICK_COARSE" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "PICK_INCLUDE_INVISIBLE" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "PICK_INCLUDE_NONCOLLIDABLE" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "PICK_ALL_INTERSECTIONS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "INTERSECTED_NONE" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "INTERSECTED_ENTITY" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "INTERSECTED_OVERLAY" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "INTERSECTED_AVATAR" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "INTERSECTED_HUD" + } + ], + "longname": "RayPick", + "scope": "global" + }, + { + "kind": "function", + "name": "createRayPick", + "params": [ + { + "type": { + "names": [ + "Picks.RayPickProperties" + ] + } + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.createRayPick", + "scope": "static" + }, + { + "kind": "function", + "name": "enableRayPick", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "memberof": "RayPick", + "longname": "RayPick.enableRayPick", + "scope": "static" + }, + { + "kind": "function", + "name": "disableRayPick", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "memberof": "RayPick", + "longname": "RayPick.disableRayPick", + "scope": "static" + }, + { + "kind": "function", + "name": "removeRayPick", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "memberof": "RayPick", + "longname": "RayPick.removeRayPick", + "scope": "static" + }, + { + "kind": "function", + "name": "getPrevRayPickResult", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "RayPickResult" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.getPrevRayPickResult", + "scope": "static" + }, + { + "kind": "function", + "name": "setPrecisionPicking", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "precisionPicking" + } + ], + "memberof": "RayPick", + "longname": "RayPick.setPrecisionPicking", + "scope": "static" + }, + { + "kind": "function", + "name": "setIgnoreItems", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + }, + { + "description": "ignoreEntities", + "name": "{Uuid[])" + } + ], + "memberof": "RayPick", + "longname": "RayPick.setIgnoreItems", + "scope": "static" + }, + { + "kind": "function", + "name": "setIncludeItems", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + }, + { + "description": "includeEntities", + "name": "{Uuid[])" + } + ], + "memberof": "RayPick", + "longname": "RayPick.setIncludeItems", + "scope": "static" + }, + { + "kind": "function", + "name": "isLeftHand", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.isLeftHand", + "scope": "static" + }, + { + "kind": "function", + "name": "isRightHand", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.isRightHand", + "scope": "static" + }, + { + "kind": "function", + "name": "isMouse", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.isMouse", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_NOTHING", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.PICK_NOTHING", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_ENTITIES", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.PICK_ENTITIES", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_OVERLAYS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.PICK_OVERLAYS", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_AVATARS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.PICK_AVATARS", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_HUD", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.PICK_HUD", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_COARSE", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.PICK_COARSE", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_INCLUDE_INVISIBLE", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.PICK_INCLUDE_INVISIBLE", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_INCLUDE_NONCOLLIDABLE", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.PICK_INCLUDE_NONCOLLIDABLE", + "scope": "static" + }, + { + "kind": "function", + "name": "PICK_ALL_INTERSECTIONS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.PICK_ALL_INTERSECTIONS", + "scope": "static" + }, + { + "kind": "function", + "name": "INTERSECTED_NONE", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.INTERSECTED_NONE", + "scope": "static" + }, + { + "kind": "function", + "name": "INTERSECTED_ENTITY", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.INTERSECTED_ENTITY", + "scope": "static" + }, + { + "kind": "function", + "name": "INTERSECTED_OVERLAY", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.INTERSECTED_OVERLAY", + "scope": "static" + }, + { + "kind": "function", + "name": "INTERSECTED_AVATAR", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.INTERSECTED_AVATAR", + "scope": "static" + }, + { + "kind": "function", + "name": "INTERSECTED_HUD", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "RayPick", + "longname": "RayPick.INTERSECTED_HUD", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The AccountServices API contains helper functions related to user connectivity", + "hifiInterface": true, + "hifiClientEntity": true, + "kind": "namespace", + "name": "AccountServices", + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "username" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Read-only.", + "name": "loggedIn" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "findableBy" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "metaverseServerURL" + } + ], + "longname": "AccountServices", + "scope": "global" + }, + { + "kind": "function", + "name": "getDownloadInfo", + "returns": [ + { + "type": { + "names": [ + "DownloadInfoResult" + ] + } + } + ], + "memberof": "AccountServices", + "longname": "AccountServices.getDownloadInfo", + "scope": "static" + }, + { + "kind": "function", + "name": "updateDownloadInfo", + "memberof": "AccountServices", + "longname": "AccountServices.updateDownloadInfo", + "scope": "static" + }, + { + "kind": "function", + "name": "isLoggedIn", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "AccountServices", + "longname": "AccountServices.isLoggedIn", + "scope": "static" + }, + { + "kind": "function", + "name": "checkAndSignalForAccessToken", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "AccountServices", + "longname": "AccountServices.checkAndSignalForAccessToken", + "scope": "static" + }, + { + "kind": "function", + "name": "logOut", + "memberof": "AccountServices", + "longname": "AccountServices.logOut", + "scope": "static" + }, + { + "kind": "function", + "name": "connected", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AccountServices", + "longname": "AccountServices.connected", + "scope": "static" + }, + { + "kind": "function", + "name": "disconnected", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "reason" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AccountServices", + "longname": "AccountServices.disconnected", + "scope": "static" + }, + { + "kind": "function", + "name": "myUsernameChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "username" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AccountServices", + "longname": "AccountServices.myUsernameChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "downloadInfoChanged", + "params": [ + { + "name": "info" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AccountServices", + "longname": "AccountServices.downloadInfoChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "findableByChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "discoverabilityMode" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AccountServices", + "longname": "AccountServices.findableByChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "loggedInChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "loggedIn" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AccountServices", + "longname": "AccountServices.loggedInChanged", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Audio API provides facilities to interact with audio inputs and outputs and to play sounds.", + "kind": "namespace", + "name": "Audio", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the audio input is muted, otherwise false.", + "name": "muted" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if noise reduction is enabled, otherwise false. When \r enabled, the input audio signal is blocked (fully attenuated) when it falls below an adaptive threshold set just \r above the noise floor.", + "name": "noiseReduction" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The loudness of the audio input, range 0.0 (no sound) – \r 1.0 (the onset of clipping). Read-only.", + "name": "inputLevel" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Adjusts the volume of the input audio; range 0.01.0. \r If set to a value, the resulting value depends on the input device: for example, the volume can't be changed on some \r devices, and others might only support values of 0.0 and 1.0.", + "name": "inputVolume" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the input audio is being used in stereo, otherwise \r false. Some devices do not support stereo, in which case the value is always false.", + "name": "isStereoInput" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The current context of the audio: either \"Desktop\" or \"HMD\".\r Read-only.", + "name": "context" + }, + { + "type": { + "names": [ + "object" + ] + }, + "description": "Read-only. Deprecated: This property is deprecated and will be\r removed.", + "name": "devices" + } + ], + "longname": "Audio", + "scope": "global" + }, + { + "kind": "function", + "name": "setInputDevice", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "device" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isHMD" + } + ], + "deprecated": "This function is deprecated and will be removed.", + "memberof": "Audio", + "longname": "Audio.setInputDevice", + "scope": "static" + }, + { + "kind": "function", + "name": "setOutputDevice", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "device" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isHMD" + } + ], + "deprecated": "This function is deprecated and will be removed.", + "memberof": "Audio", + "longname": "Audio.setOutputDevice", + "scope": "static" + }, + { + "description": "Enable or disable reverberation. Reverberation is done by the client, on the post-mix audio. The reverberation options \rcome from either the domain's audio zone if used — configured on the server — or as scripted by \r{@link Audio.setReverbOptions|setReverbOptions}.", + "kind": "function", + "name": "setReverb", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true to enable reverberation, false to disable.", + "name": "enable" + } + ], + "examples": [ + "Enable reverberation for a short while.\rvar sound = SoundCache.getSound(Script.resourcesPath() + \"sounds/sample.wav\");\rvar injector;\rvar injectorOptions = {\r position: MyAvatar.position\r};\r\rScript.setTimeout(function () {\r print(\"Reverb OFF\");\r Audio.setReverb(false);\r injector = Audio.playSound(sound, injectorOptions);\r}, 1000);\r\rScript.setTimeout(function () {\r var reverbOptions = new AudioEffectOptions();\r reverbOptions.roomSize = 100;\r Audio.setReverbOptions(reverbOptions);\r print(\"Reverb ON\");\r Audio.setReverb(true);\r}, 4000);\r\rScript.setTimeout(function () {\r print(\"Reverb OFF\");\r Audio.setReverb(false);\r}, 8000);" + ], + "memberof": "Audio", + "longname": "Audio.setReverb", + "scope": "static" + }, + { + "description": "Configure reverberation options. Use {@link Audio.setReverb|setReverb} to enable or disable reverberation.", + "kind": "function", + "name": "setReverbOptions", + "params": [ + { + "type": { + "names": [ + "AudioEffectOptions" + ] + }, + "description": "The reverberation options.", + "name": "options" + } + ], + "memberof": "Audio", + "longname": "Audio.setReverbOptions", + "scope": "static" + }, + { + "description": "Starts making an audio recording of the audio being played in-world (i.e., not local-only audio) to a file in WAV format.", + "kind": "function", + "name": "startRecording", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the file to make the recording in. Should have a .wav \r extension. The file is overwritten if it already exists.", + "name": "filename" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the specified file could be opened and audio recording has started, otherwise \r false." + } + ], + "examples": [ + "Make a 10 second audio recording.\rvar filename = File.getTempDir() + \"/audio.wav\";\rif (Audio.startRecording(filename)) {\r Script.setTimeout(function () {\r Audio.stopRecording();\r print(\"Audio recording made in: \" + filename);\r }, 10000);\r\r} else {\r print(\"Could not make an audio recording in: \" + filename);\r}" + ], + "memberof": "Audio", + "longname": "Audio.startRecording", + "scope": "static" + }, + { + "description": "Finish making an audio recording started with {@link Audio.startRecording|startRecording}.", + "kind": "function", + "name": "stopRecording", + "memberof": "Audio", + "longname": "Audio.stopRecording", + "scope": "static" + }, + { + "description": "Check whether an audio recording is currently being made.", + "kind": "function", + "name": "getRecording", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if an audio recording is currently being made, otherwise false." + } + ], + "memberof": "Audio", + "longname": "Audio.getRecording", + "scope": "static" + }, + { + "kind": "function", + "name": "nop", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "deprecated": "This signal is deprecated and will be removed.", + "memberof": "Audio", + "longname": "Audio.nop", + "scope": "static" + }, + { + "description": "Triggered when the audio input is muted or unmuted.", + "kind": "function", + "name": "mutedChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the audio input is muted, otherwise false.", + "name": "isMuted" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when audio input is muted or unmuted\rAudio.mutedChanged.connect(function (isMuted) {\r print(\"Audio muted: \" + isMuted);\r});" + ], + "memberof": "Audio", + "longname": "Audio.mutedChanged", + "scope": "static" + }, + { + "description": "Triggered when the audio input noise reduction is enabled or disabled.", + "kind": "function", + "name": "noiseReductionChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if audio input noise reduction is enabled, otherwise false.", + "name": "isEnabled" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.noiseReductionChanged", + "scope": "static" + }, + { + "description": "Triggered when the input audio volume changes.", + "kind": "function", + "name": "inputVolumeChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The requested volume to be applied to the audio input, range 0.0 – \r 1.0. The resulting value of Audio.inputVolume depends on the capabilities of the device: \r for example, the volume can't be changed on some devices, and others might only support values of 0.0 \r and 1.0.", + "name": "volume" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.inputVolumeChanged", + "scope": "static" + }, + { + "description": "Triggered when the input audio level changes.", + "kind": "function", + "name": "inputLevelChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The loudness of the input audio, range 0.0 (no sound) – 1.0 (the \r onset of clipping).", + "name": "level" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.inputLevelChanged", + "scope": "static" + }, + { + "description": "Triggered when the current context of the audio changes.", + "kind": "function", + "name": "contextChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The current context of the audio: either \"Desktop\" or \"HMD\".", + "name": "context" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.contextChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "onContextChanged", + "deprecated": "This function is deprecated and will be removed.", + "memberof": "Audio", + "longname": "Audio.onContextChanged", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Clipboard API enables you to export and import entities to and from JSON files.", + "kind": "namespace", + "name": "Clipboard", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "Clipboard", + "scope": "global" + }, + { + "description": "Compute the extents of the contents held in the clipboard.", + "kind": "function", + "name": "getContentsDimensions", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The extents of the contents held in the clipboard." + } + ], + "memberof": "Clipboard", + "longname": "Clipboard.getContentsDimensions", + "scope": "static" + }, + { + "description": "Compute the largest dimension of the extents of the contents held in the clipboard.", + "kind": "function", + "name": "getClipboardContentsLargestDimension", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The largest dimension computed." + } + ], + "memberof": "Clipboard", + "longname": "Clipboard.getClipboardContentsLargestDimension", + "scope": "static" + }, + { + "description": "Import entities from a JSON file containing entity data into the clipboard.\rYou can generate a JSON file using {@link Clipboard.exportEntities}.", + "kind": "function", + "name": "importEntities", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Path and name of file to import.", + "name": "filename" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the import was successful, otherwise false." + } + ], + "memberof": "Clipboard", + "longname": "Clipboard.importEntities", + "scope": "static" + }, + { + "description": "Export the entities specified to a JSON file.", + "kind": "function", + "name": "exportEntities", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Path and name of the file to export the entities to. Should have the extension \".json\".", + "name": "filename" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Array of IDs of the entities to export.", + "name": "entityIDs" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the export was successful, otherwise false." + } + ], + "memberof": "Clipboard", + "longname": "Clipboard.exportEntities", + "scope": "static" + }, + { + "description": "Export the entities with centers within a cube to a JSON file.", + "kind": "function", + "name": "exportEntities", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Path and name of the file to export the entities to. Should have the extension \".json\".", + "name": "filename" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "X-coordinate of the cube center.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Y-coordinate of the cube center.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Z-coordinate of the cube center.", + "name": "z" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Half dimension of the cube.", + "name": "scale" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the export was successful, otherwise false." + } + ], + "memberof": "Clipboard", + "longname": "Clipboard.exportEntities", + "scope": "static" + }, + { + "description": "Paste the contents of the clipboard into the world.", + "kind": "function", + "name": "pasteEntities", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Position to paste the clipboard contents at.", + "name": "position" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Array of entity IDs for the new entities that were created as a result of the paste operation." + } + ], + "memberof": "Clipboard", + "longname": "Clipboard.pasteEntities", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Controller API provides facilities to interact with computer and controller hardware.\r\r
Functions
\r\r

Properties

\r
    \r
  • {@link Controller.getActions|getActions}
  • \r
  • {@link Controller.getHardware|getHardware}
  • \r
  • {@link Controller.getStandard|getStandard}
  • \r
\r\r

Mappings

\r
    \r
  • {@link Controller.disableMapping|disableMapping}
  • \r
  • {@link Controller.enableMapping|enableMapping}
  • \r
  • {@link Controller.loadMapping|loadMapping}
  • \r
  • {@link Controller.newMapping|newMapping}
  • \r
  • {@link Controller.parseMapping|parseMapping}
  • \r
\r\r

Input, Hardware, and Action Reflection

\r
    \r
  • {@link Controller.findAction|findAction}
  • \r
  • {@link Controller.findDevice|findDevice}
  • \r
  • {@link Controller.getActionNames|getActionNames}
  • \r
  • {@link Controller.getAllActions|getAllActions}
  • \r
  • {@link Controller.getAvailableInputs|getAvailableInputs}
  • \r
  • {@link Controller.getDeviceName|getDeviceName}
  • \r
  • {@link Controller.getDeviceNames|getDeviceNames}
  • \r
\r\r

Input, Hardware, and Action Events

\r
    \r
  • {@link Controller.actionEvent|actionEvent}
  • \r
  • {@link Controller.hardwareChanged|hardwareChanged}
  • \r
  • {@link Controller.inputEvent|inputEvent}
  • \r
\r\r

Mouse, Keyboard, and Touch Events

\r
    \r
  • {@link Controller.keyPressEvent|keyPressEvent}
  • \r
  • {@link Controller.keyReleaseEvent|keyReleaseEvent}
  • \r
  • {@link Controller.mouseDoublePressEvent|mouseDoublePressEvent}
  • \r
  • {@link Controller.mouseMoveEvent|mouseMoveEvent}
  • \r
  • {@link Controller.mousePressEvent|mousePressEvent}
  • \r
  • {@link Controller.mouseReleaseEvent|mouseReleaseEvent}
  • \r
  • {@link Controller.touchBeginEvent|touchBeginEvent}
  • \r
  • {@link Controller.touchEndEvent|touchEndEvent}
  • \r
  • {@link Controller.touchUpdateEvent|touchUpdateEvent}
  • \r
  • {@link Controller.wheelEvent|wheelEvent}
  • \r
\r\r

Control Capturing

\r
    \r
  • {@link Controller.captureMouseEvents|captureMouseEvents}
  • \r
  • {@link Controller.captureTouchEvents|captureTouchEvents}
  • \r
  • {@link Controller.captureWheelEvents|captureWheelEvents}
  • \r
  • {@link Controller.releaseMouseEvents|releaseMouseEvents}
  • \r
  • {@link Controller.releaseTouchEvents|releaseTouchEvents}
  • \r
  • {@link Controller.releaseWheelEvents|releaseWheelEvents}
  • \r
\r\r

Action Capturing

\r
    \r
  • {@link Controller.captureActionEvents|captureActionEvents}
  • \r
  • {@link Controller.captureEntityClickEvents|captureEntityClickEvents}
  • \r
  • {@link Controller.captureJoystick|captureJoystick}
  • \r
  • {@link Controller.captureKeyEvents|captureKeyEvents}
  • \r
  • {@link Controller.releaseActionEvents|releaseActionEvents}
  • \r
  • {@link Controller.releaseEntityClickEvents|releaseEntityClickEvents}
  • \r
  • {@link Controller.releaseJoystick|releaseJoystick}
  • \r
  • {@link Controller.releaseKeyEvents|releaseKeyEvents}
  • \r
\r\r

Controller and Action Values

\r
    \r
  • {@link Controller.getValue|getValue}
  • \r
  • {@link Controller.getAxisValue|getAxisValue}
  • \r
  • {@link Controller.getPoseValue|getgetPoseValue}
  • \r
  • {@link Controller.getActionValue|getActionValue}
  • \r
\r\r

Haptics

\r
    \r
  • {@link Controller.triggerHapticPulse|triggerHapticPulse}
  • \r
  • {@link Controller.triggerHapticPulseOnDevice|triggerHapticPulseOnDevice}
  • \r
  • {@link Controller.triggerShortHapticPulse|triggerShortHapticPulse}
  • \r
  • {@link Controller.triggerShortHapticPulseOnDevice|triggerShortHapticPulseOnDevice}
  • \r
\r\r

Display Information

\r
    \r
  • {@link Controller.getViewportDimensions|getViewportDimensions}
  • \r
  • {@link Controller.getRecommendedHUDRect|getRecommendedHUDRect}
  • \r
\r\r

Virtual Game Pad

\r
    \r
  • {@link Controller.setVPadEnabled|setVPadEnabled}
  • \r
  • {@link Controller.setVPadHidden|setVPadHidden}
  • \r
  • {@link Controller.setVPadExtraBottomMargin|setVPadExtraBottomMargin}
  • \r
\r\r

Input Recordings

\r
    \r
  • {@link Controller.startInputRecording|startInputRecording}
  • \r
  • {@link Controller.stopInputRecording|stopInputRecording}
  • \r
  • {@link Controller.saveInputRecording|saveInputRecording}
  • \r
  • {@link Controller.getInputRecorderSaveDirectory|getInputRecorderSaveDirectory}
  • \r
  • {@link Controller.loadInputRecording|loadInputRecording}
  • \r
  • {@link Controller.startInputPlayback|startInputPlayback}
  • \r
  • {@link Controller.stopInputPlayback|stopInputPlayback}
  • \r
\r\r
Entity Methods:
\r\r

The default scripts implement hand controller actions that use {@link Entities.callEntityMethod} to call entity script \rmethods, if present in the entity being interacted with.

\r\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
Method NameDescriptionExample
startFarTrigger
continueFarTrigger
stopFarTrigger
These methods are called when a user is more than 0.3m away from the entity, the entity is triggerable, and the \r user starts, continues, or stops squeezing the trigger.A light switch that can be toggled on and off from a distance.
startNearTrigger
continueNearTrigger
stopNearTrigger
These methods are called when a user is less than 0.3m away from the entity, the entity is triggerable, and the \r user starts, continues, or stops squeezing the trigger.A doorbell that can be rung when a user is near.
startDistanceGrab
continueDistanceGrab
These methods are called when a user is more than 0.3m away from the entity, the entity is either cloneable, or\r grabbable and not locked, and the user starts or continues to squeeze the trigger.A comet that emits icy particle trails when a user is dragging it through the sky.
startNearGrab
continueNearGrab
These methods are called when a user is less than 0.3m away from the entity, the entity is either cloneable, or \r grabbable and not locked, and the user starts or continues to squeeze the trigger.A ball that glows when it's being held close.
releaseGrabThis method is called when a user releases the trigger when having been either distance or near grabbing an \r entity.Turn off the ball glow or comet trail with the user finishes grabbing it.
startEquip
continueEquip
releaseEquip
These methods are called when a user starts, continues, or stops equipping an entity.A glass that stays in the user's hand after the trigger is clicked.
\r

All the entity methods are called with the following two arguments:

\r
    \r
  • The entity ID.
  • \r
  • A string, \"hand,userID\" — where \"hand\" is \"left\" or \"right\", and \"userID\"\r is the user's {@link MyAvatar|MyAvatar.sessionUUID}.
  • \r
", + "kind": "namespace", + "name": "Controller", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "Controller.Actions" + ] + }, + "description": "Predefined actions on Interface and the user's avatar. These can be used as end\r points in a {@link RouteObject} mapping. A synonym for Controller.Hardware.Actions.\r Read-only.
\r Default mappings are provided from the Controller.Hardware.Keyboard and Controller.Standard to \r actions in \r \r keyboardMouse.json and \r \r standard.json, respectively.", + "name": "Actions" + }, + { + "type": { + "names": [ + "Controller.Hardware" + ] + }, + "description": "Standard and hardware-specific controller and computer outputs, plus predefined \r actions on Interface and the user's avatar. The outputs can be mapped to Actions or functions in a \r {@link RouteObject} mapping. Additionally, hardware-specific controller outputs can be mapped to Standard \r controller outputs. Read-only.", + "name": "Hardware" + }, + { + "type": { + "names": [ + "Controller.Standard" + ] + }, + "description": "Standard controller outputs that can be mapped to Actions or \r functions in a {@link RouteObject} mapping. Read-only.
\r Each hardware device has a mapping from its outputs to Controller.Standard items, specified in a JSON file. \r For example, \r leapmotion.json and \r vive.json.", + "name": "Standard" + } + ], + "longname": "Controller", + "scope": "global" + }, + { + "description": "Disable default Interface actions for a particular key event.", + "kind": "function", + "name": "captureKeyEvents", + "params": [ + { + "type": { + "names": [ + "KeyEvent" + ] + }, + "description": "Details of the key event to be captured. The key property must be specified. The \r text property is ignored. The other properties default to false.", + "name": "event" + } + ], + "examples": [ + "Disable left and right strafing.\rvar STRAFE_LEFT = { \"key\": 16777234, isShifted: true };\rvar STRAFE_RIGHT = { \"key\": 16777236, isShifted: true };\r\rController.captureKeyEvents(STRAFE_LEFT);\rController.captureKeyEvents(STRAFE_RIGHT);\r\rScript.scriptEnding.connect(function () {\r Controller.releaseKeyEvents(STRAFE_LEFT);\r Controller.releaseKeyEvents(STRAFE_RIGHT);\r});" + ], + "memberof": "Controller", + "longname": "Controller.captureKeyEvents", + "scope": "static" + }, + { + "description": "Re-enable default Interface actions for a particular key event that has been disabled using \r{@link Controller.captureKeyEvents|captureKeyEvents}.", + "kind": "function", + "name": "releaseKeyEvents", + "params": [ + { + "type": { + "names": [ + "KeyEvent" + ] + }, + "description": "Details of the key event to release from capture. The key property must be \r specified. The text property is ignored. The other properties default to false.", + "name": "event" + } + ], + "memberof": "Controller", + "longname": "Controller.releaseKeyEvents", + "scope": "static" + }, + { + "description": "Disable default Interface actions for a joystick.", + "kind": "function", + "name": "captureJoystick", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer ID of the joystick.", + "name": "joystickID" + } + ], + "deprecated": "This function no longer has any effect.", + "memberof": "Controller", + "longname": "Controller.captureJoystick", + "scope": "static" + }, + { + "description": "Re-enable default Interface actions for a joystick that has been disabled using \r{@link Controller.captureJoystick|captureJoystick}.", + "kind": "function", + "name": "releaseJoystick", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer ID of the joystick.", + "name": "joystickID" + } + ], + "deprecated": "This function no longer has any effect.", + "memberof": "Controller", + "longname": "Controller.releaseJoystick", + "scope": "static" + }, + { + "description": "Disable {@link Entities.mousePressOnEntity} and {@link Entities.mouseDoublePressOnEntity} events on entities.", + "kind": "function", + "name": "captureEntityClickEvents", + "examples": [ + "Disable entity click events for a short period.\rEntities.mousePressOnEntity.connect(function (entityID, event) {\r print(\"Clicked on entity: \" + entityID);\r});\r\rScript.setTimeout(function () {\r Controller.captureEntityClickEvents();\r}, 5000);\r\rScript.setTimeout(function () {\r Controller.releaseEntityClickEvents();\r}, 10000);" + ], + "memberof": "Controller", + "longname": "Controller.captureEntityClickEvents", + "scope": "static" + }, + { + "description": "Re-enable {@link Entities.mousePressOnEntity} and {@link Entities.mouseDoublePressOnEntity} events on entities that were \rdisabled using {@link Controller.captureEntityClickEvents|captureEntityClickEvents}.", + "kind": "function", + "name": "releaseEntityClickEvents", + "memberof": "Controller", + "longname": "Controller.releaseEntityClickEvents", + "scope": "static" + }, + { + "description": "Get the dimensions of the Interface window's interior if in desktop mode or the HUD surface if in HMD mode.", + "kind": "function", + "name": "getViewportDimensions", + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The dimensions of the Interface window interior if in desktop mode or HUD surface if in HMD mode." + } + ], + "memberof": "Controller", + "longname": "Controller.getViewportDimensions", + "scope": "static" + }, + { + "description": "Get the recommended area to position UI on the HUD surface if in HMD mode or Interface's window interior if in desktop \rmode.", + "kind": "function", + "name": "getRecommendedHUDRect", + "returns": [ + { + "type": { + "names": [ + "Rect" + ] + }, + "description": "The recommended area in which to position UI." + } + ], + "memberof": "Controller", + "longname": "Controller.getRecommendedHUDRect", + "scope": "static" + }, + { + "description": "Enables or disables the virtual game pad that is displayed on certain devices (e.g., Android).", + "kind": "function", + "name": "setVPadEnabled", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true then the virtual game pad doesn't work, otherwise it does work provided \r that it is not hidden by {@link Controller.setVPadHidden|setVPadHidden}.", + "name": "enable" + } + ], + "memberof": "Controller", + "longname": "Controller.setVPadEnabled", + "scope": "static" + }, + { + "description": "Shows or hides the virtual game pad that is displayed on certain devices (e.g., Android).", + "kind": "function", + "name": "setVPadHidden", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true then the virtual game pad is hidden, otherwise it is shown.", + "name": "hidden" + } + ], + "memberof": "Controller", + "longname": "Controller.setVPadHidden", + "scope": "static" + }, + { + "description": "Sets the amount of extra margin between the virtual game pad that is displayed on certain devices (e.g., Android) and \rthe bottom of the display.", + "kind": "function", + "name": "setVPadExtraBottomMargin", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer number of pixels in the extra margin.", + "name": "margin" + } + ], + "memberof": "Controller", + "longname": "Controller.setVPadExtraBottomMargin", + "scope": "static" + }, + { + "description": "Triggered when a keyboard key is pressed.", + "kind": "function", + "name": "keyPressEvent", + "params": [ + { + "type": { + "names": [ + "KeyEvent" + ] + }, + "description": "Details of the key press.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report the KeyEvent details for each key press.\rController.keyPressEvent.connect(function (event) {\r print(JSON.stringify(event));\r});" + ], + "memberof": "Controller", + "longname": "Controller.keyPressEvent", + "scope": "static" + }, + { + "description": "Triggered when a keyboard key is released from being pressed.", + "kind": "function", + "name": "keyReleaseEvent", + "params": [ + { + "type": { + "names": [ + "KeyEvent" + ] + }, + "description": "Details of the key release.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Controller", + "longname": "Controller.keyReleaseEvent", + "scope": "static" + }, + { + "description": "Triggered when the mouse moves.", + "kind": "function", + "name": "mouseMoveEvent", + "params": [ + { + "type": { + "names": [ + "MouseEvent" + ] + }, + "description": "Details of the mouse movement.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report the MouseEvent details for each mouse move.\rController.mouseMoveEvent.connect(function (event) {\r print(JSON.stringify(event));\r});" + ], + "memberof": "Controller", + "longname": "Controller.mouseMoveEvent", + "scope": "static" + }, + { + "description": "Triggered when a mouse button is pressed.", + "kind": "function", + "name": "mousePressEvent", + "params": [ + { + "type": { + "names": [ + "MouseEvent" + ] + }, + "description": "Details of the button press.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Controller", + "longname": "Controller.mousePressEvent", + "scope": "static" + }, + { + "description": "Triggered when a mouse button is double-pressed.", + "kind": "function", + "name": "mouseDoublePressEvent", + "params": [ + { + "type": { + "names": [ + "MouseEvent" + ] + }, + "description": "Details of the button double-press.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Controller", + "longname": "Controller.mouseDoublePressEvent", + "scope": "static" + }, + { + "description": "Triggered when a mouse button is released from being pressed.", + "kind": "function", + "name": "mouseReleaseEvent", + "params": [ + { + "type": { + "names": [ + "MouseEvent" + ] + }, + "description": "Details of the button release.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Controller", + "longname": "Controller.mouseReleaseEvent", + "scope": "static" + }, + { + "description": "Triggered when a touch event starts in the Interface window on a touch-enabled display or device.", + "kind": "function", + "name": "touchBeginEvent", + "params": [ + { + "type": { + "names": [ + "TouchEvent" + ] + }, + "description": "Details of the touch begin.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report the TouchEvent details when a touch event starts.\rController.touchBeginEvent.connect(function (event) {\r print(JSON.stringify(event));\r});" + ], + "memberof": "Controller", + "longname": "Controller.touchBeginEvent", + "scope": "static" + }, + { + "description": "Triggered when a touch event ends in the Interface window on a touch-enabled display or device.", + "kind": "function", + "name": "touchEndEvent", + "params": [ + { + "type": { + "names": [ + "TouchEvent" + ] + }, + "description": "Details of the touch end.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Controller", + "longname": "Controller.touchEndEvent", + "scope": "static" + }, + { + "description": "Triggered when a touch event update occurs in the Interface window on a touch-enabled display or device.", + "kind": "function", + "name": "touchUpdateEvent", + "params": [ + { + "type": { + "names": [ + "TouchEvent" + ] + }, + "description": "Details of the touch update.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Controller", + "longname": "Controller.touchUpdateEvent", + "scope": "static" + }, + { + "description": "Triggered when the mouse wheel is rotated.", + "kind": "function", + "name": "wheelEvent", + "params": [ + { + "type": { + "names": [ + "WheelEvent" + ] + }, + "description": "Details of the wheel movement.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report the WheelEvent details for each wheel rotation.\rController.wheelEvent.connect(function (event) {\r print(JSON.stringify(event));\r});\r\n " + ], + "memberof": "Controller", + "longname": "Controller.wheelEvent", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Desktop", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "width" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "height" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "InteractiveWindow flag for always showing a window on top", + "name": "ALWAYS_ON_TOP" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "InteractiveWindow flag for hiding the window instead of closing on window close by user", + "name": "CLOSE_BUTTON_HIDES" + } + ], + "longname": "Desktop", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The GooglePoly API allows you to interact with Google Poly models direct from inside High Fidelity.", + "kind": "namespace", + "name": "GooglePoly", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "GooglePoly", + "scope": "global" + }, + { + "kind": "function", + "name": "setAPIKey", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "key" + } + ], + "memberof": "GooglePoly", + "longname": "GooglePoly.setAPIKey", + "scope": "static" + }, + { + "kind": "function", + "name": "getAssetList", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "keyword" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "category" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "format" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "GooglePoly", + "longname": "GooglePoly.getAssetList", + "scope": "static" + }, + { + "kind": "function", + "name": "getFBX", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "keyword" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "category" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "GooglePoly", + "longname": "GooglePoly.getFBX", + "scope": "static" + }, + { + "kind": "function", + "name": "getOBJ", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "keyword" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "category" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "GooglePoly", + "longname": "GooglePoly.getOBJ", + "scope": "static" + }, + { + "kind": "function", + "name": "getBlocks", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "keyword" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "category" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "GooglePoly", + "longname": "GooglePoly.getBlocks", + "scope": "static" + }, + { + "kind": "function", + "name": "getGLTF", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "keyword" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "category" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "GooglePoly", + "longname": "GooglePoly.getGLTF", + "scope": "static" + }, + { + "kind": "function", + "name": "getGLTF2", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "keyword" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "category" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "GooglePoly", + "longname": "GooglePoly.getGLTF2", + "scope": "static" + }, + { + "kind": "function", + "name": "getTilt", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "keyword" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "category" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "GooglePoly", + "longname": "GooglePoly.getTilt", + "scope": "static" + }, + { + "kind": "function", + "name": "getModelInfo", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "input" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "GooglePoly", + "longname": "GooglePoly.getModelInfo", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The HMD API provides access to the HMD used in VR display mode.", + "kind": "namespace", + "name": "HMD", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the HMD if currently in VR display mode, otherwise\r {@link Vec3(0)|Vec3.ZERO}. Read-only.", + "name": "position" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the HMD if currently in VR display mode, otherwise \r {@link Quat(0)|Quat.IDENTITY}. Read-only.", + "name": "orientation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the display mode is HMD, otherwise false. Read-only.", + "name": "active" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if currently in VR display mode and the HMD is being worn, otherwise\r false. Read-only.", + "name": "mounted" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The real-world height of the user. Read-only. Currently always returns a\r value of 1.755.", + "name": "playerHeight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The real-world height of the user's eyes. Read-only. Currently always returns a\r value of 1.655.", + "name": "eyeHeight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The inter-pupillary distance (distance between eyes) of the user, used for rendering. Defaults to\r the human average of 0.064 unless set by the HMD. Read-only.", + "name": "ipd" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "1.0", + "description": "A scale factor applied to the ipd property value.", + "name": "ipdScale" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the tablet is being displayed, false otherwise.\r Read-only.", + "name": "showTablet" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the tablet has been opened in contextual mode, otherwise \r false. In contextual mode, the tablet has been opened at a specific world position and orientation rather \r than at a position and orientation relative to the user. Read-only.", + "name": "tabletContextualMode" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the tablet body model overlay.", + "name": "tabletID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the tablet's screen overlay.", + "name": "tabletScreenID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the tablet's \"home\" button overlay.", + "name": "homeButtonID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the tablet's \"home\" button highlight overlay.", + "name": "homeButtonHighlightID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the mini tablet's body model overlay. null if not in HMD mode.", + "name": "miniTabletID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the mini tablet's screen overlay. null if not in HMD mode.", + "name": "miniTabletScreenID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The hand that the mini tablet is displayed on: 0 for left hand, \r 1 for right hand, -1 if not in HMD mode.", + "name": "miniTabletHand" + }, + { + "type": { + "names": [ + "Rect" + ] + }, + "defaultvalue": "0,0,0,0", + "description": "The size and position of the HMD play area in sensor coordinates. Read-only.", + "name": "playArea" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "defaultvalue": "[]", + "description": "The positions of the VR system sensors in sensor coordinates. Read-only.", + "name": "sensorPositions" + } + ], + "longname": "HMD", + "scope": "global" + }, + { + "description": "Calculate the intersection of a ray with the HUD overlay.", + "kind": "function", + "name": "calculateRayUICollisionPoint", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The origin of the ray.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The direction of the ray.", + "name": "direction" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point of intersection with the HUD overlay if it intersects, otherwise {@link Vec3(0)|Vec3.ZERO}." + } + ], + "examples": [ + "Draw a square on the HUD overlay in the direction you're looking.\rvar hudIntersection = HMD.calculateRayUICollisionPoint(MyAvatar.getHeadPosition(),\r Quat.getForward(MyAvatar.headOrientation));\rvar hudPoint = HMD.overlayFromWorldPoint(hudIntersection);\r\rvar DIMENSIONS = { x: 50, y: 50 };\rvar square = Overlays.addOverlay(\"rectangle\", {\r x: hudPoint.x - DIMENSIONS.x / 2,\r y: hudPoint.y - DIMENSIONS.y / 2,\r width: DIMENSIONS.x,\r height: DIMENSIONS.y,\r color: { red: 255, green: 0, blue: 0 }\r});\r\rScript.scriptEnding.connect(function () {\r Overlays.deleteOverlay(square);\r});" + ], + "memberof": "HMD", + "longname": "HMD.calculateRayUICollisionPoint", + "scope": "static" + }, + { + "description": "Get the 2D HUD overlay coordinates of a 3D point on the HUD overlay.\r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.", + "kind": "function", + "name": "overlayFromWorldPoint", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point on the HUD overlay in world coordinates.", + "name": "position" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The point on the HUD overlay in HUD coordinates." + } + ], + "examples": [ + "Draw a square on the HUD overlay in the direction you're looking.\rvar hudIntersection = HMD.calculateRayUICollisionPoint(MyAvatar.getHeadPosition(),\r Quat.getForward(MyAvatar.headOrientation));\rvar hudPoint = HMD.overlayFromWorldPoint(hudIntersection);\r\rvar DIMENSIONS = { x: 50, y: 50 };\rvar square = Overlays.addOverlay(\"rectangle\", {\r x: hudPoint.x - DIMENSIONS.x / 2,\r y: hudPoint.y - DIMENSIONS.y / 2,\r width: DIMENSIONS.x,\r height: DIMENSIONS.y,\r color: { red: 255, green: 0, blue: 0 }\r});\r\rScript.scriptEnding.connect(function () {\r Overlays.deleteOverlay(square);\r});" + ], + "memberof": "HMD", + "longname": "HMD.overlayFromWorldPoint", + "scope": "static" + }, + { + "description": "Get the 3D world coordinates of a 2D point on the HUD overlay.\r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.", + "kind": "function", + "name": "worldPointFromOverlay", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The point on the HUD overlay in HUD coordinates.", + "name": "coordinates" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point on the HUD overlay in world coordinates." + } + ], + "memberof": "HMD", + "longname": "HMD.worldPointFromOverlay", + "scope": "static" + }, + { + "description": "Get the 2D point on the HUD overlay represented by given spherical coordinates. \r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.\rSpherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD \roverlay.", + "kind": "function", + "name": "sphericalToOverlay", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The point on the HUD overlay in spherical coordinates.", + "name": "sphericalPos" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The point on the HUD overlay in HUD coordinates." + } + ], + "memberof": "HMD", + "longname": "HMD.sphericalToOverlay", + "scope": "static" + }, + { + "description": "Get the spherical coordinates of a 2D point on the HUD overlay.\r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.\rSpherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD\roverlay.", + "kind": "function", + "name": "overlayToSpherical", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The point on the HUD overlay in HUD coordinates.", + "name": "overlayPos" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The point on the HUD overlay in spherical coordinates." + } + ], + "memberof": "HMD", + "longname": "HMD.overlayToSpherical", + "scope": "static" + }, + { + "description": "Recenter the HMD HUD to the current HMD position and orientation.", + "kind": "function", + "name": "centerUI", + "memberof": "HMD", + "longname": "HMD.centerUI", + "scope": "static" + }, + { + "description": "Get the name of the HMD audio input device.", + "kind": "function", + "name": "preferredAudioInput", + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the HMD audio input device if in HMD mode, otherwise an empty string." + } + ], + "memberof": "HMD", + "longname": "HMD.preferredAudioInput", + "scope": "static" + }, + { + "description": "Get the name of the HMD audio output device.", + "kind": "function", + "name": "preferredAudioOutput", + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the HMD audio output device if in HMD mode, otherwise an empty string." + } + ], + "memberof": "HMD", + "longname": "HMD.preferredAudioOutput", + "scope": "static" + }, + { + "description": "Check whether there is an HMD available.", + "kind": "function", + "name": "isHMDAvailable", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The name of the HMD to check for, e.g., \"Oculus Rift\". The name is the same as \r may be displayed in Interface's \"Display\" menu. If no name is specified then any HMD matches.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if an HMD of the specified name is available, otherwise \r false." + } + ], + "examples": [ + "Report on HMD availability.\rprint(\"Is any HMD available: \" + HMD.isHMDAvailable());\rprint(\"Is an Oculus Rift HMD available: \" + HMD.isHMDAvailable(\"Oculus Rift\"));\rprint(\"Is a Vive HMD available: \" + HMD.isHMDAvailable(\"OpenVR (Vive)\"));" + ], + "memberof": "HMD", + "longname": "HMD.isHMDAvailable", + "scope": "static" + }, + { + "description": "Check whether there is an HMD head controller available.", + "kind": "function", + "name": "isHeadControllerAvailable", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The name of the HMD head controller to check for, e.g., \"Oculus\". If no name is \r specified then any HMD head controller matches.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if an HMD head controller of the specified name is available, \r otherwise false." + } + ], + "examples": [ + "Report HMD head controller availability.\rprint(\"Is any HMD head controller available: \" + HMD.isHeadControllerAvailable());\rprint(\"Is an Oculus head controller available: \" + HMD.isHeadControllerAvailable(\"Oculus\"));\rprint(\"Is a Vive head controller available: \" + HMD.isHeadControllerAvailable(\"OpenVR\"));" + ], + "memberof": "HMD", + "longname": "HMD.isHeadControllerAvailable", + "scope": "static" + }, + { + "description": "Check whether there are HMD hand controllers available.", + "kind": "function", + "name": "isHandControllerAvailable", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The name of the HMD hand controller to check for, e.g., \"Oculus\". If no name is \r specified then any HMD hand controller matches.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if an HMD hand controller of the specified name is available, \r otherwise false." + } + ], + "examples": [ + "Report HMD hand controller availability.\rprint(\"Are any HMD hand controllers available: \" + HMD.isHandControllerAvailable());\rprint(\"Are Oculus hand controllers available: \" + HMD.isHandControllerAvailable(\"Oculus\"));\rprint(\"Are Vive hand controllers available: \" + HMD.isHandControllerAvailable(\"OpenVR\"));" + ], + "memberof": "HMD", + "longname": "HMD.isHandControllerAvailable", + "scope": "static" + }, + { + "description": "Check whether there are specific HMD controllers available.", + "kind": "function", + "name": "isSubdeviceContainingNameAvailable", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the HMD controller to check for, e.g., \"OculusTouch\".", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if an HMD controller with a name containing the specified name is \r available, otherwise false." + } + ], + "examples": [ + "Report if particular Oculus controllers are available.\rprint(\"Is an Oculus Touch controller available: \" + HMD.isSubdeviceContainingNameAvailable(\"Touch\"));\rprint(\"Is an Oculus Remote controller available: \" + HMD.isSubdeviceContainingNameAvailable(\"Remote\"));" + ], + "memberof": "HMD", + "longname": "HMD.isSubdeviceContainingNameAvailable", + "scope": "static" + }, + { + "description": "Signal that models of the HMD hand controllers being used should be displayed. The models are displayed at their actual, \rreal-world locations.", + "kind": "function", + "name": "requestShowHandControllers", + "examples": [ + "Show your hand controllers for 10 seconds.\rHMD.requestShowHandControllers();\rScript.setTimeout(function () {\r HMD.requestHideHandControllers();\r}, 10000);" + ], + "memberof": "HMD", + "longname": "HMD.requestShowHandControllers", + "scope": "static" + }, + { + "description": "Signal that it is no longer necessary to display models of the HMD hand controllers being used. If no other scripts \rwant the models displayed then they are no longer displayed.", + "kind": "function", + "name": "requestHideHandControllers", + "memberof": "HMD", + "longname": "HMD.requestHideHandControllers", + "scope": "static" + }, + { + "description": "Check whether any script wants models of the HMD hand controllers displayed. Requests are made and canceled using \r{@link HMD.requestShowHandControllers|requestShowHandControllers} and \r{@link HMD.requestHideHandControllers|requestHideHandControllers}.", + "kind": "function", + "name": "shouldShowHandControllers", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if any script is requesting that HMD hand controller models be displayed." + } + ], + "memberof": "HMD", + "longname": "HMD.shouldShowHandControllers", + "scope": "static" + }, + { + "description": "Causes the borders in HUD windows to be enlarged when the laser intersects them in HMD mode. By default, borders are not \renlarged.", + "kind": "function", + "name": "activateHMDHandMouse", + "memberof": "HMD", + "longname": "HMD.activateHMDHandMouse", + "scope": "static" + }, + { + "description": "Causes the border in HUD windows to no longer be enlarged when the laser intersects them in HMD mode. By default, \rborders are not enlarged.", + "kind": "function", + "name": "deactivateHMDHandMouse", + "memberof": "HMD", + "longname": "HMD.deactivateHMDHandMouse", + "scope": "static" + }, + { + "description": "Suppress the activation of the HMD-provided keyboard, if any. Successful calls should be balanced with a call to \r{@link HMD.unspressKeyboard|unspressKeyboard} within a reasonable amount of time.", + "kind": "function", + "name": "suppressKeyboard", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the current HMD provides a keyboard and it was successfully suppressed (e.g., it \risn't being displayed), otherwise false." + } + ], + "memberof": "HMD", + "longname": "HMD.suppressKeyboard", + "scope": "static" + }, + { + "description": "Unsuppress the activation of the HMD-provided keyboard, if any.", + "kind": "function", + "name": "unsuppressKeyboard", + "memberof": "HMD", + "longname": "HMD.unsuppressKeyboard", + "scope": "static" + }, + { + "description": "Check whether the HMD-provided keyboard, if any, is visible.", + "kind": "function", + "name": "isKeyboardVisible", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the current HMD provides a keyboard and it is visible, otherwise \rfalse." + } + ], + "memberof": "HMD", + "longname": "HMD.isKeyboardVisible", + "scope": "static" + }, + { + "description": "Closes the tablet if it is open.", + "kind": "function", + "name": "closeTablet", + "memberof": "HMD", + "longname": "HMD.closeTablet", + "scope": "static" + }, + { + "description": "Opens the tablet if the tablet is used in the current display mode and it isn't already showing, and sets the tablet to \rcontextual mode if requested. In contextual mode, the page displayed on the tablet is wholly controlled by script (i.e., \rthe user cannot navigate to another).", + "kind": "function", + "name": "openTablet", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true then the tablet is opened at a specific position and \r orientation already set by the script, otherwise it opens at a position and orientation relative to the user. For \r contextual mode, set the world or local position and orientation of the HMD.tabletID overlay.", + "name": "contextualMode" + } + ], + "memberof": "HMD", + "longname": "HMD.openTablet", + "scope": "static" + }, + { + "description": "Triggered when a request to show or hide models of the HMD hand controllers is made using \r{@link HMD.requestShowHandControllers|requestShowHandControllers} or\r{@link HMD.requestHideHandControllers|requestHideHandControllers}.", + "kind": "function", + "name": "shouldShowHandControllersChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when showing of hand controllers changes.\rfunction onShouldShowHandControllersChanged() {\r print(\"Should show hand controllers: \" + HMD.shouldShowHandControllers());\r}\rHMD.shouldShowHandControllersChanged.connect(onShouldShowHandControllersChanged);\r\rHMD.requestShowHandControllers();\rScript.setTimeout(function () {\r HMD.requestHideHandControllers();\r}, 10000);\r\n " + ], + "memberof": "HMD", + "longname": "HMD.shouldShowHandControllersChanged", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Menu API provides access to the menu that is displayed at the top of the window\ron a user's desktop and in the tablet when the \"MENU\" button is pressed.\r\r

\r\r

Groupings

\r\rA \"grouping\" provides a way to group a set of menus or menu items together so \rthat they can all be set visible or invisible as a group. \rThere are two available groups: \"Advanced\" and \"Developer\".\rThese groupings can be toggled in the \"Settings\" menu.\rIf a menu item doesn't belong to a group it is always displayed.", + "kind": "namespace", + "name": "Menu", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "Menu", + "scope": "global" + }, + { + "description": "Add a new top-level menu.", + "kind": "function", + "name": "addMenu", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name that will be displayed for the menu. Nested menus can be described using the \">\" symbol.", + "name": "menuName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "Name of the grouping, if any, to add this menu to.", + "name": "grouping" + } + ], + "examples": [ + "Add a menu and a nested submenu.\rMenu.addMenu(\"Test Menu\");\rMenu.addMenu(\"Test Menu > Test Sub Menu\");", + "Add a menu to the Settings menu that is only visible if Settings > Advanced is enabled.\rMenu.addMenu(\"Settings > Test Grouping Menu\", \"Advanced\");" + ], + "memberof": "Menu", + "longname": "Menu.addMenu", + "scope": "static" + }, + { + "description": "Remove a top-level menu.", + "kind": "function", + "name": "removeMenu", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu to remove.", + "name": "menuName" + } + ], + "examples": [ + "Remove a menu and nested submenu.\rMenu.removeMenu(\"Test Menu > Test Sub Menu\");\rMenu.removeMenu(\"Test Menu\");" + ], + "memberof": "Menu", + "longname": "Menu.removeMenu", + "scope": "static" + }, + { + "description": "Check whether a top-level menu exists.", + "kind": "function", + "name": "menuExists", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu to check for existence.", + "name": "menuName" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the menu exists, otherwise false." + } + ], + "examples": [ + "Check if the \"Developer\" menu exists.\rif (Menu.menuExists(\"Developer\")) {\r print(\"Developer menu exists.\");\r}" + ], + "memberof": "Menu", + "longname": "Menu.menuExists", + "scope": "static" + }, + { + "description": "Add a separator with an unclickable label below it. The separator will be placed at the bottom of the menu.\rIf you want to add a separator at a specific point in the menu, use {@link Menu.addMenuItem} with\r{@link Menu.MenuItemProperties} instead.", + "kind": "function", + "name": "addSeparator", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu to add a separator to.", + "name": "menuName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the separator that will be displayed as the label below the separator line.", + "name": "separatorName" + } + ], + "examples": [ + "Add a separator.\rMenu.addSeparator(\"Developer\",\"Test Separator\");" + ], + "memberof": "Menu", + "longname": "Menu.addSeparator", + "scope": "static" + }, + { + "description": "Remove a separator from a menu.", + "kind": "function", + "name": "removeSeparator", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu to remove the separator from.", + "name": "menuName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the separator to remove.", + "name": "separatorName" + } + ], + "examples": [ + "Remove a separator.\rMenu.removeSeparator(\"Developer\",\"Test Separator\");" + ], + "memberof": "Menu", + "longname": "Menu.removeSeparator", + "scope": "static" + }, + { + "description": "Add a new menu item to a menu.", + "kind": "function", + "name": "addMenuItem", + "params": [ + { + "type": { + "names": [ + "Menu.MenuItemProperties" + ] + }, + "description": "Properties of the menu item to create.", + "name": "properties" + } + ], + "examples": [ + "Add a menu item using {@link Menu.MenuItemProperties}.\rMenu.addMenuItem({\r menuName: \"Developer\",\r menuItemName: \"Test\",\r afterItem: \"Log\",\r shortcutKey: \"Ctrl+Shift+T\",\r grouping: \"Advanced\"\r});" + ], + "memberof": "Menu", + "longname": "Menu.addMenuItem", + "scope": "static" + }, + { + "description": "Add a new menu item to a menu. The new item is added at the end of the menu.", + "kind": "function", + "name": "addMenuItem", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu to add a menu item to.", + "name": "menuName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu item. This is what will be displayed in the menu.", + "name": "menuItem" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "A shortcut key that can be used to trigger the menu item.", + "name": "shortcutKey" + } + ], + "examples": [ + "Add a menu item to the end of the \"Developer\" menu.\rMenu.addMenuItem(\"Developer\", \"Test\", \"Ctrl+Shift+T\");" + ], + "memberof": "Menu", + "longname": "Menu.addMenuItem", + "scope": "static" + }, + { + "description": "Remove a menu item from a menu.", + "kind": "function", + "name": "removeMenuItem", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu to remove a menu item from.", + "name": "menuName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu item to remove.\rMenu.removeMenuItem(\"Developer\", \"Test\");", + "name": "menuItem" + } + ], + "memberof": "Menu", + "longname": "Menu.removeMenuItem", + "scope": "static" + }, + { + "description": "Check if a menu item exists.", + "kind": "function", + "name": "menuItemExists", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu that the menu item is in.", + "name": "menuName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu item to check for existence of.", + "name": "menuItem" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the menu item exists, otherwise false." + } + ], + "examples": [ + "Determine if the Developer > Stats menu exists.\rif (Menu.menuItemExists(\"Developer\", \"Stats\")) {\r print(\"Developer > Stats menu item exists.\");\r}" + ], + "memberof": "Menu", + "longname": "Menu.menuItemExists", + "scope": "static" + }, + { + "description": "Check whether a checkable menu item is checked.", + "kind": "function", + "name": "isOptionChecked", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the menu item.", + "name": "menuOption" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the option is checked, otherwise false." + } + ], + "examples": [ + "Report whether the Settings > Advanced menu item is turned on.\rprint(Menu.isOptionChecked(\"Advanced Menus\")); // true or false" + ], + "memberof": "Menu", + "longname": "Menu.isOptionChecked", + "scope": "static" + }, + { + "description": "Set a checkable menu item as checked or unchecked.", + "kind": "function", + "name": "setIsOptionChecked", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the menu item to modify.", + "name": "menuOption" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true, the menu item will be checked, otherwise it will not be checked.", + "name": "isChecked" + } + ], + "examples": [ + "Turn on Settings > Advanced Menus.\rMenu.setIsOptionChecked(\"Advanced Menus\", true);\rprint(Menu.isOptionChecked(\"Advanced Menus\")); // true" + ], + "memberof": "Menu", + "longname": "Menu.setIsOptionChecked", + "scope": "static" + }, + { + "description": "Trigger the menu item as if the user clicked on it.", + "kind": "function", + "name": "triggerOption", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the menu item to trigger.", + "name": "menuOption" + } + ], + "examples": [ + "Open the help window.\rMenu.triggerOption('Help...');" + ], + "memberof": "Menu", + "longname": "Menu.triggerOption", + "scope": "static" + }, + { + "description": "Check whether a menu or menu item is enabled. If disabled, the item is grayed out and unusable.\rMenus are enabled by default.", + "kind": "function", + "name": "isMenuEnabled", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the menu or menu item to check.", + "name": "menuName" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the menu is enabled, otherwise false." + } + ], + "examples": [ + "Report with the Settings > Advanced Menus menu item is enabled.\rprint(Menu.isMenuEnabled(\"Settings > Advanced Menus\")); // true or false" + ], + "memberof": "Menu", + "longname": "Menu.isMenuEnabled", + "scope": "static" + }, + { + "description": "Set a menu or menu item to be enabled or disabled. If disabled, the item is grayed out and unusable.", + "kind": "function", + "name": "setMenuEnabled", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the menu or menu item to modify.", + "name": "menuName" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true, the menu will be enabled, otherwise it will be disabled.", + "name": "isEnabled" + } + ], + "examples": [ + "Disable the Settings > Advanced Menus menu item.\rMenu.setMenuEnabled(\"Settings > Advanced Menus\", false);\rprint(Menu.isMenuEnabled(\"Settings > Advanced Menus\")); // false" + ], + "memberof": "Menu", + "longname": "Menu.setMenuEnabled", + "scope": "static" + }, + { + "description": "Triggered when a menu item is clicked (or triggered by {@link Menu.triggerOption}).", + "kind": "function", + "name": "menuItemEvent", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu item that was clicked.", + "name": "menuItem" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Detect menu item events.\rfunction onMenuItemEvent(menuItem) {\r print(\"You clicked on \" + menuItem);\r}\r\rMenu.menuItemEvent.connect(onMenuItemEvent);\r\n " + ], + "memberof": "Menu", + "longname": "Menu.menuItemEvent", + "scope": "static" + }, + { + "description": "\r \r \r \r \r \r \r \r \r
ValueDescription
\"avatar\"
\"entity\"
\"overlay\"
", + "kind": "typedef", + "name": "ItemType", + "type": { + "names": [ + "string" + ] + }, + "memberof": "Selection", + "longname": "Selection.ItemType", + "scope": "static" + }, + { + "kind": "typedef", + "name": "SelectedItemsList", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The IDs of the avatars in the selection.", + "name": "avatars" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The IDs of the entities in the selection.", + "name": "entities" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The IDs of the overlays in the selection.", + "name": "overlays" + } + ], + "memberof": "Selection", + "longname": "Selection.SelectedItemsList", + "scope": "static" + }, + { + "kind": "typedef", + "name": "HighlightStyle", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Color" + ] + }, + "description": "Color of the specified highlight region.", + "name": "outlineUnoccludedColor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "\"\"", + "name": "outlineOccludedColor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "\"\"", + "name": "fillUnoccludedColor-" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "\"\"", + "name": "fillOccludedColor-" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Alpha value ranging from 0.0 (not visible) to 1.0 \r (fully opaque) for the specified highlight region.", + "name": "outlineUnoccludedAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "\"\"", + "name": "outlineOccludedAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "\"\"", + "name": "fillUnoccludedAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "\"\"", + "name": "fillOccludedAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Width of the outline, in pixels.", + "name": "outlineWidth" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true to enable outline smooth fall-off.", + "name": "isOutlineSmooth" + } + ], + "memberof": "Selection", + "longname": "Selection.HighlightStyle", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Selection API provides a means of grouping together avatars, entities, and overlays in named lists.", + "kind": "namespace", + "name": "Selection", + "hifiInterface": true, + "hifiClientEntity": true, + "examples": [ + "Outline an entity when it is grabbed by a controller.\r// Create a box and copy the following text into the entity's \"Script URL\" field.\r(function () {\r print(\"Starting highlight script...............\");\r var _this = this;\r var prevID = 0;\r var listName = \"contextOverlayHighlightList\";\r var listType = \"entity\";\r\r _this.startNearGrab = function(entityID){\r if (prevID !== entityID) {\r Selection.addToSelectedItemsList(listName, listType, entityID);\r prevID = entityID;\r }\r };\r\r _this.releaseGrab = function(entityID){\r if (prevID !== 0) {\r Selection.removeFromSelectedItemsList(\"contextOverlayHighlightList\", listType, prevID);\r prevID = 0;\r }\r };\r\r var cleanup = function(){\r Entities.findEntities(MyAvatar.position, 1000).forEach(function(entity) {\r try {\r Selection.removeListFromMap(listName);\r } catch (e) {\r print(\"Error cleaning up.\");\r }\r });\r };\r\r Script.scriptEnding.connect(cleanup);\r});" + ], + "longname": "Selection", + "scope": "global" + }, + { + "description": "Get the names of all the selection lists.", + "kind": "function", + "name": "getListNames", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of names of all the selection lists." + } + ], + "memberof": "Selection", + "longname": "Selection.getListNames", + "scope": "static" + }, + { + "description": "Delete a named selection list.", + "kind": "function", + "name": "removeListFromMap", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list.", + "name": "listName" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the selection existed and was successfully removed, otherwise false." + } + ], + "memberof": "Selection", + "longname": "Selection.removeListFromMap", + "scope": "static" + }, + { + "description": "Add an item to a selection list.", + "kind": "function", + "name": "addToSelectedItemsList", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list to add the item to.", + "name": "listName" + }, + { + "type": { + "names": [ + "Selection.ItemType" + ] + }, + "description": "The type of the item being added.", + "name": "itemType" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the item to add to the selection.", + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the item was successfully added, otherwise false." + } + ], + "memberof": "Selection", + "longname": "Selection.addToSelectedItemsList", + "scope": "static" + }, + { + "description": "Remove an item from a selection list.", + "kind": "function", + "name": "removeFromSelectedItemsList", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list to remove the item from.", + "name": "listName" + }, + { + "type": { + "names": [ + "Selection.ItemType" + ] + }, + "description": "The type of the item being removed.", + "name": "itemType" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the item to remove.", + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the item was successfully removed, otherwise false.\r is returned if the list doesn't contain any data." + } + ], + "memberof": "Selection", + "longname": "Selection.removeFromSelectedItemsList", + "scope": "static" + }, + { + "description": "Remove all items from a selection.", + "kind": "function", + "name": "clearSelectedItemsList", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list.", + "name": "listName" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the item was successfully cleared, otherwise false." + } + ], + "memberof": "Selection", + "longname": "Selection.clearSelectedItemsList", + "scope": "static" + }, + { + "description": "Print out the list of avatars, entities, and overlays in a selection to the debug log (not the script log).", + "kind": "function", + "name": "printList", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list.", + "name": "listName" + } + ], + "memberof": "Selection", + "longname": "Selection.printList", + "scope": "static" + }, + { + "description": "Get the list of avatars, entities, and overlays stored in a selection list.", + "kind": "function", + "name": "getSelectedItemsList", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list.", + "name": "listName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Selection.SelectedItemsList" + ] + }, + "description": "The content of a selection list. If the list name doesn't exist, the function \r returns an empty object with no properties." + } + ], + "memberof": "Selection", + "longname": "Selection.getSelectedItemsList", + "scope": "static" + }, + { + "description": "Get the names of the highlighted selection lists.", + "kind": "function", + "name": "getHighlightedListNames", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of names of the selection list currently highlight enabled." + } + ], + "memberof": "Selection", + "longname": "Selection.getHighlightedListNames", + "scope": "static" + }, + { + "description": "Enable highlighting for a selection list.\rIf the selection list doesn't exist, it will be created.\rAll objects in the list will be displayed with the highlight effect specified.\rThe function can be called several times with different values in the style to modify it.
\rNote: This function implicitly calls {@link Selection.enableListToScene}.", + "kind": "function", + "name": "enableListHighlight", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list.", + "name": "listName" + }, + { + "type": { + "names": [ + "Selection.HighlightStyle" + ] + }, + "description": "The highlight style.", + "name": "highlightStyle" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the selection was successfully enabled for highlight." + } + ], + "memberof": "Selection", + "longname": "Selection.enableListHighlight", + "scope": "static" + }, + { + "description": "Disable highlighting for the selection list.\rIf the selection list doesn't exist or wasn't enabled for highlighting then nothing happens and false is\rreturned.
\rNote: This function implicitly calls {@link Selection.disableListToScene}.", + "kind": "function", + "name": "disableListHighlight", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list.", + "name": "listName" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the selection was successfully disabled for highlight, otherwise \r false." + } + ], + "memberof": "Selection", + "longname": "Selection.disableListHighlight", + "scope": "static" + }, + { + "description": "Enable scene selection for the selection list.\rIf the Selection doesn't exist, it will be created.\rAll objects in the list will be sent to a scene selection.", + "kind": "function", + "name": "enableListToScene", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list.", + "name": "listName" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the selection was successfully enabled on the scene, otherwise false." + } + ], + "memberof": "Selection", + "longname": "Selection.enableListToScene", + "scope": "static" + }, + { + "description": "Disable scene selection for the named selection.\rIf the selection list doesn't exist or wasn't enabled on the scene then nothing happens and false is\rreturned.", + "kind": "function", + "name": "disableListToScene", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list.", + "name": "listName" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the selection was successfully disabled on the scene, false otherwise." + } + ], + "memberof": "Selection", + "longname": "Selection.disableListToScene", + "scope": "static" + }, + { + "description": "Get the highlight style values for the a selection list.\rIf the selection doesn't exist or hasn't been highlight enabled yet, an empty object is returned.", + "kind": "function", + "name": "getListHighlightStyle", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list.", + "name": "listName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Selection.HighlightStyle" + ] + }, + "description": "highlight style" + } + ], + "memberof": "Selection", + "longname": "Selection.getListHighlightStyle", + "scope": "static" + }, + { + "description": "Triggered when a list's content changes.", + "kind": "function", + "name": "selectedItemsListChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the selection list that changed.", + "name": "listName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Selection", + "longname": "Selection.selectedItemsListChanged", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Settings API provides a facility to store and retrieve values that persist between Interface runs.", + "kind": "namespace", + "name": "Settings", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "Settings", + "scope": "global" + }, + { + "description": "Retrieve the value from a named setting.", + "kind": "function", + "name": "getValue", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the setting.", + "name": "key" + }, + { + "type": { + "names": [ + "string", + "number", + "boolean", + "object" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The value to return if the setting doesn't exist.", + "name": "defaultValue" + } + ], + "returns": [ + { + "type": { + "names": [ + "string", + "number", + "boolean", + "object" + ] + }, + "description": "The value stored in the named setting if it exists, otherwise the \r defaultValue." + } + ], + "examples": [ + "Retrieve non-existent setting values.\rvar value1 = Settings.getValue(\"Script Example/Nonexistent Key\");\rprint(\"Value: \" + (typeof value1) + \" \" + JSON.stringify(value1)); // string \"\"\r\rvar value2 = Settings.getValue(\"Script Example/Nonexistent Key\", true);\rprint(\"Value: \" + (typeof value2) + \" \" + JSON.stringify(value2)); // boolean true" + ], + "memberof": "Settings", + "longname": "Settings.getValue", + "scope": "static" + }, + { + "description": "Store a value in a named setting. If the setting already exists its value is overwritten, otherwise a new setting is \rcreated. If the value is set to null or undefined, the setting is deleted.", + "kind": "function", + "name": "setValue", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the setting. Be sure to use a unique name if creating a new setting.", + "name": "key" + }, + { + "type": { + "names": [ + "string", + "number", + "boolean", + "object", + "undefined" + ] + }, + "description": "The value to store in the setting. If null or \r undefined is specified, the setting is deleted.", + "name": "value" + } + ], + "examples": [ + "Store and retrieve an object value.\rSettings.setValue(\"Script Example/My Key\", { x: 0, y: 10, z: 0 });\r\rvar value = Settings.getValue(\"Script Example/My Key\");\rprint(\"Value: \" + (typeof value) + \" \" + JSON.stringify(value)); // object {\"x\":0,\"y\":10,\"z\":0}\r\n " + ], + "memberof": "Settings", + "longname": "Settings.setValue", + "scope": "static" + }, + { + "description": "Exits the application", + "kind": "function", + "name": "quit", + "memberof": "Test", + "longname": "Test.quit", + "scope": "static" + }, + { + "description": "Waits for all texture transfers to be complete", + "kind": "function", + "name": "waitForTextureIdle", + "memberof": "Test", + "longname": "Test.waitForTextureIdle", + "scope": "static" + }, + { + "description": "Waits for all pending downloads to be complete", + "kind": "function", + "name": "waitForDownloadIdle", + "memberof": "Test", + "longname": "Test.waitForDownloadIdle", + "scope": "static" + }, + { + "description": "Waits for all file parsing operations to be complete", + "kind": "function", + "name": "waitForProcessingIdle", + "memberof": "Test", + "longname": "Test.waitForProcessingIdle", + "scope": "static" + }, + { + "description": "Waits for all pending downloads, parsing and texture transfers to be complete", + "kind": "function", + "name": "waitIdle", + "memberof": "Test", + "longname": "Test.waitIdle", + "scope": "static" + }, + { + "description": "Waits for establishment of connection to server", + "kind": "function", + "name": "waitForConnection", + "params": [ + { + "type": { + "names": [ + "int" + ] + }, + "description": "[default=10000] - Number of milliseconds to wait", + "name": "maxWaitMs" + } + ], + "memberof": "Test", + "longname": "Test.waitForConnection", + "scope": "static" + }, + { + "description": "Waits a specific number of milliseconds", + "kind": "function", + "name": "wait", + "params": [ + { + "type": { + "names": [ + "int" + ] + }, + "description": "Number of milliseconds to wait", + "name": "milliseconds" + } + ], + "memberof": "Test", + "longname": "Test.wait", + "scope": "static" + }, + { + "description": "Waits for all pending downloads, parsing and texture transfers to be complete", + "kind": "function", + "name": "loadTestScene", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of scene to load", + "name": "sceneFile" + } + ], + "memberof": "Test", + "longname": "Test.loadTestScene", + "scope": "static" + }, + { + "description": "Clears all caches", + "kind": "function", + "name": "clear", + "memberof": "Test", + "longname": "Test.clear", + "scope": "static" + }, + { + "description": "Start recording Chrome compatible tracing events\rlogRules can be used to specify a set of logging category rules to limit what gets captured", + "kind": "function", + "name": "startTracing", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "[defaultValue=\"\"] - See implementation for explanation", + "name": "logrules" + } + ], + "memberof": "Test", + "longname": "Test.startTracing", + "scope": "static" + }, + { + "description": "Stop recording Chrome compatible tracing events and serialize recorded events to a file\rUsing a filename with a .gz extension will automatically compress the output file", + "kind": "function", + "name": "stopTracing", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of file to save to", + "name": "filename" + } + ], + "returns": [ + { + "type": { + "names": [ + "bool" + ] + }, + "description": "True if successful." + } + ], + "memberof": "Test", + "longname": "Test.stopTracing", + "scope": "static" + }, + { + "description": "Starts a specific trace event", + "kind": "function", + "name": "startTraceEvent", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of event", + "name": "name" + } + ], + "memberof": "Test", + "longname": "Test.startTraceEvent", + "scope": "static" + }, + { + "description": "Stop a specific name event\rUsing a filename with a .gz extension will automatically compress the output file", + "kind": "function", + "name": "endTraceEvent", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of event", + "name": "filename" + } + ], + "memberof": "Test", + "longname": "Test.endTraceEvent", + "scope": "static" + }, + { + "description": "Write detailed timing stats of next physics stepSimulation() to filename", + "kind": "function", + "name": "savePhysicsSimulationStats", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of file to save to", + "name": "filename" + } + ], + "memberof": "Test", + "longname": "Test.savePhysicsSimulationStats", + "scope": "static" + }, + { + "description": "Profiles a specific function", + "kind": "function", + "name": "savePhysicsSimulationStats", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name used to reference the function", + "name": "name" + }, + { + "type": { + "names": [ + "function" + ] + }, + "description": "Function to profile", + "name": "function" + } + ], + "memberof": "Test", + "longname": "Test.savePhysicsSimulationStats", + "scope": "static" + }, + { + "description": "Clear all caches (menu command Reload Content)", + "kind": "function", + "name": "clearCaches", + "memberof": "Test", + "longname": "Test.clearCaches", + "scope": "static" + }, + { + "description": "Save a JSON object to a file in the test results location", + "kind": "function", + "name": "saveObject", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the object", + "name": "name" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of file to save to", + "name": "filename" + } + ], + "memberof": "Test", + "longname": "Test.saveObject", + "scope": "static" + }, + { + "description": "Maximizes the window", + "kind": "function", + "name": "showMaximized", + "memberof": "Test", + "longname": "Test.showMaximized", + "scope": "static" + }, + { + "description": "Values higher than 0 will create replicas of other-avatars when entering a domain for testing purpouses", + "kind": "function", + "name": "setOtherAvatarsReplicaCount", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Number of replicas we want to create", + "name": "count" + } + ], + "memberof": "Test", + "longname": "Test.setOtherAvatarsReplicaCount", + "scope": "static" + }, + { + "description": "Return the number of replicas that are being created of other-avatars when entering a domain", + "kind": "function", + "name": "getOtherAvatarsReplicaCount", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Current number of replicas of other-avatars." + } + ], + "memberof": "Test", + "longname": "Test.getOtherAvatarsReplicaCount", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Wallet", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "walletStatus" + } + ], + "longname": "Wallet", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "refreshWalletStatus", + "memberof": "Wallet", + "longname": "Wallet.refreshWalletStatus", + "scope": "static" + }, + { + "kind": "function", + "name": "getWalletStatus", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Wallet", + "longname": "Wallet.getWalletStatus", + "scope": "static" + }, + { + "kind": "function", + "name": "proveAvatarEntityOwnershipVerification", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + } + ], + "memberof": "Wallet", + "longname": "Wallet.proveAvatarEntityOwnershipVerification", + "scope": "static" + }, + { + "kind": "function", + "name": "walletStatusChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Wallet", + "longname": "Wallet.walletStatusChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "walletNotSetup", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Wallet", + "longname": "Wallet.walletNotSetup", + "scope": "static" + }, + { + "kind": "function", + "name": "ownershipVerificationSuccess", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Wallet", + "longname": "Wallet.ownershipVerificationSuccess", + "scope": "static" + }, + { + "kind": "function", + "name": "ownershipVerificationFailed", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Wallet", + "longname": "Wallet.ownershipVerificationFailed", + "scope": "static" + }, + { + "description": "

The buttons that may be included in a message box created by {@link Window.openMessageBox|openMessageBox} are defined by\rnumeric values:\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ButtonValueDescription
NoButton 0x0 An invalid button.
Ok 0x400 \"OK\"
Save 0x800 \"Save\"
SaveAll 0x1000 \"Save All\"
Open 0x2000 \"Open\"
Yes 0x4000 \"Yes\"
YesToAll 0x8000 \"Yes to All\"
No 0x10000 \"No\"
NoToAll 0x20000 \"No to All\"
Abort 0x40000 \"Abort\"
Retry 0x80000 \"Retry\"
Ignore 0x100000 \"Ignore\"
Close 0x200000 \"Close\"
Cancel 0x400000 \"Cancel\"
Discard 0x800000 \"Discard\" or \"Don't Save\"
Help 0x1000000 \"Help\"
Apply 0x2000000 \"Apply\"
Reset 0x4000000 \"Reset\"
RestoreDefaults 0x8000000 \"Restore Defaults\"
", + "kind": "typedef", + "name": "MessageBoxButton", + "type": { + "names": [ + "number" + ] + }, + "memberof": "Window", + "longname": "Window.MessageBoxButton", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Window API provides various facilities not covered elsewhere: window dimensions, window focus, normal or entity camera\rview, clipboard, announcements, user connections, common dialog boxes, snapshots, file import, domain changes, domain \rphysics.", + "kind": "namespace", + "name": "Window", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The width of the drawable area of the Interface window (i.e., without borders or other\r chrome), in pixels. Read-only.", + "name": "innerWidth" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The height of the drawable area of the Interface window (i.e., without borders or other\r chrome), in pixels. Read-only.", + "name": "innerHeight" + }, + { + "type": { + "names": [ + "object" + ] + }, + "description": "Provides facilities for working with your current metaverse location. See {@link location}.", + "name": "location" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The x display coordinate of the top left corner of the drawable area of the Interface window. \r Read-only.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The y display coordinate of the top left corner of the drawable area of the Interface window. \r Read-only.", + "name": "y" + } + ], + "longname": "Window", + "scope": "global" + }, + { + "description": "Check if the Interface window has focus.", + "kind": "function", + "name": "hasFocus", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the Interface window has focus, otherwise false." + } + ], + "memberof": "Window", + "longname": "Window.hasFocus", + "scope": "static" + }, + { + "description": "Make the Interface window have focus. On Windows, if Interface doesn't already have focus, the task bar icon flashes to \rindicate that Interface wants attention but focus isn't taken away from the application that the user is using.", + "kind": "function", + "name": "setFocus", + "memberof": "Window", + "longname": "Window.setFocus", + "scope": "static" + }, + { + "description": "Raise the Interface window if it is minimized. If raised, the window gains focus.", + "kind": "function", + "name": "raise", + "memberof": "Window", + "longname": "Window.raise", + "scope": "static" + }, + { + "description": "Display a dialog with the specified message and an \"OK\" button. The dialog is non-modal; the script continues without\rwaiting for a user response.", + "kind": "function", + "name": "alert", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The message to display.", + "name": "message" + } + ], + "examples": [ + "Display a friendly greeting.\rWindow.alert(\"Welcome!\");\rprint(\"Script continues without waiting\");" + ], + "memberof": "Window", + "longname": "Window.alert", + "scope": "static" + }, + { + "description": "Prompt the user to confirm something. Displays a modal dialog with a message plus \"Yes\" and \"No\" buttons.\rresponds.", + "kind": "function", + "name": "confirm", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The question to display.", + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the user selects \"Yes\", otherwise false." + } + ], + "examples": [ + "Ask the user a question requiring a yes/no answer.\rvar answer = Window.confirm(\"Are you sure?\");\rprint(answer); // true or false" + ], + "memberof": "Window", + "longname": "Window.confirm", + "scope": "static" + }, + { + "description": "Prompt the user to enter some text. Displays a modal dialog with a message and a text box, plus \"OK\" and \"Cancel\" \rbuttons.", + "kind": "function", + "name": "prompt", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The question to display.", + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The default answer text.", + "name": "defaultText" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The text that the user entered if they select \"OK\", otherwise \"\"." + } + ], + "examples": [ + "Ask the user a question requiring a text answer.\rvar answer = Window.prompt(\"Question\", \"answer\");\rif (answer === \"\") {\r print(\"User canceled\");\r} else {\r print(\"User answer: \" + answer);\r}" + ], + "memberof": "Window", + "longname": "Window.prompt", + "scope": "static" + }, + { + "description": "Prompt the user to enter some text. Displays a non-modal dialog with a message and a text box, plus \"OK\" and \"Cancel\" \rbuttons. A {@link Window.promptTextChanged|promptTextChanged} signal is emitted when the user OKs the dialog; no signal \ris emitted if the user cancels the dialog.", + "kind": "function", + "name": "promptAsync", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The question to display.", + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The default answer text.", + "name": "defaultText" + } + ], + "examples": [ + "Ask the user a question requiring a text answer without waiting for the answer.\rfunction onPromptTextChanged(text) {\r print(\"User answer: \" + text);\r}\rWindow.promptTextChanged.connect(onPromptTextChanged);\r\rWindow.promptAsync(\"Question\", \"answer\");\rprint(\"Script continues without waiting\");" + ], + "memberof": "Window", + "longname": "Window.promptAsync", + "scope": "static" + }, + { + "description": "Prompt the user to choose a directory. Displays a modal dialog that navigates the directory tree.", + "kind": "function", + "name": "browseDir", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The title to display at the top of the dialog.", + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The initial directory to start browsing at.", + "name": "directory" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path of the directory if one is chosen, otherwise null." + } + ], + "examples": [ + "Ask the user to choose a directory.\rvar directory = Window.browseDir(\"Select Directory\", Paths.resources);\rprint(\"Directory: \" + directory);" + ], + "memberof": "Window", + "longname": "Window.browseDir", + "scope": "static" + }, + { + "description": "Prompt the user to choose a directory. Displays a non-modal dialog that navigates the directory tree. A\r{@link Window.browseDirChanged|browseDirChanged} signal is emitted when a directory is chosen; no signal is emitted if\rthe user cancels the dialog.", + "kind": "function", + "name": "browseDirAsync", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The title to display at the top of the dialog.", + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The initial directory to start browsing at.", + "name": "directory" + } + ], + "examples": [ + "Ask the user to choose a directory without waiting for the answer.\rfunction onBrowseDirChanged(directory) {\r print(\"Directory: \" + directory);\r}\rWindow.browseDirChanged.connect(onBrowseDirChanged);\r\rWindow.browseDirAsync(\"Select Directory\", Paths.resources);\rprint(\"Script continues without waiting\");" + ], + "memberof": "Window", + "longname": "Window.browseDirAsync", + "scope": "static" + }, + { + "description": "Prompt the user to choose a file. Displays a modal dialog that navigates the directory tree.", + "kind": "function", + "name": "browse", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The title to display at the top of the dialog.", + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The initial directory to start browsing at.", + "name": "directory" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The types of files to display. Examples: \"*.json\" and \r \"Images (*.png *.jpg *.svg)\". All files are displayed if a filter isn't specified.", + "name": "nameFilter" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the file if one is chosen, otherwise null." + } + ], + "examples": [ + "Ask the user to choose an image file.\rvar filename = Window.browse(\"Select Image File\", Paths.resources, \"Images (*.png *.jpg *.svg)\");\rprint(\"File: \" + filename);" + ], + "memberof": "Window", + "longname": "Window.browse", + "scope": "static" + }, + { + "description": "Prompt the user to choose a file. Displays a non-modal dialog that navigates the directory tree. A\r{@link Window.browseChanged|browseChanged} signal is emitted when a file is chosen; no signal is emitted if the user\rcancels the dialog.", + "kind": "function", + "name": "browseAsync", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The title to display at the top of the dialog.", + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The initial directory to start browsing at.", + "name": "directory" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The types of files to display. Examples: \"*.json\" and\r \"Images (*.png *.jpg *.svg)\". All files are displayed if a filter isn't specified.", + "name": "nameFilter" + } + ], + "examples": [ + "Ask the user to choose an image file without waiting for the answer.\rfunction onBrowseChanged(filename) {\r print(\"File: \" + filename);\r}\rWindow.browseChanged.connect(onBrowseChanged);\r\rWindow.browseAsync(\"Select Image File\", Paths.resources, \"Images (*.png *.jpg *.svg)\");\rprint(\"Script continues without waiting\");" + ], + "memberof": "Window", + "longname": "Window.browseAsync", + "scope": "static" + }, + { + "description": "Prompt the user to specify the path and name of a file to save to. Displays a model dialog that navigates the directory\rtree and allows the user to type in a file name.", + "kind": "function", + "name": "save", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The title to display at the top of the dialog.", + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The initial directory to start browsing at.", + "name": "directory" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The types of files to display. Examples: \"*.json\" and\r \"Images (*.png *.jpg *.svg)\". All files are displayed if a filter isn't specified.", + "name": "nameFilter" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the file if one is specified, otherwise null. If a single file type\r is specified in the nameFilter, that file type extension is automatically appended to the result when appropriate." + } + ], + "examples": [ + "Ask the user to specify a file to save to.\rvar filename = Window.save(\"Save to JSON file\", Paths.resources, \"*.json\");\rprint(\"File: \" + filename);" + ], + "memberof": "Window", + "longname": "Window.save", + "scope": "static" + }, + { + "description": "Prompt the user to specify the path and name of a file to save to. Displays a non-model dialog that navigates the\rdirectory tree and allows the user to type in a file name. A {@link Window.saveFileChanged|saveFileChanged} signal is\remitted when a file is specified; no signal is emitted if the user cancels the dialog.", + "kind": "function", + "name": "saveAsync", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The title to display at the top of the dialog.", + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The initial directory to start browsing at.", + "name": "directory" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The types of files to display. Examples: \"*.json\" and\r \"Images (*.png *.jpg *.svg)\". All files are displayed if a filter isn't specified.", + "name": "nameFilter" + } + ], + "examples": [ + "Ask the user to specify a file to save to without waiting for an answer.\rfunction onSaveFileChanged(filename) {\r print(\"File: \" + filename);\r}\rWindow.saveFileChanged.connect(onSaveFileChanged);\r\rWindow.saveAsync(\"Save to JSON file\", Paths.resources, \"*.json\");\rprint(\"Script continues without waiting\");" + ], + "memberof": "Window", + "longname": "Window.saveAsync", + "scope": "static" + }, + { + "description": "Prompt the user to choose an Asset Server item. Displays a modal dialog that navigates the tree of assets on the Asset\rServer.", + "kind": "function", + "name": "browseAssets", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The title to display at the top of the dialog.", + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The initial directory to start browsing at.", + "name": "directory" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The types of files to display. Examples: \"*.json\" and \r \"Images (*.png *.jpg *.svg)\". All files are displayed if a filter isn't specified.", + "name": "nameFilter" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the asset if one is chosen, otherwise null." + } + ], + "examples": [ + "Ask the user to select an FBX asset.\rvar asset = Window.browseAssets(\"Select FBX File\", \"/\", \"*.fbx\");\rprint(\"FBX file: \" + asset);" + ], + "memberof": "Window", + "longname": "Window.browseAssets", + "scope": "static" + }, + { + "description": "Prompt the user to choose an Asset Server item. Displays a non-modal dialog that navigates the tree of assets on the \rAsset Server. A {@link Window.assetsDirChanged|assetsDirChanged} signal is emitted when an asset is chosen; no signal is\remitted if the user cancels the dialog.", + "kind": "function", + "name": "browseAssetsAsync", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The title to display at the top of the dialog.", + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The initial directory to start browsing at.", + "name": "directory" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The types of files to display. Examples: \"*.json\" and\r \"Images (*.png *.jpg *.svg)\". All files are displayed if a filter isn't specified.", + "name": "nameFilter" + } + ], + "examples": [ + "function onAssetsDirChanged(asset) {\r print(\"FBX file: \" + asset);\r}\rWindow.assetsDirChanged.connect(onAssetsDirChanged);\r\rWindow.browseAssetsAsync(\"Select FBX File\", \"/\", \"*.fbx\");\rprint(\"Script continues without waiting\");" + ], + "memberof": "Window", + "longname": "Window.browseAssetsAsync", + "scope": "static" + }, + { + "description": "Open the Asset Browser dialog. If a file to upload is specified, the user is prompted to enter the folder and name to\rmap the file to on the asset server.", + "kind": "function", + "name": "showAssetServer", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The path and name of a file to upload to the asset server.", + "name": "uploadFile" + } + ], + "examples": [ + "Upload a file to the asset server.\rvar filename = Window.browse(\"Select File to Add to Asset Server\", Paths.resources);\rprint(\"File: \" + filename);\rWindow.showAssetServer(filename);" + ], + "memberof": "Window", + "longname": "Window.showAssetServer", + "scope": "static" + }, + { + "description": "Get Interface's build number.", + "kind": "function", + "name": "checkVersion", + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Interface's build number." + } + ], + "memberof": "Window", + "longname": "Window.checkVersion", + "scope": "static" + }, + { + "description": "Get the signature for Interface's protocol version.", + "kind": "function", + "name": "protocolSignature", + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "A string uniquely identifying the version of the metaverse protocol that Interface is using." + } + ], + "memberof": "Window", + "longname": "Window.protocolSignature", + "scope": "static" + }, + { + "description": "Copies text to the operating system's clipboard.", + "kind": "function", + "name": "copyToClipboard", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The text to copy to the operating system's clipboard.", + "name": "text" + } + ], + "memberof": "Window", + "longname": "Window.copyToClipboard", + "scope": "static" + }, + { + "description": "Takes a snapshot of the current Interface view from the primary camera. When a still image only is captured, \r{@link Window.stillSnapshotTaken|stillSnapshotTaken} is emitted; when a still image plus moving images are captured, \r{@link Window.processingGifStarted|processingGifStarted} and {@link Window.processingGifCompleted|processingGifCompleted}\rare emitted. The path to store the snapshots and the length of the animated GIF to capture are specified in Settings >\rGeneral > Snapshots.\r\rIf user has supplied a specific filename for the snapshot:\r If the user's requested filename has a suffix that's contained within SUPPORTED_IMAGE_FORMATS,\r DON'T append \".jpg\" to the filename. QT will save the image in the format associated with the\r filename's suffix.\r If you want lossless Snapshots, supply a `.png` filename. Otherwise, use `.jpeg` or `.jpg`.\r Otherwise, \".jpg\" is appended to the user's requested filename so that the image is saved in JPG format.\rIf the user hasn't supplied a specific filename for the snapshot:\r Save the snapshot in JPG format according to FILENAME_PATH_FORMAT", + "kind": "function", + "name": "takeSnapshot", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken}\r signal.", + "name": "notify" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, a moving image is captured as an animated GIF in addition \r to a still image.", + "name": "includeAnimated" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 0, + "description": "The width/height ratio of the snapshot required. If the value is 0 the\r full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the\r dimensions is adjusted in order to match the aspect ratio.", + "name": "aspectRatio" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "If this parameter is not given, the image will be saved as \"hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS\".\r If this parameter is \"\" then the image will be saved as \".jpg\".\r Otherwise, the image will be saved to this filename, with an appended \".jpg\".", + "name": "filename" + } + ], + "examples": [ + "Using the snapshot function and signals.\rfunction onStillSnapshotTaken(path, notify) {\r print(\"Still snapshot taken: \" + path);\r print(\"Notify: \" + notify);\r}\r\rfunction onProcessingGifStarted(stillPath) {\r print(\"Still snapshot taken: \" + stillPath);\r}\r\rfunction onProcessingGifCompleted(animatedPath) {\r print(\"Animated snapshot taken: \" + animatedPath);\r}\r\rWindow.stillSnapshotTaken.connect(onStillSnapshotTaken);\rWindow.processingGifStarted.connect(onProcessingGifStarted);\rWindow.processingGifCompleted.connect(onProcessingGifCompleted);\r\rvar notify = true;\rvar animated = true;\rvar aspect = 1920 / 1080;\rvar filename = \"\";\rWindow.takeSnapshot(notify, animated, aspect, filename);" + ], + "memberof": "Window", + "longname": "Window.takeSnapshot", + "scope": "static" + }, + { + "description": "Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API.", + "kind": "function", + "name": "takeSecondaryCameraSnapshot", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken}\r signal.", + "name": "notify" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "If this parameter is not given, the image will be saved as \"hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS\".\r If this parameter is \"\" then the image will be saved as \".jpg\".\r Otherwise, the image will be saved to this filename, with an appended \".jpg\".", + "name": "filename" + } + ], + "memberof": "Window", + "longname": "Window.takeSecondaryCameraSnapshot", + "scope": "static" + }, + { + "description": "Takes a 360° snapshot at a given position for the secondary camera. The secondary camera does not need to have been \r set up.", + "kind": "function", + "name": "takeSecondaryCamera360Snapshot", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the camera for the snapshot.", + "name": "cameraPosition" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true then the snapshot is saved as a cube map image, \r otherwise is saved as an equirectangular image.", + "name": "cubemapOutputFormat" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken}\r signal.", + "name": "notify" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "If this parameter is not supplied, the image will be saved as \"hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS\".\r If this parameter is \"\" then the image will be saved as \".jpg\".\r Otherwise, the image will be saved to this filename, with an appended \".jpg\".", + "name": "filename" + } + ], + "memberof": "Window", + "longname": "Window.takeSecondaryCamera360Snapshot", + "scope": "static" + }, + { + "description": "Emit a {@link Window.connectionAdded|connectionAdded} or a {@link Window.connectionError|connectionError} signal that\rindicates whether or not a user connection was successfully made using the Web API.", + "kind": "function", + "name": "makeConnection", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true then {@link Window.connectionAdded|connectionAdded} is emitted, otherwise\r {@link Window.connectionError|connectionError} is emitted.", + "name": "success" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Descriptive text about the connection success or error. This is sent in the signal emitted.", + "name": "description" + } + ], + "memberof": "Window", + "longname": "Window.makeConnection", + "scope": "static" + }, + { + "description": "Display a notification message. Notifications are displayed in panels by the default script, nofications.js. An\r{@link Window.announcement|announcement} signal is emitted when this function is called.", + "kind": "function", + "name": "displayAnnouncement", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The announcement message.", + "name": "message" + } + ], + "examples": [ + "Send and capture an announcement message.\rfunction onAnnouncement(message) {\r // The message is also displayed as a notification by notifications.js.\r print(\"Announcement: \" + message);\r}\rWindow.announcement.connect(onAnnouncement);\r\rWindow.displayAnnouncement(\"Hello\");" + ], + "memberof": "Window", + "longname": "Window.displayAnnouncement", + "scope": "static" + }, + { + "description": "Prepare a snapshot ready for sharing. A {@link Window.snapshotShared|snapshotShared} signal is emitted when the snapshot\rhas been prepared.", + "kind": "function", + "name": "shareSnapshot", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the image file to share.", + "name": "path" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The metaverse location where the snapshot was taken.", + "name": "href" + } + ], + "memberof": "Window", + "longname": "Window.shareSnapshot", + "scope": "static" + }, + { + "description": "Check to see if physics is active for you in the domain you're visiting - there is a delay between your arrival at a\rdomain and physics becoming active for you in that domain.", + "kind": "function", + "name": "isPhysicsEnabled", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if physics is currently active for you, otherwise false." + } + ], + "examples": [ + "Wait for physics to be enabled when you change domains.\rfunction checkForPhysics() {\r var isPhysicsEnabled = Window.isPhysicsEnabled();\r print(\"Physics enabled: \" + isPhysicsEnabled);\r if (!isPhysicsEnabled) {\r Script.setTimeout(checkForPhysics, 1000);\r }\r}\r\rfunction onDomainChanged(domain) {\r print(\"Domain changed: \" + domain);\r Script.setTimeout(checkForPhysics, 1000);\r}\r\rWindow.domainChanged.connect(onDomainChanged);" + ], + "memberof": "Window", + "longname": "Window.isPhysicsEnabled", + "scope": "static" + }, + { + "description": "Set what to show on the PC display: normal view or entity camera view. The entity camera is configured using\r{@link Camera.setCameraEntity} and {@link Camera|Camera.mode}.", + "kind": "function", + "name": "setDisplayTexture", + "params": [ + { + "type": { + "names": [ + "Window.DisplayTexture" + ] + }, + "description": "The view to display.", + "name": "texture" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the display texture was successfully set, otherwise false." + } + ], + "memberof": "Window", + "longname": "Window.setDisplayTexture", + "scope": "static" + }, + { + "description": "

The views that may be displayed on the PC display.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueView Displayed
\"\"Normal view.
\"resource://spectatorCameraFrame\"Entity camera view.
", + "kind": "typedef", + "name": "DisplayTexture", + "type": { + "names": [ + "string" + ] + }, + "memberof": "Window", + "longname": "Window.DisplayTexture", + "scope": "static" + }, + { + "description": "Check if a 2D point is within the desktop window if in desktop mode, or the drawable area of the HUD overlay if in HMD\rmode.", + "kind": "function", + "name": "isPointOnDesktopWindow", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The point to check.", + "name": "point" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the point is within the window or HUD, otherwise false." + } + ], + "memberof": "Window", + "longname": "Window.isPointOnDesktopWindow", + "scope": "static" + }, + { + "description": "Get the size of the drawable area of the Interface window if in desktop mode or the HMD rendering surface if in HMD mode.", + "kind": "function", + "name": "getDeviceSize", + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The width and height of the Interface window or HMD rendering surface, in pixels." + } + ], + "memberof": "Window", + "longname": "Window.getDeviceSize", + "scope": "static" + }, + { + "description": "Gets the last domain connection error when a connection is refused.", + "kind": "function", + "name": "getLastDomainConnectionError", + "returns": [ + { + "type": { + "names": [ + "Window.ConnectionRefusedReason" + ] + }, + "description": "Integer number that enumerates the last domain connection refused." + } + ], + "memberof": "Window", + "longname": "Window.getLastDomainConnectionError", + "scope": "static" + }, + { + "description": "Open a non-modal message box that can have a variety of button combinations. See also, \r{@link Window.updateMessageBox|updateMessageBox} and {@link Window.closeMessageBox|closeMessageBox}.", + "kind": "function", + "name": "openMessageBox", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The title to display for the message box.", + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Text to display in the message box.", + "name": "text" + }, + { + "type": { + "names": [ + "Window.MessageBoxButton" + ] + }, + "description": "The buttons to display on the message box; one or more button values added\r together.", + "name": "buttons" + }, + { + "type": { + "names": [ + "Window.MessageBoxButton" + ] + }, + "description": "The button that has focus when the message box is opened.", + "name": "defaultButton" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the message box created." + } + ], + "examples": [ + "Ask the user whether that want to reset something.\rvar messageBox;\rvar resetButton = 0x4000000;\rvar cancelButton = 0x400000;\r\rfunction onMessageBoxClosed(id, button) {\r if (id === messageBox) {\r if (button === resetButton) {\r print(\"Reset\");\r } else {\r print(\"Don't reset\");\r }\r }\r}\rWindow.messageBoxClosed.connect(onMessageBoxClosed);\r\rmessageBox = Window.openMessageBox(\"Reset Something\", \r \"Do you want to reset something?\",\r resetButton + cancelButton, cancelButton);" + ], + "memberof": "Window", + "longname": "Window.openMessageBox", + "scope": "static" + }, + { + "description": "Open a URL in the Interface window or other application, depending on the URL's scheme. If the URL starts with \rhifi:// then that URL is navigated to in Interface, otherwise the URL is opened in the application the OS \rassociates with the URL's scheme (e.g., a Web browser for http://).", + "kind": "function", + "name": "openUrl", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL to open.", + "name": "url" + } + ], + "memberof": "Window", + "longname": "Window.openUrl", + "scope": "static" + }, + { + "description": "Open an Android activity and optionally return back to the scene when the activity is completed. Android only.", + "kind": "function", + "name": "openAndroidActivity", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the activity to open: one of \"Home\", \"Login\", or \r \"Privacy Policy\".", + "name": "activityName" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true, the user is automatically returned back to the scene when the \r activity is completed.", + "name": "backToScene" + } + ], + "memberof": "Window", + "longname": "Window.openAndroidActivity", + "scope": "static" + }, + { + "description": "Update the content of a message box that was opened with {@link Window.openMessageBox|openMessageBox}.", + "kind": "function", + "name": "updateMessageBox", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the message box.", + "name": "id" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The title to display for the message box.", + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Text to display in the message box.", + "name": "text" + }, + { + "type": { + "names": [ + "Window.MessageBoxButton" + ] + }, + "description": "The buttons to display on the message box; one or more button values added\r together.", + "name": "buttons" + }, + { + "type": { + "names": [ + "Window.MessageBoxButton" + ] + }, + "description": "The button that has focus when the message box is opened.", + "name": "defaultButton" + } + ], + "memberof": "Window", + "longname": "Window.updateMessageBox", + "scope": "static" + }, + { + "description": "Close a message box that was opened with {@link Window.openMessageBox|openMessageBox}.", + "kind": "function", + "name": "closeMessageBox", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the message box.", + "name": "id" + } + ], + "memberof": "Window", + "longname": "Window.closeMessageBox", + "scope": "static" + }, + { + "description": "Triggered when you change the domain you're visiting. Warning: Is not emitted if you go to a domain \rthat isn't running.", + "kind": "function", + "name": "domainChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The domain's URL.", + "name": "domainURL" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when you change domains.\rfunction onDomainChanged(domain) {\r print(\"Domain changed: \" + domain);\r}\r\rWindow.domainChanged.connect(onDomainChanged);" + ], + "memberof": "Window", + "longname": "Window.domainChanged", + "scope": "static" + }, + { + "description": "Triggered when you try to navigate to a *.json, *.svo, or *.svo.json URL in a Web browser within Interface.", + "kind": "function", + "name": "svoImportRequested", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the file to import.", + "name": "url" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.svoImportRequested", + "scope": "static" + }, + { + "description": "Triggered when you try to visit a domain but are refused connection.", + "kind": "function", + "name": "domainConnectionRefused", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "A description of the refusal.", + "name": "reasonMessage" + }, + { + "type": { + "names": [ + "Window.ConnectionRefusedReason" + ] + }, + "description": "Integer number that enumerates the reason for the refusal.", + "name": "reasonCode" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Extra information about the refusal.", + "name": "extraInfo" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.domainConnectionRefused", + "scope": "static" + }, + { + "description": "Triggered when you try to visit a domain but are redirected into the error state.", + "kind": "function", + "name": "redirectErrorStateChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true, the user has been redirected to the error URL.", + "name": "isInErrorState" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.redirectErrorStateChanged", + "scope": "static" + }, + { + "description": "Triggered when a still snapshot has been taken by calling {@link Window.takeSnapshot|takeSnapshot} with \r includeAnimated = false or {@link Window.takeSecondaryCameraSnapshot|takeSecondaryCameraSnapshot}.", + "kind": "function", + "name": "stillSnapshotTaken", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the snapshot image file.", + "name": "pathStillSnapshot" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "The value of the notify parameter that {@link Window.takeSnapshot|takeSnapshot}\r was called with.", + "name": "notify" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.stillSnapshotTaken", + "scope": "static" + }, + { + "description": "Triggered when a still 360° snapshot has been taken by calling \r {@link Window.takeSecondaryCamera360Snapshot|takeSecondaryCamera360Snapshot}.", + "kind": "function", + "name": "snapshot360Taken", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the snapshot image file.", + "name": "pathStillSnapshot" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "The value of the notify parameter that {@link Window.takeSecondaryCamera360Snapshot|takeSecondaryCamera360Snapshot}\r was called with.", + "name": "notify" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.snapshot360Taken", + "scope": "static" + }, + { + "description": "Triggered when a snapshot submitted via {@link Window.shareSnapshot|shareSnapshot} is ready for sharing. The snapshot\rmay then be shared via the {@link Account.metaverseServerURL} Web API.", + "kind": "function", + "name": "snapshotShared", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if an error was encountered preparing the snapshot for sharing, otherwise\r false.", + "name": "isError" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "JSON-formatted information about the snapshot.", + "name": "reply" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.snapshotShared", + "scope": "static" + }, + { + "description": "Triggered when the snapshot images have been captured by {@link Window.takeSnapshot|takeSnapshot} and the GIF is\r starting to be processed.", + "kind": "function", + "name": "processingGifStarted", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the still snapshot image file.", + "name": "pathStillSnapshot" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.processingGifStarted", + "scope": "static" + }, + { + "description": "Triggered when a GIF has been prepared of the snapshot images captured by {@link Window.takeSnapshot|takeSnapshot}.", + "kind": "function", + "name": "processingGifCompleted", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the moving snapshot GIF file.", + "name": "pathAnimatedSnapshot" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.processingGifCompleted", + "scope": "static" + }, + { + "description": "Triggered when you've successfully made a user connection.", + "kind": "function", + "name": "connectionAdded", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "A description of the success.", + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.connectionAdded", + "scope": "static" + }, + { + "description": "Triggered when you failed to make a user connection.", + "kind": "function", + "name": "connectionError", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "A description of the error.", + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.connectionError", + "scope": "static" + }, + { + "description": "Triggered when a message is announced by {@link Window.displayAnnouncement|displayAnnouncement}.", + "kind": "function", + "name": "announcement", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The message text.", + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.announcement", + "scope": "static" + }, + { + "description": "Triggered when the user closes a message box that was opened with {@link Window.openMessageBox|openMessageBox}.", + "kind": "function", + "name": "messageBoxClosed", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the message box that was closed.", + "name": "id" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The button that the user clicked. If the user presses Esc, the Cancel button value is returned,\r whether or not the Cancel button is displayed in the message box.", + "name": "button" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.messageBoxClosed", + "scope": "static" + }, + { + "description": "Triggered when the user chooses a directory in a {@link Window.browseDirAsync|browseDirAsync} dialog.", + "kind": "function", + "name": "browseDirChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The directory the user chose in the dialog.", + "name": "directory" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.browseDirChanged", + "scope": "static" + }, + { + "description": "Triggered when the user chooses an asset in a {@link Window.browseAssetsAsync|browseAssetsAsync} dialog.", + "kind": "function", + "name": "assetsDirChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the asset the user chose in the dialog.", + "name": "asset" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.assetsDirChanged", + "scope": "static" + }, + { + "description": "Triggered when the user specifies a file in a {@link Window.saveAsync|saveAsync} dialog.", + "kind": "function", + "name": "saveFileChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the file that the user specified in the dialog.", + "name": "filename" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.saveFileChanged", + "scope": "static" + }, + { + "description": "Triggered when the user chooses a file in a {@link Window.browseAsync|browseAsync} dialog.", + "kind": "function", + "name": "browseChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path and name of the file the user chose in the dialog.", + "name": "filename" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.browseChanged", + "scope": "static" + }, + { + "description": "Triggered when the user OKs a {@link Window.promptAsync|promptAsync} dialog.", + "kind": "function", + "name": "promptTextChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The text the user entered in the dialog.", + "name": "text" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Window", + "longname": "Window.promptTextChanged", + "scope": "static" + }, + { + "description": "Triggered when the position or size of the Interface window changes.", + "kind": "function", + "name": "geometryChanged", + "params": [ + { + "type": { + "names": [ + "Rect" + ] + }, + "description": "The position and size of the drawable area of the Interface window.", + "name": "geometry" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report the position of size of the Interface window when it changes.\rfunction onWindowGeometryChanged(rect) {\r print(\"Window geometry: \" + JSON.stringify(rect));\r}\r\rWindow.geometryChanged.connect(onWindowGeometryChanged);\r\n " + ], + "memberof": "Window", + "longname": "Window.geometryChanged", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

API to help manage your Avatar's input", + "kind": "namespace", + "name": "AvatarInputs", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Read-only.", + "name": "cameraEnabled" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Read-only.", + "name": "cameraMuted" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Read-only.", + "name": "isHMD" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "showAudioTools" + } + ], + "longname": "AvatarInputs", + "scope": "global" + }, + { + "kind": "function", + "name": "loudnessToAudioLevel", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "loudness" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "AvatarInputs", + "longname": "AvatarInputs.loudnessToAudioLevel", + "scope": "static" + }, + { + "kind": "function", + "name": "setShowAudioTools", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "showAudioTools" + } + ], + "memberof": "AvatarInputs", + "longname": "AvatarInputs.setShowAudioTools", + "scope": "static" + }, + { + "kind": "function", + "name": "cameraEnabledChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarInputs", + "longname": "AvatarInputs.cameraEnabledChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "cameraMutedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarInputs", + "longname": "AvatarInputs.cameraMutedChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "isHMDChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarInputs", + "longname": "AvatarInputs.isHMDChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "showAudioToolsChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "show" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarInputs", + "longname": "AvatarInputs.showAudioToolsChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "resetSensors", + "memberof": "AvatarInputs", + "longname": "AvatarInputs.resetSensors", + "scope": "static" + }, + { + "kind": "function", + "name": "toggleCameraMute", + "memberof": "AvatarInputs", + "longname": "AvatarInputs.toggleCameraMute", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Snapshot", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "Snapshot", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "snapshotLocationSet", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "location" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Snapshot", + "longname": "Snapshot.snapshotLocationSet", + "scope": "static" + }, + { + "kind": "function", + "name": "getSnapshotsLocation", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Snapshot", + "longname": "Snapshot.getSnapshotsLocation", + "scope": "static" + }, + { + "kind": "function", + "name": "setSnapshotsLocation", + "params": [ + { + "type": { + "names": [ + "String" + ] + }, + "name": "location" + } + ], + "memberof": "Snapshot", + "longname": "Snapshot.setSnapshotsLocation", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Stats", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "expanded" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Read-only.", + "name": "timingExpanded" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "monospaceFont" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "serverCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "How often the app is creating new gpu::Frames. Read-only.", + "name": "renderrate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "How often the display plugin is presenting to the device. Read-only.", + "name": "presentrate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "How often the display device is reprojecting old frames. Read-only.", + "name": "stutterrate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "appdropped" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "longsubmits" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "longrenders" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "longframes" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "presentnewrate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "presentdroprate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gameLoopRate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "avatarCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "physicsObjectCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "updatedAvatarCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "notUpdatedAvatarCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "packetInCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "packetOutCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "mbpsIn" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "mbpsOut" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "assetMbpsIn" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "assetMbpsOut" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioPing" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "avatarPing" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "entitiesPing" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "assetPing" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "messagePing" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Read-only.", + "name": "position" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "speed" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "yaw" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "avatarMixerInKbps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "avatarMixerInPps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "avatarMixerOutKbps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "avatarMixerOutPps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "myAvatarSendRate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioMixerInKbps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioMixerInPps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioMixerOutKbps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioMixerOutPps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioMixerKbps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioMixerPps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioOutboundPPS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioSilentOutboundPPS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioAudioInboundPPS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioSilentInboundPPS" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "audioPacketLoss" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "audioCodec" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "audioNoiseGate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "entityPacketsInKbps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "downloads" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "downloadLimit" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "downloadsPending" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Read-only.", + "name": "downloadUrls" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "processing" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "processingPending" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "triangles" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "materialSwitches" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "itemConsidered" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "itemOutOfView" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "itemTooSmall" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "itemRendered" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "shadowConsidered" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "shadowOutOfView" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "shadowTooSmall" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "shadowRendered" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "sendingMode" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "packetStats" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "lodStatus" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "timingStats" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "gameUpdateStats" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "serverElements" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "serverInternal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "serverLeaves" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "localElements" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "localInternal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "localLeaves" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "rectifiedTextureCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "decimatedTextureCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuBuffers" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuBufferMemory" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuTextures" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "glContextSwapchainMemory" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "qmlTextureMemory" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "texturePendingTransfers" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuTextureMemory" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuTextureResidentMemory" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuTextureFramebufferMemory" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuTextureResourceMemory" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuTextureResourceIdealMemory" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuTextureResourcePopulatedMemory" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuTextureExternalMemory" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "gpuTextureMemoryPressureState" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuFreeMemory" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "gpuFrameTime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "batchFrameTime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "engineFrameTime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "avatarSimulationTime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "z" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "width" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "height" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "opacity" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "state" + }, + { + "type": { + "names": [ + "object" + ] + }, + "description": "Read-only.", + "name": "anchors" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "baselineOffset" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "clip" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "focus" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Read-only.", + "name": "activeFocus" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "activeFocusOnTab" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "rotation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "scale" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "transformOrigin" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "smooth" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "antialiasing" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "implicitWidth" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "implicitHeight" + }, + { + "type": { + "names": [ + "object" + ] + }, + "description": "Read-only.", + "name": "layer" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "stylusPicksCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "rayPicksCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "parabolaPicksCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "collisionPicksCount" + }, + { + "type": { + "names": [ + "Vec4" + ] + }, + "description": "Read-only.", + "name": "stylusPicksUpdated" + }, + { + "type": { + "names": [ + "Vec4" + ] + }, + "description": "Read-only.", + "name": "rayPicksUpdated" + }, + { + "type": { + "names": [ + "Vec4" + ] + }, + "description": "Read-only.", + "name": "parabolaPicksUpdated" + }, + { + "type": { + "names": [ + "Vec4" + ] + }, + "description": "Read-only.", + "name": "collisionPicksUpdated" + } + ], + "longname": "Stats", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

" + }, + { + "description": "Triggered when the value of the longsubmits property changes.", + "kind": "function", + "name": "longsubmitsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.longsubmitsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the longrenders property changes.", + "kind": "function", + "name": "longrendersChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.longrendersChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the longframes property changes.", + "kind": "function", + "name": "longframesChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.longframesChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the appdropped property changes.", + "kind": "function", + "name": "appdroppedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.appdroppedChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the expanded property changes.", + "kind": "function", + "name": "expandedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.expandedChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the timingExpanded property changes.", + "kind": "function", + "name": "timingExpandedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.timingExpandedChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the serverCount property changes.", + "kind": "function", + "name": "serverCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.serverCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the renderrate property changes.", + "kind": "function", + "name": "renderrateChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.renderrateChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the presentrate property changes.", + "kind": "function", + "name": "presentrateChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.presentrateChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the presentnewrate property changes.", + "kind": "function", + "name": "presentnewrateChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.presentnewrateChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the presentdroprate property changes.", + "kind": "function", + "name": "presentdroprateChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.presentdroprateChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the stutterrate property changes.", + "kind": "function", + "name": "stutterrateChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.stutterrateChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gameLoopRate property changes.", + "kind": "function", + "name": "gameLoopRateChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gameLoopRateChanged", + "scope": "static" + }, + { + "description": "Trigered when", + "kind": "function", + "name": "numPhysicsBodiesChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.numPhysicsBodiesChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the avatarCount property changes.", + "kind": "function", + "name": "avatarCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.avatarCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the updatedAvatarCount property changes.", + "kind": "function", + "name": "updatedAvatarCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.updatedAvatarCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the notUpdatedAvatarCount property changes.", + "kind": "function", + "name": "notUpdatedAvatarCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.notUpdatedAvatarCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the packetInCount property changes.", + "kind": "function", + "name": "packetInCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.packetInCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the packetOutCount property changes.", + "kind": "function", + "name": "packetOutCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.packetOutCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the mbpsIn property changes.", + "kind": "function", + "name": "mbpsInChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.mbpsInChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the mbpsOut property changes.", + "kind": "function", + "name": "mbpsOutChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.mbpsOutChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the assetMbpsIn property changes.", + "kind": "function", + "name": "assetMbpsInChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.assetMbpsInChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the assetMbpsOut property changes.", + "kind": "function", + "name": "assetMbpsOutChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.assetMbpsOutChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioPing property changes.", + "kind": "function", + "name": "audioPingChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioPingChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the avatarPing property changes.", + "kind": "function", + "name": "avatarPingChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.avatarPingChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the entitiesPing property changes.", + "kind": "function", + "name": "entitiesPingChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.entitiesPingChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the assetPing property changes.", + "kind": "function", + "name": "assetPingChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.assetPingChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the messagePing property changes.", + "kind": "function", + "name": "messagePingChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.messagePingChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the position property changes.", + "kind": "function", + "name": "positionChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.positionChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the speed property changes.", + "kind": "function", + "name": "speedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.speedChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the yaw property changes.", + "kind": "function", + "name": "yawChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.yawChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the avatarMixerInKbps property changes.", + "kind": "function", + "name": "avatarMixerInKbpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.avatarMixerInKbpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the avatarMixerInPps property changes.", + "kind": "function", + "name": "avatarMixerInPpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.avatarMixerInPpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the avatarMixerOutKbps property changes.", + "kind": "function", + "name": "avatarMixerOutKbpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.avatarMixerOutKbpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the avatarMixerOutPps property changes.", + "kind": "function", + "name": "avatarMixerOutPpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.avatarMixerOutPpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the myAvatarSendRate property changes.", + "kind": "function", + "name": "myAvatarSendRateChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.myAvatarSendRateChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioMixerInKbps property changes.", + "kind": "function", + "name": "audioMixerInKbpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioMixerInKbpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioMixerInPps property changes.", + "kind": "function", + "name": "audioMixerInPpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioMixerInPpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioMixerOutKbps property changes.", + "kind": "function", + "name": "audioMixerOutKbpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioMixerOutKbpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioMixerOutPps property changes.", + "kind": "function", + "name": "audioMixerOutPpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioMixerOutPpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioMixerKbps property changes.", + "kind": "function", + "name": "audioMixerKbpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioMixerKbpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioMixerPps property changes.", + "kind": "function", + "name": "audioMixerPpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioMixerPpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioOutboundPPS property changes.", + "kind": "function", + "name": "audioOutboundPPSChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioOutboundPPSChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioSilentOutboundPPS property changes.", + "kind": "function", + "name": "audioSilentOutboundPPSChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioSilentOutboundPPSChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioAudioInboundPPS property changes.", + "kind": "function", + "name": "audioAudioInboundPPSChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioAudioInboundPPSChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioSilentInboundPPS property changes.", + "kind": "function", + "name": "audioSilentInboundPPSChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioSilentInboundPPSChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioPacketLoss property changes.", + "kind": "function", + "name": "audioPacketLossChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioPacketLossChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioCodec property changes.", + "kind": "function", + "name": "audioCodecChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioCodecChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the audioNoiseGate property changes.", + "kind": "function", + "name": "audioNoiseGateChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.audioNoiseGateChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the entityPacketsInKbps property changes.", + "kind": "function", + "name": "entityPacketsInKbpsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.entityPacketsInKbpsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the downloads property changes.", + "kind": "function", + "name": "downloadsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.downloadsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the downloadLimit property changes.", + "kind": "function", + "name": "downloadLimitChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.downloadLimitChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the downloadsPending property changes.", + "kind": "function", + "name": "downloadsPendingChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.downloadsPendingChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the downloadUrls property changes.", + "kind": "function", + "name": "downloadUrlsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.downloadUrlsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the processing property changes.", + "kind": "function", + "name": "processingChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.processingChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the processingPending property changes.", + "kind": "function", + "name": "processingPendingChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.processingPendingChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the triangles property changes.", + "kind": "function", + "name": "trianglesChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.trianglesChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the drawcalls property changes.\rThis", + "kind": "function", + "name": "drawcallsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.drawcallsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the materialSwitches property changes.", + "kind": "function", + "name": "materialSwitchesChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.materialSwitchesChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the itemConsidered property changes.", + "kind": "function", + "name": "itemConsideredChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.itemConsideredChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the itemOutOfView property changes.", + "kind": "function", + "name": "itemOutOfViewChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.itemOutOfViewChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the itemTooSmall property changes.", + "kind": "function", + "name": "itemTooSmallChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.itemTooSmallChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the itemRendered property changes.", + "kind": "function", + "name": "itemRenderedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.itemRenderedChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the shadowConsidered property changes.", + "kind": "function", + "name": "shadowConsideredChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.shadowConsideredChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the shadowOutOfView property changes.", + "kind": "function", + "name": "shadowOutOfViewChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.shadowOutOfViewChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the shadowTooSmall property changes.", + "kind": "function", + "name": "shadowTooSmallChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.shadowTooSmallChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the shadowRendered property changes.", + "kind": "function", + "name": "shadowRenderedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.shadowRenderedChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the sendingMode property changes.", + "kind": "function", + "name": "sendingModeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.sendingModeChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the packetStats property changes.", + "kind": "function", + "name": "packetStatsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.packetStatsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the lodStatus property changes.", + "kind": "function", + "name": "lodStatusChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.lodStatusChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the serverElements property changes.", + "kind": "function", + "name": "serverElementsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.serverElementsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the serverInternal property changes.", + "kind": "function", + "name": "serverInternalChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.serverInternalChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the serverLeaves property changes.", + "kind": "function", + "name": "serverLeavesChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.serverLeavesChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the localElements property changes.", + "kind": "function", + "name": "localElementsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.localElementsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the localInternal property changes.", + "kind": "function", + "name": "localInternalChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.localInternalChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the localLeaves property changes.", + "kind": "function", + "name": "localLeavesChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.localLeavesChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the timingStats property changes.", + "kind": "function", + "name": "timingStatsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.timingStatsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gameUpdateStats property changes.", + "kind": "function", + "name": "gameUpdateStatsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gameUpdateStatsChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the glContextSwapchainMemory property changes.", + "kind": "function", + "name": "glContextSwapchainMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.glContextSwapchainMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the qmlTextureMemory property changes.", + "kind": "function", + "name": "qmlTextureMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.qmlTextureMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the texturePendingTransfers property changes.", + "kind": "function", + "name": "texturePendingTransfersChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.texturePendingTransfersChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuBuffers property changes.", + "kind": "function", + "name": "gpuBuffersChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuBuffersChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuBufferMemory property changes.", + "kind": "function", + "name": "gpuBufferMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuBufferMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuTextures property changes.", + "kind": "function", + "name": "gpuTexturesChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuTexturesChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuTextureMemory property changes.", + "kind": "function", + "name": "gpuTextureMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuTextureMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuTextureResidentMemory property changes.", + "kind": "function", + "name": "gpuTextureResidentMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuTextureResidentMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuTextureFramebufferMemory property changes.", + "kind": "function", + "name": "gpuTextureFramebufferMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuTextureFramebufferMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuTextureResourceMemory property changes.", + "kind": "function", + "name": "gpuTextureResourceMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuTextureResourceMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuTextureResourceIdealMemory property changes.", + "kind": "function", + "name": "gpuTextureResourceIdealMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuTextureResourceIdealMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuTextureResourcePopulatedMemory property changes.", + "kind": "function", + "name": "gpuTextureResourcePopulatedMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuTextureResourcePopulatedMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuTextureExternalMemory property changes.", + "kind": "function", + "name": "gpuTextureExternalMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuTextureExternalMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuTextureMemoryPressureState property changes.", + "kind": "function", + "name": "gpuTextureMemoryPressureStateChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuTextureMemoryPressureStateChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuFreeMemory property changes.", + "kind": "function", + "name": "gpuFreeMemoryChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuFreeMemoryChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuFrameTime property changes.", + "kind": "function", + "name": "gpuFrameTimeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuFrameTimeChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuFrameTime property changes.", + "kind": "function", + "name": "gpuFrameTimeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuFrameTimeChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the gpuFrameTime property changes.", + "kind": "function", + "name": "gpuFrameTimeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.gpuFrameTimeChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the batchFrameTime property changes.", + "kind": "function", + "name": "batchFrameTimeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.batchFrameTimeChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the engineFrameTime property changes.", + "kind": "function", + "name": "engineFrameTimeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.engineFrameTimeChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the avatarSimulationTime property changes.", + "kind": "function", + "name": "avatarSimulationTimeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.avatarSimulationTimeChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the rectifiedTextureCount property changes.", + "kind": "function", + "name": "rectifiedTextureCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.rectifiedTextureCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the decimatedTextureCount property changes.", + "kind": "function", + "name": "decimatedTextureCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.decimatedTextureCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the parent item changes.", + "kind": "function", + "name": "parentChanged", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "parent" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.parentChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the x property changes.", + "kind": "function", + "name": "xChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.xChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the y property changes.", + "kind": "function", + "name": "yChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.yChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the z property changes.", + "kind": "function", + "name": "zChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.zChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the width property changes.", + "kind": "function", + "name": "widthChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.widthChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the height property changes.", + "kind": "function", + "name": "heightChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.heightChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the opacity property changes.", + "kind": "function", + "name": "opacityChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.opacityChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the enabled property changes.", + "kind": "function", + "name": "enabledChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.enabledChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the visibleChanged property changes.", + "kind": "function", + "name": "visibleChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.visibleChanged", + "scope": "static" + }, + { + "description": "Triggered when the list of visible children changes.", + "kind": "function", + "name": "visibleChildrenChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.visibleChildrenChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the state property changes.", + "kind": "function", + "name": "stateChanged", + "tags": [ + { + "originalTitle": "paramm", + "title": "paramm", + "text": "{string} state", + "value": "{string} state" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.stateChanged", + "scope": "static" + }, + { + "description": "Triggered when the position and size of the rectangle containing the children changes.", + "kind": "function", + "name": "childrenRectChanged", + "params": [ + { + "type": { + "names": [ + "Rect" + ] + }, + "name": "childrenRect" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.childrenRectChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the baselineOffset property changes.", + "kind": "function", + "name": "baselineOffsetChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "baselineOffset" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.baselineOffsetChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the clip property changes.", + "kind": "function", + "name": "clipChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "clip" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.clipChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the focus property changes.", + "kind": "function", + "name": "focusChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "focus" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.focusChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the activeFocus property changes.", + "kind": "function", + "name": "activeFocusChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "activeFocus" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.activeFocusChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the activeFocusOnTab property changes.", + "kind": "function", + "name": "activeFocusOnTabChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "activeFocusOnTab" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.activeFocusOnTabChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the rotation property changes.", + "kind": "function", + "name": "rotationChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.rotationChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the scaleChanged property changes.", + "kind": "function", + "name": "scaleChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.scaleChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the transformOrigin property changes.", + "kind": "function", + "name": "transformOriginChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "transformOrigin" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.transformOriginChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the smooth property changes.", + "kind": "function", + "name": "smoothChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "smooth" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.smoothChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the antialiasing property changes.", + "kind": "function", + "name": "antialiasingChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "antialiasing" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.antialiasingChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the implicitWidth property changes.", + "kind": "function", + "name": "implicitWidthChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.implicitWidthChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the implicitHeight property changes.", + "kind": "function", + "name": "implicitHeightChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.implicitHeightChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "windowChanged", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "window" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.windowChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "grabToImage", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "callback" + }, + { + "type": { + "names": [ + "Size" + ] + }, + "optional": true, + "defaultvalue": "0,0", + "name": "targetSize" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.grabToImage", + "scope": "static" + }, + { + "kind": "function", + "name": "contains", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "point" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.contains", + "scope": "static" + }, + { + "kind": "function", + "name": "mapFromItem", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "item" + } + ], + "memberof": "Stats", + "longname": "Stats.mapFromItem", + "scope": "static" + }, + { + "kind": "function", + "name": "mapToItem", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "item" + } + ], + "memberof": "Stats", + "longname": "Stats.mapToItem", + "scope": "static" + }, + { + "kind": "function", + "name": "mapFromGlobal", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "global" + } + ], + "memberof": "Stats", + "longname": "Stats.mapFromGlobal", + "scope": "static" + }, + { + "kind": "function", + "name": "mapToGlobal", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "global" + } + ], + "memberof": "Stats", + "longname": "Stats.mapToGlobal", + "scope": "static" + }, + { + "kind": "function", + "name": "forceActiveFocus", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 7, + "name": "reason" + } + ], + "memberof": "Stats", + "longname": "Stats.forceActiveFocus", + "scope": "static" + }, + { + "kind": "function", + "name": "nextItemInFocusChain", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "name": "forward" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.nextItemInFocusChain", + "scope": "static" + }, + { + "kind": "function", + "name": "childAt", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "y" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.childAt", + "scope": "static" + }, + { + "kind": "function", + "name": "update", + "memberof": "Stats", + "longname": "Stats.update", + "scope": "static" + }, + { + "description": "Triggered when the value of the stylusPicksCount property changes.", + "kind": "function", + "name": "stylusPicksCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.stylusPicksCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the rayPicksCount property changes.", + "kind": "function", + "name": "rayPicksCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.rayPicksCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the parabolaPicksCount property changes.", + "kind": "function", + "name": "parabolaPicksCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.parabolaPicksCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the collisionPicksCount property changes.", + "kind": "function", + "name": "collisionPicksCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.collisionPicksCountChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the stylusPicksUpdated property changes.", + "kind": "function", + "name": "stylusPicksUpdatedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.stylusPicksUpdatedChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the rayPicksUpdated property changes.", + "kind": "function", + "name": "rayPicksUpdatedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.rayPicksUpdatedChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the parabolaPicksUpdated property changes.", + "kind": "function", + "name": "parabolaPicksUpdatedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.parabolaPicksUpdatedChanged", + "scope": "static" + }, + { + "description": "Triggered when the value of the collisionPicksUpdated property changes.", + "kind": "function", + "name": "collisionPicksUpdatedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Stats", + "longname": "Stats.collisionPicksUpdatedChanged", + "scope": "static" + }, + { + "description": "These are the properties of a circle3d {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "Circle3DProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "circle3d", + "description": "Has the value \"circle3d\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and\r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "defaultvalue": "1,1", + "description": "The dimensions of the overlay. Synonyms: scale, size.\r Not used.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The counter-clockwise angle from the overlay's x-axis that drawing starts at, in degrees.", + "name": "startAt" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 360, + "description": "The counter-clockwise angle from the overlay's x-axis that drawing ends at, in degrees.", + "name": "endAt" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The outer radius of the overlay, in meters. Synonym: radius.", + "name": "outerRadius" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The inner radius of the overlay, in meters.", + "name": "innerRadius" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay. Setting this value also sets the values of \r innerStartColor, innerEndColor, outerStartColor, and outerEndColor.", + "name": "color" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "Sets the values of innerStartColor and outerStartColor.\r Write-only.", + "name": "startColor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "Sets the values of innerEndColor and outerEndColor.\r Write-only.", + "name": "endColor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "Sets the values of innerStartColor and innerEndColor.\r Write-only.", + "name": "innerColor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "Sets the values of outerStartColor and outerEndColor.\r Write-only.", + "name": "outerColor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "The color at the inner start point of the overlay.", + "name": "innerStartcolor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "The color at the inner end point of the overlay.", + "name": "innerEndColor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "The color at the outer start point of the overlay.", + "name": "outerStartColor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "description": "The color at the outer end point of the overlay.", + "name": "outerEndColor" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.5, + "description": "The opacity of the overlay, 0.0 - 1.0. Setting this value also sets\r the values of innerStartAlpha, innerEndAlpha, outerStartAlpha, and \r outerEndAlpha. Synonym: Alpha; write-only.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Sets the values of innerStartAlpha and outerStartAlpha.\r Write-only.", + "name": "startAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Sets the values of innerEndAlpha and outerEndAlpha.\r Write-only.", + "name": "endAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Sets the values of innerStartAlpha and innerEndAlpha.\r Write-only.", + "name": "innerAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Sets the values of outerStartAlpha and outerEndAlpha.\r Write-only.", + "name": "outerAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The alpha at the inner start point of the overlay.", + "name": "innerStartAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The alpha at the inner end point of the overlay.", + "name": "innerEndAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The alpha at the outer start point of the overlay.", + "name": "outerStartAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The alpha at the outer end point of the overlay.", + "name": "outerEndAlpha" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, tick marks are drawn.", + "name": "hasTickMarks" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The angle between major tick marks, in degrees.", + "name": "majorTickMarksAngle" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The angle between minor tick marks, in degrees.", + "name": "minorTickMarksAngle" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The length of the major tick marks, in meters. A positive value draws tick marks\r outwards from the inner radius; a negative value draws tick marks inwards from the outer radius.", + "name": "majorTickMarksLength" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The length of the minor tick marks, in meters. A positive value draws tick marks\r outwards from the inner radius; a negative value draws tick marks inwards from the outer radius.", + "name": "minorTickMarksLength" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "0,0,0", + "description": "The color of the major tick marks.", + "name": "majorTickMarksColor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "0,0,0", + "description": "The color of the minor tick marks.", + "name": "minorTickMarksColor" + } + ], + "memberof": "Overlays", + "longname": "Overlays.Circle3DProperties", + "scope": "static" + }, + { + "description": "These are the properties of a cube {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "CubeProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "cube", + "description": "Has the value \"cube\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the overlay, 0.0 - 1.0.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and\r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled.\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The dimensions of the overlay. Synonyms: scale, size.", + "name": "dimensions" + } + ], + "memberof": "Overlays", + "longname": "Overlays.CubeProperties", + "scope": "static" + }, + { + "description": "These are the properties of a grid {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "GridProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "grid", + "description": "Has the value \"grid\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the overlay, 0.0 - 1.0.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and\r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled.\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "defaultvalue": "1,1", + "description": "The dimensions of the overlay. Synonyms: scale, size.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the grid is always visible even as the camera moves to another\r position.", + "name": "followCamera" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 5, + "description": "Integer number of minorGridEvery intervals at which to draw a thick grid \r line. Minimum value = 1.", + "name": "majorGridEvery" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "Real number of meters at which to draw thin grid lines. Minimum value = \r 0.001.", + "name": "minorGridEvery" + } + ], + "memberof": "Overlays", + "longname": "Overlays.GridProperties", + "scope": "static" + }, + { + "description": "These are the properties of an image3d {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "Image3DProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "image3d", + "description": "Has the value \"image3d\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the overlay, 0.0 - 1.0.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and \r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled.\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "defaultvalue": "1,1", + "description": "The dimensions of the overlay. Synonyms: scale, size.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true, the overlay is rotated to face the user's camera about an axis\r parallel to the user's avatar's \"up\" direction.", + "name": "isFacingAvatar" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the PNG or JPG image to display.", + "name": "url" + }, + { + "type": { + "names": [ + "Rect" + ] + }, + "description": "The portion of the image to display. Defaults to the full image.", + "name": "subImage" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true, the overlay is displayed at full brightness, otherwise it is rendered\r with scene lighting.", + "name": "emissive" + } + ], + "memberof": "Overlays", + "longname": "Overlays.Image3DProperties", + "scope": "static" + }, + { + "description": "These are the properties of an image {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "ImageProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Rect" + ] + }, + "description": "The position and size of the image display area, in pixels. Write-only.", + "name": "bounds" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer left, x-coordinate value of the image display area = bounds.x.\r Write-only.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer top, y-coordinate value of the image display area = bounds.y.\r Write-only.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer width of the image display area = bounds.width. Write-only.", + "name": "width" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer height of the image display area = bounds.height. Write-only.", + "name": "height" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the image file to display. The image is scaled to fit to the bounds.\r Write-only.", + "name": "imageURL" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "defaultvalue": "0,0", + "description": "Integer coordinates of the top left pixel to start using image content from.\r Write-only.", + "name": "subImage" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "0,0,0", + "description": "The color to apply over the top of the image to colorize it. Write-only.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "0.0", + "description": "The opacity of the color applied over the top of the image, 0.0 - \r 1.0. Write-only.", + "name": "alpha" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.\r Write-only.", + "name": "visible" + } + ], + "memberof": "Overlays", + "longname": "Overlays.ImageProperties", + "scope": "static" + }, + { + "description": "These are the properties of a line3d {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "Line3DProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "line3d", + "description": "Has the value \"line3d\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the overlay, 0.0 - 1.0.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and\r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled.\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the end point of the line is parented to.", + "name": "endParentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the end point of the line is\r attached to if parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "endParentJointIndex" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The start point of the line. Synonyms: startPoint, p1, and\r position.", + "name": "start" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The end point of the line. Synonyms: endPoint and p2.", + "name": "end" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as start. Synonym: localPosition.", + "name": "localStart" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r endParentID set, otherwise the same value as end.", + "name": "localEnd" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The length of the line, in meters. This can be set after creating a line with start and end\r points.", + "name": "length" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If glow > 0, the line is rendered with a glow.", + "name": "glow" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.02, + "description": "If glow > 0, this is the width of the glow, in meters.", + "name": "lineWidth" + } + ], + "memberof": "Overlays", + "longname": "Overlays.Line3DProperties", + "scope": "static" + }, + { + "description": "These are the properties of a model {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "ModelProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "sphere", + "description": "Has the value \"model\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the overlay, 0.0 - 1.0.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and\r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled.\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the mesh parts of the model are LOD culled as a group.\r If false, separate mesh parts will be LOD culled individually.", + "name": "isGroupCulled" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the FBX or OBJ model used for the overlay.", + "name": "url" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "0.0", + "description": "The priority for loading and displaying the overlay. Overlays with higher values load \r first.", + "name": "loadPriority" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The dimensions of the overlay. Synonym: size.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The scale factor applied to the model's dimensions.", + "name": "scale" + }, + { + "type": { + "names": [ + "object." + ] + }, + "description": "Maps the named textures in the model to the JPG or PNG images in the urls.", + "name": "textures" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The names of the joints - if any - in the model. Read-only.", + "name": "jointNames" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The relative rotations of the model's joints. Not copied if overlay is \r cloned.", + "name": "jointRotations" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The relative translations of the model's joints. Not copied if overlay is \r cloned.", + "name": "jointTranslations" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The absolute orientations of the model's joints, in world coordinates.\r Read-only.", + "name": "jointOrientations" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The absolute positions of the model's joints, in world coordinates.\r Read-only.", + "name": "jointPositions" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The URL of an FBX file containing an animation to play.", + "name": "animationSettings.url" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The frame rate (frames/sec) to play the animation at.", + "name": "animationSettings.fps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The frame to start playing at.", + "name": "animationSettings.firstFrame" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The frame to finish playing at.", + "name": "animationSettings.lastFrame" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The current frame being played.", + "name": "animationSettings.currentFrame" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Whether or not the animation is playing.", + "name": "animationSettings.running" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Whether or not the animation should repeat in a loop.", + "name": "animationSettings.loop" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Whether or not when the animation finishes, the rotations and \r translations of the last frame played should be maintained.", + "name": "animationSettings.hold" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Whether or not translations contained in the animation should\r be played.", + "name": "animationSettings.allowTranslation" + } + ], + "memberof": "Overlays", + "longname": "Overlays.ModelProperties", + "scope": "static" + }, + { + "description": "

An overlay may be one of the following types:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
Value2D/3DDescription
circle3d3DA circle.
cube3DA cube. Can also use a shape overlay to create a \r cube.
grid3DA grid of lines in a plane.
image2DAn image. Synonym: billboard.
image3d3DAn image.
line3d3DA line.
model3DA model.
rectangle2DA rectangle.
rectangle3d3DA rectangle.
shape3DA geometric shape, such as a cube, sphere, or cylinder.
sphere3DA sphere. Can also use a shape overlay to create a \r sphere.
text2DText.
text3d3DText.
web3d3DWeb content.
\r

2D overlays are rendered on the display surface in desktop mode and on the HUD surface in HMD mode. 3D overlays are\rrendered at a position and orientation in-world.

\r

Each overlay type has different {@link Overlays.OverlayProperties|OverlayProperties}.

", + "kind": "typedef", + "name": "OverlayType", + "type": { + "names": [ + "string" + ] + }, + "memberof": "Overlays", + "longname": "Overlays.OverlayType", + "scope": "static" + }, + { + "description": "

Different overlay types have different properties:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
{@link Overlays.OverlayType|OverlayType}Overlay Properties
circle3d{@link Overlays.Circle3DProperties|Circle3DProperties}
cube{@link Overlays.CubeProperties|CubeProperties}
grid{@link Overlays.GridProperties|GridProperties}
image{@link Overlays.ImageProperties|ImageProperties}
image3d{@link Overlays.Image3DProperties|Image3DProperties}
line3d{@link Overlays.Line3DProperties|Line3DProperties}
model{@link Overlays.ModelProperties|ModelProperties}
rectangle{@link Overlays.RectangleProperties|RectangleProperties}
rectangle3d{@link Overlays.Rectangle3DProperties|Rectangle3DProperties}
shape{@link Overlays.ShapeProperties|ShapeProperties}
sphere{@link Overlays.SphereProperties|SphereProperties}
text{@link Overlays.TextProperties|TextProperties}
text3d{@link Overlays.Text3DProperties|Text3DProperties}
web3d{@link Overlays.Web3DProperties|Web3DProperties}
", + "kind": "typedef", + "name": "OverlayProperties", + "type": { + "names": [ + "object" + ] + }, + "memberof": "Overlays", + "longname": "Overlays.OverlayProperties", + "scope": "static" + }, + { + "description": "The result of a {@link PickRay} search using {@link Overlays.findRayIntersection|findRayIntersection} or \r{@link Overlays.findRayIntersectionVector|findRayIntersectionVector}.", + "kind": "typedef", + "name": "RayToOverlayIntersectionResult", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the {@link PickRay} intersected with a 3D overlay, otherwise\r false.", + "name": "intersects" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the overlay that was intersected.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The distance from the {@link PickRay} origin to the intersection point.", + "name": "distance" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The normal of the overlay surface at the intersection point.", + "name": "surfaceNormal" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the intersection point.", + "name": "intersection" + }, + { + "type": { + "names": [ + "object" + ] + }, + "description": "Additional intersection details, if available.", + "name": "extraInfo" + } + ], + "memberof": "Overlays", + "longname": "Overlays.RayToOverlayIntersectionResult", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Overlays API provides facilities to create and interact with overlays. Overlays are 2D and 3D objects visible only to\ryourself and that aren't persisted to the domain. They are used for UI.", + "kind": "namespace", + "name": "Overlays", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "Get or set the {@link Overlays.OverlayType|web3d} overlay that has keyboard focus.\r If no overlay has keyboard focus, get returns null; set to null or {@link Uuid|Uuid.NULL} to \r clear keyboard focus.", + "name": "keyboardFocusOverlay" + } + ], + "longname": "Overlays", + "scope": "global" + }, + { + "description": "Add an overlay to the scene.", + "kind": "function", + "name": "addOverlay", + "params": [ + { + "type": { + "names": [ + "Overlays.OverlayType" + ] + }, + "description": "The type of the overlay to add.", + "name": "type" + }, + { + "type": { + "names": [ + "Overlays.OverlayProperties" + ] + }, + "description": "The properties of the overlay to add.", + "name": "properties" + } + ], + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the newly created overlay if successful, otherwise {@link Uuid|Uuid.NULL}." + } + ], + "examples": [ + "Add a cube overlay in front of your avatar.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});" + ], + "memberof": "Overlays", + "longname": "Overlays.addOverlay", + "scope": "static" + }, + { + "description": "Create a clone of an existing overlay.", + "kind": "function", + "name": "cloneOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to clone.", + "name": "overlayID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the new overlay if successful, otherwise {@link Uuid|Uuid.NULL}." + } + ], + "examples": [ + "Add an overlay in front of your avatar, clone it, and move the clone to be above the \r original.\rvar position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 }));\rvar original = Overlays.addOverlay(\"cube\", {\r position: position,\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\r\rvar clone = Overlays.cloneOverlay(original);\rOverlays.editOverlay(clone, {\r position: Vec3.sum({ x: 0, y: 0.5, z: 0}, position)\r});" + ], + "memberof": "Overlays", + "longname": "Overlays.cloneOverlay", + "scope": "static" + }, + { + "description": "Edit an overlay's properties.", + "kind": "function", + "name": "editOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to edit.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "Overlays.OverlayProperties" + ] + }, + "description": "The properties changes to make.", + "name": "properties" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the overlay was found and edited, otherwise false." + } + ], + "examples": [ + "Add an overlay in front of your avatar then change its color.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\r\rvar success = Overlays.editOverlay(overlay, {\r color: { red: 255, green: 0, blue: 0 }\r});\rprint(\"Success: \" + success);" + ], + "memberof": "Overlays", + "longname": "Overlays.editOverlay", + "scope": "static" + }, + { + "description": "Edit multiple overlays' properties.", + "kind": "function", + "name": "editOverlays", + "params": [ + { + "type": { + "names": [ + "object." + ] + }, + "description": "An object with overlay IDs as keys and\r {@link Overlays.OverlayProperties|OverlayProperties} edits to make as values.", + "name": "propertiesById" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if all overlays were found and edited, otherwise false (some may have\r been found and edited)." + } + ], + "examples": [ + "Create two overlays in front of your avatar then change their colors.\rvar overlayA = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: -0.3, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rvar overlayB = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0.3, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\r\rvar overlayEdits = {};\roverlayEdits[overlayA] = { color: { red: 255, green: 0, blue: 0 } };\roverlayEdits[overlayB] = { color: { red: 0, green: 255, blue: 0 } };\rvar success = Overlays.editOverlays(overlayEdits);\rprint(\"Success: \" + success);" + ], + "memberof": "Overlays", + "longname": "Overlays.editOverlays", + "scope": "static" + }, + { + "description": "Delete an overlay.", + "kind": "function", + "name": "deleteOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to delete.", + "name": "overlayID" + } + ], + "examples": [ + "Create an overlay in front of your avatar then delete it.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rprint(\"Overlay: \" + overlay);\rOverlays.deleteOverlay(overlay);" + ], + "memberof": "Overlays", + "longname": "Overlays.deleteOverlay", + "scope": "static" + }, + { + "description": "Get the type of an overlay.", + "kind": "function", + "name": "getOverlayType", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to get the type of.", + "name": "overlayID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Overlays.OverlayType" + ] + }, + "description": "The type of the overlay if found, otherwise an empty string." + } + ], + "examples": [ + "Create an overlay in front of your avatar then get and report its type.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rvar type = Overlays.getOverlayType(overlay);\rprint(\"Type: \" + type);" + ], + "memberof": "Overlays", + "longname": "Overlays.getOverlayType", + "scope": "static" + }, + { + "description": "Get the overlay script object. In particular, this is useful for accessing the event bridge for a web3d \roverlay.", + "kind": "function", + "name": "getOverlayObject", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to get the script object of.", + "name": "overlayID" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + }, + "description": "The script object for the overlay if found." + } + ], + "examples": [ + "Receive \"hello\" messages from a web3d overlay.\r// HTML file: name \"web3d.html\".\r\r\r\r HELLO\r\r\r

HELLO

\r \r\r\r\r// Script file.\rvar web3dOverlay = Overlays.addOverlay(\"web3d\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, {x: 0, y: 0.5, z: -3 })),\r rotation: MyAvatar.orientation,\r url: Script.resolvePath(\"web3d.html\"),\r alpha: 1.0\r});\r\rfunction onWebEventReceived(event) {\r print(\"onWebEventReceived() : \" + JSON.stringify(event));\r}\r\roverlayObject = Overlays.getOverlayObject(web3dOverlay);\roverlayObject.webEventReceived.connect(onWebEventReceived);\r\rScript.scriptEnding.connect(function () {\r Overlays.deleteOverlay(web3dOverlay);\r});" + ], + "memberof": "Overlays", + "longname": "Overlays.getOverlayObject", + "scope": "static" + }, + { + "description": "Get the ID of the 2D overlay at a particular point on the screen or HUD.", + "kind": "function", + "name": "getOverlayAtPoint", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The point to check for an overlay.", + "name": "point" + } + ], + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the 2D overlay at the specified point if found, otherwise null." + } + ], + "examples": [ + "Create a 2D overlay and add an event function that reports the overlay clicked on, if any.\rvar overlay = Overlays.addOverlay(\"rectangle\", {\r bounds: { x: 100, y: 100, width: 200, height: 100 },\r color: { red: 255, green: 255, blue: 255 }\r});\rprint(\"Created: \" + overlay);\r\rController.mousePressEvent.connect(function (event) {\r var overlay = Overlays.getOverlayAtPoint({ x: event.x, y: event.y });\r print(\"Clicked: \" + overlay);\r});" + ], + "memberof": "Overlays", + "longname": "Overlays.getOverlayAtPoint", + "scope": "static" + }, + { + "description": "Get the value of a 3D overlay's property.", + "kind": "function", + "name": "getProperty", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay. Must be for a 3D {@link Overlays.OverlayType|OverlayType}.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the property value to get.", + "name": "property" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + }, + "description": "The value of the property if the 3D overlay and property can be found, otherwise\r undefined." + } + ], + "examples": [ + "Create an overlay in front of your avatar then report its alpha property value.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rvar alpha = Overlays.getProperty(overlay, \"alpha\");\rprint(\"Overlay alpha: \" + alpha);" + ], + "memberof": "Overlays", + "longname": "Overlays.getProperty", + "scope": "static" + }, + { + "description": "Get the values of an overlay's properties.", + "kind": "function", + "name": "getProperties", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of names of properties to get the values of.", + "name": "properties" + } + ], + "returns": [ + { + "type": { + "names": [ + "Overlays.OverlayProperties" + ] + }, + "description": "The values of valid properties if the overlay can be found, otherwise \r undefined." + } + ], + "examples": [ + "Create an overlay in front of your avatar then report some of its properties.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rvar properties = Overlays.getProperties(overlay, [\"color\", \"alpha\", \"grabbable\"]);\rprint(\"Overlay properties: \" + JSON.stringify(properties));" + ], + "memberof": "Overlays", + "longname": "Overlays.getProperties", + "scope": "static" + }, + { + "description": "Get the values of multiple overlays' properties.", + "kind": "function", + "name": "getOverlaysProperties", + "params": [ + { + "type": { + "names": [ + "object.>" + ] + }, + "description": "An object with overlay IDs as keys and arrays of the names of \r properties to get for each as values.", + "name": "propertiesById" + } + ], + "returns": [ + { + "type": { + "names": [ + "object." + ] + }, + "description": "An object with overlay IDs as keys and\r {@link Overlays.OverlayProperties|OverlayProperties} as values." + } + ], + "examples": [ + "Create two cube overlays in front of your avatar then get some of their properties.\rvar overlayA = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: -0.3, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rvar overlayB = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0.3, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rvar propertiesToGet = {};\rpropertiesToGet[overlayA] = [\"color\", \"alpha\"];\rpropertiesToGet[overlayB] = [\"dimensions\"];\rvar properties = Overlays.getOverlaysProperties(propertiesToGet);\rprint(\"Overlays properties: \" + JSON.stringify(properties));" + ], + "memberof": "Overlays", + "longname": "Overlays.getOverlaysProperties", + "scope": "static" + }, + { + "description": "Find the closest 3D overlay intersected by a {@link PickRay}.", + "kind": "function", + "name": "findRayIntersection", + "params": [ + { + "type": { + "names": [ + "PickRay" + ] + }, + "description": "The PickRay to use for finding overlays.", + "name": "pickRay" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Unused; exists to match Entity API.", + "name": "precisionPicking" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "If not empty then the search is restricted to these overlays.", + "name": "overlayIDsToInclude" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "Overlays to ignore during the search.", + "name": "overlayIDsToExclude" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Unused; exists to match Entity API.", + "name": "visibleOnly" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Unused; exists to match Entity API.", + "name": "collidableOnly" + } + ], + "returns": [ + { + "type": { + "names": [ + "Overlays.RayToOverlayIntersectionResult" + ] + }, + "description": "The closest 3D overlay intersected by pickRay, taking\r into account overlayIDsToInclude and overlayIDsToExclude if they're not empty." + } + ], + "examples": [ + "Create a cube overlay in front of your avatar. Report 3D overlay intersection details for mouse \r clicks.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\r\rController.mousePressEvent.connect(function (event) {\r var pickRay = Camera.computePickRay(event.x, event.y);\r var intersection = Overlays.findRayIntersection(pickRay);\r print(\"Intersection: \" + JSON.stringify(intersection));\r});" + ], + "memberof": "Overlays", + "longname": "Overlays.findRayIntersection", + "scope": "static" + }, + { + "description": "Return a list of 3D overlays with bounding boxes that touch a search sphere.", + "kind": "function", + "name": "findOverlays", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The center of the search sphere.", + "name": "center" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The radius of the search sphere.", + "name": "radius" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of overlay IDs with bounding boxes that touch a search sphere." + } + ], + "examples": [ + "Create two cube overlays in front of your avatar then search for overlays near your avatar.\rvar overlayA = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: -0.3, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rprint(\"Overlay A: \" + overlayA);\rvar overlayB = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0.3, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rprint(\"Overlay B: \" + overlayB);\r\rvar overlaysFound = Overlays.findOverlays(MyAvatar.position, 5.0);\rprint(\"Overlays found: \" + JSON.stringify(overlaysFound));" + ], + "memberof": "Overlays", + "longname": "Overlays.findOverlays", + "scope": "static" + }, + { + "description": "Check whether an overlay's assets have been loaded. For example, for an image overlay the result indicates\rwhether its image has been loaded.", + "kind": "function", + "name": "isLoaded", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to check.", + "name": "overlayID" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the overlay's assets have been loaded, otherwise false." + } + ], + "examples": [ + "Create an image overlay and report whether its image is loaded after 1s.\rvar overlay = Overlays.addOverlay(\"image\", {\r bounds: { x: 100, y: 100, width: 200, height: 200 },\r imageURL: \"https://content.highfidelity.com/DomainContent/production/Particles/wispy-smoke.png\"\r});\rScript.setTimeout(function () {\r var isLoaded = Overlays.isLoaded(overlay);\r print(\"Image loaded: \" + isLoaded);\r}, 1000);" + ], + "memberof": "Overlays", + "longname": "Overlays.isLoaded", + "scope": "static" + }, + { + "description": "Calculates the size of the given text in the specified overlay if it is a text overlay.", + "kind": "function", + "name": "textSize", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to use for calculation.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The string to calculate the size of.", + "name": "text" + } + ], + "returns": [ + { + "type": { + "names": [ + "Size" + ] + }, + "description": "The size of the text if the overlay is a text overlay, otherwise\r { height: 0, width : 0 }. If the overlay is a 2D overlay, the size is in pixels; if the overlay is a 3D\r overlay, the size is in meters." + } + ], + "examples": [ + "Calculate the size of \"hello\" in a 3D text overlay.\rvar overlay = Overlays.addOverlay(\"text3d\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -2 })),\r rotation: MyAvatar.orientation,\r text: \"hello\",\r lineHeight: 0.2\r});\rvar textSize = Overlays.textSize(overlay, \"hello\");\rprint(\"Size of \\\"hello\\\": \" + JSON.stringify(textSize));" + ], + "memberof": "Overlays", + "longname": "Overlays.textSize", + "scope": "static" + }, + { + "description": "Get the width of the window or HUD.", + "kind": "function", + "name": "width", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The width, in pixels, of the Interface window if in desktop mode or the HUD if in HMD mode." + } + ], + "memberof": "Overlays", + "longname": "Overlays.width", + "scope": "static" + }, + { + "description": "Get the height of the window or HUD.", + "kind": "function", + "name": "height", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The height, in pixels, of the Interface window if in desktop mode or the HUD if in HMD mode." + } + ], + "memberof": "Overlays", + "longname": "Overlays.height", + "scope": "static" + }, + { + "description": "Check if there is an overlay of a given ID.", + "kind": "function", + "name": "isAddedOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID to check.", + "name": "overlayID" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if an overlay with the given ID exists, false otherwise." + } + ], + "memberof": "Overlays", + "longname": "Overlays.isAddedOverlay", + "scope": "static" + }, + { + "description": "Generate a mouse press event on an overlay.", + "kind": "function", + "name": "sendMousePressOnOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to generate a mouse press event on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The mouse press event details.", + "name": "event" + } + ], + "examples": [ + "Create a 2D rectangle overlay plus a 3D cube overlay and generate mousePressOnOverlay events for the 2D\roverlay.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rprint(\"3D overlay: \" + overlay);\r\rvar overlay = Overlays.addOverlay(\"rectangle\", {\r bounds: { x: 100, y: 100, width: 200, height: 100 },\r color: { red: 255, green: 255, blue: 255 }\r});\rprint(\"2D overlay: \" + overlay);\r\r// Overlays.mousePressOnOverlay by default applies only to 3D overlays.\rOverlays.mousePressOnOverlay.connect(function(overlayID, event) {\r print(\"Clicked: \" + overlayID);\r});\r\rController.mousePressEvent.connect(function (event) {\r // Overlays.getOverlayAtPoint applies only to 2D overlays.\r var overlay = Overlays.getOverlayAtPoint({ x: event.x, y: event.y });\r if (overlay) {\r Overlays.sendMousePressOnOverlay(overlay, {\r type: \"press\",\r id: 0,\r pos2D: event\r });\r }\r});" + ], + "memberof": "Overlays", + "longname": "Overlays.sendMousePressOnOverlay", + "scope": "static" + }, + { + "description": "Generate a mouse release event on an overlay.", + "kind": "function", + "name": "sendMouseReleaseOnOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to generate a mouse release event on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The mouse release event details.", + "name": "event" + } + ], + "memberof": "Overlays", + "longname": "Overlays.sendMouseReleaseOnOverlay", + "scope": "static" + }, + { + "description": "Generate a mouse move event on an overlay.", + "kind": "function", + "name": "sendMouseMoveOnOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to generate a mouse move event on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The mouse move event details.", + "name": "event" + } + ], + "memberof": "Overlays", + "longname": "Overlays.sendMouseMoveOnOverlay", + "scope": "static" + }, + { + "description": "Generate a hover enter event on an overlay.", + "kind": "function", + "name": "sendHoverEnterOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to generate a hover enter event on.", + "name": "id" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The hover enter event details.", + "name": "event" + } + ], + "memberof": "Overlays", + "longname": "Overlays.sendHoverEnterOverlay", + "scope": "static" + }, + { + "description": "Generate a hover over event on an overlay.", + "kind": "function", + "name": "sendHoverOverOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to generate a hover over event on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The hover over event details.", + "name": "event" + } + ], + "memberof": "Overlays", + "longname": "Overlays.sendHoverOverOverlay", + "scope": "static" + }, + { + "description": "Generate a hover leave event on an overlay.", + "kind": "function", + "name": "sendHoverLeaveOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay to generate a hover leave event on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The hover leave event details.", + "name": "event" + } + ], + "memberof": "Overlays", + "longname": "Overlays.sendHoverLeaveOverlay", + "scope": "static" + }, + { + "description": "Get the ID of the Web3D overlay that has keyboard focus.", + "kind": "function", + "name": "getKeyboardFocusOverlay", + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Overlays.OverlayType|web3d} overlay that has focus, if any, otherwise \r null." + } + ], + "memberof": "Overlays", + "longname": "Overlays.getKeyboardFocusOverlay", + "scope": "static" + }, + { + "description": "Set the Web3D overlay that has keyboard focus.", + "kind": "function", + "name": "setKeyboardFocusOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Overlays.OverlayType|web3d} overlay to set keyboard focus to. Use \r null or {@link Uuid|Uuid.NULL} to unset keyboard focus from an overlay.", + "name": "overlayID" + } + ], + "memberof": "Overlays", + "longname": "Overlays.setKeyboardFocusOverlay", + "scope": "static" + }, + { + "description": "Triggered when an overlay is deleted.", + "kind": "function", + "name": "overlayDeleted", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay that was deleted.", + "name": "overlayID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Create an overlay then delete it after 1s.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rprint(\"Overlay: \" + overlay);\r\rOverlays.overlayDeleted.connect(function(overlayID) {\r print(\"Deleted: \" + overlayID);\r});\rScript.setTimeout(function () {\r Overlays.deleteOverlay(overlay);\r}, 1000);" + ], + "memberof": "Overlays", + "longname": "Overlays.overlayDeleted", + "scope": "static" + }, + { + "description": "Triggered when a mouse press event occurs on an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendMousePressOnOverlay|sendMousePressOnOverlay} for a 2D overlay).", + "kind": "function", + "name": "mousePressOnOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay the mouse press event occurred on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The mouse press event details.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Create a cube overlay in front of your avatar and report mouse clicks on it.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rprint(\"My overlay: \" + overlay);\r\rOverlays.mousePressOnOverlay.connect(function(overlayID, event) {\r if (overlayID === overlay) {\r print(\"Clicked on my overlay\");\r }\r});" + ], + "memberof": "Overlays", + "longname": "Overlays.mousePressOnOverlay", + "scope": "static" + }, + { + "description": "Triggered when a mouse double press event occurs on an overlay. Only occurs for 3D overlays.", + "kind": "function", + "name": "mouseDoublePressOnOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay the mouse double press event occurred on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The mouse double press event details.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Overlays", + "longname": "Overlays.mouseDoublePressOnOverlay", + "scope": "static" + }, + { + "description": "Triggered when a mouse release event occurs on an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendMouseReleaseOnOverlay|sendMouseReleaseOnOverlay} for a 2D overlay).", + "kind": "function", + "name": "mouseReleaseOnOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay the mouse release event occurred on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The mouse release event details.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Overlays", + "longname": "Overlays.mouseReleaseOnOverlay", + "scope": "static" + }, + { + "description": "Triggered when a mouse move event occurs on an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendMouseMoveOnOverlay|sendMouseMoveOnOverlay} for a 2D overlay).", + "kind": "function", + "name": "mouseMoveOnOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay the mouse moved event occurred on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The mouse move event details.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Overlays", + "longname": "Overlays.mouseMoveOnOverlay", + "scope": "static" + }, + { + "description": "Triggered when a mouse press event occurs on something other than a 3D overlay.", + "kind": "function", + "name": "mousePressOffOverlay", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Overlays", + "longname": "Overlays.mousePressOffOverlay", + "scope": "static" + }, + { + "description": "Triggered when a mouse double press event occurs on something other than a 3D overlay.", + "kind": "function", + "name": "mouseDoublePressOffOverlay", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Overlays", + "longname": "Overlays.mouseDoublePressOffOverlay", + "scope": "static" + }, + { + "description": "Triggered when a mouse cursor starts hovering over an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendHoverEnterOverlay|sendHoverEnterOverlay} for a 2D overlay).", + "kind": "function", + "name": "hoverEnterOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay the mouse moved event occurred on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The mouse move event details.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Create a cube overlay in front of your avatar and report when you start hovering your mouse over\r it.\rvar overlay = Overlays.addOverlay(\"cube\", {\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.3, y: 0.3, z: 0.3 },\r solid: true\r});\rprint(\"Overlay: \" + overlay);\rOverlays.hoverEnterOverlay.connect(function(overlayID, event) {\r print(\"Hover enter: \" + overlayID);\r});" + ], + "memberof": "Overlays", + "longname": "Overlays.hoverEnterOverlay", + "scope": "static" + }, + { + "description": "Triggered when a mouse cursor continues hovering over an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendHoverOverOverlay|sendHoverOverOverlay} for a 2D overlay).", + "kind": "function", + "name": "hoverOverOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay the hover over event occurred on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The hover over event details.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Overlays", + "longname": "Overlays.hoverOverOverlay", + "scope": "static" + }, + { + "description": "Triggered when a mouse cursor finishes hovering over an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendHoverLeaveOverlay|sendHoverLeaveOverlay} for a 2D overlay).", + "kind": "function", + "name": "hoverLeaveOverlay", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the overlay the hover leave event occurred on.", + "name": "overlayID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The hover leave event details.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Overlays", + "longname": "Overlays.hoverLeaveOverlay", + "scope": "static" + }, + { + "description": "These are the properties of a rectangle3d {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "Rectangle3DProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "rectangle3d", + "description": "Has the value \"rectangle3d\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the overlay, 0.0 - 1.0.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and\r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled.\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "defaultvalue": "1,1", + "description": "The dimensions of the overlay. Synonyms: scale, size.", + "name": "dimensions" + } + ], + "memberof": "Overlays", + "longname": "Overlays.Rectangle3DProperties", + "scope": "static" + }, + { + "description": "These are the properties of a rectangle {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "RectangleProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Rect" + ] + }, + "description": "The position and size of the rectangle, in pixels. Write-only.", + "name": "bounds" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer left, x-coordinate value = bounds.x. Write-only.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer top, y-coordinate value = bounds.y. Write-only.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer width of the rectangle = bounds.width. Write-only.", + "name": "width" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer height of the rectangle = bounds.height. Write-only.", + "name": "height" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "0,0,0", + "description": "The color of the overlay. Write-only.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "1.0", + "description": "The opacity of the overlay, 0.0 - 1.0. Write-only.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "Integer width of the border, in pixels. The border is drawn within the rectangle's bounds.\r It is not drawn unless either borderColor or borderAlpha are specified. Write-only.", + "name": "borderWidth" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Integer corner radius, in pixels. Write-only.", + "name": "radius" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "0,0,0", + "description": "The color of the border. Write-only.", + "name": "borderColor" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "1.0", + "description": "The opacity of the border, 0.0 - 1.0.\r Write-only.", + "name": "borderAlpha" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.\r Write-only.", + "name": "visible" + } + ], + "memberof": "Overlays", + "longname": "Overlays.RectangleProperties", + "scope": "static" + }, + { + "description": "

A shape {@link Overlays.OverlayType|OverlayType} may display as one of the following geometrical shapes:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDimensionsDescription
\"Circle\"2DA circle oriented in 3D.
\"Cone\"3D
\"Cube\"3D
\"Cylinder\"3D
\"Dodecahedron\"3D
\"Hexagon\"3DA hexagonal prism.
\"Icosahedron\"3D
\"Line\"1DA line oriented in 3D.
\"Octagon\"3DAn octagonal prism.
\"Octahedron\"3D
\"Quad\"2DA square oriented in 3D.
\"Sphere\"3D
\"Tetrahedron\"3D
\"Torus\"3DNot implemented.
\"Triangle\"3DA triangular prism.
", + "kind": "typedef", + "name": "Shape", + "type": { + "names": [ + "string" + ] + }, + "memberof": "Overlays", + "longname": "Overlays.Shape", + "scope": "static" + }, + { + "description": "These are the properties of a shape {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "ShapeProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "shape", + "description": "Has the value \"shape\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the overlay, 0.0 - 1.0.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and\r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled.\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The dimensions of the overlay. Synonyms: scale, size.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "Overlays.Shape" + ] + }, + "defaultvalue": "Hexagon", + "description": "The geometrical shape of the overlay.", + "name": "shape" + } + ], + "memberof": "Overlays", + "longname": "Overlays.ShapeProperties", + "scope": "static" + }, + { + "description": "These are the properties of a sphere {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "SphereProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "sphere", + "description": "Has the value \"sphere\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the overlay, 0.0 - 1.0.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and\r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled.\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The dimensions of the overlay. Synonyms: scale, size.", + "name": "dimensions" + } + ], + "memberof": "Overlays", + "longname": "Overlays.SphereProperties", + "scope": "static" + }, + { + "description": "These are the properties of a text3d {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "Text3DProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "text3d", + "description": "Has the value \"text3d\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the overlay, 0.0 - 1.0.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and\r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled.\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "defaultvalue": "1,1", + "description": "The dimensions of the overlay. Synonyms: scale, size.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true, the overlay is rotated to face the user's camera about an axis\r parallel to the user's avatar's \"up\" direction.", + "name": "isFacingAvatar" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The text to display. Text does not automatically wrap; use \\n for a line break.", + "name": "text" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The text alpha value.", + "name": "textAlpha" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "0,0,0", + "description": "The background color.", + "name": "backgroundColor" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The background alpha value.", + "name": "backgroundAlpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The height of a line of text in meters.", + "name": "lineHeight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.1, + "description": "The left margin, in meters.", + "name": "leftMargin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.1, + "description": "The top margin, in meters.", + "name": "topMargin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.1, + "description": "The right margin, in meters.", + "name": "rightMargin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.1, + "description": "The bottom margin, in meters.", + "name": "bottomMargin" + } + ], + "memberof": "Overlays", + "longname": "Overlays.Text3DProperties", + "scope": "static" + }, + { + "description": "These are the properties of a text {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "TextProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Rect" + ] + }, + "description": "The position and size of the rectangle, in pixels. Write-only.", + "name": "bounds" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer left, x-coordinate value = bounds.x. Write-only.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer top, y-coordinate value = bounds.y. Write-only.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer width of the rectangle = bounds.width. Write-only.", + "name": "width" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer height of the rectangle = bounds.height. Write-only.", + "name": "height" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Sets the leftMargin and topMargin values, in pixels.\r Write-only.", + "name": "margin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The left margin's size, in pixels. This value is also used for the right margin. \r Write-only.", + "name": "leftMargin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The top margin's size, in pixels. This value is also used for the bottom margin. \r Write-only.", + "name": "topMargin" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The text to display. Text does not automatically wrap; use \\n for a line break. Text\r is clipped to the bounds. Write-only.", + "name": "text" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 18, + "description": "The size of the text, in pixels. Write-only.", + "name": "font.size" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 18, + "description": "The height of a line of text, in pixels. Write-only.", + "name": "lineHeight" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the text. Synonym: textColor. Write-only.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "1.0", + "description": "The opacity of the overlay, 0.0 - 1.0. Write-only.", + "name": "alpha" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "0,0,0", + "description": "The color of the background rectangle. Write-only.", + "name": "backgroundColor" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the background rectangle. Write-only.", + "name": "backgroundAlpha" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.\r Write-only.", + "name": "visible" + } + ], + "memberof": "Overlays", + "longname": "Overlays.TextProperties", + "scope": "static" + }, + { + "description": "These are the properties of a web3d {@link Overlays.OverlayType|OverlayType}.", + "kind": "typedef", + "name": "Web3DProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "web3d", + "description": "Has the value \"web3d\". Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the overlay.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The opacity of the overlay, 0.0 - 1.0.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The maximum value of the pulse multiplier.", + "name": "pulseMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The minimum value of the pulse multiplier.", + "name": "pulseMin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from\r pulseMin to pulseMax, then pulseMax to pulseMin in one period.", + "name": "pulsePeriod" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "alphaPulse" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "If non-zero, the color of the overlay is pulsed: the color value is multiplied by the\r current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0\r the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise\r used.)", + "name": "colorPulse" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the overlay is rendered, otherwise it is not rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A friendly name for the overlay.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the overlay center. Synonyms: p1, point, and \r start.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local position of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as position.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay. Synonym: orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the overlay relative to its parent if the overlay has a\r parentID set, otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonyms: solid, isFilled, and filled.\r Antonyms: isWire and wire.", + "name": "isSolid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, a dashed line is drawn on the overlay's edges. Synonym:\r dashed.", + "name": "isDashedLine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, picks ignore the overlay. ignoreRayIntersection is a synonym.", + "name": "ignorePickIntersection" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the overlay is rendered in front of other overlays that don't\r have drawInFront set to true, and in front of entities.", + "name": "drawInFront" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Signal to grabbing scripts whether or not this overlay can be grabbed.", + "name": "grabbable" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The avatar, entity, or overlay that the overlay is parented to.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "Integer value specifying the skeleton joint that the overlay is attached to if\r parentID is an avatar skeleton. A value of 65535 means \"no joint\".", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true, the overlay is rotated to face the user's camera about an axis\r parallel to the user's avatar's \"up\" direction.", + "name": "isFacingAvatar" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the Web page to display.", + "name": "url" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The URL of a JavaScript file to inject into the Web page.", + "name": "scriptURL" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 30, + "description": "The dots per inch to display the Web page at, on the overlay.", + "name": "dpi" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "defaultvalue": "1,1", + "description": "The size of the overlay to display the Web page on, in meters. Synonyms: \r scale, size.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 10, + "description": "The maximum update rate for the Web overlay content, in frames/second.", + "name": "maxFPS" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the Web overlay is highlighted when it has\r keyboard focus.", + "name": "showKeyboardFocusHighlight" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "Touch", + "description": "The user input mode to use - either \"Touch\" or \"Mouse\".", + "name": "inputMode" + } + ], + "memberof": "Overlays", + "longname": "Overlays.Web3DProperties", + "scope": "static" + }, + { + "kind": "class", + "name": "AnimationObject", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "Array." + ] + }, + "name": "jointNames" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "name": "frames" + } + ], + "longname": "AnimationObject", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

" + }, + { + "kind": "function", + "name": "getJointNames", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AnimationObject", + "longname": "AnimationObject.getJointNames", + "scope": "static" + }, + { + "kind": "function", + "name": "getFrames", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AnimationObject", + "longname": "AnimationObject.getFrames", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

API to manage animation cache resources.", + "kind": "namespace", + "name": "AnimationCache", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of total resources. Read-only.", + "name": "numTotal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of cached resource. Read-only.", + "name": "numCached" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Size in bytes of all resources. Read-only.", + "name": "sizeTotal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Size in bytes of all cached resources. Read-only.", + "name": "sizeCached" + } + ], + "longname": "AnimationCache", + "scope": "global" + }, + { + "description": "Returns animation resource for particular animation.", + "kind": "function", + "name": "getAnimation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL to load.", + "name": "url" + } + ], + "returns": [ + { + "type": { + "names": [ + "AnimationObject" + ] + }, + "description": "animation" + } + ], + "memberof": "AnimationCache", + "longname": "AnimationCache.getAnimation", + "scope": "static" + }, + { + "kind": "class", + "name": "AudioStreamStats", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "lossRate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "lossCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "lossRateWindow" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "lossCountWindow" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "framesDesired" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "framesAvailable" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "framesAvailableAvg" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "unplayedMsMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "starveCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "lastStarveDurationCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "dropCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "overflowCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "timegapMsMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "timegapMsAvg" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "timegapMsMaxWindow" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "timegapMsAvgWindow" + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.AudioStreamStats", + "scope": "static", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "lossRateChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "lossRate" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.lossRateChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "lossCountChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "lossCount" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.lossCountChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "lossRateWindowChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "lossRateWindow" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.lossRateWindowChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "lossCountWindowChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "lossCountWindow" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.lossCountWindowChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "framesDesiredChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "framesDesired" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.framesDesiredChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "framesAvailableChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "framesAvailable" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.framesAvailableChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "framesAvailableAvgChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "framesAvailableAvg" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.framesAvailableAvgChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "unplayedMsMaxChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "unplayedMsMax" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.unplayedMsMaxChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "starveCountChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "starveCount" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.starveCountChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "lastStarveDurationCountChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "lastStarveDurationCount" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.lastStarveDurationCountChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "dropCountChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "dropCount" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.dropCountChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "overflowCountChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "overflowCount" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.overflowCountChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "timegapMsMaxChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "timegapMsMax" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.timegapMsMaxChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "timegapMsAvgChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "timegapMsAvg" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.timegapMsAvgChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "timegapMsMaxWindowChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "timegapMsMaxWindow" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.timegapMsMaxWindowChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "timegapMsAvgWindowChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "timegapMsAvgWindow" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats.AudioStreamStats", + "longname": "AudioStats.AudioStreamStats.timegapMsAvgWindowChanged", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

Audio stats from the client.", + "kind": "namespace", + "name": "AudioStats", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "pingMs" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "inputReadMsMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "inputUnplayedMsMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "outputUnplayedMsMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "sentTimegapMsMax" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "sentTimegapMsAvg" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "sentTimegapMsMaxWindow" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "sentTimegapMsAvgWindow" + }, + { + "type": { + "names": [ + "AudioStats.AudioStreamStats" + ] + }, + "description": "Read-only.", + "name": "clientStream" + }, + { + "type": { + "names": [ + "AudioStats.AudioStreamStats" + ] + }, + "description": "Read-only.", + "name": "mixerStream" + } + ], + "longname": "AudioStats", + "scope": "global" + }, + { + "kind": "function", + "name": "pingMsChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "pingMs" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.pingMsChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "inputReadMsMaxChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "inputReadMsMax" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.inputReadMsMaxChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "inputUnplayedMsMaxChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "inputUnplayedMsMax" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.inputUnplayedMsMaxChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "outputUnplayedMsMaxChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "outputUnplayedMsMax" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.outputUnplayedMsMaxChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sentTimegapMsMaxChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "sentTimegapMsMax" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.sentTimegapMsMaxChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sentTimegapMsAvgChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "sentTimegapMsAvg" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.sentTimegapMsAvgChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sentTimegapMsMaxWindowChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "sentTimegapMsMaxWindow" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.sentTimegapMsMaxWindowChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sentTimegapMsAvgWindowChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "sentTimegapMsAvgWindow" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.sentTimegapMsAvgWindowChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "mixerStreamChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.mixerStreamChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "clientStreamChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.clientStreamChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "injectorStreamsChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AudioStats", + "longname": "AudioStats.injectorStreamsChanged", + "scope": "static" + }, + { + "description": "Reverberation options that can be used to initialize an {@link AudioEffectOptions} object when created.", + "kind": "typedef", + "name": "ReverbOptions", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 10000, + "description": "The corner frequency (Hz) of the low-pass filter at reverb input.", + "name": "bandwidth" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 20, + "description": "The delay (milliseconds) between dry signal and the onset of early reflections.", + "name": "preDelay" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The delay (milliseconds) between early reflections and the onset of reverb tail.", + "name": "lateDelay" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 2, + "description": "The time (seconds) for the reverb tail to decay by 60dB, also known as RT60.", + "name": "reverbTime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 100, + "description": "Adjusts the buildup of echo density in the early reflections, normally 100%.", + "name": "earlyDiffusion" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 100, + "description": "Adjusts the buildup of echo density in the reverb tail, normally 100%.", + "name": "lateDiffusion" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 50, + "description": "The apparent room size, from small (0%) to large (100%).", + "name": "roomSize" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 100, + "description": "Adjusts the echo density in the reverb tail, normally 100%.", + "name": "density" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1.5, + "description": "Adjusts the bass-frequency reverb time, as multiple of reverbTime.", + "name": "bassMult" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 250, + "description": "The crossover frequency (Hz) for the onset of bassMult.", + "name": "bassFreq" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": -6, + "description": "Reduces the high-frequency reverb time, as attenuation (dB).", + "name": "highGain" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 3000, + "description": "The crossover frequency (Hz) for the onset of highGain.", + "name": "highFreq" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 2.3, + "description": "The rate of modulation (Hz) of the LFO-modulated delay lines.", + "name": "modRate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 50, + "description": "The depth of modulation (percent) of the LFO-modulated delay lines.", + "name": "modDepth" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Adjusts the relative level (dB) of the early reflections.", + "name": "earlyGain" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Adjusts the relative level (dB) of the reverb tail.", + "name": "lateGain" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 20, + "description": "The apparent distance of the source (percent) in the early reflections.", + "name": "earlyMixLeft" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 20, + "description": "The apparent distance of the source (percent) in the early reflections.", + "name": "earlyMixRight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 90, + "description": "The apparent distance of the source (percent) in the reverb tail.", + "name": "lateMixLeft" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 90, + "description": "The apparent distance of the source (percent) in the reverb tail.", + "name": "lateMixRight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 50, + "description": "Adjusts the wet/dry ratio, from completely dry (0%) to completely wet (100%).", + "name": "wetDryMix" + } + ], + "memberof": "AudioEffectOptions", + "longname": "AudioEffectOptions.ReverbOptions", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

Audio effect options used by the {@link Audio} API.\r\r

Create using new AudioEffectOptions(reverbOptions).

", + "kind": "class", + "name": "AudioEffectOptions", + "params": [ + { + "type": { + "names": [ + "AudioEffectOptions.ReverbOptions" + ] + }, + "optional": true, + "defaultvalue": null, + "description": "Reverberation options.", + "name": "reverbOptions" + } + ], + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 10000, + "description": "The corner frequency (Hz) of the low-pass filter at reverb input.", + "name": "bandwidth" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 20, + "description": "The delay (milliseconds) between dry signal and the onset of early reflections.", + "name": "preDelay" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The delay (milliseconds) between early reflections and the onset of reverb tail.", + "name": "lateDelay" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 2, + "description": "The time (seconds) for the reverb tail to decay by 60dB, also known as RT60.", + "name": "reverbTime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 100, + "description": "Adjusts the buildup of echo density in the early reflections, normally 100%.", + "name": "earlyDiffusion" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 100, + "description": "Adjusts the buildup of echo density in the reverb tail, normally 100%.", + "name": "lateDiffusion" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 50, + "description": "The apparent room size, from small (0%) to large (100%).", + "name": "roomSize" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 100, + "description": "Adjusts the echo density in the reverb tail, normally 100%.", + "name": "density" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1.5, + "description": "Adjusts the bass-frequency reverb time, as multiple of reverbTime.", + "name": "bassMult" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 250, + "description": "The crossover frequency (Hz) for the onset of bassMult.", + "name": "bassFreq" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": -6, + "description": "Reduces the high-frequency reverb time, as attenuation (dB).", + "name": "highGain" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 3000, + "description": "The crossover frequency (Hz) for the onset of highGain.", + "name": "highFreq" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 2.3, + "description": "The rate of modulation (Hz) of the LFO-modulated delay lines.", + "name": "modRate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 50, + "description": "The depth of modulation (percent) of the LFO-modulated delay lines.", + "name": "modDepth" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Adjusts the relative level (dB) of the early reflections.", + "name": "earlyGain" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Adjusts the relative level (dB) of the reverb tail.", + "name": "lateGain" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 20, + "description": "The apparent distance of the source (percent) in the early reflections.", + "name": "earlyMixLeft" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 20, + "description": "The apparent distance of the source (percent) in the early reflections.", + "name": "earlyMixRight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 90, + "description": "The apparent distance of the source (percent) in the reverb tail.", + "name": "lateMixLeft" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 90, + "description": "The apparent distance of the source (percent) in the reverb tail.", + "name": "lateMixRight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 50, + "description": "Adjusts the wet/dry ratio, from completely dry (0%) to completely wet (100%).", + "name": "wetDryMix" + } + ], + "longname": "AudioEffectOptions", + "scope": "global" + }, + { + "description": "Configures how an audio injector plays its audio.", + "kind": "typedef", + "name": "AudioInjectorOptions", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "Vec3.ZERO", + "description": "The position in the domain to play the sound.", + "name": "position" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "defaultvalue": "Quat.IDENTITY", + "description": "The orientation in the domain to play the sound in.", + "name": "orientation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "1.0", + "description": "Playback volume, between 0.0 and 1.0.", + "name": "volume" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "1.0", + "description": "Alter the pitch of the sound, within +/- 2 octaves. The value is the relative sample rate to \r resample the sound at, range 0.062516.0. A value of 0.0625 lowers the \r pitch by 2 octaves; 1.0 is no change in pitch; 16.0 raises the pitch by 2 octaves.", + "name": "pitch" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the sound is played repeatedly until playback is stopped.", + "name": "loop" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Starts playback from a specified time (seconds) within the sound file, ≥ \r 0.", + "name": "secondOffset" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "IF true, the sound is played back locally on the client rather than to\r others via the audio mixer.", + "name": "localOnly" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Deprecated: This property is deprecated and will be\r removed.", + "name": "ignorePenumbra" + } + ], + "memberof": "AudioInjector", + "longname": "AudioInjector.AudioInjectorOptions", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

An audio resource, created by {@link SoundCache.getSound}, to be played back using {@link Audio.playSound}.\r

Supported formats:

\r
    \r
  • WAV: 16-bit uncompressed WAV at any sample rate, with 1 (mono), 2(stereo), or 4 (ambisonic) channels.
  • \r
  • MP3: Mono or stereo, at any sample rate.
  • \r
  • RAW: 48khz 16-bit mono or stereo. Filename must include \".stereo\" to be interpreted as stereo.
  • \r
", + "kind": "class", + "name": "SoundObject", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the sound has been downloaded and is ready to be played, otherwise \r false.", + "name": "downloaded" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The duration of the sound, in seconds.", + "name": "duration" + } + ], + "longname": "SoundObject", + "scope": "global" + }, + { + "description": "Triggered when the sound has been downloaded and is ready to be played.", + "kind": "function", + "name": "ready", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "SoundObject", + "longname": "SoundObject.ready", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

API to manage sound cache resources.", + "kind": "namespace", + "name": "SoundCache", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of total resources. Read-only.", + "name": "numTotal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of cached resource. Read-only.", + "name": "numCached" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Size in bytes of all resources. Read-only.", + "name": "sizeTotal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Size in bytes of all cached resources. Read-only.", + "name": "sizeCached" + } + ], + "longname": "SoundCache", + "scope": "global" + }, + { + "description": "Loads the content of an audio file into a {@link SoundObject}, ready for playback by {@link Audio.playSound}.", + "kind": "function", + "name": "getSound", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the audio file to load — Web, ATP, or file. See {@link SoundObject} for supported \r formats.", + "name": "url" + } + ], + "returns": [ + { + "type": { + "names": [ + "SoundObject" + ] + }, + "description": "The sound ready for playback." + } + ], + "memberof": "SoundCache", + "longname": "SoundCache.getSound", + "scope": "static" + }, + { + "kind": "typedef", + "name": "AttachmentData", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "modelUrl" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "jointName" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "translation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "rotation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "scale" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "soft" + } + ], + "longname": "AttachmentData", + "scope": "global" + }, + { + "description": "Returns the minimum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains.", + "kind": "function", + "name": "getDomainMinScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "minimum scale allowed for this avatar in the current domain." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getDomainMinScale", + "scope": "static" + }, + { + "description": "Returns the maximum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains.", + "kind": "function", + "name": "getDomainMaxScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "maximum scale allowed for this avatar in the current domain." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getDomainMaxScale", + "scope": "static" + }, + { + "description": "Provides read only access to the current eye height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints.", + "kind": "function", + "name": "getEyeHeight", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Eye height of avatar in meters." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getEyeHeight", + "scope": "static" + }, + { + "description": "Provides read only access to the current height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints.", + "kind": "function", + "name": "getHeight", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Height of avatar in meters." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getHeight", + "scope": "static" + }, + { + "kind": "function", + "name": "setHandState", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "state" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setHandState", + "scope": "static" + }, + { + "kind": "function", + "name": "getHandState", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getHandState", + "scope": "static" + }, + { + "kind": "function", + "name": "setRawJointData", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "name": "data" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setRawJointData", + "scope": "static" + }, + { + "description": "Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointData", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent.", + "name": "translation" + } + ], + "examples": [ + "Set your avatar to it's default T-pose for a while.
\r\"Avatar\r// Set all joint translations and rotations to defaults.\rvar i, length, rotation, translation;\rfor (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {\r rotation = MyAvatar.getDefaultJointRotation(i);\r translation = MyAvatar.getDefaultJointTranslation(i);\r MyAvatar.setJointData(i, rotation, translation);\r}\r\r// Restore your avatar's motion after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointsData();\r}, 5000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setJointData", + "scope": "static" + }, + { + "description": "Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointRotation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent.", + "name": "rotation" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setJointRotation", + "scope": "static" + }, + { + "description": "Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointTranslation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent.", + "name": "translation" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setJointTranslation", + "scope": "static" + }, + { + "description": "Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly faster than the function variation that specifies the joint name.

", + "kind": "function", + "name": "clearJointData", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.clearJointData", + "scope": "static" + }, + { + "kind": "function", + "name": "isJointDataValid", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.isJointDataValid", + "scope": "static" + }, + { + "description": "Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards.", + "kind": "function", + "name": "getJointRotation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getJointRotation", + "scope": "static" + }, + { + "description": "Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards.", + "kind": "function", + "name": "getJointTranslation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getJointTranslation", + "scope": "static" + }, + { + "description": "Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointData", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent.", + "name": "translation" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setJointData", + "scope": "static" + }, + { + "description": "Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointRotation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent.", + "name": "rotation" + } + ], + "examples": [ + "Set your avatar to its default T-pose then rotate its right arm.
\r\"Avatar\r// Set all joint translations and rotations to defaults.\rvar i, length, rotation, translation;\rfor (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {\r rotation = MyAvatar.getDefaultJointRotation(i);\r translation = MyAvatar.getDefaultJointTranslation(i);\r MyAvatar.setJointData(i, rotation, translation);\r}\r\r// Rotate the right arm.\rvar newArmRotation = { x: 0.47, y: 0.22, z: -0.02, w: 0.87 };\rMyAvatar.setJointRotation(\"RightArm\", newArmRotation);\r\r// Restore your avatar's motion after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointsData();\r}, 5000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setJointRotation", + "scope": "static" + }, + { + "description": "Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointTranslation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent.", + "name": "translation" + } + ], + "examples": [ + "Stretch your avatar's neck. Depending on the avatar you are using, you will either see a gap between \rthe head and body or you will see the neck stretched.
\r\"Avatar\r// Stretch your avatar's neck.\rMyAvatar.setJointTranslation(\"Neck\", { x: 0, y: 25, z: 0 });\r\r// Restore your avatar's neck after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointData(\"Neck\");\r}, 5000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setJointTranslation", + "scope": "static" + }, + { + "description": "Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly slower than the function variation that specifies the joint index.

", + "kind": "function", + "name": "clearJointData", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + } + ], + "examples": [ + "Offset and restore the position of your avatar's head.\r// Move your avatar's head up by 25cm from where it should be.\rMyAvatar.setJointTranslation(\"Neck\", { x: 0, y: 0.25, z: 0 });\r\r// Restore your avatar's head to its default position after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointData(\"Neck\");\r}, 5000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.clearJointData", + "scope": "static" + }, + { + "kind": "function", + "name": "isJointDataValid", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.isJointDataValid", + "scope": "static" + }, + { + "description": "Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards.", + "kind": "function", + "name": "getJointRotation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent." + } + ], + "examples": [ + "Report the rotation of your avatar's hips joint.\rprint(JSON.stringify(MyAvatar.getJointRotation(\"Hips\")));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getJointRotation", + "scope": "static" + }, + { + "description": "Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards.", + "kind": "function", + "name": "getJointTranslation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The name of the joint.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent." + } + ], + "examples": [ + "Report the translation of your avatar's hips joint.\rprint(JSON.stringify(MyAvatar.getJointRotation(\"Hips\")));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getJointTranslation", + "scope": "static" + }, + { + "description": "Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint.", + "kind": "function", + "name": "getJointRotations", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The rotations of all joints relative to each's parent. The values are in the same order as the array \rreturned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}." + } + ], + "examples": [ + "Report the rotations of all your avatar's joints.\rprint(JSON.stringify(MyAvatar.getJointRotations()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getJointRotations", + "scope": "static" + }, + { + "kind": "function", + "name": "getJointTranslations", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getJointTranslations", + "scope": "static" + }, + { + "description": "Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse\rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,\rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate\rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set\rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointRotations", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The rotations for all joints in the avatar. The values are in the same order as the \rarray returned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}.", + "name": "jointRotations" + } + ], + "examples": [ + "Set your avatar to its default T-pose then rotate its right arm.
\r\"Avatar\r// Set all joint translations and rotations to defaults.\rvar i, length, rotation, translation;\rfor (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {\r rotation = MyAvatar.getDefaultJointRotation(i);\r translation = MyAvatar.getDefaultJointTranslation(i);\r MyAvatar.setJointData(i, rotation, translation);\r}\r\r// Get all join rotations.\rvar jointRotations = MyAvatar.getJointRotations(); \r\r// Update the rotation of the right arm in the array.\rjointRotations[MyAvatar.getJointIndex(\"RightArm\")] = { x: 0.47, y: 0.22, z: -0.02, w: 0.87 };\r\r// Update all joint rotations.\rMyAvatar.setJointRotations(jointRotations);\r\r// Restore your avatar's motion after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointsData();\r}, 5000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setJointRotations", + "scope": "static" + }, + { + "kind": "function", + "name": "setJointTranslations", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "name": "translations" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setJointTranslations", + "scope": "static" + }, + { + "description": "Clear all joint translations and rotations that have been set by script. This restores all motion from the default \ranimation system including inverse kinematics for all joints.", + "kind": "function", + "name": "clearJointsData", + "examples": [ + "Set your avatar to it's default T-pose for a while.\r// Set all joint translations and rotations to defaults.\rvar i, length, rotation, translation;\rfor (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {\r rotation = MyAvatar.getDefaultJointRotation(i);\r translation = MyAvatar.getDefaultJointTranslation(i);\r MyAvatar.setJointData(i, rotation, translation);\r}\r\r// Restore your avatar's motion after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointsData();\r}, 5000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.clearJointsData", + "scope": "static" + }, + { + "description": "Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by \r{@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}.", + "kind": "function", + "name": "getJointIndex", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint." + } + ], + "examples": [ + "Report the index of your avatar's left arm joint.\rprint(JSON.stringify(MyAvatar.getJointIndex(\"LeftArm\"));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getJointIndex", + "scope": "static" + }, + { + "description": "Get the names of all the joints in the current avatar.", + "kind": "function", + "name": "getJointNames", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The joint names." + } + ], + "examples": [ + "Report the names of all the joints in your current avatar.\rprint(JSON.stringify(MyAvatar.getJointNames()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getJointNames", + "scope": "static" + }, + { + "kind": "function", + "name": "setBlendshape", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "value" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setBlendshape", + "scope": "static" + }, + { + "kind": "function", + "name": "getAttachmentsVariant", + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAttachmentsVariant", + "scope": "static" + }, + { + "kind": "function", + "name": "setAttachmentsVariant", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "variant" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setAttachmentsVariant", + "scope": "static" + }, + { + "kind": "function", + "name": "updateAvatarEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "entityData" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.updateAvatarEntity", + "scope": "static" + }, + { + "kind": "function", + "name": "clearAvatarEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.clearAvatarEntity", + "scope": "static" + }, + { + "kind": "function", + "name": "setForceFaceTrackerConnected", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "connected" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setForceFaceTrackerConnected", + "scope": "static" + }, + { + "description": "Get information about all models currently attached to your avatar.", + "kind": "function", + "name": "getAttachmentData", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Information about all models attached to your avatar." + } + ], + "examples": [ + "Report the URLs of all current attachments.\rvar attachments = MyAvatar.getaAttachmentData();\rfor (var i = 0; i < attachments.length; i++) {\r print (attachments[i].modelURL);\r}" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAttachmentData", + "scope": "static" + }, + { + "description": "Set all models currently attached to your avatar. For example, if you retrieve attachment data using \r{@link MyAvatar.getAttachmentData} or {@link Avatar.getAttachmentData}, make changes to it, and then want to update your avatar's attachments per the \rchanged data. You can also remove all attachments by using setting attachmentData to null.", + "kind": "function", + "name": "setAttachmentData", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The attachment data defining the models to have attached to your avatar. Use \r null to remove all attachments.", + "name": "attachmentData" + } + ], + "examples": [ + "Remove a hat attachment if your avatar is wearing it.\rvar hatURL = \"https://s3.amazonaws.com/hifi-public/tony/cowboy-hat.fbx\";\rvar attachments = MyAvatar.getAttachmentData();\r\rfor (var i = 0; i < attachments.length; i++) {\r if (attachments[i].modelURL === hatURL) {\r attachments.splice(i, 1);\r MyAvatar.setAttachmentData(attachments);\r break;\r }\r }" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setAttachmentData", + "scope": "static" + }, + { + "description": "Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to \rstand on.\r

Note: Attached models are models only; they are not entities and can not be manipulated using the {@link Entities} API. \rNor can you use this function to attach an entity (such as a sphere or a box) to your avatar.

", + "kind": "function", + "name": "attach", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the model to attach. Models can be .FBX or .OBJ format.", + "name": "modelURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The name of the avatar joint (see {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}) to attach the model \r to.", + "name": "jointName" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "defaultvalue": "Vec3.ZERO", + "description": "The offset to apply to the model relative to the joint position.", + "name": "translation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "optional": true, + "defaultvalue": "Quat.IDENTITY", + "description": "The rotation to apply to the model relative to the joint orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "1.0", + "description": "The scale to apply to the model.", + "name": "scale" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If the model has a skeleton, set this to true so that the bones of the \r attached model's skeleton are be rotated to fit the avatar's current pose. isSoft is used, for example, \r to have clothing that moves with the avatar.
\r If true, the translation, rotation, and scale parameters are \r ignored.", + "name": "isSoft" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "allowDuplicates" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "name": "useSaved" + } + ], + "examples": [ + "Attach a cowboy hat to your avatar's head.\rvar attachment = {\r modelURL: \"https://s3.amazonaws.com/hifi-public/tony/cowboy-hat.fbx\",\r jointName: \"Head\",\r translation: {\"x\": 0, \"y\": 0.25, \"z\": 0},\r rotation: {\"x\": 0, \"y\": 0, \"z\": 0, \"w\": 1},\r scale: 1,\r isSoft: false\r};\r\r MyAvatar.attach(attachment.modelURL,\r attachment.jointName,\r attachment.translation,\r attachment.rotation,\r attachment.scale,\r attachment.isSoft);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.attach", + "scope": "static" + }, + { + "description": "Detach the most recently attached instance of a particular model from either a specific joint or any joint.", + "kind": "function", + "name": "detachOne", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the model to detach.", + "name": "modelURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The name of the joint to detach the model from. If \"\", then the most \r recently attached model is removed from which ever joint it was attached to.", + "name": "jointName" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.detachOne", + "scope": "static" + }, + { + "description": "Detach all instances of a particular model from either a specific joint or all joints.", + "kind": "function", + "name": "detachAll", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the model to detach.", + "name": "modelURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The name of the joint to detach the model from. If \"\", then the model is \r detached from all joints.", + "name": "jointName" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.detachAll", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatarEntityData", + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAvatarEntityData", + "scope": "static" + }, + { + "kind": "function", + "name": "setAvatarEntityData", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "avatarEntityData" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setAvatarEntityData", + "scope": "static" + }, + { + "kind": "function", + "name": "getSensorToWorldMatrix", + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getSensorToWorldMatrix", + "scope": "static" + }, + { + "kind": "function", + "name": "getSensorToWorldScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getSensorToWorldScale", + "scope": "static" + }, + { + "kind": "function", + "name": "getControllerLeftHandMatrix", + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getControllerLeftHandMatrix", + "scope": "static" + }, + { + "kind": "function", + "name": "getControllerRightHandMatrix", + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getControllerRightHandMatrix", + "scope": "static" + }, + { + "kind": "function", + "name": "getDataRate", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "rateName" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getDataRate", + "scope": "static" + }, + { + "kind": "function", + "name": "getUpdateRate", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "rateName" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getUpdateRate", + "scope": "static" + }, + { + "kind": "function", + "name": "displayNameChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.displayNameChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sessionDisplayNameChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.sessionDisplayNameChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "skeletonModelURLChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.skeletonModelURLChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "lookAtSnappingChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.lookAtSnappingChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sessionUUIDChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.sessionUUIDChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sendAvatarDataPacket", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "sendAll" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.sendAvatarDataPacket", + "scope": "static" + }, + { + "kind": "function", + "name": "sendIdentityPacket", + "memberof": "MyAvatar", + "longname": "MyAvatar.sendIdentityPacket", + "scope": "static" + }, + { + "kind": "function", + "name": "setJointMappingsFromNetworkReply", + "memberof": "MyAvatar", + "longname": "MyAvatar.setJointMappingsFromNetworkReply", + "scope": "static" + }, + { + "kind": "function", + "name": "setSessionUUID", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionUUID" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setSessionUUID", + "scope": "static" + }, + { + "kind": "function", + "name": "getAbsoluteJointRotationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAbsoluteJointRotationInObjectFrame", + "scope": "static" + }, + { + "kind": "function", + "name": "getAbsoluteJointTranslationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAbsoluteJointTranslationInObjectFrame", + "scope": "static" + }, + { + "kind": "function", + "name": "setAbsoluteJointRotationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "rotation" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setAbsoluteJointRotationInObjectFrame", + "scope": "static" + }, + { + "kind": "function", + "name": "setAbsoluteJointTranslationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "translation" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setAbsoluteJointTranslationInObjectFrame", + "scope": "static" + }, + { + "kind": "function", + "name": "getTargetScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getTargetScale", + "scope": "static" + }, + { + "kind": "function", + "name": "resetLastSent", + "memberof": "MyAvatar", + "longname": "MyAvatar.resetLastSent", + "scope": "static" + }, + { + "description": "
Available in:Assignment Client Scripts

Note: An AvatarList API is also provided for Interface and client entity scripts: it is a \rsynonym for the {@link AvatarManager} API.", + "kind": "namespace", + "name": "AvatarList", + "hifiAssignmentClient": true, + "longname": "AvatarList", + "scope": "global" + }, + { + "kind": "function", + "name": "getAvatarIdentifiers", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.getAvatarIdentifiers", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatarsInRange", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "range" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.getAvatarsInRange", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatar", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "avatarID" + } + ], + "returns": [ + { + "type": { + "names": [ + "AvatarData" + ] + } + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.getAvatar", + "scope": "static" + }, + { + "kind": "function", + "name": "avatarAddedEvent", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionUUID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.avatarAddedEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "avatarRemovedEvent", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionUUID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.avatarRemovedEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "avatarSessionChangedEvent", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionUUID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "oldSessionUUID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.avatarSessionChangedEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "isAvatarInRange", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "range" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.isAvatarInRange", + "scope": "static" + }, + { + "kind": "function", + "name": "sessionUUIDChanged", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionUUID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "oldSessionUUID" + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.sessionUUIDChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "processAvatarDataPacket", + "params": [ + { + "name": "message" + }, + { + "name": "sendingNode" + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.processAvatarDataPacket", + "scope": "static" + }, + { + "kind": "function", + "name": "processAvatarIdentityPacket", + "params": [ + { + "name": "message" + }, + { + "name": "sendingNode" + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.processAvatarIdentityPacket", + "scope": "static" + }, + { + "kind": "function", + "name": "processKillAvatar", + "params": [ + { + "name": "message" + }, + { + "name": "sendingNode" + } + ], + "memberof": "AvatarList", + "longname": "AvatarList.processKillAvatar", + "scope": "static" + }, + { + "kind": "function", + "name": "getDefaultJointRotation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getDefaultJointRotation", + "scope": "static" + }, + { + "kind": "function", + "name": "getDefaultJointTranslation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getDefaultJointTranslation", + "scope": "static" + }, + { + "description": "Provides read only access to the default joint rotations in avatar coordinates.\rThe default pose of the avatar is defined by the position and orientation of all bones\rin the avatar's model file. Typically this is a T-pose.", + "kind": "function", + "name": "getAbsoluteDefaultJointRotationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "index number", + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of this joint in avatar coordinates." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAbsoluteDefaultJointRotationInObjectFrame", + "scope": "static" + }, + { + "description": "Provides read only access to the default joint translations in avatar coordinates.\rThe default pose of the avatar is defined by the position and orientation of all bones\rin the avatar's model file. Typically this is a T-pose.", + "kind": "function", + "name": "getAbsoluteDefaultJointTranslationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "index number", + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of this joint in avatar coordinates." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAbsoluteDefaultJointTranslationInObjectFrame", + "scope": "static" + }, + { + "description": "Set the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, \rwith an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly.", + "kind": "function", + "name": "setSkeletonOffset", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The skeleton offset to set.", + "name": "offset" + } + ], + "examples": [ + "Raise your avatar off the ground a little.\r// Raise your avatar off the ground a little.\rMyAvatar.setSkeletonOffset({ x: 0, y: 0.1: z: 0 });\r\r// Restore its offset after 5s.\rScript.setTimeout(function () {\r MyAvatar.setSkeletonOffset(Vec3.ZERO);\r}, 5000);" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setSkeletonOffset", + "scope": "static" + }, + { + "description": "Get the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, \rwith an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly.", + "kind": "function", + "name": "getSkeletonOffset", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The current skeleton offset." + } + ], + "examples": [ + "Report your avatar's current skeleton offset.\rprint(JSON.stringify(MyAvatar.getSkeletonOffset());" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getSkeletonOffset", + "scope": "static" + }, + { + "description": "Get the position of a joint in the current avatar.", + "kind": "function", + "name": "getJointPosition", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the joint in world coordinates." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getJointPosition", + "scope": "static" + }, + { + "description": "Get the position of a joint in the current avatar.", + "kind": "function", + "name": "getJointPosition", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the joint in world coordinates." + } + ], + "examples": [ + "Report the position of your avatar's hips.\rprint(JSON.stringify(MyAvatar.getJointPosition(\"Hips\")));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getJointPosition", + "scope": "static" + }, + { + "description": "Get the position of the current avatar's neck in world coordinates.", + "kind": "function", + "name": "getNeckPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the neck in world coordinates." + } + ], + "examples": [ + "Report the position of your avatar's neck.\rprint(JSON.stringify(MyAvatar.getNeckPosition()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getNeckPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getAcceleration", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getAcceleration", + "scope": "static" + }, + { + "description": "Get the position of the current avatar's feet (or rather, bottom of its collision capsule) in world coordinates.", + "kind": "function", + "name": "getWorldFeetPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the avatar's feet in world coordinates." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getWorldFeetPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getParentID", + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getParentID", + "scope": "static" + }, + { + "kind": "function", + "name": "setParentID", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "parentID" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setParentID", + "scope": "static" + }, + { + "kind": "function", + "name": "getParentJointIndex", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getParentJointIndex", + "scope": "static" + }, + { + "kind": "function", + "name": "setParentJointIndex", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "parentJointIndex" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.setParentJointIndex", + "scope": "static" + }, + { + "description": "Returns an array of joints, where each joint is an object containing name, index, and parentIndex fields.", + "kind": "function", + "name": "getSkeleton", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "A list of information about each joint in this avatar's skeleton." + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getSkeleton", + "scope": "static" + }, + { + "description": "Information about a single joint in an Avatar's skeleton hierarchy.", + "kind": "typedef", + "name": "SkeletonJoint", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Joint name.", + "name": "name" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Joint index.", + "name": "index" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Index of this joint's parent (-1 if no parent).", + "name": "parentIndex" + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.SkeletonJoint", + "scope": "static" + }, + { + "kind": "function", + "name": "getSimulationRate", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "rateName" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getSimulationRate", + "scope": "static" + }, + { + "description": "Get the position of the left palm in world coordinates.", + "kind": "function", + "name": "getLeftPalmPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the left palm in world coordinates." + } + ], + "examples": [ + "Report the position of your avatar's left palm.\rprint(JSON.stringify(MyAvatar.getLeftPalmPosition()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getLeftPalmPosition", + "scope": "static" + }, + { + "description": "Get the rotation of the left palm in world coordinates.", + "kind": "function", + "name": "getLeftPalmRotation", + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the left palm in world coordinates." + } + ], + "examples": [ + "Report the rotation of your avatar's left palm.\rprint(JSON.stringify(MyAvatar.getLeftPalmRotation()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getLeftPalmRotation", + "scope": "static" + }, + { + "description": "Get the position of the right palm in world coordinates.", + "kind": "function", + "name": "getRightPalmPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the right palm in world coordinates." + } + ], + "examples": [ + "Report the position of your avatar's right palm.\rprint(JSON.stringify(MyAvatar.getRightPalmPosition()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getRightPalmPosition", + "scope": "static" + }, + { + "description": "Get the rotation of the right palm in world coordinates.", + "kind": "function", + "name": "getRightPalmRotation", + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the right palm in world coordinates." + } + ], + "examples": [ + "Report the rotation of your avatar's right palm.\rprint(JSON.stringify(MyAvatar.getRightPalmRotation()));" + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.getRightPalmRotation", + "scope": "static" + }, + { + "kind": "function", + "name": "rigReady", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.rigReady", + "scope": "static" + }, + { + "kind": "function", + "name": "rigReset", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "MyAvatar", + "longname": "MyAvatar.rigReset", + "scope": "static" + }, + { + "description": "

The Controller.Actions object has properties representing predefined actions on the user's avatar and \rInterface. The property values are integer IDs, uniquely identifying each action. Read-only. These can be used \ras end points in the routes of a {@link MappingObject}. The data routed to each action is either a number or a \r{@link Pose}.

\r\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
Avatar Movement
TranslateXnumbernumberMove the user's avatar in the direction of its \r x-axis, if the camera isn't in independent or mirror modes.
TranslateYnumbernumberMove the user's avatar in the direction of its \r y-axis, if the camera isn't in independent or mirror modes.
TranslateZnumbernumberMove the user's avatar in the direction of its \r z-axis, if the camera isn't in independent or mirror modes.
PitchnumbernumberRotate the user's avatar head and attached camera \r about its negative x-axis (i.e., positive values pitch down), if the camera isn't in HMD, independent, or mirror \r modes.
YawnumbernumberRotate the user's avatar about its y-axis, if the \r camera isn't in independent or mirror modes.
RollnumbernumberNo action.
StepTranslateXnumbernumberNo action.
StepTranslateYnumbernumberNo action.
StepTranslateZnumbernumberNo action.
StepPitchnumbernumberNo action.
StepYawnumbernumberRotate the user's avatar about its y-axis in a \r step increment, if the camera isn't in independent or mirror modes.
StepRollnumbernumberNo action.
Avatar Skeleton
Hipsnumber{@link Pose}Set the hips pose of the user's avatar.\r
Spine2number{@link Pose}Set the spine2 pose of the user's avatar.\r
Headnumber{@link Pose}Set the head pose of the user's avatar.\r
LeftArmnumber{@link Pose}Set the left arm pose of the user's avatar.\r
RightArmnumber{@link Pose}Set the right arm pose of the user's \r avatar.
LeftHandnumber{@link Pose}Set the left hand pose of the user's\r avatar.
LeftHandThumb1number{@link Pose}Set the left thumb 1 finger joint \r pose of the user's avatar.
LeftHandThumb2number{@link Pose}Set the left thumb 2 finger joint \r pose of the user's avatar.
LeftHandThumb3number{@link Pose}Set the left thumb 3 finger joint \r pose of the user's avatar.
LeftHandThumb4number{@link Pose}Set the left thumb 4 finger joint \r pose of the user's avatar.
LeftHandIndex1number{@link Pose}Set the left index 1 finger joint \r pose of the user's avatar.
LeftHandIndex2number{@link Pose}Set the left index 2 finger joint \r pose of the user's avatar.
LeftHandIndex3number{@link Pose}Set the left index 3 finger joint \r pose of the user's avatar.
LeftHandIndex4number{@link Pose}Set the left index 4 finger joint \r pose of the user's avatar.
LeftHandMiddle1number{@link Pose}Set the left middle 1 finger joint \r pose of the user's avatar.
LeftHandMiddle2number{@link Pose}Set the left middle 2 finger joint \r pose of the user's avatar.
LeftHandMiddle3number{@link Pose}Set the left middle 3 finger joint \r pose of the user's avatar.
LeftHandMiddle4number{@link Pose}Set the left middle 4 finger joint \r pose of the user's avatar.
LeftHandRing1number{@link Pose}Set the left ring 1 finger joint pose \r of the user's avatar.
LeftHandRing2number{@link Pose}Set the left ring 2 finger joint pose \r of the user's avatar.
LeftHandRing3number{@link Pose}Set the left ring 3 finger joint pose \r of the user's avatar.
LeftHandRing4number{@link Pose}Set the left ring 4 finger joint pose \r of the user's avatar.
LeftHandPinky1number{@link Pose}Set the left pinky 1 finger joint \r pose of the user's avatar.
LeftHandPinky2number{@link Pose}Set the left pinky 2 finger joint \r pose of the user's avatar.
LeftHandPinky3number{@link Pose}Set the left pinky 3 finger joint \r pose of the user's avatar.
LeftHandPinky4number{@link Pose}Set the left pinky 4 finger joint \r pose of the user's avatar.
RightHandnumber{@link Pose}Set the right hand of the user's avatar.\r
RightHandThumb1number{@link Pose}Set the right thumb 1 finger joint \r pose of the user's avatar.
RightHandThumb2number{@link Pose}Set the right thumb 2 finger joint \r pose of the user's avatar.
RightHandThumb3number{@link Pose}Set the right thumb 3 finger joint \r pose of the user's avatar.
RightHandThumb4number{@link Pose}Set the right thumb 4 finger joint \r pose of the user's avatar.
RightHandIndex1number{@link Pose}Set the right index 1 finger joint \r pose of the user's avatar.
RightHandIndex2number{@link Pose}Set the right index 2 finger joint \r pose of the user's avatar.
RightHandIndex3number{@link Pose}Set the right index 3 finger joint \r pose of the user's avatar.
RightHandIndex4number{@link Pose}Set the right index 4 finger joint \r pose of the user's avatar.
RightHandMiddle1number{@link Pose}Set the right middle 1 finger \r joint pose of the user's avatar.
RightHandMiddle2number{@link Pose}Set the right middle 2 finger \r joint pose of the user's avatar.
RightHandMiddle3number{@link Pose}Set the right middle 3 finger \r joint pose of the user's avatar.
RightHandMiddle4number{@link Pose}Set the right middle 4 finger \r joint pose of the user's avatar.
RightHandRing1number{@link Pose}Set the right ring 1 finger joint \r pose of the user's avatar.
RightHandRing2number{@link Pose}Set the right ring 2 finger joint \r pose of the user's avatar.
RightHandRing3number{@link Pose}Set the right ring 3 finger joint \r pose of the user's avatar.
RightHandRing4number{@link Pose}Set the right ring 4 finger joint \r pose of the user's avatar.
RightHandPinky1number{@link Pose}Set the right pinky 1 finger joint \r pose of the user's avatar.
RightHandPinky2number{@link Pose}Set the right pinky 2 finger joint \r pose of the user's avatar.
RightHandPinky3number{@link Pose}Set the right pinky 3 finger joint \r pose of the user's avatar.
RightHandPinky4number{@link Pose}Set the right pinky 4 finger joint \r pose of the user's avatar.
LeftFootnumber{@link Pose}Set the left foot pose of the user's\r avatar.
RightFootnumber{@link Pose}Set the right foot pose of the user's\r avatar.
Application
BoomInnumbernumberZoom camera in from third person toward first \r person view.
BoomOutnumbernumberZoom camera out from first person to third \r person view.
CycleCameranumbernumberCycle the camera view from first person, to \r third person, to full screen mirror, then back to first person and repeat.
ContextMenunumbernumberShow / hide the tablet.
ToggleMutenumbernumberToggle the microphone mute.
ToggleOverlaynumbernumberToggle the display of overlays.
SprintnumbernumberSet avatar sprint mode.
ReticleClicknumbernumberSet mouse-pressed.
ReticleXnumbernumberMove the cursor left/right in the x direction.\r
ReticleYnumbernumbermove the cursor up/down in the y direction.\r
ReticleLeftnumbernumberMove the cursor left.
ReticleRightnumbernumberMove the cursor right.
ReticleUpnumbernumberMove the cursor up.
ReticleDownnumbernumberMove the cursor down.
UiNavLateralnumbernumberGenerate a keyboard left or right arrow key \r event.
UiNavVerticalnumbernumberGenerate a keyboard up or down arrow key \r event.
UiNavGroupnumbernumberGenerate a keyboard tab or back-tab key event.\r
UiNavSelectnumbernumberGenerate a keyboard Enter key event.\r
UiNavBacknumbernumberGenerate a keyboard Esc key event.
LeftHandClicknumbernumberDeprecated: No action.\r
RightHandClicknumbernumberDeprecated: No action.\r
ShiftnumbernumberDeprecated: No action.
PrimaryActionnumbernumberDeprecated: No action.\r
SecondaryActionnumbernumberDeprecated: No action.\r
Aliases
BackwardnumbernumberAlias for TranslateZ in the \r positive direction.
ForwardnumbernumberAlias for TranslateZ in the negative \r direction.
StrafeRightnumbernumberAlias for TranslateX in the\r positive direction.
StrafeLeftnumbernumberAlias for TranslateX in the\r negative direction.
UpnumbernumberAlias for TranslateY in the positive\r direction.
DownnumbernumberAlias for TranslateY in the negative \r direction.
PitchDownnumbernumberAlias for Pitch in the positive \r direction.
PitchUpnumbernumberAlias for Pitch in the negative\r direction.
YawLeftnumbernumberAlias for Yaw in the positive\r direction.
YawRightnumbernumberAlias for Yaw in the negative \r direction.
Deprecated Aliases
LEFT_HANDnumber{@link Pose}Deprecated: Use \r LeftHand instead.
RIGHT_HANDnumber{@link Pose}Deprecated: Use \r RightHand instead.
BOOM_INnumbernumberDeprecated: Use \r BoomIn instead.
BOOM_OUTnumbernumberDeprecated: Use \r BoomOut instead.
CONTEXT_MENUnumbernumberDeprecated: Use \r ContextMenu instead.
TOGGLE_MUTEnumbernumberDeprecated: Use \r ToggleMute instead.
SPRINTnumbernumberDeprecated: Use \r Sprint instead.
LONGITUDINAL_BACKWARDnumbernumberDeprecated: Use \r Backward instead.
LONGITUDINAL_FORWARDnumbernumberDeprecated: Use \r Forward instead.
LATERAL_LEFTnumbernumberDeprecated: Use \r StrafeLeft instead.
LATERAL_RIGHTnumbernumberDeprecated: Use \r StrafeRight instead.
VERTICAL_UPnumbernumberDeprecated: Use \r Up instead.
VERTICAL_DOWNnumbernumberDeprecated: Use \r Down instead.
PITCH_DOWNnumbernumberDeprecated: Use \r PitchDown instead.
PITCH_UPnumbernumberDeprecated: Use \r PitchUp instead.
YAW_LEFTnumbernumberDeprecated: Use \r YawLeft instead.
YAW_RIGHTnumbernumberDeprecated: Use \r YawRight instead.
LEFT_HAND_CLICKnumbernumberDeprecated: Use \r LeftHandClick instead.
RIGHT_HAND_CLICKnumbernumberDeprecated: Use \r RightHandClick instead.
SHIFTnumbernumberDeprecated: Use \r Shift instead.
ACTION1numbernumberDeprecated: Use \r PrimaryAction instead.
ACTION2numbernumberDeprecated: Use \r SecondaryAction instead.
Deprecated Trackers
TrackedObject00number{@link Pose}Deprecated: No\r action.
TrackedObject01number{@link Pose}Deprecated: No\r action.
TrackedObject02number{@link Pose}Deprecated: No\r action.
TrackedObject03number{@link Pose}Deprecated: No\r action.
TrackedObject04number{@link Pose}Deprecated: No\r action.
TrackedObject05number{@link Pose}Deprecated: No\r action.
TrackedObject06number{@link Pose}Deprecated: No\r action.
TrackedObject07number{@link Pose}Deprecated: No\r action.
TrackedObject08number{@link Pose}Deprecated: No\r action.
TrackedObject09number{@link Pose}Deprecated: No\r action.
TrackedObject10number{@link Pose}Deprecated: No\r action.
TrackedObject11number{@link Pose}Deprecated: No\r action.
TrackedObject12number{@link Pose}Deprecated: No\r action.
TrackedObject13number{@link Pose}Deprecated: No\r action.
TrackedObject14number{@link Pose}Deprecated: No\r action.
TrackedObject15number{@link Pose}Deprecated: No\r action.
", + "kind": "typedef", + "name": "Actions", + "type": { + "names": [ + "object" + ] + }, + "memberof": "Controller", + "longname": "Controller.Actions", + "scope": "static" + }, + { + "description": "

Some controller actions may be associated with one or both hands:

\r\r \r \r \r \r \r \r \r \r
ValueDescription
0Left hand.
1Right hand.
2Both hands.
", + "kind": "typedef", + "name": "Hand", + "type": { + "names": [ + "number" + ] + }, + "memberof": "Controller", + "longname": "Controller.Hand", + "scope": "static" + }, + { + "description": "

The Controller.Hardware object has properties representing standard and hardware-specific controller and \rcomputer outputs, plus predefined actions on Interface and the user's avatar. Read-only. The outputs can be mapped \rto actions or functions in a {@link RouteObject} mapping. Additionally, hardware-specific controller outputs can be mapped \rto standard controller outputs. \r\r

Controllers typically implement a subset of the {@link Controller.Standard} controls, plus they may implement some extras. \rSome common controllers are included in the table. You can see the outputs provided by these and others by \rviewing their {@link Controller.MappingJSON|MappingJSON} files at \r\rhttps://github.com/highfidelity/hifi/tree/master/interface/resources/controllers.

\r\r\r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDescription
Controller.Hardware.ActionsobjectSynonym for {@link Controller.Actions}.
Controller.Hardware.ApplicationobjectInterface state outputs. See \r {@link Controller.Hardware-Application}.
Controller.Hardware.KeyboardobjectKeyboard, mouse, and touch pad outputs. See\r {@link Controller.Hardware-Keyboard}.
Controller.Hardware.OculusTouchobjectOculus Rift HMD outputs. See\r {@link Controller.Hardware-OculusTouch}.
Controller.Hardware.ViveobjectVive HMD outputs. See\r {@link Controller.Hardware-Vive}.
", + "kind": "typedef", + "name": "Hardware", + "type": { + "names": [ + "object" + ] + }, + "examples": [ + "List all the currently available Controller.Hardware properties.\rfunction printProperties(string, item) {\r print(string);\r for (var key in item) {\r if (item.hasOwnProperty(key)) {\r printProperties(string + \".\" + key, item[key]);\r }\r }\r}\r\rprintProperties(\"Controller.Hardware\", Controller.Hardware);\r\n " + ], + "memberof": "Controller", + "longname": "Controller.Hardware", + "scope": "static" + }, + { + "description": "The pose of a joint or other item relative to the world or a parent.", + "kind": "typedef", + "name": "Pose", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Translation.", + "name": "translation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "Rotation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Velocity in m/s.", + "name": "velocity" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Angular velocity in rad/s.", + "name": "angularVelocity" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the pose is valid, otherwise false.", + "name": "valid" + } + ], + "longname": "Pose", + "scope": "global" + }, + { + "description": "Get a list of all available actions.", + "kind": "function", + "name": "getAllActions", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "All available actions." + } + ], + "deprecated": "This function no longer works.", + "memberof": "Controller", + "longname": "Controller.getAllActions", + "scope": "static" + }, + { + "description": "Get a list of all available inputs for a hardware device.", + "kind": "function", + "name": "getAvailableInputs", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer ID of the hardware device.", + "name": "deviceID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "All available inputs for the device." + } + ], + "deprecated": "This function no longer works.", + "memberof": "Controller", + "longname": "Controller.getAvailableInputs", + "scope": "static" + }, + { + "description": "Find the name of a particular controller from its device ID.", + "kind": "function", + "name": "getDeviceName", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer ID of the device.", + "name": "deviceID" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the device if found, otherwise \"unknown\"." + } + ], + "examples": [ + "Get the name of the Oculus Touch controller from its ID.\rvar deviceID = Controller.findDevice(\"OculusTouch\");\rprint(\"Device ID = \" + deviceID);\r\rvar deviceName = Controller.getDeviceName(deviceID);\rprint(\"Device name = \" + deviceName);" + ], + "memberof": "Controller", + "longname": "Controller.getDeviceName", + "scope": "static" + }, + { + "description": "Get the current value of an action.", + "kind": "function", + "name": "getActionValue", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer ID of the action.", + "name": "actionID" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The current value of the action." + } + ], + "examples": [ + "Periodically report the value of the \"TranslateX\" action.\rvar actionID = Controller.findAction(\"TranslateX\");\r\rfunction reportValue() {\r print(Controller.getActionValue(actionID));\r}\rreportTimer = Script.setInterval(reportValue, 1000);" + ], + "memberof": "Controller", + "longname": "Controller.getActionValue", + "scope": "static" + }, + { + "description": "Find the ID of a specific controller from its device name.", + "kind": "function", + "name": "findDevice", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the device to find.", + "name": "deviceName" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer ID of the device if available, otherwise 65535." + } + ], + "examples": [ + "Get the ID of the Oculus Touch.\rvar deviceID = Controller.findDevice(\"OculusTouch\");\rprint(\"Device ID = \" + deviceID);" + ], + "memberof": "Controller", + "longname": "Controller.findDevice", + "scope": "static" + }, + { + "description": "Get the names of all currently available controller devices plus \"Actions\", \"Application\", and \"Standard\".", + "kind": "function", + "name": "getDeviceNames", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of device names." + } + ], + "examples": [ + "Get the names of all currently available controller devices.\rvar deviceNames = Controller.getDeviceNames();\rprint(JSON.stringify(deviceNames));\r// [\"Standard\",\"Keyboard\",\"LeapMotion\",\"OculusTouch\",\"Application\",\"Actions\"] or similar." + ], + "memberof": "Controller", + "longname": "Controller.getDeviceNames", + "scope": "static" + }, + { + "description": "Find the ID of an action from its name.", + "kind": "function", + "name": "findAction", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the action: one of the {@link Controller.Actions} property names.", + "name": "actionName" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer ID of the action if found, otherwise 4095. Note that this value is not \rthe same as the value of the relevant {@link Controller.Actions} property." + } + ], + "examples": [ + "Get the ID of the \"TranslateY\" action. Compare with the property value.\rvar actionID = Controller.findAction(\"TranslateY\");\rprint(\"Action ID = \" + actionID); // 1\rprint(\"Property value = \" + Controller.Actions.TranslateY); // 537001728 or similar value." + ], + "memberof": "Controller", + "longname": "Controller.findAction", + "scope": "static" + }, + { + "description": "Get the names of all actions available as properties of {@link Controller.Actions}.", + "kind": "function", + "name": "getActionNames", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of action names." + } + ], + "examples": [ + "Get the names of all actions.\rvar actionNames = Controller.getActionNames();\rprint(\"Action names: \" + JSON.stringify(actionNames));\r// [\"TranslateX\",\"TranslateY\",\"TranslateZ\",\"Roll\", ..." + ], + "memberof": "Controller", + "longname": "Controller.getActionNames", + "scope": "static" + }, + { + "description": "Get the value of a controller button or axis output. Note: Also gets the value of a controller axis output.", + "kind": "function", + "name": "getValue", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The {@link Controller.Standard} or {@link Controller.Hardware} item.", + "name": "source" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The current value of the controller item output if source is valid, otherwise \r 0." + } + ], + "examples": [ + "Report the Standard and Vive right trigger values.\rvar triggerValue = Controller.getValue(Controller.Standard.RT);\rprint(\"Trigger value: \" + triggerValue);\r\rif (Controller.Hardware.Vive) {\r triggerValue = Controller.getValue(Controller.Hardware.Vive.RT);\r print(\"Vive trigger value: \" + triggerValue);\r} else {\r print(\"No Vive present\");\r}" + ], + "memberof": "Controller", + "longname": "Controller.getValue", + "scope": "static" + }, + { + "description": "Get the value of a controller axis output. Note: Also gets the value of a controller button output.", + "kind": "function", + "name": "getAxisValue", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The {@link Controller.Standard} or {@link Controller.Hardware} item.", + "name": "source" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The current value of the controller item output if source is valid, otherwise \r 0." + } + ], + "memberof": "Controller", + "longname": "Controller.getAxisValue", + "scope": "static" + }, + { + "description": "Get the value of a controller pose output.", + "kind": "function", + "name": "getPoseValue", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The {@link Controller.Standard} or {@link Controller.Hardware} pose output.", + "name": "source" + } + ], + "returns": [ + { + "type": { + "names": [ + "Pose" + ] + }, + "description": "The current value of the controller pose output if source is a pose output, otherwise \r an invalid pose with Pose.valid == false." + } + ], + "tags": [ + { + "originalTitle": "exammple", + "title": "exammple", + "text": "Report the right hand's pose.\rvar pose = Controller.getPoseValue(Controller.Standard.RightHand);\rprint(\"Pose: \" + JSON.stringify(pose));", + "value": "Report the right hand's pose.\rvar pose = Controller.getPoseValue(Controller.Standard.RightHand);\rprint(\"Pose: \" + JSON.stringify(pose));" + } + ], + "memberof": "Controller", + "longname": "Controller.getPoseValue", + "scope": "static" + }, + { + "description": "Triggers a haptic pulse on connected and enabled devices that have the capability.", + "kind": "function", + "name": "triggerHapticPulse", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The strength of the haptic pulse, 0.01.0.", + "name": "strength" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The duration of the haptic pulse, in milliseconds.", + "name": "duration" + }, + { + "type": { + "names": [ + "Controller.Hand" + ] + }, + "defaultvalue": 2, + "description": "The hand or hands to trigger the haptic pulse on.", + "name": "hand" + } + ], + "examples": [ + "Trigger a haptic pulse on the right hand.\rvar HAPTIC_STRENGTH = 0.5;\rvar HAPTIC_DURATION = 10;\rvar RIGHT_HAND = 1;\rController.triggerHapticPulse(HAPTIC_STRENGTH, HAPTIC_DURATION, RIGHT_HAND);" + ], + "memberof": "Controller", + "longname": "Controller.triggerHapticPulse", + "scope": "static" + }, + { + "description": "Triggers a 250ms haptic pulse on connected and enabled devices that have the capability.", + "kind": "function", + "name": "triggerShortHapticPulse", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The strength of the haptic pulse, 0.01.0.", + "name": "strength" + }, + { + "type": { + "names": [ + "Controller.Hand" + ] + }, + "defaultvalue": 2, + "description": "The hand or hands to trigger the haptic pulse on.", + "name": "hand" + } + ], + "memberof": "Controller", + "longname": "Controller.triggerShortHapticPulse", + "scope": "static" + }, + { + "description": "Triggers a haptic pulse on a particular device if connected and enabled and it has the capability.", + "kind": "function", + "name": "triggerHapticPulseOnDevice", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the device to trigger the haptic pulse on.", + "name": "deviceID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The strength of the haptic pulse, 0.01.0.", + "name": "strength" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The duration of the haptic pulse, in milliseconds.", + "name": "duration" + }, + { + "type": { + "names": [ + "Controller.Hand" + ] + }, + "defaultvalue": 2, + "description": "The hand or hands to trigger the haptic pulse on.", + "name": "hand" + } + ], + "examples": [ + "Trigger a haptic pulse on an Oculus Touch controller.\rvar HAPTIC_STRENGTH = 0.5;\rvar deviceID = Controller.findDevice(\"OculusTouch\");\rvar HAPTIC_DURATION = 10;\rvar RIGHT_HAND = 1;\rController.triggerHapticPulseOnDevice(deviceID, HAPTIC_STRENGTH, HAPTIC_DURATION, RIGHT_HAND);" + ], + "memberof": "Controller", + "longname": "Controller.triggerHapticPulseOnDevice", + "scope": "static" + }, + { + "description": "Triggers a 250ms haptic pulse on a particular device if connected and enabled and it has the capability.", + "kind": "function", + "name": "triggerShortHapticPulseOnDevice", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the device to trigger the haptic pulse on.", + "name": "deviceID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The strength of the haptic pulse, 0.01.0.", + "name": "strength" + }, + { + "type": { + "names": [ + "Controller.Hand" + ] + }, + "defaultvalue": 2, + "description": "The hand or hands to trigger the haptic pulse on.", + "name": "hand" + } + ], + "memberof": "Controller", + "longname": "Controller.triggerShortHapticPulseOnDevice", + "scope": "static" + }, + { + "description": "Create a new controller mapping. Routes can then be added to the mapping using {@link MappingObject} methods and \rrouted to Standard controls, Actions, or script functions using {@link RouteObject} \rmethods. The mapping can then be enabled using {@link Controller.enableMapping|enableMapping} for it to take effect.", + "kind": "function", + "name": "newMapping", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "Uuid.generate()", + "description": "A unique name for the mapping. If not specified a new UUID generated \r by {@link Uuid.generate} is used.", + "name": "mappingName" + } + ], + "returns": [ + { + "type": { + "names": [ + "MappingObject" + ] + }, + "description": "A controller mapping object." + } + ], + "examples": [ + "Create a simple mapping that makes the right trigger move your avatar up.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\r\rmapping.from(Controller.Standard.RT).to(Controller.Actions.TranslateY);\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "Controller", + "longname": "Controller.newMapping", + "scope": "static" + }, + { + "description": "Enable or disable a controller mapping. When enabled, the routes in the mapping have effect.", + "kind": "function", + "name": "enableMapping", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the mapping.", + "name": "mappingName" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true then the mapping is enabled, otherwise it is disabled.", + "name": "enable" + } + ], + "memberof": "Controller", + "longname": "Controller.enableMapping", + "scope": "static" + }, + { + "description": "Disable a controller mapping. When disabled, the routes in the mapping have no effect.", + "kind": "function", + "name": "disableMapping", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the mapping.", + "name": "mappingName" + } + ], + "memberof": "Controller", + "longname": "Controller.disableMapping", + "scope": "static" + }, + { + "description": "Create a new controller mapping from a {@link Controller.MappingJSON|MappingJSON} string. Use \r{@link Controller.enableMapping|enableMapping} to enable the mapping for it to take effect.", + "kind": "function", + "name": "parseMapping", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "A JSON string of the {@link Controller.MappingJSON|MappingJSON}.", + "name": "jsonString" + } + ], + "returns": [ + { + "type": { + "names": [ + "MappingObject" + ] + }, + "description": "A controller mapping object." + } + ], + "examples": [ + "Create a simple mapping that makes the right trigger move your avatar up.\rvar mappingJSON = {\r \"name\": \"com.highfidelity.controllers.example.jsonMapping\",\r \"channels\": [\r { \"from\": \"Standard.RT\", \"to\": \"Actions.TranslateY\" }\r ]\r};\r\rvar mapping = Controller.parseMapping(JSON.stringify(mappingJSON));\rmapping.enable();\r\rScript.scriptEnding.connect(function () {\r mapping.disable();\r});" + ], + "memberof": "Controller", + "longname": "Controller.parseMapping", + "scope": "static" + }, + { + "description": "Create a new controller mapping from a {@link Controller.MappingJSON|MappingJSON} JSON file at a URL. Use \r{@link Controller.enableMapping|enableMapping} to enable the mapping for it to take effect.", + "kind": "function", + "name": "loadMapping", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL the {@link Controller.MappingJSON|MappingJSON} JSON file.", + "name": "jsonURL" + } + ], + "returns": [ + { + "type": { + "names": [ + "MappingObject" + ] + }, + "description": "A controller mapping object." + } + ], + "todo": [ + "Implement this function. It currently does not load the mapping from the file; it just returns \r null." + ], + "memberof": "Controller", + "longname": "Controller.loadMapping", + "scope": "static" + }, + { + "description": "Get the {@link Controller.Hardware} property tree. Calling this function is the same as using the {@link Controller} \rproperty, Controller.Hardware.", + "kind": "function", + "name": "getHardware", + "returns": [ + { + "type": { + "names": [ + "Controller.Hardware" + ] + }, + "description": "The {@link Controller.Hardware} property tree." + } + ], + "memberof": "Controller", + "longname": "Controller.getHardware", + "scope": "static" + }, + { + "description": "Get the {@link Controller.Actions} property tree. Calling this function is the same as using the {@link Controller} \rproperty, Controller.Actions.", + "kind": "function", + "name": "getActions", + "returns": [ + { + "type": { + "names": [ + "Controller.Actions" + ] + }, + "description": "The {@link Controller.Actions} property tree." + } + ], + "memberof": "Controller", + "longname": "Controller.getActions", + "scope": "static" + }, + { + "description": "Get the {@link Controller.Standard} property tree. Calling this function is the same as using the {@link Controller} \rproperty, Controller.Standard.", + "kind": "function", + "name": "getStandard", + "returns": [ + { + "type": { + "names": [ + "Controller.Standard" + ] + }, + "description": "The {@link Controller.Standard} property tree." + } + ], + "memberof": "Controller", + "longname": "Controller.getStandard", + "scope": "static" + }, + { + "description": "Start making a recording of currently active controllers.", + "kind": "function", + "name": "startInputRecording", + "examples": [ + "Make a controller recording.\r// Delay start of recording for 2s.\rScript.setTimeout(function () {\r print(\"Start input recording\");\r Controller.startInputRecording();\r}, 2000);\r\r// Make a 10s recording.\rScript.setTimeout(function () {\r print(\"Stop input recording\");\r Controller.stopInputRecording();\r Controller.saveInputRecording();\r print(\"Input recording saved in: \" + Controller.getInputRecorderSaveDirectory());\r}, 12000);" + ], + "memberof": "Controller", + "longname": "Controller.startInputRecording", + "scope": "static" + }, + { + "description": "Stop making a recording started by {@link Controller.startInputRecording|startInputRecording}.", + "kind": "function", + "name": "stopInputRecording", + "memberof": "Controller", + "longname": "Controller.stopInputRecording", + "scope": "static" + }, + { + "description": "Play back the current recording from the beginning. The current recording may have been recorded by \r{@link Controller.startInputRecording|startInputRecording} and \r{@link Controller.stopInputRecording|stopInputRecording}, or loaded by \r{@link Controller.loadInputRecording|loadInputRecording}. Playback repeats in a loop until \r{@link Controller.stopInputPlayback|stopInputPlayback} is called.", + "kind": "function", + "name": "startInputPlayback", + "examples": [ + "Play back a controller recording.\rvar file = Window.browse(\"Select Recording\", Controller.getInputRecorderSaveDirectory());\rif (file !== null) {\r print(\"Play recording: \" + file);\r Controller.loadInputRecording(\"file:///\" + file);\r Controller.startInputPlayback();\r\r // Stop playback after 20s.\r Script.setTimeout(function () {\r print(\"Stop playing recording\");\r Controller.stopInputPlayback();\r }, 20000);\r}" + ], + "memberof": "Controller", + "longname": "Controller.startInputPlayback", + "scope": "static" + }, + { + "description": "Stop play back of a recording started by {@link Controller.startInputPlayback|startInputPlayback}.", + "kind": "function", + "name": "stopInputPlayback", + "memberof": "Controller", + "longname": "Controller.stopInputPlayback", + "scope": "static" + }, + { + "description": "Save the current recording to a file. The current recording may have been recorded by\r{@link Controller.startInputRecording|startInputRecording} and\r{@link Controller.stopInputRecording|stopInputRecording}, or loaded by\r{@link Controller.loadInputRecording|loadInputRecording}. It is saved in the directory returned by \r{@link Controller.getInputRecorderSaveDirectory|getInputRecorderSaveDirectory}.", + "kind": "function", + "name": "saveInputRecording", + "memberof": "Controller", + "longname": "Controller.saveInputRecording", + "scope": "static" + }, + { + "description": "Load an input recording, ready for play back.", + "kind": "function", + "name": "loadInputRecording", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path to the recording file, prefixed by \"file:///\".", + "name": "file" + } + ], + "memberof": "Controller", + "longname": "Controller.loadInputRecording", + "scope": "static" + }, + { + "description": "Get the directory in which input recordings are saved.", + "kind": "function", + "name": "getInputRecorderSaveDirectory", + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The directory in which input recordings are saved." + } + ], + "memberof": "Controller", + "longname": "Controller.getInputRecorderSaveDirectory", + "scope": "static" + }, + { + "description": "Get all the active and enabled (running) input devices", + "kind": "function", + "name": "getRunningInputDevices", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of strings with the names" + } + ], + "memberof": "Controller", + "longname": "Controller.getRunningInputDevices", + "scope": "static" + }, + { + "description": "Disable processing of mouse \"move\", \"press\", \"double-press\", and \"release\" events into \r{@link Controller.Hardware|Controller.Hardware.Keyboard} outputs.", + "kind": "function", + "name": "captureMouseEvents", + "examples": [ + "Disable Controller.Hardware.Keyboard mouse events for a short period.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\rmapping.from(Controller.Hardware.Keyboard.MouseX).to(function (x) {\r print(\"Mouse x = \" + x);\r});\rmapping.from(Controller.Hardware.Keyboard.MouseY).to(function (y) {\r print(\"Mouse y = \" + y);\r});\rController.enableMapping(MAPPING_NAME);\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});\r\rScript.setTimeout(function () {\r Controller.captureMouseEvents();\r}, 5000);\r\rScript.setTimeout(function () {\r Controller.releaseMouseEvents();\r}, 10000);" + ], + "memberof": "Controller", + "longname": "Controller.captureMouseEvents", + "scope": "static" + }, + { + "description": "Enable processing of mouse \"move\", \"press\", \"double-press\", and \"release\" events into \r{@link Controller.Hardware-Keyboard|Controller.Hardware.Keyboard} outputs that were disabled using \r{@link Controller.captureMouseEvents|captureMouseEvents}.", + "kind": "function", + "name": "releaseMouseEvents", + "memberof": "Controller", + "longname": "Controller.releaseMouseEvents", + "scope": "static" + }, + { + "description": "Disable processing of touch \"begin\", \"update\", and \"end\" events into \r{@link Controller.Hardware|Controller.Hardware.Keyboard}, \r{@link Controller.Hardware|Controller.Hardware.Touchscreen}, and \r{@link Controller.Hardware|Controller.Hardware.TouchscreenVirtualPad} outputs.", + "kind": "function", + "name": "captureTouchEvents", + "memberof": "Controller", + "longname": "Controller.captureTouchEvents", + "scope": "static" + }, + { + "description": "Enable processing of touch \"begin\", \"update\", and \"end\" events into \r{@link Controller.Hardware|Controller.Hardware.Keyboard}, \r{@link Controller.Hardware|Controller.Hardware.Touchscreen}, and \r{@link Controller.Hardware|Controller.Hardware.TouchscreenVirtualPad} outputs that were disabled using \r{@link Controller.captureTouchEvents|captureTouchEvents}.", + "kind": "function", + "name": "releaseTouchEvents", + "memberof": "Controller", + "longname": "Controller.releaseTouchEvents", + "scope": "static" + }, + { + "description": "Disable processing of mouse wheel rotation events into {@link Controller.Hardware|Controller.Hardware.Keyboard} \routputs.", + "kind": "function", + "name": "captureWheelEvents", + "memberof": "Controller", + "longname": "Controller.captureWheelEvents", + "scope": "static" + }, + { + "description": "Enable processing of mouse wheel rotation events into {@link Controller.Hardware|Controller.Hardware.Keyboard} \routputs that wer disabled using {@link Controller.captureWheelEvents|captureWheelEvents}.", + "kind": "function", + "name": "releaseWheelEvents", + "memberof": "Controller", + "longname": "Controller.releaseWheelEvents", + "scope": "static" + }, + { + "description": "Disable translating and rotating the user's avatar in response to keyboard and controller controls.", + "kind": "function", + "name": "captureActionEvents", + "examples": [ + "Disable avatar translation and rotation for a short period.\rScript.setTimeout(function () {\r Controller.captureActionEvents();\r}, 5000);\r\rScript.setTimeout(function () {\r Controller.releaseActionEvents();\r}, 10000);" + ], + "memberof": "Controller", + "longname": "Controller.captureActionEvents", + "scope": "static" + }, + { + "description": "Enable translating and rotating the user's avatar in response to keyboard and controller controls that were disabled \rusing {@link Controller.captureActionEvents|captureActionEvents}.", + "kind": "function", + "name": "releaseActionEvents", + "memberof": "Controller", + "longname": "Controller.releaseActionEvents", + "scope": "static" + }, + { + "description": "Triggered when an action occurs.", + "kind": "function", + "name": "actionEvent", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The ID of the action, per {@link Controller.findAction|findAction}.", + "name": "actionID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The value associated with the action.", + "name": "value" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report action events as they occur.\rvar actionNamesForID = {};\rvar actionNames = Controller.getActionNames();\rfor (var i = 0, length = actionNames.length; i < length; i++) {\r actionNamesForID[Controller.findAction(actionNames[i])] = actionNames[i];\r}\r\rfunction onActionEvent(action, value) {\r print(\"onActionEvent() : \" + action + \" ( \" + actionNamesForID[action] + \" ) ; \" + value);\r}\r\rController.actionEvent.connect(onActionEvent);\r\rScript.scriptEnding.connect(function () {\r Controller.actionEvent.disconnect(onActionEvent);\r});" + ], + "memberof": "Controller", + "longname": "Controller.actionEvent", + "scope": "static" + }, + { + "description": "Triggered when there is a new controller input event.", + "kind": "function", + "name": "inputEvent", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The input action, per {@link Controller.Standard}.", + "name": "action" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The value associated with the input action.", + "name": "value" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report input events as they occur.\rvar inputNamesForID = {};\rfor (var property in Controller.Standard) {\r inputNamesForID[Controller.Standard[property]] = \"Controller.Standard.\" + property;\r}\r\rfunction onInputEvent(input, value) {\r print(\"onInputEvent() : \" + input + \" ( \" + inputNamesForID[input] + \" ) ; \" + value);\r}\r\rController.inputEvent.connect(onInputEvent);\r\rScript.scriptEnding.connect(function () {\r Controller.inputEvent.disconnect(onInputEvent);\r});" + ], + "memberof": "Controller", + "longname": "Controller.inputEvent", + "scope": "static" + }, + { + "description": "Triggered when a device is registered or unregistered by a plugin. Not all plugins generate \rhardwareChanged events: for example connecting or disconnecting a mouse will not generate an event but \rconnecting or disconnecting an Xbox controller will.", + "kind": "function", + "name": "hardwareChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Controller", + "longname": "Controller.hardwareChanged", + "scope": "static" + }, + { + "description": "Triggered when a device is enabled/disabled\rEnabling/Disabling Leapmotion on settings/controls will trigger this signal.", + "kind": "function", + "name": "deviceRunningChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the device that is getting enabled/disabled", + "name": "deviceName" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Return if the device is enabled.", + "name": "isEnabled" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Controller", + "longname": "Controller.deviceRunningChanged", + "scope": "static" + }, + { + "description": "

The Controller.Standard object has properties representing standard controller outputs. Those for physical \rcontrollers are based on the XBox controller, with aliases for PlayStation. The property values are integer IDs, uniquely \ridentifying each output. Read-only. These can be mapped to actions or functions in a {@link RouteObject} \rmapping.

\r\r

The data value provided by each control is either a number or a {@link Pose}. Numbers are typically normalized to\r0.0 or 1.0 for button states, the range 0.0 – 1.0 for unidirectional scales,\rand the range -1.0 – 1.0 for bidirectional scales.

\r\r

Each hardware device has a mapping from its outputs to Controller.Standard items, specified in a JSON file.\rFor example, \rleapmotion.json and\rvive.json.

\r\r\r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r
PropertyTypeDataDescription
Buttons
Anumbernumber\"A\" button pressed.
Bnumbernumber\"B\" button pressed.
Xnumbernumber\"X\" button pressed.
Ynumbernumber\"Y\" button pressed.
DLnumbernumberD-pad left pressed.
DRnumbernumberD-pad right pressed.
DUnumbernumberD-pad up pressed.
DDnumbernumberD-pad down pressed.
Startnumbernumber\"Start\" center button pressed.
Backnumbernumber\"Back\" center button pressed.
LBnumbernumberLeft bumper button pressed.
RBnumbernumberRight bumper button pressed.
Sticks
LXnumbernumberLeft stick x-axis scale.
LYnumbernumberLeft stick y-axis scale.
RXnumbernumberRight stick x-axis scale.
RYnumbernumberRight stick y-axis scale.
LSnumbernumberLeft stick button pressed.
RSnumbernumberRight stick button pressed.
LSTouchnumbernumberLeft stick is touched.
RSTouchnumbernumberRight stick is touched.
Triggers
LTnumbernumberLeft trigger scale.
RTnumbernumberRight trigger scale.
LTClicknumbernumberLeft trigger click.
RTClicknumbernumberRight trigger click.
LeftGripnumbernumberLeft grip scale.
RightGripnumbernumberRight grip scale.
LeftGripTouchnumbernumberLeft grip is touched.
RightGripTouchnumbernumberRight grip is touched.
Aliases, PlayStation Style Names
CrossnumbernumberAlias for A.
CirclenumbernumberAlias for B.
SquarenumbernumberAlias for X.
TrianglenumbernumberAlias for Y.
LeftnumbernumberAlias for DL.
RightnumbernumberAlias for DR.
UpnumbernumberAlias for DU.
DownnumbernumberAlias for DD.
SelectnumbernumberAlias for Back.
L1numbernumberAlias for LB.
R1numbernumberAlias for RB.
L3numbernumberAlias for LS.
R3numbernumberAlias for RS.
L2numbernumberAlias for LT.
R2numbernumberAlias for RT.
Finger Abstractions
LeftPrimaryThumbnumbernumberLeft primary thumb button pressed.
LeftSecondaryThumbnumbernumberLeft secondary thumb button pressed.\r
RightPrimaryThumbnumbernumberRight primary thumb button pressed.\r
RightSecondaryThumbnumbernumberRight secondary thumb button pressed.\r
LeftPrimaryThumbTouchnumbernumberLeft thumb touching primary thumb \r button.
LeftSecondaryThumbTouchnumbernumberLeft thumb touching secondary thumb \r button.
LeftThumbUpnumbernumberLeft thumb not touching primary or secondary \r thumb buttons.
RightPrimaryThumbTouchnumbernumberRight thumb touching primary thumb \r button.
RightSecondaryThumbTouchnumbernumberRight thumb touching secondary thumb \r button.
RightThumbUpnumbernumberRight thumb not touching primary or secondary \r thumb buttons.
LeftPrimaryIndexnumbernumberLeft primary index control pressed. \r To Do: Implement this for current controllers.
LeftSecondaryIndexnumbernumberLeft secondary index control pressed.\r
RightPrimaryIndexnumbernumberRight primary index control pressed. \r To Do: Implement this for current controllers.
RightSecondaryIndexnumbernumberRight secondary index control pressed.\r
LeftPrimaryIndexTouchnumbernumberLeft index finger is touching primary \r index finger control.
LeftSecondaryIndexTouchnumbernumberLeft index finger is touching \r secondary index finger control.
LeftIndexPointnumbernumberLeft index finger is pointing, not touching \r primary or secondary index finger controls.
RightPrimaryIndexTouchnumbernumberRight index finger is touching primary \r index finger control.
RightSecondaryIndexTouchnumbernumberRight index finger is touching \r secondary index finger control.
RightIndexPointnumbernumberRight index finger is pointing, not touching \r primary or secondary index finger controls.
Avatar Skeleton
Hipsnumber{@link Pose}Hips pose.
Spine2number{@link Pose}Spine2 pose.
Headnumber{@link Pose}Head pose.
LeftArmnumber{@link Pose}Left arm pose.
RightArmnumber{@link Pose}Right arm pose
LeftHandnumber{@link Pose}Left hand pose.
LeftHandThumb1number{@link Pose}Left thumb 1 finger joint pose.
LeftHandThumb2number{@link Pose}Left thumb 2 finger joint pose.
LeftHandThumb3number{@link Pose}Left thumb 3 finger joint pose.
LeftHandThumb4number{@link Pose}Left thumb 4 finger joint pose.
LeftHandIndex1number{@link Pose}Left index 1 finger joint pose.
LeftHandIndex2number{@link Pose}Left index 2 finger joint pose.
LeftHandIndex3number{@link Pose}Left index 3 finger joint pose.
LeftHandIndex4number{@link Pose}Left index 4 finger joint pose.
LeftHandMiddle1number{@link Pose}Left middle 1 finger joint pose.\r
LeftHandMiddle2number{@link Pose}Left middle 2 finger joint pose.\r
LeftHandMiddle3number{@link Pose}Left middle 3 finger joint pose.\r
LeftHandMiddle4number{@link Pose}Left middle 4 finger joint pose.\r
LeftHandRing1number{@link Pose}Left ring 1 finger joint pose.
LeftHandRing2number{@link Pose}Left ring 2 finger joint pose.
LeftHandRing3number{@link Pose}Left ring 3 finger joint pose.
LeftHandRing4number{@link Pose}Left ring 4 finger joint pose.
LeftHandPinky1number{@link Pose}Left pinky 1 finger joint pose.
LeftHandPinky2number{@link Pose}Left pinky 2 finger joint pose.
LeftHandPinky3number{@link Pose}Left pinky 3 finger joint pose.
LeftHandPinky4number{@link Pose}Left pinky 4 finger joint pose.
RightHandnumber{@link Pose}Right hand pose.
RightHandThumb1number{@link Pose}Right thumb 1 finger joint pose.\r
RightHandThumb2number{@link Pose}Right thumb 2 finger joint pose.\r
RightHandThumb3number{@link Pose}Right thumb 3 finger joint pose.\r
RightHandThumb4number{@link Pose}Right thumb 4 finger joint pose.\r
RightHandIndex1number{@link Pose}Right index 1 finger joint pose.\r
RightHandIndex2number{@link Pose}Right index 2 finger joint pose.\r
RightHandIndex3number{@link Pose}Right index 3 finger joint pose.\r
RightHandIndex4number{@link Pose}Right index 4 finger joint pose.\r
RightHandMiddle1number{@link Pose}Right middle 1 finger joint pose.\r
RightHandMiddle2number{@link Pose}Right middle 2 finger joint pose.\r
RightHandMiddle3number{@link Pose}Right middle 3 finger joint pose.\r
RightHandMiddle4number{@link Pose}Right middle 4 finger joint pose.\r
RightHandRing1number{@link Pose}Right ring 1 finger joint pose.
RightHandRing2number{@link Pose}Right ring 2 finger joint pose.
RightHandRing3number{@link Pose}Right ring 3 finger joint pose.
RightHandRing4number{@link Pose}Right ring 4 finger joint pose.
RightHandPinky1number{@link Pose}Right pinky 1 finger joint pose.\r
RightHandPinky2number{@link Pose}Right pinky 2 finger joint pose.\r
RightHandPinky3number{@link Pose}Right pinky 3 finger joint pose.\r
RightHandPinky4number{@link Pose}Right pinky 4 finger joint pose.\r
LeftFootnumber{@link Pose}Left foot pose.
RightFootnumber{@link Pose}Right foot pose.
Trackers
TrackedObject00number{@link Pose}Tracker 0 pose.
TrackedObject01number{@link Pose}Tracker 1 pose.
TrackedObject02number{@link Pose}Tracker 2 pose.
TrackedObject03number{@link Pose}Tracker 3 pose.
TrackedObject04number{@link Pose}Tracker 4 pose.
TrackedObject05number{@link Pose}Tracker 5 pose.
TrackedObject06number{@link Pose}Tracker 6 pose.
TrackedObject07number{@link Pose}Tracker 7 pose.
TrackedObject08number{@link Pose}Tracker 8 pose.
TrackedObject09number{@link Pose}Tracker 9 pose.
TrackedObject10number{@link Pose}Tracker 10 pose.
TrackedObject11number{@link Pose}Tracker 11 pose.
TrackedObject12number{@link Pose}Tracker 12 pose.
TrackedObject13number{@link Pose}Tracker 13 pose.
TrackedObject14number{@link Pose}Tracker 14 pose.
TrackedObject15number{@link Pose}Tracker 15 pose.
", + "kind": "typedef", + "name": "Standard", + "type": { + "names": [ + "object" + ] + }, + "memberof": "Controller", + "longname": "Controller.Standard", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

A {@link Controller} mapping object that can contain a set of routes that map:

\r
    \r
  • {@link Controller.Standard} outputs to {@link Controller.Actions} actions or script functions.
  • \r
  • {@link Controller.Hardware} outputs to {@link Controller.Standard} outputs, {@link Controller.Actions} actions, or \r script functions.
  • \r
\r\r

Create by one of the following methods:

\r
    \r
  • Use {@link Controller.newMapping} to create the mapping object, add routes using {@link MappingObject#from|from} or\r {@link MappingObject#makeAxis|makeAxis}, and map the routes to actions or functions using {@link RouteObject} \r methods.
  • \r
  • Use {@link Controller.parseMapping} or {@link Controller.loadMapping} to load a {@link Controller.MappingJSON}.
  • \r
\r\r

Enable the mapping using {@link MappingObject#enable|enable} or {@link Controller.enableMapping} for it to take \reffect.

\r\r

Mappings and their routes are applied according to the following rules:

\r
    \r
  • One read per output: after a controller output has been read, it can't be read again. Exception: You can use \r {@link RouteObject#peek} to read a value without marking that output as having been read.
  • \r
  • Existing mapping routes take precedence over new mapping routes: within a mapping, if a route is added for a control \r output that already has a route the new route is ignored.
  • \r
  • New mappings override previous mappings: each output is processed using the route in the most recently enabled \r mapping that contains that output.
  • \r
", + "kind": "class", + "name": "MappingObject", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "MappingObject", + "scope": "global" + }, + { + "description": "A {@link MappingObject} can be specified in JSON format. A simple example is provided below. Full examples — the \rdefault mappings provided in Interface — can be found at \r\rhttps://github.com/highfidelity/hifi/tree/master/interface/resources/controllers.", + "kind": "typedef", + "name": "MappingJSON", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the mapping.", + "name": "name" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of routes.", + "name": "channels" + } + ], + "examples": [ + "A simple mapping JSON that makes the right trigger move your avatar up after a dead zone.\r{\r \"name\": \"com.highfidelity.controllers.example.jsonMapping\",\r \"channels\": [\r { \r \"from\": \"Standard.RT\", \r \"filters\": { \"type\": \"deadZone\", \"min\": 0.05 },\r \"to\": \"Actions.TranslateY\"\r }\r ]\r}" + ], + "memberof": "Controller", + "longname": "Controller.MappingJSON", + "scope": "static" + }, + { + "description": "A route in a {@link Controller.MappingJSON}.", + "kind": "typedef", + "name": "MappingJSONRoute", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string", + "Controller.MappingJSONAxis" + ] + }, + "description": "The name of a {@link Controller.Hardware} property name or an axis \r made from them. If a property name, the leading \"Controller.Hardware.\" can be omitted.", + "name": "from" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true then peeking is enabled per {@link RouteObject#peek}.", + "name": "peek" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true then debug is enabled per {@link RouteObject#debug}.", + "name": "debug" + }, + { + "type": { + "names": [ + "string", + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "One or more numeric {@link Controller.Hardware} property names which are evaluated \r as booleans and ANDed together. Prepend with a ! to use the logical NOT of the property value. The leading \r \"Controller.Hardware.\" can be omitted from the property names.", + "name": "when" + }, + { + "type": { + "names": [ + "Controller.MappingJSONFilter", + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "One or more filters in the route.", + "name": "filters" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of a {@link Controller.Actions} or {@link Controller.Standard} property. The leading \r \"Controller.\" can be omitted.", + "name": "to" + } + ], + "memberof": "Controller", + "longname": "Controller.MappingJSONRoute", + "scope": "static" + }, + { + "description": "An axis pair in a {@link Controller.MappingJSONRoute}.", + "kind": "typedef", + "name": "MappingJSONAxis", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Array.>" + ] + }, + "description": "A two-member array of single-member arrays of {@link Controller.Hardware} property names. \rThe leading \"Controller.Hardware.\" can be omitted from the property names.", + "name": "makeAxis" + } + ], + "examples": [ + "An axis using the keyboard's left and right keys.\r{ \"makeAxis\" : [\r [\"Keyboard.Left\"],\r [\"Keyboard.Right\"]\r ]\r}" + ], + "memberof": "Controller", + "longname": "Controller.MappingJSONAxis", + "scope": "static" + }, + { + "description": "A filter in a {@link Controller.MappingJSONRoute}.", + "kind": "typedef", + "name": "MappingJSONFilter", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the filter, being the name of the one of the {@link RouteObject}'s filter methods.", + "name": "type" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "If the filter method has a first parameter, the property name is the name of that parameter and the \r property value is the value to use.", + "name": "?" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "If the filter method has a second parameter, the property name is the name of that parameter and \r the property value is the value to use.", + "name": "?" + } + ], + "examples": [ + "A hysteresis filter.\r{ \r \"type\": \"hysteresis\", \r \"min\": 0.85, \r \"max\": 0.9\r}" + ], + "memberof": "Controller", + "longname": "Controller.MappingJSONFilter", + "scope": "static" + }, + { + "description": "Create a new {@link RouteObject} from a controller output, ready to be mapped to a standard control, action, or \rfunction.
\rThis is a QML-specific version of {@link MappingObject#from|from}: use this version in QML files.", + "kind": "function", + "name": "fromQml", + "params": [ + { + "type": { + "names": [ + "Controller.Standard", + "Controller.Hardware", + "function" + ] + }, + "description": "The controller output or function that is the source\r of the route data. If a function, it must return a number or a {@link Pose} value as the route data.", + "name": "source" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "A route ready for mapping to an action or function using {@link RouteObject} methods." + } + ], + "memberof": "MappingObject", + "longname": "MappingObject#fromQml", + "scope": "instance" + }, + { + "description": "Create a new {@link RouteObject} from two numeric {@link Controller.Hardware} outputs, one applied in the negative \rdirection and the other in the positive direction, ready to be mapped to a standard control, action, or function.
\rThis is a QML-specific version of {@link MappingObject#makeAxis|makeAxis}: use this version in QML files.", + "kind": "function", + "name": "makeAxisQml", + "params": [ + { + "type": { + "names": [ + "Controller.Hardware" + ] + }, + "description": "The first, negative-direction controller output.", + "name": "source1" + }, + { + "type": { + "names": [ + "Controller.Hardware" + ] + }, + "description": "The second, positive-direction controller output.", + "name": "source2" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "A route ready for mapping to an action or function using {@link RouteObject} methods. The data \r value passed to the route is the combined value of source2 - source1." + } + ], + "memberof": "MappingObject", + "longname": "MappingObject#makeAxisQml", + "scope": "instance" + }, + { + "description": "Create a new {@link RouteObject} from a controller output, ready to be mapped to a standard control, action, or \rfunction.", + "kind": "function", + "name": "from", + "params": [ + { + "type": { + "names": [ + "Controller.Standard", + "Controller.Hardware", + "function" + ] + }, + "description": "The controller output or function that is the source \r of the route data. If a function, it must return a number or a {@link Pose} value as the route data.", + "name": "source" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "A route ready for mapping to an action or function using {@link RouteObject} methods." + } + ], + "memberof": "MappingObject", + "longname": "MappingObject#from", + "scope": "instance" + }, + { + "description": "Create a new {@link RouteObject} from two numeric {@link Controller.Hardware} outputs, one applied in the negative \rdirection and the other in the positive direction, ready to be mapped to a standard control, action, or function.", + "kind": "function", + "name": "makeAxis", + "params": [ + { + "type": { + "names": [ + "Controller.Hardware" + ] + }, + "description": "The first, negative-direction controller output.", + "name": "source1" + }, + { + "type": { + "names": [ + "Controller.Hardware" + ] + }, + "description": "The second, positive-direction controller output.", + "name": "source2" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "A route ready for mapping to an action or function using {@link RouteObject} methods. The data\r value passed to the route is the combined value of source2 - source1." + } + ], + "examples": [ + "Make the Oculus Touch triggers move your avatar up and down.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\rmapping\r .makeAxis(Controller.Hardware.OculusTouch.LT, Controller.Hardware.OculusTouch.RT)\r .to(Controller.Actions.Up);\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "MappingObject", + "longname": "MappingObject#makeAxis", + "scope": "instance" + }, + { + "description": "Enable or disable the mapping. When enabled, the routes in the mapping take effect.
\rSynonymous with {@link Controller.enableMapping}.", + "kind": "function", + "name": "enable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true then the mapping is enabled, otherwise it is disabled.", + "name": "enable" + } + ], + "returns": [ + { + "type": { + "names": [ + "MappingObject" + ] + }, + "description": "The mapping object, so that further routes can be added." + } + ], + "memberof": "MappingObject", + "longname": "MappingObject#enable", + "scope": "instance" + }, + { + "description": "Disable the mapping. When disabled, the routes in the mapping have no effect.
\rSynonymous with {@link Controller.disableMapping}.", + "kind": "function", + "name": "disable", + "returns": [ + { + "type": { + "names": [ + "MappingObject" + ] + }, + "description": "The mapping object, so that further routes can be added." + } + ], + "memberof": "MappingObject", + "longname": "MappingObject#disable", + "scope": "instance" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

A route in a {@link MappingObject} used by the {@link Controller} API.

\r\r

Create a route using {@link MappingObject} methods and apply this object's methods to process it, terminating with \r{@link RouteObject#to} to apply it to a Standard control, action, or script function. Note: Loops are not \rpermitted.

\r\r

Some methods apply to routes with number data, some apply routes with {@link Pose} data, and some apply to both route \rtypes.

", + "kind": "class", + "name": "RouteObject", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "RouteObject", + "scope": "global" + }, + { + "description": "Terminate the route with a standard control, an action, or a script function. The output value from the route is \rsent to the specified destination.
\rThis is a QML-specific version of {@link MappingObject#to|to}: use this version in QML files.", + "kind": "function", + "name": "toQml", + "params": [ + { + "type": { + "names": [ + "Controller.Standard", + "Controller.Actions", + "function" + ] + }, + "description": "The standard control, action, or JavaScript\rfunction that the route output is mapped to. For a function, the parameter can be either the name of the function or\ran in-line function definition.", + "name": "destination" + } + ], + "memberof": "RouteObject", + "longname": "RouteObject#toQml", + "scope": "instance" + }, + { + "description": "Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and\rthe input is read only if the condition is true. Thus, if the condition is not met then subsequent\rroutes using the same input are processed.
\rThis is a QML-specific version of {@link MappingObject#to|to}: use this version in QML files.", + "kind": "function", + "name": "whenQml", + "params": [ + { + "type": { + "names": [ + "condition", + "Array." + ] + }, + "description": "

A condition may be a:

\r
    \r
  • A boolean or numeric {@link Controller.Hardware} property, which is evaluated as a boolean.
  • \r
  • ! followed by a {@link Controller.Hardware} property, indicating the logical NOT should be\r used.
  • \r
  • A script function returning a boolean value. This can be either the name of the function or an in-line\r definition.
  • \r
\r

If an array of conditions is provided, their values are ANDed together.

", + "name": "expression" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the condition added." + } + ], + "memberof": "RouteObject", + "longname": "RouteObject#whenQml", + "scope": "instance" + }, + { + "description": "Terminate the route with a standard control, an action, or a script function. The output value from the route is \rsent to the specified destination.", + "kind": "function", + "name": "to", + "params": [ + { + "type": { + "names": [ + "Controller.Standard", + "Controller.Actions", + "function" + ] + }, + "description": "The standard control, action, or JavaScript \rfunction that the route output is mapped to. For a function, the parameter can be either the name of the function or \ran in-line function definition.", + "name": "destination" + } + ], + "examples": [ + "Make the right trigger move your avatar up.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\r\rmapping.from(Controller.Standard.RT).to(Controller.Actions.TranslateY);\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});", + "Make the right trigger call a function.\rfunction onRightTrigger(value) {\r print(\"Trigger value: \" + value);\r}\r\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\r\rmapping.from(Controller.Standard.RT).to(onRightTrigger);\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#to", + "scope": "instance" + }, + { + "description": "Enable and disabling writing debug information for a route to the program log.", + "kind": "function", + "name": "debug", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "If true then writing debug information is enabled for the route, \r otherwise it is disabled.", + "name": "enable" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with debug output enabled or disabled." + } + ], + "examples": [ + "Write debug information to the program log for a right trigger mapping.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\r\rmapping.from(Controller.Standard.RT).debug().to(function (value) {\r print(\"Value: \" + value);\r});\r\r// Information similar to the following is written each frame:\r[DEBUG] [hifi.controllers] Beginning mapping frame\r[DEBUG] [hifi.controllers] Processing device routes\r[DEBUG] [hifi.controllers] Processing standard routes\r[DEBUG] [hifi.controllers] Applying route \"\"\r[DEBUG] [hifi.controllers] Value was 5.96046e-07\r[DEBUG] [hifi.controllers] Filtered value was 5.96046e-07\r\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#debug", + "scope": "instance" + }, + { + "description": "Process the route without marking the controller output as having been read, so that other routes from the same \rcontroller output can also process.", + "kind": "function", + "name": "peek", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "description": "If true then the route is processed without marking the route's \r controller source as having been read.", + "name": "enable" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the peek feature enabled." + } + ], + "memberof": "RouteObject", + "longname": "RouteObject#peek", + "scope": "instance" + }, + { + "description": "Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and \rthe input is read only if the condition is true. Thus, if the condition is not met then subsequent \rroutes using the same input are processed.", + "kind": "function", + "name": "when", + "params": [ + { + "type": { + "names": [ + "condition", + "Array." + ] + }, + "description": "

A condition may be a:

\r
    \r
  • A numeric {@link Controller.Hardware} property, which is evaluated as a boolean.
  • \r
  • ! followed by a {@link Controller.Hardware} property to use the logical NOT of the property \r value.
  • \r
  • A script function returning a boolean value. This can be either the name of the function or an in-line \r definition.
  • \r
\r

If an array of conditions is provided, their values are ANDed together.

", + "name": "expression" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the condition added." + } + ], + "examples": [ + "Process the right trigger differently in HMD and desktop modes.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\r\r// Processed only if in HMD mode.\rmapping.from(Controller.Standard.RT)\r .when(Controller.Hardware.Application.InHMD)\r .to(function () { print(\"Trigger pressed in HMD mode.\"); });\r\r// Processed only if previous route not processed.\rmapping.from(Controller.Standard.RT)\r .to(function () { print(\"Trigger pressed in desktop mode.\"); });\r\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#when", + "scope": "instance" + }, + { + "description": "Filter numeric route values to lie between two values; values outside this range are not passed on through the \rroute.", + "kind": "function", + "name": "clamp", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The minimum value to pass through.", + "name": "min" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The maximum value to pass through.", + "name": "max" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The route object with the clamp filter added." + } + ], + "examples": [ + "Clamp right trigger values to between 0.3 and 0.7.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\rmapping.from(Controller.Standard.RT).clamp(0.3, 0.7).to(function (value) {\r print(\"Value: \" + value);\r});\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#clamp", + "scope": "instance" + }, + { + "description": "Filter numeric route values such that they are rounded to 0 or 1 without output values \rflickering when the input value hovers around 0.5. For example, this enables you to use an analog input \ras if it were a toggle.", + "kind": "function", + "name": "hysteresis", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "When the input value drops below this value the output value changes to 0.", + "name": "min" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "When the input value rises above this value the output value changes to 1.", + "name": "max" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the filter applied." + } + ], + "examples": [ + "Round the right joystick forward/back values to 0 or 1 with hysteresis.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\rmapping.from(Controller.Standard.RY).peek().to(function (value) {\r print(\"Raw value: \" + value); // 0.0 - 1.0.\r});\rmapping.from(Controller.Standard.RY).hysteresis(0.3, 0.7).to(function (value) {\r print(\"Hysteresis value: \" + value); // 0 or 1.\r});\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#hysteresis", + "scope": "instance" + }, + { + "description": "Filter numeric route values to send at a specified interval.", + "kind": "function", + "name": "pulse", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The interval between sending values, in seconds.", + "name": "interval" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the filter applied." + } + ], + "examples": [ + "Send right trigger values every half second.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\rmapping.from(Controller.Standard.RT).pulse(0.5).to(function (value) {\r print(\"Value: \" + value);\r});\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#pulse", + "scope": "instance" + }, + { + "description": "Filter numeric and {@link Pose} route values to be scaled by a constant amount.", + "kind": "function", + "name": "scale", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The scale to multiply the value by.", + "name": "multiplier" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the filter applied." + } + ], + "examples": [ + "Scale the value of the right joystick forward/back values by 10.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\rmapping.from(Controller.Standard.LY).to(function (value) {\r print(\"L value: \" + value); // -1.0 to 1.0 values.\r});\rmapping.from(Controller.Standard.RY).scale(10.0).to(function (value) {\r print(\"R value: \" + value); // -10.0 to -10.0 values.\r});\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#scale", + "scope": "instance" + }, + { + "description": "Filter numeric and {@link Pose} route values to have the opposite sign, e.g., 0.5 is changed to \r-0.5.", + "kind": "function", + "name": "invert", + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the filter applied." + } + ], + "examples": [ + "Invert the value of the right joystick forward/back values.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\rmapping.from(Controller.Standard.LY).to(function (value) {\r print(\"L value: \" + value); // -1.0 to 1.0 values, forward to back.\r});\rmapping.from(Controller.Standard.RY).invert().to(function (value) {\r print(\"R value: \" + value); // 1.0 to -1.0 values, forward to back.\r});\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#invert", + "scope": "instance" + }, + { + "description": "Filter numeric route values such that they're sent only when the input value is outside a dead-zone. When the input \rpasses the dead-zone value, output is sent starting at 0.0 and catching up with the input value. As the \rinput returns toward the dead-zone value, output values reduce to 0.0 at the dead-zone value.", + "kind": "function", + "name": "deadZone", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The minimum input value at which to start sending output. For negative input values, the \r negative of this value is used.", + "name": "min" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the filter applied." + } + ], + "examples": [ + "Apply a dead-zone to the right joystick forward/back values.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\rmapping.from(Controller.Standard.RY).deadZone(0.2).to(function (value) {\r print(\"Value: \" + value); // 0.0 - 1.0 values once outside the dead-zone.\r});\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#deadZone", + "scope": "instance" + }, + { + "description": "Filter numeric route values such that they are rounded to -1, 0, or 1.\rFor example, this enables you to use an analog input as if it were a toggle or, in the case of a bidirectional axis, \ra tri-state switch.", + "kind": "function", + "name": "constrainToInteger", + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the filter applied." + } + ], + "examples": [ + "Round the right joystick forward/back values to -1, 0, or \r 1.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\rmapping.from(Controller.Standard.RY).constrainToInteger().to(function (value) {\r print(\"Value: \" + value); // -1, 0, or 1\r});\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#constrainToInteger", + "scope": "instance" + }, + { + "description": "Filter numeric route values such that they are rounded to 0 or 1. For example, this \renables you to use an analog input as if it were a toggle.", + "kind": "function", + "name": "constrainToPositiveInteger", + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the filter applied." + } + ], + "examples": [ + "Round the right joystick forward/back values to 0 or 1.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\rmapping.from(Controller.Standard.RY).constrainToPositiveInteger().to(function (value) {\r print(\"Value: \" + value); // 0, or 1\r});\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});" + ], + "memberof": "RouteObject", + "longname": "RouteObject#constrainToPositiveInteger", + "scope": "instance" + }, + { + "description": "Filter {@link Pose} route values to have a pre-translation applied.", + "kind": "function", + "name": "translate", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The pre-translation to add to the pose.", + "name": "translate" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the pre-translation applied." + } + ], + "memberof": "RouteObject", + "longname": "RouteObject#translate", + "scope": "instance" + }, + { + "description": "Filter {@link Pose} route values to have a pre-transform applied.", + "kind": "function", + "name": "transform", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "The pre-transform to apply.", + "name": "transform" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the pre-transform applied." + } + ], + "memberof": "RouteObject", + "longname": "RouteObject#transform", + "scope": "instance" + }, + { + "description": "Filter {@link Pose} route values to have a post-transform applied.", + "kind": "function", + "name": "postTransform", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "The post-transform to apply.", + "name": "transform" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the post-transform applied." + } + ], + "memberof": "RouteObject", + "longname": "RouteObject#postTransform", + "scope": "instance" + }, + { + "description": "Filter {@link Pose} route values to have a pre-rotation applied.", + "kind": "function", + "name": "rotate", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The pre-rotation to add to the pose.", + "name": "rotation" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the pre-rotation applied." + } + ], + "memberof": "RouteObject", + "longname": "RouteObject#rotate", + "scope": "instance" + }, + { + "description": "Filter {@link Pose} route values to be smoothed by a low velocity filter. The filter's rotation and translation \rvalues are calculated as: (1 - f) * currentValue + f * previousValue where \rf = currentVelocity / filterConstant. At low velocities, the filter value is largely the previous \rvalue; at high velocities the value is wholly the current controller value.", + "kind": "function", + "name": "lowVelocity", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotational velocity, in rad/s, at which the filter value is wholly the latest \r controller value.", + "name": "rotationConstant" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The linear velocity, in m/s, at which the filter value is wholly the latest \r controller value.", + "name": "translationConstant" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject smoothed by low velocity filtering." + } + ], + "memberof": "RouteObject", + "longname": "RouteObject#lowVelocity", + "scope": "instance" + }, + { + "description": "Filter {@link Pose} route values to be smoothed by an exponential decay filter. The filter's rotation and \rtranslation values are calculated as: filterConstant * currentValue + (1 - filterConstant) * \rpreviousValue. Values near 1 are less smooth with lower latency; values near 0 are more smooth with higher \rlatency.", + "kind": "function", + "name": "exponentialSmoothing", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Rotation filter constant, 0.0–1.0.", + "name": "rotationConstant" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Translation filter constant, 0.0–1.0.", + "name": "translationConstant" + } + ], + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject smoothed by an exponential filter." + } + ], + "memberof": "RouteObject", + "longname": "RouteObject#exponentialSmoothing", + "scope": "instance" + }, + { + "description": "Filter numeric route values such that a value of 0.0 is changed to 1.0, and other values \rare changed to 0.0.", + "kind": "function", + "name": "logicalNot", + "returns": [ + { + "type": { + "names": [ + "RouteObject" + ] + }, + "description": "The RouteObject with the filter applied." + } + ], + "examples": [ + "Logical NOT of LSTouch value.\rvar MAPPING_NAME = \"com.highfidelity.controllers.example.newMapping\";\rvar mapping = Controller.newMapping(MAPPING_NAME);\r\rmapping.from(Controller.Standard.RSTouch).peek().to(function (value) {\r print(\"RSTouch: \" + value);\r});\rmapping.from(Controller.Standard.RSTouch).logicalNot().to(function (value) {\r print(\"localNot of RSTouch: \" + value);\r});\rController.enableMapping(MAPPING_NAME);\r\rScript.scriptEnding.connect(function () {\r Controller.disableMapping(MAPPING_NAME);\r});\r\n " + ], + "memberof": "RouteObject", + "longname": "RouteObject#logicalNot", + "scope": "instance" + }, + { + "description": "Triggered when the HMD.ipdScale property value changes.", + "kind": "function", + "name": "IPDScaleChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "HMD", + "longname": "HMD.IPDScaleChanged", + "scope": "static" + }, + { + "description": "Triggered when Interface's display mode changes and when the user puts on or takes off their HMD.", + "kind": "function", + "name": "displayModeChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the display mode is HMD, otherwise false. This is the \r same value as provided by HMD.active.", + "name": "isHMDMode" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when the display mode changes.\rHMD.displayModeChanged.connect(function (isHMDMode) {\r print(\"Display mode changed\");\r print(\"isHMD = \" + isHMDMode);\r print(\"HMD.active = \" + HMD.active);\r print(\"HMD.mounted = \" + HMD.mounted);\r});" + ], + "memberof": "HMD", + "longname": "HMD.displayModeChanged", + "scope": "static" + }, + { + "description": "Triggered when the HMD.mounted property value changes.", + "kind": "function", + "name": "mountedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when there's a change in the HMD being worn.\rHMD.mountedChanged.connect(function () {\r print(\"Mounted changed. HMD is mounted: \" + HMD.mounted);\r});\r\n " + ], + "memberof": "HMD", + "longname": "HMD.mountedChanged", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Reticle", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "allowMouseCapture" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "depth" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "maximumPosition" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "mouseCaptured" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "pointingAtSystemOverlay" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "scale" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "visible" + } + ], + "longname": "Reticle", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "isMouseCaptured", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Reticle", + "longname": "Reticle.isMouseCaptured", + "scope": "static" + }, + { + "kind": "function", + "name": "getAllowMouseCapture", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Reticle", + "longname": "Reticle.getAllowMouseCapture", + "scope": "static" + }, + { + "kind": "function", + "name": "setAllowMouseCapture", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "allowMouseCaptured" + } + ], + "memberof": "Reticle", + "longname": "Reticle.setAllowMouseCapture", + "scope": "static" + }, + { + "kind": "function", + "name": "isPointingAtSystemOverlay", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Reticle", + "longname": "Reticle.isPointingAtSystemOverlay", + "scope": "static" + }, + { + "kind": "function", + "name": "getVisible", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Reticle", + "longname": "Reticle.getVisible", + "scope": "static" + }, + { + "kind": "function", + "name": "setVisible", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "visible" + } + ], + "memberof": "Reticle", + "longname": "Reticle.setVisible", + "scope": "static" + }, + { + "kind": "function", + "name": "getDepth", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Reticle", + "longname": "Reticle.getDepth", + "scope": "static" + }, + { + "kind": "function", + "name": "setDepth", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "depth" + } + ], + "memberof": "Reticle", + "longname": "Reticle.setDepth", + "scope": "static" + }, + { + "kind": "function", + "name": "getScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Reticle", + "longname": "Reticle.getScale", + "scope": "static" + }, + { + "kind": "function", + "name": "setScale", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "scale" + } + ], + "memberof": "Reticle", + "longname": "Reticle.setScale", + "scope": "static" + }, + { + "kind": "function", + "name": "getPosition", + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + } + } + ], + "memberof": "Reticle", + "longname": "Reticle.getPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "setPosition", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + } + ], + "memberof": "Reticle", + "longname": "Reticle.setPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getMaximumPosition", + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + } + } + ], + "memberof": "Reticle", + "longname": "Reticle.getMaximumPosition", + "scope": "static" + }, + { + "description": "Ambient light is defined by the following properties.", + "kind": "typedef", + "name": "AmbientLight", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.5, + "description": "The intensity of the light.", + "name": "ambientIntensity" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A cube map image that defines the color of the light coming from each direction. If \r \"\" then the entity's {@link Entities.Skybox|Skybox} url property value is used, unless that also is \"\" in which \r case the entity's ambientLightMode property is set to \"inherit\".", + "name": "ambientURL" + } + ], + "memberof": "Entities", + "longname": "Entities.AmbientLight", + "scope": "static" + }, + { + "description": "The AnimationProperties are used to configure an animation.", + "kind": "typedef", + "name": "AnimationProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The URL of the FBX file that has the animation.", + "name": "url" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 30, + "description": "The speed in frames/s that the animation is played at.", + "name": "fps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The first frame to play in the animation.", + "name": "firstFrame" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 100000, + "description": "The last frame to play in the animation.", + "name": "lastFrame" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The current frame being played in the animation.", + "name": "currentFrame" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then the animation should play.", + "name": "running" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true then the animation should be continuously repeated in a loop.", + "name": "loop" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then the rotations and translations of the last frame played should be\r maintained when the animation stops playing.", + "name": "hold" + } + ], + "memberof": "Entities", + "longname": "Entities.AnimationProperties", + "scope": "static" + }, + { + "description": "Bloom is defined by the following properties.", + "kind": "typedef", + "name": "Bloom", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.25, + "description": "The intensity of the bloom effect.", + "name": "bloomIntensity" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.7, + "description": "The threshold for the bloom effect.", + "name": "bloomThreshold" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.9, + "description": "The size of the bloom effect.", + "name": "bloomSize" + } + ], + "memberof": "Entities", + "longname": "Entities.Bloom", + "scope": "static" + }, + { + "description": "

An entity action may be one of the following types:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueTypeDescriptionArguments
\"far-grab\"Avatar actionMoves and rotates an entity to a target position and orientation, optionally relative to another entity. Collisions \r between the entity and the user's avatar are disabled during the far-grab.{@link Entities.ActionArguments-FarGrab}
\"hold\"Avatar actionPositions and rotates an entity relative to an avatar's hand. Collisions between the entity and the user's avatar \r are disabled during the hold.{@link Entities.ActionArguments-Hold}
\"offset\"Object actionMoves an entity so that it is a set distance away from a target point.{@link Entities.ActionArguments-Offset}
\"tractor\"Object actionMoves and rotates an entity to a target position and orientation, optionally relative to another entity.{@link Entities.ActionArguments-Tractor}
\"travel-oriented\"Object actionOrients an entity to align with its direction of travel.{@link Entities.ActionArguments-TravelOriented}
\"hinge\"Object constraintLets an entity pivot about an axis or connects two entities with a hinge joint.{@link Entities.ActionArguments-Hinge}
\"slider\"Object constraintLets an entity slide and rotate along an axis, or connects two entities that slide and rotate along a shared \r axis.{@link Entities.ActionArguments-Slider|ActionArguments-Slider}
\"cone-twist\"Object constraintConnects two entities with a joint that can move through a cone and can twist.{@link Entities.ActionArguments-ConeTwist}
\"ball-socket\"Object constraintConnects two entities with a ball and socket joint.{@link Entities.ActionArguments-BallSocket}
\"spring\"Synonym for \"tractor\". Legacy value.
", + "kind": "typedef", + "name": "ActionType", + "type": { + "names": [ + "string" + ] + }, + "memberof": "Entities", + "longname": "Entities.ActionType", + "scope": "static" + }, + { + "description": "Different entity types have different properties: some common to all entities (listed below) and some specific to each \r{@link Entities.EntityType|EntityType} (linked to below). The properties are accessed as an object of property names and \rvalues.", + "kind": "typedef", + "name": "EntityProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity. Read-only.", + "name": "id" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A name for the entity. Need not be unique.", + "name": "name" + }, + { + "type": { + "names": [ + "Entities.EntityType" + ] + }, + "description": "The entity type. You cannot change the type of an entity after it's created. (Though \r its value may switch among \"Box\", \"Shape\", and \"Sphere\" depending on changes to \r the shape property set for entities of these types.) Read-only.", + "name": "type" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then the entity is an avatar entity; otherwise it is a server\r entity. An avatar entity follows you to each domain you visit, rendering at the same world coordinates unless it's \r parented to your avatar. Value cannot be changed after the entity is created.
\r The value can also be set at entity creation by using the clientOnly parameter in \r {@link Entities.addEntity}.", + "name": "clientOnly" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": "Uuid.NULL", + "description": "The session ID of the owning avatar if clientOnly is \r true, otherwise {@link Uuid|Uuid.NULL}. Read-only.", + "name": "owningAvatarID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The UTC date and time that the entity was created, in ISO 8601 format as\r yyyy-MM-ddTHH:mm:ssZ. Read-only.", + "name": "created" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The age of the entity in seconds since it was created. Read-only.", + "name": "age" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The age of the entity since it was created, formatted as h hours m minutes s \r seconds.", + "name": "ageAsText" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": -1, + "description": "How long an entity lives for, in seconds, before being automatically deleted. A value of\r -1 means that the entity lives for ever.", + "name": "lifetime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "When the entity was last edited, expressed as the number of microseconds since\r 1970-01-01T00:00:00 UTC. Read-only.", + "name": "lastEdited" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The session ID of the avatar or agent that most recently created or edited the entity.\r Read-only.", + "name": "lastEditedBy" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Whether or not the entity can be edited or deleted. If true then the \r entity's properties other than locked cannot be changed, and the entity cannot be deleted.", + "name": "locked" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "Whether or not the entity is rendered. If true then the entity is rendered.", + "name": "visible" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "Whether or not the entity can cast a shadow. Currently applicable only to \r {@link Entities.EntityType|Model} and {@link Entities.EntityType|Shape} entities. Shadows are cast if inside a \r {@link Entities.EntityType|Zone} entity with castShadows enabled in its \r {@link Entities.EntityProperties-Zone|keyLight} property.", + "name": "canCastShadow" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "Whether or not the entity is rendered in the secondary camera. If true then the entity is rendered.", + "name": "isVisibleInSecondaryCamera" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The position of the entity.", + "name": "position" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "defaultvalue": "0,0,0,1", + "description": "The orientation of the entity with respect to world coordinates.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0.5,0.5,0.5", + "description": "The point in the entity that is set to the entity's position and is rotated \r about, {@link Vec3(0)|Vec3.ZERO} – {@link Vec3(0)|Vec3.ONE}. A value of {@link Vec3(0)|Vec3.ZERO} is the entity's\r minimum x, y, z corner; a value of {@link Vec3(0)|Vec3.ONE} is the entity's maximum x, y, z corner.", + "name": "registrationPoint" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The center of the entity's unscaled mesh model if it has one, otherwise\r {@link Vec3(0)|Vec3.ZERO}. Read-only.", + "name": "naturalPosition" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The dimensions of the entity's unscaled mesh model if it has one, otherwise \r {@link Vec3(0)|Vec3.ONE}. Read-only.", + "name": "naturalDimensions" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The linear velocity of the entity in m/s with respect to world coordinates.", + "name": "velocity" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.39347, + "description": "How much to slow down the linear velocity of an entity over time, 0.0 \r – 1.0. A higher damping value slows down the entity more quickly. The default value is for an \r exponential decay timescale of 2.0s, where it takes 2.0s for the movement to slow to 1/e = 0.368 of its \r initial value.", + "name": "damping" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The angular velocity of the entity in rad/s with respect to its axes, about its\r registration point.", + "name": "angularVelocity" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.39347, + "description": "How much to slow down the angular velocity of an entity over time, \r 0.01.0. A higher damping value slows down the entity more quickly. The default value \r is for an exponential decay timescale of 2.0s, where it takes 2.0s for the movement to slow to 1/e = 0.368 \r of its initial value.", + "name": "angularDamping" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The acceleration due to gravity in m/s2 that the entity should move with, in \r world coordinates. Set to { x: 0, y: -9.8, z: 0 } to simulate Earth's gravity. Gravity is applied to an \r entity's motion only if its dynamic property is true. If changing an entity's \r gravity from {@link Vec3(0)|Vec3.ZERO}, you need to give it a small velocity in order to kick \r off physics simulation.\r The gravity value is applied in addition to the acceleration value.", + "name": "gravity" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "A general acceleration in m/s2 that the entity should move with, in world \r coordinates. The acceleration is applied to an entity's motion only if its dynamic property is \r true. If changing an entity's acceleration from {@link Vec3(0)|Vec3.ZERO}, you need to give it \r a small velocity in order to kick off physics simulation.\r The acceleration value is applied in addition to the gravity value.", + "name": "acceleration" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.5, + "description": "The \"bounciness\" of an entity when it collides, 0.0 – \r 0.99. The higher the value, the more bouncy.", + "name": "restitution" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.5, + "description": "How much to slow down an entity when it's moving against another, 0.0 – \r 10.0. The higher the value, the more quickly it slows down. Examples: 0.1 for ice, \r 0.9 for sandpaper.", + "name": "friction" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1000, + "description": "The density of the entity in kg/m3, 100 for balsa wood – \r 10000 for silver. The density is used in conjunction with the entity's bounding box volume to work out its \r mass in the application of physics.", + "name": "density" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Whether or not the entity should collide with items per its \r collisionMask property. If true then the entity does not collide.", + "name": "collisionless" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonym for collisionless.", + "name": "ignoreForCollisions" + }, + { + "type": { + "names": [ + "Entities.CollisionMask" + ] + }, + "defaultvalue": 31, + "description": "What types of items the entity should collide with.", + "name": "collisionMask" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"static,dynamic,kinematic,myAvatar,otherAvatar,\"", + "description": "Synonym for collisionMask,\r in text format.", + "name": "collidesWith" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The sound to play when the entity experiences a collision. Valid file formats are\r as per the {@link SoundCache} object.", + "name": "collisionSoundURL" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Whether or not the entity should be affected by collisions. If true then \r the entity's movement is affected by collisions.", + "name": "dynamic" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Synonym for dynamic.", + "name": "collisionsWillMove" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A \"hifi://\" metaverse address that a user is taken to when they click on the entity.", + "name": "href" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A description of the href property value.", + "name": "description" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "Used to store extra data about the entity in JSON format. WARNING: Other apps such as the \r Create app can also use this property, so make sure you handle data stored by other apps — edit only your bit and \r leave the rest of the data intact. You can use JSON.parse() to parse the string into a JavaScript object \r which you can manipulate the properties of, and use JSON.stringify() to convert the object into a string to \r put in the property.", + "name": "userData" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The URL of the client entity script, if any, that is attached to the entity.", + "name": "script" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Intended to be used to indicate when the client entity script was loaded. Should be \r an integer number of milliseconds since midnight GMT on January 1, 1970 (e.g., as supplied by Date.now(). \r If you update the property's value, the script is re-downloaded and reloaded. This is how the \"reload\" \r button beside the \"script URL\" field in properties tab of the Create app works.", + "name": "scriptTimestamp" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The URL of the server entity script, if any, that is attached to the entity.", + "name": "serverScripts" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": "Uuid.NULL", + "description": "The ID of the entity or avatar that this entity is parented to. {@link Uuid|Uuid.NULL} \r if the entity is not parented.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 65535, + "description": "The joint of the entity or avatar that this entity is parented to. Use \r 65535 or -1 to parent to the entity or avatar's position and orientation rather than a joint.", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The position of the entity relative to its parent if the entity is parented, \r otherwise the same value as position. If the entity is parented to an avatar and is clientOnly \r so that it scales with the avatar, this value remains the original local position value while the avatar scale changes.", + "name": "localPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "defaultvalue": "0,0,0,1", + "description": "The rotation of the entity relative to its parent if the entity is parented, \r otherwise the same value as rotation.", + "name": "localRotation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The velocity of the entity relative to its parent if the entity is parented, \r otherwise the same value as velocity.", + "name": "localVelocity" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The angular velocity of the entity relative to its parent if the entity is \r parented, otherwise the same value as position.", + "name": "localAngularVelocity" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The dimensions of the entity. If the entity is parented to an avatar and is \r clientOnly so that it scales with the avatar, this value remains the original dimensions value while the \r avatar scale changes.", + "name": "localDimensions" + }, + { + "type": { + "names": [ + "Entities.BoundingBox" + ] + }, + "description": "The axis-aligned bounding box that tightly encloses the entity. \r Read-only.", + "name": "boundingBox" + }, + { + "type": { + "names": [ + "AACube" + ] + }, + "description": "The axis-aligned cube that determines where the entity lives in the entity server's octree. \r The cube may be considerably larger than the entity in some situations, e.g., when the entity is grabbed by an avatar: \r the position of the entity is determined through avatar mixer updates and so the AA cube is expanded in order to reduce \r unnecessary entity server updates. Scripts should not change this property's value.", + "name": "queryAACube" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "Base-64 encoded compressed dump of the actions associated with the entity. This property\r is typically not used in scripts directly; rather, functions that manipulate an entity's actions update it.\r The size of this property increases with the number of actions. Because this property value has to fit within a High \r Fidelity datagram packet there is a limit to the number of actions that an entity can have, and edits which would result \r in overflow are rejected.\r Read-only.", + "name": "actionData" + }, + { + "type": { + "names": [ + "Entities.RenderInfo" + ] + }, + "description": "Information on the cost of rendering the entity. Currently information is only \r provided for Model entities. Read-only.", + "name": "renderInfo" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then the entity can be cloned via {@link Entities.cloneEntity}.", + "name": "cloneable" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 300, + "description": "The entity lifetime for clones created from this entity.", + "name": "cloneLifetime" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The total number of clones of this entity that can exist in the domain at any given time.", + "name": "cloneLimit" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then clones created from this entity will have their \r dynamic property set to true.", + "name": "cloneDynamic" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then clones created from this entity will be created as \r avatar entities: their clientOnly property will be set to true.", + "name": "cloneAvatarEntity" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that this entity was cloned from.", + "name": "cloneOriginID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "Certifiable name of the Marketplace item.", + "name": "itemName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "Certifiable description of the Marketplace item.", + "name": "itemDescription" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "Certifiable category of the Marketplace item.", + "name": "itemCategories" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "Certifiable artist that created the Marketplace item.", + "name": "itemArtist" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "Certifiable license URL for the Marketplace item.", + "name": "itemLicense" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 4294967295, + "description": "Certifiable maximum integer number of editions (copies) of the Marketplace item \r allowed to be sold.", + "name": "limitedRun" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Certifiable integer edition (copy) number or the Marketplace item. Each copy sold in \r the Marketplace is numbered sequentially, starting at 1.", + "name": "editionNumber" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Certifiable integer instance number for identical entities in a Marketplace \r item. A Marketplace item may have identical parts. If so, then each is numbered sequentially with an instance number.", + "name": "entityInstanceNumber" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "Certifiable UUID for the Marketplace item, as used in the URL of the item's download\r and its Marketplace Web page.", + "name": "marketplaceID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "Hash of the entity's static certificate JSON, signed by the artist's private key.", + "name": "certificateID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The version of the method used to generate the certificateID.", + "name": "staticCertificateVersion" + } + ], + "see": [ + "The different entity types have additional properties as follows:", + "{@link Entities.EntityProperties-Box|EntityProperties-Box}", + "{@link Entities.EntityProperties-Light|EntityProperties-Light}", + "{@link Entities.EntityProperties-Line|EntityProperties-Line}", + "{@link Entities.EntityProperties-Material|EntityProperties-Material}", + "{@link Entities.EntityProperties-Model|EntityProperties-Model}", + "{@link Entities.EntityProperties-ParticleEffect|EntityProperties-ParticleEffect}", + "{@link Entities.EntityProperties-PolyLine|EntityProperties-PolyLine}", + "{@link Entities.EntityProperties-PolyVox|EntityProperties-PolyVox}", + "{@link Entities.EntityProperties-Shape|EntityProperties-Shape}", + "{@link Entities.EntityProperties-Sphere|EntityProperties-Sphere}", + "{@link Entities.EntityProperties-Text|EntityProperties-Text}", + "{@link Entities.EntityProperties-Web|EntityProperties-Web}", + "{@link Entities.EntityProperties-Zone|EntityProperties-Zone}" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties", + "scope": "static" + }, + { + "description": "The \"Box\" {@link Entities.EntityType|EntityType} is the same as the \"Shape\"\r{@link Entities.EntityType|EntityType} except that its shape value is always set to \"Cube\"\rwhen the entity is created. If its shape property value is subsequently changed then the entity's \rtype will be reported as \"Sphere\" if the shape is set to \"Sphere\", \rotherwise it will be reported as \"Shape\".", + "kind": "typedef", + "name": "EntityProperties-Box", + "type": { + "names": [ + "object" + ] + }, + "memberof": "Entities", + "longname": "Entities.EntityProperties-Box", + "scope": "static" + }, + { + "description": "The \"Light\" {@link Entities.EntityType|EntityType} adds local lighting effects.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.", + "kind": "typedef", + "name": "EntityProperties-Light", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0.1,0.1,0.1", + "description": "The dimensions of the entity. Entity surface outside these dimensions are not lit \r by the light.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the light emitted.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The brightness of the light.", + "name": "intensity" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.1, + "description": "The distance from the light's center at which intensity is reduced by 25%.", + "name": "falloffRadius" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then the light is directional, emitting along the entity's\r local negative z-axis; otherwise the light is a point light which emanates in all directions.", + "name": "isSpotlight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "Affects the softness of the spotlight beam: the higher the value the softer the beam.", + "name": "exponent" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1.57, + "description": "Affects the size of the spotlight beam: the higher the value the larger the beam.", + "name": "cutoff" + } + ], + "examples": [ + "Create a spotlight pointing at the ground.\rEntities.addEntity({\r type: \"Light\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -4 })),\r rotation: Quat.fromPitchYawRollDegrees(-75, 0, 0),\r dimensions: { x: 5, y: 5, z: 5 },\r intensity: 100,\r falloffRadius: 0.3,\r isSpotlight: true,\r exponent: 20,\r cutoff: 30,\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-Light", + "scope": "static" + }, + { + "description": "The \"Line\" {@link Entities.EntityType|EntityType} draws thin, straight lines between a sequence of two or more \rpoints.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.", + "kind": "typedef", + "name": "EntityProperties-Line", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0.1,0.1,0.1", + "description": "The dimensions of the entity. Must be sufficient to contain all the \r linePoints.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "defaultvalue": "[]", + "description": "The sequence of points to draw lines between. The values are relative to the entity's\r position. A maximum of 70 points can be specified. The property's value is set only if all the linePoints \r lie within the entity's dimensions.", + "name": "linePoints" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 2, + "description": "Currently not used.", + "name": "lineWidth" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the line.", + "name": "color" + } + ], + "examples": [ + "Draw lines in a \"V\".\rvar entity = Entities.addEntity({\r type: \"Line\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.75, z: -5 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 2, y: 2, z: 1 },\r linePoints: [\r { x: -1, y: 1, z: 0 },\r { x: 0, y: -1, z: 0 },\r { x: 1, y: 1, z: 0 },\r ],\r color: { red: 255, green: 0, blue: 0 },\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-Line", + "scope": "static" + }, + { + "description": "The \"Material\" {@link Entities.EntityType|EntityType} modifies the existing materials on\r{@link Entities.EntityType|Model} entities, {@link Entities.EntityType|Shape} entities (albedo only), \r{@link Overlays.OverlayType|model overlays}, and avatars.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.
\rTo apply a material to an entity or overlay, set the material entity's parentID property to the entity or \roverlay's ID.\rTo apply a material to an avatar, set the material entity's parentID property to the avatar's session UUID.\rTo apply a material to your avatar such that it persists across domains and log-ins, create the material as an avatar entity \rby setting the clientOnly parameter in {@link Entities.addEntity} to true.\rMaterial entities render as non-scalable spheres if they don't have their parent set.", + "kind": "typedef", + "name": "EntityProperties-Material", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "URL to a {@link MaterialResource}. If you append ?name to the URL, the \r material with that name in the {@link MaterialResource} will be applied to the entity.
\r Alternatively, set the property value to \"materialData\" to use the materialData property \r for the {@link MaterialResource} values.", + "name": "materialURL" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The priority for applying the material to its parent. Only the highest priority material is \r applied, with materials of the same priority randomly assigned. Materials that come with the model have a priority of \r 0.", + "name": "priority" + }, + { + "type": { + "names": [ + "string", + "number" + ] + }, + "defaultvalue": "\"0\"", + "description": "Selects the submesh or submeshes within the parent to apply the material \r to. If in the format \"mat::string\", all submeshes with material name \"string\" are replaced. \r Otherwise the property value is parsed as an unsigned integer, specifying the mesh index to modify. Invalid values are \r parsed to 0.", + "name": "parentMaterialName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"uv\"", + "description": "How the material is mapped to the entity. Either \"uv\" or \r \"projected\". Currently, only \"uv\" is supported.", + "name": "materialMappingMode" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "defaultvalue": "0,0", + "description": "Offset position in UV-space of the top left of the material, range \r { x: 0, y: 0 }{ x: 1, y: 1 }.", + "name": "materialMappingPos" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "defaultvalue": "1,1", + "description": "How much to scale the material within the parent's UV-space.", + "name": "materialMappingScale" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "How much to rotate the material within the parent's UV-space, in degrees.", + "name": "materialMappingRot" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "Used to store {@link MaterialResource} data as a JSON string. You can use \r JSON.parse() to parse the string into a JavaScript object which you can manipulate the properties of, and \r use JSON.stringify() to convert the object into a string to put in the property.", + "name": "materialData" + } + ], + "examples": [ + "Color a sphere using a Material entity.\rvar entityID = Entities.addEntity({\r type: \"Sphere\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r dimensions: { x: 1, y: 1, z: 1 },\r color: { red: 128, green: 128, blue: 128 },\r lifetime: 300 // Delete after 5 minutes.\r});\r\rvar materialID = Entities.addEntity({\r type: \"Material\",\r parentID: entityID,\r materialURL: \"materialData\",\r priority: 1,\r materialData: JSON.stringify({\r materialVersion: 1,\r materials: {\r // Can only set albedo on a Shape entity.\r // Value overrides entity's \"color\" property.\r albedo: [1.0, 1.0, 0] // Yellow\r }\r }),\r});" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-Material", + "scope": "static" + }, + { + "description": "The \"Model\" {@link Entities.EntityType|EntityType} displays an FBX or OBJ model.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.", + "kind": "typedef", + "name": "EntityProperties-Model", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0.1,0.1,0.1", + "description": "The dimensions of the entity. When adding an entity, if no dimensions \r value is specified then the model is automatically sized to its \r {@link Entities.EntityProperties|naturalDimensions}.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "Currently not used.", + "name": "color" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The URL of the FBX of OBJ model. Baked FBX models' URLs end in \".baked.fbx\".
\r Note: If the name ends with \"default-image-model.fbx\" then the entity is considered to be an \"Image\" \r entity, in which case the textures property should be set per the example.", + "name": "modelURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A JSON string of texture name, URL pairs used when rendering the model in place of the\r model's original textures. Use a texture name from the originalTextures property to override that texture. \r Only the texture names and URLs to be overridden need be specified; original textures are used where there are no \r overrides. You can use JSON.stringify() to convert a JavaScript object of name, URL pairs into a JSON \r string.", + "name": "textures" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"{}\"", + "description": "A JSON string of texture name, URL pairs used in the model. The property value is \r filled in after the entity has finished rezzing (i.e., textures have loaded). You can use JSON.parse() to \r parse the JSON string into a JavaScript object of name, URL pairs. Read-only.", + "name": "originalTextures" + }, + { + "type": { + "names": [ + "ShapeType" + ] + }, + "defaultvalue": "\"none\"", + "description": "The shape of the collision hull used if collisions are enabled.", + "name": "shapeType" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The OBJ file to use for the compound shape if shapeType is\r \"compound\".", + "name": "compoundShapeURL" + }, + { + "type": { + "names": [ + "Entities.AnimationProperties" + ] + }, + "description": "An animation to play on the model.", + "name": "animation" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "defaultvalue": "[]", + "description": "Joint rotations applied to the model; [] if none are applied or the \r model hasn't loaded. The array indexes are per {@link Entities.getJointIndex|getJointIndex}. Rotations are relative to \r each joint's parent.
\r Joint rotations can be set by {@link Entities.setLocalJointRotation|setLocalJointRotation} and similar functions, or by\r setting the value of this property. If you set a joint rotation using this property you also need to set the \r corresponding jointRotationsSet value to true.", + "name": "jointRotations" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "defaultvalue": "[]", + "description": "true values for joints that have had rotations applied, \r false otherwise; [] if none are applied or the model hasn't loaded. The array indexes are per \r {@link Entities.getJointIndex|getJointIndex}.", + "name": "jointRotationsSet" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "defaultvalue": "[]", + "description": "Joint translations applied to the model; [] if none are applied or \r the model hasn't loaded. The array indexes are per {@link Entities.getJointIndex|getJointIndex}. Rotations are relative \r to each joint's parent.
\r Joint translations can be set by {@link Entities.setLocalJointTranslation|setLocalJointTranslation} and similar \r functions, or by setting the value of this property. If you set a joint translation using this property you also need to \r set the corresponding jointTranslationsSet value to true.", + "name": "jointTranslations" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "defaultvalue": "[]", + "description": "true values for joints that have had translations applied, \r false otherwise; [] if none are applied or the model hasn't loaded. The array indexes are per \r {@link Entities.getJointIndex|getJointIndex}.", + "name": "jointTranslationsSet" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true and the entity is parented to an avatar, then the \r avatar's joint rotations are applied to the entity's joints.", + "name": "relayParentJoints" + } + ], + "examples": [ + "Rez a Vive tracker puck.\rvar entity = Entities.addEntity({\r type: \"Model\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.75, z: -2 })),\r rotation: MyAvatar.orientation,\r modelURL: \"http://content.highfidelity.com/seefo/production/puck-attach/vive_tracker_puck.obj\",\r dimensions: { x: 0.0945, y: 0.0921, z: 0.0423 },\r lifetime: 300 // Delete after 5 minutes.\r});", + "Create an \"Image\" entity like you can in the Create app.\rvar IMAGE_MODEL = \"https://hifi-content.s3.amazonaws.com/DomainContent/production/default-image-model.fbx\";\rvar DEFAULT_IMAGE = \"https://hifi-content.s3.amazonaws.com/DomainContent/production/no-image.jpg\";\rvar entity = Entities.addEntity({\r type: \"Model\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -3 })),\r rotation: MyAvatar.orientation,\r dimensions: {\r x: 0.5385,\r y: 0.2819,\r z: 0.0092\r },\r shapeType: \"box\",\r collisionless: true,\r modelURL: IMAGE_MODEL,\r textures: JSON.stringify({ \"tex.picture\": DEFAULT_IMAGE }),\r lifetime: 300 // Delete after 5 minutes\r});" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-Model", + "scope": "static" + }, + { + "description": "The \"ParticleEffect\" {@link Entities.EntityType|EntityType} displays a particle system that can be used to \rsimulate things such as fire, smoke, snow, magic spells, etc. The particles emanate from an ellipsoid or part thereof.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.", + "kind": "typedef", + "name": "EntityProperties-ParticleEffect", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true then particles are emitted.", + "name": "isEmitting" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1000, + "description": "The maximum number of particles to render at one time. Older particles are deleted if \r necessary when new ones are created.", + "name": "maxParticles" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "3s", + "description": "How long, in seconds, each particle lives.", + "name": "lifespan" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 15, + "description": "The number of particles per second to emit.", + "name": "emitRate" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 5, + "description": "The speed, in m/s, that each particle is emitted at.", + "name": "emitSpeed" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The spread in speeds at which particles are emitted at. If emitSpeed == 5 \r and speedSpread == 1, particles will be emitted with speeds in the range 4m/s – 6m/s.", + "name": "speedSpread" + }, + { + "type": { + "names": [ + "vec3" + ] + }, + "defaultvalue": "0,-9.8,0", + "description": "The acceleration that is applied to each particle during its lifetime. The \r default is Earth's gravity value.", + "name": "emitAcceleration" + }, + { + "type": { + "names": [ + "vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The spread in accelerations that each particle is given. If\r emitAccelerations == {x: 0, y: -9.8, z: 0} and accelerationSpread ==\r {x: 0, y: 1, z: 0}, each particle will have an acceleration in the range {x: 0, y: -10.8, z: 0}\r – {x: 0, y: -8.8, z: 0}.", + "name": "accelerationSpread" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The dimensions of the particle effect, i.e., a bounding box containing all the particles\r during their lifetimes, assuming that emitterShouldTrail is false. Read-only.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then particles are \"left behind\" as the emitter moves,\r otherwise they stay with the entity's dimensions.", + "name": "emitterShouldTrail" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "defaultvalue": "-0.707,0,0,0.707", + "description": "The orientation of particle emission relative to the entity's axes. By\r default, particles emit along the entity's local z-axis, and azimuthStart and azimuthFinish \r are relative to the entity's local x-axis. The default value is a rotation of -90 degrees about the local x-axis, i.e., \r the particles emit vertically.", + "name": "emitOrientation" + }, + { + "type": { + "names": [ + "vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The dimensions of the ellipsoid from which particles are emitted.", + "name": "emitDimensions" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The starting radius within the ellipsoid at which particles start being emitted;\r range 0.01.0 for the ellipsoid center to the ellipsoid surface, respectively.\r Particles are emitted from the portion of the ellipsoid that lies between emitRadiusStart and the \r ellipsoid's surface.", + "name": "emitRadiusStart" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The angle in radians from the entity's local z-axis at which particles start being emitted \r within the ellipsoid; range 0Math.PI. Particles are emitted from the portion of the \r ellipsoid that lies between polarStart and polarFinish.", + "name": "polarStart" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The angle in radians from the entity's local z-axis at which particles stop being emitted \r within the ellipsoid; range 0Math.PI. Particles are emitted from the portion of the \r ellipsoid that lies between polarStart and polarFinish.", + "name": "polarFinish" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "-Math.PI", + "description": "The angle in radians from the entity's local x-axis about the entity's local \r z-axis at which particles start being emitted; range -Math.PIMath.PI. Particles are \r emitted from the portion of the ellipsoid that lies between azimuthStart and azimuthFinish.", + "name": "azimuthStart" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "Math.PI", + "description": "The angle in radians from the entity's local x-axis about the entity's local\r z-axis at which particles stop being emitted; range -Math.PIMath.PI. Particles are\r emitted from the portion of the ellipsoid that lies between azimuthStart and azimuthFinish.", + "name": "azimuthFinish" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The URL of a JPG or PNG image file to display for each particle. If you want transparency,\r use PNG format.", + "name": "textures" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.025, + "description": "The radius of each particle at the middle of its life.", + "name": "particleRadius" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": null, + "description": "The radius of each particle at the start of its life. If NaN, the\r particleRadius value is used.", + "name": "radiusStart" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": null, + "description": "The radius of each particle at the end of its life. If NaN, the\r particleRadius value is used.", + "name": "radiusFinish" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The spread in radius that each particle is given. If particleRadius == 0.5\r and radiusSpread == 0.25, each particle will have a radius in the range 0.25 – \r 0.75.", + "name": "radiusSpread" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of each particle at the middle of its life.", + "name": "color" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "{}", + "description": "The color of each particle at the start of its life. If any of the component values are \r undefined, the color value is used.", + "name": "colorStart" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "{}", + "description": "The color of each particle at the end of its life. If any of the component values are \r undefined, the color value is used.", + "name": "colorFinish" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "0,0,0", + "description": "The spread in color that each particle is given. If\r color == {red: 100, green: 100, blue: 100} and colorSpread ==\r {red: 10, green: 25, blue: 50}, each particle will have a color in the range \r {red: 90, green: 75, blue: 50}{red: 110, green: 125, blue: 150}.", + "name": "colorSpread" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The alpha of each particle at the middle of its life.", + "name": "alpha" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": null, + "description": "The alpha of each particle at the start of its life. If NaN, the\r alpha value is used.", + "name": "alphaStart" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": null, + "description": "The alpha of each particle at the end of its life. If NaN, the\r alpha value is used.", + "name": "alphaFinish" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The spread in alpha that each particle is given. If alpha == 0.5\r and alphaSpread == 0.25, each particle will have an alpha in the range 0.25 – \r 0.75.", + "name": "alphaSpread" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The spin of each particle at the middle of its life. In the range -2*PI2*PI.", + "name": "particleSpin" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": null, + "description": "The spin of each particle at the start of its life. In the range -2*PI2*PI.\r If NaN, the particleSpin value is used.", + "name": "spinStart" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": null, + "description": "The spin of each particle at the end of its life. In the range -2*PI2*PI.\r If NaN, the particleSpin value is used.", + "name": "spinFinish" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The spread in spin that each particle is given. In the range 02*PI. If particleSpin == PI\r and spinSpread == PI/2, each particle will have a spin in the range PI/23*PI/2.", + "name": "spinSpread" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Whether or not the particles' spin will rotate with the entity. If false, when particleSpin == 0, the particles will point\rup in the world. If true, they will point towards the entity's up vector, based on its orientation.", + "name": "rotateWithEntity" + }, + { + "type": { + "names": [ + "ShapeType" + ] + }, + "defaultvalue": "\"none\"", + "description": "Currently not used. Read-only.", + "name": "shapeType" + } + ], + "examples": [ + "Create a ball of green smoke.\rparticles = Entities.addEntity({\r type: \"ParticleEffect\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -4 })),\r lifespan: 5,\r emitRate: 10,\r emitSpeed: 0.02,\r speedSpread: 0.01,\r emitAcceleration: { x: 0, y: 0.02, z: 0 },\r polarFinish: Math.PI,\r textures: \"https://content.highfidelity.com/DomainContent/production/Particles/wispy-smoke.png\",\r particleRadius: 0.1,\r color: { red: 0, green: 255, blue: 0 },\r alphaFinish: 0,\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-ParticleEffect", + "scope": "static" + }, + { + "description": "The \"PolyLine\" {@link Entities.EntityType|EntityType} draws textured, straight lines between a sequence of \rpoints.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.", + "kind": "typedef", + "name": "EntityProperties-PolyLine", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "1,1,1", + "description": "The dimensions of the entity, i.e., the size of the bounding box that contains the \r lines drawn.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "defaultvalue": "[]", + "description": "The sequence of points to draw lines between. The values are relative to the entity's\r position. A maximum of 70 points can be specified. Must be specified in order for the entity to render.", + "name": "linePoints" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "defaultvalue": "[]", + "description": "The normal vectors for the line's surface at the linePoints. The values are \r relative to the entity's orientation. Must be specified in order for the entity to render.", + "name": "normals" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "defaultvalue": "[]", + "description": "The widths, in m, of the line at the linePoints. Must be specified in \r order for the entity to render.", + "name": "strokeWidths" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 2, + "description": "Currently not used.", + "name": "lineWidth" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "defaultvalue": "[]", + "description": "Currently not used.", + "name": "strokeColors" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The base color of the line, which is multiplied with the color of the texture for\r rendering.", + "name": "color" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The URL of a JPG or PNG texture to use for the lines. If you want transparency, use PNG\r format.", + "name": "textures" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true, the texture is stretched to fill the whole line, otherwise \r the texture repeats along the line.", + "name": "isUVModeStretch" + } + ], + "examples": [ + "Draw a textured \"V\".\rvar entity = Entities.addEntity({\r type: \"PolyLine\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.75, z: -5 })),\r rotation: MyAvatar.orientation,\r linePoints: [\r { x: -1, y: 0.5, z: 0 },\r { x: 0, y: 0, z: 0 },\r { x: 1, y: 0.5, z: 0 }\r ],\r normals: [\r { x: 0, y: 0, z: 1 },\r { x: 0, y: 0, z: 1 },\r { x: 0, y: 0, z: 1 }\r ],\r strokeWidths: [ 0.1, 0.1, 0.1 ],\r color: { red: 255, green: 0, blue: 0 }, // Use just the red channel from the image.\r textures: \"http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flowArts/trails.png\",\r isUVModeStretch: true,\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-PolyLine", + "scope": "static" + }, + { + "description": "The \"PolyVox\" {@link Entities.EntityType|EntityType} displays a set of textured voxels. \rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.\rIf you have two or more neighboring PolyVox entities of the same size abutting each other, you can display them as joined by\rconfiguring their voxelSurfaceStyle and neighbor ID properties.
\rPolyVox entities uses a library from Volumes of Fun. Their\rlibrary documentation may be useful to read.", + "kind": "typedef", + "name": "EntityProperties-PolyVox", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0.1,0.1,0.1", + "description": "The dimensions of the entity.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "32,32,32", + "description": "Integer number of voxels along each axis of the entity, in the range \r 1,1,1 to 128,128,128. The dimensions of each voxel is \r dimensions / voxelVolumesize.", + "name": "voxelVolumeSize" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"ABAAEAAQAAAAHgAAEAB42u3BAQ0AAADCoPdPbQ8HFAAAAPBuEAAAAQ==\"", + "description": "Base-64 encoded compressed dump of \r the PolyVox data. This property is typically not used in scripts directly; rather, functions that manipulate a PolyVox \r entity update it.
\r The size of this property increases with the size and complexity of the PolyVox entity, with the size depending on how \r the particular entity's voxels compress. Because this property value has to fit within a High Fidelity datagram packet \r there is a limit to the size and complexity of a PolyVox entity, and edits which would result in an overflow are \r rejected.", + "name": "voxelData" + }, + { + "type": { + "names": [ + "Entities.PolyVoxSurfaceStyle" + ] + }, + "defaultvalue": 2, + "description": "The style of rendering the voxels' surface and how \r neighboring PolyVox entities are joined.", + "name": "voxelSurfaceStyle" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "URL of the texture to map to surfaces perpendicular to the entity's local x-axis. JPG or\r PNG format. If no texture is specified the surfaces display white.", + "name": "xTextureURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "URL of the texture to map to surfaces perpendicular to the entity's local y-axis. JPG or \r PNG format. If no texture is specified the surfaces display white.", + "name": "yTextureURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "URL of the texture to map to surfaces perpendicular to the entity's local z-axis. JPG or \r PNG format. If no texture is specified the surfaces display white.", + "name": "zTextureURL" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": "Uuid.NULL", + "description": "ID of the neighboring PolyVox entity in the entity's -ve local x-axis direction, \r if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.", + "name": "xNNeighborID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": "Uuid.NULL", + "description": "ID of the neighboring PolyVox entity in the entity's -ve local y-axis direction, \r if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.", + "name": "yNNeighborID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": "Uuid.NULL", + "description": "ID of the neighboring PolyVox entity in the entity's -ve local z-axis direction, \r if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.", + "name": "zNNeighborID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": "Uuid.NULL", + "description": "ID of the neighboring PolyVox entity in the entity's +ve local x-axis direction, \r if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.", + "name": "xPNeighborID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": "Uuid.NULL", + "description": "ID of the neighboring PolyVox entity in the entity's +ve local y-axis direction, \r if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.", + "name": "yPNeighborID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": "Uuid.NULL", + "description": "ID of the neighboring PolyVox entity in the entity's +ve local z-axis direction, \r if you want them joined. Set to {@link Uuid|Uuid.NULL} if there is none or you don't want to join them.", + "name": "zPNeighborID" + } + ], + "examples": [ + "Create a textured PolyVox sphere.\rvar position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 }));\rvar texture = \"http://public.highfidelity.com/cozza13/tuscany/Concrete2.jpg\";\rvar polyVox = Entities.addEntity({\r type: \"PolyVox\",\r position: position,\r dimensions: { x: 2, y: 2, z: 2 },\r xTextureURL: texture,\r yTextureURL: texture,\r zTextureURL: texture,\r lifetime: 300 // Delete after 5 minutes.\r});\rEntities.setVoxelSphere(polyVox, position, 0.8, 255);" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-PolyVox", + "scope": "static" + }, + { + "description": "The \"Shape\" {@link Entities.EntityType|EntityType} displays an entity of a specified shape.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.", + "kind": "typedef", + "name": "EntityProperties-Shape", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Entities.Shape" + ] + }, + "defaultvalue": "\"Sphere\"", + "description": "The shape of the entity.", + "name": "shape" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0.1,0.1,0.1", + "description": "The dimensions of the entity.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the entity.", + "name": "color" + } + ], + "examples": [ + "Create a cylinder.\rvar shape = Entities.addEntity({\r type: \"Shape\",\r shape: \"Cylinder\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r dimensions: { x: 0.4, y: 0.6, z: 0.4 },\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-Shape", + "scope": "static" + }, + { + "description": "The \"Sphere\" {@link Entities.EntityType|EntityType} is the same as the \"Shape\"\r{@link Entities.EntityType|EntityType} except that its shape value is always set to \"Sphere\"\rwhen the entity is created. If its shape property value is subsequently changed then the entity's \rtype will be reported as \"Box\" if the shape is set to \"Cube\", \rotherwise it will be reported as \"Shape\".", + "kind": "typedef", + "name": "EntityProperties-Sphere", + "type": { + "names": [ + "object" + ] + }, + "memberof": "Entities", + "longname": "Entities.EntityProperties-Sphere", + "scope": "static" + }, + { + "description": "The \"Text\" {@link Entities.EntityType|EntityType} displays a 2D rectangle of text in the domain.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.", + "kind": "typedef", + "name": "EntityProperties-Text", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0.1,0.1,0.01", + "description": "The dimensions of the entity.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The text to display on the face of the entity. Text wraps if necessary to fit. New lines can be\r created using \\n. Overflowing lines are not displayed.", + "name": "text" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.1, + "description": "The height of each line of text (thus determining the font size).", + "name": "lineHeight" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the text.", + "name": "textColor" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "0,0,0", + "description": "The color of the background rectangle.", + "name": "backgroundColor" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the entity is oriented to face each user's camera (i.e., it\r differs for each user present).", + "name": "faceCamera" + } + ], + "examples": [ + "Create a text entity.\rvar text = Entities.addEntity({\r type: \"Text\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r dimensions: { x: 0.6, y: 0.3, z: 0.01 },\r lineHeight: 0.12,\r text: \"Hello\\nthere!\",\r faceCamera: true,\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-Text", + "scope": "static" + }, + { + "description": "The \"Web\" {@link Entities.EntityType|EntityType} displays a browsable Web page. Each user views their own copy \rof the Web page: if one user navigates to another page on the entity, other users do not see the change; if a video is being \rplayed, users don't see it in sync.\rThe entity has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.", + "kind": "typedef", + "name": "EntityProperties-Web", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0.1,0.1,0.01", + "description": "The dimensions of the entity.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The URL of the Web page to display. This value does not change as you or others navigate \r on the Web entity.", + "name": "sourceUrl" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 30, + "description": "The resolution to display the page at, in dots per inch. If you convert this to dots per meter \r (multiply by 1 / 0.0254 = 39.3701) then multiply dimensions.x and dimensions.y by that value \r you get the resolution in pixels.", + "name": "dpi" + } + ], + "examples": [ + "Create a Web entity displaying at 1920 x 1080 resolution.\rvar METERS_TO_INCHES = 39.3701;\rvar entity = Entities.addEntity({\r type: \"Web\",\r sourceUrl: \"https://highfidelity.com/\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.75, z: -4 })),\r rotation: MyAvatar.orientation,\r dimensions: {\r x: 3,\r y: 3 * 1080 / 1920,\r z: 0.01\r },\r dpi: 1920 / (3 * METERS_TO_INCHES),\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-Web", + "scope": "static" + }, + { + "description": "The \"Zone\" {@link Entities.EntityType|EntityType} is a volume of lighting effects and avatar permissions.\rAvatar interaction events such as {@link Entities.enterEntity} are also often used with a Zone entity.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.", + "kind": "typedef", + "name": "EntityProperties-Zone", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0.1,0.1,0.1", + "description": "The size of the volume in which the zone's lighting effects and avatar permissions \r have effect.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "ShapeType" + ] + }, + "defaultvalue": "\"box\"", + "description": "The shape of the volume in which the zone's lighting effects and avatar \r permissions have effect. Reverts to the default value if set to \"none\", or set to \"compound\" \r and compoundShapeURL is \"\".", + "name": "shapeType" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The OBJ file to use for the compound shape if shapeType is \r \"compound\".", + "name": "compoundShapeURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"inherit\"", + "description": "Configures the key light in the zone. Possible values:
\r \"inherit\": The key light from any enclosing zone continues into this zone.
\r \"disabled\": The key light from any enclosing zone and the key light of this zone are disabled in this \r zone.
\r \"enabled\": The key light properties of this zone are enabled, overriding the key light of from any \r enclosing zone.", + "name": "keyLightMode" + }, + { + "type": { + "names": [ + "Entities.KeyLight" + ] + }, + "description": "The key light properties of the zone.", + "name": "keyLight" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"inherit\"", + "description": "Configures the ambient light in the zone. Possible values:
\r \"inherit\": The ambient light from any enclosing zone continues into this zone.
\r \"disabled\": The ambient light from any enclosing zone and the ambient light of this zone are disabled in \r this zone.
\r \"enabled\": The ambient light properties of this zone are enabled, overriding the ambient light from any \r enclosing zone.", + "name": "ambientLightMode" + }, + { + "type": { + "names": [ + "Entities.AmbientLight" + ] + }, + "description": "The ambient light properties of the zone.", + "name": "ambientLight" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"inherit\"", + "description": "Configures the skybox displayed in the zone. Possible values:
\r \"inherit\": The skybox from any enclosing zone is dislayed in this zone.
\r \"disabled\": The skybox from any enclosing zone and the skybox of this zone are disabled in this zone.
\r \"enabled\": The skybox properties of this zone are enabled, overriding the skybox from any enclosing zone.", + "name": "skyboxMode" + }, + { + "type": { + "names": [ + "Entities.Skybox" + ] + }, + "description": "The skybox properties of the zone.", + "name": "skybox" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"inherit\"", + "description": "Configures the haze in the zone. Possible values:
\r \"inherit\": The haze from any enclosing zone continues into this zone.
\r \"disabled\": The haze from any enclosing zone and the haze of this zone are disabled in this zone.
\r \"enabled\": The haze properties of this zone are enabled, overriding the haze from any enclosing zone.", + "name": "hazeMode" + }, + { + "type": { + "names": [ + "Entities.Haze" + ] + }, + "description": "The haze properties of the zone.", + "name": "haze" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"inherit\"", + "description": "Configures the bloom in the zone. Possible values:
\r \"inherit\": The bloom from any enclosing zone continues into this zone.
\r \"disabled\": The bloom from any enclosing zone and the bloom of this zone are disabled in this zone.
\r \"enabled\": The bloom properties of this zone are enabled, overriding the bloom from any enclosing zone.", + "name": "bloomMode" + }, + { + "type": { + "names": [ + "Entities.Bloom" + ] + }, + "description": "The bloom properties of the zone.", + "name": "bloom" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true then visitors can fly in the zone; otherwise they cannot.", + "name": "flyingAllowed" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true then visitors with avatar collisions turned off will not \r collide with content in the zone; otherwise visitors will always collide with content in the zone.", + "name": "ghostingAllowed" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The URL of a JavaScript file that filters changes to properties of entities within the \r zone. It is periodically executed for each entity in the zone. It can, for example, be used to not allow changes to \r certain properties.
\r
\rfunction filter(properties) {\r    // Test and edit properties object values,\r    // e.g., properties.modelURL, as required.\r    return properties;\r}\r
", + "name": "filterURL" + } + ], + "examples": [ + "Create a zone that casts a red key light along the x-axis.\rvar zone = Entities.addEntity({\r type: \"Zone\",\r position: MyAvatar.position,\r dimensions: { x: 100, y: 100, z: 100 },\r keyLightMode: \"enabled\",\r keyLight: {\r \"color\": { \"red\": 255, \"green\": 0, \"blue\": 0 },\r \"direction\": { \"x\": 1, \"y\": 0, \"z\": 0 }\r },\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.EntityProperties-Zone", + "scope": "static" + }, + { + "description": "The axis-aligned bounding box of an entity.", + "kind": "typedef", + "name": "BoundingBox", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The bottom right near (minimum axes values) corner of the AA box.", + "name": "brn" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The top far left (maximum axes values) corner of the AA box.", + "name": "tfl" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The center of the AA box.", + "name": "center" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The dimensions of the AA box.", + "name": "dimensions" + } + ], + "memberof": "Entities", + "longname": "Entities.BoundingBox", + "scope": "static" + }, + { + "description": "Information on how an entity is rendered. Properties are only filled in for Model entities; other \rentity types have an empty object, {}.", + "kind": "typedef", + "name": "RenderInfo", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The number of vertices in the entity.", + "name": "verticesCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The number of textures in the entity.", + "name": "texturesCount" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The total size of the textures in the entity, in bytes.", + "name": "textureSize" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Is true if any of the textures has transparency.", + "name": "hasTransparent" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The number of draw calls required to render the entity.", + "name": "drawCalls" + } + ], + "memberof": "Entities", + "longname": "Entities.RenderInfo", + "scope": "static" + }, + { + "description": "The result of a {@link PickRay} search using {@link Entities.findRayIntersection|findRayIntersection} or \r{@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}.", + "kind": "typedef", + "name": "RayToEntityIntersectionResult", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the {@link PickRay} intersected an entity, otherwise \r false.", + "name": "intersects" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Is always true.", + "name": "accurate" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID if the entity intersected, if any, otherwise null.", + "name": "entityID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The distance from the {@link PickRay} origin to the intersection point.", + "name": "distance" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The intersection point.", + "name": "intersection" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The surface normal of the entity at the intersection point.", + "name": "surfaceNormal" + }, + { + "type": { + "names": [ + "BoxFace" + ] + }, + "description": "The face of the entity's axis-aligned box that the ray intersects.", + "name": "face" + }, + { + "type": { + "names": [ + "object" + ] + }, + "description": "Extra information depending on the entity intersected. Currently, only Model \r entities provide extra information, and the information provided depends on the precisionPicking parameter \r value that the search function was called with.", + "name": "extraInfo" + } + ], + "memberof": "Entities", + "longname": "Entities.RayToEntityIntersectionResult", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Entities API provides facilities to create and interact with entities. Entities are 2D and 3D objects that are visible\rto everyone and typically are persisted to the domain. For Interface scripts, the entities available are those that \rInterface has displayed and so knows about.", + "kind": "namespace", + "name": "Entities", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "Get or set the {@link Entities.EntityType|Web} entity that has keyboard focus.\r If no entity has keyboard focus, get returns null; set to null or {@link Uuid|Uuid.NULL} to \r clear keyboard focus.", + "name": "keyboardFocusEntity" + } + ], + "longname": "Entities", + "scope": "global" + }, + { + "description": "Get the properties of multiple entities.", + "kind": "function", + "name": "getMultipleEntityProperties", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The IDs of the entities to get the properties of.", + "name": "entityIDs" + }, + { + "type": { + "names": [ + "Array.", + "string" + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "Either string with property name or array of the names of the properties\r to get. If the array is empty, all properties are returned.", + "name": "desiredProperties" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The properties of the entity if the entity can be found, otherwise an empty object." + } + ], + "examples": [ + "Retrieve the names of the nearby entities\rvar SEARCH_RADIUS = 50; // meters\rvar entityIds = Entities.findEntities(MyAvatar.position, SEARCH_RADIUS);\rvar propertySets = Entities.getMultipleEntityProperties(entityIds, \"name\");\rprint(\"Nearby entity names: \" + JSON.stringify(propertySets));" + ], + "memberof": "Entities", + "longname": "Entities.getMultipleEntityProperties", + "scope": "static" + }, + { + "description": "Check whether or not you can change the locked property of entities. Locked entities have their \rlocked property set to true and cannot be edited or deleted. Whether or not you can change \rentities' locked properties is configured in the domain server's permissions.", + "kind": "function", + "name": "canAdjustLocks", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the client can change the locked property of entities,\r otherwise false." + } + ], + "examples": [ + "Set an entity's locked property to true if you can.\rif (Entities.canAdjustLocks()) {\r Entities.editEntity(entityID, { locked: true });\r} else {\r Window.alert(\"You do not have the permissions to set an entity locked!\");\r}" + ], + "memberof": "Entities", + "longname": "Entities.canAdjustLocks", + "scope": "static" + }, + { + "description": "Check whether or not you can rez (create) new entities in the domain.", + "kind": "function", + "name": "canRez", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the domain server will allow the script to rez (create) new entities, \r otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.canRez", + "scope": "static" + }, + { + "description": "Check whether or not you can rez (create) new temporary entities in the domain. Temporary entities are entities with a\rfinite lifetime property value set.", + "kind": "function", + "name": "canRezTmp", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the domain server will allow the script to rez (create) new temporary\r entities, otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.canRezTmp", + "scope": "static" + }, + { + "description": "Check whether or not you can rez (create) new certified entities in the domain. Certified entities are entities that have\rPoP certificates.", + "kind": "function", + "name": "canRezCertified", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the domain server will allow the script to rez (create) new certified\r entities, otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.canRezCertified", + "scope": "static" + }, + { + "description": "Check whether or not you can rez (create) new temporary certified entities in the domain. Temporary entities are entities\rwith a finite lifetime property value set. Certified entities are entities that have PoP certificates.", + "kind": "function", + "name": "canRezTmpCertified", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the domain server will allow the script to rez (create) new temporary \r certified entities, otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.canRezTmpCertified", + "scope": "static" + }, + { + "description": "Check whether or not you can make changes to the asset server's assets.", + "kind": "function", + "name": "canWriteAssets", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the domain server will allow the script to make changes to the asset server's \r assets, otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.canWriteAssets", + "scope": "static" + }, + { + "description": "Check whether or not you can replace the domain's content set.", + "kind": "function", + "name": "canReplaceContent", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the domain server will allow the script to replace the domain's content set, \r otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.canReplaceContent", + "scope": "static" + }, + { + "description": "Add a new entity with specified properties.", + "kind": "function", + "name": "addEntity", + "params": [ + { + "type": { + "names": [ + "Entities.EntityProperties" + ] + }, + "description": "The properties of the entity to create.", + "name": "properties" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true, or if clientOnly is set true in \r the properties, the entity is created as an avatar entity; otherwise it is created on the server. An avatar entity \r follows you to each domain you visit, rendering at the same world coordinates unless it's parented to your avatar.", + "name": "clientOnly" + } + ], + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity if successfully created, otherwise {@link Uuid|Uuid.NULL}." + } + ], + "examples": [ + "Create a box entity in front of your avatar.\rvar entityID = Entities.addEntity({\r type: \"Box\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.5, y: 0.5, z: 0.5 }\r});\rprint(\"Entity created: \" + entityID);" + ], + "memberof": "Entities", + "longname": "Entities.addEntity", + "scope": "static" + }, + { + "description": "Create a clone of an entity. A clone can be created by a client that doesn't have rez permissions in the current domain.\rThe entity must have its cloneable property set to true. The clone has a modified name, other \rproperties set per its clone related-properties, and its clone-related properties are set to defaults.", + "kind": "function", + "name": "cloneEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to clone.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the new entity if successfully cloned, otherwise {@link Uuid|Uuid.NULL}." + } + ], + "memberof": "Entities", + "longname": "Entities.cloneEntity", + "scope": "static" + }, + { + "description": "Get the properties of an entity.", + "kind": "function", + "name": "getEntityProperties", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to get the properties of.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "Array of the names of the properties to get. If the array is empty,\r all properties are returned.", + "name": "desiredProperties" + } + ], + "returns": [ + { + "type": { + "names": [ + "Entities.EntityProperties" + ] + }, + "description": "The properties of the entity if the entity can be found, otherwise an empty object." + } + ], + "examples": [ + "Report the color of a new box entity.\rvar entityID = Entities.addEntity({\r type: \"Box\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.5, y: 0.5, z: 0.5 }\r});\rvar properties = Entities.getEntityProperties(entityID, [\"color\"]);\rprint(\"Entity color: \" + JSON.stringify(properties.color));" + ], + "memberof": "Entities", + "longname": "Entities.getEntityProperties", + "scope": "static" + }, + { + "description": "Update an entity with specified properties.", + "kind": "function", + "name": "editEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to edit.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Entities.EntityProperties" + ] + }, + "description": "The properties to update the entity with.", + "name": "properties" + } + ], + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity if the edit was successful, otherwise null." + } + ], + "examples": [ + "Change the color of an entity.\rvar entityID = Entities.addEntity({\r type: \"Box\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.5, y: 0.5, z: 0.5 }\r});\rvar properties = Entities.getEntityProperties(entityID, [\"color\"]);\rprint(\"Entity color: \" + JSON.stringify(properties.color));\r\rEntities.editEntity(entityID, {\r color: { red: 255, green: 0, blue: 0 }\r});\rproperties = Entities.getEntityProperties(entityID, [\"color\"]);\rprint(\"Entity color: \" + JSON.stringify(properties.color));" + ], + "memberof": "Entities", + "longname": "Entities.editEntity", + "scope": "static" + }, + { + "description": "Delete an entity.", + "kind": "function", + "name": "deleteEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to delete.", + "name": "entityID" + } + ], + "examples": [ + "Delete an entity a few seconds after creating it.\rvar entityID = Entities.addEntity({\r type: \"Box\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 0.5, y: 0.5, z: 0.5 }\r});\r\rScript.setTimeout(function () {\r Entities.deleteEntity(entityID);\r}, 3000);" + ], + "memberof": "Entities", + "longname": "Entities.deleteEntity", + "scope": "static" + }, + { + "description": "Call a method in a client entity script from a client script or client entity script, or call a method in a server \rentity script from a server entity script. The entity script method must be exposed as a property in the target client \rentity script. Additionally, if calling a server entity script, the server entity script must include the method's name \rin an exposed property called remotelyCallable that is an array of method names that can be called.", + "kind": "function", + "name": "callEntityMethod", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to call the method in.", + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the method to call.", + "name": "method" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "The parameters to call the specified method with.", + "name": "parameters" + } + ], + "memberof": "Entities", + "longname": "Entities.callEntityMethod", + "scope": "static" + }, + { + "description": "Call a method in a server entity script from a client script or client entity script. The entity script method must be \rexposed as a property in the target server entity script. Additionally, the target server entity script must include the \rmethod's name in an exposed property called remotelyCallable that is an array of method names that can be \rcalled.", + "kind": "function", + "name": "callEntityServerMethod", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to call the method in.", + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the method to call.", + "name": "method" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "The parameters to call the specified method with.", + "name": "parameters" + } + ], + "memberof": "Entities", + "longname": "Entities.callEntityServerMethod", + "scope": "static" + }, + { + "description": "Call a method in a specific user's client entity script from a server entity script. The entity script method must be \rexposed as a property in the target client entity script.", + "kind": "function", + "name": "callEntityClientMethod", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The session ID of the user to call the method in.", + "name": "clientSessionID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to call the method in.", + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the method to call.", + "name": "method" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "The parameters to call the specified method with.", + "name": "parameters" + } + ], + "memberof": "Entities", + "longname": "Entities.callEntityClientMethod", + "scope": "static" + }, + { + "description": "Find the entity with a position closest to a specified point and within a specified radius.", + "kind": "function", + "name": "findClosestEntity", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point about which to search.", + "name": "center" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The radius within which to search.", + "name": "radius" + } + ], + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that is closest to the center and within the radius if\r there is one, otherwise null." + } + ], + "examples": [ + "Find the closest entity within 10m of your avatar.\rvar entityID = Entities.findClosestEntity(MyAvatar.position, 10);\rprint(\"Closest entity: \" + entityID);" + ], + "memberof": "Entities", + "longname": "Entities.findClosestEntity", + "scope": "static" + }, + { + "description": "Find all entities that intersect a sphere defined by a center point and radius.", + "kind": "function", + "name": "findEntities", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point about which to search.", + "name": "center" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The radius within which to search.", + "name": "radius" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of entity IDs that were found that intersect the search sphere. The array is empty if no \r entities could be found." + } + ], + "examples": [ + "Report how many entities are within 10m of your avatar.\rvar entityIDs = Entities.findEntities(MyAvatar.position, 10);\rprint(\"Number of entities within 10m: \" + entityIDs.length);" + ], + "memberof": "Entities", + "longname": "Entities.findEntities", + "scope": "static" + }, + { + "description": "Find all entities whose axis-aligned boxes intersect a search axis-aligned box defined by its minimum coordinates corner\rand dimensions.", + "kind": "function", + "name": "findEntitiesInBox", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The corner of the search AA box with minimum co-ordinate values.", + "name": "corner" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The dimensions of the search AA box.", + "name": "dimensions" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of entity IDs whose AA boxes intersect the search AA box. The array is empty if no entities \r could be found." + } + ], + "memberof": "Entities", + "longname": "Entities.findEntitiesInBox", + "scope": "static" + }, + { + "description": "Find all entities whose axis-aligned boxes intersect a search frustum.", + "kind": "function", + "name": "findEntitiesInFrustum", + "params": [ + { + "type": { + "names": [ + "ViewFrustum" + ] + }, + "description": "The frustum to search in. The position, orientation, \r projection, and centerRadius properties must be specified.", + "name": "frustum" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of entity IDs axis-aligned boxes intersect the frustum. The array is empty if no entities \r could be found." + } + ], + "examples": [ + "Report the number of entities in view.\rvar entityIDs = Entities.findEntitiesInFrustum(Camera.frustum);\rprint(\"Number of entities in view: \" + entityIDs.length);" + ], + "memberof": "Entities", + "longname": "Entities.findEntitiesInFrustum", + "scope": "static" + }, + { + "description": "Find all entities of a particular type that intersect a sphere defined by a center point and radius.", + "kind": "function", + "name": "findEntitiesByType", + "params": [ + { + "type": { + "names": [ + "Entities.EntityType" + ] + }, + "description": "The type of entity to search for.", + "name": "entityType" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point about which to search.", + "name": "center" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The radius within which to search.", + "name": "radius" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of entity IDs of the specified type that intersect the search sphere. The array is empty if \r no entities could be found." + } + ], + "examples": [ + "Report the number of Model entities within 10m of your avatar.\rvar entityIDs = Entities.findEntitiesByType(\"Model\", MyAvatar.position, 10);\rprint(\"Number of Model entities within 10m: \" + entityIDs.length);" + ], + "memberof": "Entities", + "longname": "Entities.findEntitiesByType", + "scope": "static" + }, + { + "description": "Find all entities of a particular name that intersect a sphere defined by a center point and radius.", + "kind": "function", + "name": "findEntitiesByName", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the entity to search for.", + "name": "entityName" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point about which to search.", + "name": "center" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The radius within which to search.", + "name": "radius" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true then the search is case-sensitive.", + "name": "caseSensitive" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of entity IDs that have the specified name and intersect the search sphere. The array is empty \r if no entities could be found." + } + ], + "examples": [ + "Report the number of entities with the name, \"Light-Target\".\rvar entityIDs = Entities.findEntitiesByName(\"Light-Target\", MyAvatar.position, 10, false);\rprint(\"Number of entities with the name \"Light-Target\": \" + entityIDs.length);" + ], + "memberof": "Entities", + "longname": "Entities.findEntitiesByName", + "scope": "static" + }, + { + "description": "Find the first entity intersected by a {@link PickRay}. Light and Zone entities are not \rintersected unless they've been configured as pickable using {@link Entities.setLightsArePickable|setLightsArePickable}\rand {@link Entities.setZonesArePickable|setZonesArePickable}, respectively.
", + "kind": "function", + "name": "findRayIntersection", + "params": [ + { + "type": { + "names": [ + "PickRay" + ] + }, + "description": "The PickRay to use for finding entities.", + "name": "pickRay" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true and the intersected entity is a Model \r entity, the result's extraInfo property includes more information than it otherwise would.", + "name": "precisionPicking" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "If not empty then the search is restricted to these entities.", + "name": "entitiesToInclude" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "Entities to ignore during the search.", + "name": "entitiesToDiscard" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true then only entities that are \r {@link Entities.EntityProperties|visible} are searched.", + "name": "visibleOnly" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true then only entities that are not \r {@link Entities.EntityProperties|collisionless} are searched.", + "name": "collideableOnly" + } + ], + "returns": [ + { + "type": { + "names": [ + "Entities.RayToEntityIntersectionResult" + ] + }, + "description": "The result of the search for the first intersected entity." + } + ], + "examples": [ + "Find the entity directly in front of your avatar.\rvar pickRay = {\r origin: MyAvatar.position,\r direction: Quat.getFront(MyAvatar.orientation)\r};\r\rvar intersection = Entities.findRayIntersection(pickRay, true);\rif (intersection.intersects) {\r print(\"Entity in front of avatar: \" + intersection.entityID);\r} else {\r print(\"No entity in front of avatar.\");\r}" + ], + "memberof": "Entities", + "longname": "Entities.findRayIntersection", + "scope": "static" + }, + { + "description": "Find the first entity intersected by a {@link PickRay}. Light and Zone entities are not \rintersected unless they've been configured as pickable using {@link Entities.setLightsArePickable|setLightsArePickable} \rand {@link Entities.setZonesArePickable|setZonesArePickable}, respectively.
\rThis is a synonym for {@link Entities.findRayIntersection|findRayIntersection}.", + "kind": "function", + "name": "findRayIntersectionBlocking", + "params": [ + { + "type": { + "names": [ + "PickRay" + ] + }, + "description": "The PickRay to use for finding entities.", + "name": "pickRay" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true and the intersected entity is a Model\r entity, the result's extraInfo property includes more information than it otherwise would.", + "name": "precisionPicking" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "If not empty then the search is restricted to these entities.", + "name": "entitiesToInclude" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "Entities to ignore during the search.", + "name": "entitiesToDiscard" + } + ], + "deprecated": "This function is deprecated and will soon be removed. Use \r {@link Entities.findRayIntersection|findRayIntersection} instead; it blocks and performs the same function.", + "memberof": "Entities", + "longname": "Entities.findRayIntersectionBlocking", + "scope": "static" + }, + { + "description": "Reloads an entity's server entity script such that the latest version re-downloaded.", + "kind": "function", + "name": "reloadServerScripts", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to reload the server entity script of.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the reload request was successfully sent to the server, otherwise \r false." + } + ], + "memberof": "Entities", + "longname": "Entities.reloadServerScripts", + "scope": "static" + }, + { + "description": "Gets the status of server entity script attached to an entity", + "kind": "function", + "name": "getServerScriptStatus", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to get the server entity script status for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Entities~getServerScriptStatusCallback" + ] + }, + "description": "The function to call upon completion.", + "name": "callback" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true always." + } + ], + "memberof": "Entities", + "longname": "Entities.getServerScriptStatus", + "scope": "static" + }, + { + "description": "Called when {@link Entities.getServerScriptStatus} is complete.", + "kind": "typedef", + "name": "getServerScriptStatusCallback", + "type": { + "names": [ + "function" + ] + }, + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the server entity script status could be obtained, otherwise \r false.", + "name": "success" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if there is a server entity script running, otherwise false.", + "name": "isRunning" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "\"running\" if there is a server entity script running, otherwise an error string.", + "name": "status" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "\"\" if there is a server entity script running, otherwise it may contain extra \r information on the error.", + "name": "errorInfo" + } + ], + "memberof": "Entities", + "longname": "Entities~getServerScriptStatusCallback", + "scope": "inner" + }, + { + "description": "Get metadata for certain entity properties such as script and serverScripts.", + "kind": "function", + "name": "queryPropertyMetadata", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to get the metadata for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The property name to get the metadata for.", + "name": "property" + }, + { + "type": { + "names": [ + "Entities~queryPropertyMetadataCallback" + ] + }, + "description": "The function to call upon completion.", + "name": "callback" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the request for metadata was successfully sent to the server, otherwise \r false." + } + ], + "exceptions": [ + { + "description": "Throws an error if property is not handled yet or callback is not a function." + } + ], + "memberof": "Entities", + "longname": "Entities.queryPropertyMetadata", + "scope": "static" + }, + { + "description": "Get metadata for certain entity properties such as script and serverScripts.", + "kind": "function", + "name": "queryPropertyMetadata", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to get the metadata for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The property name to get the metadata for.", + "name": "property" + }, + { + "type": { + "names": [ + "object" + ] + }, + "description": "The \"this\" context that the callback will be executed within.", + "name": "scope" + }, + { + "type": { + "names": [ + "Entities~queryPropertyMetadataCallback" + ] + }, + "description": "The function to call upon completion.", + "name": "callback" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the request for metadata was successfully sent to the server, otherwise \r false." + } + ], + "exceptions": [ + { + "description": "Throws an error if property is not handled yet or callback is not a function." + } + ], + "memberof": "Entities", + "longname": "Entities.queryPropertyMetadata", + "scope": "static" + }, + { + "description": "Called when {@link Entities.queryPropertyMetadata} is complete.", + "kind": "typedef", + "name": "queryPropertyMetadataCallback", + "type": { + "names": [ + "function" + ] + }, + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "undefined if there was no error, otherwise an error message.", + "name": "error" + }, + { + "type": { + "names": [ + "object" + ] + }, + "description": "The metadata for the requested entity property if there was no error, otherwise\r undefined.", + "name": "result" + } + ], + "memberof": "Entities", + "longname": "Entities~queryPropertyMetadataCallback", + "scope": "inner" + }, + { + "description": "Set whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Light} entities. By default, Light \rentities are not intersected. The setting lasts for the Interface session. Ray picks are done using \r {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs.", + "kind": "function", + "name": "setLightsArePickable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Set true to make ray picks intersect the bounding box of \r {@link Entities.EntityType|Light} entities, otherwise false.", + "name": "value" + } + ], + "memberof": "Entities", + "longname": "Entities.setLightsArePickable", + "scope": "static" + }, + { + "description": "Get whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Light} entities. Ray picks are \r done using {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs.", + "kind": "function", + "name": "getLightsArePickable", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if ray picks intersect the bounding box of {@link Entities.EntityType|Light} \r entities, otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.getLightsArePickable", + "scope": "static" + }, + { + "description": "Set whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Zone} entities. By default, Light \rentities are not intersected. The setting lasts for the Interface session. Ray picks are done using \r {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs.", + "kind": "function", + "name": "setZonesArePickable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Set true to make ray picks intersect the bounding box of \r {@link Entities.EntityType|Zone} entities, otherwise false.", + "name": "value" + } + ], + "memberof": "Entities", + "longname": "Entities.setZonesArePickable", + "scope": "static" + }, + { + "description": "Get whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Zone} entities. Ray picks are \r done using {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs.", + "kind": "function", + "name": "getZonesArePickable", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if ray picks intersect the bounding box of {@link Entities.EntityType|Zone} \r entities, otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.getZonesArePickable", + "scope": "static" + }, + { + "description": "Set whether or not {@link Entities.EntityType|Zone} entities' boundaries should be drawn. Currently not used.", + "kind": "function", + "name": "setDrawZoneBoundaries", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Set to true if {@link Entities.EntityType|Zone} entities' boundaries should be \r drawn, otherwise false.", + "name": "value" + } + ], + "memberof": "Entities", + "longname": "Entities.setDrawZoneBoundaries", + "scope": "static" + }, + { + "description": "Get whether or not {@link Entities.EntityType|Zone} entities' boundaries should be drawn. Currently not used.", + "kind": "function", + "name": "getDrawZoneBoundaries", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if {@link Entities.EntityType|Zone} entities' boundaries should be drawn, \r otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.getDrawZoneBoundaries", + "scope": "static" + }, + { + "description": "Set the values of all voxels in a spherical portion of a {@link Entities.EntityType|PolyVox} entity.", + "kind": "function", + "name": "setVoxelSphere", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|PolyVox} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The center of the sphere of voxels to set, in world coordinates.", + "name": "center" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The radius of the sphere of voxels to set, in world coordinates.", + "name": "radius" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set.", + "name": "value" + } + ], + "examples": [ + "Create a PolyVox sphere.\rvar position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 }));\rvar polyVox = Entities.addEntity({\r type: \"PolyVox\",\r position: position,\r dimensions: { x: 2, y: 2, z: 2 },\r voxelVolumeSize: { x: 32, y: 32, z: 32 },\r lifetime: 300 // Delete after 5 minutes.\r});\rEntities.setVoxelSphere(polyVox, position, 0.9, 255);" + ], + "memberof": "Entities", + "longname": "Entities.setVoxelSphere", + "scope": "static" + }, + { + "description": "Set the values of all voxels in a capsule-shaped portion of a {@link Entities.EntityType|PolyVox} entity.", + "kind": "function", + "name": "setVoxelCapsule", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|PolyVox} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The center of the sphere of voxels to set, in world coordinates.", + "name": "start" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The center of the sphere of voxels to set, in world coordinates.", + "name": "end" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The radius of the capsule cylinder and spherical ends, in world coordinates.", + "name": "radius" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set.", + "name": "value" + } + ], + "examples": [ + "Create a PolyVox capsule shape.\rvar position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 }));\rvar polyVox = Entities.addEntity({\r type: \"PolyVox\",\r position: position,\r dimensions: { x: 2, y: 2, z: 2 },\r voxelVolumeSize: { x: 32, y: 32, z: 32 },\r lifetime: 300 // Delete after 5 minutes.\r});\rvar startPosition = Vec3.sum({ x: -0.5, y: 0, z: 0 }, position);\rvar endPosition = Vec3.sum({ x: 0.5, y: 0, z: 0 }, position);\rEntities.setVoxelCapsule(polyVox, startPosition, endPosition, 0.5, 255);" + ], + "memberof": "Entities", + "longname": "Entities.setVoxelCapsule", + "scope": "static" + }, + { + "description": "Set the value of a particular voxels in a {@link Entities.EntityType|PolyVox} entity.", + "kind": "function", + "name": "setVoxel", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|PolyVox} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position relative to the minimum axes values corner of the entity. The \r position coordinates are rounded to the nearest integer to get the voxel coordinate. The minimum axes \r corner voxel is { x: 0, y: 0, z: 0 }.", + "name": "position" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "If value % 256 == 0 then voxel is cleared, otherwise the voxel is set.", + "name": "value" + } + ], + "examples": [ + "Create a cube PolyVox entity and clear the minimum axes corner voxel.\rvar entity = Entities.addEntity({\r type: \"PolyVox\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 })),\r dimensions: { x: 2, y: 2, z: 2 },\r voxelVolumeSize: { x: 16, y: 16, z: 16 },\r lifetime: 300 // Delete after 5 minutes.\r});\rEntities.setAllVoxels(entity, 1);\rEntities.setVoxel(entity, { x: 0, y: 0, z: 0 }, 0);" + ], + "memberof": "Entities", + "longname": "Entities.setVoxel", + "scope": "static" + }, + { + "description": "Set the values of all voxels in a {@link Entities.EntityType|PolyVox} entity.", + "kind": "function", + "name": "setAllVoxels", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|PolyVox} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set.", + "name": "value" + } + ], + "examples": [ + "Create a PolyVox cube.\rvar entity = Entities.addEntity({\r type: \"PolyVox\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 })),\r dimensions: { x: 2, y: 2, z: 2 },\r voxelVolumeSize: { x: 16, y: 16, z: 16 },\r lifetime: 300 // Delete after 5 minutes.\r});\rEntities.setAllVoxels(entity, 1);" + ], + "memberof": "Entities", + "longname": "Entities.setAllVoxels", + "scope": "static" + }, + { + "description": "Set the values of all voxels in a cubic portion of a {@link Entities.EntityType|PolyVox} entity.", + "kind": "function", + "name": "setVoxelsInCuboid", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|PolyVox} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the minimum axes value corner of the cube of voxels to set, in voxel \r coordinates.", + "name": "lowPosition" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The size of the cube of voxels to set, in voxel coordinates.", + "name": "cuboidSize" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set.", + "name": "value" + } + ], + "examples": [ + "Create a PolyVox cube and clear the voxels in one corner.\rvar polyVox = Entities.addEntity({\r type: \"PolyVox\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 2, y: 2, z: 2 },\r voxelVolumeSize: { x: 16, y: 16, z: 16 },\r lifetime: 300 // Delete after 5 minutes.\r});\rEntities.setAllVoxels(polyVox, 1);\rvar cuboidPosition = { x: 12, y: 12, z: 12 };\rvar cuboidSize = { x: 4, y: 4, z: 4 };\rEntities.setVoxelsInCuboid(polyVox, cuboidPosition, cuboidSize, 0);" + ], + "memberof": "Entities", + "longname": "Entities.setVoxelsInCuboid", + "scope": "static" + }, + { + "description": "Convert voxel coordinates in a {@link Entities.EntityType|PolyVox} entity to world coordinates. Voxel coordinates are \rrelative to the minimum axes values corner of the entity with a scale of Vec3.ONE being the dimensions of \reach voxel.", + "kind": "function", + "name": "voxelCoordsToWorldCoords", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|PolyVox} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The voxel coordinates. May be fractional and outside the entity's bounding box.", + "name": "voxelCoords" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The world coordinates of the voxelCoords if the entityID is a \r {@link Entities.EntityType|PolyVox} entity, otherwise {@link Vec3(0)|Vec3.ZERO}." + } + ], + "examples": [ + "Create a PolyVox cube with the 0,0,0 voxel replaced by a sphere.\r// Cube PolyVox with 0,0,0 voxel missing.\rvar polyVox = Entities.addEntity({\r type: \"PolyVox\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 })),\r dimensions: { x: 2, y: 2, z: 2 },\r voxelVolumeSize: { x: 16, y: 16, z: 16 },\r lifetime: 300 // Delete after 5 minutes.\r});\rEntities.setAllVoxels(polyVox, 1);\rEntities.setVoxel(polyVox, { x: 0, y: 0, z: 0 }, 0);\r\r// Red sphere in 0,0,0 corner position.\rvar cornerPosition = Entities.voxelCoordsToWorldCoords(polyVox, { x: 0, y: 0, z: 0 });\rvar voxelDimensions = Vec3.multiply(2 / 16, Vec3.ONE);\rvar sphere = Entities.addEntity({\r type: \"Sphere\",\r position: Vec3.sum(cornerPosition, Vec3.multiply(0.5, voxelDimensions)),\r dimensions: voxelDimensions,\r color: { red: 255, green: 0, blue: 0 },\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.voxelCoordsToWorldCoords", + "scope": "static" + }, + { + "description": "Convert world coordinates to voxel coordinates in a {@link Entities.EntityType|PolyVox} entity. Voxel coordinates are \rrelative to the minimum axes values corner of the entity, with a scale of Vec3.ONE being the dimensions of \reach voxel.", + "kind": "function", + "name": "worldCoordsToVoxelCoords", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|PolyVox} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The world coordinates. May be outside the entity's bounding box.", + "name": "worldCoords" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The voxel coordinates of the worldCoords if the entityID is a \r {@link Entities.EntityType|PolyVox} entity, otherwise {@link Vec3(0)|Vec3.ZERO}. The value may be fractional." + } + ], + "memberof": "Entities", + "longname": "Entities.worldCoordsToVoxelCoords", + "scope": "static" + }, + { + "description": "Convert voxel coordinates in a {@link Entities.EntityType|PolyVox} entity to local coordinates relative to the minimum \raxes value corner of the entity, with the scale being the same as world coordinates.", + "kind": "function", + "name": "voxelCoordsToLocalCoords", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|PolyVox} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The voxel coordinates. May be fractional and outside the entity's bounding box.", + "name": "voxelCoords" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local coordinates of the voxelCoords if the entityID is a \r {@link Entities.EntityType|PolyVox} entity, otherwise {@link Vec3(0)|Vec3.ZERO}." + } + ], + "examples": [ + "Get the world dimensions of a voxel in a PolyVox entity.\rvar polyVox = Entities.addEntity({\r type: \"PolyVox\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 })),\r dimensions: { x: 2, y: 2, z: 2 },\r voxelVolumeSize: { x: 16, y: 16, z: 16 },\r lifetime: 300 // Delete after 5 minutes.\r});\rvar voxelDimensions = Entities.voxelCoordsToLocalCoords(polyVox, Vec3.ONE);\rprint(\"Voxel dimensions: \" + JSON.stringify(voxelDimensions));" + ], + "memberof": "Entities", + "longname": "Entities.voxelCoordsToLocalCoords", + "scope": "static" + }, + { + "description": "Convert local coordinates to voxel coordinates in a {@link Entities.EntityType|PolyVox} entity. Local coordinates are \rrelative to the minimum axes value corner of the entity, with the scale being the same as world coordinates.", + "kind": "function", + "name": "localCoordsToVoxelCoords", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|PolyVox} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local coordinates. May be outside the entity's bounding box.", + "name": "localCoords" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The voxel coordinates of the worldCoords if the entityID is a \r {@link Entities.EntityType|PolyVox} entity, otherwise {@link Vec3(0)|Vec3.ZERO}. The value may be fractional." + } + ], + "memberof": "Entities", + "longname": "Entities.localCoordsToVoxelCoords", + "scope": "static" + }, + { + "description": "Set the linePoints property of a {@link Entities.EntityType|Line} entity.", + "kind": "function", + "name": "setAllPoints", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|Line} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The array of points to set the entity's linePoints property to.", + "name": "points" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the entity's property was updated, otherwise false. The property \r may fail to be updated if the entity does not exist, the entity is not a {@link Entities.EntityType|Line} entity, \r one of the points is outside the entity's dimensions, or the number of points is greater than the maximum allowed." + } + ], + "examples": [ + "Change the shape of a Line entity.\r// Draw a horizontal line between two points.\rvar entity = Entities.addEntity({\r type: \"Line\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.75, z: -5 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 2, y: 2, z: 1 },\r linePoints: [\r { x: -1, y: 0, z: 0 },\r { x:1, y: -0, z: 0 }\r ],\r color: { red: 255, green: 0, blue: 0 },\r lifetime: 300 // Delete after 5 minutes.\r});\r\r// Change the line to be a \"V\".\rScript.setTimeout(function () {\r Entities.setAllPoints(entity, [\r { x: -1, y: 1, z: 0 },\r { x: 0, y: -1, z: 0 },\r { x: 1, y: 1, z: 0 },\r ]);\r}, 2000);" + ], + "memberof": "Entities", + "longname": "Entities.setAllPoints", + "scope": "static" + }, + { + "description": "Append a point to a {@link Entities.EntityType|Line} entity.", + "kind": "function", + "name": "appendPoint", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|Line} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point to add to the line. The coordinates are relative to the entity's position.", + "name": "point" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the point was added to the line, otherwise false. The point may \r fail to be added if the entity does not exist, the entity is not a {@link Entities.EntityType|Line} entity, the \r point is outside the entity's dimensions, or the maximum number of points has been reached." + } + ], + "examples": [ + "Append a point to a Line entity.\r// Draw a line between two points.\rvar entity = Entities.addEntity({\r type: \"Line\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.75, z: -5 })),\r rotation: MyAvatar.orientation,\r dimensions: { x: 2, y: 2, z: 1 },\r linePoints: [\r { x: -1, y: 1, z: 0 },\r { x: 0, y: -1, z: 0 }\r ],\r color: { red: 255, green: 0, blue: 0 },\r lifetime: 300 // Delete after 5 minutes.\r});\r\r// Add a third point to create a \"V\".\rEntities.appendPoint(entity, { x: 1, y: 1, z: 0 });" + ], + "memberof": "Entities", + "longname": "Entities.appendPoint", + "scope": "static" + }, + { + "description": "Dumps debug information about all entities in Interface's local in-memory tree of entities it knows about — domain\rand client-only — to the program log.", + "kind": "function", + "name": "dumpTree", + "memberof": "Entities", + "longname": "Entities.dumpTree", + "scope": "static" + }, + { + "description": "Add an action to an entity. An action is registered with the physics engine and is applied every physics simulation \rstep. Any entity may have more than one action associated with it, but only as many as will fit in an entity's \ractionData property.", + "kind": "function", + "name": "addAction", + "params": [ + { + "type": { + "names": [ + "Entities.ActionType" + ] + }, + "description": "The type of action.", + "name": "actionType" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to add the action to.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Entities.ActionArguments" + ] + }, + "description": "Configure the action.", + "name": "arguments" + } + ], + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the action added if successfully added, otherwise null." + } + ], + "examples": [ + "Constrain a cube to move along a vertical line.\rvar entityID = Entities.addEntity({\r type: \"Box\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.75, z: -5 })),\r dimensions: { x: 0.5, y: 0.5, z: 0.5 },\r dynamic: true,\r collisionless: false,\r userData: \"{ \\\"grabbableKey\\\": { \\\"grabbable\\\": true, \\\"kinematic\\\": false } }\",\r lifetime: 300 // Delete after 5 minutes.\r});\r\rvar actionID = Entities.addAction(\"slider\", entityID, {\r axis: { x: 0, y: 1, z: 0 },\r linearLow: 0,\r linearHigh: 0.6\r});" + ], + "memberof": "Entities", + "longname": "Entities.addAction", + "scope": "static" + }, + { + "description": "Update an entity action.", + "kind": "function", + "name": "updateAction", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity with the action to update.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the action to update.", + "name": "actionID" + }, + { + "type": { + "names": [ + "Entities.ActionArguments" + ] + }, + "description": "The arguments to update.", + "name": "arguments" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the update was successful, otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.updateAction", + "scope": "static" + }, + { + "description": "Delete an action from an entity.", + "kind": "function", + "name": "deleteAction", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of entity to delete the action from.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the action to delete.", + "name": "actionID" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the update was successful, otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.deleteAction", + "scope": "static" + }, + { + "description": "Get the IDs of the actions that are associated with an entity.", + "kind": "function", + "name": "getActionIDs", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The entity to get the action IDs for.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of action IDs if any are found, otherwise an empty array." + } + ], + "memberof": "Entities", + "longname": "Entities.getActionIDs", + "scope": "static" + }, + { + "description": "Get the arguments of an action.", + "kind": "function", + "name": "getActionArguments", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity with the action.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the action to get the arguments of.", + "name": "actionID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Entities.ActionArguments" + ] + }, + "description": "The arguments of the requested action if found, otherwise an empty object." + } + ], + "memberof": "Entities", + "longname": "Entities.getActionArguments", + "scope": "static" + }, + { + "description": "Get the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation.", + "kind": "function", + "name": "getAbsoluteJointTranslationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer index of the joint.", + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to the entity's position and orientation if the entity is a\r {@link Entities.EntityType|Model} entity, the entity is loaded, and the joint index is valid; otherwise \r {@link Vec3(0)|Vec3.ZERO}." + } + ], + "memberof": "Entities", + "longname": "Entities.getAbsoluteJointTranslationInObjectFrame", + "scope": "static" + }, + { + "description": "Get the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation.", + "kind": "function", + "name": "getAbsoluteJointRotationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer index of the joint.", + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to the entity's orientation if the entity is a\r {@link Entities.EntityType|Model} entity, the entity is loaded, and the joint index is valid; otherwise \r {@link Quat(0)|Quat.IDENTITY}." + } + ], + "examples": [ + "Compare the local and absolute rotations of an avatar model's left hand joint.\rentityID = Entities.addEntity({\r type: \"Model\",\r modelURL: \"https://hifi-content.s3.amazonaws.com/milad/production/Examples/Models/Avatars/blue_suited.fbx\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r lifetime: 300 // Delete after 5 minutes.\r});\r\rScript.setTimeout(function () {\r // Joint data aren't available until after the model has loaded.\r var index = Entities.getJointIndex(entityID, \"LeftHand\");\r var localRotation = Entities.getLocalJointRotation(entityID, index);\r var absoluteRotation = Entities.getAbsoluteJointRotationInObjectFrame(entityID, index);\r print(\"Left hand local rotation: \" + JSON.stringify(Quat.safeEulerAngles(localRotation)));\r print(\"Left hand absolute rotation: \" + JSON.stringify(Quat.safeEulerAngles(absoluteRotation)));\r}, 2000);" + ], + "memberof": "Entities", + "longname": "Entities.getAbsoluteJointRotationInObjectFrame", + "scope": "static" + }, + { + "description": "Set the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation.", + "kind": "function", + "name": "setAbsoluteJointTranslationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer index of the joint.", + "name": "jointIndex" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation to set the joint to relative to the entity's position and orientation.", + "name": "translation" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "trueif the entity is a {@link Entities.EntityType|Model} entity, the entity is loaded, \r the joint index is valid, and the translation is different to the joint's current translation; otherwise \r false." + } + ], + "memberof": "Entities", + "longname": "Entities.setAbsoluteJointTranslationInObjectFrame", + "scope": "static" + }, + { + "description": "Set the rotation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation.", + "kind": "function", + "name": "setAbsoluteJointRotationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer index of the joint.", + "name": "jointIndex" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation to set the joint to relative to the entity's orientation.", + "name": "rotation" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the entity is a {@link Entities.EntityType|Model} entity, the entity is loaded, \r the joint index is valid, and the rotation is different to the joint's current rotation; otherwise false." + } + ], + "examples": [ + "Raise an avatar model's left palm.\rentityID = Entities.addEntity({\r type: \"Model\",\r modelURL: \"https://hifi-content.s3.amazonaws.com/milad/production/Examples/Models/Avatars/blue_suited.fbx\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r lifetime: 300 // Delete after 5 minutes.\r});\r\rScript.setTimeout(function () {\r // Joint data aren't available until after the model has loaded.\r var index = Entities.getJointIndex(entityID, \"LeftHand\");\r var absoluteRotation = Entities.getAbsoluteJointRotationInObjectFrame(entityID, index);\r absoluteRotation = Quat.multiply(Quat.fromPitchYawRollDegrees(0, 0, 90), absoluteRotation);\r var success = Entities.setAbsoluteJointRotationInObjectFrame(entityID, index, absoluteRotation);\r print(\"Success: \" + success);\r}, 2000);" + ], + "memberof": "Entities", + "longname": "Entities.setAbsoluteJointRotationInObjectFrame", + "scope": "static" + }, + { + "description": "Get the local translation of a joint in a {@link Entities.EntityType|Model} entity.", + "kind": "function", + "name": "getLocalJointTranslation", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer index of the joint.", + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local translation of the joint if the entity is a {@link Entities.EntityType|Model} entity, the \r entity is loaded, and the joint index is valid; otherwise {@link Vec3(0)|Vec3.ZERO}." + } + ], + "memberof": "Entities", + "longname": "Entities.getLocalJointTranslation", + "scope": "static" + }, + { + "description": "Get the local rotation of a joint in a {@link Entities.EntityType|Model} entity.", + "kind": "function", + "name": "getLocalJointRotation", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer index of the joint.", + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The local rotation of the joint if the entity is a {@link Entities.EntityType|Model} entity, the entity \r is loaded, and the joint index is valid; otherwise {@link Quat(0)|Quat.IDENTITY}." + } + ], + "examples": [ + "Report the local rotation of an avatar model's head joint.\rentityID = Entities.addEntity({\r type: \"Model\",\r modelURL: \"https://hifi-content.s3.amazonaws.com/milad/production/Examples/Models/Avatars/blue_suited.fbx\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r lifetime: 300 // Delete after 5 minutes.\r});\r\rScript.setTimeout(function () {\r // Joint data aren't available until after the model has loaded.\r var index = Entities.getJointIndex(entityID, \"Head\");\r var rotation = Entities.getLocalJointRotation(entityID, index);\r print(\"Head local rotation: \" + JSON.stringify(Quat.safeEulerAngles(rotation)));\r}, 2000);" + ], + "memberof": "Entities", + "longname": "Entities.getLocalJointRotation", + "scope": "static" + }, + { + "description": "Set the local translation of a joint in a {@link Entities.EntityType|Model} entity.", + "kind": "function", + "name": "setLocalJointTranslation", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer index of the joint.", + "name": "jointIndex" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The local translation to set the joint to.", + "name": "translation" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "trueif the entity is a {@link Entities.EntityType|Model} entity, the entity is loaded, \r the joint index is valid, and the translation is different to the joint's current translation; otherwise \r false." + } + ], + "memberof": "Entities", + "longname": "Entities.setLocalJointTranslation", + "scope": "static" + }, + { + "description": "Set the local rotation of a joint in a {@link Entities.EntityType|Model} entity.", + "kind": "function", + "name": "setLocalJointRotation", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer index of the joint.", + "name": "jointIndex" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The local rotation to set the joint to.", + "name": "rotation" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the entity is a {@link Entities.EntityType|Model} entity, the entity is loaded, \r the joint index is valid, and the rotation is different to the joint's current rotation; otherwise false." + } + ], + "examples": [ + "Make an avatar model turn its head left.\rentityID = Entities.addEntity({\r type: \"Model\",\r modelURL: \"https://hifi-content.s3.amazonaws.com/milad/production/Examples/Models/Avatars/blue_suited.fbx\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r lifetime: 300 // Delete after 5 minutes.\r});\r\rScript.setTimeout(function () {\r // Joint data aren't available until after the model has loaded.\r var index = Entities.getJointIndex(entityID, \"Head\");\r var rotation = Quat.fromPitchYawRollDegrees(0, 60, 0);\r var success = Entities.setLocalJointRotation(entityID, index, rotation);\r print(\"Success: \" + success);\r}, 2000);" + ], + "memberof": "Entities", + "longname": "Entities.setLocalJointRotation", + "scope": "static" + }, + { + "description": "Set the local translations of joints in a {@link Entities.EntityType|Model} entity.", + "kind": "function", + "name": "setLocalJointTranslations", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The local translations to set the joints to.", + "name": "translations" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "trueif the entity is a {@link Entities.EntityType|Model} entity, the entity is loaded, \r the model has joints, and at least one of the translations is different to the model's current translations; \r otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.setLocalJointTranslations", + "scope": "static" + }, + { + "description": "Set the local rotations of joints in a {@link Entities.EntityType|Model} entity.", + "kind": "function", + "name": "setLocalJointRotations", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The local rotations to set the joints to.", + "name": "rotations" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the entity is a {@link Entities.EntityType|Model} entity, the entity is loaded, \r the model has joints, and at least one of the rotations is different to the model's current rotations; otherwise \r false." + } + ], + "examples": [ + "Raise both palms of an avatar model.\rentityID = Entities.addEntity({\r type: \"Model\",\r modelURL: \"https://hifi-content.s3.amazonaws.com/milad/production/Examples/Models/Avatars/blue_suited.fbx\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r lifetime: 300 // Delete after 5 minutes.\r});\r\rScript.setTimeout(function () {\r // Joint data aren't available until after the model has loaded.\r\r // Get all the joint rotations.\r var jointNames = Entities.getJointNames(entityID);\r var jointRotations = [];\r for (var i = 0, length = jointNames.length; i < length; i++) {\r var index = Entities.getJointIndex(entityID, jointNames[i]);\r jointRotations.push(Entities.getLocalJointRotation(entityID, index));\r }\r\r // Raise both palms.\r var index = jointNames.indexOf(\"LeftHand\");\r jointRotations[index] = Quat.multiply(Quat.fromPitchYawRollDegrees(-90, 0, 0), jointRotations[index]);\r index = jointNames.indexOf(\"RightHand\");\r jointRotations[index] = Quat.multiply(Quat.fromPitchYawRollDegrees(-90, 0, 0), jointRotations[index]);\r\r // Update all the joint rotations.\r var success = Entities.setLocalJointRotations(entityID, jointRotations);\r print(\"Success: \" + success);\r}, 2000);" + ], + "memberof": "Entities", + "longname": "Entities.setLocalJointRotations", + "scope": "static" + }, + { + "description": "Set the local rotations and translations of joints in a {@link Entities.EntityType|Model} entity. This is the same as \rcalling both {@link Entities.setLocalJointRotations|setLocalJointRotations} and \r{@link Entities.setLocalJointTranslations|setLocalJointTranslations} at the same time.", + "kind": "function", + "name": "setLocalJointsData", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The local rotations to set the joints to.", + "name": "rotations" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The local translations to set the joints to.", + "name": "translations" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the entity is a {@link Entities.EntityType|Model} entity, the entity is loaded,\r the model has joints, and at least one of the rotations or translations is different to the model's current values; \r otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.setLocalJointsData", + "scope": "static" + }, + { + "description": "Get the index of a named joint in a {@link Entities.EntityType|Model} entity.", + "kind": "function", + "name": "getJointIndex", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The integer index of the joint if the entity is a {@link Entities.EntityType|Model} entity, the entity \r is loaded, and the joint is present; otherwise -1. The joint indexes are in order per \r {@link Entities.getJointNames|getJointNames}." + } + ], + "examples": [ + "Report the index of a model's head joint.\rentityID = Entities.addEntity({\r type: \"Model\",\r modelURL: \"https://hifi-content.s3.amazonaws.com/milad/production/Examples/Models/Avatars/blue_suited.fbx\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r lifetime: 300 // Delete after 5 minutes.\r});\r\rScript.setTimeout(function () {\r // Joint data aren't available until after the model has loaded.\r var index = Entities.getJointIndex(entityID, \"Head\");\r print(\"Head joint index: \" + index);\r}, 2000);" + ], + "memberof": "Entities", + "longname": "Entities.getJointIndex", + "scope": "static" + }, + { + "description": "Get the names of all the joints in a {@link Entities.EntityType|Model} entity.", + "kind": "function", + "name": "getJointNames", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|Model} entity.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The names of all the joints in the entity if it is a {@link Entities.EntityType|Model} entity and \r is loaded, otherwise an empty array. The joint names are in order per {@link Entities.getJointIndex|getJointIndex}." + } + ], + "examples": [ + "Report a model's joint names.\rentityID = Entities.addEntity({\r type: \"Model\",\r modelURL: \"https://hifi-content.s3.amazonaws.com/milad/production/Examples/Models/Avatars/blue_suited.fbx\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r rotation: MyAvatar.orientation,\r lifetime: 300 // Delete after 5 minutes.\r});\r\rScript.setTimeout(function () {\r // Joint data aren't available until after the model has loaded.\r var jointNames = Entities.getJointNames(entityID);\r print(\"Joint names: \" + JSON.stringify(jointNames));\r}, 2000);" + ], + "memberof": "Entities", + "longname": "Entities.getJointNames", + "scope": "static" + }, + { + "description": "Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model. Recurse on the IDs returned by the function to get all descendants of an entity, overlay, or avatar.", + "kind": "function", + "name": "getChildrenIDs", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity, overlay, or avatar to get the children IDs of.", + "name": "parentID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of entity, overlay, and avatar IDs that are parented directly to the parentID \r entity, overlay, or avatar. Does not include children's children, etc. The array is empty if no children can be found or \r parentID cannot be found." + } + ], + "examples": [ + "Report the children of an entity.\rfunction createEntity(description, position, parent) {\r var entity = Entities.addEntity({\r type: \"Sphere\",\r position: position,\r dimensions: Vec3.HALF,\r parentID: parent,\r lifetime: 300 // Delete after 5 minutes.\r });\r print(description + \": \" + entity);\r return entity;\r}\r\rvar position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 }));\rvar root = createEntity(\"Root\", position, Uuid.NULL);\rvar child = createEntity(\"Child\", Vec3.sum(position, { x: 0, y: -1, z: 0 }), root);\rvar grandChild = createEntity(\"Grandchild\", Vec3.sum(position, { x: 0, y: -2, z: 0 }), child);\r\rvar children = Entities.getChildrenIDs(root);\rprint(\"Children of root: \" + JSON.stringify(children)); // Only the child entity." + ], + "memberof": "Entities", + "longname": "Entities.getChildrenIDs", + "scope": "static" + }, + { + "description": "Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model's joint.", + "kind": "function", + "name": "getChildrenIDsOfJoint", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity, overlay, or avatar to get the children IDs of.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer number of the model joint to get the children IDs of.", + "name": "jointIndex" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "An array of entity, overlay, and avatar IDs that are parented directly to the parentID \r entity, overlay, or avatar at the jointIndex joint. Does not include children's children, etc. The \r array is empty if no children can be found or parentID cannot be found." + } + ], + "examples": [ + "Report the children of your avatar's right hand.\rfunction createEntity(description, position, parent) {\r var entity = Entities.addEntity({\r type: \"Sphere\",\r position: position,\r dimensions: Vec3.HALF,\r parentID: parent,\r lifetime: 300 // Delete after 5 minutes.\r });\r print(description + \": \" + entity);\r return entity;\r}\r\rvar position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 }));\rvar root = createEntity(\"Root\", position, Uuid.NULL);\rvar child = createEntity(\"Child\", Vec3.sum(position, { x: 0, y: -1, z: 0 }), root);\r\rEntities.editEntity(root, {\r parentID: MyAvatar.sessionUUID,\r parentJointIndex: MyAvatar.getJointIndex(\"RightHand\")\r});\r\rvar children = Entities.getChildrenIDsOfJoint(MyAvatar.sessionUUID, MyAvatar.getJointIndex(\"RightHand\"));\rprint(\"Children of hand: \" + JSON.stringify(children)); // Only the root entity." + ], + "memberof": "Entities", + "longname": "Entities.getChildrenIDsOfJoint", + "scope": "static" + }, + { + "description": "Check whether an entity or overlay has an entity as an ancestor (parent, parent's parent, etc.).", + "kind": "function", + "name": "isChildOfParent", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the child entity or overlay to test for being a child, grandchild, etc.", + "name": "childID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the parent entity to test for being a parent, grandparent, etc.", + "name": "parentID" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the childID entity or overlay has the parentID entity \r as a parent or grandparent etc., otherwise false." + } + ], + "examples": [ + "Check that a grandchild entity is a child of its grandparent.\rfunction createEntity(description, position, parent) {\r var entity = Entities.addEntity({\r type: \"Sphere\",\r position: position,\r dimensions: Vec3.HALF,\r parentID: parent,\r lifetime: 300 // Delete after 5 minutes.\r });\r print(description + \": \" + entity);\r return entity;\r}\r\rvar position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 }));\rvar root = createEntity(\"Root\", position, Uuid.NULL);\rvar child = createEntity(\"Child\", Vec3.sum(position, { x: 0, y: -1, z: 0 }), root);\rvar grandChild = createEntity(\"Grandchild\", Vec3.sum(position, { x: 0, y: -2, z: 0 }), child);\r\rprint(\"grandChild has root as parent: \" + Entities.isChildOfParent(grandChild, root)); // true" + ], + "memberof": "Entities", + "longname": "Entities.isChildOfParent", + "scope": "static" + }, + { + "description": "Get the type — entity, overlay, or avatar — of an in-world item.", + "kind": "function", + "name": "getNestableType", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the item to get the type of.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The type of the item: \"entity\" if the item is an entity, \"overlay\" if the \r the item is an overlay, \"avatar\" if the item is an avatar; otherwise \"unknown\" if the item \r cannot be found." + } + ], + "examples": [ + "Print some nestable types.\rvar entity = Entities.addEntity({\r type: \"Sphere\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 1, z: -2 })),\r lifetime: 300 // Delete after 5 minutes.\r});\r\rprint(Entities.getNestableType(entity)); // \"entity\"\rprint(Entities.getNestableType(Uuid.generate())); // \"unknown\"" + ], + "memberof": "Entities", + "longname": "Entities.getNestableType", + "scope": "static" + }, + { + "description": "Get the ID of the {@link Entities.EntityType|Web} entity that has keyboard focus.", + "kind": "function", + "name": "getKeyboardFocusEntity", + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|Web} entity that has focus, if any, otherwise null." + } + ], + "memberof": "Entities", + "longname": "Entities.getKeyboardFocusEntity", + "scope": "static" + }, + { + "description": "Set the {@link Entities.EntityType|Web} entity that has keyboard focus.", + "kind": "function", + "name": "setKeyboardFocusEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|Web} entity to set keyboard focus to. Use \r null or {@link Uuid|Uuid.NULL} to unset keyboard focus from an entity.", + "name": "entityID" + } + ], + "memberof": "Entities", + "longname": "Entities.setKeyboardFocusEntity", + "scope": "static" + }, + { + "description": "Emit a {@link Entities.mousePressOnEntity|mousePressOnEntity} event.", + "kind": "function", + "name": "sendMousePressOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to emit the event for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The event details.", + "name": "event" + } + ], + "memberof": "Entities", + "longname": "Entities.sendMousePressOnEntity", + "scope": "static" + }, + { + "description": "Emit a {@link Entities.mouseMoveOnEntity|mouseMoveOnEntity} event.", + "kind": "function", + "name": "sendMouseMoveOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to emit the event for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The event details.", + "name": "event" + } + ], + "memberof": "Entities", + "longname": "Entities.sendMouseMoveOnEntity", + "scope": "static" + }, + { + "description": "Emit a {@link Entities.mouseReleaseOnEntity|mouseReleaseOnEntity} event.", + "kind": "function", + "name": "sendMouseReleaseOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to emit the event for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The event details.", + "name": "event" + } + ], + "memberof": "Entities", + "longname": "Entities.sendMouseReleaseOnEntity", + "scope": "static" + }, + { + "description": "Emit a {@link Entities.clickDownOnEntity|clickDownOnEntity} event.", + "kind": "function", + "name": "sendClickDownOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to emit the event for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The event details.", + "name": "event" + } + ], + "memberof": "Entities", + "longname": "Entities.sendClickDownOnEntity", + "scope": "static" + }, + { + "description": "Emit a {@link Entities.holdingClickOnEntity|holdingClickOnEntity} event.", + "kind": "function", + "name": "sendHoldingClickOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to emit the event for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The event details.", + "name": "event" + } + ], + "memberof": "Entities", + "longname": "Entities.sendHoldingClickOnEntity", + "scope": "static" + }, + { + "description": "Emit a {@link Entities.clickReleaseOnEntity|clickReleaseOnEntity} event.", + "kind": "function", + "name": "sendClickReleaseOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to emit the event for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The event details.", + "name": "event" + } + ], + "memberof": "Entities", + "longname": "Entities.sendClickReleaseOnEntity", + "scope": "static" + }, + { + "description": "Emit a {@link Entities.hoverEnterEntity|hoverEnterEntity} event.", + "kind": "function", + "name": "sendHoverEnterEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to emit the event for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The event details.", + "name": "event" + } + ], + "memberof": "Entities", + "longname": "Entities.sendHoverEnterEntity", + "scope": "static" + }, + { + "description": "Emit a {@link Entities.hoverOverEntity|hoverOverEntity} event.", + "kind": "function", + "name": "sendHoverOverEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to emit the event for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The event details.", + "name": "event" + } + ], + "memberof": "Entities", + "longname": "Entities.sendHoverOverEntity", + "scope": "static" + }, + { + "description": "Emit a {@link Entities.hoverLeaveEntity|hoverLeaveEntity} event.", + "kind": "function", + "name": "sendHoverLeaveEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to emit the event for.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "The event details.", + "name": "event" + } + ], + "memberof": "Entities", + "longname": "Entities.sendHoverLeaveEntity", + "scope": "static" + }, + { + "description": "Check whether an entity wants hand controller pointer events. For example, a {@link Entities.EntityType|Web} entity does \rbut a {@link Entities.EntityType|Shape} entity doesn't.", + "kind": "function", + "name": "wantsHandControllerPointerEvents", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the entity can be found and it wants hand controller pointer events, otherwise \r false." + } + ], + "memberof": "Entities", + "longname": "Entities.wantsHandControllerPointerEvents", + "scope": "static" + }, + { + "description": "Send a script event over a {@link Entities.EntityType|Web} entity's EventBridge to the Web page's scripts.", + "kind": "function", + "name": "emitScriptEvent", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the {@link Entities.EntityType|Web} entity.", + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The message to send.", + "name": "message" + } + ], + "todo": [ + "This function is currently not implemented." + ], + "memberof": "Entities", + "longname": "Entities.emitScriptEvent", + "scope": "static" + }, + { + "description": "Check whether an axis-aligned box and a capsule intersect.", + "kind": "function", + "name": "AABoxIntersectsCapsule", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The bottom right near (minimum axes values) corner of the AA box.", + "name": "brn" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The dimensions of the AA box.", + "name": "dimensions" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "One end of the capsule.", + "name": "start" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The other end of the capsule.", + "name": "end" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The radiues of the capsule.", + "name": "radius" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the AA box and capsule intersect, otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.AABoxIntersectsCapsule", + "scope": "static" + }, + { + "description": "Get the meshes in a {@link Entities.EntityType|Model} or {@link Entities.EntityType|PolyVox} entity.", + "kind": "function", + "name": "getMeshes", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the Model or PolyVox entity to get the meshes of.", + "name": "entityID" + }, + { + "type": { + "names": [ + "Entities~getMeshesCallback" + ] + }, + "description": "The function to call upon completion.", + "name": "callback" + } + ], + "deprecated": "Use the {@link Graphics} API instead.", + "memberof": "Entities", + "longname": "Entities.getMeshes", + "scope": "static" + }, + { + "description": "Called when {@link Entities.getMeshes} is complete.", + "kind": "typedef", + "name": "getMeshesCallback", + "type": { + "names": [ + "function" + ] + }, + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "If success< is true, a {@link MeshProxy} per mesh in the \r Model or PolyVox entity; otherwise undefined.", + "name": "meshes" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the {@link Entities.getMeshes} call was successful, false \r otherwise. The call may be unsuccessful if the requested entity could not be found.", + "name": "success" + } + ], + "deprecated": "Use the {@link Graphics} API instead.", + "memberof": "Entities", + "longname": "Entities~getMeshesCallback", + "scope": "inner" + }, + { + "description": "Get the object to world transform, excluding scale, of an entity.", + "kind": "function", + "name": "getEntityTransform", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "The entity's object to world transform excluding scale (i.e., translation and rotation, with scale of 1) \r if the entity can be found, otherwise a transform with zero translation and rotation and a scale of 1." + } + ], + "examples": [ + "Position and rotation in an entity's world transform.\rvar position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 1, z: -2 }));\rvar orientation = MyAvatar.orientation;\rprint(\"Position: \" + JSON.stringify(position));\rprint(\"Orientation: \" + JSON.stringify(orientation));\r\rvar entityID = Entities.addEntity({\r type: \"Sphere\",\r position: position,\r rotation: orientation,\r dimensions: Vec3.HALF,\r lifetime: 300 // Delete after 5 minutes.\r});\r\rvar transform = Entities.getEntityTransform(entityID);\rprint(\"Transform: \" + JSON.stringify(transform));\rprint(\"Translation: \" + JSON.stringify(Mat4.extractTranslation(transform))); // Same as position.\rprint(\"Rotation: \" + JSON.stringify(Mat4.extractRotation(transform))); // Same as orientation.\rprint(\"Scale: \" + JSON.stringify(Mat4.extractScale(transform))); // { x: 1, y: 1, z: 1 }" + ], + "memberof": "Entities", + "longname": "Entities.getEntityTransform", + "scope": "static" + }, + { + "description": "Get the object to parent transform, excluding scale, of an entity.", + "kind": "function", + "name": "getEntityLocalTransform", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "The entity's object to parent transform excluding scale (i.e., translation and rotation, with scale of \r 1) if the entity can be found, otherwise a transform with zero translation and rotation and a scale of 1." + } + ], + "examples": [ + "Position and rotation in an entity's local transform.\rfunction createEntity(position, rotation, parent) {\r var entity = Entities.addEntity({\r type: \"Box\",\r position: position,\r rotation: rotation,\r dimensions: Vec3.HALF,\r parentID: parent,\r lifetime: 300 // Delete after 5 minutes.\r });\r return entity;\r}\r\rvar position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 }));\r\rvar parent = createEntity(position, MyAvatar.orientation, Uuid.NULL);\r\rvar childTranslation = { x: 0, y: -1.5, z: 0 };\rvar childRotation = Quat.fromPitchYawRollDegrees(0, 45, 0);\rvar child = createEntity(Vec3.sum(position, childTranslation), Quat.multiply(childRotation, MyAvatar.orientation), parent);\r\rvar transform = Entities.getEntityLocalTransform(child);\rprint(\"Transform: \" + JSON.stringify(transform));\rprint(\"Translation: \" + JSON.stringify(Mat4.extractTranslation(transform))); // childTranslation\rprint(\"Rotation: \" + JSON.stringify(Quat.safeEulerAngles(Mat4.extractRotation(transform)))); // childRotation\rprint(\"Scale: \" + JSON.stringify(Mat4.extractScale(transform))); // { x: 1, y: 1, z: 1 }" + ], + "memberof": "Entities", + "longname": "Entities.getEntityLocalTransform", + "scope": "static" + }, + { + "description": "Get the static certificate for an entity. The static certificate contains static properties of the item which cannot \rbe altered.", + "kind": "function", + "name": "getStaticCertificateJSON", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to get the static certificate for.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The entity's static certificate as a JSON string if the entity can be found, otherwise an empty string." + } + ], + "memberof": "Entities", + "longname": "Entities.getStaticCertificateJSON", + "scope": "static" + }, + { + "description": "Verify the entity's proof of provenance, i.e., that the entity's certificateID property was produced by \rHigh Fidelity signing the entity's static certificate JSON.", + "kind": "function", + "name": "verifyStaticCertificateProperties", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity to verify.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the entity can be found an its certificateID property is present \r and its value matches the entity's static certificate JSON; otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.verifyStaticCertificateProperties", + "scope": "static" + }, + { + "description": "Triggered on the client that is the physics simulation owner during the collision of two entities. Note: Isn't triggered \rfor a collision with an avatar.", + "kind": "function", + "name": "collisionWithEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of one entity in the collision. For an entity script, this is the ID of the entity containing \r the script.", + "name": "idA" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the other entity in the collision.", + "name": "idB" + }, + { + "type": { + "names": [ + "Collision" + ] + }, + "description": "The details of the collision.", + "name": "collision" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Change the color of an entity when it collides with another entity.\rvar entityScript = (function () {\r function randomInteger(min, max) {\r return Math.floor(Math.random() * (max - min + 1)) + min;\r }\r\r this.collisionWithEntity = function (myID, otherID, collision) {\r Entities.editEntity(myID, {\r color: {\r red: randomInteger(128, 255),\r green: randomInteger(128, 255),\r blue: randomInteger(128, 255)\r }\r });\r };\r});\r\rvar entityID = Entities.addEntity({\r type: \"Box\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r dimensions: { x: 0.5, y: 0.5, z: 0.5 },\r color: { red: 128, green: 128, blue: 128 },\r gravity: { x: 0, y: -9.8, z: 0 },\r velocity: { x: 0, y: 0.1, z: 0 }, // Kick off physics.\r dynamic: true,\r collisionless: false, // So that collision events are generated.\r script: \"(\" + entityScript + \")\", // Could host the script on a Web server instead.\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.collisionWithEntity", + "scope": "static" + }, + { + "description": "Triggered when your ability to change the locked property of entities changes.", + "kind": "function", + "name": "canAdjustLocksChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the script can change the locked property of an \r entity, otherwise false.", + "name": "canAdjustLocks" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when your ability to change locks changes.\rfunction onCanAdjustLocksChanged(canAdjustLocks) {\r print(\"You can adjust entity locks: \" + canAdjustLocks);\r}\rEntities.canAdjustLocksChanged.connect(onCanAdjustLocksChanged);" + ], + "memberof": "Entities", + "longname": "Entities.canAdjustLocksChanged", + "scope": "static" + }, + { + "description": "Triggered when your ability to rez (create) entities changes.", + "kind": "function", + "name": "canRezChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the script can rez (create) entities, otherwise false.", + "name": "canRez" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.canRezChanged", + "scope": "static" + }, + { + "description": "Triggered when your ability to rez (create) temporary entities changes. Temporary entities are entities with a finite\rlifetime property value set.", + "kind": "function", + "name": "canRezTmpChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the script can rez (create) temporary entities, otherwise \r false.", + "name": "canRezTmp" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.canRezTmpChanged", + "scope": "static" + }, + { + "description": "Triggered when your ability to rez (create) certified entities changes. Certified entities are entities that have PoP\rcertificates.", + "kind": "function", + "name": "canRezCertifiedChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the script can rez (create) certified entities, otherwise \r false.", + "name": "canRezCertified" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.canRezCertifiedChanged", + "scope": "static" + }, + { + "description": "Triggered when your ability to rez (create) temporary certified entities changes. Temporary entities are entities with a\rfinite lifetime property value set. Certified entities are entities that have PoP certificates.", + "kind": "function", + "name": "canRezTmpCertifiedChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the script can rez (create) temporary certified entities,\r otherwise false.", + "name": "canRezTmpCertified" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.canRezTmpCertifiedChanged", + "scope": "static" + }, + { + "description": "Triggered when your ability to make changes to the asset server's assets changes.", + "kind": "function", + "name": "canWriteAssetsChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the script can change the ? property of an entity,\r otherwise false.", + "name": "canWriteAssets" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.canWriteAssetsChanged", + "scope": "static" + }, + { + "description": "Triggered when a mouse button is clicked while the mouse cursor is on an entity, or a controller trigger is fully \rpressed while its laser is on an entity.", + "kind": "function", + "name": "mousePressOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that was pressed.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when an entity is clicked with the mouse or laser.\rfunction onMousePressOnEntity(entityID, event) {\r print(\"Clicked on entity: \" + entityID);\r}\r\rEntities.mousePressOnEntity.connect(onMousePressOnEntity);" + ], + "memberof": "Entities", + "longname": "Entities.mousePressOnEntity", + "scope": "static" + }, + { + "description": "Triggered when a mouse button is double-clicked while the mouse cursor is on an entity.", + "kind": "function", + "name": "mouseDoublePressOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that was double-pressed.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.mouseDoublePressOnEntity", + "scope": "static" + }, + { + "description": "Repeatedly triggered while the mouse cursor or controller laser moves on an entity.", + "kind": "function", + "name": "mouseMoveOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that was moved on.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.mouseMoveOnEntity", + "scope": "static" + }, + { + "description": "Triggered when a mouse button is released after clicking on an entity or the controller trigger is partly or fully \rreleased after pressing on an entity, even if the mouse pointer or controller laser has moved off the entity.", + "kind": "function", + "name": "mouseReleaseOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that was originally pressed.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.mouseReleaseOnEntity", + "scope": "static" + }, + { + "description": "Triggered when a mouse button is clicked while the mouse cursor is not on an entity.", + "kind": "function", + "name": "mousePressOffEntity", + "params": [ + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.mousePressOffEntity", + "scope": "static" + }, + { + "description": "Triggered when a mouse button is double-clicked while the mouse cursor is not on an entity.", + "kind": "function", + "name": "mouseDoublePressOffEntity", + "params": [ + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.mouseDoublePressOffEntity", + "scope": "static" + }, + { + "description": "Triggered when a mouse button is clicked while the mouse cursor is on an entity. Note: Not triggered by controller.", + "kind": "function", + "name": "clickDownOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that was clicked.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.clickDownOnEntity", + "scope": "static" + }, + { + "description": "Repeatedly triggered while a mouse button continues to be held after clicking an entity, even if the mouse cursor has \rmoved off the entity. Note: Not triggered by controller.", + "kind": "function", + "name": "holdingClickOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that was originally clicked.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.holdingClickOnEntity", + "scope": "static" + }, + { + "description": "Triggered when a mouse button is released after clicking on an entity, even if the mouse cursor has moved off the \rentity. Note: Not triggered by controller.", + "kind": "function", + "name": "clickReleaseOnEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that was originally clicked.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.clickReleaseOnEntity", + "scope": "static" + }, + { + "description": "Triggered when the mouse cursor or controller laser starts hovering on an entity.", + "kind": "function", + "name": "hoverEnterEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that is being hovered.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.hoverEnterEntity", + "scope": "static" + }, + { + "description": "Repeatedly triggered when the mouse cursor or controller laser moves while hovering over an entity.", + "kind": "function", + "name": "hoverOverEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that is being hovered.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.hoverOverEntity", + "scope": "static" + }, + { + "description": "Triggered when the mouse cursor or controller laser stops hovering over an entity.", + "kind": "function", + "name": "hoverLeaveEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that was being hovered.", + "name": "entityID" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "description": "Details of the event.", + "name": "event" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.hoverLeaveEntity", + "scope": "static" + }, + { + "description": "Triggered when an avatar enters an entity.", + "kind": "function", + "name": "enterEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that the avatar entered.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Change the color of an entity when an avatar enters or leaves.\rvar entityScript = (function () {\r this.enterEntity = function (entityID) {\r print(\"Enter entity\");\r Entities.editEntity(entityID, {\r color: { red: 255, green: 64, blue: 64 },\r });\r };\r this.leaveEntity = function (entityID) {\r print(\"Leave entity\");\r Entities.editEntity(entityID, {\r color: { red: 128, green: 128, blue: 128 },\r });\r };\r});\r\rvar entityID = Entities.addEntity({\r type: \"Sphere\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r dimensions: { x: 3, y: 3, z: 3 },\r color: { red: 128, green: 128, blue: 128 },\r collisionless: true, // So that avatar can walk through entity.\r script: \"(\" + entityScript + \")\", // Could host the script on a Web server instead.\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.enterEntity", + "scope": "static" + }, + { + "description": "Triggered when an avatar leaves an entity.", + "kind": "function", + "name": "leaveEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that the avatar left.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.leaveEntity", + "scope": "static" + }, + { + "description": "Triggered when an entity is deleted.", + "kind": "function", + "name": "deletingEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity deleted.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when an entity is deleted.\rEntities.deletingEntity.connect(function (entityID) {\r print(\"Deleted entity: \" + entityID);\r});" + ], + "memberof": "Entities", + "longname": "Entities.deletingEntity", + "scope": "static" + }, + { + "description": "Triggered when an entity is added to Interface's local in-memory tree of entities it knows about. This may occur when \rentities are loaded upon visiting a domain, when the user rotates their view so that more entities become visible, and \rwhen a domain or client-only entity is added (e.g., by {@Entities.addEntity|addEntity}).", + "kind": "function", + "name": "addingEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity added.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when an entity is added.\rEntities.addingEntity.connect(function (entityID) {\r print(\"Added entity: \" + entityID);\r});" + ], + "memberof": "Entities", + "longname": "Entities.addingEntity", + "scope": "static" + }, + { + "description": "Triggered when you disconnect from a domain, at which time Interface's local in-memory tree of entities it knows about\ris cleared.", + "kind": "function", + "name": "clearingEntities", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when Interfaces's entity tree is cleared.\rEntities.clearingEntities.connect(function () {\r print(\"Entities cleared\");\r});" + ], + "memberof": "Entities", + "longname": "Entities.clearingEntities", + "scope": "static" + }, + { + "description": "Triggered in when a script in a {@link Entities.EntityType|Web} entity's Web page script sends an event over the \rscript's EventBridge.", + "kind": "function", + "name": "webEventReceived", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that event was received from.", + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The message received.", + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.webEventReceived", + "scope": "static" + }, + { + "description": "

An entity may be one of the following types:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescriptionProperties
\"Box\"A rectangular prism. This is a synonym of \"Shape\" for the case \r where the entity's shape property value is \"Cube\".
\r If an entity is created with its type \r set to \"Box\" it will always be created with a shape property value of \r \"Cube\". If an entity of type Shape or Sphere has its shape set \r to \"Cube\" then its type will be reported as \"Box\".\r
{@link Entities.EntityProperties-Box|EntityProperties-Box}
\"Light\"A local lighting effect.{@link Entities.EntityProperties-Light|EntityProperties-Light}
\"Line\"A sequence of one or more simple straight lines.{@link Entities.EntityProperties-Line|EntityProperties-Line}
\"Material\"Modifies the existing materials on Model entities, Shape entities (albedo \r only), {@link Overlays.OverlayType|model overlays}, and avatars.{@link Entities.EntityProperties-Material|EntityProperties-Material}
\"Model\"A mesh model from an FBX or OBJ file.{@link Entities.EntityProperties-Model|EntityProperties-Model}
\"ParticleEffect\"A particle system that can be used to simulate things such as fire, \r smoke, snow, magic spells, etc.{@link Entities.EntityProperties-ParticleEffect|EntityProperties-ParticleEffect}
\"PolyLine\"A sequence of one or more textured straight lines.{@link Entities.EntityProperties-PolyLine|EntityProperties-PolyLine}
\"PolyVox\"A set of textured voxels.{@link Entities.EntityProperties-PolyVox|EntityProperties-PolyVox}
\"Shape\"A basic entity such as a cube.\r See also, the \"Box\" and \"Sphere\" entity types.{@link Entities.EntityProperties-Shape|EntityProperties-Shape}
\"Sphere\"A sphere. This is a synonym of \"Shape\" for the case\r where the entity's shape property value is \"Sphere\".
\r If an entity is created with its type\r set to \"Sphere\" it will always be created with a shape property value of\r \"Sphere\". If an entity of type Box or Shape has its shape set\r to \"Sphere\" then its type will be reported as \"Sphere\".\r
{@link Entities.EntityProperties-Sphere|EntityProperties-Sphere}
\"Text\"A pane of text oriented in space.{@link Entities.EntityProperties-Text|EntityProperties-Text}
\"Web\"A browsable Web page.{@link Entities.EntityProperties-Web|EntityProperties-Web}
\"Zone\"A volume of lighting effects and avatar permissions.{@link Entities.EntityProperties-Zone|EntityProperties-Zone}
", + "kind": "typedef", + "name": "EntityType", + "type": { + "names": [ + "string" + ] + }, + "memberof": "Entities", + "longname": "Entities.EntityType", + "scope": "static" + }, + { + "description": "Haze is defined by the following properties.", + "kind": "typedef", + "name": "Haze", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1000, + "description": "The horizontal distance at which visibility is reduced to 95%; i.e., 95% of each pixel's \r color is haze.", + "name": "hazeRange" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "128,154,179", + "description": "The color of the haze when looking away from the key light.", + "name": "hazeColor" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then the haze is colored with glare from the key light;\r hazeGlareColor and hazeGlareAngle are used.", + "name": "hazeEnableGlare" + }, + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,299,179", + "description": "The color of the haze when looking towards the key light.", + "name": "hazeGlareColor" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 20, + "description": "The angle in degrees across the circle around the key light that the glare color and \r haze color are blended 50/50.", + "name": "hazeGlareAngle" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then haze decreases with altitude as defined by the \r entity's local coordinate system; hazeBaseRef and
hazeCeiling
are used.", + "name": "hazeAltitudeEffect" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The y-axis value in the entity's local coordinate system at which the haze density starts \r reducing with altitude.", + "name": "hazeBaseRef" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 200, + "description": "The y-axis value in the entity's local coordinate system at which the haze density has \r reduced to 5%.", + "name": "hazeCeiling" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The proportion of the skybox image to show through the haze: 0.0 \r displays no skybox image; 1.0 displays no haze.", + "name": "hazeBackgroundBlend" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Currently not supported.", + "name": "hazeAttenuateKeyLight" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1000, + "description": "Currently not supported.", + "name": "hazeKeyLightRange" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 200, + "description": "Currently not supported.", + "name": "hazeKeyLightAltitude" + } + ], + "memberof": "Entities", + "longname": "Entities.Haze", + "scope": "static" + }, + { + "description": "A key light is defined by the following properties.", + "kind": "typedef", + "name": "KeyLight", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "255,255,255", + "description": "The color of the light.", + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The intensity of the light.", + "name": "intensity" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,-1,0", + "description": "The direction the light is shining.", + "name": "direction" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true then shadows are cast. Shadows are cast by avatars, plus \r {@link Entities.EntityType|Model} and {@link Entities.EntityType|Shape} entities that have their \r {@link Entities.EntityProperties|canCastShadow} property set to true.", + "name": "castShadows" + } + ], + "memberof": "Entities", + "longname": "Entities.KeyLight", + "scope": "static" + }, + { + "description": "

A PolyVoxSurfaceStyle may be one of the following:

\r\r \r \r \r \r \r \r \r \r \r
ValueTypeDescription
0Marching cubes.Chamfered edges. Open volume.\r Joins neighboring PolyVox entities reasonably well.
1Cubic.Square edges. Open volume.\r Joins neighboring PolyVox entities cleanly.
2Edged cubic.Square edges. Enclosed volume.\r Joins neighboring PolyVox entities cleanly.
3Edged marching cubes.Chamfered edges. Enclosed volume.\r Doesn't join neighboring PolyVox entities.
", + "kind": "typedef", + "name": "PolyVoxSurfaceStyle", + "type": { + "names": [ + "number" + ] + }, + "memberof": "Entities", + "longname": "Entities.PolyVoxSurfaceStyle", + "scope": "static" + }, + { + "description": "

A Shape, Box, or Sphere {@link Entities.EntityType|EntityType} may display as \rone of the following geometrical shapes:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDimensionsNotes
\"Circle\"2DA circle oriented in 3D.
\"Cube\"3D
\"Cone\"3D
\"Cylinder\"3D
\"Dodecahedron\"3D
\"Hexagon\"3DA hexagonal prism.
\"Icosahedron\"3D
\"Octagon\"3DAn octagonal prism.
\"Octahedron\"3D
\"Quad\"2DA square oriented in 3D.
\"Sphere\"3D
\"Tetrahedron\"3D
\"Torus\"3DNot implemented.
\"Triangle\"3DA triangular prism.
", + "kind": "typedef", + "name": "Shape", + "type": { + "names": [ + "string" + ] + }, + "memberof": "Entities", + "longname": "Entities.Shape", + "scope": "static" + }, + { + "description": "A skybox is defined by the following properties.", + "kind": "typedef", + "name": "Skybox", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Color" + ] + }, + "defaultvalue": "0,0,0", + "description": "Sets the color of the sky if url is \"\", otherwise modifies the \r color of the cube map image.", + "name": "color" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A cube map image that is used to render the sky.", + "name": "url" + } + ], + "memberof": "Entities", + "longname": "Entities.Skybox", + "scope": "static" + }, + { + "kind": "typedef", + "name": "FBXAnimationFrame", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Array." + ] + }, + "name": "rotations" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "name": "translations" + } + ], + "longname": "FBXAnimationFrame", + "scope": "global" + }, + { + "description": "\r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
0Points.
1Lines.
2Line strip.
3Triangles.
4Triangle strip.
5Quads.
6Quad strip.
", + "kind": "typedef", + "name": "Topology", + "type": { + "names": [ + "number" + ] + }, + "memberof": "Graphics", + "longname": "Graphics.Topology", + "scope": "static" + }, + { + "kind": "typedef", + "name": "Material", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "model" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "opacity" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "roughness" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "metallic" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "scattering" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "unlit" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "emissiveMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "albedoMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "opacityMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "metallicMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "specularMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "roughnessMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "glossMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "normalMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "bumpMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "occlusionMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "lightmapMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "scatteringMap" + } + ], + "tags": [ + { + "originalTitle": "propety", + "title": "propety", + "text": "{Vec3} emissive", + "value": "{Vec3} emissive" + }, + { + "originalTitle": "propety", + "title": "propety", + "text": "{Vec3} albedo", + "value": "{Vec3} albedo" + } + ], + "memberof": "Graphics", + "longname": "Graphics.Material", + "scope": "static" + }, + { + "kind": "typedef", + "name": "MaterialLayer", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Graphics.Material" + ] + }, + "description": "This layer's material.", + "name": "material" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The priority of this layer. If multiple materials are applied to a mesh part, only the highest priority layer is used.", + "name": "priority" + } + ], + "memberof": "Graphics", + "longname": "Graphics.MaterialLayer", + "scope": "static" + }, + { + "kind": "typedef", + "name": "IFSData", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "mesh name (useful for debugging / debug prints).", + "name": "name" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "topology" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "vertex indices to use for the mesh faces.", + "name": "indices" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "vertex positions (model space)", + "name": "vertices" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "vertex normals (normalized)", + "name": "normals" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "vertex colors (normalized)", + "name": "colors" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "optional": true, + "defaultvalue": "[]", + "description": "vertex texture coordinates (normalized)", + "name": "texCoords0" + } + ], + "memberof": "Graphics", + "longname": "Graphics.IFSData", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The experimental Graphics API (experimental) lets you query and manage certain graphics-related structures (like underlying meshes and textures) from scripting.", + "kind": "namespace", + "name": "Graphics", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "Graphics", + "scope": "global" + }, + { + "description": "Returns a model reference object associated with the specified UUID ({@link EntityID}, {@link OverlayID}, or {@link AvatarID}).", + "kind": "function", + "name": "getModel", + "params": [ + { + "type": { + "names": [ + "UUID" + ] + }, + "description": "The objectID of the model whose meshes are to be retrieved.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Graphics.Model" + ] + }, + "description": "the resulting Model object" + } + ], + "memberof": "Graphics", + "longname": "Graphics.getModel", + "scope": "static" + }, + { + "kind": "function", + "name": "updateModel", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "id" + }, + { + "type": { + "names": [ + "Graphics.Model" + ] + }, + "name": "model" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Graphics", + "longname": "Graphics.updateModel", + "scope": "static" + }, + { + "kind": "function", + "name": "canUpdateModel", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "id" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "meshIndex" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "partNumber" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Graphics", + "longname": "Graphics.canUpdateModel", + "scope": "static" + }, + { + "kind": "function", + "name": "newModel", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "name": "meshes" + } + ], + "returns": [ + { + "type": { + "names": [ + "Graphics.Model" + ] + } + } + ], + "memberof": "Graphics", + "longname": "Graphics.newModel", + "scope": "static" + }, + { + "description": "Create a new Mesh / Mesh Part with the specified data buffers.", + "kind": "function", + "name": "newMesh", + "params": [ + { + "type": { + "names": [ + "Graphics.IFSData" + ] + }, + "description": "Index-Faced Set (IFS) arrays used to create the new mesh.", + "name": "ifsMeshData" + } + ], + "returns": [ + { + "type": { + "names": [ + "Graphics.Mesh" + ] + }, + "description": "the resulting Mesh / Mesh Part object" + } + ], + "memberof": "Graphics", + "longname": "Graphics.newMesh", + "scope": "static" + }, + { + "kind": "function", + "name": "exportModelToOBJ", + "params": [ + { + "type": { + "names": [ + "Graphics.Model" + ] + }, + "name": "model" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Graphics", + "longname": "Graphics.exportModelToOBJ", + "scope": "static" + }, + { + "kind": "typedef", + "name": "Mesh", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Array of submesh part references.", + "name": "parts" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Vertex attribute names (color, normal, etc.)", + "name": "attributeNames" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The number of parts contained in the mesh.", + "name": "numParts" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of vertex indices in the mesh.", + "name": "numIndices" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of vertices in the Mesh.", + "name": "numVertices" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Number of currently defined vertex attributes.", + "name": "numAttributes" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "valid" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "strong" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "extents" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "bufferFormats" + } + ], + "memberof": "Graphics", + "longname": "Graphics.Mesh", + "scope": "static" + }, + { + "kind": "typedef", + "name": "MeshPart", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "valid" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The part index (within the containing Mesh).", + "name": "partIndex" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "firstVertexIndex" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "baseVertexIndex" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "lastVertexIndex" + }, + { + "type": { + "names": [ + "Graphics.Topology" + ] + }, + "description": "element interpretation (currently only 'triangles' is supported).", + "name": "topology" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Vertex attribute names (color, normal, etc.)", + "name": "attributeNames" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Number of vertex indices that this mesh part refers to.", + "name": "numIndices" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Number of vertices per face (eg: 3 when topology is 'triangles').", + "name": "numVerticesPerFace" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Number of faces represented by the mesh part (numIndices / numVerticesPerFace).", + "name": "numFaces" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of vertices in the containing Mesh.", + "name": "numVertices" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Number of currently defined vertex attributes.", + "name": "numAttributes" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "extents" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "bufferFormats" + } + ], + "memberof": "Graphics", + "longname": "Graphics.MeshPart", + "scope": "static" + }, + { + "kind": "typedef", + "name": "Model", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "UUID of corresponding inworld object (if model is associated)", + "name": "objectID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The number of submeshes contained in the model.", + "name": "numMeshes" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Array of submesh references.", + "name": "meshes" + }, + { + "type": { + "names": [ + "Object.>" + ] + }, + "description": "Map of materials layer lists. You can look up a material layer list by mesh part number or by material name.", + "name": "materialLayers" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Array of all the material names used by the mesh parts of this model, in order (e.g. materialNames[0] is the name of the first mesh part's material).", + "name": "materialNames" + } + ], + "memberof": "Graphics", + "longname": "Graphics.Model", + "scope": "static" + }, + { + "description": "

The Controller.Hardware.Keyboard object has properties representing keyboard, mouse, and display touch \revents. The property values are integer IDs, uniquely identifying each output. Read-only. These can be mapped to \ractions or functions or Controller.Standard items in a {@link RouteObject} mapping. For presses, each data \rvalue is either 1.0 for \"true\" or 0.0 for \"false\".

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
09numbernumberA \"0\" – \"1\" key on the \r keyboard or keypad is pressed.
AZnumbernumberA \"A\" – \"Z\" key on the \r keyboard is pressed.
SpacenumbernumberThe space bar on the keyboard is pressed.
TabnumbernumberThe tab key on the keyboard is pressed.
ShiftnumbernumberThe shift key on the keyboard is pressed.
ControlnumbernumberThe control key on the keyboard is pressed. (The \r \"Command\" key on OSX.)
LeftnumbernumberThe left arrow key on the keyboard or keypad is pressed.\r
RightnumbernumberThe right arrow key on the keyboard or keypad is \r pressed.
UpnumbernumberThe up arrow key on the keyboard or keypad is pressed.\r
DownnumbernumberThe down arrow key on the keyboard or keypad is pressed.\r
PgUpnumbernumberThe page up key on the keyboard or keypad is pressed.\r
PgDownnumbernumberThe page down key on the keyboard or keypad is pressed.\r
LeftMouseButtonnumbernumberThe left mouse button pressed.
MiddleMouseButtonnumbernumberThe middle mouse button pressed.
RightMouseButtonnumbernumberThe right mouse button pressed.
LeftMouseClickednumbernumberThe left mouse button clicked.
MiddleMouseClickednumbernumberThe middle mouse button clicked.
RightMouseClickednumbernumberThe right mouse button clicked.
MouseMoveRightnumbernumberThe mouse moved right.
MouseMoveLeftnumbernumberThe mouse moved left.
MouseMoveUpnumbernumberThe mouse moved up.
MouseMoveDownnumbernumberThe mouse moved down.
MouseXnumbernumberThe mouse x-coordinate changed. The data value is its \r new x-coordinate value.
MouseYnumbernumberThe mouse y-coordinate changed. The data value is its \r new y-coordinate value.
MouseWheelRightnumbernumberThe mouse wheel rotated left. The data value \r is the number of units rotated (typically 1.0).
MouseWheelLeftnumbernumberThe mouse wheel rotated left. The data value \r is the number of units rotated (typically 1.0).
MouseWheelUpnumbernumberThe mouse wheel rotated up. The data value \r is the number of units rotated (typically 1.0).
MouseWheelDownnumbernumberThe mouse wheel rotated down. The data value \r is the number of units rotated (typically 1.0).
TouchpadRightnumbernumberThe average touch on a touch-enabled device \r moved right. The data value is how far the average position of all touch points moved.
TouchpadLeftnumbernumberThe average touch on a touch-enabled device \r moved left. The data value is how far the average position of all touch points moved.
TouchpadUpnumbernumberThe average touch on a touch-enabled device \r moved up. The data value is how far the average position of all touch points moved.
TouchpadDownnumbernumberThe average touch on a touch-enabled device \r moved down. The data value is how far the average position of all touch points moved.
", + "kind": "typedef", + "name": "Hardware-Keyboard", + "type": { + "names": [ + "object" + ] + }, + "todo": [ + "Currently, the mouse wheel in an ordinary mouse generates left/right wheel events instead of up/down." + ], + "memberof": "Controller", + "longname": "Controller.Hardware-Keyboard", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Midi", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "Midi", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "description": "Send Raw MIDI packet to a particular device.", + "kind": "function", + "name": "sendRawDword", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer device number.", + "name": "device" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer (DWORD) raw MIDI message.", + "name": "raw" + } + ], + "memberof": "Midi", + "longname": "Midi.sendRawDword", + "scope": "static" + }, + { + "description": "Send MIDI message to a particular device.", + "kind": "function", + "name": "sendMidiMessage", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer device number.", + "name": "device" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer channel number.", + "name": "channel" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "0x8 is note off, 0x9 is note on (if velocity=0, note off), etc.", + "name": "type" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "MIDI note number.", + "name": "note" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Note velocity (0 means note off).", + "name": "velocity" + } + ], + "memberof": "Midi", + "longname": "Midi.sendMidiMessage", + "scope": "static" + }, + { + "description": "Play a note on all connected devices.", + "kind": "function", + "name": "playMidiNote", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "0x80 is note off, 0x90 is note on (if velocity=0, note off), etc.", + "name": "status" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "MIDI note number.", + "name": "note" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Note velocity (0 means note off).", + "name": "velocity" + } + ], + "memberof": "Midi", + "longname": "Midi.playMidiNote", + "scope": "static" + }, + { + "description": "Turn off all notes on all connected devices.", + "kind": "function", + "name": "allNotesOff", + "memberof": "Midi", + "longname": "Midi.allNotesOff", + "scope": "static" + }, + { + "description": "Clean up and re-discover attached devices.", + "kind": "function", + "name": "resetDevices", + "memberof": "Midi", + "longname": "Midi.resetDevices", + "scope": "static" + }, + { + "description": "Get a list of inputs/outputs.", + "kind": "function", + "name": "listMidiDevices", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "output" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "Midi", + "longname": "Midi.listMidiDevices", + "scope": "static" + }, + { + "description": "Block an input/output by name.", + "kind": "function", + "name": "blockMidiDevice", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "output" + } + ], + "memberof": "Midi", + "longname": "Midi.blockMidiDevice", + "scope": "static" + }, + { + "description": "Unblock an input/output by name.", + "kind": "function", + "name": "unblockMidiDevice", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "output" + } + ], + "memberof": "Midi", + "longname": "Midi.unblockMidiDevice", + "scope": "static" + }, + { + "description": "Repeat all incoming notes to all outputs (default disabled).", + "kind": "function", + "name": "thruModeEnable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enable" + } + ], + "memberof": "Midi", + "longname": "Midi.thruModeEnable", + "scope": "static" + }, + { + "description": "Broadcast on all unblocked devices.", + "kind": "function", + "name": "broadcastEnable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enable" + } + ], + "memberof": "Midi", + "longname": "Midi.broadcastEnable", + "scope": "static" + }, + { + "kind": "function", + "name": "typeNoteOffEnable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enable" + } + ], + "memberof": "Midi", + "longname": "Midi.typeNoteOffEnable", + "scope": "static" + }, + { + "kind": "function", + "name": "typeNoteOnEnable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enable" + } + ], + "memberof": "Midi", + "longname": "Midi.typeNoteOnEnable", + "scope": "static" + }, + { + "kind": "function", + "name": "typePolyKeyPressureEnable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enable" + } + ], + "memberof": "Midi", + "longname": "Midi.typePolyKeyPressureEnable", + "scope": "static" + }, + { + "kind": "function", + "name": "typeControlChangeEnable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enable" + } + ], + "memberof": "Midi", + "longname": "Midi.typeControlChangeEnable", + "scope": "static" + }, + { + "kind": "function", + "name": "typeProgramChangeEnable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enable" + } + ], + "memberof": "Midi", + "longname": "Midi.typeProgramChangeEnable", + "scope": "static" + }, + { + "kind": "function", + "name": "typeChanPressureEnable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enable" + } + ], + "memberof": "Midi", + "longname": "Midi.typeChanPressureEnable", + "scope": "static" + }, + { + "kind": "function", + "name": "typePitchBendEnable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enable" + } + ], + "memberof": "Midi", + "longname": "Midi.typePitchBendEnable", + "scope": "static" + }, + { + "kind": "function", + "name": "typeSystemMessageEnable", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enable" + } + ], + "memberof": "Midi", + "longname": "Midi.typeSystemMessageEnable", + "scope": "static" + }, + { + "description": "

An RGB or SRGB color value.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r
IndexTypeAttributesDefaultValue
0numberRed component value. Number in the range 0.01.0.
1numberGreen component value. Number in the range 0.01.0.
2numberBlue component value. Number in the range 0.01.0.
3boolean<optional>falseIf true then the color is an SRGB color.
", + "kind": "typedef", + "name": "RGBS", + "type": { + "names": [ + "array" + ] + }, + "longname": "RGBS", + "scope": "global" + }, + { + "description": "A material or set of materials such as may be used by a {@link Entities.EntityType|Material} entity.", + "kind": "typedef", + "name": "MaterialResource", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1, + "description": "The version of the material. Currently not used.", + "name": "materialVersion" + }, + { + "type": { + "names": [ + "Material", + "Array." + ] + }, + "description": "The details of the material or materials.", + "name": "materials" + } + ], + "longname": "MaterialResource", + "scope": "global" + }, + { + "description": "A material such as may be used by a {@link Entities.EntityType|Material} entity.", + "kind": "typedef", + "name": "Material", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A name for the material.", + "name": "name" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"hifi_pbr\"", + "description": "Currently not used.", + "name": "model" + }, + { + "type": { + "names": [ + "Vec3Color", + "RGBS" + ] + }, + "description": "The emissive color, i.e., the color that the material emits. A {@link Vec3Color} value \r is treated as sRGB. A {@link RGBS} value can be either RGB or sRGB.", + "name": "emissive" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "1.0", + "description": "The opacity, 0.01.0.", + "name": "opacity" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "If true, the material is not lit.", + "name": "unlit" + }, + { + "type": { + "names": [ + "Vec3Color", + "RGBS" + ] + }, + "description": "The albedo color. A {@link Vec3Color} value is treated as sRGB. A {@link RGBS} value can \r be either RGB or sRGB.", + "name": "albedo" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The roughness, 0.01.0.", + "name": "roughness" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The metallicness, 0.01.0.", + "name": "metallic" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The scattering, 0.01.0.", + "name": "scattering" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of emissive texture image.", + "name": "emissiveMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of albedo texture image.", + "name": "albedoMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of opacity texture image. Set value the same as the albedoMap value for \r transparency.", + "name": "opacityMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of roughness texture image. Can use this or glossMap, but not both.", + "name": "roughnessMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of gloss texture image. Can use this or roughnessMap, but not both.", + "name": "glossMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of metallic texture image. Can use this or specularMap, but not both.", + "name": "metallicMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of specular texture image. Can use this or metallicMap, but not both.", + "name": "specularMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of normal texture image. Can use this or bumpMap, but not both.", + "name": "normalMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of bump texture image. Can use this or normalMap, but not both.", + "name": "bumpMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of occlusion texture image.", + "name": "occlusionMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of scattering texture image. Only used if normalMap or \r bumpMap is specified.", + "name": "scatteringMap" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of light map texture image. Currently not used.", + "name": "lightMap" + } + ], + "longname": "Material", + "scope": "global" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

API to manage model cache resources.", + "kind": "namespace", + "name": "ModelCache", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of total resources. Read-only.", + "name": "numTotal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of cached resource. Read-only.", + "name": "numCached" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Size in bytes of all resources. Read-only.", + "name": "sizeTotal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Size in bytes of all cached resources. Read-only.", + "name": "sizeCached" + } + ], + "longname": "ModelCache", + "scope": "global" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

API to manage texture cache resources.", + "kind": "namespace", + "name": "TextureCache", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of total resources. Read-only.", + "name": "numTotal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of cached resource. Read-only.", + "name": "numCached" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Size in bytes of all resources. Read-only.", + "name": "sizeTotal" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Size in bytes of all cached resources. Read-only.", + "name": "sizeCached" + } + ], + "longname": "TextureCache", + "scope": "global" + }, + { + "kind": "function", + "name": "prefetch", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "type" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 67108864, + "name": "maxNumPixels" + } + ], + "returns": [ + { + "type": { + "names": [ + "ResourceObject" + ] + } + } + ], + "memberof": "TextureCache", + "longname": "TextureCache.prefetch", + "scope": "static" + }, + { + "kind": "function", + "name": "spectatorCameraFramebufferReset", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "TextureCache", + "longname": "TextureCache.spectatorCameraFramebufferReset", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

The location API provides facilities related to your current location in the metaverse.\r\r
Getter/Setter
\r

You can get and set your current metaverse address by directly reading a string value from and writing a string value to \rthe location object. This is an alternative to using the location.href property or this object's\rfunctions.

", + "kind": "namespace", + "name": "location", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "A UUID uniquely identifying the domain you're visiting. Is {@link Uuid|Uuid.NULL} if you're not\r connected to the domain or are in a serverless domain.\r Read-only.", + "name": "domainID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the domain for your current metaverse address (e.g., \"AvatarIsland\",\r localhost, or an IP address). Is blank if you're in a serverless domain.\r Read-only.", + "name": "hostname" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Your current metaverse address (e.g., \"hifi://avatarisland/15,-10,26/0,0,0,1\")\r regardless of whether or not you're connected to the domain. Starts with \"file:///\" if you're in a \r serverless domain.\r Read-only.", + "name": "href" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if you're connected to the domain in your current href\r metaverse address, otherwise false.", + "name": "isConnected" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The location and orientation in your current href metaverse address \r (e.g., \"/15,-10,26/0,0,0,1\").\r Read-only.", + "name": "pathname" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The place name in your current href metaverse address\r (e.g., \"AvatarIsland\"). Is blank if your hostname is an IP address.\r Read-only.", + "name": "placename" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The protocol of your current href metaverse address (e.g., \"hifi\").\r Read-only.", + "name": "protocol" + } + ], + "longname": "location", + "scope": "global" + }, + { + "description": "

The reasons for an address lookup via the metaverse API are defined by numeric values:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
NameValueDescription
UserInput0User-typed input.
Back1Address from a {@link location.goBack|goBack} call.
Forward2Address from a {@link location.goForward|goForward} call.
StartupFromSettings3Initial location at Interface start-up from settings.
DomainPathResponse4A named path in the domain.
Internal5An internal attempt to resolve an alternative path.
AttemptedRefresh6A refresh after connecting to a domain.
Suggestions7Address from the Goto dialog.
VisitUserFromPAL8User from the People dialog.
", + "kind": "typedef", + "name": "LookupTrigger", + "type": { + "names": [ + "number" + ] + }, + "memberof": "location", + "longname": "location.LookupTrigger", + "scope": "static" + }, + { + "description": "Go to a specified metaverse address.", + "kind": "function", + "name": "handleLookupString", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The address to go to: a \"hifi://\" address, an IP address (e.g., \r\"127.0.0.1\" or \"localhost\"), a domain name, a named path on a domain (starts with \r\"/\"), a position or position and orientation, or a user (starts with \"@\").", + "name": "address" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": false, + "description": "Set to true if the address is obtained from the \"Goto\" dialog.\r Helps ensure that user's location history is correctly maintained.", + "name": "fromSuggestions" + } + ], + "memberof": "location", + "longname": "location.handleLookupString", + "scope": "static" + }, + { + "description": "Go to a position and orientation resulting from a lookup for a named path in the domain (set in the domain server's \rsettings).", + "kind": "function", + "name": "goToViewpointForPath", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The position and orientation corresponding to the named path.", + "name": "path" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The named path that was looked up on the server.", + "name": "namedPath" + } + ], + "deprecated": "This function is deprecated and will be removed.", + "memberof": "location", + "longname": "location.goToViewpointForPath", + "scope": "static" + }, + { + "description": "Go back to the previous location in your navigation history, if there is one.", + "kind": "function", + "name": "goBack", + "memberof": "location", + "longname": "location.goBack", + "scope": "static" + }, + { + "description": "Go forward to the next location in your navigation history, if there is one.", + "kind": "function", + "name": "goForward", + "memberof": "location", + "longname": "location.goForward", + "scope": "static" + }, + { + "description": "Go to the local Sandbox server that's running on the same PC as Interface.", + "kind": "function", + "name": "goToLocalSandbox", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "The position and orientation to go to (e.g., \"/0,0,0\").", + "name": "path" + }, + { + "type": { + "names": [ + "location.LookupTrigger" + ] + }, + "defaultvalue": "StartupFromSettings", + "description": "The reason for the function call. Helps ensure that user's\r location history is correctly maintained.", + "name": "trigger" + } + ], + "memberof": "location", + "longname": "location.goToLocalSandbox", + "scope": "static" + }, + { + "description": "Go to the default \"welcome\" metaverse address.", + "kind": "function", + "name": "goToEntry", + "params": [ + { + "type": { + "names": [ + "location.LookupTrigger" + ] + }, + "defaultvalue": "StartupFromSettings", + "description": "The reason for the function call. Helps ensure that user's\r location history is correctly maintained.", + "name": "trigger" + } + ], + "memberof": "location", + "longname": "location.goToEntry", + "scope": "static" + }, + { + "description": "Go to the specified user's location.", + "kind": "function", + "name": "goToUser", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The user's username.", + "name": "username" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "If true then go to a location just in front of the user and turn to face\r them, otherwise go to the user's exact location and orientation.", + "name": "matchOrientation" + } + ], + "memberof": "location", + "longname": "location.goToUser", + "scope": "static" + }, + { + "description": "Go to the last address tried. This will be the last URL tried from location.handleLookupString", + "kind": "function", + "name": "goToLastAddress", + "memberof": "location", + "longname": "location.goToLastAddress", + "scope": "static" + }, + { + "description": "Returns if going back is possible.", + "kind": "function", + "name": "canGoBack", + "memberof": "location", + "longname": "location.canGoBack", + "scope": "static" + }, + { + "description": "Refresh the current address, e.g., after connecting to a domain in order to position the user to the desired location.", + "kind": "function", + "name": "refreshPreviousLookup", + "deprecated": "This function is deprecated and will be removed.", + "memberof": "location", + "longname": "location.refreshPreviousLookup", + "scope": "static" + }, + { + "description": "Update your current metaverse location in Interface's {@link Settings} file as your last-known address. This can be used\rto ensure that you start up at that address if you exit Interface without a later address automatically being saved.", + "kind": "function", + "name": "storeCurrentAddress", + "memberof": "location", + "longname": "location.storeCurrentAddress", + "scope": "static" + }, + { + "description": "Copy your current metaverse address (i.e., location.href property value) to the OS clipboard.", + "kind": "function", + "name": "copyAddress", + "memberof": "location", + "longname": "location.copyAddress", + "scope": "static" + }, + { + "description": "Copy your current metaverse location and orientation (i.e., location.pathname property value) to the OS \rclipboard.", + "kind": "function", + "name": "copyPath", + "memberof": "location", + "longname": "location.copyPath", + "scope": "static" + }, + { + "description": "Retrieve and remember the place name for the given domain ID if the place name is not already known.", + "kind": "function", + "name": "lookupShareableNameForDomainID", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the domain.", + "name": "domainID" + } + ], + "deprecated": "This function is deprecated and will be removed.", + "memberof": "location", + "longname": "location.lookupShareableNameForDomainID", + "scope": "static" + }, + { + "description": "Triggered when looking up the details of a metaverse user or location to go to has completed (successfully or\runsuccessfully).", + "kind": "function", + "name": "lookupResultsFinished", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "location", + "longname": "location.lookupResultsFinished", + "scope": "static" + }, + { + "description": "Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user is \roffline.", + "kind": "function", + "name": "lookupResultIsOffline", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "location", + "longname": "location.lookupResultIsOffline", + "scope": "static" + }, + { + "description": "Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user could\rnot be found.", + "kind": "function", + "name": "lookupResultIsNotFound", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "location", + "longname": "location.lookupResultIsNotFound", + "scope": "static" + }, + { + "description": "Triggered when a request is made to go to an IP address.", + "kind": "function", + "name": "possibleDomainChangeRequired", + "params": [ + { + "type": { + "names": [ + "Url" + ] + }, + "description": "URL for domain", + "name": "domainURL" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the domain to go to.", + "name": "domainID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "location", + "longname": "location.possibleDomainChangeRequired", + "scope": "static" + }, + { + "description": "Triggered when a request is made to go to a named domain or user.", + "kind": "function", + "name": "possibleDomainChangeRequiredViaICEForID", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "IP address of the ICE server.", + "name": "iceServerHostName" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the domain to go to.", + "name": "domainID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "location", + "longname": "location.possibleDomainChangeRequiredViaICEForID", + "scope": "static" + }, + { + "description": "Triggered when an attempt is made to send your avatar to a specified position on the current domain. For example, when\ryou change domains or enter a position to go to in the \"Goto\" dialog.", + "kind": "function", + "name": "locationChangeRequired", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position to go to.", + "name": "position" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true then a new orientation has been requested.", + "name": "hasOrientationChange" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation to change to. Is {@link Quat(0)|Quat.IDENTITY} if \r hasOrientationChange is false.", + "name": "orientation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "If true then the request is to go to a position near that specified \r and orient your avatar to face it. For example when you visit someone from the \"People\" dialog.", + "name": "shouldFaceLocation" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report location change requests.\rfunction onLocationChangeRequired(newPosition, hasOrientationChange, newOrientation, shouldFaceLocation) {\r print(\"Location change required:\");\r print(\"- New position = \" + JSON.stringify(newPosition));\r print(\"- Has orientation change = \" + hasOrientationChange);\r print(\"- New orientation = \" + JSON.stringify(newOrientation));\r print(\"- Should face location = \" + shouldFaceLocation);\r}\r\rlocation.locationChangeRequired.connect(onLocationChangeRequired);" + ], + "memberof": "location", + "longname": "location.locationChangeRequired", + "scope": "static" + }, + { + "description": "Triggered when an attempt is made to send your avatar to a new named path on the domain (set in the domain server's\rsettings). For example, when you enter a \"/\" followed by the path's name in the \"GOTO\" dialog.", + "kind": "function", + "name": "pathChangeRequired", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the path to go to.", + "name": "path" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report path change requests.\rfunction onPathChangeRequired(newPath) {\r print(\"onPathChangeRequired: newPath = \" + newPath);\r}\r\rlocation.pathChangeRequired.connect(onPathChangeRequired);" + ], + "memberof": "location", + "longname": "location.pathChangeRequired", + "scope": "static" + }, + { + "description": "Triggered when you navigate to a new domain.", + "kind": "function", + "name": "hostChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The new domain's host name.", + "name": "hostname" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when you navigate to a new domain.\rfunction onHostChanged(host) {\r print(\"Host changed to: \" + host);\r}\r\rlocation.hostChanged.connect(onHostChanged);" + ], + "memberof": "location", + "longname": "location.hostChanged", + "scope": "static" + }, + { + "description": "Triggered when there's a change in whether or not there's a previous location that can be navigated to using\r{@link location.goBack|goBack}. (Reflects changes in the state of the \"Goto\" dialog's back arrow.)", + "kind": "function", + "name": "goBackPossible", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if there's a previous location to navigate to, otherwise \r false.", + "name": "isPossible" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when ability to navigate back changes.\rfunction onGoBackPossible(isPossible) {\r print(\"Go back possible: \" + isPossible);\r}\r\rlocation.goBackPossible.connect(onGoBackPossible);" + ], + "memberof": "location", + "longname": "location.goBackPossible", + "scope": "static" + }, + { + "description": "Triggered when there's a change in whether or not there's a forward location that can be navigated to using\r{@link location.goForward|goForward}. (Reflects changes in the state of the \"Goto\" dialog's forward arrow.)", + "kind": "function", + "name": "goForwardPossible", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if there's a forward location to navigate to, otherwise\r false.", + "name": "isPossible" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when ability to navigate forward changes.\rfunction onGoForwardPossible(isPossible) {\r print(\"Go forward possible: \" + isPossible);\r}\r\rlocation.goForwardPossible.connect(onGoForwardPossible);\r\n " + ], + "memberof": "location", + "longname": "location.goForwardPossible", + "scope": "static" + }, + { + "kind": "function", + "name": "isValidPath", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "input" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Assets", + "longname": "Assets.isValidPath", + "scope": "static" + }, + { + "kind": "function", + "name": "isValidFilePath", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "input" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Assets", + "longname": "Assets.isValidFilePath", + "scope": "static" + }, + { + "kind": "function", + "name": "getATPUrl", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "input" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Assets", + "longname": "Assets.getATPUrl", + "scope": "static" + }, + { + "kind": "function", + "name": "extractAssetHash", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "input" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Assets", + "longname": "Assets.extractAssetHash", + "scope": "static" + }, + { + "kind": "function", + "name": "isValidHash", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "input" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Assets", + "longname": "Assets.isValidHash", + "scope": "static" + }, + { + "kind": "function", + "name": "hashData", + "params": [ + { + "name": "data" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "Assets", + "longname": "Assets.hashData", + "scope": "static" + }, + { + "kind": "function", + "name": "hashDataHex", + "params": [ + { + "name": "data" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Assets", + "longname": "Assets.hashDataHex", + "scope": "static" + }, + { + "description": "

The reasons that you may be refused connection to a domain are defined by numeric values:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ReasonValueDescription
Unknown0Some unknown reason.
ProtocolMismatch1The communications protocols of the domain and your Interface are not the same.
LoginError2You could not be logged into the domain.
NotAuthorized3You are not authorized to connect to the domain.
TooManyUsers4The domain already has its maximum number of users.
TimedOut5Connecting to the domain timed out.
", + "kind": "typedef", + "name": "ConnectionRefusedReason", + "type": { + "names": [ + "number" + ] + }, + "memberof": "Window", + "longname": "Window.ConnectionRefusedReason", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Messages API enables text and data to be sent between scripts over named \"channels\". A channel can have an arbitrary \rname to help separate messaging between different sets of scripts.

\r\r

Note: If you want to call a function in another script, you should use one of the following rather than \rsending a message:

\r
    \r
  • {@link Entities.callEntityClientMethod}
  • \r
  • {@link Entities.callEntityMethod}
  • \r
  • {@link Entities.callEntityServerMethod}
  • \r
  • {@link Script.callEntityScriptMethod}
  • \r
", + "kind": "namespace", + "name": "Messages", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "longname": "Messages", + "scope": "global" + }, + { + "description": "Send a text message on a channel.", + "kind": "function", + "name": "sendMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The channel to send the message on.", + "name": "channel" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The message to send.", + "name": "message" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If false then the message is sent to all Interface, client entity, \r server entity, and assignment client scripts in the domain.
\r If true then: if sent from an Interface or client entity script it is received by all Interface and \r client entity scripts; if sent from a server entity script it is received by all entity server scripts; and if sent \r from an assignment client script it is received only by that same assignment client script.", + "name": "localOnly" + } + ], + "examples": [ + "Send and receive a message.\r// Receiving script.\rvar channelName = \"com.highfidelity.example.messages-example\";\r\rfunction onMessageReceived(channel, message, sender, localOnly) {\r print(\"Message received:\");\r print(\"- channel: \" + channel);\r print(\"- message: \" + message);\r print(\"- sender: \" + sender);\r print(\"- localOnly: \" + localOnly);\r}\r\rMessages.subscribe(channelName);\rMessages.messageReceived.connect(onMessageReceived);\r\rScript.scriptEnding.connect(function () {\r Messages.messageReceived.disconnect(onMessageReceived);\r Messages.unsubscribe(channelName);\r});\r\r\r// Sending script.\rvar channelName = \"com.highfidelity.example.messages-example\";\rvar message = \"Hello\";\rMessages.sendMessage(channelName, message);" + ], + "memberof": "Messages", + "longname": "Messages.sendMessage", + "scope": "static" + }, + { + "description": "Send a text message locally on a channel.\rThis is the same as calling {@link Messages.sendMessage|sendMessage} with localOnly set to \rtrue.", + "kind": "function", + "name": "sendLocalMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The channel to send the message on.", + "name": "channel" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The message to send.", + "name": "message" + } + ], + "memberof": "Messages", + "longname": "Messages.sendLocalMessage", + "scope": "static" + }, + { + "description": "Send a data message on a channel.", + "kind": "function", + "name": "sendData", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The channel to send the data on.", + "name": "channel" + }, + { + "type": { + "names": [ + "object" + ] + }, + "description": "The data to send. The data is handled as a byte stream, for example as may be provided via a \r JavaScript Int8Array object.", + "name": "data" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If false then the message is sent to all Interface, client entity,\r server entity, and assignment client scripts in the domain.
\r If true then: if sent from an Interface or client entity script it is received by all Interface and\r client entity scripts; if sent from a server entity script it is received by all entity server scripts; and if sent\r from an assignment client script it is received only by that same assignment client script.", + "name": "localOnly" + } + ], + "examples": [ + "Send and receive data.\r// Receiving script.\rvar channelName = \"com.highfidelity.example.messages-example\";\r\rfunction onDataReceived(channel, data, sender, localOnly) {\r var int8data = new Int8Array(data);\r var dataAsString = \"\";\r for (var i = 0; i < int8data.length; i++) {\r if (i > 0) {\r dataAsString += \", \";\r }\r dataAsString += int8data[i];\r }\r print(\"Data received:\");\r print(\"- channel: \" + channel);\r print(\"- data: \" + dataAsString);\r print(\"- sender: \" + sender);\r print(\"- localOnly: \" + localOnly);\r}\r\rMessages.subscribe(channelName);\rMessages.dataReceived.connect(onDataReceived);\r\rScript.scriptEnding.connect(function () {\r Messages.dataReceived.disconnect(onDataReceived);\r Messages.unsubscribe(channelName);\r});\r\r\r// Sending script.\rvar channelName = \"com.highfidelity.example.messages-example\";\rvar int8data = new Int8Array([1, 1, 2, 3, 5, 8, 13]);\rMessages.sendData(channelName, int8data.buffer);" + ], + "memberof": "Messages", + "longname": "Messages.sendData", + "scope": "static" + }, + { + "description": "Subscribe the scripting environment — Interface, the entity script server, or assignment client instance — \rto receive messages on a specific channel. Note that, for example, if there are two Interface scripts that subscribe to \rdifferent channels, both scripts will receive messages on both channels.", + "kind": "function", + "name": "subscribe", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The channel to subscribe to.", + "name": "channel" + } + ], + "memberof": "Messages", + "longname": "Messages.subscribe", + "scope": "static" + }, + { + "description": "Unsubscribe the scripting environment from receiving messages on a specific channel.", + "kind": "function", + "name": "unsubscribe", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The channel to unsubscribe from.", + "name": "channel" + } + ], + "memberof": "Messages", + "longname": "Messages.unsubscribe", + "scope": "static" + }, + { + "description": "Triggered when the a text message is received.", + "kind": "function", + "name": "messageReceived", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The channel that the message was sent on. You can use this to filter out messages not relevant \r to your script.", + "name": "channel" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The message received.", + "name": "message" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the sender: the user's session UUID if sent by an Interface or client entity \r script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client \r instance if sent by an assignment client script.", + "name": "senderID" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the message was sent with localOnly = true.", + "name": "localOnly" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Messages", + "longname": "Messages.messageReceived", + "scope": "static" + }, + { + "description": "Triggered when a data message is received.", + "kind": "function", + "name": "dataReceived", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The channel that the message was sent on. You can use this to filter out messages not relevant\r to your script.", + "name": "channel" + }, + { + "type": { + "names": [ + "object" + ] + }, + "description": "The data received. The data is handled as a byte stream, for example as may be used by a \r JavaScript Int8Array object.", + "name": "data" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID of the sender: the user's session UUID if sent by an Interface or client entity\r script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client\r script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client\r instance if sent by an assignment client script.", + "name": "senderID" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the message was sent with localOnly = true.", + "name": "localOnly" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Messages", + "longname": "Messages.dataReceived", + "scope": "static" + }, + { + "kind": "class", + "name": "ResourceObject", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of this resource.", + "name": "url" + }, + { + "type": { + "names": [ + "Resource.State" + ] + }, + "description": "Current loading state.", + "name": "state" + } + ], + "longname": "ResourceObject", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

" + }, + { + "kind": "typedef", + "name": "State", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The resource is queued up, waiting to be loaded.", + "name": "QUEUED" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The resource is downloading.", + "name": "LOADING" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The resource has finished downloaded by is not complete.", + "name": "LOADED" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The resource has completely finished loading and is ready.", + "name": "FINISHED" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Downloading the resource has failed.", + "name": "FAILED" + } + ], + "memberof": "Resource", + "longname": "Resource.State", + "scope": "static" + }, + { + "description": "Release this resource.", + "kind": "function", + "name": "release", + "memberof": "ResourceObject", + "longname": "ResourceObject#release", + "scope": "instance" + }, + { + "description": "Triggered when download progress for this resource has changed.", + "kind": "function", + "name": "progressChanged", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Byytes downloaded so far.", + "name": "bytesReceived" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Total number of bytes in the resource.", + "name": "bytesTotal" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ResourceObject", + "longname": "ResourceObject#progressChanged", + "scope": "instance" + }, + { + "description": "Triggered when resource loading state has changed.", + "kind": "function", + "name": "stateChanged", + "params": [ + { + "type": { + "names": [ + "Resource.State" + ] + }, + "description": "New state.", + "name": "state" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ResourceObject", + "longname": "ResourceObject#stateChanged", + "scope": "instance" + }, + { + "description": "Get the list of all resource URLs.", + "kind": "function", + "name": "getResourceList", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "ResourceCache", + "longname": "ResourceCache.getResourceList", + "scope": "static" + }, + { + "kind": "function", + "name": "updateTotalSize", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "deltaSize" + } + ], + "memberof": "ResourceCache", + "longname": "ResourceCache.updateTotalSize", + "scope": "static" + }, + { + "description": "Prefetches a resource.", + "kind": "function", + "name": "prefetch", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of the resource to prefetch.", + "name": "url" + }, + { + "type": { + "names": [ + "object" + ] + }, + "optional": true, + "defaultvalue": null, + "name": "extra" + } + ], + "returns": [ + { + "type": { + "names": [ + "ResourceObject" + ] + } + } + ], + "memberof": "ResourceCache", + "longname": "ResourceCache.prefetch", + "scope": "static" + }, + { + "kind": "function", + "name": "dirty", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ResourceCache", + "longname": "ResourceCache.dirty", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Resources", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "longname": "Resources", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

" + }, + { + "kind": "function", + "name": "overrideUrlPrefix", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "prefix" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "replacement" + } + ], + "memberof": "Resources", + "longname": "Resources.overrideUrlPrefix", + "scope": "static" + }, + { + "kind": "function", + "name": "restoreUrlPrefix", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "prefix" + } + ], + "memberof": "Resources", + "longname": "Resources.restoreUrlPrefix", + "scope": "static" + }, + { + "description": "Set the maximum number of entity packets that the client can send per second.", + "kind": "function", + "name": "setPacketsPerSecond", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer maximum number of entity packets that the client can send per second.", + "name": "packetsPerSecond" + } + ], + "memberof": "Entities", + "longname": "Entities.setPacketsPerSecond", + "scope": "static" + }, + { + "description": "Get the maximum number of entity packets that the client can send per second.", + "kind": "function", + "name": "getPacketsPerSecond", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer maximum number of entity packets that the client can send per second." + } + ], + "memberof": "Entities", + "longname": "Entities.getPacketsPerSecond", + "scope": "static" + }, + { + "description": "Check whether servers exist for the client to send entity packets to, i.e., whether you are connected to a domain and \rits entity server is working.", + "kind": "function", + "name": "serversExist", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if servers exist for the client to send entity packets to, otherwise \r false." + } + ], + "memberof": "Entities", + "longname": "Entities.serversExist", + "scope": "static" + }, + { + "description": "Check whether the client has entity packets waiting to be sent.", + "kind": "function", + "name": "hasPacketsToSend", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the client has entity packets waiting to be sent, otherwise false." + } + ], + "memberof": "Entities", + "longname": "Entities.hasPacketsToSend", + "scope": "static" + }, + { + "description": "Get the number of entity packets the client has waiting to be sent.", + "kind": "function", + "name": "packetsToSendCount", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer number of entity packets the client has waiting to be sent." + } + ], + "memberof": "Entities", + "longname": "Entities.packetsToSendCount", + "scope": "static" + }, + { + "description": "Get the entity packets per second send rate of the client over its lifetime.", + "kind": "function", + "name": "getLifetimePPS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Entity packets per second send rate of the client over its lifetime." + } + ], + "memberof": "Entities", + "longname": "Entities.getLifetimePPS", + "scope": "static" + }, + { + "description": "Get the entity bytes per second send rate of the client over its lifetime.", + "kind": "function", + "name": "getLifetimeBPS", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Entity bytes per second send rate of the client over its lifetime." + } + ], + "memberof": "Entities", + "longname": "Entities.getLifetimeBPS", + "scope": "static" + }, + { + "description": "Get the entity packets per second queued rate of the client over its lifetime.", + "kind": "function", + "name": "getLifetimePPSQueued", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Entity packets per second queued rate of the client over its lifetime." + } + ], + "memberof": "Entities", + "longname": "Entities.getLifetimePPSQueued", + "scope": "static" + }, + { + "description": "Get the entity bytes per second queued rate of the client over its lifetime.", + "kind": "function", + "name": "getLifetimeBPSQueued", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Entity bytes per second queued rate of the client over its lifetime." + } + ], + "memberof": "Entities", + "longname": "Entities.getLifetimeBPSQueued", + "scope": "static" + }, + { + "description": "Get the lifetime of the client from the first entity packet sent until now, in microseconds.", + "kind": "function", + "name": "getLifetimeInUsecs", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Lifetime of the client from the first entity packet sent until now, in microseconds." + } + ], + "memberof": "Entities", + "longname": "Entities.getLifetimeInUsecs", + "scope": "static" + }, + { + "description": "Get the lifetime of the client from the first entity packet sent until now, in seconds.", + "kind": "function", + "name": "getLifetimeInSeconds", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Lifetime of the client from the first entity packet sent until now, in seconds." + } + ], + "memberof": "Entities", + "longname": "Entities.getLifetimeInSeconds", + "scope": "static" + }, + { + "description": "Get the total number of entity packets sent by the client over its lifetime.", + "kind": "function", + "name": "getLifetimePacketsSent", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The total number of entity packets sent by the client over its lifetime." + } + ], + "memberof": "Entities", + "longname": "Entities.getLifetimePacketsSent", + "scope": "static" + }, + { + "description": "Get the total bytes of entity packets sent by the client over its lifetime.", + "kind": "function", + "name": "getLifetimeBytesSent", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The total bytes of entity packets sent by the client over its lifetime." + } + ], + "memberof": "Entities", + "longname": "Entities.getLifetimeBytesSent", + "scope": "static" + }, + { + "description": "Get the total number of entity packets queued by the client over its lifetime.", + "kind": "function", + "name": "getLifetimePacketsQueued", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The total number of entity packets queued by the client over its lifetime." + } + ], + "memberof": "Entities", + "longname": "Entities.getLifetimePacketsQueued", + "scope": "static" + }, + { + "description": "Get the total bytes of entity packets queued by the client over its lifetime.", + "kind": "function", + "name": "getLifetimeBytesQueued", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The total bytes of entity packets queued by the client over its lifetime." + } + ], + "memberof": "Entities", + "longname": "Entities.getLifetimeBytesQueued", + "scope": "static" + }, + { + "description": "The \"offset\" {@link Entities.ActionType|ActionType} moves an entity so that it is a set distance away from a \rtarget point.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.", + "kind": "typedef", + "name": "ActionArguments-Offset", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The target point to offset the entity from.", + "name": "pointToOffsetFrom" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The distance away from the target point to position the entity.", + "name": "linearDistance" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "34e+38", + "description": "Controls how long it takes for the entity's position to catch up with the\r target offset. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action \r is applied using an exponential decay.", + "name": "linearTimeScale" + } + ], + "memberof": "Entities", + "longname": "Entities.ActionArguments-Offset", + "scope": "static" + }, + { + "description": "The \"tractor\" {@link Entities.ActionType|ActionType} moves and rotates an entity to a target position and \rorientation, optionally relative to another entity.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.", + "kind": "typedef", + "name": "ActionArguments-Tractor", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The target position.", + "name": "targetPosition" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "defaultvalue": "0,0,0,1", + "description": "The target rotation.", + "name": "targetRotation" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "If an entity ID, the targetPosition and targetRotation are \r relative to this entity's position and rotation.", + "name": "otherID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 3.4e+38, + "description": "Controls how long it takes for the entity's position to catch up with the\r target position. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action \r is applied using an exponential decay.", + "name": "linearTimeScale" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 3.4e+38, + "description": "Controls how long it takes for the entity's orientation to catch up with the\r target orientation. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the \r action is applied using an exponential decay.", + "name": "angularTimeScale" + } + ], + "memberof": "Entities", + "longname": "Entities.ActionArguments-Tractor", + "scope": "static" + }, + { + "description": "The \"travel-oriented\" {@link Entities.ActionType|ActionType} orients an entity to align with its direction of \rtravel.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.", + "kind": "typedef", + "name": "ActionArguments-TravelOriented", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The axis of the entity to align with the entity's direction of travel.", + "name": "forward" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0.1, + "description": "Controls how long it takes for the entity's orientation to catch up with the \r direction of travel. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the \r action is applied using an exponential decay.", + "name": "angularTimeScale" + } + ], + "memberof": "Entities", + "longname": "Entities.ActionArguments-TravelOriented", + "scope": "static" + }, + { + "description": "The \"ball-socket\" {@link Entities.ActionType|ActionType} connects two entities with a ball and socket joint. \rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.", + "kind": "typedef", + "name": "ActionArguments-BallSocket", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The local offset of the joint relative to the entity's position.", + "name": "pivot" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The ID of the other entity that is connected to the joint.", + "name": "otherEntityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The local offset of the joint relative to the other entity's position.", + "name": "otherPivot" + } + ], + "memberof": "Entities", + "longname": "Entities.ActionArguments-BallSocket", + "scope": "static" + }, + { + "description": "The \"cone-twist\" {@link Entities.ActionType|ActionType} connects two entities with a joint that can move \rthrough a cone and can twist.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.", + "kind": "typedef", + "name": "ActionArguments-ConeTwist", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The local offset of the joint relative to the entity's position.", + "name": "pivot" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "1,0,0", + "description": "The axis of the entity that moves through the cone. Must be a non-zero vector.", + "name": "axis" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The ID of the other entity that is connected to the joint.", + "name": "otherEntityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The local offset of the joint relative to the other entity's position.", + "name": "otherPivot" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "1,0,0", + "description": "The axis of the other entity that moves through the cone. Must be a non-zero vector.", + "name": "otherAxis" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 6.238, + "description": "The angle through which the joint can move in one axis of the cone, in radians.", + "name": "swingSpan1" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 6.238, + "description": "The angle through which the joint can move in the other axis of the cone, in radians.", + "name": "swingSpan2" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 6.238, + "description": "The angle through with the joint can twist, in radians.", + "name": "twistSpan" + } + ], + "memberof": "Entities", + "longname": "Entities.ActionArguments-ConeTwist", + "scope": "static" + }, + { + "description": "The \"hinge\" {@link Entities.ActionType|ActionType} lets an entity pivot about an axis or connects two entities\rwith a hinge joint.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.", + "kind": "typedef", + "name": "ActionArguments-Hinge", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The local offset of the joint relative to the entity's position.", + "name": "pivot" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "1,0,0", + "description": "The axis of the entity that it pivots about. Must be a non-zero vector.", + "name": "axis" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The ID of the other entity that is connected to the joint, if any. If none is \r specified then the first entity simply pivots about its specified axis.", + "name": "otherEntityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The local offset of the joint relative to the other entity's position.", + "name": "otherPivot" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "1,0,0", + "description": "The axis of the other entity that it pivots about. Must be a non-zero vector.", + "name": "otherAxis" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": -6.283, + "description": "The most negative angle that the hinge can take, in radians.", + "name": "low" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 6.283, + "description": "The most positive angle that the hinge can take, in radians.", + "name": "high" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The current angle of the hinge. Read-only.", + "name": "angle" + } + ], + "memberof": "Entities", + "longname": "Entities.ActionArguments-Hinge", + "scope": "static" + }, + { + "description": "The \"slider\" {@link Entities.ActionType|ActionType} lets an entity slide and rotate along an axis, or connects \rtwo entities that slide and rotate along a shared axis.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}.", + "kind": "typedef", + "name": "ActionArguments-Slider", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The local position of a point in the entity that slides along the axis.", + "name": "point" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "1,0,0", + "description": "The axis of the entity that slides along the joint. Must be a non-zero vector.", + "name": "axis" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "defaultvalue": null, + "description": "The ID of the other entity that is connected to the joint, if any. If non is \r specified then the first entity simply slides and rotates about its specified axis.", + "name": "otherEntityID" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "0,0,0", + "description": "The local position of a point in the other entity that slides along the axis.", + "name": "otherPoint" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "defaultvalue": "1,0,0", + "description": "The axis of the other entity that slides along the joint. Must be a non-zero vector.", + "name": "axis" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 1.17e-38, + "description": "The most negative linear offset from the entity's initial point that the entity can \r have along the slider.", + "name": "linearLow" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": "3.40e+38", + "description": "The most positive linear offset from the entity's initial point that the entity can \r have along the slider.", + "name": "linearHigh" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": -6.283, + "description": "The most negative angle that the entity can rotate about the axis if the action \r involves only one entity, otherwise the most negative angle the rotation can be between the two entities. In radians.", + "name": "angularLow" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 6.283, + "description": "The most positive angle that the entity can rotate about the axis if the action \r involves only one entity, otherwise the most positive angle the rotation can be between the two entities. In radians.", + "name": "angularHigh" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The current linear offset the entity is from its initial point if the action involves \r only one entity, otherwise the linear offset between the two entities' action points. Read-only.", + "name": "linearPosition" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "The current angular offset of the entity from its initial rotation if the action \r involves only one entity, otherwise the angular offset between the two entities. Read-only.", + "name": "angularPosition" + } + ], + "memberof": "Entities", + "longname": "Entities.ActionArguments-Slider", + "scope": "static" + }, + { + "description": "Different entity action types have different arguments: some common to all actions (listed below) and some specific to each \r{@link Entities.ActionType|ActionType} (linked to below). The arguments are accessed as an object of property names and \rvalues.", + "kind": "typedef", + "name": "ActionArguments", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Entities.ActionType" + ] + }, + "description": "The type of action.", + "name": "type" + }, + { + "type": { + "names": [ + "string" + ] + }, + "defaultvalue": "\"\"", + "description": "A string that a script can use for its own purposes.", + "name": "tag" + }, + { + "type": { + "names": [ + "number" + ] + }, + "defaultvalue": 0, + "description": "How long the action should exist, in seconds, before it is automatically deleted. A value of \r 0 means that the action should not be deleted.", + "name": "ttl" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "defaultvalue": true, + "description": "Is true if you created the action during your current Interface session, \r false otherwise. Read-only.", + "name": "isMine" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Is present when the entity hasn't been registered with the physics engine yet (e.g., \r if the action hasn't been properly configured), otherwise undefined. Read-only.", + "name": "::no-motion-state" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Is true when the action is modifying the entity's motion, false \r otherwise. Is present once the entity has been registered with the physics engine, otherwise undefined. \r Read-only.", + "name": "::active" + }, + { + "type": { + "names": [ + "Entities.PhysicsMotionType" + ] + }, + "description": "How the entity moves with the action. Is present once the entity has \r been registered with the physics engine, otherwise undefined. Read-only.", + "name": "::motion-type" + } + ], + "see": [ + "The different action types have additional arguments as follows:", + "{@link Entities.ActionArguments-FarGrab|ActionArguments-FarGrab}", + "{@link Entities.ActionArguments-Hold|ActionArguments-Hold}", + "{@link Entities.ActionArguments-Offset|ActionArguments-Offset}", + "{@link Entities.ActionArguments-Tractor|ActionArguments-Tractor}", + "{@link Entities.ActionArguments-TravelOriented|ActionArguments-TravelOriented}", + "{@link Entities.ActionArguments-Hinge|ActionArguments-Hinge}", + "{@link Entities.ActionArguments-Slider|ActionArguments-Slider}", + "{@link Entities.ActionArguments-ConeTwist|ActionArguments-ConeTwist}", + "{@link Entities.ActionArguments-BallSocket|ActionArguments-BallSocket}" + ], + "memberof": "Entities", + "longname": "Entities.ActionArguments", + "scope": "static" + }, + { + "description": "

An entity's physics motion type may be one of the following:

\r\r \r \r \r \r \r \r \r \r
ValueDescription
\"static\"There is no motion because the entity is locked — its locked \r property is set to true.
\"kinematic\"Motion is applied without physical laws (e.g., damping) because the entity is \r not locked and has its dynamic property set to false.
\"dynamic\"Motion is applied according to physical laws (e.g., damping) because the entity \r is not locked and has its dynamic property set to true.
", + "kind": "typedef", + "name": "PhysicsMotionType", + "type": { + "names": [ + "string" + ] + }, + "memberof": "Entities", + "longname": "Entities.PhysicsMotionType", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Steam", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Read-only.", + "name": "running" + } + ], + "longname": "Steam", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "isRunning", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Steam", + "longname": "Steam.isRunning", + "scope": "static" + }, + { + "kind": "function", + "name": "openInviteOverlay", + "memberof": "Steam", + "longname": "Steam.openInviteOverlay", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

Enum for different types of Picks and Pointers.", + "kind": "namespace", + "name": "PickType", + "variation": "0", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Ray Picks intersect a ray with the nearest object in front of them, along a given direction.", + "name": "Ray" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Stylus Picks provide \"tapping\" functionality on/into flat surfaces.", + "name": "Stylus" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Parabola Picks intersect a parabola with the nearest object in front of them, with a given initial velocity and acceleration.", + "name": "Parabola" + } + ], + "longname": "PickType(0)", + "scope": "global" + }, + { + "description": "\r \r \r \r \r \r \r \r \r
ValueDescription
{@link PickType(0)|PickType.Ray}
{@link PickType(0)|PickType.Stylus}
{@link PickType(0)|PickType.Parabola}
", + "kind": "typedef", + "name": "PickType", + "type": { + "names": [ + "number" + ] + }, + "longname": "PickType", + "scope": "global" + }, + { + "kind": "typedef", + "name": "ResponseType", + "type": { + "names": [ + "string" + ] + }, + "description": "

Available responseType values for use with @{link Assets.getAsset} and @{link Assets.loadFromCache} configuration option.

\r\r \r \r \r \r \r \r \r \r
responseTypetypeof response value
\"text\"contents returned as utf-8 decoded String value
\"arraybuffer\"contents as a binary ArrayBuffer object
\"json\"contents as a parsed JSON object
", + "memberof": "Assets.GetOptions", + "longname": "Assets.GetOptions.ResponseType", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Assets API allows you to communicate with the Asset Browser.", + "kind": "namespace", + "name": "Assets", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "longname": "Assets", + "scope": "global" + }, + { + "description": "Upload content to the connected domain's asset server.", + "kind": "function", + "name": "uploadData", + "scope": "static", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "content to upload", + "name": "data" + }, + { + "type": { + "names": [ + "Assets~uploadDataCallback" + ] + }, + "description": "called when upload is complete", + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.uploadData" + }, + { + "description": "Called when uploadData is complete", + "kind": "typedef", + "name": "uploadDataCallback", + "type": { + "names": [ + "function" + ] + }, + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "hash" + } + ], + "memberof": "Assets", + "longname": "Assets~uploadDataCallback", + "scope": "inner" + }, + { + "description": "Download data from the connected domain's asset server.", + "kind": "function", + "name": "downloadData", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of asset to download, must be ATP scheme URL.", + "name": "url" + }, + { + "type": { + "names": [ + "Assets~downloadDataCallback" + ] + }, + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.downloadData", + "scope": "static" + }, + { + "description": "Called when downloadData is complete", + "kind": "typedef", + "name": "downloadDataCallback", + "type": { + "names": [ + "function" + ] + }, + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "content that was downloaded", + "name": "data" + } + ], + "memberof": "Assets", + "longname": "Assets~downloadDataCallback", + "scope": "inner" + }, + { + "description": "Sets up a path to hash mapping within the connected domain's asset server", + "kind": "function", + "name": "setMapping", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "path" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "hash" + }, + { + "type": { + "names": [ + "Assets~setMappingCallback" + ] + }, + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.setMapping", + "scope": "static" + }, + { + "description": "Called when setMapping is complete", + "kind": "typedef", + "name": "setMappingCallback", + "type": { + "names": [ + "function" + ] + }, + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "error" + } + ], + "memberof": "Assets", + "longname": "Assets~setMappingCallback", + "scope": "inner" + }, + { + "description": "Look up a path to hash mapping within the connected domain's asset server", + "kind": "function", + "name": "getMapping", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "path" + }, + { + "type": { + "names": [ + "Assets~getMappingCallback" + ] + }, + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.getMapping", + "scope": "static" + }, + { + "description": "Called when getMapping is complete.", + "kind": "typedef", + "name": "getMappingCallback", + "type": { + "names": [ + "function" + ] + }, + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "hash value if found, else an empty string", + "name": "assetID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "error description if the path could not be resolved; otherwise a null value.", + "name": "error" + } + ], + "memberof": "Assets", + "longname": "Assets~getMappingCallback", + "scope": "inner" + }, + { + "kind": "function", + "name": "setBakingEnabled", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "path" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + }, + { + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.setBakingEnabled", + "scope": "static" + }, + { + "description": "Called when setBakingEnabled is complete.", + "kind": "typedef", + "name": "setBakingEnabledCallback", + "type": { + "names": [ + "function" + ] + }, + "memberof": "Assets", + "longname": "Assets~setBakingEnabledCallback", + "scope": "inner" + }, + { + "description": "Request Asset data from the ATP Server", + "kind": "function", + "name": "getAsset", + "params": [ + { + "type": { + "names": [ + "URL", + "Assets.GetOptions" + ] + }, + "description": "An atp: style URL, hash, or relative mapped path; or an {@link Assets.GetOptions} object with request parameters", + "name": "options" + }, + { + "type": { + "names": [ + "Assets~getAssetCallback" + ] + }, + "description": "A scope callback function to receive (error, results) values", + "name": "scope" + }, + { + "type": { + "names": [ + "function" + ] + }, + "optional": true, + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.getAsset", + "scope": "static" + }, + { + "description": "A set of properties that can be passed to {@link Assets.getAsset}.", + "kind": "typedef", + "name": "GetOptions", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "an \"atp:\" style URL, hash, or relative mapped path to fetch", + "name": "url" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "text", + "description": "the desired reponse type (text | arraybuffer | json)", + "name": "responseType" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "whether to attempt gunzip decompression on the fetched data\r See: {@link Assets.putAsset} and its .compress=true option", + "name": "decompress" + } + ], + "memberof": "Assets", + "longname": "Assets.GetOptions", + "scope": "static" + }, + { + "description": "Called when Assets.getAsset is complete.", + "kind": "typedef", + "name": "getAssetCallback", + "type": { + "names": [ + "function" + ] + }, + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "contains error message or null value if no error occured fetching the asset", + "name": "error" + }, + { + "type": { + "names": [ + "Asset~getAssetResult" + ] + }, + "description": "result object containing, on success containing asset metadata and contents", + "name": "result" + } + ], + "memberof": "Assets", + "longname": "Assets~getAssetCallback", + "scope": "inner" + }, + { + "description": "Result value returned by {@link Assets.getAsset}.", + "kind": "typedef", + "name": "getAssetResult", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "the resolved \"atp:\" style URL for the fetched asset", + "name": "url" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "the resolved hash for the fetched asset", + "name": "hash" + }, + { + "type": { + "names": [ + "string", + "ArrayBuffer", + "Object" + ] + }, + "optional": true, + "description": "response data (possibly converted per .responseType value)", + "name": "response" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "response type (text | arraybuffer | json)", + "name": "responseType" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "detected asset mime-type (autodetected)", + "name": "contentType" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "description": "response data size in bytes", + "name": "byteLength" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "description": "flag indicating whether data was decompressed", + "name": "decompressed" + } + ], + "memberof": "Assets", + "longname": "Assets~getAssetResult", + "scope": "inner" + }, + { + "description": "Upload Asset data to the ATP Server", + "kind": "function", + "name": "putAsset", + "params": [ + { + "type": { + "names": [ + "Assets.PutOptions" + ] + }, + "description": "A PutOptions object with upload parameters", + "name": "options" + }, + { + "type": { + "names": [ + "Assets~putAssetCallback" + ] + }, + "description": "A scoped callback function invoked with (error, results)", + "name": "scope[callback" + }, + { + "type": { + "names": [ + "function" + ] + }, + "optional": true, + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.putAsset", + "scope": "static" + }, + { + "description": "A set of properties that can be passed to {@link Assets.putAsset}.", + "kind": "typedef", + "name": "PutOptions", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "ArrayBuffer", + "string" + ] + }, + "optional": true, + "description": "byte buffer or string value representing the new asset's content", + "name": "data" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": null, + "description": "ATP path mapping to automatically create (upon successful upload to hash)", + "name": "path" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "whether to gzip compress data before uploading", + "name": "compress" + } + ], + "memberof": "Assets", + "longname": "Assets.PutOptions", + "scope": "static" + }, + { + "description": "Called when Assets.putAsset is complete.", + "kind": "typedef", + "name": "puttAssetCallback", + "type": { + "names": [ + "function" + ] + }, + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "contains error message (or null value if no error occured while uploading/mapping the new asset)", + "name": "error" + }, + { + "type": { + "names": [ + "Asset~putAssetResult" + ] + }, + "description": "result object containing error or result status of asset upload", + "name": "result" + } + ], + "memberof": "Assets", + "longname": "Assets~puttAssetCallback", + "scope": "inner" + }, + { + "description": "Result value returned by {@link Assets.putAsset}.", + "kind": "typedef", + "name": "putAssetResult", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "the resolved \"atp:\" style URL for the uploaded asset (based on .path if specified, otherwise on the resulting ATP hash)", + "name": "url" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "the uploaded asset's resulting ATP path (or undefined if no path mapping was assigned)", + "name": "path" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "the uploaded asset's resulting ATP hash", + "name": "hash" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "description": "flag indicating whether the data was compressed before upload", + "name": "compressed" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "description": "flag indicating final byte size of the data uploaded to the ATP server", + "name": "byteLength" + } + ], + "memberof": "Assets", + "longname": "Assets~putAssetResult", + "scope": "inner" + }, + { + "kind": "function", + "name": "deleteAsset", + "params": [ + { + "name": "options" + }, + { + "name": "scope" + }, + { + "optional": true, + "defaultvalue": "\"\"", + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.deleteAsset", + "scope": "static" + }, + { + "kind": "function", + "name": "resolveAsset", + "params": [ + { + "name": "options" + }, + { + "name": "scope" + }, + { + "optional": true, + "defaultvalue": "\"\"", + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.resolveAsset", + "scope": "static" + }, + { + "kind": "function", + "name": "decompressData", + "params": [ + { + "name": "options" + }, + { + "name": "scope" + }, + { + "optional": true, + "defaultvalue": "\"\"", + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.decompressData", + "scope": "static" + }, + { + "kind": "function", + "name": "compressData", + "params": [ + { + "name": "options" + }, + { + "name": "scope" + }, + { + "optional": true, + "defaultvalue": "\"\"", + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.compressData", + "scope": "static" + }, + { + "kind": "function", + "name": "initializeCache", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Assets", + "longname": "Assets.initializeCache", + "scope": "static" + }, + { + "kind": "function", + "name": "canWriteCacheValue", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Assets", + "longname": "Assets.canWriteCacheValue", + "scope": "static" + }, + { + "kind": "function", + "name": "getCacheStatus", + "params": [ + { + "name": "scope" + }, + { + "optional": true, + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.getCacheStatus", + "scope": "static" + }, + { + "kind": "function", + "name": "queryCacheMeta", + "params": [ + { + "name": "options" + }, + { + "name": "scope" + }, + { + "optional": true, + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.queryCacheMeta", + "scope": "static" + }, + { + "kind": "function", + "name": "loadFromCache", + "params": [ + { + "name": "options" + }, + { + "name": "scope" + }, + { + "optional": true, + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.loadFromCache", + "scope": "static" + }, + { + "kind": "function", + "name": "saveToCache", + "params": [ + { + "name": "options" + }, + { + "name": "scope" + }, + { + "optional": true, + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.saveToCache", + "scope": "static" + }, + { + "kind": "function", + "name": "saveToCache", + "params": [ + { + "name": "url" + }, + { + "name": "data" + }, + { + "name": "metadata" + }, + { + "name": "scope" + }, + { + "optional": true, + "name": "callback" + } + ], + "memberof": "Assets", + "longname": "Assets.saveToCache", + "scope": "static" + }, + { + "description": "Starts playing — \"injecting\" — the content of an audio file. The sound is played globally (sent to the audio \rmixer) so that everyone hears it, unless the injectorOptions has localOnly set to \rtrue in which case only the client hears the sound played. No sound is played if sent to the audio mixer \rbut the client is not connected to an audio mixer. The {@link AudioInjector} object returned by the function can be used \rto control the playback and get information about its current state.", + "kind": "function", + "name": "playSound", + "params": [ + { + "type": { + "names": [ + "SoundObject" + ] + }, + "description": "The content of an audio file, loaded using {@link SoundCache.getSound}. See \r{@link SoundObject} for supported formats.", + "name": "sound" + }, + { + "type": { + "names": [ + "AudioInjector.AudioInjectorOptions" + ] + }, + "optional": true, + "defaultvalue": "{}", + "description": "Audio injector configuration.", + "name": "injectorOptions" + } + ], + "returns": [ + { + "type": { + "names": [ + "AudioInjector" + ] + }, + "description": "The audio injector that plays the audio file." + } + ], + "examples": [ + "Play a sound.\rvar sound = SoundCache.getSound(Script.resourcesPath() + \"sounds/sample.wav\");\rvar injector;\rvar injectorOptions = {\r position: MyAvatar.position\r};\r\rScript.setTimeout(function () { // Give the sound time to load.\r injector = Audio.playSound(sound, injectorOptions);\r}, 1000);" + ], + "memberof": "Audio", + "longname": "Audio.playSound", + "scope": "static" + }, + { + "description": "Start playing the content of an audio file, locally (isn't sent to the audio mixer). This is the same as calling \r{@link Audio.playSound} with {@link AudioInjector.AudioInjectorOptions} localOnly set true and \rthe specified position.", + "kind": "function", + "name": "playSystemSound", + "params": [ + { + "type": { + "names": [ + "SoundObject" + ] + }, + "description": "The content of an audio file, loaded using {@link SoundCache.getSound}. See \r{@link SoundObject} for supported formats.", + "name": "sound" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position in the domain to play the sound.", + "name": "position" + } + ], + "returns": [ + { + "type": { + "names": [ + "AudioInjector" + ] + }, + "description": "The audio injector that plays the audio file." + } + ], + "memberof": "Audio", + "longname": "Audio.playSystemSound", + "scope": "static" + }, + { + "description": "Set whether or not the audio input should be used in stereo. If the audio input does not support stereo then setting a \rvalue of true has no effect.", + "kind": "function", + "name": "setStereoInput", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the audio input should be used in stereo, otherwise false.", + "name": "stereo" + } + ], + "memberof": "Audio", + "longname": "Audio.setStereoInput", + "scope": "static" + }, + { + "description": "Get whether or not the audio input is used in stereo.", + "kind": "function", + "name": "isStereoInput", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the audio input is used in stereo, otherwise false." + } + ], + "memberof": "Audio", + "longname": "Audio.isStereoInput", + "scope": "static" + }, + { + "description": "Triggered when the client is muted by the mixer because their loudness value for the noise background has reached the \rthreshold set for the domain in the server settings.", + "kind": "function", + "name": "mutedByMixer", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.mutedByMixer", + "scope": "static" + }, + { + "description": "Triggered when the client is muted by the mixer because they're within a certain radius (50m) of someone who requested \rthe mute through Developer > Audio > Mute Environment.", + "kind": "function", + "name": "environmentMuted", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.environmentMuted", + "scope": "static" + }, + { + "description": "Triggered when the client receives its first packet from the audio mixer.", + "kind": "function", + "name": "receivedFirstPacket", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.receivedFirstPacket", + "scope": "static" + }, + { + "description": "Triggered when the client is disconnected from the audio mixer.", + "kind": "function", + "name": "disconnected", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.disconnected", + "scope": "static" + }, + { + "description": "Triggered when the noise gate is opened: the input audio signal is no longer blocked (fully attenuated) because it has \rrisen above an adaptive threshold set just above the noise floor. Only occurs if Audio.noiseReduction is \rtrue.", + "kind": "function", + "name": "noiseGateOpened", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.noiseGateOpened", + "scope": "static" + }, + { + "description": "Triggered when the noise gate is closed: the input audio signal is blocked (fully attenuated) because it has fallen \rbelow an adaptive threshold set just above the noise floor. Only occurs if Audio.noiseReduction is \rtrue.", + "kind": "function", + "name": "noiseGateClosed", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.noiseGateClosed", + "scope": "static" + }, + { + "description": "Triggered when a frame of audio input is processed.", + "kind": "function", + "name": "inputReceived", + "params": [ + { + "type": { + "names": [ + "Int16Array" + ] + }, + "description": "The audio input processed.", + "name": "inputSamples" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.inputReceived", + "scope": "static" + }, + { + "description": "Triggered when the input audio use changes between mono and stereo.", + "kind": "function", + "name": "isStereoInputChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the input audio is stereo, otherwise false.", + "name": "isStereo" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Audio", + "longname": "Audio.isStereoInputChanged", + "scope": "static" + }, + { + "kind": "namespace", + "name": "File", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "longname": "File", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

" + }, + { + "kind": "function", + "name": "convertUrlToPath", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "File", + "longname": "File.convertUrlToPath", + "scope": "static" + }, + { + "kind": "function", + "name": "runUnzip", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "path" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "autoAdd" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isZip" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isBlocks" + } + ], + "memberof": "File", + "longname": "File.runUnzip", + "scope": "static" + }, + { + "kind": "function", + "name": "getTempDir", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "File", + "longname": "File.getTempDir", + "scope": "static" + }, + { + "kind": "function", + "name": "unzipResult", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "zipFile" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "unzipFile" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "autoAdd" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isZip" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isBlocks" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "File", + "longname": "File.unzipResult", + "scope": "static" + }, + { + "description": "A keyboard key event.", + "kind": "typedef", + "name": "KeyEvent", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The Qt keyboard code of the key pressed. For a list of keyboard codes, see \r http://doc.qt.io/qt-5/qt.html#Key-enum.", + "name": "key" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "A string describing the key. For example, \"a\" for the \"A\" key if the Shift is not \r pressed, \"F1\" for the F1 key, \"SPACE\" for the space bar.", + "name": "text" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if a Shift key was pressed when the event was generated, otherwise \r false.", + "name": "isShifted" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if a meta key was pressed when the event was generated, otherwise\r false. On Windows the \"meta\" key is the Windows key; on OSX it is the Control (Splat) key.", + "name": "isMeta" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if a control key was pressed when the event was generated, otherwise\r false. On Windows the \"control\" key is the Ctrl key; on OSX it is the Command key.", + "name": "isControl" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if an Alt key was pressed when the event was generated, otherwise \r false.", + "name": "isAlt" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the key is on the numeric keypad, otherwise false.", + "name": "isKeypad" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the event is a repeat for key that is being held down, otherwise \r false.", + "name": "isAutoRepeat" + } + ], + "examples": [ + "Report the KeyEvent details for each key press.\rController.keyPressEvent.connect(function (event) {\r print(JSON.stringify(event));\r});\r\n " + ], + "longname": "KeyEvent", + "scope": "global" + }, + { + "kind": "namespace", + "name": "Mat4", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "longname": "Mat4", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

" + }, + { + "kind": "function", + "name": "multiply", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m1" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m2" + } + ], + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.multiply", + "scope": "static" + }, + { + "kind": "function", + "name": "createFromRotAndTrans", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "rot" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "trans" + } + ], + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.createFromRotAndTrans", + "scope": "static" + }, + { + "kind": "function", + "name": "createFromScaleRotAndTrans", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "scale" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "rot" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "trans" + } + ], + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.createFromScaleRotAndTrans", + "scope": "static" + }, + { + "kind": "function", + "name": "createFromColumns", + "params": [ + { + "type": { + "names": [ + "Vec4" + ] + }, + "name": "col0" + }, + { + "type": { + "names": [ + "Vec4" + ] + }, + "name": "col1" + }, + { + "type": { + "names": [ + "Vec4" + ] + }, + "name": "col2" + }, + { + "type": { + "names": [ + "Vec4" + ] + }, + "name": "col" + } + ], + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.createFromColumns", + "scope": "static" + }, + { + "kind": "function", + "name": "createFromArray", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "name": "numbers" + } + ], + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.createFromArray", + "scope": "static" + }, + { + "kind": "function", + "name": "extractTranslation", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.extractTranslation", + "scope": "static" + }, + { + "kind": "function", + "name": "extractRotation", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.extractRotation", + "scope": "static" + }, + { + "kind": "function", + "name": "extractScale", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.extractScale", + "scope": "static" + }, + { + "kind": "function", + "name": "transformPoint", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "point" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.transformPoint", + "scope": "static" + }, + { + "kind": "function", + "name": "transformVector", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "vector" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.transformVector", + "scope": "static" + }, + { + "kind": "function", + "name": "inverse", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + } + ], + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.inverse", + "scope": "static" + }, + { + "kind": "function", + "name": "getFront", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.getFront", + "scope": "static" + }, + { + "kind": "function", + "name": "getForward", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.getForward", + "scope": "static" + }, + { + "kind": "function", + "name": "getRight", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.getRight", + "scope": "static" + }, + { + "kind": "function", + "name": "getUp", + "params": [ + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "Mat4", + "longname": "Mat4.getUp", + "scope": "static" + }, + { + "kind": "function", + "name": "print", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "label" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "name": "m" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "transpose" + } + ], + "memberof": "Mat4", + "longname": "Mat4.print", + "scope": "static" + }, + { + "description": "A set of properties that can be passed to {@link Menu.addMenuItem} to create a new menu item.\r\rIf none of position, beforeItem, afterItem, or grouping are specified, \rthe menu item will be placed at the end of the menu.", + "kind": "typedef", + "name": "MenuItemProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu. Nested menus can be described using the \">\" symbol.", + "name": "menuName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of the menu item.", + "name": "menuItemName" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Whether or not the menu item is checkable.", + "name": "isCheckable" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Whether or not the menu item is checked.", + "name": "isChecked" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "Whether or not the menu item is a separator.", + "name": "isSeparator" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "A shortcut key that triggers the menu item.", + "name": "shortcutKey" + }, + { + "type": { + "names": [ + "KeyEvent" + ] + }, + "optional": true, + "description": "A {@link KeyEvent} that specifies a key that triggers the menu item.", + "name": "shortcutKeyEvent" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "description": "The position to place the new menu item. An integer number with 0 being the first\r menu item.", + "name": "position" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "The name of the menu item to place this menu item before.", + "name": "beforeItem" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "The name of the menu item to place this menu item after.", + "name": "afterItem" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "description": "The name of grouping to add this menu item to.", + "name": "grouping" + } + ], + "memberof": "Menu", + "longname": "Menu.MenuItemProperties", + "scope": "static" + }, + { + "description": "A controller mouse movement or button event.", + "kind": "typedef", + "name": "MouseEvent", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer x-coordinate of the event on the Interface window or HMD HUD.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer y-coordinate of the event on the Interface window or HMD HUD.", + "name": "y" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "\"LEFT\", \"MIDDLE\", or \"RIGHT\" if a button press or release \r caused the event, otherwise \"NONE\".", + "name": "button" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the left button was pressed when the event was generated, otherwise \r false.", + "name": "isLeftButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the middle button was pressed when the event was generated, \r otherwise false.", + "name": "isMiddleButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the right button was pressed when the event was generated, \r otherwise false.", + "name": "isRightButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the Shift key was pressed when the event was generated, otherwise\r false.", + "name": "isShifted" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the \"meta\" key was pressed when the event was generated, otherwise\r false. On Windows the \"meta\" key is the Windows key; on OSX it is the Control (Splat) key.", + "name": "isMeta" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the \"control\" key was pressed when the event was generated, otherwise\r false. On Windows the \"control\" key is the Ctrl key; on OSX it is the Command key.", + "name": "isControl" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the Alt key was pressed when the event was generated, otherwise\r false.", + "name": "isAlt" + } + ], + "examples": [ + "Report the MouseEvent details for each mouse move.\rController.mouseMoveEvent.connect(function (event) {\r print(JSON.stringify(event));\r});\r\n " + ], + "longname": "MouseEvent", + "scope": "global" + }, + { + "description": "A quaternion value. See also the {@link Quat(0)|Quat} object.", + "kind": "typedef", + "name": "Quat", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Imaginary component i.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Imaginary component j.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Imaginary component k.", + "name": "z" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Real component.", + "name": "w" + } + ], + "longname": "Quat", + "scope": "global" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Quat API provides facilities for generating and manipulating quaternions.\rQuaternions should be used in preference to Euler angles wherever possible because quaternions don't suffer from the problem\rof gimbal lock.", + "kind": "namespace", + "name": "Quat", + "variation": "0", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "{ x: 0, y: 0, z: 0, w: 1 } : The identity rotation, i.e., no rotation.\r Read-only.", + "name": "IDENTITY" + } + ], + "examples": [ + "Print the IDENTITY value.\rprint(JSON.stringify(Quat.IDENTITY)); // { x: 0, y: 0, z: 0, w: 1 }\rprint(JSON.stringify(Quat.safeEulerAngles(Quat.IDENTITY))); // { x: 0, y: 0, z: 0 }" + ], + "longname": "Quat(0)", + "scope": "global" + }, + { + "description": "Multiply two quaternions.", + "kind": "function", + "name": "multiply", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The first quaternion.", + "name": "q1" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The second quaternion.", + "name": "q2" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "q1 multiplied with q2." + } + ], + "examples": [ + "Calculate the orientation of your avatar's right hand in world coordinates.\rvar handController = Controller.Standard.RightHand;\rvar handPose = Controller.getPoseValue(handController);\rif (handPose.valid) {\r var handOrientation = Quat.multiply(MyAvatar.orientation, handPose.rotation);\r}" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).multiply", + "scope": "static" + }, + { + "description": "Normalizes a quaternion.", + "kind": "function", + "name": "normalize", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The quaternion to normalize.", + "name": "q" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "q normalized to have unit length." + } + ], + "examples": [ + "Normalize a repeated delta rotation so that maths rounding errors don't accumulate.\rvar deltaRotation = Quat.fromPitchYawRollDegrees(0, 0.1, 0);\rvar currentRotation = Quat.ZERO;\rwhile (Quat.safeEulerAngles(currentRotation).y < 180) {\r currentRotation = Quat.multiply(deltaRotation, currentRotation);\r currentRotation = Quat.normalize(currentRotation);\r // Use currentRotatation for something.\r}" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).normalize", + "scope": "static" + }, + { + "description": "Calculate the conjugate of a quaternion. For a unit quaternion, its conjugate is the same as its \r {@link Quat(0).inverse|Quat.inverse}.", + "kind": "function", + "name": "conjugate", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The quaternion to conjugate.", + "name": "q" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The conjugate of q." + } + ], + "examples": [ + "A unit quaternion multiplied by its conjugate is a zero rotation.\rvar quaternion = Quat.fromPitchYawRollDegrees(10, 20, 30);\rQuat.print(\"quaternion\", quaternion, true); // dvec3(10.000000, 20.000004, 30.000004)\rvar conjugate = Quat.conjugate(quaternion);\rQuat.print(\"conjugate\", conjugate, true); // dvec3(1.116056, -22.242186, -28.451778)\rvar identity = Quat.multiply(conjugate, quaternion);\rQuat.print(\"identity\", identity, true); // dvec3(0.000000, 0.000000, 0.000000)" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).conjugate", + "scope": "static" + }, + { + "description": "Calculate a camera orientation given eye position, point of interest, and \"up\" direction. The camera's negative z-axis is\rthe forward direction. The result has zero roll about its forward direction with respect to the given \"up\" direction.", + "kind": "function", + "name": "lookAt", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The eye position.", + "name": "eye" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point to look at.", + "name": "target" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The \"up\" direction.", + "name": "up" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion that orients the negative z-axis to point along the eye-to-target vector and the x-axis to\rbe the cross product of the eye-to-target and up vectors." + } + ], + "examples": [ + "Rotate your view in independent mode to look at the world origin upside down.\rCamera.mode = \"independent\";\rCamera.orientation = Quat.lookAt(Camera.position, Vec3.ZERO, Vec3.UNIT_NEG_Y);" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).lookAt", + "scope": "static" + }, + { + "description": "Calculate a camera orientation given eye position and point of interest. The camera's negative z-axis is the forward \rdirection. The result has zero roll about its forward direction.", + "kind": "function", + "name": "lookAtSimple", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The eye position.", + "name": "eye" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point to look at.", + "name": "target" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion that orients the negative z-axis to point along the eye-to-target vector and the x-axis to be\r the cross product of the eye-to-target and an \"up\" vector. The \"up\" vector is the y-axis unless the eye-to-target\r vector is nearly aligned with it (i.e., looking near vertically up or down), in which case the x-axis is used as the\r \"up\" vector." + } + ], + "examples": [ + "Rotate your view in independent mode to look at the world origin.\rCamera.mode = \"independent\";\rCamera.orientation = Quat.lookAtSimple(Camera.position, Vec3.ZERO);" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).lookAtSimple", + "scope": "static" + }, + { + "description": "Calculate the shortest rotation from a first vector onto a second.", + "kind": "function", + "name": "rotationBetween", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation from v1 onto v2." + } + ], + "examples": [ + "Apply a change in velocity to an entity and rotate it to face the direction it's travelling.\rvar newVelocity = Vec3.sum(entityVelocity, deltaVelocity);\rvar properties = { velocity: newVelocity };\rif (Vec3.length(newVelocity) > 0.001) {\r properties.rotation = Quat.rotationBetween(entityVelocity, newVelocity);\r}\rEntities.editEntity(entityID, properties);\rentityVelocity = newVelocity;" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).rotationBetween", + "scope": "static" + }, + { + "description": "Generate a quaternion from a {@link Vec3} of Euler angles in degrees.", + "kind": "function", + "name": "fromVec3Degrees", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "A vector of three Euler angles in degrees, the angles being the rotations about the x, y, and z\r axes.", + "name": "vector" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion created from the Euler angles in vector." + } + ], + "examples": [ + "Zero out pitch and roll from an orientation.\rvar eulerAngles = Quat.safeEulerAngles(orientation);\reulerAngles.x = 0;\reulerAngles.z = 0;\rvar newOrientation = Quat.fromVec3Degrees(eulerAngles);" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).fromVec3Degrees", + "scope": "static" + }, + { + "description": "Generate a quaternion from a {@link Vec3} of Euler angles in radians.", + "kind": "function", + "name": "fromVec3Radians", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "A vector of three Euler angles in radians, the angles being the rotations about the x, y, and z\r axes.", + "name": "vector" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion created using the Euler angles in vector." + } + ], + "examples": [ + "Create a rotation of 180 degrees about the y axis.\rvar rotation = Quat.fromVec3Radians({ x: 0, y: Math.PI, z: 0 });" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).fromVec3Radians", + "scope": "static" + }, + { + "description": "Generate a quaternion from pitch, yaw, and roll values in degrees.", + "kind": "function", + "name": "fromPitchYawRollDegrees", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The pitch angle in degrees.", + "name": "pitch" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The yaw angle in degrees.", + "name": "yaw" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The roll angle in degrees.", + "name": "roll" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion created using the pitch, yaw, and roll Euler angles." + } + ], + "examples": [ + "Create a rotation of 180 degrees about the y axis.\rvar rotation = Quat.fromPitchYawRollDgrees(0, 180, 0 );" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).fromPitchYawRollDegrees", + "scope": "static" + }, + { + "description": "Generate a quaternion from pitch, yaw, and roll values in radians.", + "kind": "function", + "name": "fromPitchYawRollRadians", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The pitch angle in radians.", + "name": "pitch" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The yaw angle in radians.", + "name": "yaw" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The roll angle in radians.", + "name": "roll" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion created from the pitch, yaw, and roll Euler angles." + } + ], + "examples": [ + "Create a rotation of 180 degrees about the y axis.\rvar rotation = Quat.fromPitchYawRollRadians(0, Math.PI, 0);" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).fromPitchYawRollRadians", + "scope": "static" + }, + { + "description": "Calculate the inverse of a quaternion. For a unit quaternion, its inverse is the same as its\r {@link Quat(0).conjugate|Quat.conjugate}.", + "kind": "function", + "name": "inverse", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The quaternion.", + "name": "q" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The inverse of q." + } + ], + "examples": [ + "A quaternion multiplied by its inverse is a zero rotation.\rvar quaternion = Quat.fromPitchYawRollDegrees(10, 20, 30);\rQuat.print(\"quaternion\", quaternion, true); // dvec3(10.000000, 20.000004, 30.000004)\rvar inverse = Quat.invserse(quaternion);\rQuat.print(\"inverse\", inverse, true); // dvec3(1.116056, -22.242186, -28.451778)\rvar identity = Quat.multiply(inverse, quaternion);\rQuat.print(\"identity\", identity, true); // dvec3(0.000000, 0.000000, 0.000000)" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).inverse", + "scope": "static" + }, + { + "description": "Get the \"front\" direction that the camera would face if its orientation was set to the quaternion value.\rThis is a synonym for {@link Quat(0).getForward|Quat.getForward}.\rThe High Fidelity camera has axes x = right, y = up, -z = forward.", + "kind": "function", + "name": "getFront", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion representing an orientation.", + "name": "orientation" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The negative z-axis rotated by orientation." + } + ], + "memberof": "Quat(0)", + "longname": "Quat(0).getFront", + "scope": "static" + }, + { + "description": "Get the \"forward\" direction that the camera would face if its orientation was set to the quaternion value.\rThis is a synonym for {@link Quat(0).getFront|Quat.getFront}.\rThe High Fidelity camera has axes x = right, y = up, -z = forward.", + "kind": "function", + "name": "getForward", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion representing an orientation.", + "name": "orientation" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The negative z-axis rotated by orientation." + } + ], + "examples": [ + "Demonstrate that the \"forward\" vector is for the negative z-axis.\rvar forward = Quat.getForward(Quat.IDENTITY);\rprint(JSON.stringify(forward)); // {\"x\":0,\"y\":0,\"z\":-1}" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).getForward", + "scope": "static" + }, + { + "description": "Get the \"right\" direction that the camera would have if its orientation was set to the quaternion value.\rThe High Fidelity camera has axes x = right, y = up, -z = forward.", + "kind": "function", + "name": "getRight", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion representing an orientation.", + "name": "orientation" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The x-axis rotated by orientation." + } + ], + "memberof": "Quat(0)", + "longname": "Quat(0).getRight", + "scope": "static" + }, + { + "description": "Get the \"up\" direction that the camera would have if its orientation was set to the quaternion value.\rThe High Fidelity camera has axes x = right, y = up, -z = forward.", + "kind": "function", + "name": "getUp", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion representing an orientation.", + "name": "orientation" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The y-axis rotated by orientation." + } + ], + "memberof": "Quat(0)", + "longname": "Quat(0).getUp", + "scope": "static" + }, + { + "description": "Calculate the Euler angles for the quaternion, in degrees. (The \"safe\" in the name signifies that the angle results will\rnot be garbage even when the rotation is particularly difficult to decompose with pitches around +/-90 degrees.)", + "kind": "function", + "name": "safeEulerAngles", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion representing an orientation.", + "name": "orientation" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "A {@link Vec3} of Euler angles for the orientation, in degrees, the angles being the \rrotations about the x, y, and z axes." + } + ], + "examples": [ + "Report the camera yaw.\rvar eulerAngles = Quat.safeEulerAngles(Camera.orientation);\rprint(\"Camera yaw: \" + eulerAngles.y);" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).safeEulerAngles", + "scope": "static" + }, + { + "description": "Generate a quaternion given an angle to rotate through and an axis to rotate about.", + "kind": "function", + "name": "angleAxis", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The angle to rotate through, in degrees.", + "name": "angle" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The unit axis to rotate about.", + "name": "axis" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion that is a rotation through angle degrees about the axis. \rWARNING: This value is in degrees whereas the value returned by {@link Quat(0).angle|Quat.angle} is\rin radians." + } + ], + "examples": [ + "Calculate a rotation of 90 degrees about the direction your camera is looking.\rvar rotation = Quat.angleAxis(90, Quat.getForward(Camera.orientation));" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).angleAxis", + "scope": "static" + }, + { + "description": "Get the rotation axis for a quaternion.", + "kind": "function", + "name": "axis", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The quaternion.", + "name": "q" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The normalized rotation axis for q." + } + ], + "examples": [ + "Get the rotation axis of a quaternion.\rvar forward = Quat.getForward(Camera.orientation);\rvar rotation = Quat.angleAxis(90, forward);\rvar axis = Quat.axis(rotation);\rprint(\"Forward: \" + JSON.stringify(forward));\rprint(\"Axis: \" + JSON.stringify(axis)); // Same value as forward." + ], + "memberof": "Quat(0)", + "longname": "Quat(0).axis", + "scope": "static" + }, + { + "description": "Get the rotation angle for a quaternion.", + "kind": "function", + "name": "angle", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The quaternion.", + "name": "q" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The rotation angle for q, in radians. WARNING: This value is in radians \rwhereas the value used by {@link Quat(0).angleAxis|Quat.angleAxis} is in degrees." + } + ], + "examples": [ + "Get the rotation angle of a quaternion.\rvar forward = Quat.getForward(Camera.orientation);\rvar rotation = Quat.angleAxis(90, forward);\rvar angle = Quat.angle(rotation);\rprint(\"Angle: \" + angle * 180 / Math.PI); // 90 degrees." + ], + "memberof": "Quat(0)", + "longname": "Quat(0).angle", + "scope": "static" + }, + { + "description": "Compute a spherical linear interpolation between two rotations, safely handling two rotations that are very similar.\rSee also, {@link Quat(0).slerp|Quat.slerp}.", + "kind": "function", + "name": "mix", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The beginning rotation.", + "name": "q1" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The ending rotation.", + "name": "q2" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The mixture coefficient between 0.0 and 1.0. Specifies the proportion\r of q2's value to return in favor of q1's value. A value of 0.0 returns \r q1's value; 1.0 returns q2s's value.", + "name": "alpha" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A spherical linear interpolation between rotations q1 and q2." + } + ], + "examples": [ + "Animate between one rotation and another.\rvar dt = amountOfTimeThatHasPassed;\rvar mixFactor = amountOfTimeThatHasPassed / TIME_TO_COMPLETE;\rif (mixFactor > 1) {\r mixFactor = 1;\r}\rvar newRotation = Quat.mix(startRotation, endRotation, mixFactor);" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).mix", + "scope": "static" + }, + { + "description": "Compute a spherical linear interpolation between two rotations, for rotations that are not very similar.\rSee also, {@link Quat(0).mix|Quat.mix}.", + "kind": "function", + "name": "slerp", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The beginning rotation.", + "name": "q1" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The ending rotation.", + "name": "q2" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The mixture coefficient between 0.0 and 1.0. Specifies the proportion\r of q2's value to return in favor of q1's value. A value of 0.0 returns\r q1's value; 1.0 returns q2s's value.", + "name": "alpha" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A spherical linear interpolation between rotations q1 and q2." + } + ], + "memberof": "Quat(0)", + "longname": "Quat(0).slerp", + "scope": "static" + }, + { + "description": "Compute a spherical quadrangle interpolation between two rotations along a path oriented toward two other rotations.\rEquivalent to: Quat.slerp(Quat.slerp(q1, q2, alpha), Quat.slerp(s1, s2, alpha), 2 * alpha * (1.0 - alpha)).", + "kind": "function", + "name": "squad", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "Initial rotation.", + "name": "q1" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "Final rotation.", + "name": "q2" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "First control point.", + "name": "s1" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "Second control point.", + "name": "s2" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The mixture coefficient between 0.0 and 1.0. A value of \r 0.0 returns q1's value; 1.0 returns q2s's value.", + "name": "alpha" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A spherical quadrangle interpolation between rotations q1 and q2 using control\r points s1 and s2." + } + ], + "memberof": "Quat(0)", + "longname": "Quat(0).squad", + "scope": "static" + }, + { + "description": "Calculate the dot product of two quaternions. The closer the quaternions are to each other the more non-zero the value is\r(either positive or negative). Identical unit rotations have a dot product of +/- 1.", + "kind": "function", + "name": "dot", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The first quaternion.", + "name": "q1" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The second quaternion.", + "name": "q2" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The dot product of q1 and q2." + } + ], + "examples": [ + "Testing unit quaternions for equality.\rvar q1 = Quat.fromPitchYawRollDegrees(0, 0, 0);\rvar q2 = Quat.fromPitchYawRollDegrees(0, 0, 0);\rprint(Quat.equal(q1, q2)); // true\rvar q3 = Quat.fromPitchYawRollDegrees(0, 0, 359.95);\rprint(Quat.equal(q1, q3)); // false\r\rvar dot = Quat.dot(q1, q3);\rprint(dot); // -0.9999999403953552\rvar equal = Math.abs(1 - Math.abs(dot)) < 0.000001;\rprint(equal); // true" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).dot", + "scope": "static" + }, + { + "description": "Print to the program log a text label followed by a quaternion's pitch, yaw, and roll Euler angles.", + "kind": "function", + "name": "print", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The label to print.", + "name": "label" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The quaternion to print.", + "name": "q" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If true the angle values are printed in degrees, otherwise they are\r printed in radians.", + "name": "asDegrees" + } + ], + "examples": [ + "Two ways of printing a label plus a quaternion's Euler angles.\rvar quaternion = Quat.fromPitchYawRollDegrees(0, 45, 0);\r\r// Quaternion: dvec3(0.000000, 45.000004, 0.000000)\rQuat.print(\"Quaternion:\", quaternion, true);\r\r// Quaternion: {\"x\":0,\"y\":45.000003814697266,\"z\":0}\rprint(\"Quaternion: \" + JSON.stringify(Quat.safeEulerAngles(quaternion)));" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).print", + "scope": "static" + }, + { + "description": "Test whether two quaternions are equal. Note: The quaternions must be exactly equal in order for \rtrue to be returned; it is often better to use {@link Quat(0).dot|Quat.dot} and test for closeness to +/-1.", + "kind": "function", + "name": "equal", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The first quaternion.", + "name": "q1" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The second quaternion.", + "name": "q2" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the quaternions are equal, otherwise false." + } + ], + "examples": [ + "Testing unit quaternions for equality.\rvar q1 = Quat.fromPitchYawRollDegrees(0, 0, 0);\rvar q2 = Quat.fromPitchYawRollDegrees(0, 0, 0);\rprint(Quat.equal(q1, q2)); // true\rvar q3 = Quat.fromPitchYawRollDegrees(0, 0, 359.95);\rprint(Quat.equal(q1, q3)); // false\r\rvar dot = Quat.dot(q1, q3);\rprint(dot); // -0.9999999403953552\rvar equal = Math.abs(1 - Math.abs(dot)) < 0.000001;\rprint(equal); // true" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).equal", + "scope": "static" + }, + { + "description": "Cancels out the roll and pitch component of a quaternion so that its completely horizontal with a yaw pointing in the \rgiven quaternion's direction.", + "kind": "function", + "name": "cancelOutRollAndPitch", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion representing an orientation.", + "name": "orientation" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "orientation with its roll and pitch canceled out." + } + ], + "examples": [ + "Two ways of calculating a camera orientation in the x-z plane with a yaw pointing in the direction of\r a given quaternion.\rvar quaternion = Quat.fromPitchYawRollDegrees(10, 20, 30);\r\rvar noRollOrPitch = Quat.cancelOutRollAndPitch(quaternion);\rQuat.print(\"\", noRollOrPitch, true); // dvec3(0.000000, 22.245995, 0.000000)\r\rvar front = Quat.getFront(quaternion);\rvar lookAt = Quat.lookAtSimple(Vec3.ZERO, { x: front.x, y: 0, z: front.z });\rQuat.print(\"\", lookAt, true); // dvec3(0.000000, 22.245996, 0.000000)" + ], + "memberof": "Quat(0)", + "longname": "Quat(0).cancelOutRollAndPitch", + "scope": "static" + }, + { + "description": "Cancels out the roll component of a quaternion so that its horizontal axis is level.", + "kind": "function", + "name": "cancelOutRoll", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "A quaternion representing an orientation.", + "name": "orientation" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "orientation with its roll canceled out." + } + ], + "examples": [ + "Two ways of calculating a camera orientation that points in the direction of a given quaternion but\r keeps the camera's horizontal axis level.\rvar quaternion = Quat.fromPitchYawRollDegrees(10, 20, 30);\r\rvar noRoll = Quat.cancelOutRoll(quaternion);\rQuat.print(\"\", noRoll, true); // dvec3(-1.033004, 22.245996, -0.000000)\r\rvar front = Quat.getFront(quaternion);\rvar lookAt = Quat.lookAtSimple(Vec3.ZERO, front);\rQuat.print(\"\", lookAt, true); // dvec3(-1.033004, 22.245996, -0.000000)\r\n " + ], + "memberof": "Quat(0)", + "longname": "Quat(0).cancelOutRoll", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Recording", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiAssignmentClient": true, + "longname": "Recording", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

" + }, + { + "kind": "function", + "name": "loadRecording", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + }, + { + "type": { + "names": [ + "Recording~loadRecordingCallback" + ] + }, + "optional": true, + "defaultvalue": null, + "name": "callback" + } + ], + "memberof": "Recording", + "longname": "Recording.loadRecording", + "scope": "static" + }, + { + "description": "Called when {@link Recording.loadRecording} is complete.", + "kind": "typedef", + "name": "loadRecordingCallback", + "type": { + "names": [ + "function" + ] + }, + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "success" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "memberof": "Recording", + "longname": "Recording~loadRecordingCallback", + "scope": "inner" + }, + { + "kind": "function", + "name": "startPlaying", + "memberof": "Recording", + "longname": "Recording.startPlaying", + "scope": "static" + }, + { + "kind": "function", + "name": "pausePlayer", + "memberof": "Recording", + "longname": "Recording.pausePlayer", + "scope": "static" + }, + { + "kind": "function", + "name": "stopPlaying", + "memberof": "Recording", + "longname": "Recording.stopPlaying", + "scope": "static" + }, + { + "kind": "function", + "name": "isPlaying", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.isPlaying", + "scope": "static" + }, + { + "kind": "function", + "name": "isPaused", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.isPaused", + "scope": "static" + }, + { + "kind": "function", + "name": "playerElapsed", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.playerElapsed", + "scope": "static" + }, + { + "kind": "function", + "name": "playerLength", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.playerLength", + "scope": "static" + }, + { + "kind": "function", + "name": "setPlayerVolume", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "volume" + } + ], + "memberof": "Recording", + "longname": "Recording.setPlayerVolume", + "scope": "static" + }, + { + "kind": "function", + "name": "setPlayerAudioOffset", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "audioOffset" + } + ], + "memberof": "Recording", + "longname": "Recording.setPlayerAudioOffset", + "scope": "static" + }, + { + "kind": "function", + "name": "setPlayerTime", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "time" + } + ], + "memberof": "Recording", + "longname": "Recording.setPlayerTime", + "scope": "static" + }, + { + "kind": "function", + "name": "setPlayerLoop", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "loop" + } + ], + "memberof": "Recording", + "longname": "Recording.setPlayerLoop", + "scope": "static" + }, + { + "kind": "function", + "name": "setPlayerUseDisplayName", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "useDisplayName" + } + ], + "memberof": "Recording", + "longname": "Recording.setPlayerUseDisplayName", + "scope": "static" + }, + { + "kind": "function", + "name": "setPlayerUseAttachments", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "useAttachments" + } + ], + "memberof": "Recording", + "longname": "Recording.setPlayerUseAttachments", + "scope": "static" + }, + { + "kind": "function", + "name": "setPlayerUseHeadModel", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "useHeadModel" + } + ], + "todo": [ + "Note: This function currently has no effect." + ], + "memberof": "Recording", + "longname": "Recording.setPlayerUseHeadModel", + "scope": "static" + }, + { + "kind": "function", + "name": "setPlayerUseSkeletonModel", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "useSkeletonModel" + } + ], + "todo": [ + "Note: This function currently doesn't work." + ], + "memberof": "Recording", + "longname": "Recording.setPlayerUseSkeletonModel", + "scope": "static" + }, + { + "kind": "function", + "name": "setPlayFromCurrentLocation", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "playFromCurrentLocation" + } + ], + "memberof": "Recording", + "longname": "Recording.setPlayFromCurrentLocation", + "scope": "static" + }, + { + "kind": "function", + "name": "getPlayerUseDisplayName", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.getPlayerUseDisplayName", + "scope": "static" + }, + { + "kind": "function", + "name": "getPlayerUseAttachments", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.getPlayerUseAttachments", + "scope": "static" + }, + { + "kind": "function", + "name": "getPlayerUseHeadModel", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.getPlayerUseHeadModel", + "scope": "static" + }, + { + "kind": "function", + "name": "getPlayerUseSkeletonModel", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.getPlayerUseSkeletonModel", + "scope": "static" + }, + { + "kind": "function", + "name": "getPlayFromCurrentLocation", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.getPlayFromCurrentLocation", + "scope": "static" + }, + { + "kind": "function", + "name": "startRecording", + "memberof": "Recording", + "longname": "Recording.startRecording", + "scope": "static" + }, + { + "kind": "function", + "name": "stopRecording", + "memberof": "Recording", + "longname": "Recording.stopRecording", + "scope": "static" + }, + { + "kind": "function", + "name": "isRecording", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.isRecording", + "scope": "static" + }, + { + "kind": "function", + "name": "recorderElapsed", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.recorderElapsed", + "scope": "static" + }, + { + "kind": "function", + "name": "getDefaultRecordingSaveDirectory", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Recording", + "longname": "Recording.getDefaultRecordingSaveDirectory", + "scope": "static" + }, + { + "kind": "function", + "name": "saveRecording", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "filename" + } + ], + "memberof": "Recording", + "longname": "Recording.saveRecording", + "scope": "static" + }, + { + "kind": "function", + "name": "saveRecordingToAsset", + "params": [ + { + "type": { + "names": [ + "function" + ] + }, + "name": "getClipAtpUrl" + } + ], + "memberof": "Recording", + "longname": "Recording.saveRecordingToAsset", + "scope": "static" + }, + { + "kind": "function", + "name": "loadLastRecording", + "memberof": "Recording", + "longname": "Recording.loadLastRecording", + "scope": "static" + }, + { + "kind": "typedef", + "name": "Location", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "longitude" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "latitude" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "altitude" + } + ], + "memberof": "Scene.Stage", + "longname": "Scene.Stage.Location", + "scope": "static" + }, + { + "kind": "typedef", + "name": "Time", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "hour" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "day" + } + ], + "memberof": "Scene.Stage", + "longname": "Scene.Stage.Time", + "scope": "static" + }, + { + "kind": "typedef", + "name": "KeyLight", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "color" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "intensity" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "ambientIntensity" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "direction" + } + ], + "memberof": "Scene.Stage", + "longname": "Scene.Stage.KeyLight", + "scope": "static" + }, + { + "kind": "class", + "name": "Stage", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "backgroundMode" + }, + { + "type": { + "names": [ + "Scene.Stage.KeyLight" + ] + }, + "name": "keyLight" + }, + { + "type": { + "names": [ + "Scene.Stage.Location" + ] + }, + "name": "location" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "sunModel" + }, + { + "type": { + "names": [ + "Scene.Stage.Time" + ] + }, + "name": "time" + } + ], + "memberof": "Scene", + "longname": "Scene.Stage", + "scope": "static", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "setOrientation", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "orientation" + } + ], + "memberof": "Scene.Stage", + "longname": "Scene.Stage.setOrientation", + "scope": "static" + }, + { + "kind": "function", + "name": "setLocation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "longitude" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "latitude" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "altitude" + } + ], + "memberof": "Scene.Stage", + "longname": "Scene.Stage.setLocation", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Scene", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "shouldRenderAvatars" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "shouldRenderEntities" + }, + { + "type": { + "names": [ + "Scene.Stage" + ] + }, + "name": "stage" + } + ], + "longname": "Scene", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "shouldRenderAvatarsChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "shouldRenderAvatars" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Scene", + "longname": "Scene.shouldRenderAvatarsChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "shouldRenderEntitiesChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "shouldRenderEntities" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Scene", + "longname": "Scene.shouldRenderEntitiesChanged", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

Plays — \"injects\" — the content of an audio file. Used in the {@link Audio} API.", + "kind": "class", + "name": "AudioInjector", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the audio is currently playing, otherwise false. \r Read-only.", + "name": "playing" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The loudness in the last frame of audio, range 0.01.0. \r Read-only.", + "name": "loudness" + }, + { + "type": { + "names": [ + "AudioInjector.AudioInjectorOptions" + ] + }, + "description": "Configures how the injector plays the audio.", + "name": "options" + } + ], + "longname": "AudioInjector", + "scope": "global" + }, + { + "description": "Stop current playback, if any, and start playing from the beginning.", + "kind": "function", + "name": "restart", + "memberof": "AudioInjector", + "longname": "AudioInjector.restart", + "scope": "static" + }, + { + "description": "Stop audio playback.", + "kind": "function", + "name": "stop", + "examples": [ + "Stop playing a sound before it finishes.\rvar sound = SoundCache.getSound(Script.resourcesPath() + \"sounds/sample.wav\");\rvar injector;\rvar injectorOptions = {\r position: MyAvatar.position\r};\r\rScript.setTimeout(function () { // Give the sound time to load.\r injector = Audio.playSound(sound, injectorOptions);\r}, 1000);\r\rScript.setTimeout(function () {\r injector.stop();\r}, 2000);" + ], + "memberof": "AudioInjector", + "longname": "AudioInjector.stop", + "scope": "static" + }, + { + "description": "Get the current configuration of the audio injector.", + "kind": "function", + "name": "getOptions", + "returns": [ + { + "type": { + "names": [ + "AudioInjector.AudioInjectorOptions" + ] + }, + "description": "Configuration of how the injector plays the audio." + } + ], + "memberof": "AudioInjector", + "longname": "AudioInjector.getOptions", + "scope": "static" + }, + { + "description": "Configure how the injector plays the audio.", + "kind": "function", + "name": "setOptions", + "params": [ + { + "type": { + "names": [ + "AudioInjector.AudioInjectorOptions" + ] + }, + "description": "Configuration of how the injector plays the audio.", + "name": "options" + } + ], + "memberof": "AudioInjector", + "longname": "AudioInjector.setOptions", + "scope": "static" + }, + { + "description": "Get the loudness of the most recent frame of audio played.", + "kind": "function", + "name": "getLoudness", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The loudness of the most recent frame of audio played, range 0.01.0." + } + ], + "memberof": "AudioInjector", + "longname": "AudioInjector.getLoudness", + "scope": "static" + }, + { + "description": "Get whether or not the audio is currently playing.", + "kind": "function", + "name": "isPlaying", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the audio is currently playing, otherwise false." + } + ], + "examples": [ + "See if a sound is playing.\rvar sound = SoundCache.getSound(Script.resourcesPath() + \"sounds/sample.wav\");\rvar injector;\rvar injectorOptions = {\r position: MyAvatar.position\r};\r\rScript.setTimeout(function () { // Give the sound time to load.\r injector = Audio.playSound(sound, injectorOptions);\r}, 1000);\r\rScript.setTimeout(function () {\r print(\"Sound is playing: \" + injector.isPlaying());\r}, 2000);" + ], + "memberof": "AudioInjector", + "longname": "AudioInjector.isPlaying", + "scope": "static" + }, + { + "description": "Triggered when the audio has finished playing.", + "kind": "function", + "name": "finished", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report when a sound has finished playing.\rvar sound = SoundCache.getSound(Script.resourcesPath() + \"sounds/sample.wav\");\rvar injector;\rvar injectorOptions = {\r position: MyAvatar.position\r};\r\rScript.setTimeout(function () { // Give the sound time to load.\r injector = Audio.playSound(sound, injectorOptions);\r injector.finished.connect(function () {\r print(\"Finished playing sound\");\r });\r}, 1000);" + ], + "memberof": "AudioInjector", + "longname": "AudioInjector.finished", + "scope": "static" + }, + { + "description": "Stop audio playback. (Synonym of {@link AudioInjector.stop|stop}.)", + "kind": "function", + "name": "stopInjectorImmediately", + "memberof": "AudioInjector", + "longname": "AudioInjector.stopInjectorImmediately", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Resource", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "Resource.State" + ] + }, + "name": "State" + } + ], + "longname": "Resource", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

" + }, + { + "description": "Triggered when the script starts for a user.\r

Note: Can only be connected to via this.preload = function (...) { ... } in the entity script.

\r
Available in:Client Entity ScriptsServer Entity Scripts
", + "kind": "function", + "name": "preload", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that the script is running in.", + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Get the ID of the entity that a client entity script is running in.\rvar entityScript = (function () {\r this.entityID = Uuid.NULL;\r\r this.preload = function (entityID) {\r this.entityID = entityID;\r print(\"Entity ID: \" + this.entityID);\r };\r);\r\rvar entityID = Entities.addEntity({\r type: \"Box\",\r position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -5 })),\r dimensions: { x: 0.5, y: 0.5, z: 0.5 },\r color: { red: 255, green: 0, blue: 0 },\r script: \"(\" + entityScript + \")\", // Could host the script on a Web server instead.\r lifetime: 300 // Delete after 5 minutes.\r});" + ], + "memberof": "Entities", + "longname": "Entities.preload", + "scope": "static" + }, + { + "description": "Triggered when the script terminates for a user.\r

Note: Can only be connected to via this.unoad = function () { ... } in the entity script.

\r
Available in:Client Entity ScriptsServer Entity Scripts
", + "kind": "function", + "name": "unload", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Entities", + "longname": "Entities.unload", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Script", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "context" + } + ], + "longname": "Script", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

" + }, + { + "description": "Stop the current script.", + "kind": "function", + "name": "stop", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "marshal" + } + ], + "memberof": "Script", + "longname": "Script.stop", + "scope": "static" + }, + { + "kind": "function", + "name": "registerGlobalObject", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "object" + } + ], + "memberof": "Script", + "longname": "Script.registerGlobalObject", + "scope": "static" + }, + { + "kind": "function", + "name": "registerGetterSetter", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "getter" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "setter" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "parent" + } + ], + "memberof": "Script", + "longname": "Script.registerGetterSetter", + "scope": "static" + }, + { + "kind": "function", + "name": "registerFunction", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "function" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "numArguments" + } + ], + "memberof": "Script", + "longname": "Script.registerFunction", + "scope": "static" + }, + { + "kind": "function", + "name": "registerFunction", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "parent" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "function" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "numArguments" + } + ], + "memberof": "Script", + "longname": "Script.registerFunction", + "scope": "static" + }, + { + "kind": "function", + "name": "registerValue", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "value" + } + ], + "memberof": "Script", + "longname": "Script.registerValue", + "scope": "static" + }, + { + "kind": "function", + "name": "evaluate", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "program" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "filename" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": -1, + "name": "lineNumber" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.evaluate", + "scope": "static" + }, + { + "kind": "function", + "name": "evaluateInClosure", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "locals" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "program" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.evaluateInClosure", + "scope": "static" + }, + { + "kind": "function", + "name": "getContext", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.getContext", + "scope": "static" + }, + { + "kind": "function", + "name": "isClientScript", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.isClientScript", + "scope": "static" + }, + { + "kind": "function", + "name": "isDebugMode", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.isDebugMode", + "scope": "static" + }, + { + "kind": "function", + "name": "isEntityClientScript", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.isEntityClientScript", + "scope": "static" + }, + { + "kind": "function", + "name": "isEntityServerScript", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.isEntityServerScript", + "scope": "static" + }, + { + "kind": "function", + "name": "isAgentScript", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.isAgentScript", + "scope": "static" + }, + { + "kind": "function", + "name": "addEventHandler", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "eventName" + }, + { + "type": { + "names": [ + "function" + ] + }, + "name": "handler" + } + ], + "memberof": "Script", + "longname": "Script.addEventHandler", + "scope": "static" + }, + { + "kind": "function", + "name": "removeEventHandler", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "eventName" + }, + { + "type": { + "names": [ + "function" + ] + }, + "name": "handler" + } + ], + "memberof": "Script", + "longname": "Script.removeEventHandler", + "scope": "static" + }, + { + "description": "Start a new Interface or entity script.", + "kind": "function", + "name": "load", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the script to load. Can be relative to the current script.", + "name": "filename" + } + ], + "examples": [ + "Load a script from another script.\r// First file: scriptA.js\rprint(\"This is script A\");\r\r// Second file: scriptB.js\rprint(\"This is script B\");\rScript.load(\"scriptA.js\");\r\r// If you run scriptB.js you should see both scripts in the running scripts list.\r// And you should see the following output:\r// This is script B\r// This is script A" + ], + "memberof": "Script", + "longname": "Script.load", + "scope": "static" + }, + { + "description": "Include JavaScript from other files in the current script. If a callback is specified the files are loaded and included \rasynchronously, otherwise they are included synchronously (i.e., script execution blocks while the files are included).", + "kind": "function", + "name": "include", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The URLs of the scripts to include. Each can be relative to the current script.", + "name": "filenames" + }, + { + "type": { + "names": [ + "function" + ] + }, + "optional": true, + "defaultvalue": null, + "description": "The function to call back when the scripts have been included. Can be an in-line \rfunction or the name of a function.", + "name": "callback" + } + ], + "memberof": "Script", + "longname": "Script.include", + "scope": "static" + }, + { + "description": "Include JavaScript from another file in the current script. If a callback is specified the file is loaded and included \rasynchronously, otherwise it is included synchronously (i.e., script execution blocks while the file is included).", + "kind": "function", + "name": "include", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the script to include. Can be relative to the current script.", + "name": "filename" + }, + { + "type": { + "names": [ + "function" + ] + }, + "optional": true, + "defaultvalue": null, + "description": "The function to call back when the script has been included. Can be an in-line \rfunction or the name of a function.", + "name": "callback" + } + ], + "examples": [ + "Include a script file asynchronously.\r// First file: scriptA.js\rprint(\"This is script A\");\r\r// Second file: scriptB.js\rprint(\"This is script B\");\rScript.include(\"scriptA.js\", function () {\r print(\"Script A has been included\");\r});\r\r// If you run scriptB.js you should see only scriptB.js in the running scripts list.\r// And you should see the following output:\r// This is script B\r// This is script A\r// Script A has been included" + ], + "memberof": "Script", + "longname": "Script.include", + "scope": "static" + }, + { + "kind": "function", + "name": "require", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "module" + } + ], + "memberof": "Script", + "longname": "Script.require", + "scope": "static" + }, + { + "kind": "function", + "name": "resetModuleCache", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "deleteScriptCache" + } + ], + "memberof": "Script", + "longname": "Script.resetModuleCache", + "scope": "static" + }, + { + "description": "Call a function at a set interval.", + "kind": "function", + "name": "setInterval", + "params": [ + { + "type": { + "names": [ + "function" + ] + }, + "description": "The function to call. Can be an in-line function or the name of a function.", + "name": "function" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The interval at which to call the function, in ms.", + "name": "interval" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + }, + "description": "A handle to the interval timer. Can be used by {@link Script.clearInterval}." + } + ], + "examples": [ + "Print a message every second.\rScript.setInterval(function () {\r print(\"Timer fired\");\r}, 1000);" + ], + "memberof": "Script", + "longname": "Script.setInterval", + "scope": "static" + }, + { + "description": "Call a function after a delay.", + "kind": "function", + "name": "setTimeout", + "params": [ + { + "type": { + "names": [ + "function" + ] + }, + "description": "The function to call. Can be an in-line function or the name of a function.", + "name": "function" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The delay after which to call the function, in ms.", + "name": "timeout" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + }, + "description": "A handle to the timeout timer. Can be used by {@link Script.clearTimeout}." + } + ], + "examples": [ + "Print a message after a second.\rScript.setTimeout(function () {\r print(\"Timer fired\");\r}, 1000);" + ], + "memberof": "Script", + "longname": "Script.setTimeout", + "scope": "static" + }, + { + "description": "Stop an interval timer set by {@link Script.setInterval|setInterval}.", + "kind": "function", + "name": "clearInterval", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "description": "The interval timer to clear.", + "name": "timer" + } + ], + "examples": [ + "Stop an interval timer.\r// Print a message every second.\rvar timer = Script.setInterval(function () {\r print(\"Timer fired\");\r}, 1000);\r\r// Stop the timer after 10 seconds.\rScript.setTimeout(function () {\r print(\"Stop timer\");\r Script.clearInterval(timer);\r}, 10000);" + ], + "memberof": "Script", + "longname": "Script.clearInterval", + "scope": "static" + }, + { + "description": "Clear a timeout timer set by {@link Script.setTimeout|setTimeout}.", + "kind": "function", + "name": "clearTimeout", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "description": "The timeout timer to clear.", + "name": "timer" + } + ], + "examples": [ + "Stop a timeout timer.\r// Print a message after two seconds.\rvar timer = Script.setTimeout(function () {\r print(\"Timer fired\");\r}, 2000);\r\r// Uncomment the following line to stop the timer from firing.\r//Script.clearTimeout(timer);" + ], + "memberof": "Script", + "longname": "Script.clearTimeout", + "scope": "static" + }, + { + "kind": "function", + "name": "print", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + } + ], + "memberof": "Script", + "longname": "Script.print", + "scope": "static" + }, + { + "description": "Resolve a relative path to an absolute path.", + "kind": "function", + "name": "resolvePath", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The relative path to resolve.", + "name": "path" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The absolute path." + } + ], + "memberof": "Script", + "longname": "Script.resolvePath", + "scope": "static" + }, + { + "kind": "function", + "name": "resourcesPath", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.resourcesPath", + "scope": "static" + }, + { + "kind": "function", + "name": "beginProfileRange", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "label" + } + ], + "memberof": "Script", + "longname": "Script.beginProfileRange", + "scope": "static" + }, + { + "kind": "function", + "name": "endProfileRange", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "label" + } + ], + "memberof": "Script", + "longname": "Script.endProfileRange", + "scope": "static" + }, + { + "kind": "function", + "name": "isEntityScriptRunning", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.isEntityScriptRunning", + "scope": "static" + }, + { + "kind": "function", + "name": "loadEntityScript", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "script" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "forceRedownload" + } + ], + "memberof": "Script", + "longname": "Script.loadEntityScript", + "scope": "static" + }, + { + "kind": "function", + "name": "unloadEntityScript", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "shouldRemoveFromMap" + } + ], + "memberof": "Script", + "longname": "Script.unloadEntityScript", + "scope": "static" + }, + { + "kind": "function", + "name": "unloadAllEntityScripts", + "memberof": "Script", + "longname": "Script.unloadAllEntityScripts", + "scope": "static" + }, + { + "kind": "function", + "name": "callEntityScriptMethod", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "methodName" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "name": "parameters" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "optional": true, + "defaultvalue": "Uuid.NULL", + "name": "remoteCallerID" + } + ], + "memberof": "Script", + "longname": "Script.callEntityScriptMethod", + "scope": "static" + }, + { + "kind": "function", + "name": "callEntityScriptMethod", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "methodName" + }, + { + "type": { + "names": [ + "PointerEvent" + ] + }, + "name": "event" + } + ], + "memberof": "Script", + "longname": "Script.callEntityScriptMethod", + "scope": "static" + }, + { + "kind": "function", + "name": "callEntityScriptMethod", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "methodName" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "otherID" + }, + { + "type": { + "names": [ + "Collision" + ] + }, + "name": "collision" + } + ], + "memberof": "Script", + "longname": "Script.callEntityScriptMethod", + "scope": "static" + }, + { + "kind": "function", + "name": "requestGarbageCollection", + "memberof": "Script", + "longname": "Script.requestGarbageCollection", + "scope": "static" + }, + { + "kind": "function", + "name": "generateUUID", + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.generateUUID", + "scope": "static" + }, + { + "kind": "function", + "name": "callAnimationStateHandler", + "params": [ + { + "type": { + "names": [ + "function" + ] + }, + "name": "callback" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "parameters" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "name": "names" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "useNames" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "resultHandler" + } + ], + "memberof": "Script", + "longname": "Script.callAnimationStateHandler", + "scope": "static" + }, + { + "kind": "function", + "name": "updateMemoryCost", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "deltaSize" + } + ], + "memberof": "Script", + "longname": "Script.updateMemoryCost", + "scope": "static" + }, + { + "kind": "function", + "name": "scriptLoaded", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "filename" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.scriptLoaded", + "scope": "static" + }, + { + "kind": "function", + "name": "errorLoadingScript", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "filename" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.errorLoadingScript", + "scope": "static" + }, + { + "description": "Triggered regularly at a system-determined frequency.", + "kind": "function", + "name": "update", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The time since the last update, in s.", + "name": "deltaTime" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.update", + "scope": "static" + }, + { + "description": "Triggered when the script is ending.", + "kind": "function", + "name": "scriptEnding", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Connect to the scriptEnding signal.\rprint(\"Script started\");\r\rScript.scriptEnding.connect(function () {\r print(\"Script ending\");\r});\r\rScript.setTimeout(function () {\r print(\"Stopping script\");\r Script.stop();\r}, 1000);" + ], + "memberof": "Script", + "longname": "Script.scriptEnding", + "scope": "static" + }, + { + "kind": "function", + "name": "finished", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "filename" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "engine" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.finished", + "scope": "static" + }, + { + "kind": "function", + "name": "cleanupMenuItem", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "menuItem" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.cleanupMenuItem", + "scope": "static" + }, + { + "kind": "function", + "name": "printedMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.printedMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "errorMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.errorMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "warningMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.warningMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "infoMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.infoMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "runningStateChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.runningStateChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "clearDebugWindow", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.clearDebugWindow", + "scope": "static" + }, + { + "kind": "function", + "name": "loadScript", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptName" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isUserLoaded" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.loadScript", + "scope": "static" + }, + { + "kind": "function", + "name": "reloadScript", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptName" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isUserLoaded" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.reloadScript", + "scope": "static" + }, + { + "kind": "function", + "name": "doneRunning", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.doneRunning", + "scope": "static" + }, + { + "kind": "function", + "name": "entityScriptDetailsUpdated", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.entityScriptDetailsUpdated", + "scope": "static" + }, + { + "kind": "function", + "name": "entityScriptPreloadFinished", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Script", + "longname": "Script.entityScriptPreloadFinished", + "scope": "static" + }, + { + "kind": "function", + "name": "executeOnScriptThread", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "function" + }, + { + "type": { + "names": [ + "ConnectionType" + ] + }, + "optional": true, + "defaultvalue": 2, + "name": "type" + } + ], + "memberof": "Script", + "longname": "Script.executeOnScriptThread", + "scope": "static" + }, + { + "kind": "function", + "name": "_requireResolve", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "module" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "relativeTo" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Script", + "longname": "Script._requireResolve", + "scope": "static" + }, + { + "kind": "function", + "name": "entityScriptContentAvailable", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptOrURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "contents" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isURL" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "success" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "status" + } + ], + "memberof": "Script", + "longname": "Script.entityScriptContentAvailable", + "scope": "static" + }, + { + "kind": "namespace", + "name": "ScriptDiscoveryService", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "debugScriptUrl" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "defaultScriptsPath" + }, + { + "type": { + "names": [ + "ScriptsModel" + ] + }, + "name": "scriptsModel" + }, + { + "type": { + "names": [ + "ScriptsModelFilter" + ] + }, + "name": "scriptsModelFilter" + } + ], + "longname": "ScriptDiscoveryService", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "loadOneScript", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "filename" + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.loadOneScript", + "scope": "static" + }, + { + "kind": "function", + "name": "loadScript", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "filename" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "name": "isUserLoaded" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "loadScriptFromEditor" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "activateMainWindow" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "reload" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "quitWhenFinished" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.loadScript", + "scope": "static" + }, + { + "kind": "function", + "name": "stopScript", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptHash" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "restart" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.stopScript", + "scope": "static" + }, + { + "kind": "function", + "name": "reloadAllScripts", + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.reloadAllScripts", + "scope": "static" + }, + { + "kind": "function", + "name": "stopAllScripts", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "restart" + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.stopAllScripts", + "scope": "static" + }, + { + "kind": "function", + "name": "getRunning", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.getRunning", + "scope": "static" + }, + { + "kind": "function", + "name": "getPublic", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.getPublic", + "scope": "static" + }, + { + "kind": "function", + "name": "getLocal", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.getLocal", + "scope": "static" + }, + { + "kind": "function", + "name": "scriptCountChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.scriptCountChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "scriptsReloading", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.scriptsReloading", + "scope": "static" + }, + { + "kind": "function", + "name": "scriptLoadError", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "filename" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "error" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.scriptLoadError", + "scope": "static" + }, + { + "kind": "function", + "name": "printedMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "engineName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.printedMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "errorMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "engineName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.errorMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "warningMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "engineName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.warningMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "infoMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "engineName" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.infoMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "errorLoadingScript", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.errorLoadingScript", + "scope": "static" + }, + { + "kind": "function", + "name": "clearDebugWindow", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.clearDebugWindow", + "scope": "static" + }, + { + "kind": "function", + "name": "onPrintedMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptName" + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.onPrintedMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "onErrorMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptName" + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.onErrorMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "onWarningMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptName" + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.onWarningMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "onInfoMessage", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "message" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "scriptName" + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.onInfoMessage", + "scope": "static" + }, + { + "kind": "function", + "name": "onErrorLoadingScript", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.onErrorLoadingScript", + "scope": "static" + }, + { + "kind": "function", + "name": "onClearDebugWindow", + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.onClearDebugWindow", + "scope": "static" + }, + { + "kind": "function", + "name": "onScriptFinished", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "filename" + }, + { + "type": { + "names": [ + "object" + ] + }, + "name": "engine" + } + ], + "memberof": "ScriptDiscoveryService", + "longname": "ScriptDiscoveryService.onScriptFinished", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

Provided as a property of {@link ScriptDiscoveryService}.

\r

Has properties and functions below in addition to those of \rhttp://doc.qt.io/qt-5/qabstractitemmodel.html.

", + "kind": "class", + "name": "ScriptsModel", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "ScriptsModel", + "scope": "global" + }, + { + "kind": "function", + "name": "index", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "row" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "column" + }, + { + "type": { + "names": [ + "QModelIndex" + ] + }, + "name": "parent" + } + ], + "returns": [ + { + "type": { + "names": [ + "QModelIndex" + ] + } + } + ], + "memberof": "ScriptsModel", + "longname": "ScriptsModel.index", + "scope": "static" + }, + { + "kind": "function", + "name": "parent", + "params": [ + { + "type": { + "names": [ + "QModelIndex" + ] + }, + "name": "child" + } + ], + "returns": [ + { + "type": { + "names": [ + "QModelIndex" + ] + } + } + ], + "memberof": "ScriptsModel", + "longname": "ScriptsModel.parent", + "scope": "static" + }, + { + "kind": "function", + "name": "data", + "params": [ + { + "type": { + "names": [ + "QModelIndex" + ] + }, + "name": "index" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": 0, + "description": "returns {string}", + "name": "role" + } + ], + "memberof": "ScriptsModel", + "longname": "ScriptsModel.data", + "scope": "static" + }, + { + "kind": "function", + "name": "rowCount", + "params": [ + { + "type": { + "names": [ + "QmodelIndex" + ] + }, + "optional": true, + "defaultvalue": null, + "name": "parent" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "ScriptsModel", + "longname": "ScriptsModel.rowCount", + "scope": "static" + }, + { + "kind": "function", + "name": "columnCount", + "params": [ + { + "type": { + "names": [ + "QmodelIndex" + ] + }, + "optional": true, + "defaultvalue": null, + "name": "parent" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "ScriptsModel", + "longname": "ScriptsModel.columnCount", + "scope": "static" + }, + { + "kind": "function", + "name": "getTreeNodeFromIndex", + "params": [ + { + "type": { + "names": [ + "QmodelIndex" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "TreeNodeBase" + ] + } + } + ], + "memberof": "ScriptsModel", + "longname": "ScriptsModel.getTreeNodeFromIndex", + "scope": "static" + }, + { + "kind": "function", + "name": "getFolderNodes", + "params": [ + { + "type": { + "names": [ + "TreeNodeFolder" + ] + }, + "name": "parent" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "ScriptsModel", + "longname": "ScriptsModel.getFolderNodes", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

Provided as a property of {@link ScriptDiscoveryService}.

\r

Has properties and functions per \rhttp://doc.qt.io/qt-5/qsortfilterproxymodel.html.

", + "kind": "class", + "name": "ScriptsModelFilter", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "ScriptsModelFilter", + "scope": "global" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

A UUID (Universally Unique IDentifier) is used to uniquely identify entities, overlays, avatars, and the like. It is\rrepresented in JavaScript as a string in the format, {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}, where the \"n\"s are\rhexadecimal digits.", + "kind": "namespace", + "name": "Uuid", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The null UUID, {00000000-0000-0000-0000-000000000000}.", + "name": "NULL" + } + ], + "longname": "Uuid", + "scope": "global" + }, + { + "description": "Generates a UUID from a string representation of the UUID.", + "kind": "function", + "name": "fromString", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "A string representation of a UUID. The curly braces are optional.", + "name": "string" + } + ], + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "A UUID if the given string is valid, null otherwise." + } + ], + "examples": [ + "Valid and invalid parameters.\rvar uuid = Uuid.fromString(\"{527c27ea-6d7b-4b47-9ae2-b3051d50d2cd}\");\rprint(uuid); // {527c27ea-6d7b-4b47-9ae2-b3051d50d2cd}\r\ruuid = Uuid.fromString(\"527c27ea-6d7b-4b47-9ae2-b3051d50d2cd\");\rprint(uuid); // {527c27ea-6d7b-4b47-9ae2-b3051d50d2cd}\r\ruuid = Uuid.fromString(\"527c27ea\");\rprint(uuid); // null" + ], + "memberof": "Uuid", + "longname": "Uuid.fromString", + "scope": "static" + }, + { + "description": "Generates a string representation of a UUID. However, because UUIDs are represented in JavaScript as strings, this is in\reffect a no-op.", + "kind": "function", + "name": "toString", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID to generate a string from.", + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "- A string representation of the UUID." + } + ], + "memberof": "Uuid", + "longname": "Uuid.toString", + "scope": "static" + }, + { + "description": "Generate a new UUID.", + "kind": "function", + "name": "generate", + "returns": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "A new UUID." + } + ], + "examples": [ + "Generate a new UUID and reports its JavaScript type.\rvar uuid = Uuid.generate();\rprint(uuid); // {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}\rprint(typeof uuid); // string" + ], + "memberof": "Uuid", + "longname": "Uuid.generate", + "scope": "static" + }, + { + "description": "Test whether two given UUIDs are equal.", + "kind": "function", + "name": "isEqual", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The first UUID to compare.", + "name": "idA" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The second UUID to compare.", + "name": "idB" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the two UUIDs are equal, otherwise false." + } + ], + "examples": [ + "Demonstrate true and false cases.\rvar uuidA = Uuid.generate();\rvar uuidB = Uuid.generate();\rprint(Uuid.isEqual(uuidA, uuidB)); // false\ruuidB = uuidA;\rprint(Uuid.isEqual(uuidA, uuidB)); // true" + ], + "memberof": "Uuid", + "longname": "Uuid.isEqual", + "scope": "static" + }, + { + "description": "Test whether a given UUID is null.", + "kind": "function", + "name": "isNull", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID to test.", + "name": "id" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the UUID equals Uuid.NULL or is null, otherwise false." + } + ], + "examples": [ + "Demonstrate true and false cases.\rvar uuid; // undefined\rprint(Uuid.isNull(uuid)); // false\ruuid = Uuid.generate();\rprint(Uuid.isNull(uuid)); // false\ruuid = Uuid.NULL;\rprint(Uuid.isNull(uuid)); // true\ruuid = null;\rprint(Uuid.isNull(uuid)); // true" + ], + "memberof": "Uuid", + "longname": "Uuid.isNull", + "scope": "static" + }, + { + "description": "Print to the program log a text label followed by the UUID value.", + "kind": "function", + "name": "print", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The label to print.", + "name": "label" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The UUID to print.", + "name": "id" + } + ], + "examples": [ + "Two ways of printing a label plus UUID.\rvar uuid = Uuid.generate();\rUuid.print(\"Generated UUID:\", uuid); // Generated UUID: {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}\rprint(\"Generated UUID: \" + uuid); // Generated UUID: {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}\r\n " + ], + "memberof": "Uuid", + "longname": "Uuid.print", + "scope": "static" + }, + { + "description": "A display or device touch event.", + "kind": "typedef", + "name": "TouchEvent", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer x-coordinate of the average position of the touch events.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer y-coordinate of the average position of the touch events.", + "name": "y" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the touch point has just been pressed, otherwise false.", + "name": "isPressed" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the touch point has moved, otherwise false.", + "name": "isMoved" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the touch point has not moved, otherwise false.", + "name": "isStationary" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the touch point has just been released, otherwise false.", + "name": "isReleased" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the Shift key was pressed when the event was generated, otherwise\r false.", + "name": "isShifted" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the \"meta\" key was pressed when the event was generated, otherwise\r false. On Windows the \"meta\" key is the Windows key; on OSX it is the Control (Splat) key.", + "name": "isMeta" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the \"control\" key was pressed when the event was generated, otherwise\r false. On Windows the \"control\" key is the Ctrl key; on OSX it is the Command key.", + "name": "isControl" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the Alt key was pressed when the event was generated, otherwise\r false.", + "name": "isAlt" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer number of touch points.", + "name": "touchPoints" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The coordinates of the touch points.", + "name": "points" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The radius of a circle centered on their average position that encompasses the touch points.", + "name": "radius" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the radius has reduced since the most recent touch event \r with a different radius value, otherwise false.", + "name": "isPinching" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the radius has increased since the most recent touch \r event with a different radius value, otherwise false.", + "name": "isPinchOpening" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "An angle calculated from the touch points, in degrees.", + "name": "angle" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The change in the angle value since the previous touch event, in degrees, if \r the number of touch points is the same, otherwise 0.0.", + "name": "deltaAngle" + }, + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The angles of each touch point about the center of all the touch points, in degrees.", + "name": "angles" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the angle of the touch event has changed since the \r previous touch event and the number of touch points is the same, otherwise false.", + "name": "isRotating" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "\"clockwise\" or \"counterClockwise\" if the angle of the \r touch event has changed since the previous touch event and the number of touch points is the same, otherwise \r \"none\".", + "name": "rotating" + } + ], + "examples": [ + "Report the TouchEvent details when a touch event starts.\rController.touchBeginEvent.connect(function (event) {\r print(JSON.stringify(event));\r});\r\n " + ], + "longname": "TouchEvent", + "scope": "global" + }, + { + "kind": "namespace", + "name": "Users", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the domain server allows the node or avatar to kick (ban) avatars,\r otherwise false. Read-only.", + "name": "canKick" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the avatar requests extra data from the mixers (such as \r positional data of an avatar you've ignored). Read-only.", + "name": "requestsDomainListData" + } + ], + "longname": "Users", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

" + }, + { + "description": "Personally ignore another user, making them disappear for you and you disappear for them.", + "kind": "function", + "name": "ignore", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The node or session ID of the user you want to ignore.", + "name": "nodeID" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "True for ignored; false for un-ignored.", + "name": "enable" + } + ], + "memberof": "Users", + "longname": "Users.ignore", + "scope": "static" + }, + { + "description": "Get whether or not you have ignored the node with the given UUID.", + "kind": "function", + "name": "getIgnoreStatus", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The node or session ID of the user whose ignore status you want.", + "name": "nodeID" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Users", + "longname": "Users.getIgnoreStatus", + "scope": "static" + }, + { + "description": "Mute another user for you and you only. They won't be able to hear you, and you won't be able to hear them.", + "kind": "function", + "name": "personalMute", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The node or session ID of the user you want to mute.", + "name": "nodeID" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "True for enabled; false for disabled.", + "name": "muteEnabled" + } + ], + "memberof": "Users", + "longname": "Users.personalMute", + "scope": "static" + }, + { + "description": "Get whether or not you have personally muted the node with the given UUID.", + "kind": "function", + "name": "requestPersonalMuteStatus", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The node or session ID of the user whose personal mute status you want.", + "name": "nodeID" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Users", + "longname": "Users.requestPersonalMuteStatus", + "scope": "static" + }, + { + "description": "Sets an avatar's gain for you and you only.\rUnits are Decibels (dB)", + "kind": "function", + "name": "setAvatarGain", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The node or session ID of the user whose gain you want to modify, or null to set the master gain.", + "name": "nodeID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The gain of the avatar you'd like to set. Units are dB.", + "name": "gain" + } + ], + "memberof": "Users", + "longname": "Users.setAvatarGain", + "scope": "static" + }, + { + "description": "Gets an avatar's gain for you and you only.", + "kind": "function", + "name": "getAvatarGain", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The node or session ID of the user whose gain you want to get, or null to get the master gain.", + "name": "nodeID" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "gain (in dB)" + } + ], + "memberof": "Users", + "longname": "Users.getAvatarGain", + "scope": "static" + }, + { + "description": "Kick/ban another user. Removes them from the server and prevents them from returning. Bans by either user name (if \ravailable) or machine fingerprint otherwise. This will only do anything if you're an admin of the domain you're in.", + "kind": "function", + "name": "kick", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The node or session ID of the user you want to kick.", + "name": "nodeID" + } + ], + "memberof": "Users", + "longname": "Users.kick", + "scope": "static" + }, + { + "description": "Mutes another user's microphone for everyone. Not permanent; the silenced user can unmute themselves with the UNMUTE \rbutton in their HUD. This will only do anything if you're an admin of the domain you're in.", + "kind": "function", + "name": "mute", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The node or session ID of the user you want to mute.", + "name": "nodeID" + } + ], + "memberof": "Users", + "longname": "Users.mute", + "scope": "static" + }, + { + "description": "Request the user name and machine fingerprint associated with the given UUID. The user name will be returned in a \r{@link Users.usernameFromIDReply|usernameFromIDReply} signal. This will only do anything if you're an admin of the domain \ryou're in.", + "kind": "function", + "name": "requestUsernameFromID", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The node or session ID of the user whose user name you want.", + "name": "nodeID" + } + ], + "memberof": "Users", + "longname": "Users.requestUsernameFromID", + "scope": "static" + }, + { + "description": "Returns `true` if the DomainServer will allow this Node/Avatar to make kick.", + "kind": "function", + "name": "getCanKick", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the domain server allows the client to kick (ban) other users, otherwise \r false." + } + ], + "memberof": "Users", + "longname": "Users.getCanKick", + "scope": "static" + }, + { + "description": "Toggle the state of the space bubble feature.", + "kind": "function", + "name": "toggleIgnoreRadius", + "memberof": "Users", + "longname": "Users.toggleIgnoreRadius", + "scope": "static" + }, + { + "description": "Enables the space bubble feature.", + "kind": "function", + "name": "enableIgnoreRadius", + "memberof": "Users", + "longname": "Users.enableIgnoreRadius", + "scope": "static" + }, + { + "description": "Disables the space bubble feature.", + "kind": "function", + "name": "disableIgnoreRadius", + "memberof": "Users", + "longname": "Users.disableIgnoreRadius", + "scope": "static" + }, + { + "description": "Returns `true` if the space bubble feature is enabled.", + "kind": "function", + "name": "getIgnoreRadiusEnabled", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the space bubble is enabled, otherwise false." + } + ], + "memberof": "Users", + "longname": "Users.getIgnoreRadiusEnabled", + "scope": "static" + }, + { + "kind": "function", + "name": "canKickChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "canKick" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Users", + "longname": "Users.canKickChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "ignoreRadiusEnabledChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isEnabled" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Users", + "longname": "Users.ignoreRadiusEnabledChanged", + "scope": "static" + }, + { + "description": "Notifies scripts that another user has entered the ignore radius.", + "kind": "function", + "name": "enteredIgnoreRadius", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Users", + "longname": "Users.enteredIgnoreRadius", + "scope": "static" + }, + { + "description": "Triggered in response to a {@link Users.requestUsernameFromID|requestUsernameFromID} call. Provides the user name and \rmachine fingerprint associated with a UUID.\rUsername and machineFingerprint will be their default constructor output if the requesting user isn't an admin.", + "kind": "function", + "name": "usernameFromIDReply", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "nodeID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "userName" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "machineFingerprint" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "isAdmin" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Users", + "longname": "Users.usernameFromIDReply", + "scope": "static" + }, + { + "description": "Notifies scripts that a user has disconnected from the domain.", + "kind": "function", + "name": "avatarDisconnected", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The session ID of the avatar that has disconnected.", + "name": "nodeID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Users", + "longname": "Users.avatarDisconnected", + "scope": "static" + }, + { + "description": "A 3-dimensional vector. See also the {@link Vec3(0)|Vec3} object.", + "kind": "typedef", + "name": "Vec3", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "X-coordinate of the vector.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Y-coordinate of the vector.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Z-coordinate of the vector.", + "name": "z" + } + ], + "longname": "Vec3", + "scope": "global" + }, + { + "description": "A color vector. See also the {@link Vec3(0)|Vec3} object.", + "kind": "typedef", + "name": "Vec3Color", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Red component value. Integer in the range 0 - 255.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Green component value. Integer in the range 0 - 255.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Blue component value. Integer in the range 0 - 255.", + "name": "z" + } + ], + "longname": "Vec3Color", + "scope": "global" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Vec3 API facilities for generating and manipulating 3-dimensional vectors. High Fidelity uses a right-handed \rCartesian coordinate system where the y-axis is the \"up\" and the negative z-axis is the \"front\" direction.\r\"High", + "kind": "namespace", + "name": "Vec3", + "variation": "0", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 1, y: 0, z: 0 } : Unit vector in the x-axis direction. Read-only.", + "name": "UNIT_X" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0, y: 1, z: 0 } : Unit vector in the y-axis direction. Read-only.", + "name": "UNIT_Y" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0, y: 0, z: 1 } : Unit vector in the z-axis direction. Read-only.", + "name": "UNIT_Z" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: -1, y: 0, z: 0 } : Unit vector in the negative x-axis direction. \r Read-only.", + "name": "UNIT_NEG_X" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0, y: -1, z: 0 } : Unit vector in the negative y-axis direction. \r Read-only.", + "name": "UNIT_NEG_Y" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0, y: 0, z: -1 } : Unit vector in the negative z-axis direction. \r Read-only.", + "name": "UNIT_NEG_Z" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0.707107, y: 0.707107, z: 0 } : Unit vector in the direction of the diagonal \r between the x and y axes. Read-only.", + "name": "UNIT_XY" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0.707107, y: 0, z: 0.707107 } : Unit vector in the direction of the diagonal \r between the x and z axes. Read-only.", + "name": "UNIT_XZ" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0, y: 0.707107, z: 0.707107 } : Unit vector in the direction of the diagonal \r between the y and z axes. Read-only.", + "name": "UNIT_YZ" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0.577350, y: 0.577350, z: 0.577350 } : Unit vector in the direction of the \r diagonal between the x, y, and z axes. Read-only.", + "name": "UNIT_XYZ" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 3.402823e+38, y: 3.402823e+38, z: 3.402823e+38 } : Vector with all axis \r values set to the maximum floating point value. Read-only.", + "name": "FLOAT_MAX" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: -3.402823e+38, y: -3.402823e+38, z: -3.402823e+38 } : Vector with all axis \r values set to the negative of the maximum floating point value. Read-only.", + "name": "FLOAT_MIN" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0, y: 0, z: 0 } : Vector with all axis values set to 0. \r Read-only.", + "name": "ZERO" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 1, y: 1, z: 1 } : Vector with all axis values set to 1. \r Read-only.", + "name": "ONE" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 2, y: 2, z: 2 } : Vector with all axis values set to 2. \r Read-only.", + "name": "TWO" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0.5, y: 0.5, z: 0.5 } : Vector with all axis values set to 0.5. \r Read-only.", + "name": "HALF" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 1, y: 0, z: 0 } : Unit vector in the \"right\" direction. Synonym for \r UNIT_X. Read-only.", + "name": "RIGHT" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0, y: 1, z: 0 } : Unit vector in the \"up\" direction. Synonym for \r UNIT_Y. Read-only.", + "name": "UP" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "{ x: 0, y: 0, z: -1 } : Unit vector in the \"front\" direction. Synonym for \r UNIT_NEG_Z. Read-only.", + "name": "FRONT" + } + ], + "longname": "Vec3(0)", + "scope": "global" + }, + { + "description": "Calculate the reflection of a vector in a plane.", + "kind": "function", + "name": "reflect", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector to reflect.", + "name": "v" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The normal of the plane.", + "name": "normal" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector reflected in the plane given by the normal." + } + ], + "examples": [ + "Reflect a vector in the x-z plane.\rvar v = { x: 1, y: 2, z: 3 };\rvar normal = Vec3.UNIT_Y;\rvar reflected = Vec3.reflect(v, normal);\rprint(JSON.stringify(reflected)); // {\"x\":1,\"y\":-2,\"z\":3}" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).reflect", + "scope": "static" + }, + { + "description": "Calculate the cross product of two vectors.", + "kind": "function", + "name": "cross", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The cross product of v1 and v2." + } + ], + "examples": [ + "The cross product of x and y unit vectors is the z unit vector.\rvar v1 = { x: 1, y: 0, z: 0 };\rvar v2 = { x: 0, y: 1, z: 0 };\rvar crossProduct = Vec3.cross(v1, v2);\rprint(JSON.stringify(crossProduct)); // {\"x\":0,\"y\":0,\"z\":1}" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).cross", + "scope": "static" + }, + { + "description": "Calculate the dot product of two vectors.", + "kind": "function", + "name": "dot", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The dot product of v1 and v2." + } + ], + "examples": [ + "The dot product of vectors at right angles is 0.\rvar v1 = { x: 1, y: 0, z: 0 };\rvar v2 = { x: 0, y: 1, z: 0 };\rvar dotProduct = Vec3.dot(v1, v2);\rprint(dotProduct); // 0" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).dot", + "scope": "static" + }, + { + "description": "Multiply a vector by a scale factor.", + "kind": "function", + "name": "multiply", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector.", + "name": "v" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The scale factor.", + "name": "scale" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector with each ordinate value multiplied by the scale." + } + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).multiply", + "scope": "static" + }, + { + "description": "Multiply a vector by a scale factor.", + "kind": "function", + "name": "multiply", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The scale factor.", + "name": "scale" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector.", + "name": "v" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector with each ordinate value multiplied by the scale." + } + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).multiply", + "scope": "static" + }, + { + "description": "Multiply two vectors.", + "kind": "function", + "name": "multiplyVbyV", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "A vector formed by multiplying the ordinates of two vectors: { x: v1.x * v2.x, y: v1.y * v2.y, \r z: v1.z * v2.z }." + } + ], + "examples": [ + "Multiply two vectors.\rvar v1 = { x: 1, y: 2, z: 3 };\rvar v2 = { x: 1, y: 2, z: 3 };\rvar multiplied = Vec3.multiplyVbyV(v1, v2);\rprint(JSON.stringify(multiplied)); // {\"x\":1,\"y\":4,\"z\":9}" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).multiplyVbyV", + "scope": "static" + }, + { + "description": "Rotate a vector.", + "kind": "function", + "name": "multiplyQbyV", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation to apply.", + "name": "q" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector to rotate.", + "name": "v" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "v rotated by q." + } + ], + "examples": [ + "Rotate the negative z-axis by 90 degrees about the x-axis.\rvar v = Vec3.UNIT_NEG_Z;\rvar q = Quat.fromPitchYawRollDegrees(90, 0, 0);\rvar result = Vec3.multiplyQbyV(q, v);\rprint(JSON.stringify(result)); // {\"x\":0,\"y\":1.000,\"z\":1.19e-7}" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).multiplyQbyV", + "scope": "static" + }, + { + "description": "Calculate the sum of two vectors.", + "kind": "function", + "name": "sum", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The sum of the two vectors." + } + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).sum", + "scope": "static" + }, + { + "description": "Calculate one vector subtracted from another.", + "kind": "function", + "name": "subtract", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector subtracted from the first." + } + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).subtract", + "scope": "static" + }, + { + "description": "Calculate the length of a vector", + "kind": "function", + "name": "length", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector.", + "name": "v" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The length of the vector." + } + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).length", + "scope": "static" + }, + { + "description": "Calculate the distance between two points.", + "kind": "function", + "name": "distance", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first point.", + "name": "p1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second point.", + "name": "p2" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The distance between the two points." + } + ], + "examples": [ + "The distance between two points is aways positive.\rvar p1 = { x: 0, y: 0, z: 0 };\rvar p2 = { x: 0, y: 0, z: 10 };\rvar distance = Vec3.distance(p1, p2);\rprint(distance); // 10\r\rp2 = { x: 0, y: 0, z: -10 };\rdistance = Vec3.distance(p1, p2);\rprint(distance); // 10" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).distance", + "scope": "static" + }, + { + "description": "Calculate the angle of rotation from one vector onto another, with the sign depending on a reference vector.", + "kind": "function", + "name": "orientedAngle", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Reference vector.", + "name": "ref" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The angle of rotation from the first vector to the second, in degrees, with a positive sign if the \rrotation axis aligns with the reference vector (has a positive dot product) otherwise a negative sign." + } + ], + "examples": [ + "Compare Vec3.angle() and Vec3.orientedAngle().\rvar v1 = { x: 5, y: 0, z: 0 };\rvar v2 = { x: 5, y: 0, z: 5 };\rvar angle = Vec3.getAngle(v1, v2);\rprint(angle * 180 / Math.PI); // 45\r\rprint(Vec3.orientedAngle(v1, v2, Vec3.UNIT_Y)); // -45\rprint(Vec3.orientedAngle(v1, v2, Vec3.UNIT_NEG_Y)); // 45\rprint(Vec3.orientedAngle(v1, v2, { x: 1, y: 2, z: -1 })); // -45\rprint(Vec3.orientedAngle(v1, v2, { x: 1, y: -2, z: -1 })); // 45" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).orientedAngle", + "scope": "static" + }, + { + "description": "Normalize a vector so that its length is 1.", + "kind": "function", + "name": "normalize", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector to normalize.", + "name": "v" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector normalized to have a length of 1." + } + ], + "examples": [ + "Normalize a vector.\rvar v = { x: 10, y: 10, z: 0 };\rvar normalized = Vec3.normalize(v);\rprint(JSON.stringify(normalized)); // {\"x\":0.7071,\"y\":0.7071,\"z\":0}\rprint(Vec3.length(normalized)); // 1" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).normalize", + "scope": "static" + }, + { + "description": "Calculate a linear interpolation between two vectors.", + "kind": "function", + "name": "mix", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The interpolation factor in the range 0.0 to 1.0.", + "name": "factor" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The linear interpolation between the two vectors: (1 - factor) * v1 + factor * v2." + } + ], + "examples": [ + "Linear interpolation between two vectors.\rvar v1 = { x: 10, y: 0, z: 0 };\rvar v2 = { x: 0, y: 10, z: 0 };\rvar interpolated = Vec3.mix(v1, v2, 0.75); // 1/4 of v1 and 3/4 of v2.\rprint(JSON.stringify(interpolated)); // {\"x\":2.5,\"y\":7.5\",\"z\":0}" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).mix", + "scope": "static" + }, + { + "description": "Print to the program log a text label followed by a vector value.", + "kind": "function", + "name": "print", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The label to print.", + "name": "label" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The vector value to print.", + "name": "v" + } + ], + "examples": [ + "Two ways of printing a label and vector value.\rvar v = { x: 1, y: 2, z: 3 };\rVec3.print(\"Vector: \", v); // dvec3(1.000000, 2.000000, 3.000000)\rprint(\"Vector: \" + JSON.stringify(v)); // {\"x\":1,\"y\":2,\"z\":3}" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).print", + "scope": "static" + }, + { + "description": "Test whether two vectors are equal. Note: The vectors must be exactly equal in order for \rtrue to be returned; it is often better to use {@link Vec3(0).withinEpsilon|withinEpsilon}.", + "kind": "function", + "name": "equal", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the two vectors are exactly equal, otherwise false." + } + ], + "examples": [ + " Vectors are only equal if exactly the same.\rvar v1 = { x: 10, y: 10, z: 10 };\rvar v2 = { x: 10, y: 10, z: 10 };\rvar equal = Vec3.equal(v1, v2);\rprint(equal); // true\r\rv2 = { x: 10, y: 10, z: 10.0005 };\requal = Vec3.equal(v1, v2);\rprint(equal); // false" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).equal", + "scope": "static" + }, + { + "description": "Test whether two vectors are equal within a tolerance. Note: It is often better to use this function \rthan {@link Vec3(0).equal|equal}.", + "kind": "function", + "name": "withinEpsilon", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The maximum distance between the two vectors.", + "name": "epsilon" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the distance between the points represented by the vectors is less than or equal \rto the epsilon, otherwise false." + } + ], + "examples": [ + "Testing vectors for near equality.\rvar v1 = { x: 10, y: 10, z: 10 };\rvar v2 = { x: 10, y: 10, z: 10.0005 };\rvar equal = Vec3.equal(v1, v2);\rprint(equal); // false\r\requal = Vec3.withinEpsilon(v1, v2, 0.001);\rprint(equal); // true" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).withinEpsilon", + "scope": "static" + }, + { + "description": "Calculate polar coordinates (elevation, azimuth, radius) that transform the unit z-axis vector onto a point.", + "kind": "function", + "name": "toPolar", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point to calculate the polar coordinates for.", + "name": "p" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Vector of polar coordinates for the point: x elevation rotation about the x-axis in \r radians, y azimuth rotation about the y-axis in radians, and z scale." + } + ], + "examples": [ + "Polar coordinates for a point.\rvar v = { x: 5, y: 2.5, z: 5 };\rvar polar = Vec3.toPolar(v);\rprint(\"Elevation: \" + polar.x * 180 / Math.PI); // -19.471\rprint(\"Azimuth: \" + polar.y * 180 / Math.PI); // 45\rprint(\"Radius: \" + polar.z); // 7.5" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).toPolar", + "scope": "static" + }, + { + "description": "Calculate the coordinates of a point from polar coordinate transformation of the unit z-axis vector.", + "kind": "function", + "name": "fromPolar", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The polar coordinates of a point: x elevation rotation about the x-axis in radians, \r y azimuth rotation about the y-axis in radians, and z scale.", + "name": "polar" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The coordinates of the point." + } + ], + "examples": [ + "Polar coordinates to Cartesian.\rvar polar = { x: -19.471 * Math.PI / 180, y: 45 * Math.PI / 180, z: 7.5 };\rvar p = Vec3.fromPolar(polar);\rprint(JSON.stringify(p)); // {\"x\":5,\"y\":2.5,\"z\":5}" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).fromPolar", + "scope": "static" + }, + { + "description": "Calculate the unit vector corresponding to polar coordinates elevation and azimuth transformation of the unit z-axis \rvector.", + "kind": "function", + "name": "fromPolar", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Rotation about the x-axis, in radians.", + "name": "elevation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Rotation about the y-axis, in radians.", + "name": "azimuth" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Unit vector for the direction specified by elevation and azimuth." + } + ], + "examples": [ + "Polar coordinates to Cartesian.\rvar elevation = -19.471 * Math.PI / 180;\rvar rotation = 45 * Math.PI / 180;\rvar p = Vec3.fromPolar(elevation, rotation);\rprint(JSON.stringify(p)); // {\"x\":0.667,\"y\":0.333,\"z\":0.667}\r\rp = Vec3.multiply(7.5, p);\rprint(JSON.stringify(p)); // {\"x\":5,\"y\":2.5,\"z\":5}" + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).fromPolar", + "scope": "static" + }, + { + "description": "Calculate the angle between two vectors.", + "kind": "function", + "name": "getAngle", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The first vector.", + "name": "v1" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The second vector.", + "name": "v2" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The angle between the two vectors, in radians." + } + ], + "examples": [ + "Calculate the angle between two vectors.\rvar v1 = { x: 10, y: 0, z: 0 };\rvar v2 = { x: 0, y: 0, z: 10 };\rvar angle = Vec3.getAngle(v1, v2);\rprint(angle * 180 / Math.PI); // 90\r\n " + ], + "memberof": "Vec3(0)", + "longname": "Vec3(0).getAngle", + "scope": "static" + }, + { + "description": "A mouse wheel event.", + "kind": "typedef", + "name": "WheelEvent", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer x-coordinate of the event on the Interface window or HMD HUD.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer y-coordinate of the event on the Interface window or HMD HUD.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer number indicating the direction and speed to scroll: positive numbers to scroll up, and \r negative numers to scroll down.", + "name": "delta" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The orientation of the wheel: \"VERTICAL\" for a typical mouse; \r \"HORIZONTAL\" for a \"horizontal\" wheel.", + "name": "orientation" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the left button was pressed when the event was generated, otherwise \r false.", + "name": "isLeftButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the middle button was pressed when the event was generated, \r otherwise false.", + "name": "isMiddleButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the right button was pressed when the event was generated, \r otherwise false.", + "name": "isRightButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the Shift key was pressed when the event was generated, otherwise\r false.", + "name": "isShifted" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the \"meta\" key was pressed when the event was generated, otherwise\r false. On Windows the \"meta\" key is the Windows key; on OSX it is the Control (Splat) key.", + "name": "isMeta" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the \"control\" key was pressed when the event was generated, otherwise\r false. On Windows the \"control\" key is the Ctrl key; on OSX it is the Command key.", + "name": "isControl" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the Alt key was pressed when the event was generated, otherwise\r false.", + "name": "isAlt" + } + ], + "examples": [ + "Report the WheelEvent details for each wheel rotation.\rController.wheelEvent.connect(function (event) {\r print(JSON.stringify(event));\r});\r\n " + ], + "longname": "WheelEvent", + "scope": "global" + }, + { + "description": "

A BoxFace specifies the face of an axis-aligned (AA) box.\r\r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
\"MIN_X_FACE\"The minimum x-axis face.
\"MAX_X_FACE\"The maximum x-axis face.
\"MIN_Y_FACE\"The minimum y-axis face.
\"MAX_Y_FACE\"The maximum y-axis face.
\"MIN_Z_FACE\"The minimum z-axis face.
\"MAX_Z_FACE\"The maximum z-axis face.
\"UNKNOWN_FACE\"Unknown value.
", + "kind": "typedef", + "name": "BoxFace", + "type": { + "names": [ + "string" + ] + }, + "longname": "BoxFace", + "scope": "global" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

Helper functions to render ephemeral debug markers and lines.\rDebugDraw markers and lines are only visible locally, they are not visible by other users.", + "kind": "namespace", + "name": "DebugDraw", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "longname": "DebugDraw", + "scope": "global" + }, + { + "description": "Draws a line in world space, but it will only be visible for a single frame.", + "kind": "function", + "name": "drawRay", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "start position of line in world space.", + "name": "start" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "end position of line in world space.", + "name": "end" + }, + { + "type": { + "names": [ + "Vec4" + ] + }, + "description": "color of line, each component should be in the zero to one range. x = red, y = blue, z = green, w = alpha.", + "name": "color" + } + ], + "memberof": "DebugDraw", + "longname": "DebugDraw.drawRay", + "scope": "static" + }, + { + "description": "Adds a debug marker to the world. This marker will be drawn every frame until it is removed with DebugDraw.removeMarker.\rThis can be called repeatedly to change the position of the marker.", + "kind": "function", + "name": "addMarker", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "name to uniquely identify this marker, later used for DebugDraw.removeMarker.", + "name": "key" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "start position of line in world space.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "position of the marker in world space.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec4" + ] + }, + "description": "color of the marker.", + "name": "color" + } + ], + "memberof": "DebugDraw", + "longname": "DebugDraw.addMarker", + "scope": "static" + }, + { + "description": "Removes debug marker from the world. Once a marker is removed, it will no longer be visible.", + "kind": "function", + "name": "removeMarker", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "name of marker to remove.", + "name": "key" + } + ], + "memberof": "DebugDraw", + "longname": "DebugDraw.removeMarker", + "scope": "static" + }, + { + "description": "Adds a debug marker to the world, this marker will be drawn every frame until it is removed with DebugDraw.removeMyAvatarMarker.\rThis can be called repeatedly to change the position of the marker.", + "kind": "function", + "name": "addMyAvatarMarker", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "name to uniquely identify this marker, later used for DebugDraw.removeMyAvatarMarker.", + "name": "key" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "start position of line in avatar space.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "position of the marker in avatar space.", + "name": "position" + }, + { + "type": { + "names": [ + "Vec4" + ] + }, + "description": "color of the marker.", + "name": "color" + } + ], + "memberof": "DebugDraw", + "longname": "DebugDraw.addMyAvatarMarker", + "scope": "static" + }, + { + "description": "Removes debug marker from the world. Once a marker is removed, it will no longer be visible", + "kind": "function", + "name": "removeMyAvatarMarker", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "name of marker to remove.", + "name": "key" + } + ], + "memberof": "DebugDraw", + "longname": "DebugDraw.removeMyAvatarMarker", + "scope": "static" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Paths API provides absolute paths to the scripts and resources directories.", + "kind": "namespace", + "name": "Paths", + "hifiInterface": true, + "hifiClientEntity": true, + "deprecated": "The Paths API is deprecated. Use {@link Script.resolvePath} and {@link Script.resourcesPath} instead.", + "readonly": true, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path to the scripts directory. Read-only.", + "name": "defaultScripts" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The path to the resources directory. Read-only.", + "name": "resources" + } + ], + "longname": "Paths", + "scope": "global" + }, + { + "description": "

An entity may collide with the following types of items:

\r\r \r \r \r \r \r \r \r \r \r \r
ValueDescription
1Static entities — non-dynamic entities with no velocity.
2Dynamic entities — entities that have their dynamic property set to\r true.
4Kinematic entities — non-dynamic entities with velocity.
8My avatar.
16Other avatars.
\r

The values for the collision types that are enabled are added together to give the CollisionMask value. For example, a\rvalue of 31 means that an entity will collide with all item types.

", + "kind": "typedef", + "name": "CollisionMask", + "type": { + "names": [ + "number" + ] + }, + "memberof": "Entities", + "longname": "Entities.CollisionMask", + "scope": "static" + }, + { + "description": "A PointerEvent defines a 2D or 3D mouse or similar pointer event.", + "kind": "typedef", + "name": "PointerEvent", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The type of event: \"Press\", \"DoublePress\", \"Release\", or\r \"Move\".", + "name": "type" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer number used to identify the pointer: 0 = hardware mouse, 1 = left\r controller, 2 = right controller.", + "name": "id" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "description": "The 2D position of the event on the intersected overlay or entity XY plane, where applicable.", + "name": "pos2D" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The 3D position of the event on the intersected overlay or entity, where applicable.", + "name": "pos3D" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The surface normal at the intersection point.", + "name": "normal" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The direction of the intersection ray.", + "name": "direction" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the button pressed: None, Primary, Secondary,\r or Tertiary.", + "name": "button" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the button pressed was the primary button, otherwise \r undefined;", + "name": "isPrimaryButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the button pressed was the primary button, otherwise\r undefined;", + "name": "isLeftButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the button pressed was the secondary button, otherwise\r undefined;", + "name": "isSecondaryButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the button pressed was the secondary button, otherwise\r undefined;", + "name": "isRightButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the button pressed was the tertiary button, otherwise\r undefined;", + "name": "isTertiaryButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the button pressed was the tertiary button, otherwise\r undefined;", + "name": "isMiddleButton" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the primary button is currently being pressed, otherwise\r false", + "name": "isPrimaryHeld" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the secondary button is currently being pressed, otherwise\r false", + "name": "isSecondaryHeld" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true if the tertiary button is currently being pressed, otherwise\r false", + "name": "isTertiaryHeld" + }, + { + "type": { + "names": [ + "KeyboardModifiers" + ] + }, + "description": "Integer value with bits set according to which keyboard modifier keys were\r pressed when the event was generated.", + "name": "keyboardModifiers" + } + ], + "longname": "PointerEvent", + "scope": "global" + }, + { + "description": "

A KeyboardModifiers value is used to specify which modifier keys on the keyboard are pressed. The value is the sum \r(bitwise OR) of the relevant combination of values from the following table:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
KeyHexadecimal valueDecimal valueDescription
Shift0x0200000033554432A Shift key on the keyboard is pressed.
Control0x0400000067108864A control key on the keyboard is pressed. On Windows the \"control\" key is the Ctrl key; on OSX it is the Command \r key.
Alt0x08000000134217728An Alt key on the keyboard is pressed.
Meta0x10000000268435456A meta key on the keyboard is pressed. On Windows the \"meta\" key is the Windows key; on OSX it is the Control \r (Splat) key.
Keypad0x20000000536870912A keypad button is pressed.
Group0x400000001073741824X11 operating system only: An AltGr / Mode_switch key on the keyboard is pressed.
", + "kind": "typedef", + "name": "KeyboardModifiers", + "type": { + "names": [ + "number" + ] + }, + "longname": "KeyboardModifiers", + "scope": "global" + }, + { + "description": "Defines a rectangular portion of an image or screen, or similar.", + "kind": "typedef", + "name": "Rect", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Left, x-coordinate value.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Top, y-coordinate value.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Width of the rectangle.", + "name": "width" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Height of the rectangle.", + "name": "height" + } + ], + "longname": "Rect", + "scope": "global" + }, + { + "description": "An RGB color value.", + "kind": "typedef", + "name": "Color", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Red component value. Integer in the range 0 - 255.", + "name": "red" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Green component value. Integer in the range 0 - 255.", + "name": "green" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Blue component value. Integer in the range 0 - 255.", + "name": "blue" + } + ], + "longname": "Color", + "scope": "global" + }, + { + "description": "An axis-aligned cube, defined as the bottom right near (minimum axes values) corner of the cube plus the dimension of its \rsides.", + "kind": "typedef", + "name": "AACube", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "X coordinate of the brn corner of the cube.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Y coordinate of the brn corner of the cube.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Z coordinate of the brn corner of the cube.", + "name": "z" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The dimensions of each side of the cube.", + "name": "scale" + } + ], + "longname": "AACube", + "scope": "global" + }, + { + "kind": "typedef", + "name": "Collision", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "ContactEventType" + ] + }, + "description": "The contact type of the collision event.", + "name": "type" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of one of the entities in the collision.", + "name": "idA" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the other of the entities in the collision.", + "name": "idB" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The amount of penetration between the two entities.", + "name": "penetration" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The point of contact.", + "name": "contactPoint" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The change in relative velocity of the two entities, in m/s.", + "name": "velocityChange" + } + ], + "longname": "Collision", + "scope": "global" + }, + { + "description": "A 2D size value.", + "kind": "typedef", + "name": "Size", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The height value.", + "name": "height" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The width value.", + "name": "width" + } + ], + "longname": "Size", + "scope": "global" + }, + { + "kind": "typedef", + "name": "AnimationDetails", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "role" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "fps" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "priority" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "loop" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "hold" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "startAutomatically" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "firstFrame" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "lastFrame" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "running" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "currentFrame" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "allowTranslation" + } + ], + "memberof": "Avatar", + "longname": "Avatar.AnimationDetails", + "scope": "static" + }, + { + "description": "A 4-dimensional vector.", + "kind": "typedef", + "name": "Vec4", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "X-coordinate of the vector.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Y-coordinate of the vector.", + "name": "y" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Z-coordinate of the vector.", + "name": "z" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "W-coordinate of the vector.", + "name": "w" + } + ], + "longname": "Vec4", + "scope": "global" + }, + { + "description": "A 2-dimensional vector.", + "kind": "typedef", + "name": "Vec2", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "X-coordinate of the vector.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Y-coordinate of the vector.", + "name": "y" + } + ], + "longname": "Vec2", + "scope": "global" + }, + { + "description": "A PickRay defines a vector with a starting point. It is used, for example, when finding entities or overlays that lie under a\rmouse click or intersect a laser beam.", + "kind": "typedef", + "name": "PickRay", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The starting position of the PickRay.", + "name": "origin" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The direction that the PickRay travels.", + "name": "direction" + } + ], + "longname": "PickRay", + "scope": "global" + }, + { + "description": "A StylusTip defines the tip of a stylus.", + "kind": "typedef", + "name": "StylusTip", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The hand the tip is attached to: 0 for left, 1 for right.", + "name": "side" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the stylus tip.", + "name": "position" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the stylus tip.", + "name": "orientation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The velocity of the stylus tip.", + "name": "velocity" + } + ], + "longname": "StylusTip", + "scope": "global" + }, + { + "description": "A PickParabola defines a parabola with a starting point, intitial velocity, and acceleration.", + "kind": "typedef", + "name": "PickParabola", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The starting position of the PickParabola.", + "name": "origin" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The starting velocity of the parabola.", + "name": "velocity" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The acceleration that the parabola experiences.", + "name": "acceleration" + } + ], + "longname": "PickParabola", + "scope": "global" + }, + { + "description": "A CollisionRegion defines a volume for checking collisions in the physics simulation.", + "kind": "typedef", + "name": "CollisionRegion", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Shape" + ] + }, + "description": "The information about the collision region's size and shape. Dimensions are in world space, but will scale with the parent if defined.", + "name": "shape" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the collision region, relative to a parent if defined.", + "name": "position" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the collision region, relative to a parent if defined.", + "name": "orientation" + }, + { + "type": { + "names": [ + "float" + ] + }, + "description": "The approximate minimum penetration depth for a test object to be considered in contact with the collision region.\rThe depth is measured in world space, but will scale with the parent if defined.", + "name": "threshold" + }, + { + "type": { + "names": [ + "CollisionMask" + ] + }, + "optional": true, + "defaultvalue": 8, + "description": "The type of object this collision pick collides as. Objects whose collision masks overlap with the pick's collision group\rwill be considered colliding with the pick.", + "name": "collisionGroup" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the parent, either an avatar, an entity, or an overlay.", + "name": "parentID" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)", + "name": "parentJointIndex" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "If \"Mouse,\" parents the pick to the mouse. If \"Avatar,\" parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar.", + "name": "joint" + } + ], + "longname": "CollisionRegion", + "scope": "global" + }, + { + "description": "

The type of a collision contact event.\r\r \r \r \r \r \r \r \r \r
ValueDescription
0Start of the collision.
1Continuation of the collision.
2End of the collision.
", + "kind": "typedef", + "name": "ContactEventType", + "type": { + "names": [ + "number" + ] + }, + "longname": "ContactEventType", + "scope": "global" + }, + { + "description": "
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

A handle for a mesh in an entity, such as returned by {@link Entities.getMeshes}.", + "kind": "class", + "name": "MeshProxy", + "hifiInterface": true, + "hifiClientEntity": true, + "hifiServerEntity": true, + "hifiAssignmentClient": true, + "deprecated": "Use the {@link Graphics} API instead.", + "longname": "MeshProxy", + "scope": "global" + }, + { + "description": "Get the number of vertices in the mesh.", + "kind": "function", + "name": "getNumVertices", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer number of vertices in the mesh." + } + ], + "deprecated": "Use the {@link Graphics} API instead.", + "memberof": "MeshProxy", + "longname": "MeshProxy#getNumVertices", + "scope": "instance" + }, + { + "description": "Get the position of a vertex in the mesh.", + "kind": "function", + "name": "getPos", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Integer index of the mesh vertex.", + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Local position of the vertex relative to the mesh." + } + ], + "deprecated": "Use the {@link Graphics} API instead.", + "memberof": "MeshProxy", + "longname": "MeshProxy#getPos", + "scope": "instance" + }, + { + "description": "

A ShapeType defines the shape used for collisions or zones.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
\"none\"No shape.
\"box\"A cube.
\"sphere\"A sphere.
\"capsule-x\"A capsule (cylinder with spherical ends) oriented on the x-axis.
\"capsule-y\"A capsule (cylinder with spherical ends) oriented on the y-axis.
\"capsule-z\"A capsule (cylinder with spherical ends) oriented on the z-axis.
\"cylinder-x\"A cylinder oriented on the x-axis.
\"cylinder-y\"A cylinder oriented on the y-axis.
\"cylinder-z\"A cylinder oriented on the z-axis.
\"hull\"Not used.
\"compound\"A compound convex hull specified in an OBJ file.
\"simple-hull\"A convex hull automatically generated from the model.
\"simple-compound\"A compound convex hull automatically generated from the model, using \r sub-meshes.
\"static-mesh\"The exact shape of the model.
\"plane\"A plane.
", + "kind": "typedef", + "name": "ShapeType", + "type": { + "names": [ + "string" + ] + }, + "longname": "ShapeType", + "scope": "global" + }, + { + "description": "

Camera modes affect the position of the camera and the controls for camera movement. The camera can be in one of the\rfollowing modes:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ModeStringDescription
First Person\"first person\"The camera is positioned such that you have the same view as your avatar. The camera moves and rotates with your\r avatar.
Third Person\"third person\"The camera is positioned such that you have a view from just behind your avatar. The camera moves and rotates with\r your avatar.
Mirror\"mirror\"The camera is positioned such that you are looking directly at your avatar. The camera moves and rotates with your \r avatar.
Independent\"independent\"The camera's position and orientation don't change with your avatar movement. Instead, they can be set via \r scripting.
Entity\"entity\"The camera's position and orientation are set to be the same as a specified entity's, and move with the entity as\r it moves.\r
", + "kind": "typedef", + "name": "Mode", + "type": { + "names": [ + "string" + ] + }, + "memberof": "Camera", + "longname": "Camera.Mode", + "scope": "static" + }, + { + "description": "A ViewFrustum has a \"keyhole\" shape: a regular frustum for stuff that is visible plus a central sphere for stuff that is\rnearby (for physics simulation).", + "kind": "typedef", + "name": "ViewFrustum", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The location of the frustum's apex.", + "name": "position" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The direction that the frustum is looking at.", + "name": "orientation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Center radius of the keyhole in meters.", + "name": "centerRadius" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Horizontal field of view in degrees.", + "name": "fieldOfView" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Aspect ratio of the frustum.", + "name": "aspectRatio" + }, + { + "type": { + "names": [ + "Mat4" + ] + }, + "description": "The projection matrix for the view defined by the frustum.", + "name": "projection" + } + ], + "longname": "ViewFrustum", + "scope": "global" + }, + { + "description": "
Available in:Interface ScriptsClient Entity Scripts

The Camera API provides access to the \"camera\" that defines your view in desktop and HMD display modes.", + "kind": "namespace", + "name": "Camera", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position of the camera. You can set this value only when the camera is in independent \r mode.", + "name": "position" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation of the camera. You can set this value only when the camera is in \r independent mode.", + "name": "orientation" + }, + { + "type": { + "names": [ + "Camera.Mode" + ] + }, + "description": "The camera mode.", + "name": "mode" + }, + { + "type": { + "names": [ + "ViewFrustum" + ] + }, + "description": "The camera frustum.", + "name": "frustum" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "The ID of the entity that is used for the camera position and orientation when the \r camera is in entity mode.", + "name": "cameraEntity" + } + ], + "longname": "Camera", + "scope": "global" + }, + { + "description": "Get the current camera mode. You can also get the mode using the Camera.mode property.", + "kind": "function", + "name": "getModeString", + "returns": [ + { + "type": { + "names": [ + "Camera.Mode" + ] + }, + "description": "The current camera mode." + } + ], + "memberof": "Camera", + "longname": "Camera.getModeString", + "scope": "static" + }, + { + "description": "Set the camera mode. You can also set the mode using the Camera.mode property.", + "kind": "function", + "name": "setModeString", + "params": [ + { + "type": { + "names": [ + "Camera.Mode" + ] + }, + "description": "The mode to set the camera to.", + "name": "mode" + } + ], + "memberof": "Camera", + "longname": "Camera.setModeString", + "scope": "static" + }, + { + "description": "Get the current camera position. You can also get the position using the Camera.position property.", + "kind": "function", + "name": "getPosition", + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The current camera position." + } + ], + "memberof": "Camera", + "longname": "Camera.getPosition", + "scope": "static" + }, + { + "description": "Set the camera position. You can also set the position using the Camera.position property. Only works if the\r camera is in independent mode.", + "kind": "function", + "name": "setPosition", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The position to set the camera at.", + "name": "position" + } + ], + "memberof": "Camera", + "longname": "Camera.setPosition", + "scope": "static" + }, + { + "description": "Get the current camera orientation. You can also get the orientation using the Camera.orientation property.", + "kind": "function", + "name": "getOrientation", + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The current camera orientation." + } + ], + "memberof": "Camera", + "longname": "Camera.getOrientation", + "scope": "static" + }, + { + "description": "Set the camera orientation. You can also set the orientation using the Camera.orientation property. Only\r works if the camera is in independent mode.", + "kind": "function", + "name": "setOrientation", + "params": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The orientation to set the camera to.", + "name": "orientation" + } + ], + "memberof": "Camera", + "longname": "Camera.setOrientation", + "scope": "static" + }, + { + "description": "Compute a {@link PickRay} based on the current camera configuration and the specified x, y position on the \r screen. The {@link PickRay} can be used in functions such as {@link Entities.findRayIntersection} and \r {@link Overlays.findRayIntersection}.", + "kind": "function", + "name": "computePickRay", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "X-coordinate on screen.", + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Y-coordinate on screen.", + "name": "y" + } + ], + "returns": [ + { + "type": { + "names": [ + "PickRay" + ] + }, + "description": "The computed {@link PickRay}." + } + ], + "examples": [ + "Use a PickRay to detect mouse clicks on entities.\rfunction onMousePressEvent(event) {\r var pickRay = Camera.computePickRay(event.x, event.y);\r var intersection = Entities.findRayIntersection(pickRay);\r if (intersection.intersects) {\r print (\"You clicked on entity \" + intersection.entityID);\r }\r}\r\rController.mousePressEvent.connect(onMousePressEvent);" + ], + "memberof": "Camera", + "longname": "Camera.computePickRay", + "scope": "static" + }, + { + "description": "Rotate the camera to look at the specified position. Only works if the camera is in independent mode.", + "kind": "function", + "name": "lookAt", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Position to look at.", + "name": "position" + } + ], + "examples": [ + "Rotate your camera to look at entities as you click on them with your mouse.\rfunction onMousePressEvent(event) {\r var pickRay = Camera.computePickRay(event.x, event.y);\r var intersection = Entities.findRayIntersection(pickRay);\r if (intersection.intersects) {\r // Switch to independent mode.\r Camera.mode = \"independent\";\r // Look at the entity that was clicked.\r var properties = Entities.getEntityProperties(intersection.entityID, \"position\");\r Camera.lookAt(properties.position);\r }\r}\r\rController.mousePressEvent.connect(onMousePressEvent);" + ], + "memberof": "Camera", + "longname": "Camera.lookAt", + "scope": "static" + }, + { + "description": "Set the camera to continue looking at the specified position even while the camera moves. Only works if the \rcamera is in independent mode.", + "kind": "function", + "name": "keepLookingAt", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "Position to keep looking at.", + "name": "position" + } + ], + "memberof": "Camera", + "longname": "Camera.keepLookingAt", + "scope": "static" + }, + { + "description": "Stops the camera from continually looking at the position that was set with Camera.keepLookingAt.", + "kind": "function", + "name": "stopLookingAt", + "memberof": "Camera", + "longname": "Camera.stopLookingAt", + "scope": "static" + }, + { + "description": "Triggered when the camera mode changes.", + "kind": "function", + "name": "modeUpdated", + "params": [ + { + "type": { + "names": [ + "Camera.Mode" + ] + }, + "description": "The new camera mode.", + "name": "newMode" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "examples": [ + "Report camera mode changes.\rfunction onCameraModeUpdated(newMode) {\r print(\"The camera mode has changed to \" + newMode);\r}\r\rCamera.modeUpdated.connect(onCameraModeUpdated);\r\n " + ], + "memberof": "Camera", + "longname": "Camera.modeUpdated", + "scope": "static" + }, + { + "kind": "function", + "name": "toJSON", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Render", + "longname": "Render.toJSON", + "scope": "static" + }, + { + "kind": "function", + "name": "load", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "map" + } + ], + "memberof": "Render", + "longname": "Render.load", + "scope": "static" + }, + { + "kind": "function", + "name": "isTask", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Render", + "longname": "Render.isTask", + "scope": "static" + }, + { + "kind": "function", + "name": "getSubConfigs", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "Render", + "longname": "Render.getSubConfigs", + "scope": "static" + }, + { + "kind": "function", + "name": "getNumSubs", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Render", + "longname": "Render.getNumSubs", + "scope": "static" + }, + { + "kind": "function", + "name": "getSubConfig", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "Render", + "longname": "Render.getSubConfig", + "scope": "static" + }, + { + "kind": "function", + "name": "load", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "map" + } + ], + "memberof": "Render", + "longname": "Render.load", + "scope": "static" + }, + { + "kind": "function", + "name": "loaded", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Render", + "longname": "Render.loaded", + "scope": "static" + }, + { + "kind": "function", + "name": "newStats", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Render", + "longname": "Render.newStats", + "scope": "static" + }, + { + "kind": "function", + "name": "dirtyEnabled", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Render", + "longname": "Render.dirtyEnabled", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Render", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Read-only.", + "name": "cpuRunTime" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "longname": "Render", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "getConfig", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "Render", + "longname": "Render.getConfig", + "scope": "static" + }, + { + "kind": "function", + "name": "refresh", + "memberof": "Render", + "longname": "Render.refresh", + "scope": "static" + }, + { + "kind": "function", + "name": "muteToggled", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "FaceTracker", + "longname": "FaceTracker.muteToggled", + "scope": "static" + }, + { + "kind": "function", + "name": "toggleMute", + "memberof": "FaceTracker", + "longname": "FaceTracker.toggleMute", + "scope": "static" + }, + { + "kind": "function", + "name": "getMuted", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "FaceTracker", + "longname": "FaceTracker.getMuted", + "scope": "static" + }, + { + "kind": "class", + "name": "InteractiveWindow", + "hifiInterface": true, + "tags": [ + { + "originalTitle": "hifi-client-en", + "title": "hifi-client-en", + "text": "" + } + ], + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "title" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "size" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "visible" + }, + { + "type": { + "names": [ + "Desktop.PresentationMode" + ] + }, + "name": "presentationMode" + } + ], + "longname": "InteractiveWindow", + "scope": "global", + "description": "
Available in:Interface Scripts

" + }, + { + "kind": "function", + "name": "sendToQml", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.sendToQml", + "scope": "static" + }, + { + "kind": "function", + "name": "emitScriptEvent", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.emitScriptEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "emitWebEvent", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.emitWebEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "close", + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.close", + "scope": "static" + }, + { + "kind": "function", + "name": "show", + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.show", + "scope": "static" + }, + { + "kind": "function", + "name": "raise", + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.raise", + "scope": "static" + }, + { + "kind": "function", + "name": "visibleChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.visibleChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "positionChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.positionChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sizeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.sizeChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "presentationModeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.presentationModeChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "titleChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.titleChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "closed", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.closed", + "scope": "static" + }, + { + "kind": "function", + "name": "fromQml", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.fromQml", + "scope": "static" + }, + { + "kind": "function", + "name": "scriptEventReceived", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.scriptEventReceived", + "scope": "static" + }, + { + "kind": "function", + "name": "webEventReceived", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.webEventReceived", + "scope": "static" + }, + { + "kind": "function", + "name": "qmlToScript", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "InteractiveWindow", + "longname": "InteractiveWindow.qmlToScript", + "scope": "static" + }, + { + "kind": "namespace", + "name": "OffscreenFlags", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "navigationFocused" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "navigationFocusDisabled" + } + ], + "longname": "OffscreenFlags", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "navigationFocusedChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OffscreenFlags", + "longname": "OffscreenFlags.navigationFocusedChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "navigationFocusDisabledChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OffscreenFlags", + "longname": "OffscreenFlags.navigationFocusDisabledChanged", + "scope": "static" + }, + { + "description": "Creates a new button, adds it to this and returns it.", + "kind": "function", + "name": "addButton", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "description": "button properties", + "name": "properties" + } + ], + "returns": [ + { + "type": { + "names": [ + "TabletButtonProxy" + ] + } + } + ], + "memberof": "QmlFragmentClass", + "longname": "QmlFragmentClass#addButton", + "scope": "instance" + }, + { + "kind": "class", + "name": "OverlayWebWindow", + "params": [ + { + "type": { + "names": [ + "OverlayWindow.Properties" + ] + }, + "optional": true, + "defaultvalue": null, + "name": "properties" + } + ], + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Read-only.", + "name": "url" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "size" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "visible" + } + ], + "longname": "OverlayWebWindow", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "getURL", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.getURL", + "scope": "static" + }, + { + "kind": "function", + "name": "setURL", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.setURL", + "scope": "static" + }, + { + "kind": "function", + "name": "setScriptURL", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "script" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.setScriptURL", + "scope": "static" + }, + { + "kind": "function", + "name": "urlChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.urlChanged", + "scope": "static" + }, + { + "kind": "typedef", + "name": "Properties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "title" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "source" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "width" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "height" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "visible" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.Properties", + "scope": "static" + }, + { + "kind": "class", + "name": "OverlayWindow", + "params": [ + { + "type": { + "names": [ + "OverlayWindow.Properties" + ] + }, + "optional": true, + "defaultvalue": null, + "name": "properties" + } + ], + "hifiInterface": true, + "tags": [ + { + "originalTitle": "hifi-client-en", + "title": "hifi-client-en", + "text": "" + } + ], + "properties": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "size" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "visible" + } + ], + "longname": "OverlayWindow", + "scope": "global", + "description": "
Available in:Interface Scripts

" + }, + { + "kind": "function", + "name": "initQml", + "params": [ + { + "type": { + "names": [ + "OverlayWindow.Properties" + ] + }, + "name": "properties" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.initQml", + "scope": "static" + }, + { + "kind": "function", + "name": "isVisible", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.isVisible", + "scope": "static" + }, + { + "kind": "function", + "name": "setVisible", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "visible" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.setVisible", + "scope": "static" + }, + { + "kind": "function", + "name": "getPosition", + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.getPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "setPosition", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.setPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "setPosition", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "y" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.setPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getSize", + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.getSize", + "scope": "static" + }, + { + "kind": "function", + "name": "setSize", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "size" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.setSize", + "scope": "static" + }, + { + "kind": "function", + "name": "setSize", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "width" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "height" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.setSize", + "scope": "static" + }, + { + "kind": "function", + "name": "setTitle", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "title" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.setTitle", + "scope": "static" + }, + { + "kind": "function", + "name": "raise", + "memberof": "OverlayWindow", + "longname": "OverlayWindow.raise", + "scope": "static" + }, + { + "kind": "function", + "name": "close", + "memberof": "OverlayWindow", + "longname": "OverlayWindow.close", + "scope": "static" + }, + { + "kind": "function", + "name": "getEventBridge", + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.getEventBridge", + "scope": "static" + }, + { + "kind": "function", + "name": "sendToQml", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.sendToQml", + "scope": "static" + }, + { + "kind": "function", + "name": "clearDebugWindow", + "memberof": "OverlayWindow", + "longname": "OverlayWindow.clearDebugWindow", + "scope": "static" + }, + { + "kind": "function", + "name": "emitScriptEvent", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.emitScriptEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "emitWebEvent", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.emitWebEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "visibleChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.visibleChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "positionChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.positionChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sizeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.sizeChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "moved", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.moved", + "scope": "static" + }, + { + "kind": "function", + "name": "resized", + "params": [ + { + "type": { + "names": [ + "Size" + ] + }, + "name": "size" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.resized", + "scope": "static" + }, + { + "kind": "function", + "name": "closed", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.closed", + "scope": "static" + }, + { + "kind": "function", + "name": "fromQml", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.fromQml", + "scope": "static" + }, + { + "kind": "function", + "name": "scriptEventReceived", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.scriptEventReceived", + "scope": "static" + }, + { + "kind": "function", + "name": "webEventReceived", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.webEventReceived", + "scope": "static" + }, + { + "kind": "function", + "name": "hasMoved", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.hasMoved", + "scope": "static" + }, + { + "kind": "function", + "name": "hasClosed", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.hasClosed", + "scope": "static" + }, + { + "kind": "function", + "name": "qmlToScript", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWindow", + "longname": "OverlayWindow.qmlToScript", + "scope": "static" + }, + { + "kind": "namespace", + "name": "Tablet", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "Tablet", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "namespace", + "name": "tabletInterface", + "hifiInterface": true, + "hifiClientEntity": true, + "deprecated": "This API is deprecated and will be removed. Use {@link Tablet} instead.", + "longname": "tabletInterface", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "description": "\r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
0Button click.
1Button hover.
2Tablet open.
3Tablet hands in.
4Tablet hands out.
5Last.
", + "kind": "typedef", + "name": "AudioEvents", + "type": { + "names": [ + "number" + ] + }, + "memberof": "Tablet", + "longname": "Tablet.AudioEvents", + "scope": "static" + }, + { + "description": "Creates or returns a new TabletProxy and returns it.", + "kind": "function", + "name": "getTablet", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Tablet name.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "TabletProxy" + ] + }, + "description": "Tablet instance." + } + ], + "memberof": "Tablet", + "longname": "Tablet.getTablet", + "scope": "static" + }, + { + "description": "Creates or returns a new TabletProxy and returns it.", + "kind": "function", + "name": "getTablet", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Tablet name.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "TabletProxy" + ] + }, + "description": "Tablet instance." + } + ], + "deprecated": "This function is deprecated and will be removed. Use {@link Tablet.getTablet} instead.", + "memberof": "tabletInterface", + "longname": "tabletInterface.getTablet", + "scope": "static" + }, + { + "kind": "function", + "name": "playSound", + "params": [ + { + "type": { + "names": [ + "Tablet.AudioEvents" + ] + }, + "name": "sound" + } + ], + "memberof": "Tablet", + "longname": "Tablet.playSound", + "scope": "static" + }, + { + "kind": "function", + "name": "playSound", + "params": [ + { + "type": { + "names": [ + "Tablet.AudioEvents" + ] + }, + "name": "sound" + } + ], + "deprecated": "This function is deprecated and will be removed. Use {@link Tablet.playSound} instead.", + "memberof": "tabletInterface", + "longname": "tabletInterface.playSound", + "scope": "static" + }, + { + "description": "Triggered when a tablet message or dialog is created.", + "kind": "function", + "name": "tabletNotification", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Tablet", + "longname": "Tablet.tabletNotification", + "scope": "static" + }, + { + "description": "Triggered when a tablet message or dialog is created.", + "kind": "function", + "name": "tabletNotification", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "deprecated": "This function is deprecated and will be removed. Use {@link Tablet.tabletNotification} instead.", + "memberof": "tabletInterface", + "longname": "tabletInterface.tabletNotification", + "scope": "static" + }, + { + "kind": "typedef", + "name": "ButtonList", + "type": { + "names": [ + "object" + ] + }, + "memberof": "TabletProxy", + "longname": "TabletProxy#ButtonList", + "scope": "instance" + }, + { + "kind": "class", + "name": "TabletProxy", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "Name of this tablet. Read-only.", + "name": "name" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Used to transition this tablet into and out of toolbar mode.\r When tablet is in toolbar mode, all its buttons will appear in a floating toolbar.", + "name": "toolbarMode" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "landscape" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "Read-only.", + "name": "tabletShown" + }, + { + "type": { + "names": [ + "TabletProxy#ButtonList" + ] + }, + "description": "Read-only.", + "name": "buttons" + } + ], + "longname": "TabletProxy", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "gotoMenuScreen", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "submenu" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#gotoMenuScreen", + "scope": "instance" + }, + { + "kind": "function", + "name": "initialScreen", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "url" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#initialScreen", + "scope": "instance" + }, + { + "description": "Transition to the home screen.", + "kind": "function", + "name": "gotoHomeScreen", + "memberof": "TabletProxy", + "longname": "TabletProxy#gotoHomeScreen", + "scope": "instance" + }, + { + "description": "Show the specified Web url on the tablet.", + "kind": "function", + "name": "gotoWebScreen", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of web page.", + "name": "url" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "URL to an additional JS script to inject into the web page.", + "name": "injectedJavaScriptUrl" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "loadOtherBase" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#gotoWebScreen", + "scope": "instance" + }, + { + "kind": "function", + "name": "loadQMLSource", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "path" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "resizable" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#loadQMLSource", + "scope": "instance" + }, + { + "kind": "function", + "name": "pushOntoStack", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "path" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#pushOntoStack", + "scope": "instance" + }, + { + "kind": "function", + "name": "popFromStack", + "memberof": "TabletProxy", + "longname": "TabletProxy#popFromStack", + "scope": "instance" + }, + { + "kind": "function", + "name": "loadQMLOnTop", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "path" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#loadQMLOnTop", + "scope": "instance" + }, + { + "kind": "function", + "name": "loadWebScreenOnTop", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "path" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "injectedJavaScriptURL" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#loadWebScreenOnTop", + "scope": "instance" + }, + { + "kind": "function", + "name": "returnToPreviousApp", + "memberof": "TabletProxy", + "longname": "TabletProxy#returnToPreviousApp", + "scope": "instance" + }, + { + "description": "Check if the tablet has a message dialog open.", + "kind": "function", + "name": "isMessageDialogOpen", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#isMessageDialogOpen", + "scope": "instance" + }, + { + "description": "Close any open dialogs.", + "kind": "function", + "name": "closeDialog", + "memberof": "TabletProxy", + "longname": "TabletProxy#closeDialog", + "scope": "instance" + }, + { + "description": "Creates a new button, adds it to this and returns it.", + "kind": "function", + "name": "addButton", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "description": "Button properties.", + "name": "properties" + } + ], + "returns": [ + { + "type": { + "names": [ + "TabletButtonProxy" + ] + } + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#addButton", + "scope": "instance" + }, + { + "description": "Removes a button from the tablet.", + "kind": "function", + "name": "removeButton", + "params": [ + { + "type": { + "names": [ + "TabletButtonProxy" + ] + }, + "description": "The button to be removed", + "name": "button" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#removeButton", + "scope": "instance" + }, + { + "description": "Used to send an event to the HTML/JavaScript embedded in the tablet.", + "kind": "function", + "name": "emitScriptEvent", + "params": [ + { + "type": { + "names": [ + "object", + "string" + ] + }, + "name": "message" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#emitScriptEvent", + "scope": "instance" + }, + { + "description": "Used to send an event to the QML embedded in the tablet.", + "kind": "function", + "name": "sendToQml", + "params": [ + { + "type": { + "names": [ + "object", + "string" + ] + }, + "name": "message" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#sendToQml", + "scope": "instance" + }, + { + "description": "Check if the tablet is on the home screen.", + "kind": "function", + "name": "onHomeScreen", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#onHomeScreen", + "scope": "instance" + }, + { + "description": "Set tablet into or out of landscape mode.", + "kind": "function", + "name": "setLandscape", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true for landscape, false for portrait.", + "name": "landscape" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#setLandscape", + "scope": "instance" + }, + { + "kind": "function", + "name": "getLandscape", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#getLandscape", + "scope": "instance" + }, + { + "kind": "function", + "name": "isPathLoaded", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "path" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#isPathLoaded", + "scope": "instance" + }, + { + "description": "Signaled when this tablet receives an event from the html/js embedded in the tablet.", + "kind": "function", + "name": "webEventReceived", + "params": [ + { + "type": { + "names": [ + "object", + "string" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#webEventReceived", + "scope": "instance" + }, + { + "description": "Signaled when this tablet receives an event from the qml embedded in the tablet.", + "kind": "function", + "name": "fromQml", + "params": [ + { + "type": { + "names": [ + "object", + "string" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#fromQml", + "scope": "instance" + }, + { + "description": "Signaled when this tablet screen changes.", + "kind": "function", + "name": "screenChanged", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "\"Home\", \"Web\", \"Menu\", \"QML\", \"Closed\".", + "name": "type" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Only valid for Web and QML.", + "name": "url" + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#screenChanged", + "scope": "instance" + }, + { + "description": "Signaled when the tablet becomes visible or becomes invisible.", + "kind": "function", + "name": "isTabletShownChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "TabletProxy", + "longname": "TabletProxy#isTabletShownChanged", + "scope": "instance" + }, + { + "kind": "function", + "name": "toolbarModeChanged", + "memberof": "TabletProxy", + "longname": "TabletProxy#toolbarModeChanged", + "scope": "instance" + }, + { + "kind": "class", + "name": "TabletButtonProxy", + "hifiInterface": true, + "hifiClientEntity": true, + "properties": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "description": "Uniquely identifies this button. Read-only.", + "name": "uuid" + }, + { + "type": { + "names": [ + "TabletButtonProxy.ButtonProperties" + ] + }, + "name": "properties" + } + ], + "longname": "TabletButtonProxy", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "description": "Returns the current value of this button's properties.", + "kind": "function", + "name": "getProperties", + "returns": [ + { + "type": { + "names": [ + "TabletButtonProxy.ButtonProperties" + ] + } + } + ], + "memberof": "TabletButtonProxy", + "longname": "TabletButtonProxy#getProperties", + "scope": "instance" + }, + { + "description": "Replace the values of some of this button's properties.", + "kind": "function", + "name": "editProperties", + "params": [ + { + "type": { + "names": [ + "TabletButtonProxy.ButtonProperties" + ] + }, + "description": "Set of properties to change.", + "name": "properties" + } + ], + "memberof": "TabletButtonProxy", + "longname": "TabletButtonProxy#editProperties", + "scope": "instance" + }, + { + "description": "Triggered when this button has been clicked on by the user.", + "kind": "function", + "name": "clicked", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "TabletButtonProxy", + "longname": "TabletButtonProxy#clicked", + "scope": "instance" + }, + { + "kind": "function", + "name": "propertiesChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "TabletButtonProxy", + "longname": "TabletButtonProxy#propertiesChanged", + "scope": "instance" + }, + { + "kind": "typedef", + "name": "ButtonProperties", + "type": { + "names": [ + "object" + ] + }, + "properties": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL to button icon. (50 x 50)", + "name": "icon" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL to button icon, displayed during mouse hover. (50 x 50)", + "name": "hoverIcon" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL to button icon used when button is active, and during mouse hover. (50 x 50)", + "name": "activeHoverIcon" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL to button icon used when button is active. (50 x 50)", + "name": "activeIcon" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Button caption.", + "name": "text" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Button caption when button is not-active but during mouse hover.", + "name": "hoverText" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Button caption when button is active.", + "name": "activeText" + }, + { + "type": { + "names": [ + "string" + ] + }, + "description": "Button caption when button is active and during mouse hover.", + "name": "activeHoverText" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "description": "true when button is active.", + "name": "isActive" + }, + { + "type": { + "names": [ + "number" + ] + }, + "description": "Determines sort order on tablet. lower numbers will appear before larger numbers. \r Default is 100.", + "name": "sortOrder" + } + ], + "memberof": "TabletButtonProxy", + "longname": "TabletButtonProxy.ButtonProperties", + "scope": "static" + }, + { + "kind": "class", + "name": "ToolbarButtonProxy", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "ToolbarButtonProxy", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "editProperties", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "properties" + } + ], + "memberof": "ToolbarButtonProxy", + "longname": "ToolbarButtonProxy#editProperties", + "scope": "instance" + }, + { + "kind": "function", + "name": "writeProperty", + "tags": [ + { + "originalTitle": "parm", + "title": "parm", + "text": "{string} propertyName", + "value": "{string} propertyName" + } + ], + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "propertyValue" + } + ], + "memberof": "ToolbarButtonProxy", + "longname": "ToolbarButtonProxy#writeProperty", + "scope": "instance" + }, + { + "kind": "function", + "name": "writeProperties", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "properties" + } + ], + "memberof": "ToolbarButtonProxy", + "longname": "ToolbarButtonProxy#writeProperties", + "scope": "instance" + }, + { + "kind": "function", + "name": "readProperty", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "propertyName" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "ToolbarButtonProxy", + "longname": "ToolbarButtonProxy#readProperty", + "scope": "instance" + }, + { + "kind": "function", + "name": "readProperties", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "name": "propertyList" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "ToolbarButtonProxy", + "longname": "ToolbarButtonProxy#readProperties", + "scope": "instance" + }, + { + "kind": "function", + "name": "clicked", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ToolbarButtonProxy", + "longname": "ToolbarButtonProxy#clicked", + "scope": "instance" + }, + { + "kind": "class", + "name": "ToolbarProxy", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "ToolbarProxy", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "addButton", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "properties" + } + ], + "returns": [ + { + "type": { + "names": [ + "ToolbarButtonProxy" + ] + } + } + ], + "memberof": "ToolbarProxy", + "longname": "ToolbarProxy#addButton", + "scope": "instance" + }, + { + "kind": "function", + "name": "removeButton", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + } + ], + "memberof": "ToolbarProxy", + "longname": "ToolbarProxy#removeButton", + "scope": "instance" + }, + { + "kind": "function", + "name": "writeProperty", + "tags": [ + { + "originalTitle": "parm", + "title": "parm", + "text": "{string} propertyName", + "value": "{string} propertyName" + } + ], + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "propertyValue" + } + ], + "memberof": "ToolbarProxy", + "longname": "ToolbarProxy#writeProperty", + "scope": "instance" + }, + { + "kind": "function", + "name": "writeProperties", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "properties" + } + ], + "memberof": "ToolbarProxy", + "longname": "ToolbarProxy#writeProperties", + "scope": "instance" + }, + { + "kind": "function", + "name": "readProperty", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "propertyName" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "ToolbarProxy", + "longname": "ToolbarProxy#readProperty", + "scope": "instance" + }, + { + "kind": "function", + "name": "readProperties", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "name": "propertyList" + } + ], + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "ToolbarProxy", + "longname": "ToolbarProxy#readProperties", + "scope": "instance" + }, + { + "kind": "namespace", + "name": "Toolbars", + "hifiInterface": true, + "hifiClientEntity": true, + "longname": "Toolbars", + "scope": "global", + "description": "
Available in:Interface ScriptsClient Entity Scripts

" + }, + { + "kind": "function", + "name": "getToolbar", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "toolbarID" + } + ], + "returns": [ + { + "type": { + "names": [ + "ToolbarProxy" + ] + } + } + ], + "memberof": "Toolbars", + "longname": "Toolbars.getToolbar", + "scope": "static" + }, + { + "description": "

The Controller.Hardware.OculusTouch object has properties representing Oculus Rift. The property values are \rinteger IDs, uniquely identifying each output. Read-only. These can be mapped to actions or functions or \rController.Standard items in a {@link RouteObject} mapping.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
Buttons
Anumbernumber\"A\" button pressed.
Bnumbernumber\"B\" button pressed.
Xnumbernumber\"X\" button pressed.
Ynumbernumber\"Y\" button pressed.
LeftApplicationMenunumbernumberLeft application menu button pressed.\r
RightApplicationMenunumbernumberRight application menu button pressed.\r
Sticks
LXnumbernumberLeft stick x-axis scale.
LYnumbernumberLeft stick y-axis scale.
RXnumbernumberRight stick x-axis scale.
RYnumbernumberRight stick y-axis scale.
LSnumbernumberLeft stick button pressed.
RSnumbernumberRight stick button pressed.
LSTouchnumbernumberLeft stick is touched.
RSTouchnumbernumberRight stick is touched.
Triggers
LTnumbernumberLeft trigger scale.
RTnumbernumberRight trigger scale.
LeftGripnumbernumberLeft grip scale.
RightGripnumbernumberRight grip scale.
Finger Abstractions
LeftPrimaryThumbTouchnumbernumberLeft thumb touching primary thumb \r button.
LeftSecondaryThumbTouchnumbernumberLeft thumb touching secondary thumb \r button.
LeftThumbUpnumbernumberLeft thumb not touching primary or secondary \r thumb buttons.
RightPrimaryThumbTouchnumbernumberRight thumb touching primary thumb \r button.
RightSecondaryThumbTouchnumbernumberRight thumb touching secondary thumb \r button.
RightThumbUpnumbernumberRight thumb not touching primary or secondary \r thumb buttons.
LeftPrimaryIndexTouchnumbernumberLeft index finger is touching primary \r index finger control.
LeftIndexPointnumbernumberLeft index finger is pointing, not touching \r primary or secondary index finger controls.
RightPrimaryIndexTouchnumbernumberRight index finger is touching primary \r index finger control.
RightIndexPointnumbernumberRight index finger is pointing, not touching \r primary or secondary index finger controls.
Avatar Skeleton
Headnumber{@link Pose}Head pose.
LeftHandnumber{@link Pose}Left hand pose.
RightHandnumber{@link Pose}right hand pose.
", + "kind": "typedef", + "name": "Hardware-OculusTouch", + "type": { + "names": [ + "object" + ] + }, + "memberof": "Controller", + "longname": "Controller.Hardware-OculusTouch", + "scope": "static" + }, + { + "description": "

The Controller.Hardware.Vive object has properties representing Vive. The property values are integer IDs,\runiquely identifying each output. Read-only. These can be mapped to actions or functions or \rController.Standard items in a {@link RouteObject} mapping.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
Touch Pad (Sticks)
LXnumbernumberLeft touch pad x-axis scale.
LYnumbernumberLeft touch pad y-axis scale.
RXnumbernumberRight stick x-axis scale.
RYnumbernumberRight stick y-axis scale.
LSnumbernumberLeft touch pad pressed.
LS_CENTERnumbernumberLeft touch pad center pressed.
LS_XnumbernumberLeft touch pad pressed x-coordinate.
LS_YnumbernumberLeft touch pad pressed y-coordinate.
RSnumbernumberRight touch pad pressed.
RS_CENTERnumbernumberRight touch pad center pressed.
RS_XnumbernumberRight touch pad pressed x-coordinate.
RS_YnumbernumberRight touch pad pressed y-coordinate.
LSTouchnumbernumberLeft touch pad is touched.
RSTouchnumbernumberRight touch pad is touched.
Triggers
LTnumbernumberLeft trigger scale.
RTnumbernumberRight trigger scale.
LTClicknumbernumberLeft trigger click.
RTClicknumbernumberRight trigger click.
LeftGripnumbernumberLeft grip scale.
RightGripnumbernumberRight grip scale.
Avatar Skeleton
Hipsnumber{@link Pose}Hips pose.
Spine2number{@link Pose}Spine2 pose.
Headnumber{@link Pose}Head pose.
LeftArmnumber{@link Pose}Left arm pose.
RightArmnumber{@link Pose}Right arm pose
LeftHandnumber{@link Pose}Left hand pose.
RightHandnumber{@link Pose}Right hand pose.
Trackers
TrackedObject00number{@link Pose}Tracker 0 pose.
TrackedObject01number{@link Pose}Tracker 1 pose.
TrackedObject02number{@link Pose}Tracker 2 pose.
TrackedObject03number{@link Pose}Tracker 3 pose.
TrackedObject04number{@link Pose}Tracker 4 pose.
TrackedObject05number{@link Pose}Tracker 5 pose.
TrackedObject06number{@link Pose}Tracker 6 pose.
TrackedObject07number{@link Pose}Tracker 7 pose.
TrackedObject08number{@link Pose}Tracker 8 pose.
TrackedObject09number{@link Pose}Tracker 9 pose.
TrackedObject10number{@link Pose}Tracker 10 pose.
TrackedObject11number{@link Pose}Tracker 11 pose.
TrackedObject12number{@link Pose}Tracker 12 pose.
TrackedObject13number{@link Pose}Tracker 13 pose.
TrackedObject14number{@link Pose}Tracker 14 pose.
TrackedObject15number{@link Pose}Tracker 15 pose.
", + "kind": "typedef", + "name": "Hardware-Vive", + "type": { + "names": [ + "object" + ] + }, + "memberof": "Controller", + "longname": "Controller.Hardware-Vive", + "scope": "static" + }, + { + "kind": "package", + "longname": "package:undefined", + "files": [ + "D:\\ROLC_High-Fidelity\\01_Reference\\R_Programming\\R_VR\\HF\\tools\\jsdoc\\root.js" + ] + }, + { + "description": "Returns the minimum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains.", + "kind": "function", + "name": "getDomainMinScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "minimum scale allowed for this avatar in the current domain." + } + ], + "memberof": "Avatar", + "longname": "Avatar.getDomainMinScale", + "scope": "static" + }, + { + "description": "Returns the maximum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains.", + "kind": "function", + "name": "getDomainMaxScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "maximum scale allowed for this avatar in the current domain." + } + ], + "memberof": "Avatar", + "longname": "Avatar.getDomainMaxScale", + "scope": "static" + }, + { + "description": "Provides read only access to the current eye height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints.", + "kind": "function", + "name": "getEyeHeight", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Eye height of avatar in meters." + } + ], + "memberof": "Avatar", + "longname": "Avatar.getEyeHeight", + "scope": "static" + }, + { + "description": "Provides read only access to the current height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints.", + "kind": "function", + "name": "getHeight", + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "Height of avatar in meters." + } + ], + "memberof": "Avatar", + "longname": "Avatar.getHeight", + "scope": "static" + }, + { + "kind": "function", + "name": "setHandState", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "state" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setHandState", + "scope": "static" + }, + { + "kind": "function", + "name": "getHandState", + "returns": [ + { + "type": { + "names": [ + "string" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getHandState", + "scope": "static" + }, + { + "kind": "function", + "name": "setRawJointData", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "name": "data" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setRawJointData", + "scope": "static" + }, + { + "description": "Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointData", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent.", + "name": "translation" + } + ], + "examples": [ + "Set your avatar to it's default T-pose for a while.
\r\"Avatar\r// Set all joint translations and rotations to defaults.\rvar i, length, rotation, translation;\rfor (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {\r rotation = MyAvatar.getDefaultJointRotation(i);\r translation = MyAvatar.getDefaultJointTranslation(i);\r MyAvatar.setJointData(i, rotation, translation);\r}\r\r// Restore your avatar's motion after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointsData();\r}, 5000);" + ], + "memberof": "Avatar", + "longname": "Avatar.setJointData", + "scope": "static" + }, + { + "description": "Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointData", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent.", + "name": "rotation" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent.", + "name": "translation" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setJointData", + "scope": "static" + }, + { + "description": "Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointRotation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent.", + "name": "rotation" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setJointRotation", + "scope": "static" + }, + { + "description": "Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointRotation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent.", + "name": "rotation" + } + ], + "examples": [ + "Set your avatar to its default T-pose then rotate its right arm.
\r\"Avatar\r// Set all joint translations and rotations to defaults.\rvar i, length, rotation, translation;\rfor (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {\r rotation = MyAvatar.getDefaultJointRotation(i);\r translation = MyAvatar.getDefaultJointTranslation(i);\r MyAvatar.setJointData(i, rotation, translation);\r}\r\r// Rotate the right arm.\rvar newArmRotation = { x: 0.47, y: 0.22, z: -0.02, w: 0.87 };\rMyAvatar.setJointRotation(\"RightArm\", newArmRotation);\r\r// Restore your avatar's motion after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointsData();\r}, 5000);" + ], + "memberof": "Avatar", + "longname": "Avatar.setJointRotation", + "scope": "static" + }, + { + "description": "Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointTranslation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent.", + "name": "translation" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setJointTranslation", + "scope": "static" + }, + { + "description": "Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointTranslation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent.", + "name": "translation" + } + ], + "examples": [ + "Stretch your avatar's neck. Depending on the avatar you are using, you will either see a gap between \rthe head and body or you will see the neck stretched.
\r\"Avatar\r// Stretch your avatar's neck.\rMyAvatar.setJointTranslation(\"Neck\", { x: 0, y: 25, z: 0 });\r\r// Restore your avatar's neck after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointData(\"Neck\");\r}, 5000);" + ], + "memberof": "Avatar", + "longname": "Avatar.setJointTranslation", + "scope": "static" + }, + { + "description": "Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly faster than the function variation that specifies the joint name.

", + "kind": "function", + "name": "clearJointData", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + } + ], + "memberof": "Avatar", + "longname": "Avatar.clearJointData", + "scope": "static" + }, + { + "description": "Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly slower than the function variation that specifies the joint index.

", + "kind": "function", + "name": "clearJointData", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + } + ], + "examples": [ + "Offset and restore the position of your avatar's head.\r// Move your avatar's head up by 25cm from where it should be.\rMyAvatar.setJointTranslation(\"Neck\", { x: 0, y: 0.25, z: 0 });\r\r// Restore your avatar's head to its default position after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointData(\"Neck\");\r}, 5000);" + ], + "memberof": "Avatar", + "longname": "Avatar.clearJointData", + "scope": "static" + }, + { + "kind": "function", + "name": "isJointDataValid", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.isJointDataValid", + "scope": "static" + }, + { + "kind": "function", + "name": "isJointDataValid", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.isJointDataValid", + "scope": "static" + }, + { + "description": "Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards.", + "kind": "function", + "name": "getJointRotation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent." + } + ], + "memberof": "Avatar", + "longname": "Avatar.getJointRotation", + "scope": "static" + }, + { + "description": "Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards.", + "kind": "function", + "name": "getJointRotation", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + }, + "description": "The rotation of the joint relative to its parent." + } + ], + "examples": [ + "Report the rotation of your avatar's hips joint.\rprint(JSON.stringify(MyAvatar.getJointRotation(\"Hips\")));" + ], + "memberof": "Avatar", + "longname": "Avatar.getJointRotation", + "scope": "static" + }, + { + "description": "Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards.", + "kind": "function", + "name": "getJointTranslation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint.", + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent." + } + ], + "memberof": "Avatar", + "longname": "Avatar.getJointTranslation", + "scope": "static" + }, + { + "description": "Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards.", + "kind": "function", + "name": "getJointTranslation", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The name of the joint.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "description": "The translation of the joint relative to its parent." + } + ], + "examples": [ + "Report the translation of your avatar's hips joint.\rprint(JSON.stringify(MyAvatar.getJointRotation(\"Hips\")));" + ], + "memberof": "Avatar", + "longname": "Avatar.getJointTranslation", + "scope": "static" + }, + { + "description": "Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint.", + "kind": "function", + "name": "getJointRotations", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The rotations of all joints relative to each's parent. The values are in the same order as the array \rreturned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}." + } + ], + "examples": [ + "Report the rotations of all your avatar's joints.\rprint(JSON.stringify(MyAvatar.getJointRotations()));" + ], + "memberof": "Avatar", + "longname": "Avatar.getJointRotations", + "scope": "static" + }, + { + "kind": "function", + "name": "getJointTranslations", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getJointTranslations", + "scope": "static" + }, + { + "description": "Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse\rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,\rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate\rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set\rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

", + "kind": "function", + "name": "setJointRotations", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The rotations for all joints in the avatar. The values are in the same order as the \rarray returned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}.", + "name": "jointRotations" + } + ], + "examples": [ + "Set your avatar to its default T-pose then rotate its right arm.
\r\"Avatar\r// Set all joint translations and rotations to defaults.\rvar i, length, rotation, translation;\rfor (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {\r rotation = MyAvatar.getDefaultJointRotation(i);\r translation = MyAvatar.getDefaultJointTranslation(i);\r MyAvatar.setJointData(i, rotation, translation);\r}\r\r// Get all join rotations.\rvar jointRotations = MyAvatar.getJointRotations(); \r\r// Update the rotation of the right arm in the array.\rjointRotations[MyAvatar.getJointIndex(\"RightArm\")] = { x: 0.47, y: 0.22, z: -0.02, w: 0.87 };\r\r// Update all joint rotations.\rMyAvatar.setJointRotations(jointRotations);\r\r// Restore your avatar's motion after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointsData();\r}, 5000);" + ], + "memberof": "Avatar", + "longname": "Avatar.setJointRotations", + "scope": "static" + }, + { + "kind": "function", + "name": "setJointTranslations", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "name": "translations" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setJointTranslations", + "scope": "static" + }, + { + "description": "Clear all joint translations and rotations that have been set by script. This restores all motion from the default \ranimation system including inverse kinematics for all joints.", + "kind": "function", + "name": "clearJointsData", + "examples": [ + "Set your avatar to it's default T-pose for a while.\r// Set all joint translations and rotations to defaults.\rvar i, length, rotation, translation;\rfor (i = 0, length = MyAvatar.getJointNames().length; i < length; i++) {\r rotation = MyAvatar.getDefaultJointRotation(i);\r translation = MyAvatar.getDefaultJointTranslation(i);\r MyAvatar.setJointData(i, rotation, translation);\r}\r\r// Restore your avatar's motion after 5s.\rScript.setTimeout(function () {\r MyAvatar.clearJointsData();\r}, 5000);" + ], + "memberof": "Avatar", + "longname": "Avatar.clearJointsData", + "scope": "static" + }, + { + "description": "Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by \r{@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}.", + "kind": "function", + "name": "getJointIndex", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The name of the joint.", + "name": "name" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + }, + "description": "The index of the joint." + } + ], + "examples": [ + "Report the index of your avatar's left arm joint.\rprint(JSON.stringify(MyAvatar.getJointIndex(\"LeftArm\"));" + ], + "memberof": "Avatar", + "longname": "Avatar.getJointIndex", + "scope": "static" + }, + { + "description": "Get the names of all the joints in the current avatar.", + "kind": "function", + "name": "getJointNames", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The joint names." + } + ], + "examples": [ + "Report the names of all the joints in your current avatar.\rprint(JSON.stringify(MyAvatar.getJointNames()));" + ], + "memberof": "Avatar", + "longname": "Avatar.getJointNames", + "scope": "static" + }, + { + "kind": "function", + "name": "setBlendshape", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "name" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "value" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setBlendshape", + "scope": "static" + }, + { + "kind": "function", + "name": "getAttachmentsVariant", + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getAttachmentsVariant", + "scope": "static" + }, + { + "kind": "function", + "name": "setAttachmentsVariant", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "variant" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setAttachmentsVariant", + "scope": "static" + }, + { + "kind": "function", + "name": "updateAvatarEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "entityData" + } + ], + "memberof": "Avatar", + "longname": "Avatar.updateAvatarEntity", + "scope": "static" + }, + { + "kind": "function", + "name": "clearAvatarEntity", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "entityID" + } + ], + "memberof": "Avatar", + "longname": "Avatar.clearAvatarEntity", + "scope": "static" + }, + { + "kind": "function", + "name": "setForceFaceTrackerConnected", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "connected" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setForceFaceTrackerConnected", + "scope": "static" + }, + { + "description": "Get information about all models currently attached to your avatar.", + "kind": "function", + "name": "getAttachmentData", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "Information about all models attached to your avatar." + } + ], + "examples": [ + "Report the URLs of all current attachments.\rvar attachments = MyAvatar.getaAttachmentData();\rfor (var i = 0; i < attachments.length; i++) {\r print (attachments[i].modelURL);\r}" + ], + "memberof": "Avatar", + "longname": "Avatar.getAttachmentData", + "scope": "static" + }, + { + "description": "Set all models currently attached to your avatar. For example, if you retrieve attachment data using \r{@link MyAvatar.getAttachmentData} or {@link Avatar.getAttachmentData}, make changes to it, and then want to update your avatar's attachments per the \rchanged data. You can also remove all attachments by using setting attachmentData to null.", + "kind": "function", + "name": "setAttachmentData", + "params": [ + { + "type": { + "names": [ + "Array." + ] + }, + "description": "The attachment data defining the models to have attached to your avatar. Use \r null to remove all attachments.", + "name": "attachmentData" + } + ], + "examples": [ + "Remove a hat attachment if your avatar is wearing it.\rvar hatURL = \"https://s3.amazonaws.com/hifi-public/tony/cowboy-hat.fbx\";\rvar attachments = MyAvatar.getAttachmentData();\r\rfor (var i = 0; i < attachments.length; i++) {\r if (attachments[i].modelURL === hatURL) {\r attachments.splice(i, 1);\r MyAvatar.setAttachmentData(attachments);\r break;\r }\r }" + ], + "memberof": "Avatar", + "longname": "Avatar.setAttachmentData", + "scope": "static" + }, + { + "description": "Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to \rstand on.\r

Note: Attached models are models only; they are not entities and can not be manipulated using the {@link Entities} API. \rNor can you use this function to attach an entity (such as a sphere or a box) to your avatar.

", + "kind": "function", + "name": "attach", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the model to attach. Models can be .FBX or .OBJ format.", + "name": "modelURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The name of the avatar joint (see {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}) to attach the model \r to.", + "name": "jointName" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "optional": true, + "defaultvalue": "Vec3.ZERO", + "description": "The offset to apply to the model relative to the joint position.", + "name": "translation" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "optional": true, + "defaultvalue": "Quat.IDENTITY", + "description": "The rotation to apply to the model relative to the joint orientation.", + "name": "rotation" + }, + { + "type": { + "names": [ + "number" + ] + }, + "optional": true, + "defaultvalue": "1.0", + "description": "The scale to apply to the model.", + "name": "scale" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "description": "If the model has a skeleton, set this to true so that the bones of the \r attached model's skeleton are be rotated to fit the avatar's current pose. isSoft is used, for example, \r to have clothing that moves with the avatar.
\r If true, the translation, rotation, and scale parameters are \r ignored.", + "name": "isSoft" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "allowDuplicates" + }, + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": true, + "name": "useSaved" + } + ], + "examples": [ + "Attach a cowboy hat to your avatar's head.\rvar attachment = {\r modelURL: \"https://s3.amazonaws.com/hifi-public/tony/cowboy-hat.fbx\",\r jointName: \"Head\",\r translation: {\"x\": 0, \"y\": 0.25, \"z\": 0},\r rotation: {\"x\": 0, \"y\": 0, \"z\": 0, \"w\": 1},\r scale: 1,\r isSoft: false\r};\r\r MyAvatar.attach(attachment.modelURL,\r attachment.jointName,\r attachment.translation,\r attachment.rotation,\r attachment.scale,\r attachment.isSoft);" + ], + "memberof": "Avatar", + "longname": "Avatar.attach", + "scope": "static" + }, + { + "description": "Detach the most recently attached instance of a particular model from either a specific joint or any joint.", + "kind": "function", + "name": "detachOne", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the model to detach.", + "name": "modelURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The name of the joint to detach the model from. If \"\", then the most \r recently attached model is removed from which ever joint it was attached to.", + "name": "jointName" + } + ], + "memberof": "Avatar", + "longname": "Avatar.detachOne", + "scope": "static" + }, + { + "description": "Detach all instances of a particular model from either a specific joint or all joints.", + "kind": "function", + "name": "detachAll", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "The URL of the model to detach.", + "name": "modelURL" + }, + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "description": "The name of the joint to detach the model from. If \"\", then the model is \r detached from all joints.", + "name": "jointName" + } + ], + "memberof": "Avatar", + "longname": "Avatar.detachAll", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatarEntityData", + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getAvatarEntityData", + "scope": "static" + }, + { + "kind": "function", + "name": "setAvatarEntityData", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "avatarEntityData" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setAvatarEntityData", + "scope": "static" + }, + { + "kind": "function", + "name": "getSensorToWorldMatrix", + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getSensorToWorldMatrix", + "scope": "static" + }, + { + "kind": "function", + "name": "getSensorToWorldScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getSensorToWorldScale", + "scope": "static" + }, + { + "kind": "function", + "name": "getControllerLeftHandMatrix", + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getControllerLeftHandMatrix", + "scope": "static" + }, + { + "kind": "function", + "name": "getControllerRightHandMatrix", + "returns": [ + { + "type": { + "names": [ + "Mat4" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getControllerRightHandMatrix", + "scope": "static" + }, + { + "kind": "function", + "name": "getDataRate", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "rateName" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getDataRate", + "scope": "static" + }, + { + "kind": "function", + "name": "getUpdateRate", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "optional": true, + "defaultvalue": "\"\"", + "name": "rateName" + } + ], + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getUpdateRate", + "scope": "static" + }, + { + "kind": "function", + "name": "displayNameChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.displayNameChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sessionDisplayNameChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.sessionDisplayNameChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "skeletonModelURLChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.skeletonModelURLChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "lookAtSnappingChanged", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "enabled" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.lookAtSnappingChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sessionUUIDChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.sessionUUIDChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sendAvatarDataPacket", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "optional": true, + "defaultvalue": false, + "name": "sendAll" + } + ], + "memberof": "Avatar", + "longname": "Avatar.sendAvatarDataPacket", + "scope": "static" + }, + { + "kind": "function", + "name": "sendIdentityPacket", + "memberof": "Avatar", + "longname": "Avatar.sendIdentityPacket", + "scope": "static" + }, + { + "kind": "function", + "name": "setJointMappingsFromNetworkReply", + "memberof": "Avatar", + "longname": "Avatar.setJointMappingsFromNetworkReply", + "scope": "static" + }, + { + "kind": "function", + "name": "setSessionUUID", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionUUID" + } + ], + "memberof": "Avatar", + "longname": "Avatar.setSessionUUID", + "scope": "static" + }, + { + "kind": "function", + "name": "getAbsoluteJointRotationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Quat" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getAbsoluteJointRotationInObjectFrame", + "scope": "static" + }, + { + "kind": "function", + "name": "getAbsoluteJointTranslationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + } + ], + "returns": [ + { + "type": { + "names": [ + "Vec3" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getAbsoluteJointTranslationInObjectFrame", + "scope": "static" + }, + { + "kind": "function", + "name": "setAbsoluteJointRotationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + }, + { + "type": { + "names": [ + "Quat" + ] + }, + "name": "rotation" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.setAbsoluteJointRotationInObjectFrame", + "scope": "static" + }, + { + "kind": "function", + "name": "setAbsoluteJointTranslationInObjectFrame", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "index" + }, + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "translation" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.setAbsoluteJointTranslationInObjectFrame", + "scope": "static" + }, + { + "kind": "function", + "name": "getTargetScale", + "returns": [ + { + "type": { + "names": [ + "number" + ] + } + } + ], + "memberof": "Avatar", + "longname": "Avatar.getTargetScale", + "scope": "static" + }, + { + "kind": "function", + "name": "resetLastSent", + "memberof": "Avatar", + "longname": "Avatar.resetLastSent", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatarIdentifiers", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.getAvatarIdentifiers", + "scope": "static" + }, + { + "kind": "function", + "name": "getAvatarsInRange", + "params": [ + { + "type": { + "names": [ + "Vec3" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "range" + } + ], + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.getAvatarsInRange", + "scope": "static" + }, + { + "kind": "function", + "name": "avatarAddedEvent", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionUUID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.avatarAddedEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "avatarRemovedEvent", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionUUID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.avatarRemovedEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "avatarSessionChangedEvent", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionUUID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "oldSessionUUID" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.avatarSessionChangedEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "isAvatarInRange", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "position" + }, + { + "type": { + "names": [ + "string" + ] + }, + "name": "range" + } + ], + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.isAvatarInRange", + "scope": "static" + }, + { + "kind": "function", + "name": "sessionUUIDChanged", + "params": [ + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "sessionUUID" + }, + { + "type": { + "names": [ + "Uuid" + ] + }, + "name": "oldSessionUUID" + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.sessionUUIDChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "processAvatarDataPacket", + "params": [ + { + "name": "message" + }, + { + "name": "sendingNode" + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.processAvatarDataPacket", + "scope": "static" + }, + { + "kind": "function", + "name": "processAvatarIdentityPacket", + "params": [ + { + "name": "message" + }, + { + "name": "sendingNode" + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.processAvatarIdentityPacket", + "scope": "static" + }, + { + "kind": "function", + "name": "processKillAvatar", + "params": [ + { + "name": "message" + }, + { + "name": "sendingNode" + } + ], + "memberof": "AvatarManager", + "longname": "AvatarManager.processKillAvatar", + "scope": "static" + }, + { + "description": "Get the list of all resource URLs.", + "kind": "function", + "name": "getResourceList", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "AnimationCache", + "longname": "AnimationCache.getResourceList", + "scope": "static" + }, + { + "kind": "function", + "name": "updateTotalSize", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "deltaSize" + } + ], + "memberof": "AnimationCache", + "longname": "AnimationCache.updateTotalSize", + "scope": "static" + }, + { + "description": "Prefetches a resource.", + "kind": "function", + "name": "prefetch", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of the resource to prefetch.", + "name": "url" + }, + { + "type": { + "names": [ + "object" + ] + }, + "optional": true, + "defaultvalue": null, + "name": "extra" + } + ], + "returns": [ + { + "type": { + "names": [ + "ResourceObject" + ] + } + } + ], + "memberof": "AnimationCache", + "longname": "AnimationCache.prefetch", + "scope": "static" + }, + { + "kind": "function", + "name": "dirty", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "AnimationCache", + "longname": "AnimationCache.dirty", + "scope": "static" + }, + { + "description": "Get the list of all resource URLs.", + "kind": "function", + "name": "getResourceList", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "SoundCache", + "longname": "SoundCache.getResourceList", + "scope": "static" + }, + { + "kind": "function", + "name": "updateTotalSize", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "deltaSize" + } + ], + "memberof": "SoundCache", + "longname": "SoundCache.updateTotalSize", + "scope": "static" + }, + { + "description": "Prefetches a resource.", + "kind": "function", + "name": "prefetch", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of the resource to prefetch.", + "name": "url" + }, + { + "type": { + "names": [ + "object" + ] + }, + "optional": true, + "defaultvalue": null, + "name": "extra" + } + ], + "returns": [ + { + "type": { + "names": [ + "ResourceObject" + ] + } + } + ], + "memberof": "SoundCache", + "longname": "SoundCache.prefetch", + "scope": "static" + }, + { + "kind": "function", + "name": "dirty", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "SoundCache", + "longname": "SoundCache.dirty", + "scope": "static" + }, + { + "description": "Get the list of all resource URLs.", + "kind": "function", + "name": "getResourceList", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "ModelCache", + "longname": "ModelCache.getResourceList", + "scope": "static" + }, + { + "kind": "function", + "name": "updateTotalSize", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "deltaSize" + } + ], + "memberof": "ModelCache", + "longname": "ModelCache.updateTotalSize", + "scope": "static" + }, + { + "description": "Prefetches a resource.", + "kind": "function", + "name": "prefetch", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of the resource to prefetch.", + "name": "url" + }, + { + "type": { + "names": [ + "object" + ] + }, + "optional": true, + "defaultvalue": null, + "name": "extra" + } + ], + "returns": [ + { + "type": { + "names": [ + "ResourceObject" + ] + } + } + ], + "memberof": "ModelCache", + "longname": "ModelCache.prefetch", + "scope": "static" + }, + { + "kind": "function", + "name": "dirty", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "ModelCache", + "longname": "ModelCache.dirty", + "scope": "static" + }, + { + "description": "Get the list of all resource URLs.", + "kind": "function", + "name": "getResourceList", + "returns": [ + { + "type": { + "names": [ + "Array." + ] + } + } + ], + "memberof": "TextureCache", + "longname": "TextureCache.getResourceList", + "scope": "static" + }, + { + "kind": "function", + "name": "updateTotalSize", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "deltaSize" + } + ], + "memberof": "TextureCache", + "longname": "TextureCache.updateTotalSize", + "scope": "static" + }, + { + "description": "Prefetches a resource.", + "kind": "function", + "name": "prefetch", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "description": "URL of the resource to prefetch.", + "name": "url" + }, + { + "type": { + "names": [ + "object" + ] + }, + "optional": true, + "defaultvalue": null, + "name": "extra" + } + ], + "returns": [ + { + "type": { + "names": [ + "ResourceObject" + ] + } + } + ], + "memberof": "TextureCache", + "longname": "TextureCache.prefetch", + "scope": "static" + }, + { + "kind": "function", + "name": "dirty", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "TextureCache", + "longname": "TextureCache.dirty", + "scope": "static" + }, + { + "kind": "function", + "name": "initQml", + "params": [ + { + "type": { + "names": [ + "OverlayWindow.Properties" + ] + }, + "name": "properties" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.initQml", + "scope": "static" + }, + { + "kind": "function", + "name": "isVisible", + "returns": [ + { + "type": { + "names": [ + "boolean" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.isVisible", + "scope": "static" + }, + { + "kind": "function", + "name": "setVisible", + "params": [ + { + "type": { + "names": [ + "boolean" + ] + }, + "name": "visible" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.setVisible", + "scope": "static" + }, + { + "kind": "function", + "name": "getPosition", + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.getPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "setPosition", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.setPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "setPosition", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "x" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "y" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.setPosition", + "scope": "static" + }, + { + "kind": "function", + "name": "getSize", + "returns": [ + { + "type": { + "names": [ + "Vec2" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.getSize", + "scope": "static" + }, + { + "kind": "function", + "name": "setSize", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "size" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.setSize", + "scope": "static" + }, + { + "kind": "function", + "name": "setSize", + "params": [ + { + "type": { + "names": [ + "number" + ] + }, + "name": "width" + }, + { + "type": { + "names": [ + "number" + ] + }, + "name": "height" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.setSize", + "scope": "static" + }, + { + "kind": "function", + "name": "setTitle", + "params": [ + { + "type": { + "names": [ + "string" + ] + }, + "name": "title" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.setTitle", + "scope": "static" + }, + { + "kind": "function", + "name": "raise", + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.raise", + "scope": "static" + }, + { + "kind": "function", + "name": "close", + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.close", + "scope": "static" + }, + { + "kind": "function", + "name": "getEventBridge", + "returns": [ + { + "type": { + "names": [ + "object" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.getEventBridge", + "scope": "static" + }, + { + "kind": "function", + "name": "sendToQml", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.sendToQml", + "scope": "static" + }, + { + "kind": "function", + "name": "clearDebugWindow", + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.clearDebugWindow", + "scope": "static" + }, + { + "kind": "function", + "name": "emitScriptEvent", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.emitScriptEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "emitWebEvent", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.emitWebEvent", + "scope": "static" + }, + { + "kind": "function", + "name": "visibleChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.visibleChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "positionChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.positionChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "sizeChanged", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.sizeChanged", + "scope": "static" + }, + { + "kind": "function", + "name": "moved", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.moved", + "scope": "static" + }, + { + "kind": "function", + "name": "resized", + "params": [ + { + "type": { + "names": [ + "Size" + ] + }, + "name": "size" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.resized", + "scope": "static" + }, + { + "kind": "function", + "name": "closed", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.closed", + "scope": "static" + }, + { + "kind": "function", + "name": "fromQml", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.fromQml", + "scope": "static" + }, + { + "kind": "function", + "name": "scriptEventReceived", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.scriptEventReceived", + "scope": "static" + }, + { + "kind": "function", + "name": "webEventReceived", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.webEventReceived", + "scope": "static" + }, + { + "kind": "function", + "name": "hasMoved", + "params": [ + { + "type": { + "names": [ + "Vec2" + ] + }, + "name": "position" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.hasMoved", + "scope": "static" + }, + { + "kind": "function", + "name": "hasClosed", + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.hasClosed", + "scope": "static" + }, + { + "kind": "function", + "name": "qmlToScript", + "params": [ + { + "type": { + "names": [ + "object" + ] + }, + "name": "message" + } + ], + "returns": [ + { + "type": { + "names": [ + "Signal" + ] + } + } + ], + "memberof": "OverlayWebWindow", + "longname": "OverlayWebWindow.qmlToScript", + "scope": "static" + } +] \ No newline at end of file diff --git a/Utilities/Editor/VSCode_TS-Definitions_Snippets/hifiTSStubGenerator.js b/Utilities/Editor/VSCode_TS-Definitions_Snippets/hifiTSStubGenerator.js new file mode 100644 index 000000000..52ed38f20 --- /dev/null +++ b/Utilities/Editor/VSCode_TS-Definitions_Snippets/hifiTSStubGenerator.js @@ -0,0 +1,197 @@ +// +// Created by Thijs Wenker and Milad Nazeri on 1/31/18 +// Copyright 2018 High Fidelity, Inc. +// +// Creates Type Script Definitions for Hifi +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + + +const fs = require('fs'); +const path = require('path') + + +var parents = {}; + + +var vsCodeArray = []; + +/* +Namespace Typescript Example + +declare namespace GreetingLib { + interface LogOptions { + verbose?: boolean; + } + interface AlertOptions { + modal: boolean; + title?: string; + color?: string; + } +} + +declare namespace Clipboard { + function getContentsDimensions +} +*/ + +let variants = []; + +// load jsdoc +var hifiDoc = require('./hifiJSDoc.json'); + +// first add namespace + hifiDoc.forEach(item => { + if (item.kind && item.kind === "namespace" || item.kind === "class") { + let parentKey = item.name; + if (item.variation) { + parentKey = `${parentKey}(${item.variation})`; + variants.push({ + name: item.name, + variantRegex: new RegExp(escapeRegExp(parentKey), 'g') + }); + } + parents[parentKey] = { + item: item, + members: [] + }; + } +}); + +// populate parents with their items +hifiDoc.forEach(item => { + if (item.memberof) { + if (!(item.memberof in parents)) { + console.log(`namespace ${item.memberof} not found!`); + return; + } + parents[item.memberof].members.push(item); + } +}); + +function escapeRegExp(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); +} + +const LINE_BREAK = "\n"; +const IDENT = " "; +const htmlreg = /(<.+?>)|(<\/.+?>)/g; +const linkreg = /(\{\@(?:link)?)([\s\S]+?)(\|[\s\S]+?)?(\})/g; + +function getDescription(item, scopeDepth) { + let descriptionBody = ''; + let ident = IDENT.repeat(scopeDepth); + if (item.description) { + let description = item.description + .replace(htmlreg, "") + .replace(linkreg, "$2") + .replace('\r',`${LINE_BREAK}${ident} * `); + descriptionBody += `${ident} * ${description}${LINE_BREAK}`; + + } + if (item.params){ + let bodyParams = item.params.map(param => { + return `${ident} * @param ${param.name} {${param.type? `${param.type.names[0]}`:""}} ${param.optional? `[${param.name}=${param.defaultvalue}]`:""} ${param.description? param.description.replace('\r',`${LINE_BREAK}${ident} * `): ""}${LINE_BREAK}` + }) + descriptionBody += bodyParams.join(""); + } + if (item.returns) { + descriptionBody += `${ident} * @returns {${item.returns[0].type.names[0]}} ${LINE_BREAK}`; + } + if (descriptionBody.length > 0) { + // Takes care of the Vec3(0) and Quat(0) instances in the description + variants.forEach(variant => { + descriptionBody = descriptionBody.replace(variant.variantRegex, variant.name); + }); + + + return `${ident}/**${LINE_BREAK}${descriptionBody}${ident} */${LINE_BREAK}`; + } + return ''; +} + +function getPropertyType(property) { + if (property.type && property.type.names && property.type.names[0]) { + return `: ${property.type.names[0]}` + } + return ''; +} + +let stringToWrite = ''; +Object.keys(parents).forEach(parentKey => { + let parent = parents[parentKey]; + let parentType = parent.item.kind; + if (parentType === 'namespace') { + stringToWrite += getDescription(parent.item, 0); + stringToWrite += `declare namespace ${parent.item.name} {` + LINE_BREAK; + } else if (parentType === 'class') { + stringToWrite += getDescription(parent.item, 0); + stringToWrite += `declare class ${parent.item.name} {` + LINE_BREAK; + } else { + console.log('Parent type is not supported'); + } + + parent.members.forEach(member => { + if (member.kind === 'function') { + stringToWrite += getDescription(member, 1); + + stringToWrite += IDENT; + // classes don't have functions but (methods) + if (parentType === 'namespace') { + stringToWrite += 'function '; + } + stringToWrite += member.name; + + if (member.params) { + bodyParams = member.params.map((param, index) => { + return `${param.name}${param.type?`\: ${param.type.names[0]}`:''}` + }); + stringToWrite += `(${bodyParams.join(', ')})`; + } else { + stringToWrite += "()"; + } + if (member.returns && member.returns[0].type && member.returns[0].type.names) { + stringToWrite += `: ${member.returns[0].type.names[0]}` + } else { + stringToWrite += ": void"; + } + stringToWrite += `;${LINE_BREAK}`; + } else if (member.kind === 'typedef') { + if (member.type && member.type.names[0] === 'object') { + let interfaceBody = ""; + + interfaceBody += `${IDENT}interface ${member.name} {` + LINE_BREAK; + if (member.properties) { + member.properties.forEach(property => { + interfaceBody += getDescription(property, 2) + + IDENT + IDENT + property.name + getPropertyType(property) + `;${LINE_BREAK}`; + }); + } + + interfaceBody += `${IDENT}}${LINE_BREAK}${LINE_BREAK}`; + //console.log(interfaceBody); + stringToWrite += interfaceBody; + + } else { + console.log('unhandled typedef member name ' + member.name); + } + } else { + console.log('unhandled kind ' + member.kind); + } + }); + + + if (parentType === 'namespace' && parent.item.properties) { + parent.item.properties.forEach(property => { + let isConst = property.name.toUpperCase() === property.name; + stringToWrite += getDescription(property, 1) + + IDENT + (isConst ? 'const ' : 'let ') + property.name + getPropertyType(property) + `;${LINE_BREAK}` + }); + } + + stringToWrite += `}${LINE_BREAK}${LINE_BREAK}`; +}); + +fs.writeFileSync(path.join(__dirname, 'out', 'hifiStubs.d.ts'), stringToWrite); diff --git a/Utilities/Editor/VSCode_TS-Definitions_Snippets/out/hifiStubs.d.ts b/Utilities/Editor/VSCode_TS-Definitions_Snippets/out/hifiStubs.d.ts new file mode 100644 index 000000000..05b5a31d8 --- /dev/null +++ b/Utilities/Editor/VSCode_TS-Definitions_Snippets/out/hifiStubs.d.ts @@ -0,0 +1,14619 @@ +/** + * Available in:Assignment Client Scripts + */ +declare namespace Agent { + /** + * @param isAvatar {boolean} + */ + function setIsAvatar(isAvatar: boolean): void; + /** + * @returns {boolean} + */ + function isAvatar(): boolean; + /** + * @param avatarSound {object} + */ + function playAvatarSound(avatarSound: object): void; + let isAvatar: boolean; + /** + * Read-only. + */ + let isPlayingAvatarSound: boolean; + let isListeningToAudioStream: boolean; + let isNoiseGateEnabled: boolean; + /** + * Read-only. + */ + let lastReceivedAudioLoudness: number; + /** + * Read-only. + */ + let sessionUUID: Uuid; +} + +/** + * Available in:Assignment Client ScriptsThe Avatar API is used to manipulate scriptable avatars on the domain. This API is a subset of the + * MyAvatar API. Note: In the examples, use "Avatar" instead of "MyAvatar". + */ +declare namespace Avatar { + /** + * @param url {string} + * @param fps {number} [fps=30] + * @param priority {number} [priority=1] + * @param loop {boolean} [loop=false] + * @param hold {boolean} [hold=false] + * @param firstFrame {number} [firstFrame=0] + * @param lastFrame {number} [lastFrame=3.403e+38] + * @param maskedJoints {Array.} [maskedJoints=[]] + */ + function startAnimation(url: string, fps: number, priority: number, loop: boolean, hold: boolean, firstFrame: number, lastFrame: number, maskedJoints: Array.): void; + function stopAnimation(): void; + /** + * @returns {Avatar.AnimationDetails} + */ + function getAnimationDetails(): Avatar.AnimationDetails; + interface AnimationDetails { + role: string; + url: string; + fps: number; + priority: number; + loop: boolean; + hold: boolean; + startAutomatically: boolean; + firstFrame: number; + lastFrame: number; + running: boolean; + currentFrame: number; + allowTranslation: boolean; + } + + /** + * Returns the minimum scale allowed for this avatar in the current domain. + * This value can change as the user changes avatars or when changing domains. + * @returns {number} + */ + function getDomainMinScale(): number; + /** + * Returns the maximum scale allowed for this avatar in the current domain. + * This value can change as the user changes avatars or when changing domains. + * @returns {number} + */ + function getDomainMaxScale(): number; + /** + * Provides read only access to the current eye height of the avatar. + * This height is only an estimate and might be incorrect for avatars that are missing standard joints. + * @returns {number} + */ + function getEyeHeight(): number; + /** + * Provides read only access to the current height of the avatar. + * This height is only an estimate and might be incorrect for avatars that are missing standard joints. + * @returns {number} + */ + function getHeight(): number; + /** + * @param state {string} + */ + function setHandState(state: string): void; + /** + * @returns {string} + */ + function getHandState(): string; + /** + * @param data {Array.} + */ + function setRawJointData(data: Array.): void; + /** + * Set a specific joint's rotation and position relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointData(index: number, rotation: Quat, translation: Vec3): void; + /** + * Set a specific joint's rotation and position relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointData(name: string, rotation: Quat, translation: Vec3): void; + /** + * Set a specific joint's rotation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + */ + function setJointRotation(index: number, rotation: Quat): void; + /** + * Set a specific joint's rotation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + */ + function setJointRotation(name: string, rotation: Quat): void; + /** + * Set a specific joint's translation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointTranslation(index: number, translation: Vec3): void; + /** + * Set a specific joint's translation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointTranslation(name: string, translation: Vec3): void; + /** + * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default + * animation system including inverse kinematics for that joint. Note: This is slightly faster than the function variation that specifies the joint name. + * @param index {number} The index of the joint. + */ + function clearJointData(index: number): void; + /** + * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default + * animation system including inverse kinematics for that joint. Note: This is slightly slower than the function variation that specifies the joint index. + * @param name {string} The name of the joint. + */ + function clearJointData(name: string): void; + /** + * @param index {number} + * @returns {boolean} + */ + function isJointDataValid(index: number): boolean; + /** + * @param name {string} + * @returns {boolean} + */ + function isJointDataValid(name: string): boolean; + /** + * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param index {number} The index of the joint. + * @returns {Quat} + */ + function getJointRotation(index: number): Quat; + /** + * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param name {string} The name of the joint. + * @returns {Quat} + */ + function getJointRotation(name: string): Quat; + /** + * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param index {number} The index of the joint. + * @returns {Vec3} + */ + function getJointTranslation(index: number): Vec3; + /** + * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param name {number} The name of the joint. + * @returns {Vec3} + */ + function getJointTranslation(name: number): Vec3; + /** + * Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. + * @returns {Array.} + */ + function getJointRotations(): Array.; + /** + * @returns {Array.} + */ + function getJointTranslations(): Array.; + /** + * Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param jointRotations {Array.} The rotations for all joints in the avatar. The values are in the same order as the + * array returned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}. + */ + function setJointRotations(jointRotations: Array.): void; + /** + * @param translations {Array.} + */ + function setJointTranslations(translations: Array.): void; + /** + * Clear all joint translations and rotations that have been set by script. This restores all motion from the default + * animation system including inverse kinematics for all joints. + */ + function clearJointsData(): void; + /** + * Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by + * MyAvatar.getJointNames or Avatar.getJointNames. + * @param name {string} The name of the joint. + * @returns {number} + */ + function getJointIndex(name: string): number; + /** + * Get the names of all the joints in the current avatar. + * @returns {Array.} + */ + function getJointNames(): Array.; + /** + * @param name {string} + * @param value {number} + */ + function setBlendshape(name: string, value: number): void; + /** + * @returns {object} + */ + function getAttachmentsVariant(): object; + /** + * @param variant {object} + */ + function setAttachmentsVariant(variant: object): void; + /** + * @param entityID {Uuid} + * @param entityData {string} + */ + function updateAvatarEntity(entityID: Uuid, entityData: string): void; + /** + * @param entityID {Uuid} + */ + function clearAvatarEntity(entityID: Uuid): void; + /** + * @param connected {boolean} + */ + function setForceFaceTrackerConnected(connected: boolean): void; + /** + * Get information about all models currently attached to your avatar. + * @returns {Array.} + */ + function getAttachmentData(): Array.; + /** + * Set all models currently attached to your avatar. For example, if you retrieve attachment data using + * MyAvatar.getAttachmentData or Avatar.getAttachmentData, make changes to it, and then want to update your avatar's attachments per the changed data. You can also remove all attachments by using setting attachmentData to null. + * @param attachmentData {Array.} The attachment data defining the models to have attached to your avatar. Use + * null to remove all attachments. + */ + function setAttachmentData(attachmentData: Array.): void; + /** + * Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to + * stand on. Note: Attached models are models only; they are not entities and can not be manipulated using the Entities API. Nor can you use this function to attach an entity (such as a sphere or a box) to your avatar. + * @param modelURL {string} The URL of the model to attach. Models can be .FBX or .OBJ format. + * @param jointName {string} [jointName=""] The name of the avatar joint (see {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}) to attach the model + * to. + * @param translation {Vec3} [translation=Vec3.ZERO] The offset to apply to the model relative to the joint position. + * @param rotation {Quat} [rotation=Quat.IDENTITY] The rotation to apply to the model relative to the joint orientation. + * @param scale {number} [scale=1.0] The scale to apply to the model. + * @param isSoft {boolean} [isSoft=false] If the model has a skeleton, set this to true so that the bones of the + * attached model's skeleton are be rotated to fit the avatar's current pose. isSoft is used, for example, to have clothing that moves with the avatar.
If true, the translation, rotation, and scale parameters are ignored. + * @param allowDuplicates {boolean} [allowDuplicates=false] + * @param useSaved {boolean} [useSaved=true] + */ + function attach(modelURL: string, jointName: string, translation: Vec3, rotation: Quat, scale: number, isSoft: boolean, allowDuplicates: boolean, useSaved: boolean): void; + /** + * Detach the most recently attached instance of a particular model from either a specific joint or any joint. + * @param modelURL {string} The URL of the model to detach. + * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the most + * recently attached model is removed from which ever joint it was attached to. + */ + function detachOne(modelURL: string, jointName: string): void; + /** + * Detach all instances of a particular model from either a specific joint or all joints. + * @param modelURL {string} The URL of the model to detach. + * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the model is + * detached from all joints. + */ + function detachAll(modelURL: string, jointName: string): void; + /** + * @returns {object} + */ + function getAvatarEntityData(): object; + /** + * @param avatarEntityData {object} + */ + function setAvatarEntityData(avatarEntityData: object): void; + /** + * @returns {Mat4} + */ + function getSensorToWorldMatrix(): Mat4; + /** + * @returns {number} + */ + function getSensorToWorldScale(): number; + /** + * @returns {Mat4} + */ + function getControllerLeftHandMatrix(): Mat4; + /** + * @returns {Mat4} + */ + function getControllerRightHandMatrix(): Mat4; + /** + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getDataRate(rateName: string): number; + /** + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getUpdateRate(rateName: string): number; + /** + * @returns {Signal} + */ + function displayNameChanged(): Signal; + /** + * @returns {Signal} + */ + function sessionDisplayNameChanged(): Signal; + /** + * @returns {Signal} + */ + function skeletonModelURLChanged(): Signal; + /** + * @param enabled {boolean} + * @returns {Signal} + */ + function lookAtSnappingChanged(enabled: boolean): Signal; + /** + * @returns {Signal} + */ + function sessionUUIDChanged(): Signal; + /** + * @param sendAll {boolean} [sendAll=false] + */ + function sendAvatarDataPacket(sendAll: boolean): void; + function sendIdentityPacket(): void; + function setJointMappingsFromNetworkReply(): void; + /** + * @param sessionUUID {Uuid} + */ + function setSessionUUID(sessionUUID: Uuid): void; + /** + * @param index {number} + * @returns {Quat} + */ + function getAbsoluteJointRotationInObjectFrame(index: number): Quat; + /** + * @param index {number} + * @returns {Vec3} + */ + function getAbsoluteJointTranslationInObjectFrame(index: number): Vec3; + /** + * @param index {number} + * @param rotation {Quat} + * @returns {boolean} + */ + function setAbsoluteJointRotationInObjectFrame(index: number, rotation: Quat): boolean; + /** + * @param index {number} + * @param translation {Vec3} + * @returns {boolean} + */ + function setAbsoluteJointTranslationInObjectFrame(index: number, translation: Vec3): boolean; + /** + * @returns {number} + */ + function getTargetScale(): number; + function resetLastSent(): void; + let position: Vec3; + let scale: number; + /** + * Read-only. + */ + let density: number; + let handPosition: Vec3; + /** + * The rotation left or right about an axis running from the head to the feet of the avatar. + * Yaw is sometimes called "heading". + */ + let bodyYaw: number; + /** + * The rotation about an axis running from shoulder to shoulder of the avatar. Pitch is + * sometimes called "elevation". + */ + let bodyPitch: number; + /** + * The rotation about an axis running from the chest to the back of the avatar. Roll is + * sometimes called "bank". + */ + let bodyRoll: number; + let orientation: Quat; + /** + * The orientation of the avatar's head. + */ + let headOrientation: Quat; + /** + * The rotation about an axis running from ear to ear of the avatar's head. Pitch is + * sometimes called "elevation". + */ + let headPitch: number; + /** + * The rotation left or right about an axis running from the base to the crown of the avatar's + * head. Yaw is sometimes called "heading". + */ + let headYaw: number; + /** + * The rotation about an axis running from the nose to the back of the avatar's head. Roll is + * sometimes called "bank". + */ + let headRoll: number; + let velocity: Vec3; + let angularVelocity: Vec3; + let audioLoudness: number; + let audioAverageLoudness: number; + let displayName: string; + /** + * Sanitized, defaulted version displayName that is defined by the AvatarMixer + * rather than by Interface clients. The result is unique among all avatars present at the time. + */ + let sessionDisplayName: string; + let lookAtSnappingEnabled: boolean; + let skeletonModelURL: string; + let attachmentData: Array.; + /** + * The list of joints in the current avatar model. Read-only. + */ + let jointNames: Array.; + /** + * Read-only. + */ + let sessionUUID: Uuid; + /** + * Read-only. + */ + let sensorToWorldMatrix: Mat4; + /** + * Read-only. + */ + let controllerLeftHandMatrix: Mat4; + /** + * Read-only. + */ + let controllerRightHandMatrix: Mat4; + /** + * Read-only. + */ + let sensorToWorldScale: number; +} + +/** + * Available in:Assignment Client Scripts + */ +declare namespace EntityViewer { + function queryOctree(): void; + /** + * @param position {Vec3} + */ + function setPosition(position: Vec3): void; + /** + * @param orientation {Quat} + */ + function setOrientation(orientation: Quat): void; + /** + * @param radius {number} + */ + function setCenterRadius(radius: number): void; + /** + * @param radius {number} + */ + function setKeyholeRadius(radius: number): void; + /** + * @param sizeScale {number} + */ + function setVoxelSizeScale(sizeScale: number): void; + /** + * @param boundaryLevelAdjust {number} + */ + function setBoundaryLevelAdjust(boundaryLevelAdjust: number): void; + /** + * @param maxPacketsPerSecond {number} + */ + function setMaxPacketsPerSecond(maxPacketsPerSecond: number): void; + /** + * @returns {Vec3} + */ + function getPosition(): Vec3; + /** + * @returns {Quat} + */ + function getOrientation(): Quat; + /** + * @returns {number} + */ + function getVoxelSizeScale(): number; + /** + * @returns {number} + */ + function getBoundaryLevelAdjust(): number; + /** + * @returns {number} + */ + function getMaxPacketsPerSecond(): number; + /** + * @returns {number} + */ + function getOctreeElementsCount(): number; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace HifiAbout { + /** + * @param url {string} + */ + function openUrl(url: string): void; + let buildDate: string; + let buildVersion: string; + let qtVersion: string; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThis API helps manage adding and deleting avatar bookmarks. + */ +declare namespace AvatarBookmarks { + /** + * Add the current Avatar to your avatar bookmarks. + */ + function addBookMark(): void; + /** + * This function gets triggered after avatar loaded from bookmark + * @param bookmarkName {string} + * @returns {Signal} + */ + function bookmarkLoaded(bookmarkName: string): Signal; + /** + * This function gets triggered after avatar bookmark deleted + * @param bookmarkName {string} + * @returns {Signal} + */ + function bookmarkDeleted(bookmarkName: string): Signal; + /** + * This function gets triggered after avatar bookmark added + * @param bookmarkName {string} + * @returns {Signal} + */ + function bookmarkAdded(bookmarkName: string): Signal; + function deleteBookmark(): void; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace LocationBookmarks { + function deleteBookmark(): void; + function addBookmark(): void; + /** + * @param address {string} + */ + function setHomeLocationToAddress(address: string): void; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe LOD class manages your Level of Detail functions within Interface. + */ +declare namespace LODManager { + /** + * @param value {boolean} + */ + function setAutomaticLODAdjust(value: boolean): void; + /** + * @returns {boolean} + */ + function getAutomaticLODAdjust(): boolean; + /** + * @param value {number} + */ + function setDesktopLODTargetFPS(value: number): void; + /** + * @returns {number} + */ + function getDesktopLODTargetFPS(): number; + /** + * @param value {number} + */ + function setHMDLODTargetFPS(value: number): void; + /** + * @returns {number} + */ + function getHMDLODTargetFPS(): number; + /** + * @returns {string} + */ + function getLODFeedbackText(): string; + /** + * @param sizeScale {number} + */ + function setOctreeSizeScale(sizeScale: number): void; + /** + * @returns {number} + */ + function getOctreeSizeScale(): number; + /** + * @param boundaryLevelAdjust {number} + */ + function setBoundaryLevelAdjust(boundaryLevelAdjust: number): void; + /** + * @returns {number} + */ + function getBoundaryLevelAdjust(): number; + /** + * @returns {number} + */ + function getLODTargetFPS(): number; + /** + * @returns {Signal} + */ + function LODIncreased(): Signal; + /** + * @returns {Signal} + */ + function LODDecreased(): Signal; + /** + * Read-only. + */ + let presentTime: number; + /** + * Read-only. + */ + let engineRunTime: number; + /** + * Read-only. + */ + let gpuTime: number; + /** + * Read-only. + */ + let avgRenderTime: number; + /** + * Read-only. + */ + let fps: number; + /** + * Read-only. + */ + let lodLevel: number; + /** + * Read-only. + */ + let lodDecreaseFPS: number; + /** + * Read-only. + */ + let lodIncreaseFPS: number; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace SpeechRecognizer { + /** + * @param enabled {boolean} + */ + function setEnabled(enabled: boolean): void; + /** + * @param command {string} + */ + function addCommand(command: string): void; + /** + * @param command {string} + */ + function removeCommand(command: string): void; + /** + * @param command {string} + * @returns {Signal} + */ + function commandRecognized(command: string): Signal; + /** + * @param enabled {boolean} + * @returns {Signal} + */ + function enabledUpdated(enabled: boolean): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe AudioScope API helps control the Audio Scope features in Interface + */ +declare namespace AudioScope { + function toggle(): void; + /** + * @param visible {boolean} + */ + function setVisible(visible: boolean): void; + /** + * @returns {boolean} + */ + function getVisible(): boolean; + function togglePause(): void; + /** + * @param paused {boolean} + */ + function setPause(paused: boolean): void; + /** + * @returns {boolean} + */ + function getPause(): boolean; + function toggleTrigger(): void; + /** + * @returns {boolean} + */ + function getAutoTrigger(): boolean; + /** + * @param autoTrigger {boolean} + */ + function setAutoTrigger(autoTrigger: boolean): void; + /** + * @param x {number} + * @param y {number} + */ + function setTriggerValues(x: number, y: number): void; + /** + * @param triggered {boolean} + */ + function setTriggered(triggered: boolean): void; + /** + * @returns {boolean} + */ + function getTriggered(): boolean; + /** + * @returns {number} + */ + function getFramesPerSecond(): number; + /** + * @returns {number} + */ + function getFramesPerScope(): number; + function selectAudioScopeFiveFrames(): void; + function selectAudioScopeTwentyFrames(): void; + function selectAudioScopeFiftyFrames(): void; + /** + * @returns {Array.} + */ + function getScopeInput(): Array.; + /** + * @returns {Array.} + */ + function getScopeOutputLeft(): Array.; + /** + * @returns {Array.} + */ + function getScopeOutputRight(): Array.; + /** + * @returns {Array.} + */ + function getTriggerInput(): Array.; + /** + * @returns {Array.} + */ + function getTriggerOutputLeft(): Array.; + /** + * @returns {Array.} + */ + function getTriggerOutputRight(): Array.; + function setLocalEcho(): void; + function setServerEcho(): void; + /** + * @returns {Signal} + */ + function pauseChanged(): Signal; + /** + * @returns {Signal} + */ + function triggered(): Signal; + /** + * Read-only. + */ + let scopeInput: number; + /** + * Read-only. + */ + let scopeOutputLeft: number; + /** + * Read-only. + */ + let scopeOutputRight: number; + /** + * Read-only. + */ + let triggerInput: number; + /** + * Read-only. + */ + let triggerOutputLeft: number; + /** + * Read-only. + */ + let triggerOutputRight: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe AvatarManager API has properties and methods which manage Avatars within the same domain. + * Note: This API is also provided to Interface and client entity scripts as the synonym, AvatarList. For assignment client scripts, see the separate AvatarList API. + */ +declare namespace AvatarManager { + /** + * @param avatarID {Uuid} + * @returns {AvatarData} + */ + function getAvatar(avatarID: Uuid): AvatarData; + /** + * @param sessionID {Uuid} + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getAvatarDataRate(sessionID: Uuid, rateName: string): number; + /** + * @param sessionID {Uuid} + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getAvatarUpdateRate(sessionID: Uuid, rateName: string): number; + /** + * @param sessionID {Uuid} + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getAvatarSimulationRate(sessionID: Uuid, rateName: string): number; + /** + * @param ray {PickRay} + * @param avatarsToInclude {Array.} [avatarsToInclude=[]] + * @param avatarsToDiscard {Array.} [avatarsToDiscard=[]] + * @returns {RayToAvatarIntersectionResult} + */ + function findRayIntersection(ray: PickRay, avatarsToInclude: Array., avatarsToDiscard: Array.): RayToAvatarIntersectionResult; + /** + * @param ray {PickRay} + * @param avatarsToInclude {Array.} + * @param avatarsToDiscard {Array.} + * @returns {RayToAvatarIntersectionResult} + */ + function findRayIntersectionVector(ray: PickRay, avatarsToInclude: Array., avatarsToDiscard: Array.): RayToAvatarIntersectionResult; + /** + * @param name {string} + * @returns {number} + */ + function getAvatarSortCoefficient(name: string): number; + /** + * @param name {string} + * @param value {number} + */ + function setAvatarSortCoefficient(name: string, value: number): void; + /** + * Used in the PAL for getting PAL-related data about avatars nearby. Using this method is faster + * than iterating over each avatar and obtaining data about them in JavaScript, as that method locks and unlocks each avatar's data structure potentially hundreds of times per update tick. + * @param specificAvatarIdentifiers {Array.} A list of specific Avatar Identifiers about + * which you want to get PAL data + * @returns {object} + */ + function getPalData(specificAvatarIdentifiers: Array.): object; + /** + * @param shouldRenderAvatars {boolean} + */ + function updateAvatarRenderStatus(shouldRenderAvatars: boolean): void; + /** + * @returns {Array.} + */ + function getAvatarIdentifiers(): Array.; + /** + * @param position {Vec3} + * @param range {number} + * @returns {Array.} + */ + function getAvatarsInRange(position: Vec3, range: number): Array.; + /** + * @param sessionUUID {Uuid} + * @returns {Signal} + */ + function avatarAddedEvent(sessionUUID: Uuid): Signal; + /** + * @param sessionUUID {Uuid} + * @returns {Signal} + */ + function avatarRemovedEvent(sessionUUID: Uuid): Signal; + /** + * @param sessionUUID {Uuid} + * @param oldSessionUUID {Uuid} + * @returns {Signal} + */ + function avatarSessionChangedEvent(sessionUUID: Uuid, oldSessionUUID: Uuid): Signal; + /** + * @param position {string} + * @param range {string} + * @returns {boolean} + */ + function isAvatarInRange(position: string, range: string): boolean; + /** + * @param sessionUUID {Uuid} + * @param oldSessionUUID {Uuid} + */ + function sessionUUIDChanged(sessionUUID: Uuid, oldSessionUUID: Uuid): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processAvatarDataPacket(message, sendingNode): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processAvatarIdentityPacket(message, sendingNode): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processKillAvatar(message, sendingNode): void; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsYour avatar is your in-world representation of you. The MyAvatar API is used to manipulate the avatar. + * For example, you can customize the avatar's appearance, run custom avatar animations, change the avatar's position within the domain, or manage the avatar's collisions with other objects. + */ +declare namespace MyAvatar { + function resetSensorsAndBody(): void; + /** + * Moves and orients the avatar, such that it is directly underneath the HMD, with toes pointed forward. + */ + function centerBody(): void; + /** + * The internal inverse-kinematics system maintains a record of which joints are "locked". Sometimes it is useful to forget this history, to prevent + * contorted joints. + */ + function clearIKJointLimitHistory(): void; + /** + * @param newOrientationVar {object} + */ + function setOrientationVar(newOrientationVar: object): void; + /** + * @returns {object} + */ + function getOrientationVar(): object; + /** + * Get the position in world coordinates of the point directly between your avatar's eyes assuming your avatar was in its + * default pose. This is a reference position; it does not change as your avatar's head moves relative to the avatar position. + * @returns {Vec3} + */ + function getDefaultEyePosition(): Vec3; + /** + * The avatar animation system includes a set of default animations along with rules for how those animations are blended + * together with procedural data (such as look at vectors, hand sensors etc.). overrideAnimation() is used to completely override all motion from the default animation system (including inverse kinematics for hand and head controllers) and play a set of specified animations. To end these animations and restore the default animations, use MyAvatar.restoreAnimation. Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target rig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, the avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see Avatar Standards. + * @param url {string} The URL to the animation file. Animation files need to be .FBX format, but only need to contain the + * avatar skeleton and animation data. + * @param fps {number} The frames per second (FPS) rate for the animation playback. 30 FPS is normal speed. + * @param loop {boolean} Set to true if the animation should loop. + * @param firstFrame {number} The frame the animation should start at. + * @param lastFrame {number} The frame the animation should end at. + */ + function overrideAnimation(url: string, fps: number, loop: boolean, firstFrame: number, lastFrame: number): void; + /** + * The avatar animation system includes a set of default animations along with rules for how those animations are blended together with + * procedural data (such as look at vectors, hand sensors etc.). Playing your own custom animations will override the default animations. restoreAnimation() is used to restore all motion from the default animation system including inverse kinematics for hand and head controllers. If you aren't currently playing an override animation, this function will have no effect. + */ + function restoreAnimation(): void; + /** + * Each avatar has an avatar-animation.json file that defines which animations are used and how they are blended together with procedural data + * (such as look at vectors, hand sensors etc.). Each animation specified in the avatar-animation.json file is known as an animation role. Animation roles map to easily understandable actions that the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd." getAnimationRoles() is used get the list of animation roles defined in the avatar-animation.json. + * @returns {Array.} + */ + function getAnimationRoles(): Array.; + /** + * Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions + * that the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd". To get the full list of roles, use getAnimationRoles(). For each role, the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended together with procedural data (such as look at vectors, hand sensors etc.). overrideRoleAnimation() is used to change the animation clip (.FBX) associated with a specified animation role. To end the animations and restore the default animations, use MyAvatar.restoreRoleAnimation. Note: Hand roles only affect the hand. Other 'main' roles, like 'idleStand', 'idleTalk', 'takeoffStand' are full body. Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target rig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, the avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see Avatar Standards. + * @param role {string} The animation role to override + * @param url {string} The URL to the animation file. Animation files need to be .FBX format, but only need to contain the avatar skeleton and animation data. + * @param fps {number} The frames per second (FPS) rate for the animation playback. 30 FPS is normal speed. + * @param loop {boolean} Set to true if the animation should loop + * @param firstFrame {number} The frame the animation should start at + * @param lastFrame {number} The frame the animation should end at + */ + function overrideRoleAnimation(role: string, url: string, fps: number, loop: boolean, firstFrame: number, lastFrame: number): void; + /** + * Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions that + * the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd". To get the full list of roles, use getAnimationRoles(). For each role, the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended together with procedural data (such as look at vectors, hand sensors etc.). You can change the animation clip (.FBX) associated with a specified animation role using overrideRoleAnimation(). restoreRoleAnimation() is used to restore a specified animation role's default animation clip. If you have not specified an override animation for the specified role, this function will have no effect. + * @param role {string} The animation role clip to restore. + */ + function restoreRoleAnimation(role: string): void; + /** + * @param handler {number} + */ + function removeAnimationStateHandler(handler: number): void; + /** + * @returns {boolean} + */ + function getSnapTurn(): boolean; + /** + * @param on {boolean} + */ + function setSnapTurn(on: boolean): void; + /** + * @param hand {string} + */ + function setDominantHand(hand: string): void; + /** + * @returns {string} + */ + function getDominantHand(): string; + /** + * @param enabled {boolean} + */ + function setCenterOfGravityModelEnabled(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getCenterOfGravityModelEnabled(): boolean; + /** + * @param enabled {boolean} + */ + function setHMDLeanRecenterEnabled(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getHMDLeanRecenterEnabled(): boolean; + /** + * Request to enable hand touch effect globally + */ + function requestEnableHandTouch(): void; + /** + * Request to disable hand touch effect globally + */ + function requestDisableHandTouch(): void; + /** + * Disables hand touch effect on a specific entity + * @param entityID {Uuid} ID of the entity that will disable hand touch effect + */ + function disableHandTouchForID(entityID: Uuid): void; + /** + * Enables hand touch effect on a specific entity + * @param entityID {Uuid} ID of the entity that will enable hand touch effect + */ + function enableHandTouchForID(entityID: Uuid): void; + /** + * @param key {DriveKeys} + * @returns {number} + */ + function getRawDriveKey(key: DriveKeys): number; + /** + * @param key {DriveKeys} + */ + function disableDriveKey(key: DriveKeys): void; + /** + * @param key {DriveKeys} + */ + function enableDriveKey(key: DriveKeys): void; + /** + * @param key {DriveKeys} + * @returns {boolean} + */ + function isDriveKeyDisabled(key: DriveKeys): boolean; + /** + * Recenter the avatar in the vertical direction, if MyAvatar is + * false. + */ + function triggerVerticalRecenter(): void; + /** + * Recenter the avatar's rotation, if MyAvatar is false. + */ + function triggerRotationRecenter(): void; + /** + * The isRecenteringHorizontally function returns true if MyAvatar + * is translating the root of the Avatar to keep the center of gravity under the head. isActive(Horizontal) is returned. + */ + function isRecenteringHorizontally(): void; + /** + * Get the current position of the avatar's "Head" joint. + * @returns {Vec3} + */ + function getHeadPosition(): Vec3; + /** + * @returns {number} + */ + function getHeadFinalYaw(): number; + /** + * @returns {number} + */ + function getHeadFinalRoll(): number; + /** + * @returns {number} + */ + function getHeadFinalPitch(): number; + /** + * @returns {number} + */ + function getHeadDeltaPitch(): number; + /** + * Get the current position of the point directly between the avatar's eyes. + * @returns {Vec3} + */ + function getEyePosition(): Vec3; + /** + * @returns {Vec3} + */ + function getTargetAvatarPosition(): Vec3; + /** + * @returns {AvatarData} + */ + function getTargetAvatar(): AvatarData; + /** + * Get the position of the avatar's left hand as positioned by a hand controller (e.g., Oculus Touch or Vive). + * Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.) + * @returns {Vec3} + */ + function getLeftHandPosition(): Vec3; + /** + * Get the position of the avatar's right hand as positioned by a hand controller (e.g., Oculus Touch or Vive). + * Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.) + * @returns {Vec3} + */ + function getRightHandPosition(): Vec3; + /** + * @returns {Vec3} + */ + function getLeftHandTipPosition(): Vec3; + /** + * @returns {Vec3} + */ + function getRightHandTipPosition(): Vec3; + /** + * Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a + * hand controller (e.g., Oculus Touch or Vive). Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.) If you are using the Leap Motion, the return value's valid property will be false and any pose values returned will not be meaningful. + * @returns {Pose} + */ + function getLeftHandPose(): Pose; + /** + * Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a + * hand controller (e.g., Oculus Touch or Vive). Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.) If you are using the Leap Motion, the return value's valid property will be false and any pose values returned will not be meaningful. + * @returns {Pose} + */ + function getRightHandPose(): Pose; + /** + * @returns {Pose} + */ + function getLeftHandTipPose(): Pose; + /** + * @returns {Pose} + */ + function getRightHandTipPose(): Pose; + /** + * @param position {Vec3} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Vec3} + */ + function worldToJointPoint(position: Vec3, jointIndex: number): Vec3; + /** + * @param direction {Vec3} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Vec3} + */ + function worldToJointDirection(direction: Vec3, jointIndex: number): Vec3; + /** + * @param rotation {Quat} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Quat} + */ + function worldToJointRotation(rotation: Quat, jointIndex: number): Quat; + /** + * @param position {vec3} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Vec3} + */ + function jointToWorldPoint(position: vec3, jointIndex: number): Vec3; + /** + * @param direction {Vec3} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Vec3} + */ + function jointToWorldDirection(direction: Vec3, jointIndex: number): Vec3; + /** + * @param rotation {Quat} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Quat} + */ + function jointToWorldRotation(rotation: Quat, jointIndex: number): Quat; + /** + * @param index {number} + * @param position {Vec3} + * @param orientation {Quat} + * @returns {boolean} + */ + function pinJoint(index: number, position: Vec3, orientation: Quat): boolean; + /** + * @param index {number} + * @returns {boolean} + */ + function clearPinOnJoint(index: number): boolean; + /** + * @returns {number} + */ + function getIKErrorOnLastSolve(): number; + /** + * @param fullAvatarURL {string} + * @param modelName {string} [modelName=""] + */ + function useFullAvatarURL(fullAvatarURL: string, modelName: string): void; + /** + * Get the complete URL for the current avatar. + * @returns {string} + */ + function getFullAvatarURLFromPreferences(): string; + /** + * Get the full avatar model name for the current avatar. + * @returns {string} + */ + function getFullAvatarModelName(): string; + /** + * Function returns list of avatar entities + * @returns {Array.} + */ + function getAvatarEntitiesVariant()(): Array.; + /** + * @returns {boolean} + */ + function isFlying(): boolean; + /** + * @returns {boolean} + */ + function isInAir(): boolean; + /** + * @param enabled {boolean} + */ + function setFlyingEnabled(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getFlyingEnabled(): boolean; + /** + * @param enabled {boolean} + */ + function setFlyingDesktopPref(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getFlyingDesktopPref(): boolean; + /** + * @param enabled {boolean} + */ + function setFlyingDesktopPref(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getFlyingDesktopPref(): boolean; + /** + * @returns {number} + */ + function getAvatarScale(): number; + /** + * @param scale {number} + */ + function setAvatarScale(scale: number): void; + /** + * @param enabled {boolean} + */ + function setCollisionsEnabled(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getCollisionsEnabled(): boolean; + /** + * @returns {object} + */ + function getCollisionCapsule(): object; + /** + * @param enabled {boolean} + */ + function setCharacterControllerEnabled(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getCharacterControllerEnabled(): boolean; + /** + * @param direction {Vec3} + * @returns {boolean} + */ + function isUp(direction: Vec3): boolean; + /** + * @param direction {Vec3} + * @returns {boolean} + */ + function isDown(direction: Vec3): boolean; + /** + * Increase the avatar's scale by five percent, up to a minimum scale of 1000. + */ + function increaseSize(): void; + /** + * Decrease the avatar's scale by five percent, down to a minimum scale of 0.25. + */ + function decreaseSize(): void; + /** + * Reset the avatar's scale back to the default scale of 1.0. + */ + function resetSize(): void; + function animGraphLoaded(): void; + /** + * @param gravity {number} + */ + function setGravity(gravity: number): void; + /** + * @returns {number} + */ + function getGravity(): number; + /** + * Move the avatar to a new position and/or orientation in the domain, while taking into account Avatar leg-length. + * @param position {Vec3} The new position for the avatar, in world coordinates. + * @param hasOrientation {boolean} [hasOrientation=false] Set to true to set the orientation of the avatar. + * @param orientation {Quat} [orientation=Quat.IDENTITY] The new orientation for the avatar. + * @param shouldFaceLocation {boolean} [shouldFaceLocation=false] Set to true to position the avatar a short distance away from + * the new position and orientate the avatar to face the position. + */ + function goToFeetLocation(position: Vec3, hasOrientation: boolean, orientation: Quat, shouldFaceLocation: boolean): void; + /** + * Move the avatar to a new position and/or orientation in the domain. + * @param position {Vec3} The new position for the avatar, in world coordinates. + * @param hasOrientation {boolean} [hasOrientation=false] Set to true to set the orientation of the avatar. + * @param orientation {Quat} [orientation=Quat.IDENTITY] The new orientation for the avatar. + * @param shouldFaceLocation {boolean} [shouldFaceLocation=false] Set to true to position the avatar a short distance away from + * @param withSafeLanding {boolean} [withSafeLanding=true] Set to false MyAvatar::safeLanding will not be called (used when teleporting). + * the new position and orientate the avatar to face the position. + */ + function goToLocation(position: Vec3, hasOrientation: boolean, orientation: Quat, shouldFaceLocation: boolean, withSafeLanding: boolean): void; + /** + * @param properties {object} + */ + function goToLocation(properties: object): void; + /** + * @param position {Vec3} + */ + function goToLocationAndEnableCollisions(position: Vec3): void; + /** + * @param position {Vec3} + * @returns {boolean} + */ + function safeLanding(position: Vec3): boolean; + /** + * @param domainSettingsObject {objecct} + */ + function restrictScaleFromDomainSettings(domainSettingsObject: objecct): void; + function clearScaleRestriction(): void; + /** + * @param thrust {Vec3} + */ + function addThrust(thrust: Vec3): void; + /** + * @returns {vec3} + */ + function getThrust(): vec3; + /** + * @param thrust {Vec3} + */ + function setThrust(thrust: Vec3): void; + function updateMotionBehaviorFromMenu(): void; + /** + * @param enabled {boolean} + */ + function setToggleHips(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawBaseOfSupport(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawDefaultPose(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawAnimPose(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawPosition(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawHandControllers(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawSensorToWorldMatrix(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawIKTargets(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawIKConstraints(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawIKChains(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawDetailedCollision(enabled: boolean): void; + /** + * Get whether or not your avatar mesh is visible. + * @returns {boolean} + */ + function getEnableMeshVisible(): boolean; + /** + * Set whether or not your avatar mesh is visible. + * @param visible {boolean} true to set your avatar mesh visible; false to set it invisible. + */ + function setEnableMeshVisible(visible: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableInverseKinematics(enabled: boolean): void; + /** + * @returns {string} + */ + function getAnimGraphOverrideUrl(): string; + /** + * @param url {string} + */ + function setAnimGraphOverrideUrl(url: string): void; + /** + * @returns {string} + */ + function getAnimGraphUrl(): string; + /** + * @param url {string} + */ + function setAnimGraphUrl(url: string): void; + /** + * @returns {Vec3} + */ + function getPositionForAudio(): Vec3; + /** + * @returns {Quat} + */ + function getOrientationForAudio(): Quat; + /** + * @param scale {number} + */ + function setModelScale(scale: number): void; + /** + * @returns {Signal} + */ + function audioListenerModeChanged(): Signal; + /** + * @returns {Signal} + */ + function transformChanged(): Signal; + /** + * @param url {string} + * @returns {Signal} + */ + function newCollisionSoundURL(url: string): Signal; + /** + * Triggered when the avatar collides with an entity. + * @param collision {Collision} + * @returns {Signal} + */ + function collisionWithEntity(collision: Collision): Signal; + /** + * Triggered when collisions with avatar enabled or disabled + * @param enabled {boolean} + * @returns {Signal} + */ + function collisionsEnabledChanged(enabled: boolean): Signal; + /** + * Triggered when avatar's animation url changes + * @param url {url} + * @returns {Signal} + */ + function animGraphUrlChanged(url: url): Signal; + /** + * @param energy {number} + * @returns {Signal} + */ + function energyChanged(energy: number): Signal; + /** + * @returns {Signal} + */ + function positionGoneTo(): Signal; + /** + * @returns {Signal} + */ + function onLoadComplete(): Signal; + /** + * @returns {Signal} + */ + function wentAway(): Signal; + /** + * @returns {Signal} + */ + function wentActive(): Signal; + /** + * @returns {Signal} + */ + function skeletonChanged(): Signal; + /** + * @param hand {string} + * @returns {Signal} + */ + function dominantHandChanged(hand: string): Signal; + /** + * @param scale {number} + * @returns {Signal} + */ + function sensorToWorldScaleChanged(scale: number): Signal; + /** + * @returns {Signal} + */ + function attachmentsChanged(): Signal; + /** + * @returns {Signal} + */ + function scaleChanged(): Signal; + /** + * Triggered when hand touch is globally enabled or disabled + * @param shouldDisable {boolean} + * @returns {Signal} + */ + function shouldDisableHandTouchChanged(shouldDisable: boolean): Signal; + /** + * Triggered when hand touch is enabled or disabled for an specific entity + * @param entityID {Uuid} ID of the entity that will enable hand touch effect + * @param disable {boolean} + * @returns {Signal} + */ + function disableHandTouchForIDChanged(entityID: Uuid, disable: boolean): Signal; + /** + * Returns the minimum scale allowed for this avatar in the current domain. + * This value can change as the user changes avatars or when changing domains. + * @returns {number} + */ + function getDomainMinScale(): number; + /** + * Returns the maximum scale allowed for this avatar in the current domain. + * This value can change as the user changes avatars or when changing domains. + * @returns {number} + */ + function getDomainMaxScale(): number; + /** + * Provides read only access to the current eye height of the avatar. + * This height is only an estimate and might be incorrect for avatars that are missing standard joints. + * @returns {number} + */ + function getEyeHeight(): number; + /** + * Provides read only access to the current height of the avatar. + * This height is only an estimate and might be incorrect for avatars that are missing standard joints. + * @returns {number} + */ + function getHeight(): number; + /** + * @param state {string} + */ + function setHandState(state: string): void; + /** + * @returns {string} + */ + function getHandState(): string; + /** + * @param data {Array.} + */ + function setRawJointData(data: Array.): void; + /** + * Set a specific joint's rotation and position relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointData(index: number, rotation: Quat, translation: Vec3): void; + /** + * Set a specific joint's rotation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + */ + function setJointRotation(index: number, rotation: Quat): void; + /** + * Set a specific joint's translation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointTranslation(index: number, translation: Vec3): void; + /** + * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default + * animation system including inverse kinematics for that joint. Note: This is slightly faster than the function variation that specifies the joint name. + * @param index {number} The index of the joint. + */ + function clearJointData(index: number): void; + /** + * @param index {number} + * @returns {boolean} + */ + function isJointDataValid(index: number): boolean; + /** + * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param index {number} The index of the joint. + * @returns {Quat} + */ + function getJointRotation(index: number): Quat; + /** + * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param index {number} The index of the joint. + * @returns {Vec3} + */ + function getJointTranslation(index: number): Vec3; + /** + * Set a specific joint's rotation and position relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointData(name: string, rotation: Quat, translation: Vec3): void; + /** + * Set a specific joint's rotation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + */ + function setJointRotation(name: string, rotation: Quat): void; + /** + * Set a specific joint's translation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointTranslation(name: string, translation: Vec3): void; + /** + * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default + * animation system including inverse kinematics for that joint. Note: This is slightly slower than the function variation that specifies the joint index. + * @param name {string} The name of the joint. + */ + function clearJointData(name: string): void; + /** + * @param name {string} + * @returns {boolean} + */ + function isJointDataValid(name: string): boolean; + /** + * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param name {string} The name of the joint. + * @returns {Quat} + */ + function getJointRotation(name: string): Quat; + /** + * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param name {number} The name of the joint. + * @returns {Vec3} + */ + function getJointTranslation(name: number): Vec3; + /** + * Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. + * @returns {Array.} + */ + function getJointRotations(): Array.; + /** + * @returns {Array.} + */ + function getJointTranslations(): Array.; + /** + * Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param jointRotations {Array.} The rotations for all joints in the avatar. The values are in the same order as the + * array returned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}. + */ + function setJointRotations(jointRotations: Array.): void; + /** + * @param translations {Array.} + */ + function setJointTranslations(translations: Array.): void; + /** + * Clear all joint translations and rotations that have been set by script. This restores all motion from the default + * animation system including inverse kinematics for all joints. + */ + function clearJointsData(): void; + /** + * Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by + * MyAvatar.getJointNames or Avatar.getJointNames. + * @param name {string} The name of the joint. + * @returns {number} + */ + function getJointIndex(name: string): number; + /** + * Get the names of all the joints in the current avatar. + * @returns {Array.} + */ + function getJointNames(): Array.; + /** + * @param name {string} + * @param value {number} + */ + function setBlendshape(name: string, value: number): void; + /** + * @returns {object} + */ + function getAttachmentsVariant(): object; + /** + * @param variant {object} + */ + function setAttachmentsVariant(variant: object): void; + /** + * @param entityID {Uuid} + * @param entityData {string} + */ + function updateAvatarEntity(entityID: Uuid, entityData: string): void; + /** + * @param entityID {Uuid} + */ + function clearAvatarEntity(entityID: Uuid): void; + /** + * @param connected {boolean} + */ + function setForceFaceTrackerConnected(connected: boolean): void; + /** + * Get information about all models currently attached to your avatar. + * @returns {Array.} + */ + function getAttachmentData(): Array.; + /** + * Set all models currently attached to your avatar. For example, if you retrieve attachment data using + * MyAvatar.getAttachmentData or Avatar.getAttachmentData, make changes to it, and then want to update your avatar's attachments per the changed data. You can also remove all attachments by using setting attachmentData to null. + * @param attachmentData {Array.} The attachment data defining the models to have attached to your avatar. Use + * null to remove all attachments. + */ + function setAttachmentData(attachmentData: Array.): void; + /** + * Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to + * stand on. Note: Attached models are models only; they are not entities and can not be manipulated using the Entities API. Nor can you use this function to attach an entity (such as a sphere or a box) to your avatar. + * @param modelURL {string} The URL of the model to attach. Models can be .FBX or .OBJ format. + * @param jointName {string} [jointName=""] The name of the avatar joint (see {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}) to attach the model + * to. + * @param translation {Vec3} [translation=Vec3.ZERO] The offset to apply to the model relative to the joint position. + * @param rotation {Quat} [rotation=Quat.IDENTITY] The rotation to apply to the model relative to the joint orientation. + * @param scale {number} [scale=1.0] The scale to apply to the model. + * @param isSoft {boolean} [isSoft=false] If the model has a skeleton, set this to true so that the bones of the + * attached model's skeleton are be rotated to fit the avatar's current pose. isSoft is used, for example, to have clothing that moves with the avatar.
If true, the translation, rotation, and scale parameters are ignored. + * @param allowDuplicates {boolean} [allowDuplicates=false] + * @param useSaved {boolean} [useSaved=true] + */ + function attach(modelURL: string, jointName: string, translation: Vec3, rotation: Quat, scale: number, isSoft: boolean, allowDuplicates: boolean, useSaved: boolean): void; + /** + * Detach the most recently attached instance of a particular model from either a specific joint or any joint. + * @param modelURL {string} The URL of the model to detach. + * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the most + * recently attached model is removed from which ever joint it was attached to. + */ + function detachOne(modelURL: string, jointName: string): void; + /** + * Detach all instances of a particular model from either a specific joint or all joints. + * @param modelURL {string} The URL of the model to detach. + * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the model is + * detached from all joints. + */ + function detachAll(modelURL: string, jointName: string): void; + /** + * @returns {object} + */ + function getAvatarEntityData(): object; + /** + * @param avatarEntityData {object} + */ + function setAvatarEntityData(avatarEntityData: object): void; + /** + * @returns {Mat4} + */ + function getSensorToWorldMatrix(): Mat4; + /** + * @returns {number} + */ + function getSensorToWorldScale(): number; + /** + * @returns {Mat4} + */ + function getControllerLeftHandMatrix(): Mat4; + /** + * @returns {Mat4} + */ + function getControllerRightHandMatrix(): Mat4; + /** + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getDataRate(rateName: string): number; + /** + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getUpdateRate(rateName: string): number; + /** + * @returns {Signal} + */ + function displayNameChanged(): Signal; + /** + * @returns {Signal} + */ + function sessionDisplayNameChanged(): Signal; + /** + * @returns {Signal} + */ + function skeletonModelURLChanged(): Signal; + /** + * @param enabled {boolean} + * @returns {Signal} + */ + function lookAtSnappingChanged(enabled: boolean): Signal; + /** + * @returns {Signal} + */ + function sessionUUIDChanged(): Signal; + /** + * @param sendAll {boolean} [sendAll=false] + */ + function sendAvatarDataPacket(sendAll: boolean): void; + function sendIdentityPacket(): void; + function setJointMappingsFromNetworkReply(): void; + /** + * @param sessionUUID {Uuid} + */ + function setSessionUUID(sessionUUID: Uuid): void; + /** + * @param index {number} + * @returns {Quat} + */ + function getAbsoluteJointRotationInObjectFrame(index: number): Quat; + /** + * @param index {number} + * @returns {Vec3} + */ + function getAbsoluteJointTranslationInObjectFrame(index: number): Vec3; + /** + * @param index {number} + * @param rotation {Quat} + * @returns {boolean} + */ + function setAbsoluteJointRotationInObjectFrame(index: number, rotation: Quat): boolean; + /** + * @param index {number} + * @param translation {Vec3} + * @returns {boolean} + */ + function setAbsoluteJointTranslationInObjectFrame(index: number, translation: Vec3): boolean; + /** + * @returns {number} + */ + function getTargetScale(): number; + function resetLastSent(): void; + /** + * @param index {number} + * @returns {Quat} + */ + function getDefaultJointRotation(index: number): Quat; + /** + * @param index {number} + * @returns {Vec3} + */ + function getDefaultJointTranslation(index: number): Vec3; + /** + * Provides read only access to the default joint rotations in avatar coordinates. + * The default pose of the avatar is defined by the position and orientation of all bones in the avatar's model file. Typically this is a T-pose. + * @param index {number} index number + * @returns {Quat} + */ + function getAbsoluteDefaultJointRotationInObjectFrame(index: number): Quat; + /** + * Provides read only access to the default joint translations in avatar coordinates. + * The default pose of the avatar is defined by the position and orientation of all bones in the avatar's model file. Typically this is a T-pose. + * @param index {number} index number + * @returns {Vec3} + */ + function getAbsoluteDefaultJointTranslationInObjectFrame(index: number): Vec3; + /** + * Set the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, + * with an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly. + * @param offset {Vec3} The skeleton offset to set. + */ + function setSkeletonOffset(offset: Vec3): void; + /** + * Get the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, + * with an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly. + * @returns {Vec3} + */ + function getSkeletonOffset(): Vec3; + /** + * Get the position of a joint in the current avatar. + * @param index {number} The index of the joint. + * @returns {Vec3} + */ + function getJointPosition(index: number): Vec3; + /** + * Get the position of a joint in the current avatar. + * @param name {string} The name of the joint. + * @returns {Vec3} + */ + function getJointPosition(name: string): Vec3; + /** + * Get the position of the current avatar's neck in world coordinates. + * @returns {Vec3} + */ + function getNeckPosition(): Vec3; + /** + * @returns {Vec3} + */ + function getAcceleration(): Vec3; + /** + * Get the position of the current avatar's feet (or rather, bottom of its collision capsule) in world coordinates. + * @returns {Vec3} + */ + function getWorldFeetPosition(): Vec3; + /** + * @returns {Uuid} + */ + function getParentID(): Uuid; + /** + * @param parentID {Uuid} + */ + function setParentID(parentID: Uuid): void; + /** + * @returns {number} + */ + function getParentJointIndex(): number; + /** + * @param parentJointIndex {number} + */ + function setParentJointIndex(parentJointIndex: number): void; + /** + * Returns an array of joints, where each joint is an object containing name, index, and parentIndex fields. + * @returns {Array.} + */ + function getSkeleton(): Array.; + interface SkeletonJoint { + /** + * Joint name. + */ + name: string; + /** + * Joint index. + */ + index: number; + /** + * Index of this joint's parent (-1 if no parent). + */ + parentIndex: number; + } + + /** + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getSimulationRate(rateName: string): number; + /** + * Get the position of the left palm in world coordinates. + * @returns {Vec3} + */ + function getLeftPalmPosition(): Vec3; + /** + * Get the rotation of the left palm in world coordinates. + * @returns {Quat} + */ + function getLeftPalmRotation(): Quat; + /** + * Get the position of the right palm in world coordinates. + * @returns {Vec3} + */ + function getRightPalmPosition(): Vec3; + /** + * Get the rotation of the right palm in world coordinates. + * @returns {Quat} + */ + function getRightPalmRotation(): Quat; + /** + * @returns {Signal} + */ + function rigReady(): Signal; + /** + * @returns {Signal} + */ + function rigReset(): Signal; + /** + * A synonym for position for use by QML. + */ + let qmlPosition: Vec3; + /** + * If true then your avatar is rendered for you in Interface, + * otherwise it is not rendered for you (but it is still rendered for other users). + */ + let shouldRenderLocally: boolean; + /** + * The target velocity of your avatar to be achieved by a scripted motor. + */ + let motorVelocity: Vec3; + /** + * The timescale for the scripted motor to achieve the target + * motorVelocity avatar velocity. Smaller values result in higher acceleration. + */ + let motorTimescale: number; + /** + * Reference frame of the motorVelocity. Must be one of the + * following: "camera", "avatar", and "world". + */ + let motorReferenceFrame: string; + /** + * The Type of scripted motor behavior: "simple" to use the + * motorTimescale time scale; "dynamic" to use character controller timescales. + */ + let motorMode: string; + /** + * The sound that's played when the avatar experiences a + * collision. It can be a mono or stereo 16-bit WAV file running at either 24kHz or 48kHz. The latter is down-sampled by the audio mixer, so all audio effectively plays back at a 24khz. 48kHz RAW files are also supported. + */ + let collisionSoundURL: string; + /** + * Specifies the listening position when hearing spatialized audio. Must be one + * of the following property values: audioListenerModeHead audioListenerModeCamera audioListenerModeCustom + */ + let audioListenerMode: number; + /** + * The audio listening position is at the avatar's head. Read-only. + */ + let audioListenerModeHead: number; + /** + * The audio listening position is at the camera. Read-only. + */ + let audioListenerModeCamera: number; + /** + * The audio listening position is at a the position specified by set by the + * customListenPosition and customListenOrientation property values. Read-only. + */ + let audioListenerModeCustom: number; + /** + * Blendshapes will be transmitted over the network if set to true. + */ + let hasScriptedBlendshapes: boolean; + /** + * procedural blinking will be turned on if set to true. + */ + let hasProceduralBlinkFaceMovement: boolean; + /** + * procedural eye movement will be turned on if set to true. + */ + let hasProceduralEyeFaceMovement: boolean; + /** + * If set to true, voice audio will move the mouth Blendshapes while MyAvatar.hasScriptedBlendshapes is enabled. + */ + let hasAudioEnabledFaceMovement: boolean; + /** + * The listening position used when the audioListenerMode + * property value is audioListenerModeCustom. + */ + let customListenPosition: Vec3; + /** + * The listening orientation used when the + * audioListenerMode property value is audioListenerModeCustom. + */ + let customListenOrientation: Quat; + /** + * The position of the left hand in avatar coordinates if it's being positioned by + * controllers, otherwise Vec3. Read-only. + */ + let leftHandPosition: Vec3; + /** + * The position of the right hand in avatar coordinates if it's being positioned by + * controllers, otherwise Vec3. Read-only. + */ + let rightHandPosition: Vec3; + /** + * The position 30cm offset from the left hand in avatar coordinates if it's being + * positioned by controllers, otherwise Vec3. Read-only. + */ + let leftHandTipPosition: Vec3; + /** + * The position 30cm offset from the right hand in avatar coordinates if it's being + * positioned by controllers, otherwise Vec3. Read-only. + */ + let rightHandTipPosition: Vec3; + /** + * The pose of the left hand as determined by the hand controllers. Read-only. + */ + let leftHandPose: Pose; + /** + * The pose right hand position as determined by the hand controllers. Read-only. + */ + let rightHandPose: Pose; + /** + * The pose of the left hand as determined by the hand controllers, with the position + * by 30cm. Read-only. + */ + let leftHandTipPose: Pose; + /** + * The pose of the right hand as determined by the hand controllers, with the position + * by 30cm. Read-only. + */ + let rightHandTipPose: Pose; + /** + * If true then the avatar hips are placed according to the center of + * gravity model that balance the center of gravity over the base of support of the feet. Setting the value false will result in the default behaviour where the hips are placed under the head. + */ + let centerOfGravityModelEnabled: boolean; + /** + * If true then the avatar is re-centered to be under the + * head's position. In room-scale VR, this behavior is what causes your avatar to follow your HMD as you walk around the room. Setting the value false is useful if you want to pin the avatar to a fixed position. + */ + let hmdLeanRecenterEnabled: boolean; + /** + * Set to true to enable collisions for the avatar, false + * to disable collisions. May return true even though the value was set false because the zone may disallow collisionless avatars. + */ + let collisionsEnabled: boolean; + /** + * Synonym of collisionsEnabled. + * Deprecated: Use collisionsEnabled instead. + */ + let characterControllerEnabled: boolean; + /** + * Returns and sets the value of the Interface setting, Settings > + * Walking and teleporting. Note: Setting the value has no effect unless Interface is restarted. + */ + let useAdvancedMovementControls: boolean; + /** + * Returns and sets the value of the Interface setting, Settings > Show room boundaries + * while teleporting. Note: Setting the value has no effect unless Interface is restarted. + */ + let showPlayArea: boolean; + let yawSpeed: number; + let pitchSpeed: number; + /** + * If true, the roll angle of your HMD turns your avatar + * while flying. + */ + let hmdRollControlEnabled: boolean; + /** + * The amount of HMD roll, in degrees, required before your avatar turns if + * hmdRollControlEnabled is enabled. + */ + let hmdRollControlDeadZone: number; + /** + * If hmdRollControlEnabled is true, this value determines the maximum turn rate of + * your avatar when rolling your HMD in degrees per second. + */ + let hmdRollControlRate: number; + /** + * The height of the user in sensor space. + */ + let userHeight: number; + /** + * The estimated height of the user's eyes in sensor space. Read-only. + */ + let userEyeHeight: number; + /** + * UUID representing "my avatar". Only use for local-only entities and overlays in situations + * where MyAvatar.sessionUUID is not available (e.g., if not connected to a domain). Note: Likely to be deprecated. Read-only. + */ + const SELF_ID: Uuid; + let walkSpeed: number; + let walkBackwardSpeed: number; + let sprintSpeed: number; + /** + * Can be used to apply a translation offset between the avatar's position and the + * registration point of the 3D model. + */ + let skeletonOffset: Vec3; + let position: Vec3; + /** + * Returns the clamped scale of the avatar. + */ + let scale: number; + /** + * Read-only. + */ + let density: number; + let handPosition: Vec3; + /** + * The rotation left or right about an axis running from the head to the feet of the avatar. + * Yaw is sometimes called "heading". + */ + let bodyYaw: number; + /** + * The rotation about an axis running from shoulder to shoulder of the avatar. Pitch is + * sometimes called "elevation". + */ + let bodyPitch: number; + /** + * The rotation about an axis running from the chest to the back of the avatar. Roll is + * sometimes called "bank". + */ + let bodyRoll: number; + let orientation: Quat; + /** + * The orientation of the avatar's head. + */ + let headOrientation: Quat; + /** + * The rotation about an axis running from ear to ear of the avatar's head. Pitch is + * sometimes called "elevation". + */ + let headPitch: number; + /** + * The rotation left or right about an axis running from the base to the crown of the avatar's + * head. Yaw is sometimes called "heading". + */ + let headYaw: number; + /** + * The rotation about an axis running from the nose to the back of the avatar's head. Roll is + * sometimes called "bank". + */ + let headRoll: number; + let velocity: Vec3; + let angularVelocity: Vec3; + let audioLoudness: number; + let audioAverageLoudness: number; + let displayName: string; + /** + * Sanitized, defaulted version displayName that is defined by the AvatarMixer + * rather than by Interface clients. The result is unique among all avatars present at the time. + */ + let sessionDisplayName: string; + let lookAtSnappingEnabled: boolean; + let skeletonModelURL: string; + let attachmentData: Array.; + /** + * The list of joints in the current avatar model. Read-only. + */ + let jointNames: Array.; + /** + * Read-only. + */ + let sessionUUID: Uuid; + /** + * Read-only. + */ + let sensorToWorldMatrix: Mat4; + /** + * Read-only. + */ + let controllerLeftHandMatrix: Mat4; + /** + * Read-only. + */ + let controllerRightHandMatrix: Mat4; + /** + * Read-only. + */ + let sensorToWorldScale: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe FaceTracker API helps manage facial tracking hardware. + */ +declare namespace FaceTracker { + /** + * @param enabled {boolean} + */ + function setEnabled(enabled: boolean): void; + function calibrate(): void; + /** + * @returns {Signal} + */ + function muteToggled(): Signal; + function toggleMute(): void; + /** + * @returns {boolean} + */ + function getMuted(): boolean; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsSynonym for Pointers as used for laser pointers. + */ +declare namespace LaserPointers { + /** + * @param properties {Pointers.LaserPointerProperties} + * @returns {number} + */ + function createLaserPointer(properties: Pointers.LaserPointerProperties): number; + /** + * @param id {number} + */ + function enableLaserPointer(id: number): void; + /** + * @param id {number} + */ + function disableLaserPointer(id: number): void; + /** + * @param id {number} + */ + function removeLaserPointer(id: number): void; + /** + * @param id {number} + * @param renderState {string} + * @param properties {Pointers.RayPointerRenderState} + */ + function editRenderState(id: number, renderState: string, properties: Pointers.RayPointerRenderState): void; + /** + * @param renderState {string} + * @param id {number} + */ + function setRenderState(renderState: string, id: number): void; + /** + * @param id {number} + * @returns {RayPickResult} + */ + function getPrevRayPickResult(id: number): RayPickResult; + /** + * @param id {number} + * @param precisionPicking {boolean} + */ + function setPrecisionPicking(id: number, precisionPicking: boolean): void; + /** + * @param id {number} + * @param laserLength {number} + */ + function setLaserLength(id: number, laserLength: number): void; + /** + * @param id {number} + * @param ignoreItems {Array.} + */ + function setIgnoreItems(id: number, ignoreItems: Array.): void; + /** + * @param id {number} + * @param includeItems {Array.} + */ + function setIncludeItems(id: number, includeItems: Array.): void; + /** + * @param id {number} + * @param itemID {Uuid} + * @param isOverlay {boolean} + * @param offsetMat {Mat4} [offsetMat=undefined] + */ + function setLockEndUUID(id: number, itemID: Uuid, isOverlay: boolean, offsetMat: Mat4): void; + /** + * @param id {number} + * @returns {boolean} + */ + function isLeftHand(id: number): boolean; + /** + * @param id {number} + * @returns {boolean} + */ + function isRightHand(id: number): boolean; + /** + * @param id {number} + * @returns {boolean} + */ + function isMouse(id: number): boolean; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Picks API lets you create and manage objects for repeatedly calculating intersections in different ways. + */ +declare namespace Picks { + interface RayPickProperties { + /** + * If this Pick should start enabled or not. Disabled Picks do not updated their pick results. + */ + enabled: boolean; + /** + * The filter for this Pick to use, constructed using filter flags combined using bitwise OR. + */ + filter: number; + /** + * The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. + */ + maxDistance: number; + /** + * The ID of the parent, either an avatar, an entity, an overlay, or a pick. + */ + parentID: Uuid; + /** + * The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint) + */ + parentJointIndex: number; + /** + * If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar. + */ + joint: string; + /** + * Only for Joint Ray Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral + */ + posOffset: Vec3; + /** + * Only for Joint Ray Picks. A local joint direction offset. x = upward, y = forward, z = lateral + */ + dirOffset: Vec3; + /** + * Only for Static Ray Picks. The world-space origin of the ray. + */ + position: Vec3; + /** + * Only for Static Ray Picks. The world-space direction of the ray. + */ + direction: Vec3; + } + + interface StylusPickProperties { + /** + * An integer. 0 == left, 1 == right. Invalid otherwise. + */ + hand: number; + /** + * If this Pick should start enabled or not. Disabled Picks do not updated their pick results. + */ + enabled: boolean; + /** + * The filter for this Pick to use, constructed using filter flags combined using bitwise OR. + */ + filter: number; + /** + * The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. + */ + maxDistance: number; + } + + interface ParabolaPickProperties { + /** + * If this Pick should start enabled or not. Disabled Picks do not updated their pick results. + */ + enabled: boolean; + /** + * The filter for this Pick to use, constructed using filter flags combined using bitwise OR. + */ + filter: number; + /** + * The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. + */ + maxDistance: number; + /** + * The ID of the parent, either an avatar, an entity, an overlay, or a pick. + */ + parentID: Uuid; + /** + * The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint) + */ + parentJointIndex: number; + /** + * If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar. + */ + joint: string; + /** + * Only for Joint Parabola Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral + */ + posOffset: Vec3; + /** + * Only for Joint Parabola Picks. A local joint direction offset. x = upward, y = forward, z = lateral + */ + dirOffset: Vec3; + /** + * Only for Static Parabola Picks. The world-space origin of the parabola segment. + */ + position: Vec3; + /** + * Only for Static Parabola Picks. The world-space direction of the parabola segment. + */ + direction: Vec3; + /** + * The initial speed of the parabola, i.e. the initial speed of the projectile whose trajectory defines the parabola. + */ + speed: number; + /** + * The acceleration of the parabola, i.e. the acceleration of the projectile whose trajectory defines the parabola, both magnitude and direction. + */ + accelerationAxis: Vec3; + /** + * Whether or not the acceleration axis should rotate with the avatar's local Y axis. + */ + rotateAccelerationWithAvatar: boolean; + /** + * Whether or not the acceleration axis should rotate with the parent's local Y axis, if available. + */ + rotateAccelerationWithParent: boolean; + /** + * If true, the velocity and acceleration of the Pick will scale linearly with the parent, if available. scaleWithAvatar is an alias but is deprecated. + */ + scaleWithParent: boolean; + } + + interface CollisionPickProperties { + /** + * If this Pick should start enabled or not. Disabled Picks do not updated their pick results. + */ + enabled: boolean; + /** + * The filter for this Pick to use, constructed using filter flags combined using bitwise OR. + */ + filter: number; + /** + * The information about the collision region's size and shape. Dimensions are in world space, but will scale with the parent if defined. + */ + shape: Shape; + /** + * The position of the collision region, relative to a parent if defined. + */ + position: Vec3; + /** + * The orientation of the collision region, relative to a parent if defined. + */ + orientation: Quat; + /** + * The approximate minimum penetration depth for a test object to be considered in contact with the collision region. + * The depth is measured in world space, but will scale with the parent if defined. + */ + threshold: float; + /** + * The type of object this collision pick collides as. Objects whose collision masks overlap with the pick's collision group + * will be considered colliding with the pick. + */ + collisionGroup: CollisionMask; + /** + * The ID of the parent, either an avatar, an entity, an overlay, or a pick. + */ + parentID: Uuid; + /** + * The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint) + */ + parentJointIndex: number; + /** + * If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar. + */ + joint: string; + /** + * If true, the collision pick's dimensions and threshold will adjust according to the scale of the parent. + */ + scaleWithParent: boolean; + } + + /** + * Adds a new Pick. + * Different PickTypes use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example, with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pick, a Mouse Ray Pick, or a Joint Ray Pick. + * @param type {PickType} A PickType that specifies the method of picking to use + * @param properties {Picks.RayPickProperties} A PickProperties object, containing all the properties for initializing this Pick + * @returns {number} + */ + function createPick(type: PickType, properties: Picks.RayPickProperties): number; + /** + * Enables a Pick. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + */ + function enablePick(uid: number): void; + /** + * Disables a Pick. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + */ + function disablePick(uid: number): void; + /** + * Removes a Pick. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + */ + function removePick(uid: number): void; + /** + * Get the most recent pick result from this Pick. This will be updated as long as the Pick is enabled. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @returns {RayPickResult} + */ + function getPrevPickResult(uid: number): RayPickResult; + /** + * Sets whether or not to use precision picking. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @param precisionPicking {boolean} Whether or not to use precision picking + */ + function setPrecisionPicking(uid: number, precisionPicking: boolean): void; + /** + * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Picks. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @param ignoreItems {Array.} A list of IDs to ignore. + */ + function setIgnoreItems(uid: number, ignoreItems: Array.): void; + /** + * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus + * Picks only intersect with objects in their include list. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @param includeItems {Array.} A list of IDs to include. + */ + function setIncludeItems(uid: number, includeItems: Array.): void; + /** + * Check if a Pick is associated with the left hand. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @returns {boolean} + */ + function isLeftHand(uid: number): boolean; + /** + * Check if a Pick is associated with the right hand. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @returns {boolean} + */ + function isRightHand(uid: number): boolean; + /** + * Check if a Pick is associated with the system mouse. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @returns {boolean} + */ + function isMouse(uid: number): boolean; + /** + * @returns {number} + */ + function PICK_NOTHING(): number; + /** + * @returns {number} + */ + function PICK_ENTITIES(): number; + /** + * @returns {number} + */ + function PICK_OVERLAYS(): number; + /** + * @returns {number} + */ + function PICK_AVATARS(): number; + /** + * @returns {number} + */ + function PICK_HUD(): number; + /** + * @returns {number} + */ + function PICK_COARSE(): number; + /** + * @returns {number} + */ + function PICK_INCLUDE_INVISIBLE(): number; + /** + * @returns {number} + */ + function PICK_INCLUDE_NONCOLLIDABLE(): number; + /** + * @returns {number} + */ + function PICK_ALL_INTERSECTIONS(): number; + /** + * @returns {number} + */ + function INTERSECTED_NONE(): number; + /** + * @returns {number} + */ + function INTERSECTED_ENTITY(): number; + /** + * @returns {number} + */ + function INTERSECTED_OVERLAY(): number; + /** + * @returns {number} + */ + function INTERSECTED_AVATAR(): number; + /** + * @returns {number} + */ + function INTERSECTED_HUD(): number; + /** + * A filter flag. Don't intersect with anything. Read-only. + */ + const PICK_NOTHING: number; + /** + * A filter flag. Include entities when intersecting. Read-only. + */ + const PICK_ENTITIES: number; + /** + * A filter flag. Include overlays when intersecting. Read-only. + */ + const PICK_OVERLAYS: number; + /** + * A filter flag. Include avatars when intersecting. Read-only. + */ + const PICK_AVATARS: number; + /** + * A filter flag. Include the HUD sphere when intersecting in HMD mode. Read-only. + */ + const PICK_HUD: number; + /** + * A filter flag. Pick against coarse meshes, instead of exact meshes. Read-only. + */ + const PICK_COARSE: number; + /** + * A filter flag. Include invisible objects when intersecting. Read-only. + */ + const PICK_INCLUDE_INVISIBLE: number; + /** + * A filter flag. Include non-collidable objects when intersecting. + * Read-only. + */ + const PICK_INCLUDE_NONCOLLIDABLE: number; + /** + * Read-only. + */ + const PICK_ALL_INTERSECTIONS: number; + /** + * An intersection type. Intersected nothing with the given filter flags. + * Read-only. + */ + const INTERSECTED_NONE: number; + /** + * An intersection type. Intersected an entity. Read-only. + */ + const INTERSECTED_ENTITY: number; + /** + * An intersection type. Intersected an overlay. Read-only. + */ + const INTERSECTED_OVERLAY: number; + /** + * An intersection type. Intersected an avatar. Read-only. + */ + const INTERSECTED_AVATAR: number; + /** + * An intersection type. Intersected the HUD sphere. Read-only. + */ + const INTERSECTED_HUD: number; + /** + * The max number of usec to spend per frame updating Pick results. Read-only. + */ + let perFrameTimeBudget: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Pointers API lets you create and manage objects for repeatedly calculating intersections in different ways, as well as the visual representation of those objects. + * Pointers can also be configured to automatically generate PointerEvents on Entities and Overlays. + */ +declare namespace Pointers { + interface StylusPointerProperties { + /** + * If this pointer should generate hover events. + */ + hover: boolean; + enabled: boolean; + } + + interface DefaultRayPointerRenderState { + /** + * The distance at which to render the end of this Ray Pointer, if one is defined. + */ + distance: number; + } + + interface RayPointerRenderState { + /** + * When using Pointers.createPointer, the name of this render state, used by Pointers.setRenderState and Pointers.editRenderState + */ + name: string; + /** + * When using Pointers.createPointer, an optionally defined overlay to represent the beginning of the Ray Pointer, + * using the properties you would normally pass to Overlays.addOverlay, plus the type (as a type field). When returned from Pointers.getPointerProperties, the ID of the created overlay if it exists, or a null ID otherwise. + */ + start: Overlays.OverlayProperties; + /** + * When using Pointers.createPointer, an optionally defined overlay to represent the path of the Ray Pointer, + * using the properties you would normally pass to Overlays.addOverlay, plus the type (as a type field), which must be "line3d". When returned from Pointers.getPointerProperties, the ID of the created overlay if it exists, or a null ID otherwise. + */ + path: Overlays.OverlayProperties; + /** + * When using Pointers.createPointer, an optionally defined overlay to represent the end of the Ray Pointer, + * using the properties you would normally pass to Overlays.addOverlay, plus the type (as a type field). When returned from Pointers.getPointerProperties, the ID of the created overlay if it exists, or a null ID otherwise. + */ + end: Overlays.OverlayProperties; + } + + interface LaserPointerProperties { + /** + * If true, the end of the Pointer will always rotate to face the avatar. + */ + faceAvatar: boolean; + /** + * If false, the end of the Pointer will be moved up by half of its height. + */ + centerEndY: boolean; + /** + * If true, the end of the Pointer will lock on to the center of the object at which the pointer is pointing. + */ + lockEnd: boolean; + /** + * If true, the dimensions of the end of the Pointer will scale linearly with distance. + */ + distanceScaleEnd: boolean; + /** + * If true, the width of the Pointer's path will scale linearly with the pick parent's scale. scaleWithAvatar is an alias but is deprecated. + */ + scaleWithParent: boolean; + /** + * If true, the end of the Pointer will rotate to follow the normal of the intersected surface. + */ + followNormal: boolean; + /** + * The strength of the interpolation between the real normal and the visual normal if followNormal is true. 0-1. If 0 or 1, + * the normal will follow exactly. + */ + followNormalStrength: number; + enabled: boolean; + /** + * A collection of different visual states to switch between. + * When using Pointers.createPointer, a list of RayPointerRenderStates. When returned from Pointers.getPointerProperties, a map between render state names and RayPointRenderStates. + */ + renderStates: Array.; + /** + * A collection of different visual states to use if there is no intersection. + * When using Pointers.createPointer, a list of DefaultRayPointerRenderStates. When returned from Pointers.getPointerProperties, a map between render state names and DefaultRayPointRenderStates. + */ + defaultRenderStates: Array.; + /** + * If this Pointer should generate hover events. + */ + hover: boolean; + /** + * A list of different triggers mechanisms that control this Pointer's click event generation. + */ + triggers: Array.; + } + + interface ParabolaProperties { + /** + * The color of the parabola. + */ + color: Color; + /** + * The alpha of the parabola. + */ + alpha: number; + /** + * The width of the parabola, in meters. + */ + width: number; + /** + * The width of the parabola, in meters. + */ + isVisibleInSecondaryCamera: boolean; + /** + * If true, the parabola is rendered in front of other items in the scene. + */ + drawInFront: boolean; + } + + interface DefaultParabolaPointerRenderState { + /** + * The distance along the parabola at which to render the end of this Parabola Pointer, if one is defined. + */ + distance: number; + } + + interface ParabolaPointerRenderState { + /** + * When using Pointers.createPointer, the name of this render state, used by Pointers.setRenderState and Pointers.editRenderState + */ + name: string; + /** + * When using Pointers.createPointer, an optionally defined overlay to represent the beginning of the Parabola Pointer, + * using the properties you would normally pass to Overlays.addOverlay, plus the type (as a type field). When returned from Pointers.getPointerProperties, the ID of the created overlay if it exists, or a null ID otherwise. + */ + start: Overlays.OverlayProperties; + /** + * When using Pointers.createPointer, the optionally defined rendering properties of the parabolic path defined by the Parabola Pointer. + * Not defined in Pointers.getPointerProperties. + */ + path: Pointers.ParabolaProperties; + /** + * When using Pointers.createPointer, an optionally defined overlay to represent the end of the Parabola Pointer, + * using the properties you would normally pass to Overlays.addOverlay, plus the type (as a type field). When returned from Pointers.getPointerProperties, the ID of the created overlay if it exists, or a null ID otherwise. + */ + end: Overlays.OverlayProperties; + } + + interface ParabolaPointerProperties { + /** + * If true, the end of the Pointer will always rotate to face the avatar. + */ + faceAvatar: boolean; + /** + * If false, the end of the Pointer will be moved up by half of its height. + */ + centerEndY: boolean; + /** + * If true, the end of the Pointer will lock on to the center of the object at which the pointer is pointing. + */ + lockEnd: boolean; + /** + * If true, the dimensions of the end of the Pointer will scale linearly with distance. + */ + distanceScaleEnd: boolean; + /** + * If true, the width of the Pointer's path will scale linearly with the pick parent's scale. scaleWithAvatar is an alias but is deprecated. + */ + scaleWithParent: boolean; + /** + * If true, the end of the Pointer will rotate to follow the normal of the intersected surface. + */ + followNormal: boolean; + /** + * The strength of the interpolation between the real normal and the visual normal if followNormal is true. 0-1. If 0 or 1, + * the normal will follow exactly. + */ + followNormalStrength: number; + enabled: boolean; + /** + * A collection of different visual states to switch between. + * When using Pointers.createPointer, a list of ParabolaPointerRenderStates. When returned from Pointers.getPointerProperties, a map between render state names and ParabolaPointerRenderStates. + */ + renderStates: Array.; + /** + * A collection of different visual states to use if there is no intersection. + * When using Pointers.createPointer, a list of DefaultParabolaPointerRenderStates. When returned from Pointers.getPointerProperties, a map between render state names and DefaultParabolaPointerRenderStates. + */ + defaultRenderStates: Array.; + /** + * If this Pointer should generate hover events. + */ + hover: boolean; + /** + * A list of different triggers mechanisms that control this Pointer's click event generation. + */ + triggers: Array.; + } + + interface Trigger { + /** + * This can be a built-in Controller action, like Controller.Standard.LTClick, or a function that evaluates to >= 1.0 when you want to trigger button. + */ + action: Controller.Standard; + /** + * Which button to trigger. "Primary", "Secondary", "Tertiary", and "Focus" are currently supported. Only "Primary" will trigger clicks on web surfaces. If "Focus" is triggered, + * it will try to set the entity or overlay focus to the object at which the Pointer is aimed. Buttons besides the first three will still trigger events, but event.button will be "None". + */ + button: string; + } + + /** + * Adds a new Pointer + * Different PickTypes use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example, with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pointer, a Mouse Ray Pointer, or a Joint Ray Pointer. + * @param type {PickType} A PickType that specifies the method of picking to use + * @param properties {Pointers.LaserPointerProperties} A PointerProperties object, containing all the properties for initializing this Pointer and the {@link Picks.PickProperties} for the Pick that + * this Pointer will use to do its picking. + * @returns {number} + */ + function createPointer(type: PickType, properties: Pointers.LaserPointerProperties): number; + /** + * Enables a Pointer. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + */ + function enablePointer(uid: number): void; + /** + * Disables a Pointer. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + */ + function disablePointer(uid: number): void; + /** + * Removes a Pointer. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + */ + function removePointer(uid: number): void; + /** + * Edit some visual aspect of a Pointer. Currently only supported for Ray Pointers. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param renderState {string} The name of the render state you want to edit. + * @param properties {Pointers.RayPointerRenderState} The new properties for renderStates item. + */ + function editRenderState(uid: number, renderState: string, properties: Pointers.RayPointerRenderState): void; + /** + * Set the render state of a Pointer. For Ray Pointers, this means switching between their Pointers.RayPointerRenderStates, or "" to turn off rendering and hover/trigger events. + * For Stylus Pointers, there are three built-in options: "events on" (render and send events, the default), "events off" (render but don't send events), and "disabled" (don't render, don't send events). + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param renderState {string} The name of the render state to which you want to switch. + */ + function setRenderState(uid: number, renderState: string): void; + /** + * Get the most recent pick result from this Pointer. This will be updated as long as the Pointer is enabled, regardless of the render state. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @returns {RayPickResult} + */ + function getPrevPickResult(uid: number): RayPickResult; + /** + * Sets whether or not to use precision picking. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param precisionPicking {boolean} Whether or not to use precision picking + */ + function setPrecisionPicking(uid: number, precisionPicking: boolean): void; + /** + * Sets the length of this Pointer. No effect on Stylus Pointers. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param length {number} The desired length of the Pointer. + */ + function setLength(uid: number, length: number): void; + /** + * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Pointers. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param ignoreItems {Array.} A list of IDs to ignore. + */ + function setIgnoreItems(uid: number, ignoreItems: Array.): void; + /** + * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus + * Pointers only intersect with objects in their include list. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param includeItems {Array.} A list of IDs to include. + */ + function setIncludeItems(uid: number, includeItems: Array.): void; + /** + * Lock a Pointer onto a specific object (overlay, entity, or avatar). Optionally, provide an offset in object-space, otherwise the Pointer will lock on to the center of the object. + * Not used by Stylus Pointers. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param objectID {Uuid} The ID of the object to which to lock on. + * @param isOverlay {boolean} False for entities or avatars, true for overlays + * @param offsetMat {Mat4} [offsetMat=undefined] The offset matrix to use if you do not want to lock on to the center of the object. + */ + function setLockEndUUID(uid: number, objectID: Uuid, isOverlay: boolean, offsetMat: Mat4): void; + /** + * Check if a Pointer is associated with the left hand. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @returns {boolean} + */ + function isLeftHand(uid: number): boolean; + /** + * Check if a Pointer is associated with the right hand. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @returns {boolean} + */ + function isRightHand(uid: number): boolean; + /** + * Check if a Pointer is associated with the system mouse. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @returns {boolean} + */ + function isMouse(uid: number): boolean; + /** + * Returns information about an existing Pointer + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @returns {Pointers.LaserPointerProperties} + */ + function getPointerProperties(uid: number): Pointers.LaserPointerProperties; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsSynonym for Picks as used for ray picks. + */ +declare namespace RayPick { + /** + * @param undefined {Picks.RayPickProperties} + * @returns {number} + */ + function createRayPick(undefined: Picks.RayPickProperties): number; + /** + * @param id {number} + */ + function enableRayPick(id: number): void; + /** + * @param id {number} + */ + function disableRayPick(id: number): void; + /** + * @param id {number} + */ + function removeRayPick(id: number): void; + /** + * @param id {number} + * @returns {RayPickResult} + */ + function getPrevRayPickResult(id: number): RayPickResult; + /** + * @param id {number} + * @param precisionPicking {boolean} + */ + function setPrecisionPicking(id: number, precisionPicking: boolean): void; + /** + * @param id {number} + * @param {Uuid[]) {} ignoreEntities + */ + function setIgnoreItems(id: number, {Uuid[])): void; + /** + * @param id {number} + * @param {Uuid[]) {} includeEntities + */ + function setIncludeItems(id: number, {Uuid[])): void; + /** + * @param id {number} + * @returns {boolean} + */ + function isLeftHand(id: number): boolean; + /** + * @param id {number} + * @returns {boolean} + */ + function isRightHand(id: number): boolean; + /** + * @param id {number} + * @returns {boolean} + */ + function isMouse(id: number): boolean; + /** + * @returns {number} + */ + function PICK_NOTHING(): number; + /** + * @returns {number} + */ + function PICK_ENTITIES(): number; + /** + * @returns {number} + */ + function PICK_OVERLAYS(): number; + /** + * @returns {number} + */ + function PICK_AVATARS(): number; + /** + * @returns {number} + */ + function PICK_HUD(): number; + /** + * @returns {number} + */ + function PICK_COARSE(): number; + /** + * @returns {number} + */ + function PICK_INCLUDE_INVISIBLE(): number; + /** + * @returns {number} + */ + function PICK_INCLUDE_NONCOLLIDABLE(): number; + /** + * @returns {number} + */ + function PICK_ALL_INTERSECTIONS(): number; + /** + * @returns {number} + */ + function INTERSECTED_NONE(): number; + /** + * @returns {number} + */ + function INTERSECTED_ENTITY(): number; + /** + * @returns {number} + */ + function INTERSECTED_OVERLAY(): number; + /** + * @returns {number} + */ + function INTERSECTED_AVATAR(): number; + /** + * @returns {number} + */ + function INTERSECTED_HUD(): number; + /** + * Read-only. + */ + const PICK_NOTHING: number; + /** + * Read-only. + */ + const PICK_ENTITIES: number; + /** + * Read-only. + */ + const PICK_OVERLAYS: number; + /** + * Read-only. + */ + const PICK_AVATARS: number; + /** + * Read-only. + */ + const PICK_HUD: number; + /** + * Read-only. + */ + const PICK_COARSE: number; + /** + * Read-only. + */ + const PICK_INCLUDE_INVISIBLE: number; + /** + * Read-only. + */ + const PICK_INCLUDE_NONCOLLIDABLE: number; + /** + * Read-only. + */ + const PICK_ALL_INTERSECTIONS: number; + /** + * Read-only. + */ + const INTERSECTED_NONE: number; + /** + * Read-only. + */ + const INTERSECTED_ENTITY: number; + /** + * Read-only. + */ + const INTERSECTED_OVERLAY: number; + /** + * Read-only. + */ + const INTERSECTED_AVATAR: number; + /** + * Read-only. + */ + const INTERSECTED_HUD: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe AccountServices API contains helper functions related to user connectivity + */ +declare namespace AccountServices { + /** + * @returns {DownloadInfoResult} + */ + function getDownloadInfo(): DownloadInfoResult; + function updateDownloadInfo(): void; + /** + * @returns {boolean} + */ + function isLoggedIn(): boolean; + /** + * @returns {boolean} + */ + function checkAndSignalForAccessToken(): boolean; + function logOut(): void; + /** + * @returns {Signal} + */ + function connected(): Signal; + /** + * @param reason {string} + * @returns {Signal} + */ + function disconnected(reason: string): Signal; + /** + * @param username {string} + * @returns {Signal} + */ + function myUsernameChanged(username: string): Signal; + /** + * @param info {} + * @returns {Signal} + */ + function downloadInfoChanged(info): Signal; + /** + * @param discoverabilityMode {string} + * @returns {Signal} + */ + function findableByChanged(discoverabilityMode: string): Signal; + /** + * @param loggedIn {boolean} + * @returns {Signal} + */ + function loggedInChanged(loggedIn: boolean): Signal; + /** + * Read-only. + */ + let username: string; + /** + * Read-only. + */ + let loggedIn: boolean; + let findableBy: string; + /** + * Read-only. + */ + let metaverseServerURL: string; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Audio API provides facilities to interact with audio inputs and outputs and to play sounds. + */ +declare namespace Audio { + /** + * @param device {object} + * @param isHMD {boolean} + */ + function setInputDevice(device: object, isHMD: boolean): void; + /** + * @param device {object} + * @param isHMD {boolean} + */ + function setOutputDevice(device: object, isHMD: boolean): void; + /** + * Enable or disable reverberation. Reverberation is done by the client, on the post-mix audio. The reverberation options + * come from either the domain's audio zone if used — configured on the server — or as scripted by Audio.setReverbOptions. + * @param enable {boolean} true to enable reverberation, false to disable. + */ + function setReverb(enable: boolean): void; + /** + * Configure reverberation options. Use Audio.setReverb to enable or disable reverberation. + * @param options {AudioEffectOptions} The reverberation options. + */ + function setReverbOptions(options: AudioEffectOptions): void; + /** + * Starts making an audio recording of the audio being played in-world (i.e., not local-only audio) to a file in WAV format. + * @param filename {string} The path and name of the file to make the recording in. Should have a .wav + * extension. The file is overwritten if it already exists. + * @returns {boolean} + */ + function startRecording(filename: string): boolean; + /** + * Finish making an audio recording started with Audio.startRecording. + */ + function stopRecording(): void; + /** + * Check whether an audio recording is currently being made. + * @returns {boolean} + */ + function getRecording(): boolean; + /** + * @returns {Signal} + */ + function nop(): Signal; + /** + * Triggered when the audio input is muted or unmuted. + * @param isMuted {boolean} true if the audio input is muted, otherwise false. + * @returns {Signal} + */ + function mutedChanged(isMuted: boolean): Signal; + /** + * Triggered when the audio input noise reduction is enabled or disabled. + * @param isEnabled {boolean} true if audio input noise reduction is enabled, otherwise false. + * @returns {Signal} + */ + function noiseReductionChanged(isEnabled: boolean): Signal; + /** + * Triggered when the input audio volume changes. + * @param volume {number} The requested volume to be applied to the audio input, range 0.0 – + * 1.0. The resulting value of Audio.inputVolume depends on the capabilities of the device: for example, the volume can't be changed on some devices, and others might only support values of 0.0 and 1.0. + * @returns {Signal} + */ + function inputVolumeChanged(volume: number): Signal; + /** + * Triggered when the input audio level changes. + * @param level {number} The loudness of the input audio, range 0.0 (no sound) – 1.0 (the + * onset of clipping). + * @returns {Signal} + */ + function inputLevelChanged(level: number): Signal; + /** + * Triggered when the current context of the audio changes. + * @param context {string} The current context of the audio: either "Desktop" or "HMD". + * @returns {Signal} + */ + function contextChanged(context: string): Signal; + function onContextChanged(): void; + /** + * Starts playing — "injecting" — the content of an audio file. The sound is played globally (sent to the audio + * mixer) so that everyone hears it, unless the injectorOptions has localOnly set to true in which case only the client hears the sound played. No sound is played if sent to the audio mixer but the client is not connected to an audio mixer. The AudioInjector object returned by the function can be used to control the playback and get information about its current state. + * @param sound {SoundObject} The content of an audio file, loaded using {@link SoundCache.getSound}. See + * {@link SoundObject} for supported formats. + * @param injectorOptions {AudioInjector.AudioInjectorOptions} [injectorOptions={}] Audio injector configuration. + * @returns {AudioInjector} + */ + function playSound(sound: SoundObject, injectorOptions: AudioInjector.AudioInjectorOptions): AudioInjector; + /** + * Start playing the content of an audio file, locally (isn't sent to the audio mixer). This is the same as calling + * Audio.playSound with AudioInjector.AudioInjectorOptions localOnly set true and the specified position. + * @param sound {SoundObject} The content of an audio file, loaded using {@link SoundCache.getSound}. See + * {@link SoundObject} for supported formats. + * @param position {Vec3} The position in the domain to play the sound. + * @returns {AudioInjector} + */ + function playSystemSound(sound: SoundObject, position: Vec3): AudioInjector; + /** + * Set whether or not the audio input should be used in stereo. If the audio input does not support stereo then setting a + * value of true has no effect. + * @param stereo {boolean} true if the audio input should be used in stereo, otherwise false. + */ + function setStereoInput(stereo: boolean): void; + /** + * Get whether or not the audio input is used in stereo. + * @returns {boolean} + */ + function isStereoInput(): boolean; + /** + * Triggered when the client is muted by the mixer because their loudness value for the noise background has reached the + * threshold set for the domain in the server settings. + * @returns {Signal} + */ + function mutedByMixer(): Signal; + /** + * Triggered when the client is muted by the mixer because they're within a certain radius (50m) of someone who requested + * the mute through Developer > Audio > Mute Environment. + * @returns {Signal} + */ + function environmentMuted(): Signal; + /** + * Triggered when the client receives its first packet from the audio mixer. + * @returns {Signal} + */ + function receivedFirstPacket(): Signal; + /** + * Triggered when the client is disconnected from the audio mixer. + * @returns {Signal} + */ + function disconnected(): Signal; + /** + * Triggered when the noise gate is opened: the input audio signal is no longer blocked (fully attenuated) because it has + * risen above an adaptive threshold set just above the noise floor. Only occurs if Audio.noiseReduction is true. + * @returns {Signal} + */ + function noiseGateOpened(): Signal; + /** + * Triggered when the noise gate is closed: the input audio signal is blocked (fully attenuated) because it has fallen + * below an adaptive threshold set just above the noise floor. Only occurs if Audio.noiseReduction is true. + * @returns {Signal} + */ + function noiseGateClosed(): Signal; + /** + * Triggered when a frame of audio input is processed. + * @param inputSamples {Int16Array} The audio input processed. + * @returns {Signal} + */ + function inputReceived(inputSamples: Int16Array): Signal; + /** + * Triggered when the input audio use changes between mono and stereo. + * @param isStereo {boolean} true if the input audio is stereo, otherwise false. + * @returns {Signal} + */ + function isStereoInputChanged(isStereo: boolean): Signal; + /** + * true if the audio input is muted, otherwise false. + */ + let muted: boolean; + /** + * true if noise reduction is enabled, otherwise false. When + * enabled, the input audio signal is blocked (fully attenuated) when it falls below an adaptive threshold set just above the noise floor. + */ + let noiseReduction: boolean; + /** + * The loudness of the audio input, range 0.0 (no sound) – + * 1.0 (the onset of clipping). Read-only. + */ + let inputLevel: number; + /** + * Adjusts the volume of the input audio; range 0.0 – 1.0. + * If set to a value, the resulting value depends on the input device: for example, the volume can't be changed on some devices, and others might only support values of 0.0 and 1.0. + */ + let inputVolume: number; + /** + * true if the input audio is being used in stereo, otherwise + * false. Some devices do not support stereo, in which case the value is always false. + */ + let isStereoInput: boolean; + /** + * The current context of the audio: either "Desktop" or "HMD". + * Read-only. + */ + let context: string; + /** + * Read-only. Deprecated: This property is deprecated and will be + * removed. + */ + let devices: object; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Clipboard API enables you to export and import entities to and from JSON files. + */ +declare namespace Clipboard { + /** + * Compute the extents of the contents held in the clipboard. + * @returns {Vec3} + */ + function getContentsDimensions(): Vec3; + /** + * Compute the largest dimension of the extents of the contents held in the clipboard. + * @returns {number} + */ + function getClipboardContentsLargestDimension(): number; + /** + * Import entities from a JSON file containing entity data into the clipboard. + * You can generate a JSON file using Clipboard.exportEntities. + * @param filename {string} Path and name of file to import. + * @returns {boolean} + */ + function importEntities(filename: string): boolean; + /** + * Export the entities specified to a JSON file. + * @param filename {string} Path and name of the file to export the entities to. Should have the extension ".json". + * @param entityIDs {Array.} Array of IDs of the entities to export. + * @returns {boolean} + */ + function exportEntities(filename: string, entityIDs: Array.): boolean; + /** + * Export the entities with centers within a cube to a JSON file. + * @param filename {string} Path and name of the file to export the entities to. Should have the extension ".json". + * @param x {number} X-coordinate of the cube center. + * @param y {number} Y-coordinate of the cube center. + * @param z {number} Z-coordinate of the cube center. + * @param scale {number} Half dimension of the cube. + * @returns {boolean} + */ + function exportEntities(filename: string, x: number, y: number, z: number, scale: number): boolean; + /** + * Paste the contents of the clipboard into the world. + * @param position {Vec3} Position to paste the clipboard contents at. + * @returns {Array.} + */ + function pasteEntities(position: Vec3): Array.; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Controller API provides facilities to interact with computer and controller hardware. + * Functions Properties Controller.getActions Controller.getHardware Controller.getStandard Mappings Controller.disableMapping Controller.enableMapping Controller.loadMapping Controller.newMapping Controller.parseMapping Input, Hardware, and Action Reflection Controller.findAction Controller.findDevice Controller.getActionNames Controller.getAllActions Controller.getAvailableInputs Controller.getDeviceName Controller.getDeviceNames Input, Hardware, and Action Events Controller.actionEvent Controller.hardwareChanged Controller.inputEvent Mouse, Keyboard, and Touch Events Controller.keyPressEvent Controller.keyReleaseEvent Controller.mouseDoublePressEvent Controller.mouseMoveEvent Controller.mousePressEvent Controller.mouseReleaseEvent Controller.touchBeginEvent Controller.touchEndEvent Controller.touchUpdateEvent Controller.wheelEvent Control Capturing Controller.captureMouseEvents Controller.captureTouchEvents Controller.captureWheelEvents Controller.releaseMouseEvents Controller.releaseTouchEvents Controller.releaseWheelEvents Action Capturing Controller.captureActionEvents Controller.captureEntityClickEvents Controller.captureJoystick Controller.captureKeyEvents Controller.releaseActionEvents Controller.releaseEntityClickEvents Controller.releaseJoystick Controller.releaseKeyEvents Controller and Action Values Controller.getValue Controller.getAxisValue Controller.getPoseValue Controller.getActionValue Haptics Controller.triggerHapticPulse Controller.triggerHapticPulseOnDevice Controller.triggerShortHapticPulse Controller.triggerShortHapticPulseOnDevice Display Information Controller.getViewportDimensions Controller.getRecommendedHUDRect Virtual Game Pad Controller.setVPadEnabled Controller.setVPadHidden Controller.setVPadExtraBottomMargin Input Recordings Controller.startInputRecording Controller.stopInputRecording Controller.saveInputRecording Controller.getInputRecorderSaveDirectory Controller.loadInputRecording Controller.startInputPlayback Controller.stopInputPlayback Entity Methods: The default scripts implement hand controller actions that use Entities.callEntityMethod to call entity script methods, if present in the entity being interacted with. Method NameDescriptionExample startFarTriggercontinueFarTriggerstopFarTrigger These methods are called when a user is more than 0.3m away from the entity, the entity is triggerable, and the user starts, continues, or stops squeezing the trigger. A light switch that can be toggled on and off from a distance. startNearTriggercontinueNearTriggerstopNearTrigger These methods are called when a user is less than 0.3m away from the entity, the entity is triggerable, and the user starts, continues, or stops squeezing the trigger. A doorbell that can be rung when a user is near. startDistanceGrabcontinueDistanceGrab These methods are called when a user is more than 0.3m away from the entity, the entity is either cloneable, or grabbable and not locked, and the user starts or continues to squeeze the trigger. A comet that emits icy particle trails when a user is dragging it through the sky. startNearGrabcontinueNearGrab These methods are called when a user is less than 0.3m away from the entity, the entity is either cloneable, or grabbable and not locked, and the user starts or continues to squeeze the trigger. A ball that glows when it's being held close. releaseGrab This method is called when a user releases the trigger when having been either distance or near grabbing an entity. Turn off the ball glow or comet trail with the user finishes grabbing it. startEquipcontinueEquipreleaseEquip These methods are called when a user starts, continues, or stops equipping an entity. A glass that stays in the user's hand after the trigger is clicked. All the entity methods are called with the following two arguments: The entity ID. A string, "hand,userID" — where "hand" is "left" or "right", and "userID" is the user's MyAvatar. + */ +declare namespace Controller { + interface Hardware-Application { + } + + /** + * Disable default Interface actions for a particular key event. + * @param event {KeyEvent} Details of the key event to be captured. The key property must be specified. The + * text property is ignored. The other properties default to false. + */ + function captureKeyEvents(event: KeyEvent): void; + /** + * Re-enable default Interface actions for a particular key event that has been disabled using + * Controller.captureKeyEvents. + * @param event {KeyEvent} Details of the key event to release from capture. The key property must be + * specified. The text property is ignored. The other properties default to false. + */ + function releaseKeyEvents(event: KeyEvent): void; + /** + * Disable default Interface actions for a joystick. + * @param joystickID {number} The integer ID of the joystick. + */ + function captureJoystick(joystickID: number): void; + /** + * Re-enable default Interface actions for a joystick that has been disabled using + * Controller.captureJoystick. + * @param joystickID {number} The integer ID of the joystick. + */ + function releaseJoystick(joystickID: number): void; + /** + * Disable Entities.mousePressOnEntity and Entities.mouseDoublePressOnEntity events on entities. + */ + function captureEntityClickEvents(): void; + /** + * Re-enable Entities.mousePressOnEntity and Entities.mouseDoublePressOnEntity events on entities that were + * disabled using Controller.captureEntityClickEvents. + */ + function releaseEntityClickEvents(): void; + /** + * Get the dimensions of the Interface window's interior if in desktop mode or the HUD surface if in HMD mode. + * @returns {Vec2} + */ + function getViewportDimensions(): Vec2; + /** + * Get the recommended area to position UI on the HUD surface if in HMD mode or Interface's window interior if in desktop + * mode. + * @returns {Rect} + */ + function getRecommendedHUDRect(): Rect; + /** + * Enables or disables the virtual game pad that is displayed on certain devices (e.g., Android). + * @param enable {boolean} If true then the virtual game pad doesn't work, otherwise it does work provided + * that it is not hidden by {@link Controller.setVPadHidden|setVPadHidden}. + */ + function setVPadEnabled(enable: boolean): void; + /** + * Shows or hides the virtual game pad that is displayed on certain devices (e.g., Android). + * @param hidden {boolean} If true then the virtual game pad is hidden, otherwise it is shown. + */ + function setVPadHidden(hidden: boolean): void; + /** + * Sets the amount of extra margin between the virtual game pad that is displayed on certain devices (e.g., Android) and + * the bottom of the display. + * @param margin {number} Integer number of pixels in the extra margin. + */ + function setVPadExtraBottomMargin(margin: number): void; + /** + * Triggered when a keyboard key is pressed. + * @param event {KeyEvent} Details of the key press. + * @returns {Signal} + */ + function keyPressEvent(event: KeyEvent): Signal; + /** + * Triggered when a keyboard key is released from being pressed. + * @param event {KeyEvent} Details of the key release. + * @returns {Signal} + */ + function keyReleaseEvent(event: KeyEvent): Signal; + /** + * Triggered when the mouse moves. + * @param event {MouseEvent} Details of the mouse movement. + * @returns {Signal} + */ + function mouseMoveEvent(event: MouseEvent): Signal; + /** + * Triggered when a mouse button is pressed. + * @param event {MouseEvent} Details of the button press. + * @returns {Signal} + */ + function mousePressEvent(event: MouseEvent): Signal; + /** + * Triggered when a mouse button is double-pressed. + * @param event {MouseEvent} Details of the button double-press. + * @returns {Signal} + */ + function mouseDoublePressEvent(event: MouseEvent): Signal; + /** + * Triggered when a mouse button is released from being pressed. + * @param event {MouseEvent} Details of the button release. + * @returns {Signal} + */ + function mouseReleaseEvent(event: MouseEvent): Signal; + /** + * Triggered when a touch event starts in the Interface window on a touch-enabled display or device. + * @param event {TouchEvent} Details of the touch begin. + * @returns {Signal} + */ + function touchBeginEvent(event: TouchEvent): Signal; + /** + * Triggered when a touch event ends in the Interface window on a touch-enabled display or device. + * @param event {TouchEvent} Details of the touch end. + * @returns {Signal} + */ + function touchEndEvent(event: TouchEvent): Signal; + /** + * Triggered when a touch event update occurs in the Interface window on a touch-enabled display or device. + * @param event {TouchEvent} Details of the touch update. + * @returns {Signal} + */ + function touchUpdateEvent(event: TouchEvent): Signal; + /** + * Triggered when the mouse wheel is rotated. + * @param event {WheelEvent} Details of the wheel movement. + * @returns {Signal} + */ + function wheelEvent(event: WheelEvent): Signal; + interface Actions { + } + + interface Hardware { + } + + /** + * Get a list of all available actions. + * @returns {Array.} + */ + function getAllActions(): Array.; + /** + * Get a list of all available inputs for a hardware device. + * @param deviceID {number} Integer ID of the hardware device. + * @returns {Array.} + */ + function getAvailableInputs(deviceID: number): Array.; + /** + * Find the name of a particular controller from its device ID. + * @param deviceID {number} The integer ID of the device. + * @returns {string} + */ + function getDeviceName(deviceID: number): string; + /** + * Get the current value of an action. + * @param actionID {number} The integer ID of the action. + * @returns {number} + */ + function getActionValue(actionID: number): number; + /** + * Find the ID of a specific controller from its device name. + * @param deviceName {string} The name of the device to find. + * @returns {number} + */ + function findDevice(deviceName: string): number; + /** + * Get the names of all currently available controller devices plus "Actions", "Application", and "Standard". + * @returns {Array.} + */ + function getDeviceNames(): Array.; + /** + * Find the ID of an action from its name. + * @param actionName {string} The name of the action: one of the {@link Controller.Actions} property names. + * @returns {number} + */ + function findAction(actionName: string): number; + /** + * Get the names of all actions available as properties of Controller.Actions. + * @returns {Array.} + */ + function getActionNames(): Array.; + /** + * Get the value of a controller button or axis output. Note: Also gets the value of a controller axis output. + * @param source {number} The {@link Controller.Standard} or {@link Controller.Hardware} item. + * @returns {number} + */ + function getValue(source: number): number; + /** + * Get the value of a controller axis output. Note: Also gets the value of a controller button output. + * @param source {number} The {@link Controller.Standard} or {@link Controller.Hardware} item. + * @returns {number} + */ + function getAxisValue(source: number): number; + /** + * Get the value of a controller pose output. + * @param source {number} The {@link Controller.Standard} or {@link Controller.Hardware} pose output. + * @returns {Pose} + */ + function getPoseValue(source: number): Pose; + /** + * Triggers a haptic pulse on connected and enabled devices that have the capability. + * @param strength {number} The strength of the haptic pulse, 0.01.0. + * @param duration {number} The duration of the haptic pulse, in milliseconds. + * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. + */ + function triggerHapticPulse(strength: number, duration: number, hand: Controller.Hand): void; + /** + * Triggers a 250ms haptic pulse on connected and enabled devices that have the capability. + * @param strength {number} The strength of the haptic pulse, 0.01.0. + * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. + */ + function triggerShortHapticPulse(strength: number, hand: Controller.Hand): void; + /** + * Triggers a haptic pulse on a particular device if connected and enabled and it has the capability. + * @param deviceID {number} The ID of the device to trigger the haptic pulse on. + * @param strength {number} The strength of the haptic pulse, 0.01.0. + * @param duration {number} The duration of the haptic pulse, in milliseconds. + * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. + */ + function triggerHapticPulseOnDevice(deviceID: number, strength: number, duration: number, hand: Controller.Hand): void; + /** + * Triggers a 250ms haptic pulse on a particular device if connected and enabled and it has the capability. + * @param deviceID {number} The ID of the device to trigger the haptic pulse on. + * @param strength {number} The strength of the haptic pulse, 0.01.0. + * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. + */ + function triggerShortHapticPulseOnDevice(deviceID: number, strength: number, hand: Controller.Hand): void; + /** + * Create a new controller mapping. Routes can then be added to the mapping using MappingObject methods and + * routed to Standard controls, Actions, or script functions using RouteObject methods. The mapping can then be enabled using Controller.enableMapping for it to take effect. + * @param mappingName {string} A unique name for the mapping. If not specified a new UUID generated + * by {@link Uuid.generate} is used. + * @returns {MappingObject} + */ + function newMapping(mappingName: string): MappingObject; + /** + * Enable or disable a controller mapping. When enabled, the routes in the mapping have effect. + * @param mappingName {string} The name of the mapping. + * @param enable {boolean} If true then the mapping is enabled, otherwise it is disabled. + */ + function enableMapping(mappingName: string, enable: boolean): void; + /** + * Disable a controller mapping. When disabled, the routes in the mapping have no effect. + * @param mappingName {string} The name of the mapping. + */ + function disableMapping(mappingName: string): void; + /** + * Create a new controller mapping from a Controller.MappingJSON string. Use + * Controller.enableMapping to enable the mapping for it to take effect. + * @param jsonString {string} A JSON string of the {@link Controller.MappingJSON|MappingJSON}. + * @returns {MappingObject} + */ + function parseMapping(jsonString: string): MappingObject; + /** + * Create a new controller mapping from a Controller.MappingJSON JSON file at a URL. Use + * Controller.enableMapping to enable the mapping for it to take effect. + * @param jsonURL {string} The URL the {@link Controller.MappingJSON|MappingJSON} JSON file. + * @returns {MappingObject} + */ + function loadMapping(jsonURL: string): MappingObject; + /** + * Get the Controller.Hardware property tree. Calling this function is the same as using the Controller + * property, Controller.Hardware. + * @returns {Controller.Hardware} + */ + function getHardware(): Controller.Hardware; + /** + * Get the Controller.Actions property tree. Calling this function is the same as using the Controller + * property, Controller.Actions. + * @returns {Controller.Actions} + */ + function getActions(): Controller.Actions; + /** + * Get the Controller.Standard property tree. Calling this function is the same as using the Controller + * property, Controller.Standard. + * @returns {Controller.Standard} + */ + function getStandard(): Controller.Standard; + /** + * Start making a recording of currently active controllers. + */ + function startInputRecording(): void; + /** + * Stop making a recording started by Controller.startInputRecording. + */ + function stopInputRecording(): void; + /** + * Play back the current recording from the beginning. The current recording may have been recorded by + * Controller.startInputRecording and Controller.stopInputRecording, or loaded by Controller.loadInputRecording. Playback repeats in a loop until Controller.stopInputPlayback is called. + */ + function startInputPlayback(): void; + /** + * Stop play back of a recording started by Controller.startInputPlayback. + */ + function stopInputPlayback(): void; + /** + * Save the current recording to a file. The current recording may have been recorded by + * Controller.startInputRecording and Controller.stopInputRecording, or loaded by Controller.loadInputRecording. It is saved in the directory returned by Controller.getInputRecorderSaveDirectory. + */ + function saveInputRecording(): void; + /** + * Load an input recording, ready for play back. + * @param file {string} The path to the recording file, prefixed by "file:///". + */ + function loadInputRecording(file: string): void; + /** + * Get the directory in which input recordings are saved. + * @returns {string} + */ + function getInputRecorderSaveDirectory(): string; + /** + * Get all the active and enabled (running) input devices + * @returns {Array.} + */ + function getRunningInputDevices(): Array.; + /** + * Disable processing of mouse "move", "press", "double-press", and "release" events into + * Controller.Hardware outputs. + */ + function captureMouseEvents(): void; + /** + * Enable processing of mouse "move", "press", "double-press", and "release" events into + * Controller.Hardware-Keyboard outputs that were disabled using Controller.captureMouseEvents. + */ + function releaseMouseEvents(): void; + /** + * Disable processing of touch "begin", "update", and "end" events into + * Controller.Hardware, Controller.Hardware, and Controller.Hardware outputs. + */ + function captureTouchEvents(): void; + /** + * Enable processing of touch "begin", "update", and "end" events into + * Controller.Hardware, Controller.Hardware, and Controller.Hardware outputs that were disabled using Controller.captureTouchEvents. + */ + function releaseTouchEvents(): void; + /** + * Disable processing of mouse wheel rotation events into Controller.Hardware + * outputs. + */ + function captureWheelEvents(): void; + /** + * Enable processing of mouse wheel rotation events into Controller.Hardware + * outputs that wer disabled using Controller.captureWheelEvents. + */ + function releaseWheelEvents(): void; + /** + * Disable translating and rotating the user's avatar in response to keyboard and controller controls. + */ + function captureActionEvents(): void; + /** + * Enable translating and rotating the user's avatar in response to keyboard and controller controls that were disabled + * using Controller.captureActionEvents. + */ + function releaseActionEvents(): void; + /** + * Triggered when an action occurs. + * @param actionID {number} The ID of the action, per {@link Controller.findAction|findAction}. + * @param value {number} The value associated with the action. + * @returns {Signal} + */ + function actionEvent(actionID: number, value: number): Signal; + /** + * Triggered when there is a new controller input event. + * @param action {number} The input action, per {@link Controller.Standard}. + * @param value {number} The value associated with the input action. + * @returns {Signal} + */ + function inputEvent(action: number, value: number): Signal; + /** + * Triggered when a device is registered or unregistered by a plugin. Not all plugins generate + * hardwareChanged events: for example connecting or disconnecting a mouse will not generate an event but connecting or disconnecting an Xbox controller will. + * @returns {Signal} + */ + function hardwareChanged(): Signal; + /** + * Triggered when a device is enabled/disabled + * Enabling/Disabling Leapmotion on settings/controls will trigger this signal. + * @param deviceName {string} The name of the device that is getting enabled/disabled + * @param isEnabled {boolean} Return if the device is enabled. + * @returns {Signal} + */ + function deviceRunningChanged(deviceName: string, isEnabled: boolean): Signal; + interface Standard { + } + + interface MappingJSON { + /** + * The name of the mapping. + */ + name: string; + /** + * An array of routes. + */ + channels: Array.; + } + + interface MappingJSONRoute { + /** + * The name of a Controller.Hardware property name or an axis + * made from them. If a property name, the leading "Controller.Hardware." can be omitted. + */ + from: string; + /** + * If true then peeking is enabled per RouteObject#peek. + */ + peek: boolean; + /** + * If true then debug is enabled per RouteObject#debug. + */ + debug: boolean; + /** + * One or more numeric Controller.Hardware property names which are evaluated + * as booleans and ANDed together. Prepend with a ! to use the logical NOT of the property value. The leading "Controller.Hardware." can be omitted from the property names. + */ + when: string; + /** + * One or more filters in the route. + */ + filters: Controller.MappingJSONFilter; + /** + * The name of a Controller.Actions or Controller.Standard property. The leading + * "Controller." can be omitted. + */ + to: string; + } + + interface MappingJSONAxis { + /** + * A two-member array of single-member arrays of Controller.Hardware property names. + * The leading "Controller.Hardware." can be omitted from the property names. + */ + makeAxis: Array.>; + } + + interface MappingJSONFilter { + /** + * The name of the filter, being the name of the one of the RouteObject's filter methods. + */ + type: string; + /** + * If the filter method has a first parameter, the property name is the name of that parameter and the + * property value is the value to use. + */ + ?: string; + /** + * If the filter method has a second parameter, the property name is the name of that parameter and + * the property value is the value to use. + */ + ?: string; + } + + interface Hardware-Keyboard { + } + + interface Hardware-OculusTouch { + } + + interface Hardware-Vive { + } + + /** + * Predefined actions on Interface and the user's avatar. These can be used as end + * points in a RouteObject mapping. A synonym for Controller.Hardware.Actions. Read-only. Default mappings are provided from the Controller.Hardware.Keyboard and Controller.Standard to actions in keyboardMouse.json and standard.json, respectively. + */ + let Actions: Controller.Actions; + /** + * Standard and hardware-specific controller and computer outputs, plus predefined + * actions on Interface and the user's avatar. The outputs can be mapped to Actions or functions in a RouteObject mapping. Additionally, hardware-specific controller outputs can be mapped to Standard controller outputs. Read-only. + */ + let Hardware: Controller.Hardware; + /** + * Standard controller outputs that can be mapped to Actions or + * functions in a RouteObject mapping. Read-only. Each hardware device has a mapping from its outputs to Controller.Standard items, specified in a JSON file. For example, leapmotion.json and vive.json. + */ + let Standard: Controller.Standard; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Desktop { + let width: number; + let height: number; + /** + * InteractiveWindow flag for always showing a window on top + */ + const ALWAYS_ON_TOP: number; + /** + * InteractiveWindow flag for hiding the window instead of closing on window close by user + */ + const CLOSE_BUTTON_HIDES: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe GooglePoly API allows you to interact with Google Poly models direct from inside High Fidelity. + */ +declare namespace GooglePoly { + /** + * @param key {string} + */ + function setAPIKey(key: string): void; + /** + * @param keyword {string} + * @param category {string} + * @param format {string} + * @returns {string} + */ + function getAssetList(keyword: string, category: string, format: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getFBX(keyword: string, category: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getOBJ(keyword: string, category: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getBlocks(keyword: string, category: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getGLTF(keyword: string, category: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getGLTF2(keyword: string, category: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getTilt(keyword: string, category: string): string; + /** + * @param input {string} + * @returns {string} + */ + function getModelInfo(input: string): string; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe HMD API provides access to the HMD used in VR display mode. + */ +declare namespace HMD { + /** + * Calculate the intersection of a ray with the HUD overlay. + * @param position {Vec3} The origin of the ray. + * @param direction {Vec3} The direction of the ray. + * @returns {Vec3} + */ + function calculateRayUICollisionPoint(position: Vec3, direction: Vec3): Vec3; + /** + * Get the 2D HUD overlay coordinates of a 3D point on the HUD overlay. + * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. + * @param position {Vec3} The point on the HUD overlay in world coordinates. + * @returns {Vec2} + */ + function overlayFromWorldPoint(position: Vec3): Vec2; + /** + * Get the 3D world coordinates of a 2D point on the HUD overlay. + * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. + * @param coordinates {Vec2} The point on the HUD overlay in HUD coordinates. + * @returns {Vec3} + */ + function worldPointFromOverlay(coordinates: Vec2): Vec3; + /** + * Get the 2D point on the HUD overlay represented by given spherical coordinates. + * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. Spherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD overlay. + * @param sphericalPos {Vec2} The point on the HUD overlay in spherical coordinates. + * @returns {Vec2} + */ + function sphericalToOverlay(sphericalPos: Vec2): Vec2; + /** + * Get the spherical coordinates of a 2D point on the HUD overlay. + * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. Spherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD overlay. + * @param overlayPos {Vec2} The point on the HUD overlay in HUD coordinates. + * @returns {Vec2} + */ + function overlayToSpherical(overlayPos: Vec2): Vec2; + /** + * Recenter the HMD HUD to the current HMD position and orientation. + */ + function centerUI(): void; + /** + * Get the name of the HMD audio input device. + * @returns {string} + */ + function preferredAudioInput(): string; + /** + * Get the name of the HMD audio output device. + * @returns {string} + */ + function preferredAudioOutput(): string; + /** + * Check whether there is an HMD available. + * @param name {string} [name=""] The name of the HMD to check for, e.g., "Oculus Rift". The name is the same as + * may be displayed in Interface's "Display" menu. If no name is specified then any HMD matches. + * @returns {boolean} + */ + function isHMDAvailable(name: string): boolean; + /** + * Check whether there is an HMD head controller available. + * @param name {string} [name=""] The name of the HMD head controller to check for, e.g., "Oculus". If no name is + * specified then any HMD head controller matches. + * @returns {boolean} + */ + function isHeadControllerAvailable(name: string): boolean; + /** + * Check whether there are HMD hand controllers available. + * @param name {string} [name=""] The name of the HMD hand controller to check for, e.g., "Oculus". If no name is + * specified then any HMD hand controller matches. + * @returns {boolean} + */ + function isHandControllerAvailable(name: string): boolean; + /** + * Check whether there are specific HMD controllers available. + * @param name {string} The name of the HMD controller to check for, e.g., "OculusTouch". + * @returns {boolean} + */ + function isSubdeviceContainingNameAvailable(name: string): boolean; + /** + * Signal that models of the HMD hand controllers being used should be displayed. The models are displayed at their actual, + * real-world locations. + */ + function requestShowHandControllers(): void; + /** + * Signal that it is no longer necessary to display models of the HMD hand controllers being used. If no other scripts + * want the models displayed then they are no longer displayed. + */ + function requestHideHandControllers(): void; + /** + * Check whether any script wants models of the HMD hand controllers displayed. Requests are made and canceled using + * HMD.requestShowHandControllers and HMD.requestHideHandControllers. + * @returns {boolean} + */ + function shouldShowHandControllers(): boolean; + /** + * Causes the borders in HUD windows to be enlarged when the laser intersects them in HMD mode. By default, borders are not + * enlarged. + */ + function activateHMDHandMouse(): void; + /** + * Causes the border in HUD windows to no longer be enlarged when the laser intersects them in HMD mode. By default, + * borders are not enlarged. + */ + function deactivateHMDHandMouse(): void; + /** + * Suppress the activation of the HMD-provided keyboard, if any. Successful calls should be balanced with a call to + * HMD.unspressKeyboard within a reasonable amount of time. + * @returns {boolean} + */ + function suppressKeyboard(): boolean; + /** + * Unsuppress the activation of the HMD-provided keyboard, if any. + */ + function unsuppressKeyboard(): void; + /** + * Check whether the HMD-provided keyboard, if any, is visible. + * @returns {boolean} + */ + function isKeyboardVisible(): boolean; + /** + * Closes the tablet if it is open. + */ + function closeTablet(): void; + /** + * Opens the tablet if the tablet is used in the current display mode and it isn't already showing, and sets the tablet to + * contextual mode if requested. In contextual mode, the page displayed on the tablet is wholly controlled by script (i.e., the user cannot navigate to another). + * @param contextualMode {boolean} [contextualMode=false] If true then the tablet is opened at a specific position and + * orientation already set by the script, otherwise it opens at a position and orientation relative to the user. For contextual mode, set the world or local position and orientation of the HMD.tabletID overlay. + */ + function openTablet(contextualMode: boolean): void; + /** + * Triggered when a request to show or hide models of the HMD hand controllers is made using + * HMD.requestShowHandControllers or HMD.requestHideHandControllers. + * @returns {Signal} + */ + function shouldShowHandControllersChanged(): Signal; + /** + * Triggered when the HMD.ipdScale property value changes. + * @returns {Signal} + */ + function IPDScaleChanged(): Signal; + /** + * Triggered when Interface's display mode changes and when the user puts on or takes off their HMD. + * @param isHMDMode {boolean} true if the display mode is HMD, otherwise false. This is the + * same value as provided by HMD.active. + * @returns {Signal} + */ + function displayModeChanged(isHMDMode: boolean): Signal; + /** + * Triggered when the HMD.mounted property value changes. + * @returns {Signal} + */ + function mountedChanged(): Signal; + /** + * The position of the HMD if currently in VR display mode, otherwise + * Vec3. Read-only. + */ + let position: Vec3; + /** + * The orientation of the HMD if currently in VR display mode, otherwise + * Quat. Read-only. + */ + let orientation: Quat; + /** + * true if the display mode is HMD, otherwise false. Read-only. + */ + let active: boolean; + /** + * true if currently in VR display mode and the HMD is being worn, otherwise + * false. Read-only. + */ + let mounted: boolean; + /** + * The real-world height of the user. Read-only. Currently always returns a + * value of 1.755. + */ + let playerHeight: number; + /** + * The real-world height of the user's eyes. Read-only. Currently always returns a + * value of 1.655. + */ + let eyeHeight: number; + /** + * The inter-pupillary distance (distance between eyes) of the user, used for rendering. Defaults to + * the human average of 0.064 unless set by the HMD. Read-only. + */ + let ipd: number; + /** + * A scale factor applied to the ipd property value. + */ + let ipdScale: number; + /** + * true if the tablet is being displayed, false otherwise. + * Read-only. + */ + let showTablet: boolean; + /** + * true if the tablet has been opened in contextual mode, otherwise + * false. In contextual mode, the tablet has been opened at a specific world position and orientation rather than at a position and orientation relative to the user. Read-only. + */ + let tabletContextualMode: boolean; + /** + * The UUID of the tablet body model overlay. + */ + let tabletID: Uuid; + /** + * The UUID of the tablet's screen overlay. + */ + let tabletScreenID: Uuid; + /** + * The UUID of the tablet's "home" button overlay. + */ + let homeButtonID: Uuid; + /** + * The UUID of the tablet's "home" button highlight overlay. + */ + let homeButtonHighlightID: Uuid; + /** + * The UUID of the mini tablet's body model overlay. null if not in HMD mode. + */ + let miniTabletID: Uuid; + /** + * The UUID of the mini tablet's screen overlay. null if not in HMD mode. + */ + let miniTabletScreenID: Uuid; + /** + * The hand that the mini tablet is displayed on: 0 for left hand, + * 1 for right hand, -1 if not in HMD mode. + */ + let miniTabletHand: number; + /** + * The size and position of the HMD play area in sensor coordinates. Read-only. + */ + let playArea: Rect; + /** + * The positions of the VR system sensors in sensor coordinates. Read-only. + */ + let sensorPositions: Array.; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Menu API provides access to the menu that is displayed at the top of the window + * on a user's desktop and in the tablet when the "MENU" button is pressed. Groupings A "grouping" provides a way to group a set of menus or menu items together so that they can all be set visible or invisible as a group. There are two available groups: "Advanced" and "Developer". These groupings can be toggled in the "Settings" menu. If a menu item doesn't belong to a group it is always displayed. + */ +declare namespace Menu { + /** + * Add a new top-level menu. + * @param menuName {string} Name that will be displayed for the menu. Nested menus can be described using the ">" symbol. + * @param grouping {string} [grouping=undefined] Name of the grouping, if any, to add this menu to. + */ + function addMenu(menuName: string, grouping: string): void; + /** + * Remove a top-level menu. + * @param menuName {string} Name of the menu to remove. + */ + function removeMenu(menuName: string): void; + /** + * Check whether a top-level menu exists. + * @param menuName {string} Name of the menu to check for existence. + * @returns {boolean} + */ + function menuExists(menuName: string): boolean; + /** + * Add a separator with an unclickable label below it. The separator will be placed at the bottom of the menu. + * If you want to add a separator at a specific point in the menu, use Menu.addMenuItem with Menu.MenuItemProperties instead. + * @param menuName {string} Name of the menu to add a separator to. + * @param separatorName {string} Name of the separator that will be displayed as the label below the separator line. + */ + function addSeparator(menuName: string, separatorName: string): void; + /** + * Remove a separator from a menu. + * @param menuName {string} Name of the menu to remove the separator from. + * @param separatorName {string} Name of the separator to remove. + */ + function removeSeparator(menuName: string, separatorName: string): void; + /** + * Add a new menu item to a menu. + * @param properties {Menu.MenuItemProperties} Properties of the menu item to create. + */ + function addMenuItem(properties: Menu.MenuItemProperties): void; + /** + * Add a new menu item to a menu. The new item is added at the end of the menu. + * @param menuName {string} Name of the menu to add a menu item to. + * @param menuItem {string} Name of the menu item. This is what will be displayed in the menu. + * @param shortcutKey {string} [shortcutKey=undefined] A shortcut key that can be used to trigger the menu item. + */ + function addMenuItem(menuName: string, menuItem: string, shortcutKey: string): void; + /** + * Remove a menu item from a menu. + * @param menuName {string} Name of the menu to remove a menu item from. + * @param menuItem {string} Name of the menu item to remove. + * Menu.removeMenuItem("Developer", "Test"); + */ + function removeMenuItem(menuName: string, menuItem: string): void; + /** + * Check if a menu item exists. + * @param menuName {string} Name of the menu that the menu item is in. + * @param menuItem {string} Name of the menu item to check for existence of. + * @returns {boolean} + */ + function menuItemExists(menuName: string, menuItem: string): boolean; + /** + * Check whether a checkable menu item is checked. + * @param menuOption {string} The name of the menu item. + * @returns {boolean} + */ + function isOptionChecked(menuOption: string): boolean; + /** + * Set a checkable menu item as checked or unchecked. + * @param menuOption {string} The name of the menu item to modify. + * @param isChecked {boolean} If true, the menu item will be checked, otherwise it will not be checked. + */ + function setIsOptionChecked(menuOption: string, isChecked: boolean): void; + /** + * Trigger the menu item as if the user clicked on it. + * @param menuOption {string} The name of the menu item to trigger. + */ + function triggerOption(menuOption: string): void; + /** + * Check whether a menu or menu item is enabled. If disabled, the item is grayed out and unusable. + * Menus are enabled by default. + * @param menuName {string} The name of the menu or menu item to check. + * @returns {boolean} + */ + function isMenuEnabled(menuName: string): boolean; + /** + * Set a menu or menu item to be enabled or disabled. If disabled, the item is grayed out and unusable. + * @param menuName {string} The name of the menu or menu item to modify. + * @param isEnabled {boolean} If true, the menu will be enabled, otherwise it will be disabled. + */ + function setMenuEnabled(menuName: string, isEnabled: boolean): void; + /** + * Triggered when a menu item is clicked (or triggered by Menu.triggerOption). + * @param menuItem {string} Name of the menu item that was clicked. + * @returns {Signal} + */ + function menuItemEvent(menuItem: string): Signal; + interface MenuItemProperties { + /** + * Name of the menu. Nested menus can be described using the ">" symbol. + */ + menuName: string; + /** + * Name of the menu item. + */ + menuItemName: string; + /** + * Whether or not the menu item is checkable. + */ + isCheckable: boolean; + /** + * Whether or not the menu item is checked. + */ + isChecked: boolean; + /** + * Whether or not the menu item is a separator. + */ + isSeparator: boolean; + /** + * A shortcut key that triggers the menu item. + */ + shortcutKey: string; + /** + * A KeyEvent that specifies a key that triggers the menu item. + */ + shortcutKeyEvent: KeyEvent; + /** + * The position to place the new menu item. An integer number with 0 being the first + * menu item. + */ + position: number; + /** + * The name of the menu item to place this menu item before. + */ + beforeItem: string; + /** + * The name of the menu item to place this menu item after. + */ + afterItem: string; + /** + * The name of grouping to add this menu item to. + */ + grouping: string; + } + +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Selection API provides a means of grouping together avatars, entities, and overlays in named lists. + */ +declare namespace Selection { + interface SelectedItemsList { + /** + * The IDs of the avatars in the selection. + */ + avatars: Array.; + /** + * The IDs of the entities in the selection. + */ + entities: Array.; + /** + * The IDs of the overlays in the selection. + */ + overlays: Array.; + } + + interface HighlightStyle { + /** + * Color of the specified highlight region. + */ + outlineUnoccludedColor: Color; + /** + * "" + */ + outlineOccludedColor: Color; + /** + * "" + */ + fillUnoccludedColor-: Color; + /** + * "" + */ + fillOccludedColor-: Color; + /** + * Alpha value ranging from 0.0 (not visible) to 1.0 + * (fully opaque) for the specified highlight region. + */ + outlineUnoccludedAlpha: number; + /** + * "" + */ + outlineOccludedAlpha: number; + /** + * "" + */ + fillUnoccludedAlpha: number; + /** + * "" + */ + fillOccludedAlpha: number; + /** + * Width of the outline, in pixels. + */ + outlineWidth: number; + /** + * true to enable outline smooth fall-off. + */ + isOutlineSmooth: boolean; + } + + /** + * Get the names of all the selection lists. + * @returns {Array.} + */ + function getListNames(): Array.; + /** + * Delete a named selection list. + * @param listName {string} The name of the selection list. + * @returns {boolean} + */ + function removeListFromMap(listName: string): boolean; + /** + * Add an item to a selection list. + * @param listName {string} The name of the selection list to add the item to. + * @param itemType {Selection.ItemType} The type of the item being added. + * @param id {Uuid} The ID of the item to add to the selection. + * @returns {boolean} + */ + function addToSelectedItemsList(listName: string, itemType: Selection.ItemType, id: Uuid): boolean; + /** + * Remove an item from a selection list. + * @param listName {string} The name of the selection list to remove the item from. + * @param itemType {Selection.ItemType} The type of the item being removed. + * @param id {Uuid} The ID of the item to remove. + * @returns {boolean} + */ + function removeFromSelectedItemsList(listName: string, itemType: Selection.ItemType, id: Uuid): boolean; + /** + * Remove all items from a selection. + * @param listName {string} The name of the selection list. + * @returns {boolean} + */ + function clearSelectedItemsList(listName: string): boolean; + /** + * Print out the list of avatars, entities, and overlays in a selection to the debug log (not the script log). + * @param listName {string} The name of the selection list. + */ + function printList(listName: string): void; + /** + * Get the list of avatars, entities, and overlays stored in a selection list. + * @param listName {string} The name of the selection list. + * @returns {Selection.SelectedItemsList} + */ + function getSelectedItemsList(listName: string): Selection.SelectedItemsList; + /** + * Get the names of the highlighted selection lists. + * @returns {Array.} + */ + function getHighlightedListNames(): Array.; + /** + * Enable highlighting for a selection list. + * If the selection list doesn't exist, it will be created. All objects in the list will be displayed with the highlight effect specified. The function can be called several times with different values in the style to modify it. Note: This function implicitly calls Selection.enableListToScene. + * @param listName {string} The name of the selection list. + * @param highlightStyle {Selection.HighlightStyle} The highlight style. + * @returns {boolean} + */ + function enableListHighlight(listName: string, highlightStyle: Selection.HighlightStyle): boolean; + /** + * Disable highlighting for the selection list. + * If the selection list doesn't exist or wasn't enabled for highlighting then nothing happens and false is returned. Note: This function implicitly calls Selection.disableListToScene. + * @param listName {string} The name of the selection list. + * @returns {boolean} + */ + function disableListHighlight(listName: string): boolean; + /** + * Enable scene selection for the selection list. + * If the Selection doesn't exist, it will be created. All objects in the list will be sent to a scene selection. + * @param listName {string} The name of the selection list. + * @returns {boolean} + */ + function enableListToScene(listName: string): boolean; + /** + * Disable scene selection for the named selection. + * If the selection list doesn't exist or wasn't enabled on the scene then nothing happens and false is returned. + * @param listName {string} The name of the selection list. + * @returns {boolean} + */ + function disableListToScene(listName: string): boolean; + /** + * Get the highlight style values for the a selection list. + * If the selection doesn't exist or hasn't been highlight enabled yet, an empty object is returned. + * @param listName {string} The name of the selection list. + * @returns {Selection.HighlightStyle} + */ + function getListHighlightStyle(listName: string): Selection.HighlightStyle; + /** + * Triggered when a list's content changes. + * @param listName {string} The name of the selection list that changed. + * @returns {Signal} + */ + function selectedItemsListChanged(listName: string): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Settings API provides a facility to store and retrieve values that persist between Interface runs. + */ +declare namespace Settings { + /** + * Retrieve the value from a named setting. + * @param key {string} The name of the setting. + * @param defaultValue {string} [defaultValue=""] The value to return if the setting doesn't exist. + * @returns {string} + */ + function getValue(key: string, defaultValue: string): string; + /** + * Store a value in a named setting. If the setting already exists its value is overwritten, otherwise a new setting is + * created. If the value is set to null or undefined, the setting is deleted. + * @param key {string} The name of the setting. Be sure to use a unique name if creating a new setting. + * @param value {string} The value to store in the setting. If null or + * undefined is specified, the setting is deleted. + */ + function setValue(key: string, value: string): void; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Wallet { + function refreshWalletStatus(): void; + /** + * @returns {number} + */ + function getWalletStatus(): number; + /** + * @param entityID {Uuid} + */ + function proveAvatarEntityOwnershipVerification(entityID: Uuid): void; + /** + * @returns {Signal} + */ + function walletStatusChanged(): Signal; + /** + * @returns {Signal} + */ + function walletNotSetup(): Signal; + /** + * @param entityID {Uuid} + * @returns {Signal} + */ + function ownershipVerificationSuccess(entityID: Uuid): Signal; + /** + * @param entityID {Uuid} + * @returns {Signal} + */ + function ownershipVerificationFailed(entityID: Uuid): Signal; + let walletStatus: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Window API provides various facilities not covered elsewhere: window dimensions, window focus, normal or entity camera + * view, clipboard, announcements, user connections, common dialog boxes, snapshots, file import, domain changes, domain physics. + */ +declare namespace Window { + /** + * Check if the Interface window has focus. + * @returns {boolean} + */ + function hasFocus(): boolean; + /** + * Make the Interface window have focus. On Windows, if Interface doesn't already have focus, the task bar icon flashes to + * indicate that Interface wants attention but focus isn't taken away from the application that the user is using. + */ + function setFocus(): void; + /** + * Raise the Interface window if it is minimized. If raised, the window gains focus. + */ + function raise(): void; + /** + * Display a dialog with the specified message and an "OK" button. The dialog is non-modal; the script continues without + * waiting for a user response. + * @param message {string} [message=""] The message to display. + */ + function alert(message: string): void; + /** + * Prompt the user to confirm something. Displays a modal dialog with a message plus "Yes" and "No" buttons. + * responds. + * @param message {string} [message=""] The question to display. + * @returns {boolean} + */ + function confirm(message: string): boolean; + /** + * Prompt the user to enter some text. Displays a modal dialog with a message and a text box, plus "OK" and "Cancel" + * buttons. + * @param message {string} The question to display. + * @param defaultText {string} The default answer text. + * @returns {string} + */ + function prompt(message: string, defaultText: string): string; + /** + * Prompt the user to enter some text. Displays a non-modal dialog with a message and a text box, plus "OK" and "Cancel" + * buttons. A Window.promptTextChanged signal is emitted when the user OKs the dialog; no signal is emitted if the user cancels the dialog. + * @param message {string} [message=""] The question to display. + * @param defaultText {string} [defaultText=""] The default answer text. + */ + function promptAsync(message: string, defaultText: string): void; + /** + * Prompt the user to choose a directory. Displays a modal dialog that navigates the directory tree. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @returns {string} + */ + function browseDir(title: string, directory: string): string; + /** + * Prompt the user to choose a directory. Displays a non-modal dialog that navigates the directory tree. A + * Window.browseDirChanged signal is emitted when a directory is chosen; no signal is emitted if the user cancels the dialog. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + */ + function browseDirAsync(title: string, directory: string): void; + /** + * Prompt the user to choose a file. Displays a modal dialog that navigates the directory tree. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + * @returns {string} + */ + function browse(title: string, directory: string, nameFilter: string): string; + /** + * Prompt the user to choose a file. Displays a non-modal dialog that navigates the directory tree. A + * Window.browseChanged signal is emitted when a file is chosen; no signal is emitted if the user cancels the dialog. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + */ + function browseAsync(title: string, directory: string, nameFilter: string): void; + /** + * Prompt the user to specify the path and name of a file to save to. Displays a model dialog that navigates the directory + * tree and allows the user to type in a file name. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + * @returns {string} + */ + function save(title: string, directory: string, nameFilter: string): string; + /** + * Prompt the user to specify the path and name of a file to save to. Displays a non-model dialog that navigates the + * directory tree and allows the user to type in a file name. A Window.saveFileChanged signal is emitted when a file is specified; no signal is emitted if the user cancels the dialog. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + */ + function saveAsync(title: string, directory: string, nameFilter: string): void; + /** + * Prompt the user to choose an Asset Server item. Displays a modal dialog that navigates the tree of assets on the Asset + * Server. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + * @returns {string} + */ + function browseAssets(title: string, directory: string, nameFilter: string): string; + /** + * Prompt the user to choose an Asset Server item. Displays a non-modal dialog that navigates the tree of assets on the + * Asset Server. A Window.assetsDirChanged signal is emitted when an asset is chosen; no signal is emitted if the user cancels the dialog. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + */ + function browseAssetsAsync(title: string, directory: string, nameFilter: string): void; + /** + * Open the Asset Browser dialog. If a file to upload is specified, the user is prompted to enter the folder and name to + * map the file to on the asset server. + * @param uploadFile {string} [uploadFile=""] The path and name of a file to upload to the asset server. + */ + function showAssetServer(uploadFile: string): void; + /** + * Get Interface's build number. + * @returns {string} + */ + function checkVersion(): string; + /** + * Get the signature for Interface's protocol version. + * @returns {string} + */ + function protocolSignature(): string; + /** + * Copies text to the operating system's clipboard. + * @param text {string} The text to copy to the operating system's clipboard. + */ + function copyToClipboard(text: string): void; + /** + * Takes a snapshot of the current Interface view from the primary camera. When a still image only is captured, + * Window.stillSnapshotTaken is emitted; when a still image plus moving images are captured, Window.processingGifStarted and Window.processingGifCompleted are emitted. The path to store the snapshots and the length of the animated GIF to capture are specified in Settings > General > Snapshots. If user has supplied a specific filename for the snapshot: If the user's requested filename has a suffix that's contained within SUPPORTED_IMAGE_FORMATS, DON'T append ".jpg" to the filename. QT will save the image in the format associated with the filename's suffix. If you want lossless Snapshots, supply a `.png` filename. Otherwise, use `.jpeg` or `.jpg`. Otherwise, ".jpg" is appended to the user's requested filename so that the image is saved in JPG format. If the user hasn't supplied a specific filename for the snapshot: Save the snapshot in JPG format according to FILENAME_PATH_FORMAT + * @param notify {boolean} [notify=true] This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} + * signal. + * @param includeAnimated {boolean} [includeAnimated=false] If true, a moving image is captured as an animated GIF in addition + * to a still image. + * @param aspectRatio {number} [aspectRatio=0] The width/height ratio of the snapshot required. If the value is 0 the + * full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the dimensions is adjusted in order to match the aspect ratio. + * @param filename {string} [filename=""] If this parameter is not given, the image will be saved as "hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS". + * If this parameter is "" then the image will be saved as ".jpg". Otherwise, the image will be saved to this filename, with an appended ".jpg". + */ + function takeSnapshot(notify: boolean, includeAnimated: boolean, aspectRatio: number, filename: string): void; + /** + * Takes a still snapshot of the current view from the secondary camera that can be set up through the Render API. + * @param notify {boolean} [notify=true] This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} + * signal. + * @param filename {string} [filename=""] If this parameter is not given, the image will be saved as "hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS". + * If this parameter is "" then the image will be saved as ".jpg". Otherwise, the image will be saved to this filename, with an appended ".jpg". + */ + function takeSecondaryCameraSnapshot(notify: boolean, filename: string): void; + /** + * Takes a 360° snapshot at a given position for the secondary camera. The secondary camera does not need to have been + * set up. + * @param cameraPosition {Vec3} The position of the camera for the snapshot. + * @param cubemapOutputFormat {boolean} [cubemapOutputFormat=false] If true then the snapshot is saved as a cube map image, + * otherwise is saved as an equirectangular image. + * @param notify {boolean} [notify=true] This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} + * signal. + * @param filename {string} [filename=""] If this parameter is not supplied, the image will be saved as "hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS". + * If this parameter is "" then the image will be saved as ".jpg". Otherwise, the image will be saved to this filename, with an appended ".jpg". + */ + function takeSecondaryCamera360Snapshot(cameraPosition: Vec3, cubemapOutputFormat: boolean, notify: boolean, filename: string): void; + /** + * Emit a Window.connectionAdded or a Window.connectionError signal that + * indicates whether or not a user connection was successfully made using the Web API. + * @param success {boolean} If true then {@link Window.connectionAdded|connectionAdded} is emitted, otherwise + * {@link Window.connectionError|connectionError} is emitted. + * @param description {string} Descriptive text about the connection success or error. This is sent in the signal emitted. + */ + function makeConnection(success: boolean, description: string): void; + /** + * Display a notification message. Notifications are displayed in panels by the default script, nofications.js. An + * Window.announcement signal is emitted when this function is called. + * @param message {string} The announcement message. + */ + function displayAnnouncement(message: string): void; + /** + * Prepare a snapshot ready for sharing. A Window.snapshotShared signal is emitted when the snapshot + * has been prepared. + * @param path {string} The path and name of the image file to share. + * @param href {string} [href=""] The metaverse location where the snapshot was taken. + */ + function shareSnapshot(path: string, href: string): void; + /** + * Check to see if physics is active for you in the domain you're visiting - there is a delay between your arrival at a + * domain and physics becoming active for you in that domain. + * @returns {boolean} + */ + function isPhysicsEnabled(): boolean; + /** + * Set what to show on the PC display: normal view or entity camera view. The entity camera is configured using + * Camera.setCameraEntity and Camera. + * @param texture {Window.DisplayTexture} The view to display. + * @returns {boolean} + */ + function setDisplayTexture(texture: Window.DisplayTexture): boolean; + /** + * Check if a 2D point is within the desktop window if in desktop mode, or the drawable area of the HUD overlay if in HMD + * mode. + * @param point {Vec2} The point to check. + * @returns {boolean} + */ + function isPointOnDesktopWindow(point: Vec2): boolean; + /** + * Get the size of the drawable area of the Interface window if in desktop mode or the HMD rendering surface if in HMD mode. + * @returns {Vec2} + */ + function getDeviceSize(): Vec2; + /** + * Gets the last domain connection error when a connection is refused. + * @returns {Window.ConnectionRefusedReason} + */ + function getLastDomainConnectionError(): Window.ConnectionRefusedReason; + /** + * Open a non-modal message box that can have a variety of button combinations. See also, + * Window.updateMessageBox and Window.closeMessageBox. + * @param title {string} The title to display for the message box. + * @param text {string} Text to display in the message box. + * @param buttons {Window.MessageBoxButton} The buttons to display on the message box; one or more button values added + * together. + * @param defaultButton {Window.MessageBoxButton} The button that has focus when the message box is opened. + * @returns {number} + */ + function openMessageBox(title: string, text: string, buttons: Window.MessageBoxButton, defaultButton: Window.MessageBoxButton): number; + /** + * Open a URL in the Interface window or other application, depending on the URL's scheme. If the URL starts with + * hifi:// then that URL is navigated to in Interface, otherwise the URL is opened in the application the OS associates with the URL's scheme (e.g., a Web browser for http://). + * @param url {string} The URL to open. + */ + function openUrl(url: string): void; + /** + * Open an Android activity and optionally return back to the scene when the activity is completed. Android only. + * @param activityName {string} The name of the activity to open: one of "Home", "Login", or + * "Privacy Policy". + * @param backToScene {boolean} If true, the user is automatically returned back to the scene when the + * activity is completed. + */ + function openAndroidActivity(activityName: string, backToScene: boolean): void; + /** + * Update the content of a message box that was opened with Window.openMessageBox. + * @param id {number} The ID of the message box. + * @param title {string} The title to display for the message box. + * @param text {string} Text to display in the message box. + * @param buttons {Window.MessageBoxButton} The buttons to display on the message box; one or more button values added + * together. + * @param defaultButton {Window.MessageBoxButton} The button that has focus when the message box is opened. + */ + function updateMessageBox(id: number, title: string, text: string, buttons: Window.MessageBoxButton, defaultButton: Window.MessageBoxButton): void; + /** + * Close a message box that was opened with Window.openMessageBox. + * @param id {number} The ID of the message box. + */ + function closeMessageBox(id: number): void; + /** + * Triggered when you change the domain you're visiting. Warning: Is not emitted if you go to a domain + * that isn't running. + * @param domainURL {string} The domain's URL. + * @returns {Signal} + */ + function domainChanged(domainURL: string): Signal; + /** + * Triggered when you try to navigate to a *.json, *.svo, or *.svo.json URL in a Web browser within Interface. + * @param url {string} The URL of the file to import. + * @returns {Signal} + */ + function svoImportRequested(url: string): Signal; + /** + * Triggered when you try to visit a domain but are refused connection. + * @param reasonMessage {string} A description of the refusal. + * @param reasonCode {Window.ConnectionRefusedReason} Integer number that enumerates the reason for the refusal. + * @param extraInfo {string} Extra information about the refusal. + * @returns {Signal} + */ + function domainConnectionRefused(reasonMessage: string, reasonCode: Window.ConnectionRefusedReason, extraInfo: string): Signal; + /** + * Triggered when you try to visit a domain but are redirected into the error state. + * @param isInErrorState {boolean} If true, the user has been redirected to the error URL. + * @returns {Signal} + */ + function redirectErrorStateChanged(isInErrorState: boolean): Signal; + /** + * Triggered when a still snapshot has been taken by calling Window.takeSnapshot with + * includeAnimated = false or Window.takeSecondaryCameraSnapshot. + * @param pathStillSnapshot {string} The path and name of the snapshot image file. + * @param notify {boolean} The value of the notify parameter that {@link Window.takeSnapshot|takeSnapshot} + * was called with. + * @returns {Signal} + */ + function stillSnapshotTaken(pathStillSnapshot: string, notify: boolean): Signal; + /** + * Triggered when a still 360° snapshot has been taken by calling + * Window.takeSecondaryCamera360Snapshot. + * @param pathStillSnapshot {string} The path and name of the snapshot image file. + * @param notify {boolean} The value of the notify parameter that {@link Window.takeSecondaryCamera360Snapshot|takeSecondaryCamera360Snapshot} + * was called with. + * @returns {Signal} + */ + function snapshot360Taken(pathStillSnapshot: string, notify: boolean): Signal; + /** + * Triggered when a snapshot submitted via Window.shareSnapshot is ready for sharing. The snapshot + * may then be shared via the Account.metaverseServerURL Web API. + * @param isError {boolean} true if an error was encountered preparing the snapshot for sharing, otherwise + * false. + * @param reply {string} JSON-formatted information about the snapshot. + * @returns {Signal} + */ + function snapshotShared(isError: boolean, reply: string): Signal; + /** + * Triggered when the snapshot images have been captured by Window.takeSnapshot and the GIF is + * starting to be processed. + * @param pathStillSnapshot {string} The path and name of the still snapshot image file. + * @returns {Signal} + */ + function processingGifStarted(pathStillSnapshot: string): Signal; + /** + * Triggered when a GIF has been prepared of the snapshot images captured by Window.takeSnapshot. + * @param pathAnimatedSnapshot {string} The path and name of the moving snapshot GIF file. + * @returns {Signal} + */ + function processingGifCompleted(pathAnimatedSnapshot: string): Signal; + /** + * Triggered when you've successfully made a user connection. + * @param message {string} A description of the success. + * @returns {Signal} + */ + function connectionAdded(message: string): Signal; + /** + * Triggered when you failed to make a user connection. + * @param message {string} A description of the error. + * @returns {Signal} + */ + function connectionError(message: string): Signal; + /** + * Triggered when a message is announced by Window.displayAnnouncement. + * @param message {string} The message text. + * @returns {Signal} + */ + function announcement(message: string): Signal; + /** + * Triggered when the user closes a message box that was opened with Window.openMessageBox. + * @param id {number} The ID of the message box that was closed. + * @param button {number} The button that the user clicked. If the user presses Esc, the Cancel button value is returned, + * whether or not the Cancel button is displayed in the message box. + * @returns {Signal} + */ + function messageBoxClosed(id: number, button: number): Signal; + /** + * Triggered when the user chooses a directory in a Window.browseDirAsync dialog. + * @param directory {string} The directory the user chose in the dialog. + * @returns {Signal} + */ + function browseDirChanged(directory: string): Signal; + /** + * Triggered when the user chooses an asset in a Window.browseAssetsAsync dialog. + * @param asset {string} The path and name of the asset the user chose in the dialog. + * @returns {Signal} + */ + function assetsDirChanged(asset: string): Signal; + /** + * Triggered when the user specifies a file in a Window.saveAsync dialog. + * @param filename {string} The path and name of the file that the user specified in the dialog. + * @returns {Signal} + */ + function saveFileChanged(filename: string): Signal; + /** + * Triggered when the user chooses a file in a Window.browseAsync dialog. + * @param filename {string} The path and name of the file the user chose in the dialog. + * @returns {Signal} + */ + function browseChanged(filename: string): Signal; + /** + * Triggered when the user OKs a Window.promptAsync dialog. + * @param text {string} The text the user entered in the dialog. + * @returns {Signal} + */ + function promptTextChanged(text: string): Signal; + /** + * Triggered when the position or size of the Interface window changes. + * @param geometry {Rect} The position and size of the drawable area of the Interface window. + * @returns {Signal} + */ + function geometryChanged(geometry: Rect): Signal; + /** + * The width of the drawable area of the Interface window (i.e., without borders or other + * chrome), in pixels. Read-only. + */ + let innerWidth: number; + /** + * The height of the drawable area of the Interface window (i.e., without borders or other + * chrome), in pixels. Read-only. + */ + let innerHeight: number; + /** + * Provides facilities for working with your current metaverse location. See location. + */ + let location: object; + /** + * The x display coordinate of the top left corner of the drawable area of the Interface window. + * Read-only. + */ + let x: number; + /** + * The y display coordinate of the top left corner of the drawable area of the Interface window. + * Read-only. + */ + let y: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsAPI to help manage your Avatar's input + */ +declare namespace AvatarInputs { + /** + * @param loudness {number} + * @returns {number} + */ + function loudnessToAudioLevel(loudness: number): number; + /** + * @param showAudioTools {boolean} + */ + function setShowAudioTools(showAudioTools: boolean): void; + /** + * @returns {Signal} + */ + function cameraEnabledChanged(): Signal; + /** + * @returns {Signal} + */ + function cameraMutedChanged(): Signal; + /** + * @returns {Signal} + */ + function isHMDChanged(): Signal; + /** + * @param show {boolean} + * @returns {Signal} + */ + function showAudioToolsChanged(show: boolean): Signal; + function resetSensors(): void; + function toggleCameraMute(): void; + /** + * Read-only. + */ + let cameraEnabled: boolean; + /** + * Read-only. + */ + let cameraMuted: boolean; + /** + * Read-only. + */ + let isHMD: boolean; + let showAudioTools: boolean; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Snapshot { + /** + * @param location {string} + * @returns {Signal} + */ + function snapshotLocationSet(location: string): Signal; + /** + * @returns {string} + */ + function getSnapshotsLocation(): string; + /** + * @param location {String} + */ + function setSnapshotsLocation(location: String): void; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare namespace Stats { + /** + * Triggered when the value of the longsubmits property changes. + * @returns {Signal} + */ + function longsubmitsChanged(): Signal; + /** + * Triggered when the value of the longrenders property changes. + * @returns {Signal} + */ + function longrendersChanged(): Signal; + /** + * Triggered when the value of the longframes property changes. + * @returns {Signal} + */ + function longframesChanged(): Signal; + /** + * Triggered when the value of the appdropped property changes. + * @returns {Signal} + */ + function appdroppedChanged(): Signal; + /** + * Triggered when the value of the expanded property changes. + * @returns {Signal} + */ + function expandedChanged(): Signal; + /** + * Triggered when the value of the timingExpanded property changes. + * @returns {Signal} + */ + function timingExpandedChanged(): Signal; + /** + * Triggered when the value of the serverCount property changes. + * @returns {Signal} + */ + function serverCountChanged(): Signal; + /** + * Triggered when the value of the renderrate property changes. + * @returns {Signal} + */ + function renderrateChanged(): Signal; + /** + * Triggered when the value of the presentrate property changes. + * @returns {Signal} + */ + function presentrateChanged(): Signal; + /** + * Triggered when the value of the presentnewrate property changes. + * @returns {Signal} + */ + function presentnewrateChanged(): Signal; + /** + * Triggered when the value of the presentdroprate property changes. + * @returns {Signal} + */ + function presentdroprateChanged(): Signal; + /** + * Triggered when the value of the stutterrate property changes. + * @returns {Signal} + */ + function stutterrateChanged(): Signal; + /** + * Triggered when the value of the gameLoopRate property changes. + * @returns {Signal} + */ + function gameLoopRateChanged(): Signal; + /** + * Trigered when + * @returns {Signal} + */ + function numPhysicsBodiesChanged(): Signal; + /** + * Triggered when the value of the avatarCount property changes. + * @returns {Signal} + */ + function avatarCountChanged(): Signal; + /** + * Triggered when the value of the updatedAvatarCount property changes. + * @returns {Signal} + */ + function updatedAvatarCountChanged(): Signal; + /** + * Triggered when the value of the notUpdatedAvatarCount property changes. + * @returns {Signal} + */ + function notUpdatedAvatarCountChanged(): Signal; + /** + * Triggered when the value of the packetInCount property changes. + * @returns {Signal} + */ + function packetInCountChanged(): Signal; + /** + * Triggered when the value of the packetOutCount property changes. + * @returns {Signal} + */ + function packetOutCountChanged(): Signal; + /** + * Triggered when the value of the mbpsIn property changes. + * @returns {Signal} + */ + function mbpsInChanged(): Signal; + /** + * Triggered when the value of the mbpsOut property changes. + * @returns {Signal} + */ + function mbpsOutChanged(): Signal; + /** + * Triggered when the value of the assetMbpsIn property changes. + * @returns {Signal} + */ + function assetMbpsInChanged(): Signal; + /** + * Triggered when the value of the assetMbpsOut property changes. + * @returns {Signal} + */ + function assetMbpsOutChanged(): Signal; + /** + * Triggered when the value of the audioPing property changes. + * @returns {Signal} + */ + function audioPingChanged(): Signal; + /** + * Triggered when the value of the avatarPing property changes. + * @returns {Signal} + */ + function avatarPingChanged(): Signal; + /** + * Triggered when the value of the entitiesPing property changes. + * @returns {Signal} + */ + function entitiesPingChanged(): Signal; + /** + * Triggered when the value of the assetPing property changes. + * @returns {Signal} + */ + function assetPingChanged(): Signal; + /** + * Triggered when the value of the messagePing property changes. + * @returns {Signal} + */ + function messagePingChanged(): Signal; + /** + * Triggered when the value of the position property changes. + * @returns {Signal} + */ + function positionChanged(): Signal; + /** + * Triggered when the value of the speed property changes. + * @returns {Signal} + */ + function speedChanged(): Signal; + /** + * Triggered when the value of the yaw property changes. + * @returns {Signal} + */ + function yawChanged(): Signal; + /** + * Triggered when the value of the avatarMixerInKbps property changes. + * @returns {Signal} + */ + function avatarMixerInKbpsChanged(): Signal; + /** + * Triggered when the value of the avatarMixerInPps property changes. + * @returns {Signal} + */ + function avatarMixerInPpsChanged(): Signal; + /** + * Triggered when the value of the avatarMixerOutKbps property changes. + * @returns {Signal} + */ + function avatarMixerOutKbpsChanged(): Signal; + /** + * Triggered when the value of the avatarMixerOutPps property changes. + * @returns {Signal} + */ + function avatarMixerOutPpsChanged(): Signal; + /** + * Triggered when the value of the myAvatarSendRate property changes. + * @returns {Signal} + */ + function myAvatarSendRateChanged(): Signal; + /** + * Triggered when the value of the audioMixerInKbps property changes. + * @returns {Signal} + */ + function audioMixerInKbpsChanged(): Signal; + /** + * Triggered when the value of the audioMixerInPps property changes. + * @returns {Signal} + */ + function audioMixerInPpsChanged(): Signal; + /** + * Triggered when the value of the audioMixerOutKbps property changes. + * @returns {Signal} + */ + function audioMixerOutKbpsChanged(): Signal; + /** + * Triggered when the value of the audioMixerOutPps property changes. + * @returns {Signal} + */ + function audioMixerOutPpsChanged(): Signal; + /** + * Triggered when the value of the audioMixerKbps property changes. + * @returns {Signal} + */ + function audioMixerKbpsChanged(): Signal; + /** + * Triggered when the value of the audioMixerPps property changes. + * @returns {Signal} + */ + function audioMixerPpsChanged(): Signal; + /** + * Triggered when the value of the audioOutboundPPS property changes. + * @returns {Signal} + */ + function audioOutboundPPSChanged(): Signal; + /** + * Triggered when the value of the audioSilentOutboundPPS property changes. + * @returns {Signal} + */ + function audioSilentOutboundPPSChanged(): Signal; + /** + * Triggered when the value of the audioAudioInboundPPS property changes. + * @returns {Signal} + */ + function audioAudioInboundPPSChanged(): Signal; + /** + * Triggered when the value of the audioSilentInboundPPS property changes. + * @returns {Signal} + */ + function audioSilentInboundPPSChanged(): Signal; + /** + * Triggered when the value of the audioPacketLoss property changes. + * @returns {Signal} + */ + function audioPacketLossChanged(): Signal; + /** + * Triggered when the value of the audioCodec property changes. + * @returns {Signal} + */ + function audioCodecChanged(): Signal; + /** + * Triggered when the value of the audioNoiseGate property changes. + * @returns {Signal} + */ + function audioNoiseGateChanged(): Signal; + /** + * Triggered when the value of the entityPacketsInKbps property changes. + * @returns {Signal} + */ + function entityPacketsInKbpsChanged(): Signal; + /** + * Triggered when the value of the downloads property changes. + * @returns {Signal} + */ + function downloadsChanged(): Signal; + /** + * Triggered when the value of the downloadLimit property changes. + * @returns {Signal} + */ + function downloadLimitChanged(): Signal; + /** + * Triggered when the value of the downloadsPending property changes. + * @returns {Signal} + */ + function downloadsPendingChanged(): Signal; + /** + * Triggered when the value of the downloadUrls property changes. + * @returns {Signal} + */ + function downloadUrlsChanged(): Signal; + /** + * Triggered when the value of the processing property changes. + * @returns {Signal} + */ + function processingChanged(): Signal; + /** + * Triggered when the value of the processingPending property changes. + * @returns {Signal} + */ + function processingPendingChanged(): Signal; + /** + * Triggered when the value of the triangles property changes. + * @returns {Signal} + */ + function trianglesChanged(): Signal; + /** + * Triggered when the value of the drawcalls property changes. + * This + * @returns {Signal} + */ + function drawcallsChanged(): Signal; + /** + * Triggered when the value of the materialSwitches property changes. + * @returns {Signal} + */ + function materialSwitchesChanged(): Signal; + /** + * Triggered when the value of the itemConsidered property changes. + * @returns {Signal} + */ + function itemConsideredChanged(): Signal; + /** + * Triggered when the value of the itemOutOfView property changes. + * @returns {Signal} + */ + function itemOutOfViewChanged(): Signal; + /** + * Triggered when the value of the itemTooSmall property changes. + * @returns {Signal} + */ + function itemTooSmallChanged(): Signal; + /** + * Triggered when the value of the itemRendered property changes. + * @returns {Signal} + */ + function itemRenderedChanged(): Signal; + /** + * Triggered when the value of the shadowConsidered property changes. + * @returns {Signal} + */ + function shadowConsideredChanged(): Signal; + /** + * Triggered when the value of the shadowOutOfView property changes. + * @returns {Signal} + */ + function shadowOutOfViewChanged(): Signal; + /** + * Triggered when the value of the shadowTooSmall property changes. + * @returns {Signal} + */ + function shadowTooSmallChanged(): Signal; + /** + * Triggered when the value of the shadowRendered property changes. + * @returns {Signal} + */ + function shadowRenderedChanged(): Signal; + /** + * Triggered when the value of the sendingMode property changes. + * @returns {Signal} + */ + function sendingModeChanged(): Signal; + /** + * Triggered when the value of the packetStats property changes. + * @returns {Signal} + */ + function packetStatsChanged(): Signal; + /** + * Triggered when the value of the lodStatus property changes. + * @returns {Signal} + */ + function lodStatusChanged(): Signal; + /** + * Triggered when the value of the serverElements property changes. + * @returns {Signal} + */ + function serverElementsChanged(): Signal; + /** + * Triggered when the value of the serverInternal property changes. + * @returns {Signal} + */ + function serverInternalChanged(): Signal; + /** + * Triggered when the value of the serverLeaves property changes. + * @returns {Signal} + */ + function serverLeavesChanged(): Signal; + /** + * Triggered when the value of the localElements property changes. + * @returns {Signal} + */ + function localElementsChanged(): Signal; + /** + * Triggered when the value of the localInternal property changes. + * @returns {Signal} + */ + function localInternalChanged(): Signal; + /** + * Triggered when the value of the localLeaves property changes. + * @returns {Signal} + */ + function localLeavesChanged(): Signal; + /** + * Triggered when the value of the timingStats property changes. + * @returns {Signal} + */ + function timingStatsChanged(): Signal; + /** + * Triggered when the value of the gameUpdateStats property changes. + * @returns {Signal} + */ + function gameUpdateStatsChanged(): Signal; + /** + * Triggered when the value of the glContextSwapchainMemory property changes. + * @returns {Signal} + */ + function glContextSwapchainMemoryChanged(): Signal; + /** + * Triggered when the value of the qmlTextureMemory property changes. + * @returns {Signal} + */ + function qmlTextureMemoryChanged(): Signal; + /** + * Triggered when the value of the texturePendingTransfers property changes. + * @returns {Signal} + */ + function texturePendingTransfersChanged(): Signal; + /** + * Triggered when the value of the gpuBuffers property changes. + * @returns {Signal} + */ + function gpuBuffersChanged(): Signal; + /** + * Triggered when the value of the gpuBufferMemory property changes. + * @returns {Signal} + */ + function gpuBufferMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextures property changes. + * @returns {Signal} + */ + function gpuTexturesChanged(): Signal; + /** + * Triggered when the value of the gpuTextureMemory property changes. + * @returns {Signal} + */ + function gpuTextureMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureResidentMemory property changes. + * @returns {Signal} + */ + function gpuTextureResidentMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureFramebufferMemory property changes. + * @returns {Signal} + */ + function gpuTextureFramebufferMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureResourceMemory property changes. + * @returns {Signal} + */ + function gpuTextureResourceMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureResourceIdealMemory property changes. + * @returns {Signal} + */ + function gpuTextureResourceIdealMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureResourcePopulatedMemory property changes. + * @returns {Signal} + */ + function gpuTextureResourcePopulatedMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureExternalMemory property changes. + * @returns {Signal} + */ + function gpuTextureExternalMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureMemoryPressureState property changes. + * @returns {Signal} + */ + function gpuTextureMemoryPressureStateChanged(): Signal; + /** + * Triggered when the value of the gpuFreeMemory property changes. + * @returns {Signal} + */ + function gpuFreeMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuFrameTime property changes. + * @returns {Signal} + */ + function gpuFrameTimeChanged(): Signal; + /** + * Triggered when the value of the gpuFrameTime property changes. + * @returns {Signal} + */ + function gpuFrameTimeChanged(): Signal; + /** + * Triggered when the value of the gpuFrameTime property changes. + * @returns {Signal} + */ + function gpuFrameTimeChanged(): Signal; + /** + * Triggered when the value of the batchFrameTime property changes. + * @returns {Signal} + */ + function batchFrameTimeChanged(): Signal; + /** + * Triggered when the value of the engineFrameTime property changes. + * @returns {Signal} + */ + function engineFrameTimeChanged(): Signal; + /** + * Triggered when the value of the avatarSimulationTime property changes. + * @returns {Signal} + */ + function avatarSimulationTimeChanged(): Signal; + /** + * Triggered when the value of the rectifiedTextureCount property changes. + * @returns {Signal} + */ + function rectifiedTextureCountChanged(): Signal; + /** + * Triggered when the value of the decimatedTextureCount property changes. + * @returns {Signal} + */ + function decimatedTextureCountChanged(): Signal; + /** + * Triggered when the parent item changes. + * @param parent {object} + * @returns {Signal} + */ + function parentChanged(parent: object): Signal; + /** + * Triggered when the value of the x property changes. + * @returns {Signal} + */ + function xChanged(): Signal; + /** + * Triggered when the value of the y property changes. + * @returns {Signal} + */ + function yChanged(): Signal; + /** + * Triggered when the value of the z property changes. + * @returns {Signal} + */ + function zChanged(): Signal; + /** + * Triggered when the value of the width property changes. + * @returns {Signal} + */ + function widthChanged(): Signal; + /** + * Triggered when the value of the height property changes. + * @returns {Signal} + */ + function heightChanged(): Signal; + /** + * Triggered when the value of the opacity property changes. + * @returns {Signal} + */ + function opacityChanged(): Signal; + /** + * Triggered when the value of the enabled property changes. + * @returns {Signal} + */ + function enabledChanged(): Signal; + /** + * Triggered when the value of the visibleChanged property changes. + * @returns {Signal} + */ + function visibleChanged(): Signal; + /** + * Triggered when the list of visible children changes. + * @returns {Signal} + */ + function visibleChildrenChanged(): Signal; + /** + * Triggered when the value of the state property changes. + * @returns {Signal} + */ + function stateChanged(): Signal; + /** + * Triggered when the position and size of the rectangle containing the children changes. + * @param childrenRect {Rect} + * @returns {Signal} + */ + function childrenRectChanged(childrenRect: Rect): Signal; + /** + * Triggered when the value of the baselineOffset property changes. + * @param baselineOffset {number} + * @returns {Signal} + */ + function baselineOffsetChanged(baselineOffset: number): Signal; + /** + * Triggered when the value of the clip property changes. + * @param clip {boolean} + * @returns {Signal} + */ + function clipChanged(clip: boolean): Signal; + /** + * Triggered when the value of the focus property changes. + * @param focus {boolean} + * @returns {Signal} + */ + function focusChanged(focus: boolean): Signal; + /** + * Triggered when the value of the activeFocus property changes. + * @param activeFocus {boolean} + * @returns {Signal} + */ + function activeFocusChanged(activeFocus: boolean): Signal; + /** + * Triggered when the value of the activeFocusOnTab property changes. + * @param activeFocusOnTab {boolean} + * @returns {Signal} + */ + function activeFocusOnTabChanged(activeFocusOnTab: boolean): Signal; + /** + * Triggered when the value of the rotation property changes. + * @returns {Signal} + */ + function rotationChanged(): Signal; + /** + * Triggered when the value of the scaleChanged property changes. + * @returns {Signal} + */ + function scaleChanged(): Signal; + /** + * Triggered when the value of the transformOrigin property changes. + * @param transformOrigin {number} + * @returns {Signal} + */ + function transformOriginChanged(transformOrigin: number): Signal; + /** + * Triggered when the value of the smooth property changes. + * @param smooth {boolean} + * @returns {Signal} + */ + function smoothChanged(smooth: boolean): Signal; + /** + * Triggered when the value of the antialiasing property changes. + * @param antialiasing {boolean} + * @returns {Signal} + */ + function antialiasingChanged(antialiasing: boolean): Signal; + /** + * Triggered when the value of the implicitWidth property changes. + * @returns {Signal} + */ + function implicitWidthChanged(): Signal; + /** + * Triggered when the value of the implicitHeight property changes. + * @returns {Signal} + */ + function implicitHeightChanged(): Signal; + /** + * @param window {object} + * @returns {Signal} + */ + function windowChanged(window: object): Signal; + /** + * @param callback {object} + * @param targetSize {Size} [targetSize=0,0] + * @returns {boolean} + */ + function grabToImage(callback: object, targetSize: Size): boolean; + /** + * @param point {Vec2} + * @returns {boolean} + */ + function contains(point: Vec2): boolean; + /** + * @param item {object} + */ + function mapFromItem(item: object): void; + /** + * @param item {object} + */ + function mapToItem(item: object): void; + /** + * @param global {object} + */ + function mapFromGlobal(global: object): void; + /** + * @param global {object} + */ + function mapToGlobal(global: object): void; + /** + * @param reason {number} [reason=7] + */ + function forceActiveFocus(reason: number): void; + /** + * @param forward {boolean} [forward=true] + * @returns {object} + */ + function nextItemInFocusChain(forward: boolean): object; + /** + * @param x {number} + * @param y {number} + * @returns {object} + */ + function childAt(x: number, y: number): object; + function update(): void; + /** + * Triggered when the value of the stylusPicksCount property changes. + * @returns {Signal} + */ + function stylusPicksCountChanged(): Signal; + /** + * Triggered when the value of the rayPicksCount property changes. + * @returns {Signal} + */ + function rayPicksCountChanged(): Signal; + /** + * Triggered when the value of the parabolaPicksCount property changes. + * @returns {Signal} + */ + function parabolaPicksCountChanged(): Signal; + /** + * Triggered when the value of the collisionPicksCount property changes. + * @returns {Signal} + */ + function collisionPicksCountChanged(): Signal; + /** + * Triggered when the value of the stylusPicksUpdated property changes. + * @returns {Signal} + */ + function stylusPicksUpdatedChanged(): Signal; + /** + * Triggered when the value of the rayPicksUpdated property changes. + * @returns {Signal} + */ + function rayPicksUpdatedChanged(): Signal; + /** + * Triggered when the value of the parabolaPicksUpdated property changes. + * @returns {Signal} + */ + function parabolaPicksUpdatedChanged(): Signal; + /** + * Triggered when the value of the collisionPicksUpdated property changes. + * @returns {Signal} + */ + function collisionPicksUpdatedChanged(): Signal; + let expanded: boolean; + /** + * Read-only. + */ + let timingExpanded: boolean; + /** + * Read-only. + */ + let monospaceFont: string; + /** + * Read-only. + */ + let serverCount: number; + /** + * How often the app is creating new gpu::Frames. Read-only. + */ + let renderrate: number; + /** + * How often the display plugin is presenting to the device. Read-only. + */ + let presentrate: number; + /** + * How often the display device is reprojecting old frames. Read-only. + */ + let stutterrate: number; + /** + * Read-only. + */ + let appdropped: number; + /** + * Read-only. + */ + let longsubmits: number; + /** + * Read-only. + */ + let longrenders: number; + /** + * Read-only. + */ + let longframes: number; + /** + * Read-only. + */ + let presentnewrate: number; + /** + * Read-only. + */ + let presentdroprate: number; + /** + * Read-only. + */ + let gameLoopRate: number; + /** + * Read-only. + */ + let avatarCount: number; + /** + * Read-only. + */ + let physicsObjectCount: number; + /** + * Read-only. + */ + let updatedAvatarCount: number; + /** + * Read-only. + */ + let notUpdatedAvatarCount: number; + /** + * Read-only. + */ + let packetInCount: number; + /** + * Read-only. + */ + let packetOutCount: number; + /** + * Read-only. + */ + let mbpsIn: number; + /** + * Read-only. + */ + let mbpsOut: number; + /** + * Read-only. + */ + let assetMbpsIn: number; + /** + * Read-only. + */ + let assetMbpsOut: number; + /** + * Read-only. + */ + let audioPing: number; + /** + * Read-only. + */ + let avatarPing: number; + /** + * Read-only. + */ + let entitiesPing: number; + /** + * Read-only. + */ + let assetPing: number; + /** + * Read-only. + */ + let messagePing: number; + /** + * Read-only. + */ + let position: Vec3; + /** + * Read-only. + */ + let speed: number; + /** + * Read-only. + */ + let yaw: number; + /** + * Read-only. + */ + let avatarMixerInKbps: number; + /** + * Read-only. + */ + let avatarMixerInPps: number; + /** + * Read-only. + */ + let avatarMixerOutKbps: number; + /** + * Read-only. + */ + let avatarMixerOutPps: number; + /** + * Read-only. + */ + let myAvatarSendRate: number; + /** + * Read-only. + */ + let audioMixerInKbps: number; + /** + * Read-only. + */ + let audioMixerInPps: number; + /** + * Read-only. + */ + let audioMixerOutKbps: number; + /** + * Read-only. + */ + let audioMixerOutPps: number; + /** + * Read-only. + */ + let audioMixerKbps: number; + /** + * Read-only. + */ + let audioMixerPps: number; + /** + * Read-only. + */ + let audioOutboundPPS: number; + /** + * Read-only. + */ + let audioSilentOutboundPPS: number; + /** + * Read-only. + */ + let audioAudioInboundPPS: number; + /** + * Read-only. + */ + let audioSilentInboundPPS: number; + /** + * Read-only. + */ + let audioPacketLoss: number; + /** + * Read-only. + */ + let audioCodec: string; + /** + * Read-only. + */ + let audioNoiseGate: string; + /** + * Read-only. + */ + let entityPacketsInKbps: number; + /** + * Read-only. + */ + let downloads: number; + /** + * Read-only. + */ + let downloadLimit: number; + /** + * Read-only. + */ + let downloadsPending: number; + /** + * Read-only. + */ + let downloadUrls: Array.; + /** + * Read-only. + */ + let processing: number; + /** + * Read-only. + */ + let processingPending: number; + /** + * Read-only. + */ + let triangles: number; + /** + * Read-only. + */ + let materialSwitches: number; + /** + * Read-only. + */ + let itemConsidered: number; + /** + * Read-only. + */ + let itemOutOfView: number; + /** + * Read-only. + */ + let itemTooSmall: number; + /** + * Read-only. + */ + let itemRendered: number; + /** + * Read-only. + */ + let shadowConsidered: number; + /** + * Read-only. + */ + let shadowOutOfView: number; + /** + * Read-only. + */ + let shadowTooSmall: number; + /** + * Read-only. + */ + let shadowRendered: number; + /** + * Read-only. + */ + let sendingMode: string; + /** + * Read-only. + */ + let packetStats: string; + /** + * Read-only. + */ + let lodStatus: string; + /** + * Read-only. + */ + let timingStats: string; + /** + * Read-only. + */ + let gameUpdateStats: string; + /** + * Read-only. + */ + let serverElements: number; + /** + * Read-only. + */ + let serverInternal: number; + /** + * Read-only. + */ + let serverLeaves: number; + /** + * Read-only. + */ + let localElements: number; + /** + * Read-only. + */ + let localInternal: number; + /** + * Read-only. + */ + let localLeaves: number; + /** + * Read-only. + */ + let rectifiedTextureCount: number; + /** + * Read-only. + */ + let decimatedTextureCount: number; + /** + * Read-only. + */ + let gpuBuffers: number; + /** + * Read-only. + */ + let gpuBufferMemory: number; + /** + * Read-only. + */ + let gpuTextures: number; + /** + * Read-only. + */ + let glContextSwapchainMemory: number; + /** + * Read-only. + */ + let qmlTextureMemory: number; + /** + * Read-only. + */ + let texturePendingTransfers: number; + /** + * Read-only. + */ + let gpuTextureMemory: number; + /** + * Read-only. + */ + let gpuTextureResidentMemory: number; + /** + * Read-only. + */ + let gpuTextureFramebufferMemory: number; + /** + * Read-only. + */ + let gpuTextureResourceMemory: number; + /** + * Read-only. + */ + let gpuTextureResourceIdealMemory: number; + /** + * Read-only. + */ + let gpuTextureResourcePopulatedMemory: number; + /** + * Read-only. + */ + let gpuTextureExternalMemory: number; + /** + * Read-only. + */ + let gpuTextureMemoryPressureState: string; + /** + * Read-only. + */ + let gpuFreeMemory: number; + /** + * Read-only. + */ + let gpuFrameTime: number; + /** + * Read-only. + */ + let batchFrameTime: number; + /** + * Read-only. + */ + let engineFrameTime: number; + /** + * Read-only. + */ + let avatarSimulationTime: number; + let x: number; + let y: number; + let z: number; + let width: number; + let height: number; + let opacity: number; + let enabled: boolean; + let visible: boolean; + let state: string; + /** + * Read-only. + */ + let anchors: object; + let baselineOffset: number; + let clip: boolean; + let focus: boolean; + /** + * Read-only. + */ + let activeFocus: boolean; + let activeFocusOnTab: boolean; + let rotation: number; + let scale: number; + let transformOrigin: number; + let smooth: boolean; + let antialiasing: boolean; + let implicitWidth: number; + let implicitHeight: number; + /** + * Read-only. + */ + let layer: object; + /** + * Read-only. + */ + let stylusPicksCount: number; + /** + * Read-only. + */ + let rayPicksCount: number; + /** + * Read-only. + */ + let parabolaPicksCount: number; + /** + * Read-only. + */ + let collisionPicksCount: number; + /** + * Read-only. + */ + let stylusPicksUpdated: Vec4; + /** + * Read-only. + */ + let rayPicksUpdated: Vec4; + /** + * Read-only. + */ + let parabolaPicksUpdated: Vec4; + /** + * Read-only. + */ + let collisionPicksUpdated: Vec4; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Overlays API provides facilities to create and interact with overlays. Overlays are 2D and 3D objects visible only to + * yourself and that aren't persisted to the domain. They are used for UI. + */ +declare namespace Overlays { + interface Circle3DProperties { + /** + * Has the value "circle3d". Read-only. + */ + type: string; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + * Not used. + */ + dimensions: Vec2; + /** + * The counter-clockwise angle from the overlay's x-axis that drawing starts at, in degrees. + */ + startAt: number; + /** + * The counter-clockwise angle from the overlay's x-axis that drawing ends at, in degrees. + */ + endAt: number; + /** + * The outer radius of the overlay, in meters. Synonym: radius. + */ + outerRadius: number; + /** + * The inner radius of the overlay, in meters. + */ + innerRadius: number; + /** + * The color of the overlay. Setting this value also sets the values of + * innerStartColor, innerEndColor, outerStartColor, and outerEndColor. + */ + color: Color; + /** + * Sets the values of innerStartColor and outerStartColor. + * Write-only. + */ + startColor: Color; + /** + * Sets the values of innerEndColor and outerEndColor. + * Write-only. + */ + endColor: Color; + /** + * Sets the values of innerStartColor and innerEndColor. + * Write-only. + */ + innerColor: Color; + /** + * Sets the values of outerStartColor and outerEndColor. + * Write-only. + */ + outerColor: Color; + /** + * The color at the inner start point of the overlay. + */ + innerStartcolor: Color; + /** + * The color at the inner end point of the overlay. + */ + innerEndColor: Color; + /** + * The color at the outer start point of the overlay. + */ + outerStartColor: Color; + /** + * The color at the outer end point of the overlay. + */ + outerEndColor: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. Setting this value also sets + * the values of innerStartAlpha, innerEndAlpha, outerStartAlpha, and outerEndAlpha. Synonym: Alpha; write-only. + */ + alpha: number; + /** + * Sets the values of innerStartAlpha and outerStartAlpha. + * Write-only. + */ + startAlpha: number; + /** + * Sets the values of innerEndAlpha and outerEndAlpha. + * Write-only. + */ + endAlpha: number; + /** + * Sets the values of innerStartAlpha and innerEndAlpha. + * Write-only. + */ + innerAlpha: number; + /** + * Sets the values of outerStartAlpha and outerEndAlpha. + * Write-only. + */ + outerAlpha: number; + /** + * The alpha at the inner start point of the overlay. + */ + innerStartAlpha: number; + /** + * The alpha at the inner end point of the overlay. + */ + innerEndAlpha: number; + /** + * The alpha at the outer start point of the overlay. + */ + outerStartAlpha: number; + /** + * The alpha at the outer end point of the overlay. + */ + outerEndAlpha: number; + /** + * If true, tick marks are drawn. + */ + hasTickMarks: boolean; + /** + * The angle between major tick marks, in degrees. + */ + majorTickMarksAngle: number; + /** + * The angle between minor tick marks, in degrees. + */ + minorTickMarksAngle: number; + /** + * The length of the major tick marks, in meters. A positive value draws tick marks + * outwards from the inner radius; a negative value draws tick marks inwards from the outer radius. + */ + majorTickMarksLength: number; + /** + * The length of the minor tick marks, in meters. A positive value draws tick marks + * outwards from the inner radius; a negative value draws tick marks inwards from the outer radius. + */ + minorTickMarksLength: number; + /** + * The color of the major tick marks. + */ + majorTickMarksColor: Color; + /** + * The color of the minor tick marks. + */ + minorTickMarksColor: Color; + } + + interface CubeProperties { + /** + * Has the value "cube". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec3; + } + + interface GridProperties { + /** + * Has the value "grid". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec2; + /** + * If true, the grid is always visible even as the camera moves to another + * position. + */ + followCamera: boolean; + /** + * Integer number of minorGridEvery intervals at which to draw a thick grid + * line. Minimum value = 1. + */ + majorGridEvery: number; + /** + * Real number of meters at which to draw thin grid lines. Minimum value = + * 0.001. + */ + minorGridEvery: number; + } + + interface Image3DProperties { + /** + * Has the value "image3d". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec2; + /** + * If true, the overlay is rotated to face the user's camera about an axis + * parallel to the user's avatar's "up" direction. + */ + isFacingAvatar: boolean; + /** + * The URL of the PNG or JPG image to display. + */ + url: string; + /** + * The portion of the image to display. Defaults to the full image. + */ + subImage: Rect; + /** + * If true, the overlay is displayed at full brightness, otherwise it is rendered + * with scene lighting. + */ + emissive: boolean; + } + + interface ImageProperties { + /** + * The position and size of the image display area, in pixels. Write-only. + */ + bounds: Rect; + /** + * Integer left, x-coordinate value of the image display area = bounds.x. + * Write-only. + */ + x: number; + /** + * Integer top, y-coordinate value of the image display area = bounds.y. + * Write-only. + */ + y: number; + /** + * Integer width of the image display area = bounds.width. Write-only. + */ + width: number; + /** + * Integer height of the image display area = bounds.height. Write-only. + */ + height: number; + /** + * The URL of the image file to display. The image is scaled to fit to the bounds. + * Write-only. + */ + imageURL: string; + /** + * Integer coordinates of the top left pixel to start using image content from. + * Write-only. + */ + subImage: Vec2; + /** + * The color to apply over the top of the image to colorize it. Write-only. + */ + color: Color; + /** + * The opacity of the color applied over the top of the image, 0.0 - + * 1.0. Write-only. + */ + alpha: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + * Write-only. + */ + visible: boolean; + } + + interface Line3DProperties { + /** + * Has the value "line3d". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The avatar, entity, or overlay that the end point of the line is parented to. + */ + endParentID: Uuid; + /** + * Integer value specifying the skeleton joint that the end point of the line is + * attached to if parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + endParentJointIndex: number; + /** + * The start point of the line. Synonyms: startPoint, p1, and + * position. + */ + start: Vec3; + /** + * The end point of the line. Synonyms: endPoint and p2. + */ + end: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as start. Synonym: localPosition. + */ + localStart: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * endParentID set, otherwise the same value as end. + */ + localEnd: Vec3; + /** + * The length of the line, in meters. This can be set after creating a line with start and end + * points. + */ + length: number; + /** + * If glow > 0, the line is rendered with a glow. + */ + glow: number; + /** + * If glow > 0, this is the width of the glow, in meters. + */ + lineWidth: number; + } + + interface ModelProperties { + /** + * Has the value "model". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * If true, the mesh parts of the model are LOD culled as a group. + * If false, separate mesh parts will be LOD culled individually. + */ + isGroupCulled: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The URL of the FBX or OBJ model used for the overlay. + */ + url: string; + /** + * The priority for loading and displaying the overlay. Overlays with higher values load + * first. + */ + loadPriority: number; + /** + * The dimensions of the overlay. Synonym: size. + */ + dimensions: Vec3; + /** + * The scale factor applied to the model's dimensions. + */ + scale: Vec3; + /** + * Maps the named textures in the model to the JPG or PNG images in the urls. + */ + textures: object.; + /** + * The names of the joints - if any - in the model. Read-only. + */ + jointNames: Array.; + /** + * The relative rotations of the model's joints. Not copied if overlay is + * cloned. + */ + jointRotations: Array.; + /** + * The relative translations of the model's joints. Not copied if overlay is + * cloned. + */ + jointTranslations: Array.; + /** + * The absolute orientations of the model's joints, in world coordinates. + * Read-only. + */ + jointOrientations: Array.; + /** + * The absolute positions of the model's joints, in world coordinates. + * Read-only. + */ + jointPositions: Array.; + /** + * The URL of an FBX file containing an animation to play. + */ + animationSettings.url: string; + /** + * The frame rate (frames/sec) to play the animation at. + */ + animationSettings.fps: number; + /** + * The frame to start playing at. + */ + animationSettings.firstFrame: number; + /** + * The frame to finish playing at. + */ + animationSettings.lastFrame: number; + /** + * The current frame being played. + */ + animationSettings.currentFrame: number; + /** + * Whether or not the animation is playing. + */ + animationSettings.running: boolean; + /** + * Whether or not the animation should repeat in a loop. + */ + animationSettings.loop: boolean; + /** + * Whether or not when the animation finishes, the rotations and + * translations of the last frame played should be maintained. + */ + animationSettings.hold: boolean; + /** + * Whether or not translations contained in the animation should + * be played. + */ + animationSettings.allowTranslation: boolean; + } + + interface OverlayProperties { + } + + interface RayToOverlayIntersectionResult { + /** + * true if the PickRay intersected with a 3D overlay, otherwise + * false. + */ + intersects: boolean; + /** + * The UUID of the overlay that was intersected. + */ + overlayID: Uuid; + /** + * The distance from the PickRay origin to the intersection point. + */ + distance: number; + /** + * The normal of the overlay surface at the intersection point. + */ + surfaceNormal: Vec3; + /** + * The position of the intersection point. + */ + intersection: Vec3; + /** + * Additional intersection details, if available. + */ + extraInfo: object; + } + + /** + * Add an overlay to the scene. + * @param type {Overlays.OverlayType} The type of the overlay to add. + * @param properties {Overlays.OverlayProperties} The properties of the overlay to add. + * @returns {Uuid} + */ + function addOverlay(type: Overlays.OverlayType, properties: Overlays.OverlayProperties): Uuid; + /** + * Create a clone of an existing overlay. + * @param overlayID {Uuid} The ID of the overlay to clone. + * @returns {Uuid} + */ + function cloneOverlay(overlayID: Uuid): Uuid; + /** + * Edit an overlay's properties. + * @param overlayID {Uuid} The ID of the overlay to edit. + * @param properties {Overlays.OverlayProperties} The properties changes to make. + * @returns {boolean} + */ + function editOverlay(overlayID: Uuid, properties: Overlays.OverlayProperties): boolean; + /** + * Edit multiple overlays' properties. + * @param propertiesById {object.} An object with overlay IDs as keys and + * {@link Overlays.OverlayProperties|OverlayProperties} edits to make as values. + * @returns {boolean} + */ + function editOverlays(propertiesById: object.): boolean; + /** + * Delete an overlay. + * @param overlayID {Uuid} The ID of the overlay to delete. + */ + function deleteOverlay(overlayID: Uuid): void; + /** + * Get the type of an overlay. + * @param overlayID {Uuid} The ID of the overlay to get the type of. + * @returns {Overlays.OverlayType} + */ + function getOverlayType(overlayID: Uuid): Overlays.OverlayType; + /** + * Get the overlay script object. In particular, this is useful for accessing the event bridge for a web3d + * overlay. + * @param overlayID {Uuid} The ID of the overlay to get the script object of. + * @returns {object} + */ + function getOverlayObject(overlayID: Uuid): object; + /** + * Get the ID of the 2D overlay at a particular point on the screen or HUD. + * @param point {Vec2} The point to check for an overlay. + * @returns {Uuid} + */ + function getOverlayAtPoint(point: Vec2): Uuid; + /** + * Get the value of a 3D overlay's property. + * @param overlayID {Uuid} The ID of the overlay. Must be for a 3D {@link Overlays.OverlayType|OverlayType}. + * @param property {string} The name of the property value to get. + * @returns {object} + */ + function getProperty(overlayID: Uuid, property: string): object; + /** + * Get the values of an overlay's properties. + * @param overlayID {Uuid} The ID of the overlay. + * @param properties {Array.} An array of names of properties to get the values of. + * @returns {Overlays.OverlayProperties} + */ + function getProperties(overlayID: Uuid, properties: Array.): Overlays.OverlayProperties; + /** + * Get the values of multiple overlays' properties. + * @param propertiesById {object.>} An object with overlay IDs as keys and arrays of the names of + * properties to get for each as values. + * @returns {object.} + */ + function getOverlaysProperties(propertiesById: object.>): object.; + /** + * Find the closest 3D overlay intersected by a PickRay. + * @param pickRay {PickRay} The PickRay to use for finding overlays. + * @param precisionPicking {boolean} [precisionPicking=false] Unused; exists to match Entity API. + * @param overlayIDsToInclude {Array.} [overlayIDsToInclude=[]] If not empty then the search is restricted to these overlays. + * @param overlayIDsToExclude {Array.} [overlayIDsToExclude=[]] Overlays to ignore during the search. + * @param visibleOnly {boolean} [visibleOnly=false] Unused; exists to match Entity API. + * @param collidableOnly {boolean} [collidableOnly=false] Unused; exists to match Entity API. + * @returns {Overlays.RayToOverlayIntersectionResult} + */ + function findRayIntersection(pickRay: PickRay, precisionPicking: boolean, overlayIDsToInclude: Array., overlayIDsToExclude: Array., visibleOnly: boolean, collidableOnly: boolean): Overlays.RayToOverlayIntersectionResult; + /** + * Return a list of 3D overlays with bounding boxes that touch a search sphere. + * @param center {Vec3} The center of the search sphere. + * @param radius {number} The radius of the search sphere. + * @returns {Array.} + */ + function findOverlays(center: Vec3, radius: number): Array.; + /** + * Check whether an overlay's assets have been loaded. For example, for an image overlay the result indicates + * whether its image has been loaded. + * @param overlayID {Uuid} The ID of the overlay to check. + * @returns {boolean} + */ + function isLoaded(overlayID: Uuid): boolean; + /** + * Calculates the size of the given text in the specified overlay if it is a text overlay. + * @param overlayID {Uuid} The ID of the overlay to use for calculation. + * @param text {string} The string to calculate the size of. + * @returns {Size} + */ + function textSize(overlayID: Uuid, text: string): Size; + /** + * Get the width of the window or HUD. + * @returns {number} + */ + function width(): number; + /** + * Get the height of the window or HUD. + * @returns {number} + */ + function height(): number; + /** + * Check if there is an overlay of a given ID. + * @param overlayID {Uuid} The ID to check. + * @returns {boolean} + */ + function isAddedOverlay(overlayID: Uuid): boolean; + /** + * Generate a mouse press event on an overlay. + * @param overlayID {Uuid} The ID of the overlay to generate a mouse press event on. + * @param event {PointerEvent} The mouse press event details. + */ + function sendMousePressOnOverlay(overlayID: Uuid, event: PointerEvent): void; + /** + * Generate a mouse release event on an overlay. + * @param overlayID {Uuid} The ID of the overlay to generate a mouse release event on. + * @param event {PointerEvent} The mouse release event details. + */ + function sendMouseReleaseOnOverlay(overlayID: Uuid, event: PointerEvent): void; + /** + * Generate a mouse move event on an overlay. + * @param overlayID {Uuid} The ID of the overlay to generate a mouse move event on. + * @param event {PointerEvent} The mouse move event details. + */ + function sendMouseMoveOnOverlay(overlayID: Uuid, event: PointerEvent): void; + /** + * Generate a hover enter event on an overlay. + * @param id {Uuid} The ID of the overlay to generate a hover enter event on. + * @param event {PointerEvent} The hover enter event details. + */ + function sendHoverEnterOverlay(id: Uuid, event: PointerEvent): void; + /** + * Generate a hover over event on an overlay. + * @param overlayID {Uuid} The ID of the overlay to generate a hover over event on. + * @param event {PointerEvent} The hover over event details. + */ + function sendHoverOverOverlay(overlayID: Uuid, event: PointerEvent): void; + /** + * Generate a hover leave event on an overlay. + * @param overlayID {Uuid} The ID of the overlay to generate a hover leave event on. + * @param event {PointerEvent} The hover leave event details. + */ + function sendHoverLeaveOverlay(overlayID: Uuid, event: PointerEvent): void; + /** + * Get the ID of the Web3D overlay that has keyboard focus. + * @returns {Uuid} + */ + function getKeyboardFocusOverlay(): Uuid; + /** + * Set the Web3D overlay that has keyboard focus. + * @param overlayID {Uuid} The ID of the {@link Overlays.OverlayType|web3d} overlay to set keyboard focus to. Use + * null or {@link Uuid|Uuid.NULL} to unset keyboard focus from an overlay. + */ + function setKeyboardFocusOverlay(overlayID: Uuid): void; + /** + * Triggered when an overlay is deleted. + * @param overlayID {Uuid} The ID of the overlay that was deleted. + * @returns {Signal} + */ + function overlayDeleted(overlayID: Uuid): Signal; + /** + * Triggered when a mouse press event occurs on an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendMousePressOnOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the mouse press event occurred on. + * @param event {PointerEvent} The mouse press event details. + * @returns {Signal} + */ + function mousePressOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse double press event occurs on an overlay. Only occurs for 3D overlays. + * @param overlayID {Uuid} The ID of the overlay the mouse double press event occurred on. + * @param event {PointerEvent} The mouse double press event details. + * @returns {Signal} + */ + function mouseDoublePressOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse release event occurs on an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendMouseReleaseOnOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the mouse release event occurred on. + * @param event {PointerEvent} The mouse release event details. + * @returns {Signal} + */ + function mouseReleaseOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse move event occurs on an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendMouseMoveOnOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the mouse moved event occurred on. + * @param event {PointerEvent} The mouse move event details. + * @returns {Signal} + */ + function mouseMoveOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse press event occurs on something other than a 3D overlay. + * @returns {Signal} + */ + function mousePressOffOverlay(): Signal; + /** + * Triggered when a mouse double press event occurs on something other than a 3D overlay. + * @returns {Signal} + */ + function mouseDoublePressOffOverlay(): Signal; + /** + * Triggered when a mouse cursor starts hovering over an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendHoverEnterOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the mouse moved event occurred on. + * @param event {PointerEvent} The mouse move event details. + * @returns {Signal} + */ + function hoverEnterOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse cursor continues hovering over an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendHoverOverOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the hover over event occurred on. + * @param event {PointerEvent} The hover over event details. + * @returns {Signal} + */ + function hoverOverOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse cursor finishes hovering over an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendHoverLeaveOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the hover leave event occurred on. + * @param event {PointerEvent} The hover leave event details. + * @returns {Signal} + */ + function hoverLeaveOverlay(overlayID: Uuid, event: PointerEvent): Signal; + interface Rectangle3DProperties { + /** + * Has the value "rectangle3d". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec2; + } + + interface RectangleProperties { + /** + * The position and size of the rectangle, in pixels. Write-only. + */ + bounds: Rect; + /** + * Integer left, x-coordinate value = bounds.x. Write-only. + */ + x: number; + /** + * Integer top, y-coordinate value = bounds.y. Write-only. + */ + y: number; + /** + * Integer width of the rectangle = bounds.width. Write-only. + */ + width: number; + /** + * Integer height of the rectangle = bounds.height. Write-only. + */ + height: number; + /** + * The color of the overlay. Write-only. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. Write-only. + */ + alpha: number; + /** + * Integer width of the border, in pixels. The border is drawn within the rectangle's bounds. + * It is not drawn unless either borderColor or borderAlpha are specified. Write-only. + */ + borderWidth: number; + /** + * Integer corner radius, in pixels. Write-only. + */ + radius: number; + /** + * The color of the border. Write-only. + */ + borderColor: Color; + /** + * The opacity of the border, 0.0 - 1.0. + * Write-only. + */ + borderAlpha: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + * Write-only. + */ + visible: boolean; + } + + interface ShapeProperties { + /** + * Has the value "shape". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec3; + /** + * The geometrical shape of the overlay. + */ + shape: Overlays.Shape; + } + + interface SphereProperties { + /** + * Has the value "sphere". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec3; + } + + interface Text3DProperties { + /** + * Has the value "text3d". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec2; + /** + * If true, the overlay is rotated to face the user's camera about an axis + * parallel to the user's avatar's "up" direction. + */ + isFacingAvatar: boolean; + /** + * The text to display. Text does not automatically wrap; use \n for a line break. + */ + text: string; + /** + * The text alpha value. + */ + textAlpha: number; + /** + * The background color. + */ + backgroundColor: Color; + /** + * The background alpha value. + */ + backgroundAlpha: number; + /** + * The height of a line of text in meters. + */ + lineHeight: number; + /** + * The left margin, in meters. + */ + leftMargin: number; + /** + * The top margin, in meters. + */ + topMargin: number; + /** + * The right margin, in meters. + */ + rightMargin: number; + /** + * The bottom margin, in meters. + */ + bottomMargin: number; + } + + interface TextProperties { + /** + * The position and size of the rectangle, in pixels. Write-only. + */ + bounds: Rect; + /** + * Integer left, x-coordinate value = bounds.x. Write-only. + */ + x: number; + /** + * Integer top, y-coordinate value = bounds.y. Write-only. + */ + y: number; + /** + * Integer width of the rectangle = bounds.width. Write-only. + */ + width: number; + /** + * Integer height of the rectangle = bounds.height. Write-only. + */ + height: number; + /** + * Sets the leftMargin and topMargin values, in pixels. + * Write-only. + */ + margin: number; + /** + * The left margin's size, in pixels. This value is also used for the right margin. + * Write-only. + */ + leftMargin: number; + /** + * The top margin's size, in pixels. This value is also used for the bottom margin. + * Write-only. + */ + topMargin: number; + /** + * The text to display. Text does not automatically wrap; use \n for a line break. Text + * is clipped to the bounds. Write-only. + */ + text: string; + /** + * The size of the text, in pixels. Write-only. + */ + font.size: number; + /** + * The height of a line of text, in pixels. Write-only. + */ + lineHeight: number; + /** + * The color of the text. Synonym: textColor. Write-only. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. Write-only. + */ + alpha: number; + /** + * The color of the background rectangle. Write-only. + */ + backgroundColor: Color; + /** + * The opacity of the background rectangle. Write-only. + */ + backgroundAlpha: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + * Write-only. + */ + visible: boolean; + } + + interface Web3DProperties { + /** + * Has the value "web3d". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * If true, the overlay is rotated to face the user's camera about an axis + * parallel to the user's avatar's "up" direction. + */ + isFacingAvatar: boolean; + /** + * The URL of the Web page to display. + */ + url: string; + /** + * The URL of a JavaScript file to inject into the Web page. + */ + scriptURL: string; + /** + * The dots per inch to display the Web page at, on the overlay. + */ + dpi: number; + /** + * The size of the overlay to display the Web page on, in meters. Synonyms: + * scale, size. + */ + dimensions: Vec2; + /** + * The maximum update rate for the Web overlay content, in frames/second. + */ + maxFPS: number; + /** + * If true, the Web overlay is highlighted when it has + * keyboard focus. + */ + showKeyboardFocusHighlight: boolean; + /** + * The user input mode to use - either "Touch" or "Mouse". + */ + inputMode: string; + } + + /** + * Get or set the Overlays.OverlayType overlay that has keyboard focus. + * If no overlay has keyboard focus, get returns null; set to null or Uuid to clear keyboard focus. + */ + let keyboardFocusOverlay: Uuid; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare class AnimationObject { + /** + * @returns {Array.} + */ + getJointNames(): Array.; + /** + * @returns {Array.} + */ + getFrames(): Array.; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsAssignment Client ScriptsAPI to manage animation cache resources. + */ +declare namespace AnimationCache { + /** + * Returns animation resource for particular animation. + * @param url {string} URL to load. + * @returns {AnimationObject} + */ + function getAnimation(url: string): AnimationObject; + /** + * Get the list of all resource URLs. + * @returns {Array.} + */ + function getResourceList(): Array.; + /** + * @param deltaSize {number} + */ + function updateTotalSize(deltaSize: number): void; + /** + * Prefetches a resource. + * @param url {string} URL of the resource to prefetch. + * @param extra {object} [extra=null] + * @returns {ResourceObject} + */ + function prefetch(url: string, extra: object): ResourceObject; + /** + * @returns {Signal} + */ + function dirty(): Signal; + /** + * Total number of total resources. Read-only. + */ + let numTotal: number; + /** + * Total number of cached resource. Read-only. + */ + let numCached: number; + /** + * Size in bytes of all resources. Read-only. + */ + let sizeTotal: number; + /** + * Size in bytes of all cached resources. Read-only. + */ + let sizeCached: number; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare class AudioStreamStats { +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsAudio stats from the client. + */ +declare namespace AudioStats { + /** + * @param pingMs {number} + * @returns {Signal} + */ + function pingMsChanged(pingMs: number): Signal; + /** + * @param inputReadMsMax {number} + * @returns {Signal} + */ + function inputReadMsMaxChanged(inputReadMsMax: number): Signal; + /** + * @param inputUnplayedMsMax {number} + * @returns {Signal} + */ + function inputUnplayedMsMaxChanged(inputUnplayedMsMax: number): Signal; + /** + * @param outputUnplayedMsMax {number} + * @returns {Signal} + */ + function outputUnplayedMsMaxChanged(outputUnplayedMsMax: number): Signal; + /** + * @param sentTimegapMsMax {number} + * @returns {Signal} + */ + function sentTimegapMsMaxChanged(sentTimegapMsMax: number): Signal; + /** + * @param sentTimegapMsAvg {number} + * @returns {Signal} + */ + function sentTimegapMsAvgChanged(sentTimegapMsAvg: number): Signal; + /** + * @param sentTimegapMsMaxWindow {number} + * @returns {Signal} + */ + function sentTimegapMsMaxWindowChanged(sentTimegapMsMaxWindow: number): Signal; + /** + * @param sentTimegapMsAvgWindow {number} + * @returns {Signal} + */ + function sentTimegapMsAvgWindowChanged(sentTimegapMsAvgWindow: number): Signal; + /** + * @returns {Signal} + */ + function mixerStreamChanged(): Signal; + /** + * @returns {Signal} + */ + function clientStreamChanged(): Signal; + /** + * @returns {Signal} + */ + function injectorStreamsChanged(): Signal; + /** + * Read-only. + */ + let pingMs: number; + /** + * Read-only. + */ + let inputReadMsMax: number; + /** + * Read-only. + */ + let inputUnplayedMsMax: number; + /** + * Read-only. + */ + let outputUnplayedMsMax: number; + /** + * Read-only. + */ + let sentTimegapMsMax: number; + /** + * Read-only. + */ + let sentTimegapMsAvg: number; + /** + * Read-only. + */ + let sentTimegapMsMaxWindow: number; + /** + * Read-only. + */ + let sentTimegapMsAvgWindow: number; + /** + * Read-only. + */ + let clientStream: AudioStats.AudioStreamStats; + /** + * Read-only. + */ + let mixerStream: AudioStats.AudioStreamStats; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsAudio effect options used by the Audio API. + * Create using new AudioEffectOptions(reverbOptions). + * @param reverbOptions {AudioEffectOptions.ReverbOptions} [reverbOptions=null] Reverberation options. + */ +declare class AudioEffectOptions { + interface ReverbOptions { + /** + * The corner frequency (Hz) of the low-pass filter at reverb input. + */ + bandwidth: number; + /** + * The delay (milliseconds) between dry signal and the onset of early reflections. + */ + preDelay: number; + /** + * The delay (milliseconds) between early reflections and the onset of reverb tail. + */ + lateDelay: number; + /** + * The time (seconds) for the reverb tail to decay by 60dB, also known as RT60. + */ + reverbTime: number; + /** + * Adjusts the buildup of echo density in the early reflections, normally 100%. + */ + earlyDiffusion: number; + /** + * Adjusts the buildup of echo density in the reverb tail, normally 100%. + */ + lateDiffusion: number; + /** + * The apparent room size, from small (0%) to large (100%). + */ + roomSize: number; + /** + * Adjusts the echo density in the reverb tail, normally 100%. + */ + density: number; + /** + * Adjusts the bass-frequency reverb time, as multiple of reverbTime. + */ + bassMult: number; + /** + * The crossover frequency (Hz) for the onset of bassMult. + */ + bassFreq: number; + /** + * Reduces the high-frequency reverb time, as attenuation (dB). + */ + highGain: number; + /** + * The crossover frequency (Hz) for the onset of highGain. + */ + highFreq: number; + /** + * The rate of modulation (Hz) of the LFO-modulated delay lines. + */ + modRate: number; + /** + * The depth of modulation (percent) of the LFO-modulated delay lines. + */ + modDepth: number; + /** + * Adjusts the relative level (dB) of the early reflections. + */ + earlyGain: number; + /** + * Adjusts the relative level (dB) of the reverb tail. + */ + lateGain: number; + /** + * The apparent distance of the source (percent) in the early reflections. + */ + earlyMixLeft: number; + /** + * The apparent distance of the source (percent) in the early reflections. + */ + earlyMixRight: number; + /** + * The apparent distance of the source (percent) in the reverb tail. + */ + lateMixLeft: number; + /** + * The apparent distance of the source (percent) in the reverb tail. + */ + lateMixRight: number; + /** + * Adjusts the wet/dry ratio, from completely dry (0%) to completely wet (100%). + */ + wetDryMix: number; + } + +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsAn audio resource, created by SoundCache.getSound, to be played back using Audio.playSound. + * Supported formats: WAV: 16-bit uncompressed WAV at any sample rate, with 1 (mono), 2(stereo), or 4 (ambisonic) channels. MP3: Mono or stereo, at any sample rate. RAW: 48khz 16-bit mono or stereo. Filename must include ".stereo" to be interpreted as stereo. + */ +declare class SoundObject { + /** + * Triggered when the sound has been downloaded and is ready to be played. + * @returns {Signal} + */ + ready(): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsAPI to manage sound cache resources. + */ +declare namespace SoundCache { + /** + * Loads the content of an audio file into a SoundObject, ready for playback by Audio.playSound. + * @param url {string} The URL of the audio file to load — Web, ATP, or file. See {@link SoundObject} for supported + * formats. + * @returns {SoundObject} + */ + function getSound(url: string): SoundObject; + /** + * Get the list of all resource URLs. + * @returns {Array.} + */ + function getResourceList(): Array.; + /** + * @param deltaSize {number} + */ + function updateTotalSize(deltaSize: number): void; + /** + * Prefetches a resource. + * @param url {string} URL of the resource to prefetch. + * @param extra {object} [extra=null] + * @returns {ResourceObject} + */ + function prefetch(url: string, extra: object): ResourceObject; + /** + * @returns {Signal} + */ + function dirty(): Signal; + /** + * Total number of total resources. Read-only. + */ + let numTotal: number; + /** + * Total number of cached resource. Read-only. + */ + let numCached: number; + /** + * Size in bytes of all resources. Read-only. + */ + let sizeTotal: number; + /** + * Size in bytes of all cached resources. Read-only. + */ + let sizeCached: number; +} + +/** + * Available in:Assignment Client ScriptsNote: An AvatarList API is also provided for Interface and client entity scripts: it is a + * synonym for the AvatarManager API. + */ +declare namespace AvatarList { + /** + * @returns {Array.} + */ + function getAvatarIdentifiers(): Array.; + /** + * @param position {Vec3} + * @param range {number} + * @returns {Array.} + */ + function getAvatarsInRange(position: Vec3, range: number): Array.; + /** + * @param avatarID {Uuid} + * @returns {AvatarData} + */ + function getAvatar(avatarID: Uuid): AvatarData; + /** + * @param sessionUUID {Uuid} + * @returns {Signal} + */ + function avatarAddedEvent(sessionUUID: Uuid): Signal; + /** + * @param sessionUUID {Uuid} + * @returns {Signal} + */ + function avatarRemovedEvent(sessionUUID: Uuid): Signal; + /** + * @param sessionUUID {Uuid} + * @param oldSessionUUID {Uuid} + * @returns {Signal} + */ + function avatarSessionChangedEvent(sessionUUID: Uuid, oldSessionUUID: Uuid): Signal; + /** + * @param position {string} + * @param range {string} + * @returns {boolean} + */ + function isAvatarInRange(position: string, range: string): boolean; + /** + * @param sessionUUID {Uuid} + * @param oldSessionUUID {Uuid} + */ + function sessionUUIDChanged(sessionUUID: Uuid, oldSessionUUID: Uuid): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processAvatarDataPacket(message, sendingNode): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processAvatarIdentityPacket(message, sendingNode): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processKillAvatar(message, sendingNode): void; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsA Controller mapping object that can contain a set of routes that map: + * Controller.Standard outputs to Controller.Actions actions or script functions. Controller.Hardware outputs to Controller.Standard outputs, Controller.Actions actions, or script functions. Create by one of the following methods: Use Controller.newMapping to create the mapping object, add routes using MappingObject#from or MappingObject#makeAxis, and map the routes to actions or functions using RouteObject methods. Use Controller.parseMapping or Controller.loadMapping to load a Controller.MappingJSON. Enable the mapping using MappingObject#enable or Controller.enableMapping for it to take effect. Mappings and their routes are applied according to the following rules: One read per output: after a controller output has been read, it can't be read again. Exception: You can use RouteObject#peek to read a value without marking that output as having been read. Existing mapping routes take precedence over new mapping routes: within a mapping, if a route is added for a control output that already has a route the new route is ignored. New mappings override previous mappings: each output is processed using the route in the most recently enabled mapping that contains that output. + */ +declare class MappingObject { + /** + * Create a new RouteObject from a controller output, ready to be mapped to a standard control, action, or + * function. This is a QML-specific version of MappingObject#from: use this version in QML files. + * @param source {Controller.Standard} The controller output or function that is the source + * of the route data. If a function, it must return a number or a {@link Pose} value as the route data. + * @returns {RouteObject} + */ + fromQml(source: Controller.Standard): RouteObject; + /** + * Create a new RouteObject from two numeric Controller.Hardware outputs, one applied in the negative + * direction and the other in the positive direction, ready to be mapped to a standard control, action, or function. This is a QML-specific version of MappingObject#makeAxis: use this version in QML files. + * @param source1 {Controller.Hardware} The first, negative-direction controller output. + * @param source2 {Controller.Hardware} The second, positive-direction controller output. + * @returns {RouteObject} + */ + makeAxisQml(source1: Controller.Hardware, source2: Controller.Hardware): RouteObject; + /** + * Create a new RouteObject from a controller output, ready to be mapped to a standard control, action, or + * function. + * @param source {Controller.Standard} The controller output or function that is the source + * of the route data. If a function, it must return a number or a {@link Pose} value as the route data. + * @returns {RouteObject} + */ + from(source: Controller.Standard): RouteObject; + /** + * Create a new RouteObject from two numeric Controller.Hardware outputs, one applied in the negative + * direction and the other in the positive direction, ready to be mapped to a standard control, action, or function. + * @param source1 {Controller.Hardware} The first, negative-direction controller output. + * @param source2 {Controller.Hardware} The second, positive-direction controller output. + * @returns {RouteObject} + */ + makeAxis(source1: Controller.Hardware, source2: Controller.Hardware): RouteObject; + /** + * Enable or disable the mapping. When enabled, the routes in the mapping take effect. + * Synonymous with Controller.enableMapping. + * @param enable {boolean} If true then the mapping is enabled, otherwise it is disabled. + * @returns {MappingObject} + */ + enable(enable: boolean): MappingObject; + /** + * Disable the mapping. When disabled, the routes in the mapping have no effect. + * Synonymous with Controller.disableMapping. + * @returns {MappingObject} + */ + disable(): MappingObject; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsA route in a MappingObject used by the Controller API. + * Create a route using MappingObject methods and apply this object's methods to process it, terminating with RouteObject#to to apply it to a Standard control, action, or script function. Note: Loops are not permitted. Some methods apply to routes with number data, some apply routes with Pose data, and some apply to both route types. + */ +declare class RouteObject { + /** + * Terminate the route with a standard control, an action, or a script function. The output value from the route is + * sent to the specified destination. This is a QML-specific version of MappingObject#to: use this version in QML files. + * @param destination {Controller.Standard} The standard control, action, or JavaScript + * function that the route output is mapped to. For a function, the parameter can be either the name of the function or an in-line function definition. + */ + toQml(destination: Controller.Standard): void; + /** + * Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and + * the input is read only if the condition is true. Thus, if the condition is not met then subsequent routes using the same input are processed. This is a QML-specific version of MappingObject#to: use this version in QML files. + * @param expression {condition}

A condition may be a:

+ *
  • A boolean or numeric {@link Controller.Hardware} property, which is evaluated as a boolean.
  • ! followed by a {@link Controller.Hardware} property, indicating the logical NOT should be used.
  • A script function returning a boolean value. This can be either the name of the function or an in-line definition.

If an array of conditions is provided, their values are ANDed together.

+ * @returns {RouteObject} + */ + whenQml(expression: condition): RouteObject; + /** + * Terminate the route with a standard control, an action, or a script function. The output value from the route is + * sent to the specified destination. + * @param destination {Controller.Standard} The standard control, action, or JavaScript + * function that the route output is mapped to. For a function, the parameter can be either the name of the function or an in-line function definition. + */ + to(destination: Controller.Standard): void; + /** + * Enable and disabling writing debug information for a route to the program log. + * @param enable {boolean} [enable=true] If true then writing debug information is enabled for the route, + * otherwise it is disabled. + * @returns {RouteObject} + */ + debug(enable: boolean): RouteObject; + /** + * Process the route without marking the controller output as having been read, so that other routes from the same + * controller output can also process. + * @param enable {boolean} [enable=true] If true then the route is processed without marking the route's + * controller source as having been read. + * @returns {RouteObject} + */ + peek(enable: boolean): RouteObject; + /** + * Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and + * the input is read only if the condition is true. Thus, if the condition is not met then subsequent routes using the same input are processed. + * @param expression {condition}

A condition may be a:

+ *
  • A numeric {@link Controller.Hardware} property, which is evaluated as a boolean.
  • ! followed by a {@link Controller.Hardware} property to use the logical NOT of the property value.
  • A script function returning a boolean value. This can be either the name of the function or an in-line definition.

If an array of conditions is provided, their values are ANDed together.

+ * @returns {RouteObject} + */ + when(expression: condition): RouteObject; + /** + * Filter numeric route values to lie between two values; values outside this range are not passed on through the + * route. + * @param min {number} The minimum value to pass through. + * @param max {number} The maximum value to pass through. + * @returns {RouteObject} + */ + clamp(min: number, max: number): RouteObject; + /** + * Filter numeric route values such that they are rounded to 0 or 1 without output values + * flickering when the input value hovers around 0.5. For example, this enables you to use an analog input as if it were a toggle. + * @param min {number} When the input value drops below this value the output value changes to 0. + * @param max {number} When the input value rises above this value the output value changes to 1. + * @returns {RouteObject} + */ + hysteresis(min: number, max: number): RouteObject; + /** + * Filter numeric route values to send at a specified interval. + * @param interval {number} The interval between sending values, in seconds. + * @returns {RouteObject} + */ + pulse(interval: number): RouteObject; + /** + * Filter numeric and Pose route values to be scaled by a constant amount. + * @param multiplier {number} The scale to multiply the value by. + * @returns {RouteObject} + */ + scale(multiplier: number): RouteObject; + /** + * Filter numeric and Pose route values to have the opposite sign, e.g., 0.5 is changed to + * -0.5. + * @returns {RouteObject} + */ + invert(): RouteObject; + /** + * Filter numeric route values such that they're sent only when the input value is outside a dead-zone. When the input + * passes the dead-zone value, output is sent starting at 0.0 and catching up with the input value. As the input returns toward the dead-zone value, output values reduce to 0.0 at the dead-zone value. + * @param min {number} The minimum input value at which to start sending output. For negative input values, the + * negative of this value is used. + * @returns {RouteObject} + */ + deadZone(min: number): RouteObject; + /** + * Filter numeric route values such that they are rounded to -1, 0, or 1. + * For example, this enables you to use an analog input as if it were a toggle or, in the case of a bidirectional axis, a tri-state switch. + * @returns {RouteObject} + */ + constrainToInteger(): RouteObject; + /** + * Filter numeric route values such that they are rounded to 0 or 1. For example, this + * enables you to use an analog input as if it were a toggle. + * @returns {RouteObject} + */ + constrainToPositiveInteger(): RouteObject; + /** + * Filter Pose route values to have a pre-translation applied. + * @param translate {Vec3} The pre-translation to add to the pose. + * @returns {RouteObject} + */ + translate(translate: Vec3): RouteObject; + /** + * Filter Pose route values to have a pre-transform applied. + * @param transform {Mat4} The pre-transform to apply. + * @returns {RouteObject} + */ + transform(transform: Mat4): RouteObject; + /** + * Filter Pose route values to have a post-transform applied. + * @param transform {Mat4} The post-transform to apply. + * @returns {RouteObject} + */ + postTransform(transform: Mat4): RouteObject; + /** + * Filter Pose route values to have a pre-rotation applied. + * @param rotation {Quat} The pre-rotation to add to the pose. + * @returns {RouteObject} + */ + rotate(rotation: Quat): RouteObject; + /** + * Filter Pose route values to be smoothed by a low velocity filter. The filter's rotation and translation + * values are calculated as: (1 - f) * currentValue + f * previousValue where f = currentVelocity / filterConstant. At low velocities, the filter value is largely the previous value; at high velocities the value is wholly the current controller value. + * @param rotationConstant {number} The rotational velocity, in rad/s, at which the filter value is wholly the latest + * controller value. + * @param translationConstant {number} The linear velocity, in m/s, at which the filter value is wholly the latest + * controller value. + * @returns {RouteObject} + */ + lowVelocity(rotationConstant: number, translationConstant: number): RouteObject; + /** + * Filter Pose route values to be smoothed by an exponential decay filter. The filter's rotation and + * translation values are calculated as: filterConstant * currentValue + (1 - filterConstant) * previousValue. Values near 1 are less smooth with lower latency; values near 0 are more smooth with higher latency. + * @param rotationConstant {number} Rotation filter constant, 0.0–1.0. + * @param translationConstant {number} Translation filter constant, 0.0–1.0. + * @returns {RouteObject} + */ + exponentialSmoothing(rotationConstant: number, translationConstant: number): RouteObject; + /** + * Filter numeric route values such that a value of 0.0 is changed to 1.0, and other values + * are changed to 0.0. + * @returns {RouteObject} + */ + logicalNot(): RouteObject; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Reticle { + /** + * @returns {boolean} + */ + function isMouseCaptured(): boolean; + /** + * @returns {boolean} + */ + function getAllowMouseCapture(): boolean; + /** + * @param allowMouseCaptured {boolean} + */ + function setAllowMouseCapture(allowMouseCaptured: boolean): void; + /** + * @returns {boolean} + */ + function isPointingAtSystemOverlay(): boolean; + /** + * @returns {boolean} + */ + function getVisible(): boolean; + /** + * @param visible {boolean} + */ + function setVisible(visible: boolean): void; + /** + * @returns {number} + */ + function getDepth(): number; + /** + * @param depth {number} + */ + function setDepth(depth: number): void; + /** + * @returns {number} + */ + function getScale(): number; + /** + * @param scale {number} + */ + function setScale(scale: number): void; + /** + * @returns {Vec2} + */ + function getPosition(): Vec2; + /** + * @param position {Vec2} + */ + function setPosition(position: Vec2): void; + /** + * @returns {Vec2} + */ + function getMaximumPosition(): Vec2; + let allowMouseCapture: boolean; + let depth: number; + let maximumPosition: Vec2; + let mouseCaptured: boolean; + let pointingAtSystemOverlay: boolean; + let position: Vec2; + let scale: number; + let visible: boolean; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Entities API provides facilities to create and interact with entities. Entities are 2D and 3D objects that are visible + * to everyone and typically are persisted to the domain. For Interface scripts, the entities available are those that Interface has displayed and so knows about. + */ +declare namespace Entities { + interface ActionArguments-FarGrab { + /** + * The target position. + */ + targetPosition: Vec3; + /** + * The target rotation. + */ + targetRotation: Quat; + /** + * If an entity ID, the targetPosition and targetRotation are + * relative to this entity's position and rotation. + */ + otherID: Uuid; + /** + * Controls how long it takes for the entity's position to catch up with the + * target position. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + linearTimeScale: number; + /** + * Controls how long it takes for the entity's orientation to catch up with the + * target orientation. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + angularTimeScale: number; + } + + interface ActionArguments-Hold { + /** + * The ID of the avatar holding the entity. + */ + holderID: Uuid; + /** + * The target position relative to the avatar's hand. + */ + relativePosition: Vec3; + /** + * The target rotation relative to the avatar's hand. + */ + relativeRotation: Vec3; + /** + * Controls how long it takes for the entity's position and rotation to catch up with + * the target. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + timeScale: number; + /** + * The hand holding the entity: "left" or "right". + */ + hand: string; + /** + * If true, the entity is made kinematic during the action; the entity won't + * lag behind the hand but constraint actions such as "hinge" won't act properly. + */ + kinematic: boolean; + /** + * If true and kinematic is true, the + * entity's velocity property will be set during the action, e.g., so that other scripts may use the value. + */ + kinematicSetVelocity: boolean; + /** + * If true, the entity follows the HMD controller rather than the avatar's + * hand. + */ + ignoreIK: boolean; + } + + interface AmbientLight { + /** + * The intensity of the light. + */ + ambientIntensity: number; + /** + * A cube map image that defines the color of the light coming from each direction. If + * "" then the entity's Entities.Skybox url property value is used, unless that also is "" in which case the entity's ambientLightMode property is set to "inherit". + */ + ambientURL: string; + } + + interface AnimationProperties { + /** + * The URL of the FBX file that has the animation. + */ + url: string; + /** + * The speed in frames/s that the animation is played at. + */ + fps: number; + /** + * The first frame to play in the animation. + */ + firstFrame: number; + /** + * The last frame to play in the animation. + */ + lastFrame: number; + /** + * The current frame being played in the animation. + */ + currentFrame: number; + /** + * If true then the animation should play. + */ + running: boolean; + /** + * If true then the animation should be continuously repeated in a loop. + */ + loop: boolean; + /** + * If true then the rotations and translations of the last frame played should be + * maintained when the animation stops playing. + */ + hold: boolean; + } + + interface Bloom { + /** + * The intensity of the bloom effect. + */ + bloomIntensity: number; + /** + * The threshold for the bloom effect. + */ + bloomThreshold: number; + /** + * The size of the bloom effect. + */ + bloomSize: number; + } + + interface EntityProperties { + /** + * The ID of the entity. Read-only. + */ + id: Uuid; + /** + * A name for the entity. Need not be unique. + */ + name: string; + /** + * The entity type. You cannot change the type of an entity after it's created. (Though + * its value may switch among "Box", "Shape", and "Sphere" depending on changes to the shape property set for entities of these types.) Read-only. + */ + type: Entities.EntityType; + /** + * If true then the entity is an avatar entity; otherwise it is a server + * entity. An avatar entity follows you to each domain you visit, rendering at the same world coordinates unless it's parented to your avatar. Value cannot be changed after the entity is created. The value can also be set at entity creation by using the clientOnly parameter in Entities.addEntity. + */ + clientOnly: boolean; + /** + * The session ID of the owning avatar if clientOnly is + * true, otherwise Uuid. Read-only. + */ + owningAvatarID: Uuid; + /** + * The UTC date and time that the entity was created, in ISO 8601 format as + * yyyy-MM-ddTHH:mm:ssZ. Read-only. + */ + created: string; + /** + * The age of the entity in seconds since it was created. Read-only. + */ + age: number; + /** + * The age of the entity since it was created, formatted as h hours m minutes s + * seconds. + */ + ageAsText: string; + /** + * How long an entity lives for, in seconds, before being automatically deleted. A value of + * -1 means that the entity lives for ever. + */ + lifetime: number; + /** + * When the entity was last edited, expressed as the number of microseconds since + * 1970-01-01T00:00:00 UTC. Read-only. + */ + lastEdited: number; + /** + * The session ID of the avatar or agent that most recently created or edited the entity. + * Read-only. + */ + lastEditedBy: Uuid; + /** + * Whether or not the entity can be edited or deleted. If true then the + * entity's properties other than locked cannot be changed, and the entity cannot be deleted. + */ + locked: boolean; + /** + * Whether or not the entity is rendered. If true then the entity is rendered. + */ + visible: boolean; + /** + * Whether or not the entity can cast a shadow. Currently applicable only to + * Entities.EntityType and Entities.EntityType entities. Shadows are cast if inside a Entities.EntityType entity with castShadows enabled in its Entities.EntityProperties-Zone property. + */ + canCastShadow: boolean; + /** + * Whether or not the entity is rendered in the secondary camera. If true then the entity is rendered. + */ + isVisibleInSecondaryCamera: boolean; + /** + * The position of the entity. + */ + position: Vec3; + /** + * The orientation of the entity with respect to world coordinates. + */ + rotation: Quat; + /** + * The point in the entity that is set to the entity's position and is rotated + * about, Vec3 – Vec3. A value of Vec3 is the entity's minimum x, y, z corner; a value of Vec3 is the entity's maximum x, y, z corner. + */ + registrationPoint: Vec3; + /** + * The center of the entity's unscaled mesh model if it has one, otherwise + * Vec3. Read-only. + */ + naturalPosition: Vec3; + /** + * The dimensions of the entity's unscaled mesh model if it has one, otherwise + * Vec3. Read-only. + */ + naturalDimensions: Vec3; + /** + * The linear velocity of the entity in m/s with respect to world coordinates. + */ + velocity: Vec3; + /** + * How much to slow down the linear velocity of an entity over time, 0.0 + * – 1.0. A higher damping value slows down the entity more quickly. The default value is for an exponential decay timescale of 2.0s, where it takes 2.0s for the movement to slow to 1/e = 0.368 of its initial value. + */ + damping: number; + /** + * The angular velocity of the entity in rad/s with respect to its axes, about its + * registration point. + */ + angularVelocity: Vec3; + /** + * How much to slow down the angular velocity of an entity over time, + * 0.0 – 1.0. A higher damping value slows down the entity more quickly. The default value is for an exponential decay timescale of 2.0s, where it takes 2.0s for the movement to slow to 1/e = 0.368 of its initial value. + */ + angularDamping: number; + /** + * The acceleration due to gravity in m/s2 that the entity should move with, in + * world coordinates. Set to { x: 0, y: -9.8, z: 0 } to simulate Earth's gravity. Gravity is applied to an entity's motion only if its dynamic property is true. If changing an entity's gravity from Vec3, you need to give it a small velocity in order to kick off physics simulation. The gravity value is applied in addition to the acceleration value. + */ + gravity: Vec3; + /** + * A general acceleration in m/s2 that the entity should move with, in world + * coordinates. The acceleration is applied to an entity's motion only if its dynamic property is true. If changing an entity's acceleration from Vec3, you need to give it a small velocity in order to kick off physics simulation. The acceleration value is applied in addition to the gravity value. + */ + acceleration: Vec3; + /** + * The "bounciness" of an entity when it collides, 0.0 – + * 0.99. The higher the value, the more bouncy. + */ + restitution: number; + /** + * How much to slow down an entity when it's moving against another, 0.0 – + * 10.0. The higher the value, the more quickly it slows down. Examples: 0.1 for ice, 0.9 for sandpaper. + */ + friction: number; + /** + * The density of the entity in kg/m3, 100 for balsa wood – + * 10000 for silver. The density is used in conjunction with the entity's bounding box volume to work out its mass in the application of physics. + */ + density: number; + /** + * Whether or not the entity should collide with items per its + * collisionMask property. If true then the entity does not collide. + */ + collisionless: boolean; + /** + * Synonym for collisionless. + */ + ignoreForCollisions: boolean; + /** + * What types of items the entity should collide with. + */ + collisionMask: Entities.CollisionMask; + /** + * Synonym for collisionMask, + * in text format. + */ + collidesWith: string; + /** + * The sound to play when the entity experiences a collision. Valid file formats are + * as per the SoundCache object. + */ + collisionSoundURL: string; + /** + * Whether or not the entity should be affected by collisions. If true then + * the entity's movement is affected by collisions. + */ + dynamic: boolean; + /** + * Synonym for dynamic. + */ + collisionsWillMove: boolean; + /** + * A "hifi://" metaverse address that a user is taken to when they click on the entity. + */ + href: string; + /** + * A description of the href property value. + */ + description: string; + /** + * Used to store extra data about the entity in JSON format. WARNING: Other apps such as the + * Create app can also use this property, so make sure you handle data stored by other apps — edit only your bit and leave the rest of the data intact. You can use JSON.parse() to parse the string into a JavaScript object which you can manipulate the properties of, and use JSON.stringify() to convert the object into a string to put in the property. + */ + userData: string; + /** + * The URL of the client entity script, if any, that is attached to the entity. + */ + script: string; + /** + * Intended to be used to indicate when the client entity script was loaded. Should be + * an integer number of milliseconds since midnight GMT on January 1, 1970 (e.g., as supplied by Date.now(). If you update the property's value, the script is re-downloaded and reloaded. This is how the "reload" button beside the "script URL" field in properties tab of the Create app works. + */ + scriptTimestamp: number; + /** + * The URL of the server entity script, if any, that is attached to the entity. + */ + serverScripts: string; + /** + * The ID of the entity or avatar that this entity is parented to. Uuid + * if the entity is not parented. + */ + parentID: Uuid; + /** + * The joint of the entity or avatar that this entity is parented to. Use + * 65535 or -1 to parent to the entity or avatar's position and orientation rather than a joint. + */ + parentJointIndex: number; + /** + * The position of the entity relative to its parent if the entity is parented, + * otherwise the same value as position. If the entity is parented to an avatar and is clientOnly so that it scales with the avatar, this value remains the original local position value while the avatar scale changes. + */ + localPosition: Vec3; + /** + * The rotation of the entity relative to its parent if the entity is parented, + * otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * The velocity of the entity relative to its parent if the entity is parented, + * otherwise the same value as velocity. + */ + localVelocity: Vec3; + /** + * The angular velocity of the entity relative to its parent if the entity is + * parented, otherwise the same value as position. + */ + localAngularVelocity: Vec3; + /** + * The dimensions of the entity. If the entity is parented to an avatar and is + * clientOnly so that it scales with the avatar, this value remains the original dimensions value while the avatar scale changes. + */ + localDimensions: Vec3; + /** + * The axis-aligned bounding box that tightly encloses the entity. + * Read-only. + */ + boundingBox: Entities.BoundingBox; + /** + * The axis-aligned cube that determines where the entity lives in the entity server's octree. + * The cube may be considerably larger than the entity in some situations, e.g., when the entity is grabbed by an avatar: the position of the entity is determined through avatar mixer updates and so the AA cube is expanded in order to reduce unnecessary entity server updates. Scripts should not change this property's value. + */ + queryAACube: AACube; + /** + * Base-64 encoded compressed dump of the actions associated with the entity. This property + * is typically not used in scripts directly; rather, functions that manipulate an entity's actions update it. The size of this property increases with the number of actions. Because this property value has to fit within a High Fidelity datagram packet there is a limit to the number of actions that an entity can have, and edits which would result in overflow are rejected. Read-only. + */ + actionData: string; + /** + * Information on the cost of rendering the entity. Currently information is only + * provided for Model entities. Read-only. + */ + renderInfo: Entities.RenderInfo; + /** + * If true then the entity can be cloned via Entities.cloneEntity. + */ + cloneable: boolean; + /** + * The entity lifetime for clones created from this entity. + */ + cloneLifetime: number; + /** + * The total number of clones of this entity that can exist in the domain at any given time. + */ + cloneLimit: number; + /** + * If true then clones created from this entity will have their + * dynamic property set to true. + */ + cloneDynamic: boolean; + /** + * If true then clones created from this entity will be created as + * avatar entities: their clientOnly property will be set to true. + */ + cloneAvatarEntity: boolean; + /** + * The ID of the entity that this entity was cloned from. + */ + cloneOriginID: Uuid; + /** + * Certifiable name of the Marketplace item. + */ + itemName: string; + /** + * Certifiable description of the Marketplace item. + */ + itemDescription: string; + /** + * Certifiable category of the Marketplace item. + */ + itemCategories: string; + /** + * Certifiable artist that created the Marketplace item. + */ + itemArtist: string; + /** + * Certifiable license URL for the Marketplace item. + */ + itemLicense: string; + /** + * Certifiable maximum integer number of editions (copies) of the Marketplace item + * allowed to be sold. + */ + limitedRun: number; + /** + * Certifiable integer edition (copy) number or the Marketplace item. Each copy sold in + * the Marketplace is numbered sequentially, starting at 1. + */ + editionNumber: number; + /** + * Certifiable integer instance number for identical entities in a Marketplace + * item. A Marketplace item may have identical parts. If so, then each is numbered sequentially with an instance number. + */ + entityInstanceNumber: number; + /** + * Certifiable UUID for the Marketplace item, as used in the URL of the item's download + * and its Marketplace Web page. + */ + marketplaceID: string; + /** + * Hash of the entity's static certificate JSON, signed by the artist's private key. + */ + certificateID: string; + /** + * The version of the method used to generate the certificateID. + */ + staticCertificateVersion: number; + } + + interface EntityProperties-Box { + } + + interface EntityProperties-Light { + /** + * The dimensions of the entity. Entity surface outside these dimensions are not lit + * by the light. + */ + dimensions: Vec3; + /** + * The color of the light emitted. + */ + color: Color; + /** + * The brightness of the light. + */ + intensity: number; + /** + * The distance from the light's center at which intensity is reduced by 25%. + */ + falloffRadius: number; + /** + * If true then the light is directional, emitting along the entity's + * local negative z-axis; otherwise the light is a point light which emanates in all directions. + */ + isSpotlight: boolean; + /** + * Affects the softness of the spotlight beam: the higher the value the softer the beam. + */ + exponent: number; + /** + * Affects the size of the spotlight beam: the higher the value the larger the beam. + */ + cutoff: number; + } + + interface EntityProperties-Line { + /** + * The dimensions of the entity. Must be sufficient to contain all the + * linePoints. + */ + dimensions: Vec3; + /** + * The sequence of points to draw lines between. The values are relative to the entity's + * position. A maximum of 70 points can be specified. The property's value is set only if all the linePoints lie within the entity's dimensions. + */ + linePoints: Array.; + /** + * Currently not used. + */ + lineWidth: number; + /** + * The color of the line. + */ + color: Color; + } + + interface EntityProperties-Material { + /** + * URL to a MaterialResource. If you append ?name to the URL, the + * material with that name in the MaterialResource will be applied to the entity. Alternatively, set the property value to "materialData" to use the materialData property for the MaterialResource values. + */ + materialURL: string; + /** + * The priority for applying the material to its parent. Only the highest priority material is + * applied, with materials of the same priority randomly assigned. Materials that come with the model have a priority of 0. + */ + priority: number; + /** + * Selects the submesh or submeshes within the parent to apply the material + * to. If in the format "mat::string", all submeshes with material name "string" are replaced. Otherwise the property value is parsed as an unsigned integer, specifying the mesh index to modify. Invalid values are parsed to 0. + */ + parentMaterialName: string; + /** + * How the material is mapped to the entity. Either "uv" or + * "projected". Currently, only "uv" is supported. + */ + materialMappingMode: string; + /** + * Offset position in UV-space of the top left of the material, range + * { x: 0, y: 0 } – { x: 1, y: 1 }. + */ + materialMappingPos: Vec2; + /** + * How much to scale the material within the parent's UV-space. + */ + materialMappingScale: Vec2; + /** + * How much to rotate the material within the parent's UV-space, in degrees. + */ + materialMappingRot: number; + /** + * Used to store MaterialResource data as a JSON string. You can use + * JSON.parse() to parse the string into a JavaScript object which you can manipulate the properties of, and use JSON.stringify() to convert the object into a string to put in the property. + */ + materialData: string; + } + + interface EntityProperties-Model { + /** + * The dimensions of the entity. When adding an entity, if no dimensions + * value is specified then the model is automatically sized to its Entities.EntityProperties. + */ + dimensions: Vec3; + /** + * Currently not used. + */ + color: Color; + /** + * The URL of the FBX of OBJ model. Baked FBX models' URLs end in ".baked.fbx". + * Note: If the name ends with "default-image-model.fbx" then the entity is considered to be an "Image" entity, in which case the textures property should be set per the example. + */ + modelURL: string; + /** + * A JSON string of texture name, URL pairs used when rendering the model in place of the + * model's original textures. Use a texture name from the originalTextures property to override that texture. Only the texture names and URLs to be overridden need be specified; original textures are used where there are no overrides. You can use JSON.stringify() to convert a JavaScript object of name, URL pairs into a JSON string. + */ + textures: string; + /** + * A JSON string of texture name, URL pairs used in the model. The property value is + * filled in after the entity has finished rezzing (i.e., textures have loaded). You can use JSON.parse() to parse the JSON string into a JavaScript object of name, URL pairs. Read-only. + */ + originalTextures: string; + /** + * The shape of the collision hull used if collisions are enabled. + */ + shapeType: ShapeType; + /** + * The OBJ file to use for the compound shape if shapeType is + * "compound". + */ + compoundShapeURL: string; + /** + * An animation to play on the model. + */ + animation: Entities.AnimationProperties; + /** + * Joint rotations applied to the model; [] if none are applied or the + * model hasn't loaded. The array indexes are per Entities.getJointIndex. Rotations are relative to each joint's parent. Joint rotations can be set by Entities.setLocalJointRotation and similar functions, or by setting the value of this property. If you set a joint rotation using this property you also need to set the corresponding jointRotationsSet value to true. + */ + jointRotations: Array.; + /** + * true values for joints that have had rotations applied, + * false otherwise; [] if none are applied or the model hasn't loaded. The array indexes are per Entities.getJointIndex. + */ + jointRotationsSet: Array.; + /** + * Joint translations applied to the model; [] if none are applied or + * the model hasn't loaded. The array indexes are per Entities.getJointIndex. Rotations are relative to each joint's parent. Joint translations can be set by Entities.setLocalJointTranslation and similar functions, or by setting the value of this property. If you set a joint translation using this property you also need to set the corresponding jointTranslationsSet value to true. + */ + jointTranslations: Array.; + /** + * true values for joints that have had translations applied, + * false otherwise; [] if none are applied or the model hasn't loaded. The array indexes are per Entities.getJointIndex. + */ + jointTranslationsSet: Array.; + /** + * If true and the entity is parented to an avatar, then the + * avatar's joint rotations are applied to the entity's joints. + */ + relayParentJoints: boolean; + } + + interface EntityProperties-ParticleEffect { + /** + * If true then particles are emitted. + */ + isEmitting: boolean; + /** + * The maximum number of particles to render at one time. Older particles are deleted if + * necessary when new ones are created. + */ + maxParticles: number; + /** + * How long, in seconds, each particle lives. + */ + lifespan: number; + /** + * The number of particles per second to emit. + */ + emitRate: number; + /** + * The speed, in m/s, that each particle is emitted at. + */ + emitSpeed: number; + /** + * The spread in speeds at which particles are emitted at. If emitSpeed == 5 + * and speedSpread == 1, particles will be emitted with speeds in the range 4m/s – 6m/s. + */ + speedSpread: number; + /** + * The acceleration that is applied to each particle during its lifetime. The + * default is Earth's gravity value. + */ + emitAcceleration: vec3; + /** + * The spread in accelerations that each particle is given. If + * emitAccelerations == {x: 0, y: -9.8, z: 0} and accelerationSpread == {x: 0, y: 1, z: 0}, each particle will have an acceleration in the range {x: 0, y: -10.8, z: 0} – {x: 0, y: -8.8, z: 0}. + */ + accelerationSpread: vec3; + /** + * The dimensions of the particle effect, i.e., a bounding box containing all the particles + * during their lifetimes, assuming that emitterShouldTrail is false. Read-only. + */ + dimensions: Vec3; + /** + * If true then particles are "left behind" as the emitter moves, + * otherwise they stay with the entity's dimensions. + */ + emitterShouldTrail: boolean; + /** + * The orientation of particle emission relative to the entity's axes. By + * default, particles emit along the entity's local z-axis, and azimuthStart and azimuthFinish are relative to the entity's local x-axis. The default value is a rotation of -90 degrees about the local x-axis, i.e., the particles emit vertically. + */ + emitOrientation: Quat; + /** + * The dimensions of the ellipsoid from which particles are emitted. + */ + emitDimensions: vec3; + /** + * The starting radius within the ellipsoid at which particles start being emitted; + * range 0.0 – 1.0 for the ellipsoid center to the ellipsoid surface, respectively. Particles are emitted from the portion of the ellipsoid that lies between emitRadiusStart and the ellipsoid's surface. + */ + emitRadiusStart: number; + /** + * The angle in radians from the entity's local z-axis at which particles start being emitted + * within the ellipsoid; range 0 – Math.PI. Particles are emitted from the portion of the ellipsoid that lies between polarStart and polarFinish. + */ + polarStart: number; + /** + * The angle in radians from the entity's local z-axis at which particles stop being emitted + * within the ellipsoid; range 0 – Math.PI. Particles are emitted from the portion of the ellipsoid that lies between polarStart and polarFinish. + */ + polarFinish: number; + /** + * The angle in radians from the entity's local x-axis about the entity's local + * z-axis at which particles start being emitted; range -Math.PI – Math.PI. Particles are emitted from the portion of the ellipsoid that lies between azimuthStart and azimuthFinish. + */ + azimuthStart: number; + /** + * The angle in radians from the entity's local x-axis about the entity's local + * z-axis at which particles stop being emitted; range -Math.PI – Math.PI. Particles are emitted from the portion of the ellipsoid that lies between azimuthStart and azimuthFinish. + */ + azimuthFinish: number; + /** + * The URL of a JPG or PNG image file to display for each particle. If you want transparency, + * use PNG format. + */ + textures: string; + /** + * The radius of each particle at the middle of its life. + */ + particleRadius: number; + /** + * The radius of each particle at the start of its life. If NaN, the + * particleRadius value is used. + */ + radiusStart: number; + /** + * The radius of each particle at the end of its life. If NaN, the + * particleRadius value is used. + */ + radiusFinish: number; + /** + * The spread in radius that each particle is given. If particleRadius == 0.5 + * and radiusSpread == 0.25, each particle will have a radius in the range 0.25 – 0.75. + */ + radiusSpread: number; + /** + * The color of each particle at the middle of its life. + */ + color: Color; + /** + * The color of each particle at the start of its life. If any of the component values are + * undefined, the color value is used. + */ + colorStart: Color; + /** + * The color of each particle at the end of its life. If any of the component values are + * undefined, the color value is used. + */ + colorFinish: Color; + /** + * The spread in color that each particle is given. If + * color == {red: 100, green: 100, blue: 100} and colorSpread == {red: 10, green: 25, blue: 50}, each particle will have a color in the range {red: 90, green: 75, blue: 50} – {red: 110, green: 125, blue: 150}. + */ + colorSpread: Color; + /** + * The alpha of each particle at the middle of its life. + */ + alpha: number; + /** + * The alpha of each particle at the start of its life. If NaN, the + * alpha value is used. + */ + alphaStart: number; + /** + * The alpha of each particle at the end of its life. If NaN, the + * alpha value is used. + */ + alphaFinish: number; + /** + * The spread in alpha that each particle is given. If alpha == 0.5 + * and alphaSpread == 0.25, each particle will have an alpha in the range 0.25 – 0.75. + */ + alphaSpread: number; + /** + * The spin of each particle at the middle of its life. In the range -2*PI – 2*PI. + */ + particleSpin: number; + /** + * The spin of each particle at the start of its life. In the range -2*PI – 2*PI. + * If NaN, the particleSpin value is used. + */ + spinStart: number; + /** + * The spin of each particle at the end of its life. In the range -2*PI – 2*PI. + * If NaN, the particleSpin value is used. + */ + spinFinish: number; + /** + * The spread in spin that each particle is given. In the range 0 – 2*PI. If particleSpin == PI + * and spinSpread == PI/2, each particle will have a spin in the range PI/2 – 3*PI/2. + */ + spinSpread: number; + /** + * Whether or not the particles' spin will rotate with the entity. If false, when particleSpin == 0, the particles will point + * up in the world. If true, they will point towards the entity's up vector, based on its orientation. + */ + rotateWithEntity: boolean; + /** + * Currently not used. Read-only. + */ + shapeType: ShapeType; + } + + interface EntityProperties-PolyLine { + /** + * The dimensions of the entity, i.e., the size of the bounding box that contains the + * lines drawn. + */ + dimensions: Vec3; + /** + * The sequence of points to draw lines between. The values are relative to the entity's + * position. A maximum of 70 points can be specified. Must be specified in order for the entity to render. + */ + linePoints: Array.; + /** + * The normal vectors for the line's surface at the linePoints. The values are + * relative to the entity's orientation. Must be specified in order for the entity to render. + */ + normals: Array.; + /** + * The widths, in m, of the line at the linePoints. Must be specified in + * order for the entity to render. + */ + strokeWidths: Array.; + /** + * Currently not used. + */ + lineWidth: number; + /** + * Currently not used. + */ + strokeColors: Array.; + /** + * The base color of the line, which is multiplied with the color of the texture for + * rendering. + */ + color: Color; + /** + * The URL of a JPG or PNG texture to use for the lines. If you want transparency, use PNG + * format. + */ + textures: string; + /** + * If true, the texture is stretched to fill the whole line, otherwise + * the texture repeats along the line. + */ + isUVModeStretch: boolean; + } + + interface EntityProperties-PolyVox { + /** + * The dimensions of the entity. + */ + dimensions: Vec3; + /** + * Integer number of voxels along each axis of the entity, in the range + * 1,1,1 to 128,128,128. The dimensions of each voxel is dimensions / voxelVolumesize. + */ + voxelVolumeSize: Vec3; + /** + * Base-64 encoded compressed dump of + * the PolyVox data. This property is typically not used in scripts directly; rather, functions that manipulate a PolyVox entity update it. The size of this property increases with the size and complexity of the PolyVox entity, with the size depending on how the particular entity's voxels compress. Because this property value has to fit within a High Fidelity datagram packet there is a limit to the size and complexity of a PolyVox entity, and edits which would result in an overflow are rejected. + */ + voxelData: string; + /** + * The style of rendering the voxels' surface and how + * neighboring PolyVox entities are joined. + */ + voxelSurfaceStyle: Entities.PolyVoxSurfaceStyle; + /** + * URL of the texture to map to surfaces perpendicular to the entity's local x-axis. JPG or + * PNG format. If no texture is specified the surfaces display white. + */ + xTextureURL: string; + /** + * URL of the texture to map to surfaces perpendicular to the entity's local y-axis. JPG or + * PNG format. If no texture is specified the surfaces display white. + */ + yTextureURL: string; + /** + * URL of the texture to map to surfaces perpendicular to the entity's local z-axis. JPG or + * PNG format. If no texture is specified the surfaces display white. + */ + zTextureURL: string; + /** + * ID of the neighboring PolyVox entity in the entity's -ve local x-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + xNNeighborID: Uuid; + /** + * ID of the neighboring PolyVox entity in the entity's -ve local y-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + yNNeighborID: Uuid; + /** + * ID of the neighboring PolyVox entity in the entity's -ve local z-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + zNNeighborID: Uuid; + /** + * ID of the neighboring PolyVox entity in the entity's +ve local x-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + xPNeighborID: Uuid; + /** + * ID of the neighboring PolyVox entity in the entity's +ve local y-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + yPNeighborID: Uuid; + /** + * ID of the neighboring PolyVox entity in the entity's +ve local z-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + zPNeighborID: Uuid; + } + + interface EntityProperties-Shape { + /** + * The shape of the entity. + */ + shape: Entities.Shape; + /** + * The dimensions of the entity. + */ + dimensions: Vec3; + /** + * The color of the entity. + */ + color: Color; + } + + interface EntityProperties-Sphere { + } + + interface EntityProperties-Text { + /** + * The dimensions of the entity. + */ + dimensions: Vec3; + /** + * The text to display on the face of the entity. Text wraps if necessary to fit. New lines can be + * created using \n. Overflowing lines are not displayed. + */ + text: string; + /** + * The height of each line of text (thus determining the font size). + */ + lineHeight: number; + /** + * The color of the text. + */ + textColor: Color; + /** + * The color of the background rectangle. + */ + backgroundColor: Color; + /** + * If true, the entity is oriented to face each user's camera (i.e., it + * differs for each user present). + */ + faceCamera: boolean; + } + + interface EntityProperties-Web { + /** + * The dimensions of the entity. + */ + dimensions: Vec3; + /** + * The URL of the Web page to display. This value does not change as you or others navigate + * on the Web entity. + */ + sourceUrl: string; + /** + * The resolution to display the page at, in dots per inch. If you convert this to dots per meter + * (multiply by 1 / 0.0254 = 39.3701) then multiply dimensions.x and dimensions.y by that value you get the resolution in pixels. + */ + dpi: number; + } + + interface EntityProperties-Zone { + /** + * The size of the volume in which the zone's lighting effects and avatar permissions + * have effect. + */ + dimensions: Vec3; + /** + * The shape of the volume in which the zone's lighting effects and avatar + * permissions have effect. Reverts to the default value if set to "none", or set to "compound" and compoundShapeURL is "". + */ + shapeType: ShapeType; + /** + * The OBJ file to use for the compound shape if shapeType is + * "compound". + */ + compoundShapeURL: string; + /** + * Configures the key light in the zone. Possible values: + * "inherit": The key light from any enclosing zone continues into this zone. "disabled": The key light from any enclosing zone and the key light of this zone are disabled in this zone. "enabled": The key light properties of this zone are enabled, overriding the key light of from any enclosing zone. + */ + keyLightMode: string; + /** + * The key light properties of the zone. + */ + keyLight: Entities.KeyLight; + /** + * Configures the ambient light in the zone. Possible values: + * "inherit": The ambient light from any enclosing zone continues into this zone. "disabled": The ambient light from any enclosing zone and the ambient light of this zone are disabled in this zone. "enabled": The ambient light properties of this zone are enabled, overriding the ambient light from any enclosing zone. + */ + ambientLightMode: string; + /** + * The ambient light properties of the zone. + */ + ambientLight: Entities.AmbientLight; + /** + * Configures the skybox displayed in the zone. Possible values: + * "inherit": The skybox from any enclosing zone is dislayed in this zone. "disabled": The skybox from any enclosing zone and the skybox of this zone are disabled in this zone. "enabled": The skybox properties of this zone are enabled, overriding the skybox from any enclosing zone. + */ + skyboxMode: string; + /** + * The skybox properties of the zone. + */ + skybox: Entities.Skybox; + /** + * Configures the haze in the zone. Possible values: + * "inherit": The haze from any enclosing zone continues into this zone. "disabled": The haze from any enclosing zone and the haze of this zone are disabled in this zone. "enabled": The haze properties of this zone are enabled, overriding the haze from any enclosing zone. + */ + hazeMode: string; + /** + * The haze properties of the zone. + */ + haze: Entities.Haze; + /** + * Configures the bloom in the zone. Possible values: + * "inherit": The bloom from any enclosing zone continues into this zone. "disabled": The bloom from any enclosing zone and the bloom of this zone are disabled in this zone. "enabled": The bloom properties of this zone are enabled, overriding the bloom from any enclosing zone. + */ + bloomMode: string; + /** + * The bloom properties of the zone. + */ + bloom: Entities.Bloom; + /** + * If true then visitors can fly in the zone; otherwise they cannot. + */ + flyingAllowed: boolean; + /** + * If true then visitors with avatar collisions turned off will not + * collide with content in the zone; otherwise visitors will always collide with content in the zone. + */ + ghostingAllowed: boolean; + /** + * The URL of a JavaScript file that filters changes to properties of entities within the + * zone. It is periodically executed for each entity in the zone. It can, for example, be used to not allow changes to certain properties. function filter(properties) { // Test and edit properties object values, // e.g., properties.modelURL, as required. return properties; } + */ + filterURL: string; + } + + interface BoundingBox { + /** + * The bottom right near (minimum axes values) corner of the AA box. + */ + brn: Vec3; + /** + * The top far left (maximum axes values) corner of the AA box. + */ + tfl: Vec3; + /** + * The center of the AA box. + */ + center: Vec3; + /** + * The dimensions of the AA box. + */ + dimensions: Vec3; + } + + interface RenderInfo { + /** + * The number of vertices in the entity. + */ + verticesCount: number; + /** + * The number of textures in the entity. + */ + texturesCount: number; + /** + * The total size of the textures in the entity, in bytes. + */ + textureSize: number; + /** + * Is true if any of the textures has transparency. + */ + hasTransparent: boolean; + /** + * The number of draw calls required to render the entity. + */ + drawCalls: number; + } + + interface RayToEntityIntersectionResult { + /** + * true if the PickRay intersected an entity, otherwise + * false. + */ + intersects: boolean; + /** + * Is always true. + */ + accurate: boolean; + /** + * The ID if the entity intersected, if any, otherwise null. + */ + entityID: Uuid; + /** + * The distance from the PickRay origin to the intersection point. + */ + distance: number; + /** + * The intersection point. + */ + intersection: Vec3; + /** + * The surface normal of the entity at the intersection point. + */ + surfaceNormal: Vec3; + /** + * The face of the entity's axis-aligned box that the ray intersects. + */ + face: BoxFace; + /** + * Extra information depending on the entity intersected. Currently, only Model + * entities provide extra information, and the information provided depends on the precisionPicking parameter value that the search function was called with. + */ + extraInfo: object; + } + + /** + * Get the properties of multiple entities. + * @param entityIDs {Array.} The IDs of the entities to get the properties of. + * @param desiredProperties {Array.} [desiredProperties=[]] Either string with property name or array of the names of the properties + * to get. If the array is empty, all properties are returned. + * @returns {Array.} + */ + function getMultipleEntityProperties(entityIDs: Array., desiredProperties: Array.): Array.; + /** + * Check whether or not you can change the locked property of entities. Locked entities have their + * locked property set to true and cannot be edited or deleted. Whether or not you can change entities' locked properties is configured in the domain server's permissions. + * @returns {boolean} + */ + function canAdjustLocks(): boolean; + /** + * Check whether or not you can rez (create) new entities in the domain. + * @returns {boolean} + */ + function canRez(): boolean; + /** + * Check whether or not you can rez (create) new temporary entities in the domain. Temporary entities are entities with a + * finite lifetime property value set. + * @returns {boolean} + */ + function canRezTmp(): boolean; + /** + * Check whether or not you can rez (create) new certified entities in the domain. Certified entities are entities that have + * PoP certificates. + * @returns {boolean} + */ + function canRezCertified(): boolean; + /** + * Check whether or not you can rez (create) new temporary certified entities in the domain. Temporary entities are entities + * with a finite lifetime property value set. Certified entities are entities that have PoP certificates. + * @returns {boolean} + */ + function canRezTmpCertified(): boolean; + /** + * Check whether or not you can make changes to the asset server's assets. + * @returns {boolean} + */ + function canWriteAssets(): boolean; + /** + * Check whether or not you can replace the domain's content set. + * @returns {boolean} + */ + function canReplaceContent(): boolean; + /** + * Add a new entity with specified properties. + * @param properties {Entities.EntityProperties} The properties of the entity to create. + * @param clientOnly {boolean} [clientOnly=false] If true, or if clientOnly is set true in + * the properties, the entity is created as an avatar entity; otherwise it is created on the server. An avatar entity follows you to each domain you visit, rendering at the same world coordinates unless it's parented to your avatar. + * @returns {Uuid} + */ + function addEntity(properties: Entities.EntityProperties, clientOnly: boolean): Uuid; + /** + * Create a clone of an entity. A clone can be created by a client that doesn't have rez permissions in the current domain. + * The entity must have its cloneable property set to true. The clone has a modified name, other properties set per its clone related-properties, and its clone-related properties are set to defaults. + * @param entityID {Uuid} The ID of the entity to clone. + * @returns {Uuid} + */ + function cloneEntity(entityID: Uuid): Uuid; + /** + * Get the properties of an entity. + * @param entityID {Uuid} The ID of the entity to get the properties of. + * @param desiredProperties {Array.} [desiredProperties=[]] Array of the names of the properties to get. If the array is empty, + * all properties are returned. + * @returns {Entities.EntityProperties} + */ + function getEntityProperties(entityID: Uuid, desiredProperties: Array.): Entities.EntityProperties; + /** + * Update an entity with specified properties. + * @param entityID {Uuid} The ID of the entity to edit. + * @param properties {Entities.EntityProperties} The properties to update the entity with. + * @returns {Uuid} + */ + function editEntity(entityID: Uuid, properties: Entities.EntityProperties): Uuid; + /** + * Delete an entity. + * @param entityID {Uuid} The ID of the entity to delete. + */ + function deleteEntity(entityID: Uuid): void; + /** + * Call a method in a client entity script from a client script or client entity script, or call a method in a server + * entity script from a server entity script. The entity script method must be exposed as a property in the target client entity script. Additionally, if calling a server entity script, the server entity script must include the method's name in an exposed property called remotelyCallable that is an array of method names that can be called. + * @param entityID {Uuid} The ID of the entity to call the method in. + * @param method {string} The name of the method to call. + * @param parameters {Array.} [parameters=[]] The parameters to call the specified method with. + */ + function callEntityMethod(entityID: Uuid, method: string, parameters: Array.): void; + /** + * Call a method in a server entity script from a client script or client entity script. The entity script method must be + * exposed as a property in the target server entity script. Additionally, the target server entity script must include the method's name in an exposed property called remotelyCallable that is an array of method names that can be called. + * @param entityID {Uuid} The ID of the entity to call the method in. + * @param method {string} The name of the method to call. + * @param parameters {Array.} [parameters=[]] The parameters to call the specified method with. + */ + function callEntityServerMethod(entityID: Uuid, method: string, parameters: Array.): void; + /** + * Call a method in a specific user's client entity script from a server entity script. The entity script method must be + * exposed as a property in the target client entity script. + * @param clientSessionID {Uuid} The session ID of the user to call the method in. + * @param entityID {Uuid} The ID of the entity to call the method in. + * @param method {string} The name of the method to call. + * @param parameters {Array.} [parameters=[]] The parameters to call the specified method with. + */ + function callEntityClientMethod(clientSessionID: Uuid, entityID: Uuid, method: string, parameters: Array.): void; + /** + * Find the entity with a position closest to a specified point and within a specified radius. + * @param center {Vec3} The point about which to search. + * @param radius {number} The radius within which to search. + * @returns {Uuid} + */ + function findClosestEntity(center: Vec3, radius: number): Uuid; + /** + * Find all entities that intersect a sphere defined by a center point and radius. + * @param center {Vec3} The point about which to search. + * @param radius {number} The radius within which to search. + * @returns {Array.} + */ + function findEntities(center: Vec3, radius: number): Array.; + /** + * Find all entities whose axis-aligned boxes intersect a search axis-aligned box defined by its minimum coordinates corner + * and dimensions. + * @param corner {Vec3} The corner of the search AA box with minimum co-ordinate values. + * @param dimensions {Vec3} The dimensions of the search AA box. + * @returns {Array.} + */ + function findEntitiesInBox(corner: Vec3, dimensions: Vec3): Array.; + /** + * Find all entities whose axis-aligned boxes intersect a search frustum. + * @param frustum {ViewFrustum} The frustum to search in. The position, orientation, + * projection, and centerRadius properties must be specified. + * @returns {Array.} + */ + function findEntitiesInFrustum(frustum: ViewFrustum): Array.; + /** + * Find all entities of a particular type that intersect a sphere defined by a center point and radius. + * @param entityType {Entities.EntityType} The type of entity to search for. + * @param center {Vec3} The point about which to search. + * @param radius {number} The radius within which to search. + * @returns {Array.} + */ + function findEntitiesByType(entityType: Entities.EntityType, center: Vec3, radius: number): Array.; + /** + * Find all entities of a particular name that intersect a sphere defined by a center point and radius. + * @param entityName {string} The name of the entity to search for. + * @param center {Vec3} The point about which to search. + * @param radius {number} The radius within which to search. + * @param caseSensitive {boolean} [caseSensitive=false] If true then the search is case-sensitive. + * @returns {Array.} + */ + function findEntitiesByName(entityName: string, center: Vec3, radius: number, caseSensitive: boolean): Array.; + /** + * Find the first entity intersected by a PickRay. Light and Zone entities are not + * intersected unless they've been configured as pickable using Entities.setLightsArePickable and Entities.setZonesArePickable, respectively. + * @param pickRay {PickRay} The PickRay to use for finding entities. + * @param precisionPicking {boolean} [precisionPicking=false] If true and the intersected entity is a Model + * entity, the result's extraInfo property includes more information than it otherwise would. + * @param entitiesToInclude {Array.} [entitiesToInclude=[]] If not empty then the search is restricted to these entities. + * @param entitiesToDiscard {Array.} [entitiesToDiscard=[]] Entities to ignore during the search. + * @param visibleOnly {boolean} [visibleOnly=false] If true then only entities that are + * {@link Entities.EntityProperties|visible} are searched. + * @param collideableOnly {boolean} [collideableOnly=false] If true then only entities that are not + * {@link Entities.EntityProperties|collisionless} are searched. + * @returns {Entities.RayToEntityIntersectionResult} + */ + function findRayIntersection(pickRay: PickRay, precisionPicking: boolean, entitiesToInclude: Array., entitiesToDiscard: Array., visibleOnly: boolean, collideableOnly: boolean): Entities.RayToEntityIntersectionResult; + /** + * Find the first entity intersected by a PickRay. Light and Zone entities are not + * intersected unless they've been configured as pickable using Entities.setLightsArePickable and Entities.setZonesArePickable, respectively. This is a synonym for Entities.findRayIntersection. + * @param pickRay {PickRay} The PickRay to use for finding entities. + * @param precisionPicking {boolean} [precisionPicking=false] If true and the intersected entity is a Model + * entity, the result's extraInfo property includes more information than it otherwise would. + * @param entitiesToInclude {Array.} [entitiesToInclude=[]] If not empty then the search is restricted to these entities. + * @param entitiesToDiscard {Array.} [entitiesToDiscard=[]] Entities to ignore during the search. + */ + function findRayIntersectionBlocking(pickRay: PickRay, precisionPicking: boolean, entitiesToInclude: Array., entitiesToDiscard: Array.): void; + /** + * Reloads an entity's server entity script such that the latest version re-downloaded. + * @param entityID {Uuid} The ID of the entity to reload the server entity script of. + * @returns {boolean} + */ + function reloadServerScripts(entityID: Uuid): boolean; + /** + * Gets the status of server entity script attached to an entity + * @param entityID {Uuid} The ID of the entity to get the server entity script status for. + * @param callback {Entities~getServerScriptStatusCallback} The function to call upon completion. + * @returns {boolean} + */ + function getServerScriptStatus(entityID: Uuid, callback: Entities~getServerScriptStatusCallback): boolean; + /** + * Get metadata for certain entity properties such as script and serverScripts. + * @param entityID {Uuid} The ID of the entity to get the metadata for. + * @param property {string} The property name to get the metadata for. + * @param callback {Entities~queryPropertyMetadataCallback} The function to call upon completion. + * @returns {boolean} + */ + function queryPropertyMetadata(entityID: Uuid, property: string, callback: Entities~queryPropertyMetadataCallback): boolean; + /** + * Get metadata for certain entity properties such as script and serverScripts. + * @param entityID {Uuid} The ID of the entity to get the metadata for. + * @param property {string} The property name to get the metadata for. + * @param scope {object} The "this" context that the callback will be executed within. + * @param callback {Entities~queryPropertyMetadataCallback} The function to call upon completion. + * @returns {boolean} + */ + function queryPropertyMetadata(entityID: Uuid, property: string, scope: object, callback: Entities~queryPropertyMetadataCallback): boolean; + /** + * Set whether or not ray picks intersect the bounding box of Entities.EntityType entities. By default, Light + * entities are not intersected. The setting lasts for the Interface session. Ray picks are done using Entities.findRayIntersection or Entities.findRayIntersectionBlocking, or the Picks and RayPick APIs. + * @param value {boolean} Set true to make ray picks intersect the bounding box of + * {@link Entities.EntityType|Light} entities, otherwise false. + */ + function setLightsArePickable(value: boolean): void; + /** + * Get whether or not ray picks intersect the bounding box of Entities.EntityType entities. Ray picks are + * done using Entities.findRayIntersection or Entities.findRayIntersectionBlocking, or the Picks and RayPick APIs. + * @returns {boolean} + */ + function getLightsArePickable(): boolean; + /** + * Set whether or not ray picks intersect the bounding box of Entities.EntityType entities. By default, Light + * entities are not intersected. The setting lasts for the Interface session. Ray picks are done using Entities.findRayIntersection or Entities.findRayIntersectionBlocking, or the Picks and RayPick APIs. + * @param value {boolean} Set true to make ray picks intersect the bounding box of + * {@link Entities.EntityType|Zone} entities, otherwise false. + */ + function setZonesArePickable(value: boolean): void; + /** + * Get whether or not ray picks intersect the bounding box of Entities.EntityType entities. Ray picks are + * done using Entities.findRayIntersection or Entities.findRayIntersectionBlocking, or the Picks and RayPick APIs. + * @returns {boolean} + */ + function getZonesArePickable(): boolean; + /** + * Set whether or not Entities.EntityType entities' boundaries should be drawn. Currently not used. + * @param value {boolean} Set to true if {@link Entities.EntityType|Zone} entities' boundaries should be + * drawn, otherwise false. + */ + function setDrawZoneBoundaries(value: boolean): void; + /** + * Get whether or not Entities.EntityType entities' boundaries should be drawn. Currently not used. + * @returns {boolean} + */ + function getDrawZoneBoundaries(): boolean; + /** + * Set the values of all voxels in a spherical portion of a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param center {Vec3} The center of the sphere of voxels to set, in world coordinates. + * @param radius {number} The radius of the sphere of voxels to set, in world coordinates. + * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. + */ + function setVoxelSphere(entityID: Uuid, center: Vec3, radius: number, value: number): void; + /** + * Set the values of all voxels in a capsule-shaped portion of a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param start {Vec3} The center of the sphere of voxels to set, in world coordinates. + * @param end {Vec3} The center of the sphere of voxels to set, in world coordinates. + * @param radius {number} The radius of the capsule cylinder and spherical ends, in world coordinates. + * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. + */ + function setVoxelCapsule(entityID: Uuid, start: Vec3, end: Vec3, radius: number, value: number): void; + /** + * Set the value of a particular voxels in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param position {Vec3} The position relative to the minimum axes values corner of the entity. The + * position coordinates are rounded to the nearest integer to get the voxel coordinate. The minimum axes corner voxel is { x: 0, y: 0, z: 0 }. + * @param value {number} If value % 256 == 0 then voxel is cleared, otherwise the voxel is set. + */ + function setVoxel(entityID: Uuid, position: Vec3, value: number): void; + /** + * Set the values of all voxels in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. + */ + function setAllVoxels(entityID: Uuid, value: number): void; + /** + * Set the values of all voxels in a cubic portion of a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param lowPosition {Vec3} The position of the minimum axes value corner of the cube of voxels to set, in voxel + * coordinates. + * @param cuboidSize {Vec3} The size of the cube of voxels to set, in voxel coordinates. + * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. + */ + function setVoxelsInCuboid(entityID: Uuid, lowPosition: Vec3, cuboidSize: Vec3, value: number): void; + /** + * Convert voxel coordinates in a Entities.EntityType entity to world coordinates. Voxel coordinates are + * relative to the minimum axes values corner of the entity with a scale of Vec3.ONE being the dimensions of each voxel. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param voxelCoords {Vec3} The voxel coordinates. May be fractional and outside the entity's bounding box. + * @returns {Vec3} + */ + function voxelCoordsToWorldCoords(entityID: Uuid, voxelCoords: Vec3): Vec3; + /** + * Convert world coordinates to voxel coordinates in a Entities.EntityType entity. Voxel coordinates are + * relative to the minimum axes values corner of the entity, with a scale of Vec3.ONE being the dimensions of each voxel. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param worldCoords {Vec3} The world coordinates. May be outside the entity's bounding box. + * @returns {Vec3} + */ + function worldCoordsToVoxelCoords(entityID: Uuid, worldCoords: Vec3): Vec3; + /** + * Convert voxel coordinates in a Entities.EntityType entity to local coordinates relative to the minimum + * axes value corner of the entity, with the scale being the same as world coordinates. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param voxelCoords {Vec3} The voxel coordinates. May be fractional and outside the entity's bounding box. + * @returns {Vec3} + */ + function voxelCoordsToLocalCoords(entityID: Uuid, voxelCoords: Vec3): Vec3; + /** + * Convert local coordinates to voxel coordinates in a Entities.EntityType entity. Local coordinates are + * relative to the minimum axes value corner of the entity, with the scale being the same as world coordinates. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param localCoords {Vec3} The local coordinates. May be outside the entity's bounding box. + * @returns {Vec3} + */ + function localCoordsToVoxelCoords(entityID: Uuid, localCoords: Vec3): Vec3; + /** + * Set the linePoints property of a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Line} entity. + * @param points {Array.} The array of points to set the entity's linePoints property to. + * @returns {boolean} + */ + function setAllPoints(entityID: Uuid, points: Array.): boolean; + /** + * Append a point to a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Line} entity. + * @param point {Vec3} The point to add to the line. The coordinates are relative to the entity's position. + * @returns {boolean} + */ + function appendPoint(entityID: Uuid, point: Vec3): boolean; + /** + * Dumps debug information about all entities in Interface's local in-memory tree of entities it knows about — domain + * and client-only — to the program log. + */ + function dumpTree(): void; + /** + * Add an action to an entity. An action is registered with the physics engine and is applied every physics simulation + * step. Any entity may have more than one action associated with it, but only as many as will fit in an entity's actionData property. + * @param actionType {Entities.ActionType} The type of action. + * @param entityID {Uuid} The ID of the entity to add the action to. + * @param arguments {Entities.ActionArguments} Configure the action. + * @returns {Uuid} + */ + function addAction(actionType: Entities.ActionType, entityID: Uuid, arguments: Entities.ActionArguments): Uuid; + /** + * Update an entity action. + * @param entityID {Uuid} The ID of the entity with the action to update. + * @param actionID {Uuid} The ID of the action to update. + * @param arguments {Entities.ActionArguments} The arguments to update. + * @returns {boolean} + */ + function updateAction(entityID: Uuid, actionID: Uuid, arguments: Entities.ActionArguments): boolean; + /** + * Delete an action from an entity. + * @param entityID {Uuid} The ID of entity to delete the action from. + * @param actionID {Uuid} The ID of the action to delete. + * @returns {boolean} + */ + function deleteAction(entityID: Uuid, actionID: Uuid): boolean; + /** + * Get the IDs of the actions that are associated with an entity. + * @param entityID {Uuid} The entity to get the action IDs for. + * @returns {Array.} + */ + function getActionIDs(entityID: Uuid): Array.; + /** + * Get the arguments of an action. + * @param entityID {Uuid} The ID of the entity with the action. + * @param actionID {Uuid} The ID of the action to get the arguments of. + * @returns {Entities.ActionArguments} + */ + function getActionArguments(entityID: Uuid, actionID: Uuid): Entities.ActionArguments; + /** + * Get the translation of a joint in a Entities.EntityType entity relative to the entity's position and + * orientation. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @returns {Vec3} + */ + function getAbsoluteJointTranslationInObjectFrame(entityID: Uuid, jointIndex: number): Vec3; + /** + * Get the translation of a joint in a Entities.EntityType entity relative to the entity's position and + * orientation. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @returns {Quat} + */ + function getAbsoluteJointRotationInObjectFrame(entityID: Uuid, jointIndex: number): Quat; + /** + * Set the translation of a joint in a Entities.EntityType entity relative to the entity's position and + * orientation. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @param translation {Vec3} The translation to set the joint to relative to the entity's position and orientation. + * @returns {boolean} + */ + function setAbsoluteJointTranslationInObjectFrame(entityID: Uuid, jointIndex: number, translation: Vec3): boolean; + /** + * Set the rotation of a joint in a Entities.EntityType entity relative to the entity's position and + * orientation. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @param rotation {Quat} The rotation to set the joint to relative to the entity's orientation. + * @returns {boolean} + */ + function setAbsoluteJointRotationInObjectFrame(entityID: Uuid, jointIndex: number, rotation: Quat): boolean; + /** + * Get the local translation of a joint in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @returns {Vec3} + */ + function getLocalJointTranslation(entityID: Uuid, jointIndex: number): Vec3; + /** + * Get the local rotation of a joint in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @returns {Quat} + */ + function getLocalJointRotation(entityID: Uuid, jointIndex: number): Quat; + /** + * Set the local translation of a joint in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @param translation {Vec3} The local translation to set the joint to. + * @returns {boolean} + */ + function setLocalJointTranslation(entityID: Uuid, jointIndex: number, translation: Vec3): boolean; + /** + * Set the local rotation of a joint in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @param rotation {Quat} The local rotation to set the joint to. + * @returns {boolean} + */ + function setLocalJointRotation(entityID: Uuid, jointIndex: number, rotation: Quat): boolean; + /** + * Set the local translations of joints in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param translations {Array.} The local translations to set the joints to. + * @returns {boolean} + */ + function setLocalJointTranslations(entityID: Uuid, translations: Array.): boolean; + /** + * Set the local rotations of joints in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param rotations {Array.} The local rotations to set the joints to. + * @returns {boolean} + */ + function setLocalJointRotations(entityID: Uuid, rotations: Array.): boolean; + /** + * Set the local rotations and translations of joints in a Entities.EntityType entity. This is the same as + * calling both Entities.setLocalJointRotations and Entities.setLocalJointTranslations at the same time. + * @param entityID {Uuid} The ID of the entity. + * @param rotations {Array.} The local rotations to set the joints to. + * @param translations {Array.} The local translations to set the joints to. + * @returns {boolean} + */ + function setLocalJointsData(entityID: Uuid, rotations: Array., translations: Array.): boolean; + /** + * Get the index of a named joint in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param name {string} The name of the joint. + * @returns {number} + */ + function getJointIndex(entityID: Uuid, name: string): number; + /** + * Get the names of all the joints in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Model} entity. + * @returns {Array.} + */ + function getJointNames(entityID: Uuid): Array.; + /** + * Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model. Recurse on the IDs returned by the function to get all descendants of an entity, overlay, or avatar. + * @param parentID {Uuid} The ID of the entity, overlay, or avatar to get the children IDs of. + * @returns {Array.} + */ + function getChildrenIDs(parentID: Uuid): Array.; + /** + * Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model's joint. + * @param parentID {Uuid} The ID of the entity, overlay, or avatar to get the children IDs of. + * @param jointIndex {number} Integer number of the model joint to get the children IDs of. + * @returns {Array.} + */ + function getChildrenIDsOfJoint(parentID: Uuid, jointIndex: number): Array.; + /** + * Check whether an entity or overlay has an entity as an ancestor (parent, parent's parent, etc.). + * @param childID {Uuid} The ID of the child entity or overlay to test for being a child, grandchild, etc. + * @param parentID {Uuid} The ID of the parent entity to test for being a parent, grandparent, etc. + * @returns {boolean} + */ + function isChildOfParent(childID: Uuid, parentID: Uuid): boolean; + /** + * Get the type — entity, overlay, or avatar — of an in-world item. + * @param entityID {Uuid} The ID of the item to get the type of. + * @returns {string} + */ + function getNestableType(entityID: Uuid): string; + /** + * Get the ID of the Entities.EntityType entity that has keyboard focus. + * @returns {Uuid} + */ + function getKeyboardFocusEntity(): Uuid; + /** + * Set the Entities.EntityType entity that has keyboard focus. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Web} entity to set keyboard focus to. Use + * null or {@link Uuid|Uuid.NULL} to unset keyboard focus from an entity. + */ + function setKeyboardFocusEntity(entityID: Uuid): void; + /** + * Emit a Entities.mousePressOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendMousePressOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.mouseMoveOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendMouseMoveOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.mouseReleaseOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendMouseReleaseOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.clickDownOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendClickDownOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.holdingClickOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendHoldingClickOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.clickReleaseOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendClickReleaseOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.hoverEnterEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendHoverEnterEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.hoverOverEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendHoverOverEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.hoverLeaveEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendHoverLeaveEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Check whether an entity wants hand controller pointer events. For example, a Entities.EntityType entity does + * but a Entities.EntityType entity doesn't. + * @param entityID {Uuid} The ID of the entity. + * @returns {boolean} + */ + function wantsHandControllerPointerEvents(entityID: Uuid): boolean; + /** + * Send a script event over a Entities.EntityType entity's EventBridge to the Web page's scripts. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Web} entity. + * @param message {string} The message to send. + */ + function emitScriptEvent(entityID: Uuid, message: string): void; + /** + * Check whether an axis-aligned box and a capsule intersect. + * @param brn {Vec3} The bottom right near (minimum axes values) corner of the AA box. + * @param dimensions {Vec3} The dimensions of the AA box. + * @param start {Vec3} One end of the capsule. + * @param end {Vec3} The other end of the capsule. + * @param radius {number} The radiues of the capsule. + * @returns {boolean} + */ + function AABoxIntersectsCapsule(brn: Vec3, dimensions: Vec3, start: Vec3, end: Vec3, radius: number): boolean; + /** + * Get the meshes in a Entities.EntityType or Entities.EntityType entity. + * @param entityID {Uuid} The ID of the Model or PolyVox entity to get the meshes of. + * @param callback {Entities~getMeshesCallback} The function to call upon completion. + */ + function getMeshes(entityID: Uuid, callback: Entities~getMeshesCallback): void; + /** + * Get the object to world transform, excluding scale, of an entity. + * @param entityID {Uuid} The ID of the entity. + * @returns {Mat4} + */ + function getEntityTransform(entityID: Uuid): Mat4; + /** + * Get the object to parent transform, excluding scale, of an entity. + * @param entityID {Uuid} The ID of the entity. + * @returns {Mat4} + */ + function getEntityLocalTransform(entityID: Uuid): Mat4; + /** + * Get the static certificate for an entity. The static certificate contains static properties of the item which cannot + * be altered. + * @param entityID {Uuid} The ID of the entity to get the static certificate for. + * @returns {string} + */ + function getStaticCertificateJSON(entityID: Uuid): string; + /** + * Verify the entity's proof of provenance, i.e., that the entity's certificateID property was produced by + * High Fidelity signing the entity's static certificate JSON. + * @param entityID {Uuid} The ID of the entity to verify. + * @returns {boolean} + */ + function verifyStaticCertificateProperties(entityID: Uuid): boolean; + /** + * Triggered on the client that is the physics simulation owner during the collision of two entities. Note: Isn't triggered + * for a collision with an avatar. + * @param idA {Uuid} The ID of one entity in the collision. For an entity script, this is the ID of the entity containing + * the script. + * @param idB {Uuid} The ID of the other entity in the collision. + * @param collision {Collision} The details of the collision. + * @returns {Signal} + */ + function collisionWithEntity(idA: Uuid, idB: Uuid, collision: Collision): Signal; + /** + * Triggered when your ability to change the locked property of entities changes. + * @param canAdjustLocks {boolean} true if the script can change the locked property of an + * entity, otherwise false. + * @returns {Signal} + */ + function canAdjustLocksChanged(canAdjustLocks: boolean): Signal; + /** + * Triggered when your ability to rez (create) entities changes. + * @param canRez {boolean} true if the script can rez (create) entities, otherwise false. + * @returns {Signal} + */ + function canRezChanged(canRez: boolean): Signal; + /** + * Triggered when your ability to rez (create) temporary entities changes. Temporary entities are entities with a finite + * lifetime property value set. + * @param canRezTmp {boolean} true if the script can rez (create) temporary entities, otherwise + * false. + * @returns {Signal} + */ + function canRezTmpChanged(canRezTmp: boolean): Signal; + /** + * Triggered when your ability to rez (create) certified entities changes. Certified entities are entities that have PoP + * certificates. + * @param canRezCertified {boolean} true if the script can rez (create) certified entities, otherwise + * false. + * @returns {Signal} + */ + function canRezCertifiedChanged(canRezCertified: boolean): Signal; + /** + * Triggered when your ability to rez (create) temporary certified entities changes. Temporary entities are entities with a + * finite lifetime property value set. Certified entities are entities that have PoP certificates. + * @param canRezTmpCertified {boolean} true if the script can rez (create) temporary certified entities, + * otherwise false. + * @returns {Signal} + */ + function canRezTmpCertifiedChanged(canRezTmpCertified: boolean): Signal; + /** + * Triggered when your ability to make changes to the asset server's assets changes. + * @param canWriteAssets {boolean} true if the script can change the ? property of an entity, + * otherwise false. + * @returns {Signal} + */ + function canWriteAssetsChanged(canWriteAssets: boolean): Signal; + /** + * Triggered when a mouse button is clicked while the mouse cursor is on an entity, or a controller trigger is fully + * pressed while its laser is on an entity. + * @param entityID {Uuid} The ID of the entity that was pressed. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mousePressOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse button is double-clicked while the mouse cursor is on an entity. + * @param entityID {Uuid} The ID of the entity that was double-pressed. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mouseDoublePressOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Repeatedly triggered while the mouse cursor or controller laser moves on an entity. + * @param entityID {Uuid} The ID of the entity that was moved on. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mouseMoveOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse button is released after clicking on an entity or the controller trigger is partly or fully + * released after pressing on an entity, even if the mouse pointer or controller laser has moved off the entity. + * @param entityID {Uuid} The ID of the entity that was originally pressed. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mouseReleaseOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse button is clicked while the mouse cursor is not on an entity. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mousePressOffEntity(event: PointerEvent): Signal; + /** + * Triggered when a mouse button is double-clicked while the mouse cursor is not on an entity. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mouseDoublePressOffEntity(event: PointerEvent): Signal; + /** + * Triggered when a mouse button is clicked while the mouse cursor is on an entity. Note: Not triggered by controller. + * @param entityID {Uuid} The ID of the entity that was clicked. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function clickDownOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Repeatedly triggered while a mouse button continues to be held after clicking an entity, even if the mouse cursor has + * moved off the entity. Note: Not triggered by controller. + * @param entityID {Uuid} The ID of the entity that was originally clicked. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function holdingClickOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse button is released after clicking on an entity, even if the mouse cursor has moved off the + * entity. Note: Not triggered by controller. + * @param entityID {Uuid} The ID of the entity that was originally clicked. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function clickReleaseOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when the mouse cursor or controller laser starts hovering on an entity. + * @param entityID {Uuid} The ID of the entity that is being hovered. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function hoverEnterEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Repeatedly triggered when the mouse cursor or controller laser moves while hovering over an entity. + * @param entityID {Uuid} The ID of the entity that is being hovered. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function hoverOverEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when the mouse cursor or controller laser stops hovering over an entity. + * @param entityID {Uuid} The ID of the entity that was being hovered. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function hoverLeaveEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when an avatar enters an entity. + * @param entityID {Uuid} The ID of the entity that the avatar entered. + * @returns {Signal} + */ + function enterEntity(entityID: Uuid): Signal; + /** + * Triggered when an avatar leaves an entity. + * @param entityID {Uuid} The ID of the entity that the avatar left. + * @returns {Signal} + */ + function leaveEntity(entityID: Uuid): Signal; + /** + * Triggered when an entity is deleted. + * @param entityID {Uuid} The ID of the entity deleted. + * @returns {Signal} + */ + function deletingEntity(entityID: Uuid): Signal; + /** + * Triggered when an entity is added to Interface's local in-memory tree of entities it knows about. This may occur when + * entities are loaded upon visiting a domain, when the user rotates their view so that more entities become visible, and when a domain or client-only entity is added (e.g., by Entities.addEntity). + * @param entityID {Uuid} The ID of the entity added. + * @returns {Signal} + */ + function addingEntity(entityID: Uuid): Signal; + /** + * Triggered when you disconnect from a domain, at which time Interface's local in-memory tree of entities it knows about + * is cleared. + * @returns {Signal} + */ + function clearingEntities(): Signal; + /** + * Triggered in when a script in a Entities.EntityType entity's Web page script sends an event over the + * script's EventBridge. + * @param entityID {Uuid} The ID of the entity that event was received from. + * @param message {string} The message received. + * @returns {Signal} + */ + function webEventReceived(entityID: Uuid, message: string): Signal; + interface Haze { + /** + * The horizontal distance at which visibility is reduced to 95%; i.e., 95% of each pixel's + * color is haze. + */ + hazeRange: number; + /** + * The color of the haze when looking away from the key light. + */ + hazeColor: Color; + /** + * If true then the haze is colored with glare from the key light; + * hazeGlareColor and hazeGlareAngle are used. + */ + hazeEnableGlare: boolean; + /** + * The color of the haze when looking towards the key light. + */ + hazeGlareColor: Color; + /** + * The angle in degrees across the circle around the key light that the glare color and + * haze color are blended 50/50. + */ + hazeGlareAngle: number; + /** + * If true then haze decreases with altitude as defined by the + * entity's local coordinate system; hazeBaseRef and hazeCeiling are used. + */ + hazeAltitudeEffect: boolean; + /** + * The y-axis value in the entity's local coordinate system at which the haze density starts + * reducing with altitude. + */ + hazeBaseRef: number; + /** + * The y-axis value in the entity's local coordinate system at which the haze density has + * reduced to 5%. + */ + hazeCeiling: number; + /** + * The proportion of the skybox image to show through the haze: 0.0 + * displays no skybox image; 1.0 displays no haze. + */ + hazeBackgroundBlend: number; + /** + * Currently not supported. + */ + hazeAttenuateKeyLight: boolean; + /** + * Currently not supported. + */ + hazeKeyLightRange: number; + /** + * Currently not supported. + */ + hazeKeyLightAltitude: number; + } + + interface KeyLight { + /** + * The color of the light. + */ + color: Color; + /** + * The intensity of the light. + */ + intensity: number; + /** + * The direction the light is shining. + */ + direction: Vec3; + /** + * If true then shadows are cast. Shadows are cast by avatars, plus + * Entities.EntityType and Entities.EntityType entities that have their Entities.EntityProperties property set to true. + */ + castShadows: boolean; + } + + interface Skybox { + /** + * Sets the color of the sky if url is "", otherwise modifies the + * color of the cube map image. + */ + color: Color; + /** + * A cube map image that is used to render the sky. + */ + url: string; + } + + /** + * Set the maximum number of entity packets that the client can send per second. + * @param packetsPerSecond {number} Integer maximum number of entity packets that the client can send per second. + */ + function setPacketsPerSecond(packetsPerSecond: number): void; + /** + * Get the maximum number of entity packets that the client can send per second. + * @returns {number} + */ + function getPacketsPerSecond(): number; + /** + * Check whether servers exist for the client to send entity packets to, i.e., whether you are connected to a domain and + * its entity server is working. + * @returns {boolean} + */ + function serversExist(): boolean; + /** + * Check whether the client has entity packets waiting to be sent. + * @returns {boolean} + */ + function hasPacketsToSend(): boolean; + /** + * Get the number of entity packets the client has waiting to be sent. + * @returns {number} + */ + function packetsToSendCount(): number; + /** + * Get the entity packets per second send rate of the client over its lifetime. + * @returns {number} + */ + function getLifetimePPS(): number; + /** + * Get the entity bytes per second send rate of the client over its lifetime. + * @returns {number} + */ + function getLifetimeBPS(): number; + /** + * Get the entity packets per second queued rate of the client over its lifetime. + * @returns {number} + */ + function getLifetimePPSQueued(): number; + /** + * Get the entity bytes per second queued rate of the client over its lifetime. + * @returns {number} + */ + function getLifetimeBPSQueued(): number; + /** + * Get the lifetime of the client from the first entity packet sent until now, in microseconds. + * @returns {number} + */ + function getLifetimeInUsecs(): number; + /** + * Get the lifetime of the client from the first entity packet sent until now, in seconds. + * @returns {number} + */ + function getLifetimeInSeconds(): number; + /** + * Get the total number of entity packets sent by the client over its lifetime. + * @returns {number} + */ + function getLifetimePacketsSent(): number; + /** + * Get the total bytes of entity packets sent by the client over its lifetime. + * @returns {number} + */ + function getLifetimeBytesSent(): number; + /** + * Get the total number of entity packets queued by the client over its lifetime. + * @returns {number} + */ + function getLifetimePacketsQueued(): number; + /** + * Get the total bytes of entity packets queued by the client over its lifetime. + * @returns {number} + */ + function getLifetimeBytesQueued(): number; + interface ActionArguments-Offset { + /** + * The target point to offset the entity from. + */ + pointToOffsetFrom: Vec3; + /** + * The distance away from the target point to position the entity. + */ + linearDistance: number; + /** + * Controls how long it takes for the entity's position to catch up with the + * target offset. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + linearTimeScale: number; + } + + interface ActionArguments-Tractor { + /** + * The target position. + */ + targetPosition: Vec3; + /** + * The target rotation. + */ + targetRotation: Quat; + /** + * If an entity ID, the targetPosition and targetRotation are + * relative to this entity's position and rotation. + */ + otherID: Uuid; + /** + * Controls how long it takes for the entity's position to catch up with the + * target position. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + linearTimeScale: number; + /** + * Controls how long it takes for the entity's orientation to catch up with the + * target orientation. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + angularTimeScale: number; + } + + interface ActionArguments-TravelOriented { + /** + * The axis of the entity to align with the entity's direction of travel. + */ + forward: Vec3; + /** + * Controls how long it takes for the entity's orientation to catch up with the + * direction of travel. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + angularTimeScale: number; + } + + interface ActionArguments-BallSocket { + /** + * The local offset of the joint relative to the entity's position. + */ + pivot: Vec3; + /** + * The ID of the other entity that is connected to the joint. + */ + otherEntityID: Uuid; + /** + * The local offset of the joint relative to the other entity's position. + */ + otherPivot: Vec3; + } + + interface ActionArguments-ConeTwist { + /** + * The local offset of the joint relative to the entity's position. + */ + pivot: Vec3; + /** + * The axis of the entity that moves through the cone. Must be a non-zero vector. + */ + axis: Vec3; + /** + * The ID of the other entity that is connected to the joint. + */ + otherEntityID: Uuid; + /** + * The local offset of the joint relative to the other entity's position. + */ + otherPivot: Vec3; + /** + * The axis of the other entity that moves through the cone. Must be a non-zero vector. + */ + otherAxis: Vec3; + /** + * The angle through which the joint can move in one axis of the cone, in radians. + */ + swingSpan1: number; + /** + * The angle through which the joint can move in the other axis of the cone, in radians. + */ + swingSpan2: number; + /** + * The angle through with the joint can twist, in radians. + */ + twistSpan: number; + } + + interface ActionArguments-Hinge { + /** + * The local offset of the joint relative to the entity's position. + */ + pivot: Vec3; + /** + * The axis of the entity that it pivots about. Must be a non-zero vector. + */ + axis: Vec3; + /** + * The ID of the other entity that is connected to the joint, if any. If none is + * specified then the first entity simply pivots about its specified axis. + */ + otherEntityID: Uuid; + /** + * The local offset of the joint relative to the other entity's position. + */ + otherPivot: Vec3; + /** + * The axis of the other entity that it pivots about. Must be a non-zero vector. + */ + otherAxis: Vec3; + /** + * The most negative angle that the hinge can take, in radians. + */ + low: number; + /** + * The most positive angle that the hinge can take, in radians. + */ + high: number; + /** + * The current angle of the hinge. Read-only. + */ + angle: number; + } + + interface ActionArguments-Slider { + /** + * The local position of a point in the entity that slides along the axis. + */ + point: Vec3; + /** + * The axis of the entity that slides along the joint. Must be a non-zero vector. + */ + axis: Vec3; + /** + * The ID of the other entity that is connected to the joint, if any. If non is + * specified then the first entity simply slides and rotates about its specified axis. + */ + otherEntityID: Uuid; + /** + * The local position of a point in the other entity that slides along the axis. + */ + otherPoint: Vec3; + /** + * The axis of the other entity that slides along the joint. Must be a non-zero vector. + */ + axis: Vec3; + /** + * The most negative linear offset from the entity's initial point that the entity can + * have along the slider. + */ + linearLow: number; + /** + * The most positive linear offset from the entity's initial point that the entity can + * have along the slider. + */ + linearHigh: number; + /** + * The most negative angle that the entity can rotate about the axis if the action + * involves only one entity, otherwise the most negative angle the rotation can be between the two entities. In radians. + */ + angularLow: number; + /** + * The most positive angle that the entity can rotate about the axis if the action + * involves only one entity, otherwise the most positive angle the rotation can be between the two entities. In radians. + */ + angularHigh: number; + /** + * The current linear offset the entity is from its initial point if the action involves + * only one entity, otherwise the linear offset between the two entities' action points. Read-only. + */ + linearPosition: number; + /** + * The current angular offset of the entity from its initial rotation if the action + * involves only one entity, otherwise the angular offset between the two entities. Read-only. + */ + angularPosition: number; + } + + interface ActionArguments { + /** + * The type of action. + */ + type: Entities.ActionType; + /** + * A string that a script can use for its own purposes. + */ + tag: string; + /** + * How long the action should exist, in seconds, before it is automatically deleted. A value of + * 0 means that the action should not be deleted. + */ + ttl: number; + /** + * Is true if you created the action during your current Interface session, + * false otherwise. Read-only. + */ + isMine: boolean; + /** + * Is present when the entity hasn't been registered with the physics engine yet (e.g., + * if the action hasn't been properly configured), otherwise undefined. Read-only. + */ + ::no-motion-state: boolean; + /** + * Is true when the action is modifying the entity's motion, false + * otherwise. Is present once the entity has been registered with the physics engine, otherwise undefined. Read-only. + */ + ::active: boolean; + /** + * How the entity moves with the action. Is present once the entity has + * been registered with the physics engine, otherwise undefined. Read-only. + */ + ::motion-type: Entities.PhysicsMotionType; + } + + /** + * Triggered when the script starts for a user. + * Note: Can only be connected to via this.preload = function (...) { ... } in the entity script. Available in:Client Entity ScriptsServer Entity Scripts + * @param entityID {Uuid} The ID of the entity that the script is running in. + * @returns {Signal} + */ + function preload(entityID: Uuid): Signal; + /** + * Triggered when the script terminates for a user. + * Note: Can only be connected to via this.unoad = function () { ... } in the entity script. Available in:Client Entity ScriptsServer Entity Scripts + * @returns {Signal} + */ + function unload(): Signal; + /** + * Get or set the Entities.EntityType entity that has keyboard focus. + * If no entity has keyboard focus, get returns null; set to null or Uuid to clear keyboard focus. + */ + let keyboardFocusEntity: Uuid; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe experimental Graphics API (experimental) lets you query and manage certain graphics-related structures (like underlying meshes and textures) from scripting. + */ +declare namespace Graphics { + interface Material { + name: string; + model: string; + opacity: number; + roughness: number; + metallic: number; + scattering: number; + unlit: boolean; + emissiveMap: string; + albedoMap: string; + opacityMap: string; + metallicMap: string; + specularMap: string; + roughnessMap: string; + glossMap: string; + normalMap: string; + bumpMap: string; + occlusionMap: string; + lightmapMap: string; + scatteringMap: string; + } + + interface MaterialLayer { + /** + * This layer's material. + */ + material: Graphics.Material; + /** + * The priority of this layer. If multiple materials are applied to a mesh part, only the highest priority layer is used. + */ + priority: number; + } + + interface IFSData { + /** + * mesh name (useful for debugging / debug prints). + */ + name: string; + topology: string; + /** + * vertex indices to use for the mesh faces. + */ + indices: Array.; + /** + * vertex positions (model space) + */ + vertices: Array.; + /** + * vertex normals (normalized) + */ + normals: Array.; + /** + * vertex colors (normalized) + */ + colors: Array.; + /** + * vertex texture coordinates (normalized) + */ + texCoords0: Array.; + } + + /** + * Returns a model reference object associated with the specified UUID ( EntityID, OverlayID, or AvatarID). + * @param entityID {UUID} The objectID of the model whose meshes are to be retrieved. + * @returns {Graphics.Model} + */ + function getModel(entityID: UUID): Graphics.Model; + /** + * @param id {Uuid} + * @param model {Graphics.Model} + * @returns {boolean} + */ + function updateModel(id: Uuid, model: Graphics.Model): boolean; + /** + * @param id {Uuid} + * @param meshIndex {number} [meshIndex=-1] + * @param partNumber {number} [partNumber=-1] + * @returns {boolean} + */ + function canUpdateModel(id: Uuid, meshIndex: number, partNumber: number): boolean; + /** + * @param meshes {Array.} + * @returns {Graphics.Model} + */ + function newModel(meshes: Array.): Graphics.Model; + /** + * Create a new Mesh / Mesh Part with the specified data buffers. + * @param ifsMeshData {Graphics.IFSData} Index-Faced Set (IFS) arrays used to create the new mesh. + * @returns {Graphics.Mesh} + */ + function newMesh(ifsMeshData: Graphics.IFSData): Graphics.Mesh; + /** + * @param model {Graphics.Model} + * @returns {string} + */ + function exportModelToOBJ(model: Graphics.Model): string; + interface Mesh { + /** + * Array of submesh part references. + */ + parts: Array.; + /** + * Vertex attribute names (color, normal, etc.) + */ + attributeNames: Array.; + /** + * The number of parts contained in the mesh. + */ + numParts: number; + /** + * Total number of vertex indices in the mesh. + */ + numIndices: number; + /** + * Total number of vertices in the Mesh. + */ + numVertices: number; + /** + * Number of currently defined vertex attributes. + */ + numAttributes: number; + valid: boolean; + strong: boolean; + extents: object; + bufferFormats: object; + } + + interface MeshPart { + valid: boolean; + /** + * The part index (within the containing Mesh). + */ + partIndex: number; + firstVertexIndex: number; + baseVertexIndex: number; + lastVertexIndex: number; + /** + * element interpretation (currently only 'triangles' is supported). + */ + topology: Graphics.Topology; + /** + * Vertex attribute names (color, normal, etc.) + */ + attributeNames: Array.; + /** + * Number of vertex indices that this mesh part refers to. + */ + numIndices: number; + /** + * Number of vertices per face (eg: 3 when topology is 'triangles'). + */ + numVerticesPerFace: number; + /** + * Number of faces represented by the mesh part (numIndices / numVerticesPerFace). + */ + numFaces: number; + /** + * Total number of vertices in the containing Mesh. + */ + numVertices: number; + /** + * Number of currently defined vertex attributes. + */ + numAttributes: number; + extents: object; + bufferFormats: object; + } + + interface Model { + /** + * UUID of corresponding inworld object (if model is associated) + */ + objectID: Uuid; + /** + * The number of submeshes contained in the model. + */ + numMeshes: number; + /** + * Array of submesh references. + */ + meshes: Array.; + /** + * Map of materials layer lists. You can look up a material layer list by mesh part number or by material name. + */ + materialLayers: Object.>; + /** + * Array of all the material names used by the mesh parts of this model, in order (e.g. materialNames[0] is the name of the first mesh part's material). + */ + materialNames: Array.; + } + +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Midi { + /** + * Send Raw MIDI packet to a particular device. + * @param device {number} Integer device number. + * @param raw {number} Integer (DWORD) raw MIDI message. + */ + function sendRawDword(device: number, raw: number): void; + /** + * Send MIDI message to a particular device. + * @param device {number} Integer device number. + * @param channel {number} Integer channel number. + * @param type {number} 0x8 is note off, 0x9 is note on (if velocity=0, note off), etc. + * @param note {number} MIDI note number. + * @param velocity {number} Note velocity (0 means note off). + */ + function sendMidiMessage(device: number, channel: number, type: number, note: number, velocity: number): void; + /** + * Play a note on all connected devices. + * @param status {number} 0x80 is note off, 0x90 is note on (if velocity=0, note off), etc. + * @param note {number} MIDI note number. + * @param velocity {number} Note velocity (0 means note off). + */ + function playMidiNote(status: number, note: number, velocity: number): void; + /** + * Turn off all notes on all connected devices. + */ + function allNotesOff(): void; + /** + * Clean up and re-discover attached devices. + */ + function resetDevices(): void; + /** + * Get a list of inputs/outputs. + * @param output {boolean} + * @returns {Array.} + */ + function listMidiDevices(output: boolean): Array.; + /** + * Block an input/output by name. + * @param name {string} + * @param output {boolean} + */ + function blockMidiDevice(name: string, output: boolean): void; + /** + * Unblock an input/output by name. + * @param name {string} + * @param output {boolean} + */ + function unblockMidiDevice(name: string, output: boolean): void; + /** + * Repeat all incoming notes to all outputs (default disabled). + * @param enable {boolean} + */ + function thruModeEnable(enable: boolean): void; + /** + * Broadcast on all unblocked devices. + * @param enable {boolean} + */ + function broadcastEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeNoteOffEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeNoteOnEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typePolyKeyPressureEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeControlChangeEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeProgramChangeEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeChanPressureEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typePitchBendEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeSystemMessageEnable(enable: boolean): void; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsAPI to manage model cache resources. + */ +declare namespace ModelCache { + /** + * Get the list of all resource URLs. + * @returns {Array.} + */ + function getResourceList(): Array.; + /** + * @param deltaSize {number} + */ + function updateTotalSize(deltaSize: number): void; + /** + * Prefetches a resource. + * @param url {string} URL of the resource to prefetch. + * @param extra {object} [extra=null] + * @returns {ResourceObject} + */ + function prefetch(url: string, extra: object): ResourceObject; + /** + * @returns {Signal} + */ + function dirty(): Signal; + /** + * Total number of total resources. Read-only. + */ + let numTotal: number; + /** + * Total number of cached resource. Read-only. + */ + let numCached: number; + /** + * Size in bytes of all resources. Read-only. + */ + let sizeTotal: number; + /** + * Size in bytes of all cached resources. Read-only. + */ + let sizeCached: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsAPI to manage texture cache resources. + */ +declare namespace TextureCache { + /** + * @param url {string} + * @param type {number} + * @param maxNumPixels {number} [maxNumPixels=67108864] + * @returns {ResourceObject} + */ + function prefetch(url: string, type: number, maxNumPixels: number): ResourceObject; + /** + * @returns {Signal} + */ + function spectatorCameraFramebufferReset(): Signal; + /** + * Get the list of all resource URLs. + * @returns {Array.} + */ + function getResourceList(): Array.; + /** + * @param deltaSize {number} + */ + function updateTotalSize(deltaSize: number): void; + /** + * Prefetches a resource. + * @param url {string} URL of the resource to prefetch. + * @param extra {object} [extra=null] + * @returns {ResourceObject} + */ + function prefetch(url: string, extra: object): ResourceObject; + /** + * @returns {Signal} + */ + function dirty(): Signal; + /** + * Total number of total resources. Read-only. + */ + let numTotal: number; + /** + * Total number of cached resource. Read-only. + */ + let numCached: number; + /** + * Size in bytes of all resources. Read-only. + */ + let sizeTotal: number; + /** + * Size in bytes of all cached resources. Read-only. + */ + let sizeCached: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsAssignment Client ScriptsThe location API provides facilities related to your current location in the metaverse. + * Getter/Setter You can get and set your current metaverse address by directly reading a string value from and writing a string value to the location object. This is an alternative to using the location.href property or this object's functions. + */ +declare namespace location { + /** + * Go to a specified metaverse address. + * @param address {string} The address to go to: a "hifi://" address, an IP address (e.g., + * "127.0.0.1" or "localhost"), a domain name, a named path on a domain (starts with "/"), a position or position and orientation, or a user (starts with "@"). + * @param fromSuggestions {boolean} Set to true if the address is obtained from the "Goto" dialog. + * Helps ensure that user's location history is correctly maintained. + */ + function handleLookupString(address: string, fromSuggestions: boolean): void; + /** + * Go to a position and orientation resulting from a lookup for a named path in the domain (set in the domain server's + * settings). + * @param path {string} The position and orientation corresponding to the named path. + * @param namedPath {string} The named path that was looked up on the server. + */ + function goToViewpointForPath(path: string, namedPath: string): void; + /** + * Go back to the previous location in your navigation history, if there is one. + */ + function goBack(): void; + /** + * Go forward to the next location in your navigation history, if there is one. + */ + function goForward(): void; + /** + * Go to the local Sandbox server that's running on the same PC as Interface. + * @param path {string} The position and orientation to go to (e.g., "/0,0,0"). + * @param trigger {location.LookupTrigger} The reason for the function call. Helps ensure that user's + * location history is correctly maintained. + */ + function goToLocalSandbox(path: string, trigger: location.LookupTrigger): void; + /** + * Go to the default "welcome" metaverse address. + * @param trigger {location.LookupTrigger} The reason for the function call. Helps ensure that user's + * location history is correctly maintained. + */ + function goToEntry(trigger: location.LookupTrigger): void; + /** + * Go to the specified user's location. + * @param username {string} The user's username. + * @param matchOrientation {boolean} If true then go to a location just in front of the user and turn to face + * them, otherwise go to the user's exact location and orientation. + */ + function goToUser(username: string, matchOrientation: boolean): void; + /** + * Go to the last address tried. This will be the last URL tried from location.handleLookupString + */ + function goToLastAddress(): void; + /** + * Returns if going back is possible. + */ + function canGoBack(): void; + /** + * Refresh the current address, e.g., after connecting to a domain in order to position the user to the desired location. + */ + function refreshPreviousLookup(): void; + /** + * Update your current metaverse location in Interface's Settings file as your last-known address. This can be used + * to ensure that you start up at that address if you exit Interface without a later address automatically being saved. + */ + function storeCurrentAddress(): void; + /** + * Copy your current metaverse address (i.e., location.href property value) to the OS clipboard. + */ + function copyAddress(): void; + /** + * Copy your current metaverse location and orientation (i.e., location.pathname property value) to the OS + * clipboard. + */ + function copyPath(): void; + /** + * Retrieve and remember the place name for the given domain ID if the place name is not already known. + * @param domainID {Uuid} The UUID of the domain. + */ + function lookupShareableNameForDomainID(domainID: Uuid): void; + /** + * Triggered when looking up the details of a metaverse user or location to go to has completed (successfully or + * unsuccessfully). + * @returns {Signal} + */ + function lookupResultsFinished(): Signal; + /** + * Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user is + * offline. + * @returns {Signal} + */ + function lookupResultIsOffline(): Signal; + /** + * Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user could + * not be found. + * @returns {Signal} + */ + function lookupResultIsNotFound(): Signal; + /** + * Triggered when a request is made to go to an IP address. + * @param domainURL {Url} URL for domain + * @param domainID {Uuid} The UUID of the domain to go to. + * @returns {Signal} + */ + function possibleDomainChangeRequired(domainURL: Url, domainID: Uuid): Signal; + /** + * Triggered when a request is made to go to a named domain or user. + * @param iceServerHostName {string} IP address of the ICE server. + * @param domainID {Uuid} The UUID of the domain to go to. + * @returns {Signal} + */ + function possibleDomainChangeRequiredViaICEForID(iceServerHostName: string, domainID: Uuid): Signal; + /** + * Triggered when an attempt is made to send your avatar to a specified position on the current domain. For example, when + * you change domains or enter a position to go to in the "Goto" dialog. + * @param position {Vec3} The position to go to. + * @param hasOrientationChange {boolean} If true then a new orientation has been requested. + * @param orientation {Quat} The orientation to change to. Is {@link Quat|Quat.IDENTITY} if + * hasOrientationChange is false. + * @param shouldFaceLocation {boolean} If true then the request is to go to a position near that specified + * and orient your avatar to face it. For example when you visit someone from the "People" dialog. + * @returns {Signal} + */ + function locationChangeRequired(position: Vec3, hasOrientationChange: boolean, orientation: Quat, shouldFaceLocation: boolean): Signal; + /** + * Triggered when an attempt is made to send your avatar to a new named path on the domain (set in the domain server's + * settings). For example, when you enter a "/" followed by the path's name in the "GOTO" dialog. + * @param path {string} The name of the path to go to. + * @returns {Signal} + */ + function pathChangeRequired(path: string): Signal; + /** + * Triggered when you navigate to a new domain. + * @param hostname {string} The new domain's host name. + * @returns {Signal} + */ + function hostChanged(hostname: string): Signal; + /** + * Triggered when there's a change in whether or not there's a previous location that can be navigated to using + * location.goBack. (Reflects changes in the state of the "Goto" dialog's back arrow.) + * @param isPossible {boolean} true if there's a previous location to navigate to, otherwise + * false. + * @returns {Signal} + */ + function goBackPossible(isPossible: boolean): Signal; + /** + * Triggered when there's a change in whether or not there's a forward location that can be navigated to using + * location.goForward. (Reflects changes in the state of the "Goto" dialog's forward arrow.) + * @param isPossible {boolean} true if there's a forward location to navigate to, otherwise + * false. + * @returns {Signal} + */ + function goForwardPossible(isPossible: boolean): Signal; + /** + * A UUID uniquely identifying the domain you're visiting. Is Uuid if you're not + * connected to the domain or are in a serverless domain. Read-only. + */ + let domainID: Uuid; + /** + * The name of the domain for your current metaverse address (e.g., "AvatarIsland", + * localhost, or an IP address). Is blank if you're in a serverless domain. Read-only. + */ + let hostname: string; + /** + * Your current metaverse address (e.g., "hifi://avatarisland/15,-10,26/0,0,0,1") + * regardless of whether or not you're connected to the domain. Starts with "file:///" if you're in a serverless domain. Read-only. + */ + let href: string; + /** + * true if you're connected to the domain in your current href + * metaverse address, otherwise false. + */ + let isConnected: boolean; + /** + * The location and orientation in your current href metaverse address + * (e.g., "/15,-10,26/0,0,0,1"). Read-only. + */ + let pathname: string; + /** + * The place name in your current href metaverse address + * (e.g., "AvatarIsland"). Is blank if your hostname is an IP address. Read-only. + */ + let placename: string; + /** + * The protocol of your current href metaverse address (e.g., "hifi"). + * Read-only. + */ + let protocol: string; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Messages API enables text and data to be sent between scripts over named "channels". A channel can have an arbitrary + * name to help separate messaging between different sets of scripts. Note: If you want to call a function in another script, you should use one of the following rather than sending a message: Entities.callEntityClientMethod Entities.callEntityMethod Entities.callEntityServerMethod Script.callEntityScriptMethod + */ +declare namespace Messages { + /** + * Send a text message on a channel. + * @param channel {string} The channel to send the message on. + * @param message {string} The message to send. + * @param localOnly {boolean} [localOnly=false] If false then the message is sent to all Interface, client entity, + * server entity, and assignment client scripts in the domain.
If true then: if sent from an Interface or client entity script it is received by all Interface and client entity scripts; if sent from a server entity script it is received by all entity server scripts; and if sent from an assignment client script it is received only by that same assignment client script. + */ + function sendMessage(channel: string, message: string, localOnly: boolean): void; + /** + * Send a text message locally on a channel. + * This is the same as calling Messages.sendMessage with localOnly set to true. + * @param channel {string} The channel to send the message on. + * @param message {string} The message to send. + */ + function sendLocalMessage(channel: string, message: string): void; + /** + * Send a data message on a channel. + * @param channel {string} The channel to send the data on. + * @param data {object} The data to send. The data is handled as a byte stream, for example as may be provided via a + * JavaScript Int8Array object. + * @param localOnly {boolean} [localOnly=false] If false then the message is sent to all Interface, client entity, + * server entity, and assignment client scripts in the domain.
If true then: if sent from an Interface or client entity script it is received by all Interface and client entity scripts; if sent from a server entity script it is received by all entity server scripts; and if sent from an assignment client script it is received only by that same assignment client script. + */ + function sendData(channel: string, data: object, localOnly: boolean): void; + /** + * Subscribe the scripting environment — Interface, the entity script server, or assignment client instance — + * to receive messages on a specific channel. Note that, for example, if there are two Interface scripts that subscribe to different channels, both scripts will receive messages on both channels. + * @param channel {string} The channel to subscribe to. + */ + function subscribe(channel: string): void; + /** + * Unsubscribe the scripting environment from receiving messages on a specific channel. + * @param channel {string} The channel to unsubscribe from. + */ + function unsubscribe(channel: string): void; + /** + * Triggered when the a text message is received. + * @param channel {string} The channel that the message was sent on. You can use this to filter out messages not relevant + * to your script. + * @param message {string} The message received. + * @param senderID {Uuid} The UUID of the sender: the user's session UUID if sent by an Interface or client entity + * script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client instance if sent by an assignment client script. + * @param localOnly {boolean} true if the message was sent with localOnly = true. + * @returns {Signal} + */ + function messageReceived(channel: string, message: string, senderID: Uuid, localOnly: boolean): Signal; + /** + * Triggered when a data message is received. + * @param channel {string} The channel that the message was sent on. You can use this to filter out messages not relevant + * to your script. + * @param data {object} The data received. The data is handled as a byte stream, for example as may be used by a + * JavaScript Int8Array object. + * @param senderID {Uuid} The UUID of the sender: the user's session UUID if sent by an Interface or client entity + * script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client instance if sent by an assignment client script. + * @param localOnly {boolean} true if the message was sent with localOnly = true. + * @returns {Signal} + */ + function dataReceived(channel: string, data: object, senderID: Uuid, localOnly: boolean): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare class ResourceObject { + /** + * Release this resource. + */ + release(): void; + /** + * Triggered when download progress for this resource has changed. + * @param bytesReceived {number} Byytes downloaded so far. + * @param bytesTotal {number} Total number of bytes in the resource. + * @returns {Signal} + */ + progressChanged(bytesReceived: number, bytesTotal: number): Signal; + /** + * Triggered when resource loading state has changed. + * @param state {Resource.State} New state. + * @returns {Signal} + */ + stateChanged(state: Resource.State): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare namespace Resources { + /** + * @param prefix {string} + * @param replacement {string} + */ + function overrideUrlPrefix(prefix: string, replacement: string): void; + /** + * @param prefix {string} + */ + function restoreUrlPrefix(prefix: string): void; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Steam { + /** + * @returns {boolean} + */ + function isRunning(): boolean; + function openInviteOverlay(): void; + /** + * Read-only. + */ + let running: boolean; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsEnum for different types of Picks and Pointers. + */ +declare namespace PickType { + /** + * Ray Picks intersect a ray with the nearest object in front of them, along a given direction. + */ + let Ray: number; + /** + * Stylus Picks provide "tapping" functionality on/into flat surfaces. + */ + let Stylus: number; + /** + * Parabola Picks intersect a parabola with the nearest object in front of them, with a given initial velocity and acceleration. + */ + let Parabola: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Assets API allows you to communicate with the Asset Browser. + */ +declare namespace Assets { + /** + * @param input {string} + * @returns {boolean} + */ + function isValidPath(input: string): boolean; + /** + * @param input {string} + * @returns {boolean} + */ + function isValidFilePath(input: string): boolean; + /** + * @param input {string} + * @returns {string} + */ + function getATPUrl(input: string): string; + /** + * @param input {string} + * @returns {string} + */ + function extractAssetHash(input: string): string; + /** + * @param input {string} + * @returns {boolean} + */ + function isValidHash(input: string): boolean; + /** + * @param data {} + * @returns {object} + */ + function hashData(data): object; + /** + * @param data {} + * @returns {string} + */ + function hashDataHex(data): string; + /** + * Upload content to the connected domain's asset server. + * @param data {string} content to upload + * @param callback {Assets~uploadDataCallback} called when upload is complete + */ + function uploadData(data: string, callback: Assets~uploadDataCallback): void; + /** + * Download data from the connected domain's asset server. + * @param url {string} URL of asset to download, must be ATP scheme URL. + * @param callback {Assets~downloadDataCallback} + */ + function downloadData(url: string, callback: Assets~downloadDataCallback): void; + /** + * Sets up a path to hash mapping within the connected domain's asset server + * @param path {string} + * @param hash {string} + * @param callback {Assets~setMappingCallback} + */ + function setMapping(path: string, hash: string, callback: Assets~setMappingCallback): void; + /** + * Look up a path to hash mapping within the connected domain's asset server + * @param path {string} + * @param callback {Assets~getMappingCallback} + */ + function getMapping(path: string, callback: Assets~getMappingCallback): void; + /** + * @param path {string} + * @param enabled {boolean} + * @param callback {} + */ + function setBakingEnabled(path: string, enabled: boolean, callback): void; + /** + * Request Asset data from the ATP Server + * @param options {URL} An atp: style URL, hash, or relative mapped path; or an {@link Assets.GetOptions} object with request parameters + * @param scope {Assets~getAssetCallback} A scope callback function to receive (error, results) values + * @param callback {function} [callback=undefined] + */ + function getAsset(options: URL, scope: Assets~getAssetCallback, callback: function): void; + interface GetOptions { + /** + * an "atp:" style URL, hash, or relative mapped path to fetch + */ + url: string; + /** + * the desired reponse type (text | arraybuffer | json) + */ + responseType: string; + /** + * whether to attempt gunzip decompression on the fetched data + * See: Assets.putAsset and its .compress=true option + */ + decompress: boolean; + } + + interface getAssetResult { + /** + * the resolved "atp:" style URL for the fetched asset + */ + url: string; + /** + * the resolved hash for the fetched asset + */ + hash: string; + /** + * response data (possibly converted per .responseType value) + */ + response: string; + /** + * response type (text | arraybuffer | json) + */ + responseType: string; + /** + * detected asset mime-type (autodetected) + */ + contentType: string; + /** + * response data size in bytes + */ + byteLength: number; + /** + * flag indicating whether data was decompressed + */ + decompressed: number; + } + + /** + * Upload Asset data to the ATP Server + * @param options {Assets.PutOptions} A PutOptions object with upload parameters + * @param scope[callback {Assets~putAssetCallback} A scoped callback function invoked with (error, results) + * @param callback {function} [callback=undefined] + */ + function putAsset(options: Assets.PutOptions, scope[callback: Assets~putAssetCallback, callback: function): void; + interface PutOptions { + /** + * byte buffer or string value representing the new asset's content + */ + data: ArrayBuffer; + /** + * ATP path mapping to automatically create (upon successful upload to hash) + */ + path: string; + /** + * whether to gzip compress data before uploading + */ + compress: boolean; + } + + interface putAssetResult { + /** + * the resolved "atp:" style URL for the uploaded asset (based on .path if specified, otherwise on the resulting ATP hash) + */ + url: string; + /** + * the uploaded asset's resulting ATP path (or undefined if no path mapping was assigned) + */ + path: string; + /** + * the uploaded asset's resulting ATP hash + */ + hash: string; + /** + * flag indicating whether the data was compressed before upload + */ + compressed: boolean; + /** + * flag indicating final byte size of the data uploaded to the ATP server + */ + byteLength: number; + } + + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=""] + */ + function deleteAsset(options, scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=""] + */ + function resolveAsset(options, scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=""] + */ + function decompressData(options, scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=""] + */ + function compressData(options, scope, callback): void; + /** + * @returns {boolean} + */ + function initializeCache(): boolean; + /** + * @param url {string} + * @returns {boolean} + */ + function canWriteCacheValue(url: string): boolean; + /** + * @param scope {} + * @param callback {} [callback=undefined] + */ + function getCacheStatus(scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=undefined] + */ + function queryCacheMeta(options, scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=undefined] + */ + function loadFromCache(options, scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=undefined] + */ + function saveToCache(options, scope, callback): void; + /** + * @param url {} + * @param data {} + * @param metadata {} + * @param scope {} + * @param callback {} [callback=undefined] + */ + function saveToCache(url, data, metadata, scope, callback): void; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare namespace File { + /** + * @param url {string} + * @returns {string} + */ + function convertUrlToPath(url: string): string; + /** + * @param path {string} + * @param url {string} + * @param autoAdd {boolean} + * @param isZip {boolean} + * @param isBlocks {boolean} + */ + function runUnzip(path: string, url: string, autoAdd: boolean, isZip: boolean, isBlocks: boolean): void; + /** + * @returns {string} + */ + function getTempDir(): string; + /** + * @param zipFile {string} + * @param unzipFile {string} + * @param autoAdd {boolean} + * @param isZip {boolean} + * @param isBlocks {boolean} + * @returns {Signal} + */ + function unzipResult(zipFile: string, unzipFile: string, autoAdd: boolean, isZip: boolean, isBlocks: boolean): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare namespace Mat4 { + /** + * @param m1 {Mat4} + * @param m2 {Mat4} + * @returns {Mat4} + */ + function multiply(m1: Mat4, m2: Mat4): Mat4; + /** + * @param rot {Quat} + * @param trans {Vec3} + * @returns {Mat4} + */ + function createFromRotAndTrans(rot: Quat, trans: Vec3): Mat4; + /** + * @param scale {Vec3} + * @param rot {Quat} + * @param trans {Vec3} + * @returns {Mat4} + */ + function createFromScaleRotAndTrans(scale: Vec3, rot: Quat, trans: Vec3): Mat4; + /** + * @param col0 {Vec4} + * @param col1 {Vec4} + * @param col2 {Vec4} + * @param col {Vec4} + * @returns {Mat4} + */ + function createFromColumns(col0: Vec4, col1: Vec4, col2: Vec4, col: Vec4): Mat4; + /** + * @param numbers {Array.} + * @returns {Mat4} + */ + function createFromArray(numbers: Array.): Mat4; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function extractTranslation(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function extractRotation(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function extractScale(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @param point {Vec3} + * @returns {Vec3} + */ + function transformPoint(m: Mat4, point: Vec3): Vec3; + /** + * @param m {Mat4} + * @param vector {Vec3} + * @returns {Vec3} + */ + function transformVector(m: Mat4, vector: Vec3): Vec3; + /** + * @param m {Mat4} + * @returns {Mat4} + */ + function inverse(m: Mat4): Mat4; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function getFront(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function getForward(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function getRight(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function getUp(m: Mat4): Vec3; + /** + * @param label {string} + * @param m {Mat4} + * @param transpose {boolean} [transpose=false] + */ + function print(label: string, m: Mat4, transpose: boolean): void; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Quat API provides facilities for generating and manipulating quaternions. + * Quaternions should be used in preference to Euler angles wherever possible because quaternions don't suffer from the problem of gimbal lock. + */ +declare namespace Quat { + /** + * Multiply two quaternions. + * @param q1 {Quat} The first quaternion. + * @param q2 {Quat} The second quaternion. + * @returns {Quat} + */ + function multiply(q1: Quat, q2: Quat): Quat; + /** + * Normalizes a quaternion. + * @param q {Quat} The quaternion to normalize. + * @returns {Quat} + */ + function normalize(q: Quat): Quat; + /** + * Calculate the conjugate of a quaternion. For a unit quaternion, its conjugate is the same as its + * Quat.inverse. + * @param q {Quat} The quaternion to conjugate. + * @returns {Quat} + */ + function conjugate(q: Quat): Quat; + /** + * Calculate a camera orientation given eye position, point of interest, and "up" direction. The camera's negative z-axis is + * the forward direction. The result has zero roll about its forward direction with respect to the given "up" direction. + * @param eye {Vec3} The eye position. + * @param target {Vec3} The point to look at. + * @param up {Vec3} The "up" direction. + * @returns {Quat} + */ + function lookAt(eye: Vec3, target: Vec3, up: Vec3): Quat; + /** + * Calculate a camera orientation given eye position and point of interest. The camera's negative z-axis is the forward + * direction. The result has zero roll about its forward direction. + * @param eye {Vec3} The eye position. + * @param target {Vec3} The point to look at. + * @returns {Quat} + */ + function lookAtSimple(eye: Vec3, target: Vec3): Quat; + /** + * Calculate the shortest rotation from a first vector onto a second. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {Quat} + */ + function rotationBetween(v1: Vec3, v2: Vec3): Quat; + /** + * Generate a quaternion from a Vec3 of Euler angles in degrees. + * @param vector {Vec3} A vector of three Euler angles in degrees, the angles being the rotations about the x, y, and z + * axes. + * @returns {Quat} + */ + function fromVec3Degrees(vector: Vec3): Quat; + /** + * Generate a quaternion from a Vec3 of Euler angles in radians. + * @param vector {Vec3} A vector of three Euler angles in radians, the angles being the rotations about the x, y, and z + * axes. + * @returns {Quat} + */ + function fromVec3Radians(vector: Vec3): Quat; + /** + * Generate a quaternion from pitch, yaw, and roll values in degrees. + * @param pitch {number} The pitch angle in degrees. + * @param yaw {number} The yaw angle in degrees. + * @param roll {number} The roll angle in degrees. + * @returns {Quat} + */ + function fromPitchYawRollDegrees(pitch: number, yaw: number, roll: number): Quat; + /** + * Generate a quaternion from pitch, yaw, and roll values in radians. + * @param pitch {number} The pitch angle in radians. + * @param yaw {number} The yaw angle in radians. + * @param roll {number} The roll angle in radians. + * @returns {Quat} + */ + function fromPitchYawRollRadians(pitch: number, yaw: number, roll: number): Quat; + /** + * Calculate the inverse of a quaternion. For a unit quaternion, its inverse is the same as its + * Quat.conjugate. + * @param q {Quat} The quaternion. + * @returns {Quat} + */ + function inverse(q: Quat): Quat; + /** + * Get the "front" direction that the camera would face if its orientation was set to the quaternion value. + * This is a synonym for Quat.getForward. The High Fidelity camera has axes x = right, y = up, -z = forward. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Vec3} + */ + function getFront(orientation: Quat): Vec3; + /** + * Get the "forward" direction that the camera would face if its orientation was set to the quaternion value. + * This is a synonym for Quat.getFront. The High Fidelity camera has axes x = right, y = up, -z = forward. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Vec3} + */ + function getForward(orientation: Quat): Vec3; + /** + * Get the "right" direction that the camera would have if its orientation was set to the quaternion value. + * The High Fidelity camera has axes x = right, y = up, -z = forward. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Vec3} + */ + function getRight(orientation: Quat): Vec3; + /** + * Get the "up" direction that the camera would have if its orientation was set to the quaternion value. + * The High Fidelity camera has axes x = right, y = up, -z = forward. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Vec3} + */ + function getUp(orientation: Quat): Vec3; + /** + * Calculate the Euler angles for the quaternion, in degrees. (The "safe" in the name signifies that the angle results will + * not be garbage even when the rotation is particularly difficult to decompose with pitches around +/-90 degrees.) + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Vec3} + */ + function safeEulerAngles(orientation: Quat): Vec3; + /** + * Generate a quaternion given an angle to rotate through and an axis to rotate about. + * @param angle {number} The angle to rotate through, in degrees. + * @param axis {Vec3} The unit axis to rotate about. + * @returns {Quat} + */ + function angleAxis(angle: number, axis: Vec3): Quat; + /** + * Get the rotation axis for a quaternion. + * @param q {Quat} The quaternion. + * @returns {Vec3} + */ + function axis(q: Quat): Vec3; + /** + * Get the rotation angle for a quaternion. + * @param q {Quat} The quaternion. + * @returns {number} + */ + function angle(q: Quat): number; + /** + * Compute a spherical linear interpolation between two rotations, safely handling two rotations that are very similar. + * See also, Quat.slerp. + * @param q1 {Quat} The beginning rotation. + * @param q2 {Quat} The ending rotation. + * @param alpha {number} The mixture coefficient between 0.0 and 1.0. Specifies the proportion + * of q2's value to return in favor of q1's value. A value of 0.0 returns q1's value; 1.0 returns q2s's value. + * @returns {Quat} + */ + function mix(q1: Quat, q2: Quat, alpha: number): Quat; + /** + * Compute a spherical linear interpolation between two rotations, for rotations that are not very similar. + * See also, Quat.mix. + * @param q1 {Quat} The beginning rotation. + * @param q2 {Quat} The ending rotation. + * @param alpha {number} The mixture coefficient between 0.0 and 1.0. Specifies the proportion + * of q2's value to return in favor of q1's value. A value of 0.0 returns q1's value; 1.0 returns q2s's value. + * @returns {Quat} + */ + function slerp(q1: Quat, q2: Quat, alpha: number): Quat; + /** + * Compute a spherical quadrangle interpolation between two rotations along a path oriented toward two other rotations. + * Equivalent to: Quat.slerp(Quat.slerp(q1, q2, alpha), Quat.slerp(s1, s2, alpha), 2 * alpha * (1.0 - alpha)). + * @param q1 {Quat} Initial rotation. + * @param q2 {Quat} Final rotation. + * @param s1 {Quat} First control point. + * @param s2 {Quat} Second control point. + * @param alpha {number} The mixture coefficient between 0.0 and 1.0. A value of + * 0.0 returns q1's value; 1.0 returns q2s's value. + * @returns {Quat} + */ + function squad(q1: Quat, q2: Quat, s1: Quat, s2: Quat, alpha: number): Quat; + /** + * Calculate the dot product of two quaternions. The closer the quaternions are to each other the more non-zero the value is + * (either positive or negative). Identical unit rotations have a dot product of +/- 1. + * @param q1 {Quat} The first quaternion. + * @param q2 {Quat} The second quaternion. + * @returns {number} + */ + function dot(q1: Quat, q2: Quat): number; + /** + * Print to the program log a text label followed by a quaternion's pitch, yaw, and roll Euler angles. + * @param label {string} The label to print. + * @param q {Quat} The quaternion to print. + * @param asDegrees {boolean} [asDegrees=false] If true the angle values are printed in degrees, otherwise they are + * printed in radians. + */ + function print(label: string, q: Quat, asDegrees: boolean): void; + /** + * Test whether two quaternions are equal. Note: The quaternions must be exactly equal in order for + * true to be returned; it is often better to use Quat.dot and test for closeness to +/-1. + * @param q1 {Quat} The first quaternion. + * @param q2 {Quat} The second quaternion. + * @returns {boolean} + */ + function equal(q1: Quat, q2: Quat): boolean; + /** + * Cancels out the roll and pitch component of a quaternion so that its completely horizontal with a yaw pointing in the + * given quaternion's direction. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Quat} + */ + function cancelOutRollAndPitch(orientation: Quat): Quat; + /** + * Cancels out the roll component of a quaternion so that its horizontal axis is level. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Quat} + */ + function cancelOutRoll(orientation: Quat): Quat; + /** + * { x: 0, y: 0, z: 0, w: 1 } : The identity rotation, i.e., no rotation. + * Read-only. + */ + const IDENTITY: Quat; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts + */ +declare namespace Recording { + /** + * @param url {string} + * @param callback {Recording~loadRecordingCallback} [callback=null] + */ + function loadRecording(url: string, callback: Recording~loadRecordingCallback): void; + function startPlaying(): void; + function pausePlayer(): void; + function stopPlaying(): void; + /** + * @returns {boolean} + */ + function isPlaying(): boolean; + /** + * @returns {boolean} + */ + function isPaused(): boolean; + /** + * @returns {number} + */ + function playerElapsed(): number; + /** + * @returns {number} + */ + function playerLength(): number; + /** + * @param volume {number} + */ + function setPlayerVolume(volume: number): void; + /** + * @param audioOffset {number} + */ + function setPlayerAudioOffset(audioOffset: number): void; + /** + * @param time {number} + */ + function setPlayerTime(time: number): void; + /** + * @param loop {boolean} + */ + function setPlayerLoop(loop: boolean): void; + /** + * @param useDisplayName {boolean} + */ + function setPlayerUseDisplayName(useDisplayName: boolean): void; + /** + * @param useAttachments {boolean} + */ + function setPlayerUseAttachments(useAttachments: boolean): void; + /** + * @param useHeadModel {boolean} + */ + function setPlayerUseHeadModel(useHeadModel: boolean): void; + /** + * @param useSkeletonModel {boolean} + */ + function setPlayerUseSkeletonModel(useSkeletonModel: boolean): void; + /** + * @param playFromCurrentLocation {boolean} + */ + function setPlayFromCurrentLocation(playFromCurrentLocation: boolean): void; + /** + * @returns {boolean} + */ + function getPlayerUseDisplayName(): boolean; + /** + * @returns {boolean} + */ + function getPlayerUseAttachments(): boolean; + /** + * @returns {boolean} + */ + function getPlayerUseHeadModel(): boolean; + /** + * @returns {boolean} + */ + function getPlayerUseSkeletonModel(): boolean; + /** + * @returns {boolean} + */ + function getPlayFromCurrentLocation(): boolean; + function startRecording(): void; + function stopRecording(): void; + /** + * @returns {boolean} + */ + function isRecording(): boolean; + /** + * @returns {number} + */ + function recorderElapsed(): number; + /** + * @returns {string} + */ + function getDefaultRecordingSaveDirectory(): string; + /** + * @param filename {string} + */ + function saveRecording(filename: string): void; + /** + * @param getClipAtpUrl {function} + */ + function saveRecordingToAsset(getClipAtpUrl: function): void; + function loadLastRecording(): void; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare class Stage { +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Scene { + /** + * @param shouldRenderAvatars {boolean} + * @returns {Signal} + */ + function shouldRenderAvatarsChanged(shouldRenderAvatars: boolean): Signal; + /** + * @param shouldRenderEntities {boolean} + * @returns {Signal} + */ + function shouldRenderEntitiesChanged(shouldRenderEntities: boolean): Signal; + let shouldRenderAvatars: boolean; + let shouldRenderEntities: boolean; + let stage: Scene.Stage; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsPlays — "injects" — the content of an audio file. Used in the Audio API. + */ +declare class AudioInjector { + interface AudioInjectorOptions { + /** + * The position in the domain to play the sound. + */ + position: Vec3; + /** + * The orientation in the domain to play the sound in. + */ + orientation: Quat; + /** + * Playback volume, between 0.0 and 1.0. + */ + volume: number; + /** + * Alter the pitch of the sound, within +/- 2 octaves. The value is the relative sample rate to + * resample the sound at, range 0.0625 – 16.0. A value of 0.0625 lowers the pitch by 2 octaves; 1.0 is no change in pitch; 16.0 raises the pitch by 2 octaves. + */ + pitch: number; + /** + * If true, the sound is played repeatedly until playback is stopped. + */ + loop: boolean; + /** + * Starts playback from a specified time (seconds) within the sound file, ≥ + * 0. + */ + secondOffset: number; + /** + * IF true, the sound is played back locally on the client rather than to + * others via the audio mixer. + */ + localOnly: boolean; + /** + * Deprecated: This property is deprecated and will be + * removed. + */ + ignorePenumbra: boolean; + } + + /** + * Stop current playback, if any, and start playing from the beginning. + */ + restart(): void; + /** + * Stop audio playback. + */ + stop(): void; + /** + * Get the current configuration of the audio injector. + * @returns {AudioInjector.AudioInjectorOptions} + */ + getOptions(): AudioInjector.AudioInjectorOptions; + /** + * Configure how the injector plays the audio. + * @param options {AudioInjector.AudioInjectorOptions} Configuration of how the injector plays the audio. + */ + setOptions(options: AudioInjector.AudioInjectorOptions): void; + /** + * Get the loudness of the most recent frame of audio played. + * @returns {number} + */ + getLoudness(): number; + /** + * Get whether or not the audio is currently playing. + * @returns {boolean} + */ + isPlaying(): boolean; + /** + * Triggered when the audio has finished playing. + * @returns {Signal} + */ + finished(): Signal; + /** + * Stop audio playback. (Synonym of AudioInjector.stop.) + */ + stopInjectorImmediately(): void; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare namespace Resource { + interface State { + /** + * The resource is queued up, waiting to be loaded. + */ + QUEUED: number; + /** + * The resource is downloading. + */ + LOADING: number; + /** + * The resource has finished downloaded by is not complete. + */ + LOADED: number; + /** + * The resource has completely finished loading and is ready. + */ + FINISHED: number; + /** + * Downloading the resource has failed. + */ + FAILED: number; + } + + let State: Resource.State; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare namespace Script { + /** + * Stop the current script. + * @param marshal {boolean} [marshal=false] + */ + function stop(marshal: boolean): void; + /** + * @param name {string} + * @param object {object} + */ + function registerGlobalObject(name: string, object: object): void; + /** + * @param name {string} + * @param getter {object} + * @param setter {object} + * @param parent {string} [parent=""] + */ + function registerGetterSetter(name: string, getter: object, setter: object, parent: string): void; + /** + * @param name {string} + * @param function {object} + * @param numArguments {number} [numArguments=-1] + */ + function registerFunction(name: string, function: object, numArguments: number): void; + /** + * @param parent {string} + * @param name {string} + * @param function {object} + * @param numArguments {number} [numArguments=-1] + */ + function registerFunction(parent: string, name: string, function: object, numArguments: number): void; + /** + * @param name {string} + * @param value {object} + */ + function registerValue(name: string, value: object): void; + /** + * @param program {string} + * @param filename {string} + * @param lineNumber {number} [lineNumber=-1] + * @returns {object} + */ + function evaluate(program: string, filename: string, lineNumber: number): object; + /** + * @param locals {object} + * @param program {object} + * @returns {object} + */ + function evaluateInClosure(locals: object, program: object): object; + /** + * @returns {string} + */ + function getContext(): string; + /** + * @returns {boolean} + */ + function isClientScript(): boolean; + /** + * @returns {boolean} + */ + function isDebugMode(): boolean; + /** + * @returns {boolean} + */ + function isEntityClientScript(): boolean; + /** + * @returns {boolean} + */ + function isEntityServerScript(): boolean; + /** + * @returns {boolean} + */ + function isAgentScript(): boolean; + /** + * @param entityID {Uuid} + * @param eventName {string} + * @param handler {function} + */ + function addEventHandler(entityID: Uuid, eventName: string, handler: function): void; + /** + * @param entityID {Uuid} + * @param eventName {string} + * @param handler {function} + */ + function removeEventHandler(entityID: Uuid, eventName: string, handler: function): void; + /** + * Start a new Interface or entity script. + * @param filename {string} The URL of the script to load. Can be relative to the current script. + */ + function load(filename: string): void; + /** + * Include JavaScript from other files in the current script. If a callback is specified the files are loaded and included + * asynchronously, otherwise they are included synchronously (i.e., script execution blocks while the files are included). + * @param filenames {Array.} The URLs of the scripts to include. Each can be relative to the current script. + * @param callback {function} [callback=null] The function to call back when the scripts have been included. Can be an in-line + * function or the name of a function. + */ + function include(filenames: Array., callback: function): void; + /** + * Include JavaScript from another file in the current script. If a callback is specified the file is loaded and included + * asynchronously, otherwise it is included synchronously (i.e., script execution blocks while the file is included). + * @param filename {string} The URL of the script to include. Can be relative to the current script. + * @param callback {function} [callback=null] The function to call back when the script has been included. Can be an in-line + * function or the name of a function. + */ + function include(filename: string, callback: function): void; + /** + * @param module {string} + */ + function require(module: string): void; + /** + * @param deleteScriptCache {boolean} [deleteScriptCache=false] + */ + function resetModuleCache(deleteScriptCache: boolean): void; + /** + * Call a function at a set interval. + * @param function {function} The function to call. Can be an in-line function or the name of a function. + * @param interval {number} The interval at which to call the function, in ms. + * @returns {object} + */ + function setInterval(function: function, interval: number): object; + /** + * Call a function after a delay. + * @param function {function} The function to call. Can be an in-line function or the name of a function. + * @param timeout {number} The delay after which to call the function, in ms. + * @returns {object} + */ + function setTimeout(function: function, timeout: number): object; + /** + * Stop an interval timer set by Script.setInterval. + * @param timer {object} The interval timer to clear. + */ + function clearInterval(timer: object): void; + /** + * Clear a timeout timer set by Script.setTimeout. + * @param timer {object} The timeout timer to clear. + */ + function clearTimeout(timer: object): void; + /** + * @param message {string} + */ + function print(message: string): void; + /** + * Resolve a relative path to an absolute path. + * @param path {string} The relative path to resolve. + * @returns {string} + */ + function resolvePath(path: string): string; + /** + * @returns {string} + */ + function resourcesPath(): string; + /** + * @param label {string} + */ + function beginProfileRange(label: string): void; + /** + * @param label {string} + */ + function endProfileRange(label: string): void; + /** + * @param entityID {Uuid} + * @returns {boolean} + */ + function isEntityScriptRunning(entityID: Uuid): boolean; + /** + * @param entityID {Uuid} + * @param script {string} + * @param forceRedownload {boolean} + */ + function loadEntityScript(entityID: Uuid, script: string, forceRedownload: boolean): void; + /** + * @param entityID {Uuid} + * @param shouldRemoveFromMap {boolean} [shouldRemoveFromMap=false] + */ + function unloadEntityScript(entityID: Uuid, shouldRemoveFromMap: boolean): void; + function unloadAllEntityScripts(): void; + /** + * @param entityID {Uuid} + * @param methodName {string} + * @param parameters {Array.} + * @param remoteCallerID {Uuid} [remoteCallerID=Uuid.NULL] + */ + function callEntityScriptMethod(entityID: Uuid, methodName: string, parameters: Array., remoteCallerID: Uuid): void; + /** + * @param entityID {Uuid} + * @param methodName {string} + * @param event {PointerEvent} + */ + function callEntityScriptMethod(entityID: Uuid, methodName: string, event: PointerEvent): void; + /** + * @param entityID {Uuid} + * @param methodName {string} + * @param otherID {Uuid} + * @param collision {Collision} + */ + function callEntityScriptMethod(entityID: Uuid, methodName: string, otherID: Uuid, collision: Collision): void; + function requestGarbageCollection(): void; + /** + * @returns {Uuid} + */ + function generateUUID(): Uuid; + /** + * @param callback {function} + * @param parameters {object} + * @param names {Array.} + * @param useNames {boolean} + * @param resultHandler {object} + */ + function callAnimationStateHandler(callback: function, parameters: object, names: Array., useNames: boolean, resultHandler: object): void; + /** + * @param deltaSize {number} + */ + function updateMemoryCost(deltaSize: number): void; + /** + * @param filename {string} + * @returns {Signal} + */ + function scriptLoaded(filename: string): Signal; + /** + * @param filename {string} + * @returns {Signal} + */ + function errorLoadingScript(filename: string): Signal; + /** + * Triggered regularly at a system-determined frequency. + * @param deltaTime {number} The time since the last update, in s. + * @returns {Signal} + */ + function update(deltaTime: number): Signal; + /** + * Triggered when the script is ending. + * @returns {Signal} + */ + function scriptEnding(): Signal; + /** + * @param filename {string} + * @param engine {object} + * @returns {Signal} + */ + function finished(filename: string, engine: object): Signal; + /** + * @param menuItem {string} + * @returns {Signal} + */ + function cleanupMenuItem(menuItem: string): Signal; + /** + * @param message {string} + * @param scriptName {string} + * @returns {Signal} + */ + function printedMessage(message: string, scriptName: string): Signal; + /** + * @param message {string} + * @param scriptName {string} + * @returns {Signal} + */ + function errorMessage(message: string, scriptName: string): Signal; + /** + * @param message {string} + * @param scriptName {string} + * @returns {Signal} + */ + function warningMessage(message: string, scriptName: string): Signal; + /** + * @param message {string} + * @param scriptName {string} + * @returns {Signal} + */ + function infoMessage(message: string, scriptName: string): Signal; + /** + * @returns {Signal} + */ + function runningStateChanged(): Signal; + /** + * @returns {Signal} + */ + function clearDebugWindow(): Signal; + /** + * @param scriptName {string} + * @param isUserLoaded {boolean} + * @returns {Signal} + */ + function loadScript(scriptName: string, isUserLoaded: boolean): Signal; + /** + * @param scriptName {string} + * @param isUserLoaded {boolean} + * @returns {Signal} + */ + function reloadScript(scriptName: string, isUserLoaded: boolean): Signal; + /** + * @returns {Signal} + */ + function doneRunning(): Signal; + /** + * @returns {Signal} + */ + function entityScriptDetailsUpdated(): Signal; + /** + * @returns {Signal} + */ + function entityScriptPreloadFinished(): Signal; + /** + * @param function {object} + * @param type {ConnectionType} [type=2] + */ + function executeOnScriptThread(function: object, type: ConnectionType): void; + /** + * @param module {string} + * @param relativeTo {string} [relativeTo=""] + * @returns {string} + */ + function _requireResolve(module: string, relativeTo: string): string; + /** + * @param entityID {Uuid} + * @param scriptOrURL {string} + * @param contents {string} + * @param isURL {boolean} + * @param success {boolean} + * @param status {string} + */ + function entityScriptContentAvailable(entityID: Uuid, scriptOrURL: string, contents: string, isURL: boolean, success: boolean, status: string): void; + let context: string; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace ScriptDiscoveryService { + /** + * @param filename {string} + */ + function loadOneScript(filename: string): void; + /** + * @param filename {string} [filename=""] + * @param isUserLoaded {boolean} [isUserLoaded=true] + * @param loadScriptFromEditor {boolean} [loadScriptFromEditor=false] + * @param activateMainWindow {boolean} [activateMainWindow=false] + * @param reload {boolean} [reload=false] + * @param quitWhenFinished {boolean} [quitWhenFinished=false] + * @returns {boolean} + */ + function loadScript(filename: string, isUserLoaded: boolean, loadScriptFromEditor: boolean, activateMainWindow: boolean, reload: boolean, quitWhenFinished: boolean): boolean; + /** + * @param scriptHash {string} + * @param restart {boolean} [restart=false] + * @returns {boolean} + */ + function stopScript(scriptHash: string, restart: boolean): boolean; + function reloadAllScripts(): void; + /** + * @param restart {boolean} [restart=false] + */ + function stopAllScripts(restart: boolean): void; + /** + * @returns {Array.} + */ + function getRunning(): Array.; + /** + * @returns {Array.} + */ + function getPublic(): Array.; + /** + * @returns {Array.} + */ + function getLocal(): Array.; + /** + * @returns {Signal} + */ + function scriptCountChanged(): Signal; + /** + * @returns {Signal} + */ + function scriptsReloading(): Signal; + /** + * @param filename {string} + * @param error {string} + * @returns {Signal} + */ + function scriptLoadError(filename: string, error: string): Signal; + /** + * @param message {string} + * @param engineName {string} + * @returns {Signal} + */ + function printedMessage(message: string, engineName: string): Signal; + /** + * @param message {string} + * @param engineName {string} + * @returns {Signal} + */ + function errorMessage(message: string, engineName: string): Signal; + /** + * @param message {string} + * @param engineName {string} + * @returns {Signal} + */ + function warningMessage(message: string, engineName: string): Signal; + /** + * @param message {string} + * @param engineName {string} + * @returns {Signal} + */ + function infoMessage(message: string, engineName: string): Signal; + /** + * @param url {string} + * @returns {Signal} + */ + function errorLoadingScript(url: string): Signal; + /** + * @returns {Signal} + */ + function clearDebugWindow(): Signal; + /** + * @param message {string} + * @param scriptName {string} + */ + function onPrintedMessage(message: string, scriptName: string): void; + /** + * @param message {string} + * @param scriptName {string} + */ + function onErrorMessage(message: string, scriptName: string): void; + /** + * @param message {string} + * @param scriptName {string} + */ + function onWarningMessage(message: string, scriptName: string): void; + /** + * @param message {string} + * @param scriptName {string} + */ + function onInfoMessage(message: string, scriptName: string): void; + /** + * @param url {string} + */ + function onErrorLoadingScript(url: string): void; + function onClearDebugWindow(): void; + /** + * @param filename {string} + * @param engine {object} + */ + function onScriptFinished(filename: string, engine: object): void; + let debugScriptUrl: string; + let defaultScriptsPath: string; + let scriptsModel: ScriptsModel; + let scriptsModelFilter: ScriptsModelFilter; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsProvided as a property of ScriptDiscoveryService. + * Has properties and functions below in addition to those of http://doc.qt.io/qt-5/qabstractitemmodel.html. + */ +declare class ScriptsModel { + /** + * @param row {number} + * @param column {number} + * @param parent {QModelIndex} + * @returns {QModelIndex} + */ + index(row: number, column: number, parent: QModelIndex): QModelIndex; + /** + * @param child {QModelIndex} + * @returns {QModelIndex} + */ + parent(child: QModelIndex): QModelIndex; + /** + * @param index {QModelIndex} + * @param role {number} [role=0] returns {string} + */ + data(index: QModelIndex, role: number): void; + /** + * @param parent {QmodelIndex} [parent=null] + * @returns {number} + */ + rowCount(parent: QmodelIndex): number; + /** + * @param parent {QmodelIndex} [parent=null] + * @returns {number} + */ + columnCount(parent: QmodelIndex): number; + /** + * @param index {QmodelIndex} + * @returns {TreeNodeBase} + */ + getTreeNodeFromIndex(index: QmodelIndex): TreeNodeBase; + /** + * @param parent {TreeNodeFolder} + * @returns {Array.} + */ + getFolderNodes(parent: TreeNodeFolder): Array.; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsProvided as a property of ScriptDiscoveryService. + * Has properties and functions per http://doc.qt.io/qt-5/qsortfilterproxymodel.html. + */ +declare class ScriptsModelFilter { +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsA UUID (Universally Unique IDentifier) is used to uniquely identify entities, overlays, avatars, and the like. It is + * represented in JavaScript as a string in the format, {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}, where the "n"s are hexadecimal digits. + */ +declare namespace Uuid { + /** + * Generates a UUID from a string representation of the UUID. + * @param string {string} A string representation of a UUID. The curly braces are optional. + * @returns {Uuid} + */ + function fromString(string: string): Uuid; + /** + * Generates a string representation of a UUID. However, because UUIDs are represented in JavaScript as strings, this is in + * effect a no-op. + * @param id {Uuid} The UUID to generate a string from. + * @returns {string} + */ + function toString(id: Uuid): string; + /** + * Generate a new UUID. + * @returns {Uuid} + */ + function generate(): Uuid; + /** + * Test whether two given UUIDs are equal. + * @param idA {Uuid} The first UUID to compare. + * @param idB {Uuid} The second UUID to compare. + * @returns {boolean} + */ + function isEqual(idA: Uuid, idB: Uuid): boolean; + /** + * Test whether a given UUID is null. + * @param id {Uuid} The UUID to test. + * @returns {boolean} + */ + function isNull(id: Uuid): boolean; + /** + * Print to the program log a text label followed by the UUID value. + * @param label {string} The label to print. + * @param id {Uuid} The UUID to print. + */ + function print(label: string, id: Uuid): void; + /** + * The null UUID, {00000000-0000-0000-0000-000000000000}. + */ + const NULL: Uuid; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts + */ +declare namespace Users { + /** + * Personally ignore another user, making them disappear for you and you disappear for them. + * @param nodeID {Uuid} The node or session ID of the user you want to ignore. + * @param enable {boolean} True for ignored; false for un-ignored. + */ + function ignore(nodeID: Uuid, enable: boolean): void; + /** + * Get whether or not you have ignored the node with the given UUID. + * @param nodeID {Uuid} The node or session ID of the user whose ignore status you want. + * @returns {boolean} + */ + function getIgnoreStatus(nodeID: Uuid): boolean; + /** + * Mute another user for you and you only. They won't be able to hear you, and you won't be able to hear them. + * @param nodeID {Uuid} The node or session ID of the user you want to mute. + * @param muteEnabled {boolean} True for enabled; false for disabled. + */ + function personalMute(nodeID: Uuid, muteEnabled: boolean): void; + /** + * Get whether or not you have personally muted the node with the given UUID. + * @param nodeID {Uuid} The node or session ID of the user whose personal mute status you want. + * @returns {boolean} + */ + function requestPersonalMuteStatus(nodeID: Uuid): boolean; + /** + * Sets an avatar's gain for you and you only. + * Units are Decibels (dB) + * @param nodeID {Uuid} The node or session ID of the user whose gain you want to modify, or null to set the master gain. + * @param gain {number} The gain of the avatar you'd like to set. Units are dB. + */ + function setAvatarGain(nodeID: Uuid, gain: number): void; + /** + * Gets an avatar's gain for you and you only. + * @param nodeID {Uuid} The node or session ID of the user whose gain you want to get, or null to get the master gain. + * @returns {number} + */ + function getAvatarGain(nodeID: Uuid): number; + /** + * Kick/ban another user. Removes them from the server and prevents them from returning. Bans by either user name (if + * available) or machine fingerprint otherwise. This will only do anything if you're an admin of the domain you're in. + * @param nodeID {Uuid} The node or session ID of the user you want to kick. + */ + function kick(nodeID: Uuid): void; + /** + * Mutes another user's microphone for everyone. Not permanent; the silenced user can unmute themselves with the UNMUTE + * button in their HUD. This will only do anything if you're an admin of the domain you're in. + * @param nodeID {Uuid} The node or session ID of the user you want to mute. + */ + function mute(nodeID: Uuid): void; + /** + * Request the user name and machine fingerprint associated with the given UUID. The user name will be returned in a + * Users.usernameFromIDReply signal. This will only do anything if you're an admin of the domain you're in. + * @param nodeID {Uuid} The node or session ID of the user whose user name you want. + */ + function requestUsernameFromID(nodeID: Uuid): void; + /** + * Returns `true` if the DomainServer will allow this Node/Avatar to make kick. + * @returns {boolean} + */ + function getCanKick(): boolean; + /** + * Toggle the state of the space bubble feature. + */ + function toggleIgnoreRadius(): void; + /** + * Enables the space bubble feature. + */ + function enableIgnoreRadius(): void; + /** + * Disables the space bubble feature. + */ + function disableIgnoreRadius(): void; + /** + * Returns `true` if the space bubble feature is enabled. + * @returns {boolean} + */ + function getIgnoreRadiusEnabled(): boolean; + /** + * @param canKick {boolean} + * @returns {Signal} + */ + function canKickChanged(canKick: boolean): Signal; + /** + * @param isEnabled {boolean} + * @returns {Signal} + */ + function ignoreRadiusEnabledChanged(isEnabled: boolean): Signal; + /** + * Notifies scripts that another user has entered the ignore radius. + * @returns {Signal} + */ + function enteredIgnoreRadius(): Signal; + /** + * Triggered in response to a Users.requestUsernameFromID call. Provides the user name and + * machine fingerprint associated with a UUID. Username and machineFingerprint will be their default constructor output if the requesting user isn't an admin. + * @param nodeID {Uuid} + * @param userName {string} + * @param machineFingerprint {string} + * @param isAdmin {boolean} + * @returns {Signal} + */ + function usernameFromIDReply(nodeID: Uuid, userName: string, machineFingerprint: string, isAdmin: boolean): Signal; + /** + * Notifies scripts that a user has disconnected from the domain. + * @param nodeID {Uuid} The session ID of the avatar that has disconnected. + * @returns {Signal} + */ + function avatarDisconnected(nodeID: Uuid): Signal; + /** + * true if the domain server allows the node or avatar to kick (ban) avatars, + * otherwise false. Read-only. + */ + let canKick: boolean; + /** + * true if the avatar requests extra data from the mixers (such as + * positional data of an avatar you've ignored). Read-only. + */ + let requestsDomainListData: boolean; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Vec3 API facilities for generating and manipulating 3-dimensional vectors. High Fidelity uses a right-handed + * Cartesian coordinate system where the y-axis is the "up" and the negative z-axis is the "front" direction. + */ +declare namespace Vec3 { + /** + * Calculate the reflection of a vector in a plane. + * @param v {Vec3} The vector to reflect. + * @param normal {Vec3} The normal of the plane. + * @returns {Vec3} + */ + function reflect(v: Vec3, normal: Vec3): Vec3; + /** + * Calculate the cross product of two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {Vec3} + */ + function cross(v1: Vec3, v2: Vec3): Vec3; + /** + * Calculate the dot product of two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {number} + */ + function dot(v1: Vec3, v2: Vec3): number; + /** + * Multiply a vector by a scale factor. + * @param v {Vec3} The vector. + * @param scale {number} The scale factor. + * @returns {Vec3} + */ + function multiply(v: Vec3, scale: number): Vec3; + /** + * Multiply a vector by a scale factor. + * @param scale {number} The scale factor. + * @param v {Vec3} The vector. + * @returns {Vec3} + */ + function multiply(scale: number, v: Vec3): Vec3; + /** + * Multiply two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {Vec3} + */ + function multiplyVbyV(v1: Vec3, v2: Vec3): Vec3; + /** + * Rotate a vector. + * @param q {Quat} The rotation to apply. + * @param v {Vec3} The vector to rotate. + * @returns {Vec3} + */ + function multiplyQbyV(q: Quat, v: Vec3): Vec3; + /** + * Calculate the sum of two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {Vec3} + */ + function sum(v1: Vec3, v2: Vec3): Vec3; + /** + * Calculate one vector subtracted from another. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {Vec3} + */ + function subtract(v1: Vec3, v2: Vec3): Vec3; + /** + * Calculate the length of a vector + * @param v {Vec3} The vector. + * @returns {number} + */ + function length(v: Vec3): number; + /** + * Calculate the distance between two points. + * @param p1 {Vec3} The first point. + * @param p2 {Vec3} The second point. + * @returns {number} + */ + function distance(p1: Vec3, p2: Vec3): number; + /** + * Calculate the angle of rotation from one vector onto another, with the sign depending on a reference vector. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @param ref {Vec3} Reference vector. + * @returns {number} + */ + function orientedAngle(v1: Vec3, v2: Vec3, ref: Vec3): number; + /** + * Normalize a vector so that its length is 1. + * @param v {Vec3} The vector to normalize. + * @returns {Vec3} + */ + function normalize(v: Vec3): Vec3; + /** + * Calculate a linear interpolation between two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @param factor {number} The interpolation factor in the range 0.0 to 1.0. + * @returns {Vec3} + */ + function mix(v1: Vec3, v2: Vec3, factor: number): Vec3; + /** + * Print to the program log a text label followed by a vector value. + * @param label {string} The label to print. + * @param v {Vec3} The vector value to print. + */ + function print(label: string, v: Vec3): void; + /** + * Test whether two vectors are equal. Note: The vectors must be exactly equal in order for + * true to be returned; it is often better to use Vec3.withinEpsilon. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {boolean} + */ + function equal(v1: Vec3, v2: Vec3): boolean; + /** + * Test whether two vectors are equal within a tolerance. Note: It is often better to use this function + * than Vec3.equal. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @param epsilon {number} The maximum distance between the two vectors. + * @returns {boolean} + */ + function withinEpsilon(v1: Vec3, v2: Vec3, epsilon: number): boolean; + /** + * Calculate polar coordinates (elevation, azimuth, radius) that transform the unit z-axis vector onto a point. + * @param p {Vec3} The point to calculate the polar coordinates for. + * @returns {Vec3} + */ + function toPolar(p: Vec3): Vec3; + /** + * Calculate the coordinates of a point from polar coordinate transformation of the unit z-axis vector. + * @param polar {Vec3} The polar coordinates of a point: x elevation rotation about the x-axis in radians, + * y azimuth rotation about the y-axis in radians, and z scale. + * @returns {Vec3} + */ + function fromPolar(polar: Vec3): Vec3; + /** + * Calculate the unit vector corresponding to polar coordinates elevation and azimuth transformation of the unit z-axis + * vector. + * @param elevation {number} Rotation about the x-axis, in radians. + * @param azimuth {number} Rotation about the y-axis, in radians. + * @returns {Vec3} + */ + function fromPolar(elevation: number, azimuth: number): Vec3; + /** + * Calculate the angle between two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {number} + */ + function getAngle(v1: Vec3, v2: Vec3): number; + /** + * { x: 1, y: 0, z: 0 } : Unit vector in the x-axis direction. Read-only. + */ + const UNIT_X: Vec3; + /** + * { x: 0, y: 1, z: 0 } : Unit vector in the y-axis direction. Read-only. + */ + const UNIT_Y: Vec3; + /** + * { x: 0, y: 0, z: 1 } : Unit vector in the z-axis direction. Read-only. + */ + const UNIT_Z: Vec3; + /** + * { x: -1, y: 0, z: 0 } : Unit vector in the negative x-axis direction. + * Read-only. + */ + const UNIT_NEG_X: Vec3; + /** + * { x: 0, y: -1, z: 0 } : Unit vector in the negative y-axis direction. + * Read-only. + */ + const UNIT_NEG_Y: Vec3; + /** + * { x: 0, y: 0, z: -1 } : Unit vector in the negative z-axis direction. + * Read-only. + */ + const UNIT_NEG_Z: Vec3; + /** + * { x: 0.707107, y: 0.707107, z: 0 } : Unit vector in the direction of the diagonal + * between the x and y axes. Read-only. + */ + const UNIT_XY: Vec3; + /** + * { x: 0.707107, y: 0, z: 0.707107 } : Unit vector in the direction of the diagonal + * between the x and z axes. Read-only. + */ + const UNIT_XZ: Vec3; + /** + * { x: 0, y: 0.707107, z: 0.707107 } : Unit vector in the direction of the diagonal + * between the y and z axes. Read-only. + */ + const UNIT_YZ: Vec3; + /** + * { x: 0.577350, y: 0.577350, z: 0.577350 } : Unit vector in the direction of the + * diagonal between the x, y, and z axes. Read-only. + */ + const UNIT_XYZ: Vec3; + /** + * { x: 3.402823e+38, y: 3.402823e+38, z: 3.402823e+38 } : Vector with all axis + * values set to the maximum floating point value. Read-only. + */ + const FLOAT_MAX: Vec3; + /** + * { x: -3.402823e+38, y: -3.402823e+38, z: -3.402823e+38 } : Vector with all axis + * values set to the negative of the maximum floating point value. Read-only. + */ + const FLOAT_MIN: Vec3; + /** + * { x: 0, y: 0, z: 0 } : Vector with all axis values set to 0. + * Read-only. + */ + const ZERO: Vec3; + /** + * { x: 1, y: 1, z: 1 } : Vector with all axis values set to 1. + * Read-only. + */ + const ONE: Vec3; + /** + * { x: 2, y: 2, z: 2 } : Vector with all axis values set to 2. + * Read-only. + */ + const TWO: Vec3; + /** + * { x: 0.5, y: 0.5, z: 0.5 } : Vector with all axis values set to 0.5. + * Read-only. + */ + const HALF: Vec3; + /** + * { x: 1, y: 0, z: 0 } : Unit vector in the "right" direction. Synonym for + * UNIT_X. Read-only. + */ + const RIGHT: Vec3; + /** + * { x: 0, y: 1, z: 0 } : Unit vector in the "up" direction. Synonym for + * UNIT_Y. Read-only. + */ + const UP: Vec3; + /** + * { x: 0, y: 0, z: -1 } : Unit vector in the "front" direction. Synonym for + * UNIT_NEG_Z. Read-only. + */ + const FRONT: Vec3; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsHelper functions to render ephemeral debug markers and lines. + * DebugDraw markers and lines are only visible locally, they are not visible by other users. + */ +declare namespace DebugDraw { + /** + * Draws a line in world space, but it will only be visible for a single frame. + * @param start {Vec3} start position of line in world space. + * @param end {Vec3} end position of line in world space. + * @param color {Vec4} color of line, each component should be in the zero to one range. x = red, y = blue, z = green, w = alpha. + */ + function drawRay(start: Vec3, end: Vec3, color: Vec4): void; + /** + * Adds a debug marker to the world. This marker will be drawn every frame until it is removed with DebugDraw.removeMarker. + * This can be called repeatedly to change the position of the marker. + * @param key {string} name to uniquely identify this marker, later used for DebugDraw.removeMarker. + * @param rotation {Quat} start position of line in world space. + * @param position {Vec3} position of the marker in world space. + * @param color {Vec4} color of the marker. + */ + function addMarker(key: string, rotation: Quat, position: Vec3, color: Vec4): void; + /** + * Removes debug marker from the world. Once a marker is removed, it will no longer be visible. + * @param key {string} name of marker to remove. + */ + function removeMarker(key: string): void; + /** + * Adds a debug marker to the world, this marker will be drawn every frame until it is removed with DebugDraw.removeMyAvatarMarker. + * This can be called repeatedly to change the position of the marker. + * @param key {string} name to uniquely identify this marker, later used for DebugDraw.removeMyAvatarMarker. + * @param rotation {Quat} start position of line in avatar space. + * @param position {Vec3} position of the marker in avatar space. + * @param color {Vec4} color of the marker. + */ + function addMyAvatarMarker(key: string, rotation: Quat, position: Vec3, color: Vec4): void; + /** + * Removes debug marker from the world. Once a marker is removed, it will no longer be visible + * @param key {string} name of marker to remove. + */ + function removeMyAvatarMarker(key: string): void; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Paths API provides absolute paths to the scripts and resources directories. + */ +declare namespace Paths { + /** + * The path to the scripts directory. Read-only. + */ + let defaultScripts: string; + /** + * The path to the resources directory. Read-only. + */ + let resources: string; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsA handle for a mesh in an entity, such as returned by Entities.getMeshes. + */ +declare class MeshProxy { + /** + * Get the number of vertices in the mesh. + * @returns {number} + */ + getNumVertices(): number; + /** + * Get the position of a vertex in the mesh. + * @param index {number} Integer index of the mesh vertex. + * @returns {Vec3} + */ + getPos(index: number): Vec3; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe Camera API provides access to the "camera" that defines your view in desktop and HMD display modes. + */ +declare namespace Camera { + /** + * Get the ID of the entity that the camera is set to use the position and orientation from when it's in entity mode. You can + * also get the entity ID using the Camera.cameraEntity property. + * @returns {Uuid} + */ + function getCameraEntity(): Uuid; + /** + * Set the entity that the camera should use the position and orientation from when it's in entity mode. You can also set the + * entity using the Camera.cameraEntity property. + * @param entityID {Uuid} The entity that the camera should follow when it's in entity mode. + */ + function setCameraEntity(entityID: Uuid): void; + /** + * Get the current camera mode. You can also get the mode using the Camera.mode property. + * @returns {Camera.Mode} + */ + function getModeString(): Camera.Mode; + /** + * Set the camera mode. You can also set the mode using the Camera.mode property. + * @param mode {Camera.Mode} The mode to set the camera to. + */ + function setModeString(mode: Camera.Mode): void; + /** + * Get the current camera position. You can also get the position using the Camera.position property. + * @returns {Vec3} + */ + function getPosition(): Vec3; + /** + * Set the camera position. You can also set the position using the Camera.position property. Only works if the + * camera is in independent mode. + * @param position {Vec3} The position to set the camera at. + */ + function setPosition(position: Vec3): void; + /** + * Get the current camera orientation. You can also get the orientation using the Camera.orientation property. + * @returns {Quat} + */ + function getOrientation(): Quat; + /** + * Set the camera orientation. You can also set the orientation using the Camera.orientation property. Only + * works if the camera is in independent mode. + * @param orientation {Quat} The orientation to set the camera to. + */ + function setOrientation(orientation: Quat): void; + /** + * Compute a PickRay based on the current camera configuration and the specified x, y position on the + * screen. The PickRay can be used in functions such as Entities.findRayIntersection and Overlays.findRayIntersection. + * @param x {number} X-coordinate on screen. + * @param y {number} Y-coordinate on screen. + * @returns {PickRay} + */ + function computePickRay(x: number, y: number): PickRay; + /** + * Rotate the camera to look at the specified position. Only works if the camera is in independent mode. + * @param position {Vec3} Position to look at. + */ + function lookAt(position: Vec3): void; + /** + * Set the camera to continue looking at the specified position even while the camera moves. Only works if the + * camera is in independent mode. + * @param position {Vec3} Position to keep looking at. + */ + function keepLookingAt(position: Vec3): void; + /** + * Stops the camera from continually looking at the position that was set with Camera.keepLookingAt. + */ + function stopLookingAt(): void; + /** + * Triggered when the camera mode changes. + * @param newMode {Camera.Mode} The new camera mode. + * @returns {Signal} + */ + function modeUpdated(newMode: Camera.Mode): Signal; + /** + * The position of the camera. You can set this value only when the camera is in independent + * mode. + */ + let position: Vec3; + /** + * The orientation of the camera. You can set this value only when the camera is in + * independent mode. + */ + let orientation: Quat; + /** + * The camera mode. + */ + let mode: Camera.Mode; + /** + * The camera frustum. + */ + let frustum: ViewFrustum; + /** + * The ID of the entity that is used for the camera position and orientation when the + * camera is in entity mode. + */ + let cameraEntity: Uuid; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Render { + /** + * @returns {string} + */ + function toJSON(): string; + /** + * @param map {object} + */ + function load(map: object): void; + /** + * @returns {boolean} + */ + function isTask(): boolean; + /** + * @returns {Array.} + */ + function getSubConfigs(): Array.; + /** + * @returns {number} + */ + function getNumSubs(): number; + /** + * @param index {number} + * @returns {object} + */ + function getSubConfig(index: number): object; + /** + * @param map {object} + */ + function load(map: object): void; + /** + * @returns {Signal} + */ + function loaded(): Signal; + /** + * @returns {Signal} + */ + function newStats(): Signal; + /** + * @returns {Signal} + */ + function dirtyEnabled(): Signal; + /** + * @param name {string} + * @returns {object} + */ + function getConfig(name: string): object; + function refresh(): void; + /** + * Read-only. + */ + let cpuRunTime: number; + let enabled: boolean; +} + +/** + * Available in:Interface Scripts + */ +declare class InteractiveWindow { + /** + * @param message {object} + */ + sendToQml(message: object): void; + /** + * @param message {object} + */ + emitScriptEvent(message: object): void; + /** + * @param message {object} + */ + emitWebEvent(message: object): void; + close(): void; + show(): void; + raise(): void; + /** + * @returns {Signal} + */ + visibleChanged(): Signal; + /** + * @returns {Signal} + */ + positionChanged(): Signal; + /** + * @returns {Signal} + */ + sizeChanged(): Signal; + /** + * @returns {Signal} + */ + presentationModeChanged(): Signal; + /** + * @returns {Signal} + */ + titleChanged(): Signal; + /** + * @returns {Signal} + */ + closed(): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + fromQml(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + scriptEventReceived(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + webEventReceived(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + qmlToScript(message: object): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace OffscreenFlags { + /** + * @returns {Signal} + */ + function navigationFocusedChanged(): Signal; + /** + * @returns {Signal} + */ + function navigationFocusDisabledChanged(): Signal; + let navigationFocused: boolean; + let navigationFocusDisabled: boolean; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + * @param properties {OverlayWindow.Properties} [properties=null] + */ +declare class OverlayWebWindow { + /** + * @returns {string} + */ + getURL(): string; + /** + * @param url {string} + */ + setURL(url: string): void; + /** + * @param script {string} + */ + setScriptURL(script: string): void; + /** + * @returns {Signal} + */ + urlChanged(): Signal; + /** + * @param properties {OverlayWindow.Properties} + */ + initQml(properties: OverlayWindow.Properties): void; + /** + * @returns {boolean} + */ + isVisible(): boolean; + /** + * @param visible {boolean} + */ + setVisible(visible: boolean): void; + /** + * @returns {Vec2} + */ + getPosition(): Vec2; + /** + * @param position {Vec2} + */ + setPosition(position: Vec2): void; + /** + * @param x {number} + * @param y {number} + */ + setPosition(x: number, y: number): void; + /** + * @returns {Vec2} + */ + getSize(): Vec2; + /** + * @param size {Vec2} + */ + setSize(size: Vec2): void; + /** + * @param width {number} + * @param height {number} + */ + setSize(width: number, height: number): void; + /** + * @param title {string} + */ + setTitle(title: string): void; + raise(): void; + close(): void; + /** + * @returns {object} + */ + getEventBridge(): object; + /** + * @param message {object} + */ + sendToQml(message: object): void; + clearDebugWindow(): void; + /** + * @param message {object} + */ + emitScriptEvent(message: object): void; + /** + * @param message {object} + */ + emitWebEvent(message: object): void; + /** + * @returns {Signal} + */ + visibleChanged(): Signal; + /** + * @returns {Signal} + */ + positionChanged(): Signal; + /** + * @returns {Signal} + */ + sizeChanged(): Signal; + /** + * @param position {Vec2} + * @returns {Signal} + */ + moved(position: Vec2): Signal; + /** + * @param size {Size} + * @returns {Signal} + */ + resized(size: Size): Signal; + /** + * @returns {Signal} + */ + closed(): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + fromQml(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + scriptEventReceived(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + webEventReceived(message: object): Signal; + /** + * @param position {Vec2} + * @returns {Signal} + */ + hasMoved(position: Vec2): Signal; + /** + * @returns {Signal} + */ + hasClosed(): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + qmlToScript(message: object): Signal; +} + +/** + * Available in:Interface Scripts + * @param properties {OverlayWindow.Properties} [properties=null] + */ +declare class OverlayWindow { + interface Properties { + title: string; + source: string; + width: number; + height: number; + visible: boolean; + } + + /** + * @param properties {OverlayWindow.Properties} + */ + initQml(properties: OverlayWindow.Properties): void; + /** + * @returns {boolean} + */ + isVisible(): boolean; + /** + * @param visible {boolean} + */ + setVisible(visible: boolean): void; + /** + * @returns {Vec2} + */ + getPosition(): Vec2; + /** + * @param position {Vec2} + */ + setPosition(position: Vec2): void; + /** + * @param x {number} + * @param y {number} + */ + setPosition(x: number, y: number): void; + /** + * @returns {Vec2} + */ + getSize(): Vec2; + /** + * @param size {Vec2} + */ + setSize(size: Vec2): void; + /** + * @param width {number} + * @param height {number} + */ + setSize(width: number, height: number): void; + /** + * @param title {string} + */ + setTitle(title: string): void; + raise(): void; + close(): void; + /** + * @returns {object} + */ + getEventBridge(): object; + /** + * @param message {object} + */ + sendToQml(message: object): void; + clearDebugWindow(): void; + /** + * @param message {object} + */ + emitScriptEvent(message: object): void; + /** + * @param message {object} + */ + emitWebEvent(message: object): void; + /** + * @returns {Signal} + */ + visibleChanged(): Signal; + /** + * @returns {Signal} + */ + positionChanged(): Signal; + /** + * @returns {Signal} + */ + sizeChanged(): Signal; + /** + * @param position {Vec2} + * @returns {Signal} + */ + moved(position: Vec2): Signal; + /** + * @param size {Size} + * @returns {Signal} + */ + resized(size: Size): Signal; + /** + * @returns {Signal} + */ + closed(): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + fromQml(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + scriptEventReceived(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + webEventReceived(message: object): Signal; + /** + * @param position {Vec2} + * @returns {Signal} + */ + hasMoved(position: Vec2): Signal; + /** + * @returns {Signal} + */ + hasClosed(): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + qmlToScript(message: object): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Tablet { + /** + * Creates or returns a new TabletProxy and returns it. + * @param name {string} Tablet name. + * @returns {TabletProxy} + */ + function getTablet(name: string): TabletProxy; + /** + * @param sound {Tablet.AudioEvents} + */ + function playSound(sound: Tablet.AudioEvents): void; + /** + * Triggered when a tablet message or dialog is created. + * @returns {Signal} + */ + function tabletNotification(): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace tabletInterface { + /** + * Creates or returns a new TabletProxy and returns it. + * @param name {string} Tablet name. + * @returns {TabletProxy} + */ + function getTablet(name: string): TabletProxy; + /** + * @param sound {Tablet.AudioEvents} + */ + function playSound(sound: Tablet.AudioEvents): void; + /** + * Triggered when a tablet message or dialog is created. + * @returns {Signal} + */ + function tabletNotification(): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare class TabletProxy { + interface ButtonList { + } + + /** + * @param submenu {string} [submenu=""] + */ + gotoMenuScreen(submenu: string): void; + /** + * @param url {string} + */ + initialScreen(url: string): void; + /** + * Transition to the home screen. + */ + gotoHomeScreen(): void; + /** + * Show the specified Web url on the tablet. + * @param url {string} URL of web page. + * @param injectedJavaScriptUrl {string} [injectedJavaScriptUrl=""] URL to an additional JS script to inject into the web page. + * @param loadOtherBase {boolean} [loadOtherBase=false] + */ + gotoWebScreen(url: string, injectedJavaScriptUrl: string, loadOtherBase: boolean): void; + /** + * @param path {string} + * @param resizable {boolean} [resizable=false] + */ + loadQMLSource(path: string, resizable: boolean): void; + /** + * @param path {string} + * @returns {boolean} + */ + pushOntoStack(path: string): boolean; + popFromStack(): void; + /** + * @param path {string} + */ + loadQMLOnTop(path: string): void; + /** + * @param path {string} + * @param injectedJavaScriptURL {string} [injectedJavaScriptURL=""] + */ + loadWebScreenOnTop(path: string, injectedJavaScriptURL: string): void; + returnToPreviousApp(): void; + /** + * Check if the tablet has a message dialog open. + * @returns {boolean} + */ + isMessageDialogOpen(): boolean; + /** + * Close any open dialogs. + */ + closeDialog(): void; + /** + * Creates a new button, adds it to this and returns it. + * @param properties {object} Button properties. + * @returns {TabletButtonProxy} + */ + addButton(properties: object): TabletButtonProxy; + /** + * Removes a button from the tablet. + * @param button {TabletButtonProxy} The button to be removed + */ + removeButton(button: TabletButtonProxy): void; + /** + * Used to send an event to the HTML/JavaScript embedded in the tablet. + * @param message {object} + */ + emitScriptEvent(message: object): void; + /** + * Used to send an event to the QML embedded in the tablet. + * @param message {object} + */ + sendToQml(message: object): void; + /** + * Check if the tablet is on the home screen. + * @returns {boolean} + */ + onHomeScreen(): boolean; + /** + * Set tablet into or out of landscape mode. + * @param landscape {boolean} true for landscape, false for portrait. + */ + setLandscape(landscape: boolean): void; + /** + * @returns {boolean} + */ + getLandscape(): boolean; + /** + * @param path {string} + * @returns {boolean} + */ + isPathLoaded(path: string): boolean; + /** + * Signaled when this tablet receives an event from the html/js embedded in the tablet. + * @param message {object} + * @returns {Signal} + */ + webEventReceived(message: object): Signal; + /** + * Signaled when this tablet receives an event from the qml embedded in the tablet. + * @param message {object} + * @returns {Signal} + */ + fromQml(message: object): Signal; + /** + * Signaled when this tablet screen changes. + * @param type {string} "Home", "Web", "Menu", "QML", "Closed". + * @param url {string} Only valid for Web and QML. + */ + screenChanged(type: string, url: string): void; + /** + * Signaled when the tablet becomes visible or becomes invisible. + * @returns {Signal} + */ + isTabletShownChanged(): Signal; + toolbarModeChanged(): void; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare class TabletButtonProxy { + /** + * Returns the current value of this button's properties. + * @returns {TabletButtonProxy.ButtonProperties} + */ + getProperties(): TabletButtonProxy.ButtonProperties; + /** + * Replace the values of some of this button's properties. + * @param properties {TabletButtonProxy.ButtonProperties} Set of properties to change. + */ + editProperties(properties: TabletButtonProxy.ButtonProperties): void; + /** + * Triggered when this button has been clicked on by the user. + * @returns {Signal} + */ + clicked(): Signal; + /** + * @returns {Signal} + */ + propertiesChanged(): Signal; + interface ButtonProperties { + /** + * URL to button icon. (50 x 50) + */ + icon: string; + /** + * URL to button icon, displayed during mouse hover. (50 x 50) + */ + hoverIcon: string; + /** + * URL to button icon used when button is active, and during mouse hover. (50 x 50) + */ + activeHoverIcon: string; + /** + * URL to button icon used when button is active. (50 x 50) + */ + activeIcon: string; + /** + * Button caption. + */ + text: string; + /** + * Button caption when button is not-active but during mouse hover. + */ + hoverText: string; + /** + * Button caption when button is active. + */ + activeText: string; + /** + * Button caption when button is active and during mouse hover. + */ + activeHoverText: string; + /** + * true when button is active. + */ + isActive: boolean; + /** + * Determines sort order on tablet. lower numbers will appear before larger numbers. + * Default is 100. + */ + sortOrder: number; + } + +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare class ToolbarButtonProxy { + /** + * @param properties {object} + */ + editProperties(properties: object): void; + /** + * @param propertyValue {object} + */ + writeProperty(propertyValue: object): void; + /** + * @param properties {object} + */ + writeProperties(properties: object): void; + /** + * @param propertyName {string} + * @returns {object} + */ + readProperty(propertyName: string): object; + /** + * @param propertyList {Array.} + * @returns {object} + */ + readProperties(propertyList: Array.): object; + /** + * @returns {Signal} + */ + clicked(): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare class ToolbarProxy { + /** + * @param properties {object} + * @returns {ToolbarButtonProxy} + */ + addButton(properties: object): ToolbarButtonProxy; + /** + * @param name {string} + */ + removeButton(name: string): void; + /** + * @param propertyValue {object} + */ + writeProperty(propertyValue: object): void; + /** + * @param properties {object} + */ + writeProperties(properties: object): void; + /** + * @param propertyName {string} + * @returns {object} + */ + readProperty(propertyName: string): object; + /** + * @param propertyList {Array.} + * @returns {object} + */ + readProperties(propertyList: Array.): object; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Toolbars { + /** + * @param toolbarID {string} + * @returns {ToolbarProxy} + */ + function getToolbar(toolbarID: string): ToolbarProxy; +} + diff --git a/Utilities/Editor/VSCode_TS-Definitions_Snippets/out/hifiVsCode.json b/Utilities/Editor/VSCode_TS-Definitions_Snippets/out/hifiVsCode.json new file mode 100644 index 000000000..46fdd0ac7 --- /dev/null +++ b/Utilities/Editor/VSCode_TS-Definitions_Snippets/out/hifiVsCode.json @@ -0,0 +1,1870 @@ + + [ + {"Agent":{"prefix":"Agent","body":["Agent"],"description":"
Available in:Assignment Client Scripts

"}}, + {"Agent.setIsAvatar":{"prefix":"Agent.setIsAvatar","body":["Agent.setIsAvatar(${1:isAvatar: boolean})"]}}, + {"Agent.isAvatar":{"prefix":"Agent.isAvatar","body":["Agent.isAvatar"]}}, + {"Agent.playAvatarSound":{"prefix":"Agent.playAvatarSound","body":["Agent.playAvatarSound(${1:avatarSound: object})"]}}, + {"Avatar":{"prefix":"Avatar","body":["Avatar"],"description":"
Available in:Assignment Client Scripts

The Avatar API is used to manipulate scriptable avatars on the domain. This API is a subset of the \r{@link MyAvatar} API.\r\r

Note: In the examples, use \"Avatar\" instead of \"MyAvatar\".

"}}, + {"Avatar.startAnimation":{"prefix":"Avatar.startAnimation","body":["Avatar.startAnimation(${1:url: string},${2:fps: number},${3:priority: number},${4:loop: boolean},${5:hold: boolean},${6:firstFrame: number},${7:lastFrame: number},${8:maskedJoints: Array.})"]}}, + {"Avatar.stopAnimation":{"prefix":"Avatar.stopAnimation","body":["Avatar.stopAnimation"]}}, + {"Avatar.getAnimationDetails":{"prefix":"Avatar.getAnimationDetails","body":["Avatar.getAnimationDetails"]}}, + {"EntityViewer":{"prefix":"EntityViewer","body":["EntityViewer"],"description":"
Available in:Assignment Client Scripts

"}}, + {"EntityViewer.queryOctree":{"prefix":"EntityViewer.queryOctree","body":["EntityViewer.queryOctree"]}}, + {"EntityViewer.setPosition":{"prefix":"EntityViewer.setPosition","body":["EntityViewer.setPosition(${1:position: Vec3})"]}}, + {"EntityViewer.setOrientation":{"prefix":"EntityViewer.setOrientation","body":["EntityViewer.setOrientation(${1:orientation: Quat})"]}}, + {"EntityViewer.setCenterRadius":{"prefix":"EntityViewer.setCenterRadius","body":["EntityViewer.setCenterRadius(${1:radius: number})"]}}, + {"EntityViewer.setKeyholeRadius":{"prefix":"EntityViewer.setKeyholeRadius","body":["EntityViewer.setKeyholeRadius(${1:radius: number})"]}}, + {"EntityViewer.setVoxelSizeScale":{"prefix":"EntityViewer.setVoxelSizeScale","body":["EntityViewer.setVoxelSizeScale(${1:sizeScale: number})"]}}, + {"EntityViewer.setBoundaryLevelAdjust":{"prefix":"EntityViewer.setBoundaryLevelAdjust","body":["EntityViewer.setBoundaryLevelAdjust(${1:boundaryLevelAdjust: number})"]}}, + {"EntityViewer.setMaxPacketsPerSecond":{"prefix":"EntityViewer.setMaxPacketsPerSecond","body":["EntityViewer.setMaxPacketsPerSecond(${1:maxPacketsPerSecond: number})"]}}, + {"EntityViewer.getPosition":{"prefix":"EntityViewer.getPosition","body":["EntityViewer.getPosition"]}}, + {"EntityViewer.getOrientation":{"prefix":"EntityViewer.getOrientation","body":["EntityViewer.getOrientation"]}}, + {"EntityViewer.getVoxelSizeScale":{"prefix":"EntityViewer.getVoxelSizeScale","body":["EntityViewer.getVoxelSizeScale"]}}, + {"EntityViewer.getBoundaryLevelAdjust":{"prefix":"EntityViewer.getBoundaryLevelAdjust","body":["EntityViewer.getBoundaryLevelAdjust"]}}, + {"EntityViewer.getMaxPacketsPerSecond":{"prefix":"EntityViewer.getMaxPacketsPerSecond","body":["EntityViewer.getMaxPacketsPerSecond"]}}, + {"EntityViewer.getOctreeElementsCount":{"prefix":"EntityViewer.getOctreeElementsCount","body":["EntityViewer.getOctreeElementsCount"]}}, + {"HifiAbout":{"prefix":"HifiAbout","body":["HifiAbout"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"HifiAbout.openUrl":{"prefix":"HifiAbout.openUrl","body":["HifiAbout.openUrl(${1:url: string})"]}}, + {"Controller.Hardware-Application":{"prefix":"Controller.Hardware-Application","body":["Controller.Hardware-Application"],"description":"

The Controller.Hardware.Application object has properties representing Interface's state. The property\rvalues are integer IDs, uniquely identifying each output. Read-only. These can be mapped to actions or functions or\rController.Standard items in a {@link RouteObject} mapping (e.g., using the {@link RouteObject#when} method).\rEach data value is either 1.0 for \"true\" or 0.0 for \"false\".

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
CameraFirstPersonnumbernumberThe camera is in first-person mode.\r
CameraThirdPersonnumbernumberThe camera is in third-person mode.\r
CameraFSMnumbernumberThe camera is in full screen mirror mode.
CameraIndependentnumbernumberThe camera is in independent mode.
CameraEntitynumbernumberThe camera is in entity mode.
InHMDnumbernumberThe user is in HMD mode.
AdvancedMovementnumbernumberAdvanced movement controls are enabled.\r
SnapTurnnumbernumberSnap turn is enabled.
GroundednumbernumberThe user's avatar is on the ground.
NavigationFocusednumbernumberNot used.
"}}, + {"AvatarBookmarks":{"prefix":"AvatarBookmarks","body":["AvatarBookmarks"],"description":"
Available in:Interface ScriptsClient Entity Scripts

This API helps manage adding and deleting avatar bookmarks."}}, + {"AvatarBookmarks.addBookMark":{"prefix":"AvatarBookmarks.addBookMark","body":["AvatarBookmarks.addBookMark"],"description":"Add the current Avatar to your avatar bookmarks."}}, + {"AvatarBookmarks.bookmarkLoaded":{"prefix":"AvatarBookmarks.bookmarkLoaded","body":["AvatarBookmarks.bookmarkLoaded(${1:bookmarkName: string})"],"description":"This function gets triggered after avatar loaded from bookmark"}}, + {"AvatarBookmarks.bookmarkDeleted":{"prefix":"AvatarBookmarks.bookmarkDeleted","body":["AvatarBookmarks.bookmarkDeleted(${1:bookmarkName: string})"],"description":"This function gets triggered after avatar bookmark deleted"}}, + {"AvatarBookmarks.bookmarkAdded":{"prefix":"AvatarBookmarks.bookmarkAdded","body":["AvatarBookmarks.bookmarkAdded(${1:bookmarkName: string})"],"description":"This function gets triggered after avatar bookmark added"}}, + {"AvatarBookmarks.deleteBookmark":{"prefix":"AvatarBookmarks.deleteBookmark","body":["AvatarBookmarks.deleteBookmark"]}}, + {"LocationBookmarks.deleteBookmark":{"prefix":"LocationBookmarks.deleteBookmark","body":["LocationBookmarks.deleteBookmark"]}}, + {"Camera.getCameraEntity":{"prefix":"Camera.getCameraEntity","body":["Camera.getCameraEntity"],"description":"Get the ID of the entity that the camera is set to use the position and orientation from when it's in entity mode. You can\r also get the entity ID using the Camera.cameraEntity property."}}, + {"Camera.setCameraEntity":{"prefix":"Camera.setCameraEntity","body":["Camera.setCameraEntity(${1:entityID: Uuid})"],"description":"Set the entity that the camera should use the position and orientation from when it's in entity mode. You can also set the\r entity using the Camera.cameraEntity property."}}, + {"LocationBookmarks":{"prefix":"LocationBookmarks","body":["LocationBookmarks"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"LocationBookmarks.addBookmark":{"prefix":"LocationBookmarks.addBookmark","body":["LocationBookmarks.addBookmark"]}}, + {"LocationBookmarks.setHomeLocationToAddress":{"prefix":"LocationBookmarks.setHomeLocationToAddress","body":["LocationBookmarks.setHomeLocationToAddress(${1:address: string})"]}}, + {"LODManager":{"prefix":"LODManager","body":["LODManager"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The LOD class manages your Level of Detail functions within Interface."}}, + {"LODManager.setAutomaticLODAdjust":{"prefix":"LODManager.setAutomaticLODAdjust","body":["LODManager.setAutomaticLODAdjust(${1:value: boolean})"]}}, + {"LODManager.getAutomaticLODAdjust":{"prefix":"LODManager.getAutomaticLODAdjust","body":["LODManager.getAutomaticLODAdjust"]}}, + {"LODManager.setDesktopLODTargetFPS":{"prefix":"LODManager.setDesktopLODTargetFPS","body":["LODManager.setDesktopLODTargetFPS(${1:value: number})"]}}, + {"LODManager.getDesktopLODTargetFPS":{"prefix":"LODManager.getDesktopLODTargetFPS","body":["LODManager.getDesktopLODTargetFPS"]}}, + {"LODManager.setHMDLODTargetFPS":{"prefix":"LODManager.setHMDLODTargetFPS","body":["LODManager.setHMDLODTargetFPS(${1:value: number})"]}}, + {"LODManager.getHMDLODTargetFPS":{"prefix":"LODManager.getHMDLODTargetFPS","body":["LODManager.getHMDLODTargetFPS"]}}, + {"LODManager.getLODFeedbackText":{"prefix":"LODManager.getLODFeedbackText","body":["LODManager.getLODFeedbackText"]}}, + {"LODManager.setOctreeSizeScale":{"prefix":"LODManager.setOctreeSizeScale","body":["LODManager.setOctreeSizeScale(${1:sizeScale: number})"]}}, + {"LODManager.getOctreeSizeScale":{"prefix":"LODManager.getOctreeSizeScale","body":["LODManager.getOctreeSizeScale"]}}, + {"LODManager.setBoundaryLevelAdjust":{"prefix":"LODManager.setBoundaryLevelAdjust","body":["LODManager.setBoundaryLevelAdjust(${1:boundaryLevelAdjust: number})"]}}, + {"LODManager.getBoundaryLevelAdjust":{"prefix":"LODManager.getBoundaryLevelAdjust","body":["LODManager.getBoundaryLevelAdjust"]}}, + {"LODManager.getLODTargetFPS":{"prefix":"LODManager.getLODTargetFPS","body":["LODManager.getLODTargetFPS"]}}, + {"LODManager.LODIncreased":{"prefix":"LODManager.LODIncreased","body":["LODManager.LODIncreased"]}}, + {"LODManager.LODDecreased":{"prefix":"LODManager.LODDecreased","body":["LODManager.LODDecreased"]}}, + {"SpeechRecognizer":{"prefix":"SpeechRecognizer","body":["SpeechRecognizer"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"SpeechRecognizer.setEnabled":{"prefix":"SpeechRecognizer.setEnabled","body":["SpeechRecognizer.setEnabled(${1:enabled: boolean})"]}}, + {"SpeechRecognizer.addCommand":{"prefix":"SpeechRecognizer.addCommand","body":["SpeechRecognizer.addCommand(${1:command: string})"]}}, + {"SpeechRecognizer.removeCommand":{"prefix":"SpeechRecognizer.removeCommand","body":["SpeechRecognizer.removeCommand(${1:command: string})"]}}, + {"SpeechRecognizer.commandRecognized":{"prefix":"SpeechRecognizer.commandRecognized","body":["SpeechRecognizer.commandRecognized(${1:command: string})"]}}, + {"SpeechRecognizer.enabledUpdated":{"prefix":"SpeechRecognizer.enabledUpdated","body":["SpeechRecognizer.enabledUpdated(${1:enabled: boolean})"]}}, + {"AudioScope":{"prefix":"AudioScope","body":["AudioScope"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The AudioScope API helps control the Audio Scope features in Interface"}}, + {"AudioScope.toggle":{"prefix":"AudioScope.toggle","body":["AudioScope.toggle"]}}, + {"AudioScope.setVisible":{"prefix":"AudioScope.setVisible","body":["AudioScope.setVisible(${1:visible: boolean})"]}}, + {"AudioScope.getVisible":{"prefix":"AudioScope.getVisible","body":["AudioScope.getVisible"]}}, + {"AudioScope.togglePause":{"prefix":"AudioScope.togglePause","body":["AudioScope.togglePause"]}}, + {"AudioScope.setPause":{"prefix":"AudioScope.setPause","body":["AudioScope.setPause(${1:paused: boolean})"]}}, + {"AudioScope.getPause":{"prefix":"AudioScope.getPause","body":["AudioScope.getPause"]}}, + {"AudioScope.toggleTrigger":{"prefix":"AudioScope.toggleTrigger","body":["AudioScope.toggleTrigger"]}}, + {"AudioScope.getAutoTrigger":{"prefix":"AudioScope.getAutoTrigger","body":["AudioScope.getAutoTrigger"]}}, + {"AudioScope.setAutoTrigger":{"prefix":"AudioScope.setAutoTrigger","body":["AudioScope.setAutoTrigger(${1:autoTrigger: boolean})"]}}, + {"AudioScope.setTriggerValues":{"prefix":"AudioScope.setTriggerValues","body":["AudioScope.setTriggerValues(${1:x: number},${2:y: number})"]}}, + {"AudioScope.setTriggered":{"prefix":"AudioScope.setTriggered","body":["AudioScope.setTriggered(${1:triggered: boolean})"]}}, + {"AudioScope.getTriggered":{"prefix":"AudioScope.getTriggered","body":["AudioScope.getTriggered"]}}, + {"AudioScope.getFramesPerSecond":{"prefix":"AudioScope.getFramesPerSecond","body":["AudioScope.getFramesPerSecond"]}}, + {"AudioScope.getFramesPerScope":{"prefix":"AudioScope.getFramesPerScope","body":["AudioScope.getFramesPerScope"]}}, + {"AudioScope.selectAudioScopeFiveFrames":{"prefix":"AudioScope.selectAudioScopeFiveFrames","body":["AudioScope.selectAudioScopeFiveFrames"]}}, + {"AudioScope.selectAudioScopeTwentyFrames":{"prefix":"AudioScope.selectAudioScopeTwentyFrames","body":["AudioScope.selectAudioScopeTwentyFrames"]}}, + {"AudioScope.selectAudioScopeFiftyFrames":{"prefix":"AudioScope.selectAudioScopeFiftyFrames","body":["AudioScope.selectAudioScopeFiftyFrames"]}}, + {"AudioScope.getScopeInput":{"prefix":"AudioScope.getScopeInput","body":["AudioScope.getScopeInput"]}}, + {"AudioScope.getScopeOutputLeft":{"prefix":"AudioScope.getScopeOutputLeft","body":["AudioScope.getScopeOutputLeft"]}}, + {"AudioScope.getScopeOutputRight":{"prefix":"AudioScope.getScopeOutputRight","body":["AudioScope.getScopeOutputRight"]}}, + {"AudioScope.getTriggerInput":{"prefix":"AudioScope.getTriggerInput","body":["AudioScope.getTriggerInput"]}}, + {"AudioScope.getTriggerOutputLeft":{"prefix":"AudioScope.getTriggerOutputLeft","body":["AudioScope.getTriggerOutputLeft"]}}, + {"AudioScope.getTriggerOutputRight":{"prefix":"AudioScope.getTriggerOutputRight","body":["AudioScope.getTriggerOutputRight"]}}, + {"AudioScope.setLocalEcho":{"prefix":"AudioScope.setLocalEcho","body":["AudioScope.setLocalEcho"]}}, + {"AudioScope.setServerEcho":{"prefix":"AudioScope.setServerEcho","body":["AudioScope.setServerEcho"]}}, + {"AudioScope.pauseChanged":{"prefix":"AudioScope.pauseChanged","body":["AudioScope.pauseChanged"]}}, + {"AudioScope.triggered":{"prefix":"AudioScope.triggered","body":["AudioScope.triggered"]}}, + {"Entities.ActionArguments-FarGrab":{"prefix":"Entities.ActionArguments-FarGrab","body":["Entities.ActionArguments-FarGrab"],"description":"The \"far-grab\" {@link Entities.ActionType|ActionType} moves and rotates an entity to a target position and \rorientation, optionally relative to another entity. Collisions between the entity and the user's avatar are disabled during \rthe far-grab.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-Hold":{"prefix":"Entities.ActionArguments-Hold","body":["Entities.ActionArguments-Hold"],"description":"The \"hold\" {@link Entities.ActionType|ActionType} positions and rotates an entity relative to an avatar's hand. \rCollisions between the entity and the user's avatar are disabled during the hold.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"AvatarManager":{"prefix":"AvatarManager","body":["AvatarManager"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The AvatarManager API has properties and methods which manage Avatars within the same domain.\r\r

Note: This API is also provided to Interface and client entity scripts as the synonym, \rAvatarList. For assignment client scripts, see the separate {@link AvatarList} API."}}, + {"AvatarManager.getAvatar":{"prefix":"AvatarManager.getAvatar","body":["AvatarManager.getAvatar(${1:avatarID: Uuid})"]}}, + {"AvatarManager.getAvatarDataRate":{"prefix":"AvatarManager.getAvatarDataRate","body":["AvatarManager.getAvatarDataRate(${1:sessionID: Uuid},${2:rateName: string})"]}}, + {"AvatarManager.getAvatarUpdateRate":{"prefix":"AvatarManager.getAvatarUpdateRate","body":["AvatarManager.getAvatarUpdateRate(${1:sessionID: Uuid},${2:rateName: string})"]}}, + {"AvatarManager.getAvatarSimulationRate":{"prefix":"AvatarManager.getAvatarSimulationRate","body":["AvatarManager.getAvatarSimulationRate(${1:sessionID: Uuid},${2:rateName: string})"]}}, + {"AvatarManager.findRayIntersection":{"prefix":"AvatarManager.findRayIntersection","body":["AvatarManager.findRayIntersection(${1:ray: PickRay},${2:avatarsToInclude: Array.},${3:avatarsToDiscard: Array.})"]}}, + {"AvatarManager.findRayIntersectionVector":{"prefix":"AvatarManager.findRayIntersectionVector","body":["AvatarManager.findRayIntersectionVector(${1:ray: PickRay},${2:avatarsToInclude: Array.},${3:avatarsToDiscard: Array.})"]}}, + {"AvatarManager.getAvatarSortCoefficient":{"prefix":"AvatarManager.getAvatarSortCoefficient","body":["AvatarManager.getAvatarSortCoefficient(${1:name: string})"]}}, + {"AvatarManager.setAvatarSortCoefficient":{"prefix":"AvatarManager.setAvatarSortCoefficient","body":["AvatarManager.setAvatarSortCoefficient(${1:name: string},${2:value: number})"]}}, + {"AvatarManager.getPalData":{"prefix":"AvatarManager.getPalData","body":["AvatarManager.getPalData(${1:specificAvatarIdentifiers: Array.})"],"description":"Used in the PAL for getting PAL-related data about avatars nearby. Using this method is faster\rthan iterating over each avatar and obtaining data about them in JavaScript, as that method\rlocks and unlocks each avatar's data structure potentially hundreds of times per update tick."}}, + {"AvatarManager.updateAvatarRenderStatus":{"prefix":"AvatarManager.updateAvatarRenderStatus","body":["AvatarManager.updateAvatarRenderStatus(${1:shouldRenderAvatars: boolean})"]}}, + {"MyAvatar":{"prefix":"MyAvatar","body":["MyAvatar"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Your avatar is your in-world representation of you. The MyAvatar API is used to manipulate the avatar.\rFor example, you can customize the avatar's appearance, run custom avatar animations,\rchange the avatar's position within the domain, or manage the avatar's collisions with other objects."}}, + {"MyAvatar.resetSensorsAndBody":{"prefix":"MyAvatar.resetSensorsAndBody","body":["MyAvatar.resetSensorsAndBody"]}}, + {"MyAvatar.centerBody":{"prefix":"MyAvatar.centerBody","body":["MyAvatar.centerBody"],"description":"Moves and orients the avatar, such that it is directly underneath the HMD, with toes pointed forward."}}, + {"MyAvatar.clearIKJointLimitHistory":{"prefix":"MyAvatar.clearIKJointLimitHistory","body":["MyAvatar.clearIKJointLimitHistory"],"description":"The internal inverse-kinematics system maintains a record of which joints are \"locked\". Sometimes it is useful to forget this history, to prevent\rcontorted joints."}}, + {"MyAvatar.setOrientationVar":{"prefix":"MyAvatar.setOrientationVar","body":["MyAvatar.setOrientationVar(${1:newOrientationVar: object})"]}}, + {"MyAvatar.getOrientationVar":{"prefix":"MyAvatar.getOrientationVar","body":["MyAvatar.getOrientationVar"]}}, + {"MyAvatar.getDefaultEyePosition":{"prefix":"MyAvatar.getDefaultEyePosition","body":["MyAvatar.getDefaultEyePosition"],"description":"Get the position in world coordinates of the point directly between your avatar's eyes assuming your avatar was in its\rdefault pose. This is a reference position; it does not change as your avatar's head moves relative to the avatar \rposition."}}, + {"MyAvatar.overrideAnimation":{"prefix":"MyAvatar.overrideAnimation","body":["MyAvatar.overrideAnimation(${1:url: string},${2:fps: number},${3:loop: boolean},${4:firstFrame: number},${5:lastFrame: number})"],"description":"The avatar animation system includes a set of default animations along with rules for how those animations are blended\rtogether with procedural data (such as look at vectors, hand sensors etc.). overrideAnimation() is used to completely\roverride all motion from the default animation system (including inverse kinematics for hand and head controllers) and\rplay a set of specified animations. To end these animations and restore the default animations, use \r{@link MyAvatar.restoreAnimation}.
\r

Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target \rrig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, \rthe avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see \rAvatar Standards.

"}}, + {"MyAvatar.restoreAnimation":{"prefix":"MyAvatar.restoreAnimation","body":["MyAvatar.restoreAnimation"],"description":"The avatar animation system includes a set of default animations along with rules for how those animations are blended together with\rprocedural data (such as look at vectors, hand sensors etc.). Playing your own custom animations will override the default animations.\rrestoreAnimation() is used to restore all motion from the default animation system including inverse kinematics for hand and head\rcontrollers. If you aren't currently playing an override animation, this function will have no effect."}}, + {"MyAvatar.getAnimationRoles":{"prefix":"MyAvatar.getAnimationRoles","body":["MyAvatar.getAnimationRoles"],"description":"Each avatar has an avatar-animation.json file that defines which animations are used and how they are blended together with procedural data\r(such as look at vectors, hand sensors etc.). Each animation specified in the avatar-animation.json file is known as an animation role.\rAnimation roles map to easily understandable actions that the avatar can perform, such as \"idleStand\", \"idleTalk\", or \"walkFwd.\"\rgetAnimationRoles() is used get the list of animation roles defined in the avatar-animation.json."}}, + {"MyAvatar.overrideRoleAnimation":{"prefix":"MyAvatar.overrideRoleAnimation","body":["MyAvatar.overrideRoleAnimation(${1:role: string},${2:url: string},${3:fps: number},${4:loop: boolean},${5:firstFrame: number},${6:lastFrame: number})"],"description":"Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions\rthat the avatar can perform, such as \"idleStand\", \"idleTalk\", or \"walkFwd\". To get the full list of roles, use getAnimationRoles().\rFor each role, the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended\rtogether with procedural data (such as look at vectors, hand sensors etc.).\roverrideRoleAnimation() is used to change the animation clip (.FBX) associated with a specified animation role. To end \rthe animations and restore the default animations, use {@link MyAvatar.restoreRoleAnimation}.
\r

Note: Hand roles only affect the hand. Other 'main' roles, like 'idleStand', 'idleTalk', 'takeoffStand' are full body.

\r

Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target\rrig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different,\rthe avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see \rAvatar Standards."}}, + {"MyAvatar.restoreRoleAnimation":{"prefix":"MyAvatar.restoreRoleAnimation","body":["MyAvatar.restoreRoleAnimation(${1:role: string})"],"description":"Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions that\rthe avatar can perform, such as \"idleStand\", \"idleTalk\", or \"walkFwd\". To get the full list of roles, use getAnimationRoles(). For each role,\rthe avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended together with\rprocedural data (such as look at vectors, hand sensors etc.). You can change the animation clip (.FBX) associated with a specified animation\rrole using overrideRoleAnimation().\rrestoreRoleAnimation() is used to restore a specified animation role's default animation clip. If you have not specified an override animation\rfor the specified role, this function will have no effect."}}, + {"MyAvatar.removeAnimationStateHandler":{"prefix":"MyAvatar.removeAnimationStateHandler","body":["MyAvatar.removeAnimationStateHandler(${1:handler: number})"]}}, + {"MyAvatar.getSnapTurn":{"prefix":"MyAvatar.getSnapTurn","body":["MyAvatar.getSnapTurn"]}}, + {"MyAvatar.setSnapTurn":{"prefix":"MyAvatar.setSnapTurn","body":["MyAvatar.setSnapTurn(${1:on: boolean})"]}}, + {"MyAvatar.setDominantHand":{"prefix":"MyAvatar.setDominantHand","body":["MyAvatar.setDominantHand(${1:hand: string})"]}}, + {"MyAvatar.getDominantHand":{"prefix":"MyAvatar.getDominantHand","body":["MyAvatar.getDominantHand"]}}, + {"MyAvatar.setCenterOfGravityModelEnabled":{"prefix":"MyAvatar.setCenterOfGravityModelEnabled","body":["MyAvatar.setCenterOfGravityModelEnabled(${1:enabled: boolean})"]}}, + {"MyAvatar.getCenterOfGravityModelEnabled":{"prefix":"MyAvatar.getCenterOfGravityModelEnabled","body":["MyAvatar.getCenterOfGravityModelEnabled"]}}, + {"MyAvatar.setHMDLeanRecenterEnabled":{"prefix":"MyAvatar.setHMDLeanRecenterEnabled","body":["MyAvatar.setHMDLeanRecenterEnabled(${1:enabled: boolean})"]}}, + {"MyAvatar.getHMDLeanRecenterEnabled":{"prefix":"MyAvatar.getHMDLeanRecenterEnabled","body":["MyAvatar.getHMDLeanRecenterEnabled"]}}, + {"MyAvatar.requestEnableHandTouch":{"prefix":"MyAvatar.requestEnableHandTouch","body":["MyAvatar.requestEnableHandTouch"],"description":"Request to enable hand touch effect globally"}}, + {"MyAvatar.requestDisableHandTouch":{"prefix":"MyAvatar.requestDisableHandTouch","body":["MyAvatar.requestDisableHandTouch"],"description":"Request to disable hand touch effect globally"}}, + {"MyAvatar.disableHandTouchForID":{"prefix":"MyAvatar.disableHandTouchForID","body":["MyAvatar.disableHandTouchForID(${1:entityID: Uuid})"],"description":"Disables hand touch effect on a specific entity"}}, + {"MyAvatar.enableHandTouchForID":{"prefix":"MyAvatar.enableHandTouchForID","body":["MyAvatar.enableHandTouchForID(${1:entityID: Uuid})"],"description":"Enables hand touch effect on a specific entity"}}, + {"MyAvatar.getRawDriveKey":{"prefix":"MyAvatar.getRawDriveKey","body":["MyAvatar.getRawDriveKey(${1:key: DriveKeys})"]}}, + {"MyAvatar.disableDriveKey":{"prefix":"MyAvatar.disableDriveKey","body":["MyAvatar.disableDriveKey(${1:key: DriveKeys})"]}}, + {"MyAvatar.enableDriveKey":{"prefix":"MyAvatar.enableDriveKey","body":["MyAvatar.enableDriveKey(${1:key: DriveKeys})"]}}, + {"MyAvatar.isDriveKeyDisabled":{"prefix":"MyAvatar.isDriveKeyDisabled","body":["MyAvatar.isDriveKeyDisabled(${1:key: DriveKeys})"]}}, + {"MyAvatar.triggerVerticalRecenter":{"prefix":"MyAvatar.triggerVerticalRecenter","body":["MyAvatar.triggerVerticalRecenter"],"description":"Recenter the avatar in the vertical direction, if {@link MyAvatar|MyAvatar.hmdLeanRecenterEnabled} is \rfalse."}}, + {"MyAvatar.triggerRotationRecenter":{"prefix":"MyAvatar.triggerRotationRecenter","body":["MyAvatar.triggerRotationRecenter"],"description":"Recenter the avatar's rotation, if {@link MyAvatar|MyAvatar.hmdLeanRecenterEnabled} is false."}}, + {"MyAvatar.isRecenteringHorizontally":{"prefix":"MyAvatar.isRecenteringHorizontally","body":["MyAvatar.isRecenteringHorizontally"],"description":"The isRecenteringHorizontally function returns true if MyAvatar\ris translating the root of the Avatar to keep the center of gravity under the head.\risActive(Horizontal) is returned."}}, + {"MyAvatar.getHeadPosition":{"prefix":"MyAvatar.getHeadPosition","body":["MyAvatar.getHeadPosition"],"description":"Get the current position of the avatar's \"Head\" joint."}}, + {"MyAvatar.getHeadFinalYaw":{"prefix":"MyAvatar.getHeadFinalYaw","body":["MyAvatar.getHeadFinalYaw"]}}, + {"MyAvatar.getHeadFinalRoll":{"prefix":"MyAvatar.getHeadFinalRoll","body":["MyAvatar.getHeadFinalRoll"]}}, + {"MyAvatar.getHeadFinalPitch":{"prefix":"MyAvatar.getHeadFinalPitch","body":["MyAvatar.getHeadFinalPitch"]}}, + {"MyAvatar.getHeadDeltaPitch":{"prefix":"MyAvatar.getHeadDeltaPitch","body":["MyAvatar.getHeadDeltaPitch"]}}, + {"MyAvatar.getEyePosition":{"prefix":"MyAvatar.getEyePosition","body":["MyAvatar.getEyePosition"],"description":"Get the current position of the point directly between the avatar's eyes."}}, + {"MyAvatar.getTargetAvatarPosition":{"prefix":"MyAvatar.getTargetAvatarPosition","body":["MyAvatar.getTargetAvatarPosition"]}}, + {"MyAvatar.getTargetAvatar":{"prefix":"MyAvatar.getTargetAvatar","body":["MyAvatar.getTargetAvatar"]}}, + {"MyAvatar.getLeftHandPosition":{"prefix":"MyAvatar.getLeftHandPosition","body":["MyAvatar.getLeftHandPosition"],"description":"Get the position of the avatar's left hand as positioned by a hand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.)

"}}, + {"MyAvatar.getRightHandPosition":{"prefix":"MyAvatar.getRightHandPosition","body":["MyAvatar.getRightHandPosition"],"description":"Get the position of the avatar's right hand as positioned by a hand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.)

"}}, + {"MyAvatar.getLeftHandTipPosition":{"prefix":"MyAvatar.getLeftHandTipPosition","body":["MyAvatar.getLeftHandTipPosition"]}}, + {"MyAvatar.getRightHandTipPosition":{"prefix":"MyAvatar.getRightHandTipPosition","body":["MyAvatar.getRightHandTipPosition"]}}, + {"MyAvatar.getLeftHandPose":{"prefix":"MyAvatar.getLeftHandPose","body":["MyAvatar.getLeftHandPose"],"description":"Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a \rhand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.) If you are using the Leap Motion, the return value's valid property will be \rfalse and any pose values returned will not be meaningful.

"}}, + {"MyAvatar.getRightHandPose":{"prefix":"MyAvatar.getRightHandPose","body":["MyAvatar.getRightHandPose"],"description":"Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a \rhand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.) If you are using the Leap Motion, the return value's valid property will be \rfalse and any pose values returned will not be meaningful.

"}}, + {"MyAvatar.getLeftHandTipPose":{"prefix":"MyAvatar.getLeftHandTipPose","body":["MyAvatar.getLeftHandTipPose"]}}, + {"MyAvatar.getRightHandTipPose":{"prefix":"MyAvatar.getRightHandTipPose","body":["MyAvatar.getRightHandTipPose"]}}, + {"MyAvatar.worldToJointPoint":{"prefix":"MyAvatar.worldToJointPoint","body":["MyAvatar.worldToJointPoint(${1:position: Vec3},${2:jointIndex: number})"]}}, + {"MyAvatar.worldToJointDirection":{"prefix":"MyAvatar.worldToJointDirection","body":["MyAvatar.worldToJointDirection(${1:direction: Vec3},${2:jointIndex: number})"]}}, + {"MyAvatar.worldToJointRotation":{"prefix":"MyAvatar.worldToJointRotation","body":["MyAvatar.worldToJointRotation(${1:rotation: Quat},${2:jointIndex: number})"]}}, + {"MyAvatar.jointToWorldPoint":{"prefix":"MyAvatar.jointToWorldPoint","body":["MyAvatar.jointToWorldPoint(${1:position: vec3},${2:jointIndex: number})"]}}, + {"MyAvatar.jointToWorldDirection":{"prefix":"MyAvatar.jointToWorldDirection","body":["MyAvatar.jointToWorldDirection(${1:direction: Vec3},${2:jointIndex: number})"]}}, + {"MyAvatar.jointToWorldRotation":{"prefix":"MyAvatar.jointToWorldRotation","body":["MyAvatar.jointToWorldRotation(${1:rotation: Quat},${2:jointIndex: number})"]}}, + {"MyAvatar.pinJoint":{"prefix":"MyAvatar.pinJoint","body":["MyAvatar.pinJoint(${1:index: number},${2:position: Vec3},${3:orientation: Quat})"]}}, + {"MyAvatar.clearPinOnJoint":{"prefix":"MyAvatar.clearPinOnJoint","body":["MyAvatar.clearPinOnJoint(${1:index: number})"]}}, + {"MyAvatar.getIKErrorOnLastSolve":{"prefix":"MyAvatar.getIKErrorOnLastSolve","body":["MyAvatar.getIKErrorOnLastSolve"]}}, + {"MyAvatar.useFullAvatarURL":{"prefix":"MyAvatar.useFullAvatarURL","body":["MyAvatar.useFullAvatarURL(${1:fullAvatarURL: string},${2:modelName: string})"]}}, + {"MyAvatar.getFullAvatarURLFromPreferences":{"prefix":"MyAvatar.getFullAvatarURLFromPreferences","body":["MyAvatar.getFullAvatarURLFromPreferences"],"description":"Get the complete URL for the current avatar."}}, + {"MyAvatar.getFullAvatarModelName":{"prefix":"MyAvatar.getFullAvatarModelName","body":["MyAvatar.getFullAvatarModelName"],"description":"Get the full avatar model name for the current avatar."}}, + {"MyAvatar.getAvatarEntitiesVariant()":{"prefix":"MyAvatar.getAvatarEntitiesVariant()","body":["MyAvatar.getAvatarEntitiesVariant()"],"description":"Function returns list of avatar entities"}}, + {"MyAvatar.isFlying":{"prefix":"MyAvatar.isFlying","body":["MyAvatar.isFlying"]}}, + {"MyAvatar.isInAir":{"prefix":"MyAvatar.isInAir","body":["MyAvatar.isInAir"]}}, + {"MyAvatar.setFlyingEnabled":{"prefix":"MyAvatar.setFlyingEnabled","body":["MyAvatar.setFlyingEnabled(${1:enabled: boolean})"]}}, + {"MyAvatar.getFlyingEnabled":{"prefix":"MyAvatar.getFlyingEnabled","body":["MyAvatar.getFlyingEnabled"]}}, + {"MyAvatar.setFlyingDesktopPref":{"prefix":"MyAvatar.setFlyingDesktopPref","body":["MyAvatar.setFlyingDesktopPref(${1:enabled: boolean})"]}}, + {"MyAvatar.getFlyingDesktopPref":{"prefix":"MyAvatar.getFlyingDesktopPref","body":["MyAvatar.getFlyingDesktopPref"]}}, + {"MyAvatar.setFlyingDesktopPref":{"prefix":"MyAvatar.setFlyingDesktopPref","body":["MyAvatar.setFlyingDesktopPref(${1:enabled: boolean})"]}}, + {"MyAvatar.getFlyingDesktopPref":{"prefix":"MyAvatar.getFlyingDesktopPref","body":["MyAvatar.getFlyingDesktopPref"]}}, + {"MyAvatar.getAvatarScale":{"prefix":"MyAvatar.getAvatarScale","body":["MyAvatar.getAvatarScale"]}}, + {"MyAvatar.setAvatarScale":{"prefix":"MyAvatar.setAvatarScale","body":["MyAvatar.setAvatarScale(${1:scale: number})"]}}, + {"MyAvatar.setCollisionsEnabled":{"prefix":"MyAvatar.setCollisionsEnabled","body":["MyAvatar.setCollisionsEnabled(${1:enabled: boolean})"]}}, + {"MyAvatar.getCollisionsEnabled":{"prefix":"MyAvatar.getCollisionsEnabled","body":["MyAvatar.getCollisionsEnabled"]}}, + {"MyAvatar.getCollisionCapsule":{"prefix":"MyAvatar.getCollisionCapsule","body":["MyAvatar.getCollisionCapsule"]}}, + {"MyAvatar.setCharacterControllerEnabled":{"prefix":"MyAvatar.setCharacterControllerEnabled","body":["MyAvatar.setCharacterControllerEnabled(${1:enabled: boolean})"]}}, + {"MyAvatar.getCharacterControllerEnabled":{"prefix":"MyAvatar.getCharacterControllerEnabled","body":["MyAvatar.getCharacterControllerEnabled"]}}, + {"MyAvatar.isUp":{"prefix":"MyAvatar.isUp","body":["MyAvatar.isUp(${1:direction: Vec3})"]}}, + {"MyAvatar.isDown":{"prefix":"MyAvatar.isDown","body":["MyAvatar.isDown(${1:direction: Vec3})"]}}, + {"MyAvatar.increaseSize":{"prefix":"MyAvatar.increaseSize","body":["MyAvatar.increaseSize"],"description":"Increase the avatar's scale by five percent, up to a minimum scale of 1000."}}, + {"MyAvatar.decreaseSize":{"prefix":"MyAvatar.decreaseSize","body":["MyAvatar.decreaseSize"],"description":"Decrease the avatar's scale by five percent, down to a minimum scale of 0.25."}}, + {"MyAvatar.resetSize":{"prefix":"MyAvatar.resetSize","body":["MyAvatar.resetSize"],"description":"Reset the avatar's scale back to the default scale of 1.0."}}, + {"MyAvatar.animGraphLoaded":{"prefix":"MyAvatar.animGraphLoaded","body":["MyAvatar.animGraphLoaded"]}}, + {"MyAvatar.setGravity":{"prefix":"MyAvatar.setGravity","body":["MyAvatar.setGravity(${1:gravity: number})"]}}, + {"MyAvatar.getGravity":{"prefix":"MyAvatar.getGravity","body":["MyAvatar.getGravity"]}}, + {"MyAvatar.goToFeetLocation":{"prefix":"MyAvatar.goToFeetLocation","body":["MyAvatar.goToFeetLocation(${1:position: Vec3},${2:hasOrientation: boolean},${3:orientation: Quat},${4:shouldFaceLocation: boolean})"],"description":"Move the avatar to a new position and/or orientation in the domain, while taking into account Avatar leg-length."}}, + {"MyAvatar.goToLocation":{"prefix":"MyAvatar.goToLocation","body":["MyAvatar.goToLocation(${1:position: Vec3},${2:hasOrientation: boolean},${3:orientation: Quat},${4:shouldFaceLocation: boolean},${5:withSafeLanding: boolean})"],"description":"Move the avatar to a new position and/or orientation in the domain."}}, + {"MyAvatar.goToLocation":{"prefix":"MyAvatar.goToLocation","body":["MyAvatar.goToLocation(${1:properties: object})"]}}, + {"MyAvatar.goToLocationAndEnableCollisions":{"prefix":"MyAvatar.goToLocationAndEnableCollisions","body":["MyAvatar.goToLocationAndEnableCollisions(${1:position: Vec3})"]}}, + {"MyAvatar.safeLanding":{"prefix":"MyAvatar.safeLanding","body":["MyAvatar.safeLanding(${1:position: Vec3})"]}}, + {"MyAvatar.restrictScaleFromDomainSettings":{"prefix":"MyAvatar.restrictScaleFromDomainSettings","body":["MyAvatar.restrictScaleFromDomainSettings(${1:domainSettingsObject: objecct})"]}}, + {"MyAvatar.clearScaleRestriction":{"prefix":"MyAvatar.clearScaleRestriction","body":["MyAvatar.clearScaleRestriction"]}}, + {"MyAvatar.addThrust":{"prefix":"MyAvatar.addThrust","body":["MyAvatar.addThrust(${1:thrust: Vec3})"]}}, + {"MyAvatar.getThrust":{"prefix":"MyAvatar.getThrust","body":["MyAvatar.getThrust"]}}, + {"MyAvatar.setThrust":{"prefix":"MyAvatar.setThrust","body":["MyAvatar.setThrust(${1:thrust: Vec3})"]}}, + {"MyAvatar.updateMotionBehaviorFromMenu":{"prefix":"MyAvatar.updateMotionBehaviorFromMenu","body":["MyAvatar.updateMotionBehaviorFromMenu"]}}, + {"MyAvatar.setToggleHips":{"prefix":"MyAvatar.setToggleHips","body":["MyAvatar.setToggleHips(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawBaseOfSupport":{"prefix":"MyAvatar.setEnableDebugDrawBaseOfSupport","body":["MyAvatar.setEnableDebugDrawBaseOfSupport(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawDefaultPose":{"prefix":"MyAvatar.setEnableDebugDrawDefaultPose","body":["MyAvatar.setEnableDebugDrawDefaultPose(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawAnimPose":{"prefix":"MyAvatar.setEnableDebugDrawAnimPose","body":["MyAvatar.setEnableDebugDrawAnimPose(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawPosition":{"prefix":"MyAvatar.setEnableDebugDrawPosition","body":["MyAvatar.setEnableDebugDrawPosition(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawHandControllers":{"prefix":"MyAvatar.setEnableDebugDrawHandControllers","body":["MyAvatar.setEnableDebugDrawHandControllers(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawSensorToWorldMatrix":{"prefix":"MyAvatar.setEnableDebugDrawSensorToWorldMatrix","body":["MyAvatar.setEnableDebugDrawSensorToWorldMatrix(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawIKTargets":{"prefix":"MyAvatar.setEnableDebugDrawIKTargets","body":["MyAvatar.setEnableDebugDrawIKTargets(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawIKConstraints":{"prefix":"MyAvatar.setEnableDebugDrawIKConstraints","body":["MyAvatar.setEnableDebugDrawIKConstraints(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawIKChains":{"prefix":"MyAvatar.setEnableDebugDrawIKChains","body":["MyAvatar.setEnableDebugDrawIKChains(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawDetailedCollision":{"prefix":"MyAvatar.setEnableDebugDrawDetailedCollision","body":["MyAvatar.setEnableDebugDrawDetailedCollision(${1:enabled: boolean})"]}}, + {"MyAvatar.getEnableMeshVisible":{"prefix":"MyAvatar.getEnableMeshVisible","body":["MyAvatar.getEnableMeshVisible"],"description":"Get whether or not your avatar mesh is visible."}}, + {"MyAvatar.setEnableMeshVisible":{"prefix":"MyAvatar.setEnableMeshVisible","body":["MyAvatar.setEnableMeshVisible(${1:visible: boolean})"],"description":"Set whether or not your avatar mesh is visible."}}, + {"MyAvatar.setEnableInverseKinematics":{"prefix":"MyAvatar.setEnableInverseKinematics","body":["MyAvatar.setEnableInverseKinematics(${1:enabled: boolean})"]}}, + {"MyAvatar.getAnimGraphOverrideUrl":{"prefix":"MyAvatar.getAnimGraphOverrideUrl","body":["MyAvatar.getAnimGraphOverrideUrl"]}}, + {"MyAvatar.setAnimGraphOverrideUrl":{"prefix":"MyAvatar.setAnimGraphOverrideUrl","body":["MyAvatar.setAnimGraphOverrideUrl(${1:url: string})"]}}, + {"MyAvatar.getAnimGraphUrl":{"prefix":"MyAvatar.getAnimGraphUrl","body":["MyAvatar.getAnimGraphUrl"]}}, + {"MyAvatar.setAnimGraphUrl":{"prefix":"MyAvatar.setAnimGraphUrl","body":["MyAvatar.setAnimGraphUrl(${1:url: string})"]}}, + {"MyAvatar.getPositionForAudio":{"prefix":"MyAvatar.getPositionForAudio","body":["MyAvatar.getPositionForAudio"]}}, + {"MyAvatar.getOrientationForAudio":{"prefix":"MyAvatar.getOrientationForAudio","body":["MyAvatar.getOrientationForAudio"]}}, + {"MyAvatar.setModelScale":{"prefix":"MyAvatar.setModelScale","body":["MyAvatar.setModelScale(${1:scale: number})"]}}, + {"MyAvatar.audioListenerModeChanged":{"prefix":"MyAvatar.audioListenerModeChanged","body":["MyAvatar.audioListenerModeChanged"]}}, + {"MyAvatar.transformChanged":{"prefix":"MyAvatar.transformChanged","body":["MyAvatar.transformChanged"]}}, + {"MyAvatar.newCollisionSoundURL":{"prefix":"MyAvatar.newCollisionSoundURL","body":["MyAvatar.newCollisionSoundURL(${1:url: string})"]}}, + {"MyAvatar.collisionWithEntity":{"prefix":"MyAvatar.collisionWithEntity","body":["MyAvatar.collisionWithEntity(${1:collision: Collision})"],"description":"Triggered when the avatar collides with an entity."}}, + {"MyAvatar.collisionsEnabledChanged":{"prefix":"MyAvatar.collisionsEnabledChanged","body":["MyAvatar.collisionsEnabledChanged(${1:enabled: boolean})"],"description":"Triggered when collisions with avatar enabled or disabled"}}, + {"MyAvatar.animGraphUrlChanged":{"prefix":"MyAvatar.animGraphUrlChanged","body":["MyAvatar.animGraphUrlChanged(${1:url: url})"],"description":"Triggered when avatar's animation url changes"}}, + {"MyAvatar.energyChanged":{"prefix":"MyAvatar.energyChanged","body":["MyAvatar.energyChanged(${1:energy: number})"]}}, + {"MyAvatar.positionGoneTo":{"prefix":"MyAvatar.positionGoneTo","body":["MyAvatar.positionGoneTo"]}}, + {"MyAvatar.onLoadComplete":{"prefix":"MyAvatar.onLoadComplete","body":["MyAvatar.onLoadComplete"]}}, + {"MyAvatar.wentAway":{"prefix":"MyAvatar.wentAway","body":["MyAvatar.wentAway"]}}, + {"MyAvatar.wentActive":{"prefix":"MyAvatar.wentActive","body":["MyAvatar.wentActive"]}}, + {"MyAvatar.skeletonChanged":{"prefix":"MyAvatar.skeletonChanged","body":["MyAvatar.skeletonChanged"]}}, + {"MyAvatar.dominantHandChanged":{"prefix":"MyAvatar.dominantHandChanged","body":["MyAvatar.dominantHandChanged(${1:hand: string})"]}}, + {"MyAvatar.sensorToWorldScaleChanged":{"prefix":"MyAvatar.sensorToWorldScaleChanged","body":["MyAvatar.sensorToWorldScaleChanged(${1:scale: number})"]}}, + {"MyAvatar.attachmentsChanged":{"prefix":"MyAvatar.attachmentsChanged","body":["MyAvatar.attachmentsChanged"]}}, + {"MyAvatar.scaleChanged":{"prefix":"MyAvatar.scaleChanged","body":["MyAvatar.scaleChanged"]}}, + {"MyAvatar.shouldDisableHandTouchChanged":{"prefix":"MyAvatar.shouldDisableHandTouchChanged","body":["MyAvatar.shouldDisableHandTouchChanged(${1:shouldDisable: boolean})"],"description":"Triggered when hand touch is globally enabled or disabled"}}, + {"MyAvatar.disableHandTouchForIDChanged":{"prefix":"MyAvatar.disableHandTouchForIDChanged","body":["MyAvatar.disableHandTouchForIDChanged(${1:entityID: Uuid},${2:disable: boolean})"],"description":"Triggered when hand touch is enabled or disabled for an specific entity"}}, + {"FaceTracker":{"prefix":"FaceTracker","body":["FaceTracker"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The FaceTracker API helps manage facial tracking hardware."}}, + {"FaceTracker.setEnabled":{"prefix":"FaceTracker.setEnabled","body":["FaceTracker.setEnabled(${1:enabled: boolean})"]}}, + {"FaceTracker.calibrate":{"prefix":"FaceTracker.calibrate","body":["FaceTracker.calibrate"]}}, + {"LaserPointers":{"prefix":"LaserPointers","body":["LaserPointers"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Synonym for {@link Pointers} as used for laser pointers."}}, + {"LaserPointers.createLaserPointer":{"prefix":"LaserPointers.createLaserPointer","body":["LaserPointers.createLaserPointer(${1:properties: Pointers.LaserPointerProperties})"]}}, + {"LaserPointers.enableLaserPointer":{"prefix":"LaserPointers.enableLaserPointer","body":["LaserPointers.enableLaserPointer(${1:id: number})"]}}, + {"LaserPointers.disableLaserPointer":{"prefix":"LaserPointers.disableLaserPointer","body":["LaserPointers.disableLaserPointer(${1:id: number})"]}}, + {"LaserPointers.removeLaserPointer":{"prefix":"LaserPointers.removeLaserPointer","body":["LaserPointers.removeLaserPointer(${1:id: number})"]}}, + {"LaserPointers.editRenderState":{"prefix":"LaserPointers.editRenderState","body":["LaserPointers.editRenderState(${1:id: number},${2:renderState: string},${3:properties: Pointers.RayPointerRenderState})"]}}, + {"LaserPointers.setRenderState":{"prefix":"LaserPointers.setRenderState","body":["LaserPointers.setRenderState(${1:renderState: string},${2:id: number})"]}}, + {"LaserPointers.getPrevRayPickResult":{"prefix":"LaserPointers.getPrevRayPickResult","body":["LaserPointers.getPrevRayPickResult(${1:id: number})"]}}, + {"LaserPointers.setPrecisionPicking":{"prefix":"LaserPointers.setPrecisionPicking","body":["LaserPointers.setPrecisionPicking(${1:id: number},${2:precisionPicking: boolean})"]}}, + {"LaserPointers.setLaserLength":{"prefix":"LaserPointers.setLaserLength","body":["LaserPointers.setLaserLength(${1:id: number},${2:laserLength: number})"]}}, + {"LaserPointers.setIgnoreItems":{"prefix":"LaserPointers.setIgnoreItems","body":["LaserPointers.setIgnoreItems(${1:id: number},${2:ignoreItems: Array.})"]}}, + {"LaserPointers.setIncludeItems":{"prefix":"LaserPointers.setIncludeItems","body":["LaserPointers.setIncludeItems(${1:id: number},${2:includeItems: Array.})"]}}, + {"LaserPointers.setLockEndUUID":{"prefix":"LaserPointers.setLockEndUUID","body":["LaserPointers.setLockEndUUID(${1:id: number},${2:itemID: Uuid},${3:isOverlay: boolean},${4:offsetMat: Mat4})"]}}, + {"LaserPointers.isLeftHand":{"prefix":"LaserPointers.isLeftHand","body":["LaserPointers.isLeftHand(${1:id: number})"]}}, + {"LaserPointers.isRightHand":{"prefix":"LaserPointers.isRightHand","body":["LaserPointers.isRightHand(${1:id: number})"]}}, + {"LaserPointers.isMouse":{"prefix":"LaserPointers.isMouse","body":["LaserPointers.isMouse(${1:id: number})"]}}, + {"Picks.RayPickProperties":{"prefix":"Picks.RayPickProperties","body":["Picks.RayPickProperties"],"description":"A set of properties that can be passed to {@link Picks.createPick} to create a new Ray Pick."}}, + {"Picks.StylusPickProperties":{"prefix":"Picks.StylusPickProperties","body":["Picks.StylusPickProperties"],"description":"A set of properties that can be passed to {@link Picks.createPick} to create a new Stylus Pick."}}, + {"Picks.ParabolaPickProperties":{"prefix":"Picks.ParabolaPickProperties","body":["Picks.ParabolaPickProperties"],"description":"A set of properties that can be passed to {@link Picks.createPick} to create a new Parabola Pick."}}, + {"Shape":{"prefix":"Shape","body":["Shape"],"description":"A Shape defines a physical volume."}}, + {"Picks.CollisionPickProperties":{"prefix":"Picks.CollisionPickProperties","body":["Picks.CollisionPickProperties"],"description":"A set of properties that can be passed to {@link Picks.createPick} to create a new Collision Pick."}}, + {"Picks":{"prefix":"Picks","body":["Picks"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Picks API lets you create and manage objects for repeatedly calculating intersections in different ways."}}, + {"Picks.createPick":{"prefix":"Picks.createPick","body":["Picks.createPick(${1:type: PickType},${2:properties: Picks.RayPickProperties})"],"description":"Adds a new Pick.\rDifferent {@link PickType}s use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example,\r with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pick, a Mouse Ray Pick, or a Joint Ray Pick."}}, + {"Picks.enablePick":{"prefix":"Picks.enablePick","body":["Picks.enablePick(${1:uid: number})"],"description":"Enables a Pick."}}, + {"Picks.disablePick":{"prefix":"Picks.disablePick","body":["Picks.disablePick(${1:uid: number})"],"description":"Disables a Pick."}}, + {"Picks.removePick":{"prefix":"Picks.removePick","body":["Picks.removePick(${1:uid: number})"],"description":"Removes a Pick."}}, + {"RayPickResult":{"prefix":"RayPickResult","body":["RayPickResult"],"description":"An intersection result for a Ray Pick."}}, + {"StylusPickResult":{"prefix":"StylusPickResult","body":["StylusPickResult"],"description":"An intersection result for a Stylus Pick."}}, + {"ParabolaPickResult":{"prefix":"ParabolaPickResult","body":["ParabolaPickResult"],"description":"An intersection result for a Parabola Pick."}}, + {"CollisionPickResult":{"prefix":"CollisionPickResult","body":["CollisionPickResult"],"description":"An intersection result for a Collision Pick."}}, + {"IntersectingObject":{"prefix":"IntersectingObject","body":["IntersectingObject"],"description":"Information about the Collision Pick's intersection with an object"}}, + {"CollisionContact":{"prefix":"CollisionContact","body":["CollisionContact"],"description":"A pair of points that represents part of an overlap between a Collision Pick and an object in the physics engine. Points which are further apart represent deeper overlap"}}, + {"Picks.getPrevPickResult":{"prefix":"Picks.getPrevPickResult","body":["Picks.getPrevPickResult(${1:uid: number})"],"description":"Get the most recent pick result from this Pick. This will be updated as long as the Pick is enabled."}}, + {"Picks.setPrecisionPicking":{"prefix":"Picks.setPrecisionPicking","body":["Picks.setPrecisionPicking(${1:uid: number},${2:precisionPicking: boolean})"],"description":"Sets whether or not to use precision picking."}}, + {"Picks.setIgnoreItems":{"prefix":"Picks.setIgnoreItems","body":["Picks.setIgnoreItems(${1:uid: number},${2:ignoreItems: Array.})"],"description":"Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Picks."}}, + {"Picks.setIncludeItems":{"prefix":"Picks.setIncludeItems","body":["Picks.setIncludeItems(${1:uid: number},${2:includeItems: Array.})"],"description":"Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus\r Picks only intersect with objects in their include list."}}, + {"Picks.isLeftHand":{"prefix":"Picks.isLeftHand","body":["Picks.isLeftHand(${1:uid: number})"],"description":"Check if a Pick is associated with the left hand."}}, + {"Picks.isRightHand":{"prefix":"Picks.isRightHand","body":["Picks.isRightHand(${1:uid: number})"],"description":"Check if a Pick is associated with the right hand."}}, + {"Picks.isMouse":{"prefix":"Picks.isMouse","body":["Picks.isMouse(${1:uid: number})"],"description":"Check if a Pick is associated with the system mouse."}}, + {"Picks.PICK_NOTHING":{"prefix":"Picks.PICK_NOTHING","body":["Picks.PICK_NOTHING"]}}, + {"Picks.PICK_ENTITIES":{"prefix":"Picks.PICK_ENTITIES","body":["Picks.PICK_ENTITIES"]}}, + {"Picks.PICK_OVERLAYS":{"prefix":"Picks.PICK_OVERLAYS","body":["Picks.PICK_OVERLAYS"]}}, + {"Picks.PICK_AVATARS":{"prefix":"Picks.PICK_AVATARS","body":["Picks.PICK_AVATARS"]}}, + {"Picks.PICK_HUD":{"prefix":"Picks.PICK_HUD","body":["Picks.PICK_HUD"]}}, + {"Picks.PICK_COARSE":{"prefix":"Picks.PICK_COARSE","body":["Picks.PICK_COARSE"]}}, + {"Picks.PICK_INCLUDE_INVISIBLE":{"prefix":"Picks.PICK_INCLUDE_INVISIBLE","body":["Picks.PICK_INCLUDE_INVISIBLE"]}}, + {"Picks.PICK_INCLUDE_NONCOLLIDABLE":{"prefix":"Picks.PICK_INCLUDE_NONCOLLIDABLE","body":["Picks.PICK_INCLUDE_NONCOLLIDABLE"]}}, + {"Picks.PICK_ALL_INTERSECTIONS":{"prefix":"Picks.PICK_ALL_INTERSECTIONS","body":["Picks.PICK_ALL_INTERSECTIONS"]}}, + {"Picks.INTERSECTED_NONE":{"prefix":"Picks.INTERSECTED_NONE","body":["Picks.INTERSECTED_NONE"]}}, + {"Picks.INTERSECTED_ENTITY":{"prefix":"Picks.INTERSECTED_ENTITY","body":["Picks.INTERSECTED_ENTITY"]}}, + {"Picks.INTERSECTED_OVERLAY":{"prefix":"Picks.INTERSECTED_OVERLAY","body":["Picks.INTERSECTED_OVERLAY"]}}, + {"Picks.INTERSECTED_AVATAR":{"prefix":"Picks.INTERSECTED_AVATAR","body":["Picks.INTERSECTED_AVATAR"]}}, + {"Picks.INTERSECTED_HUD":{"prefix":"Picks.INTERSECTED_HUD","body":["Picks.INTERSECTED_HUD"]}}, + {"Pointers.StylusPointerProperties":{"prefix":"Pointers.StylusPointerProperties","body":["Pointers.StylusPointerProperties"],"description":"A set of properties that can be passed to {@link Pointers.createPointer} to create a new Pointer. Contains the relevant {@link Picks.PickProperties} to define the underlying Pick."}}, + {"Pointers.DefaultRayPointerRenderState":{"prefix":"Pointers.DefaultRayPointerRenderState","body":["Pointers.DefaultRayPointerRenderState"],"description":"A set of properties used to define the visual aspect of a Ray Pointer in the case that the Pointer is not intersecting something. Same as a {@link Pointers.RayPointerRenderState},\rbut with an additional distance field."}}, + {"Pointers.RayPointerRenderState":{"prefix":"Pointers.RayPointerRenderState","body":["Pointers.RayPointerRenderState"],"description":"A set of properties which define the visual aspect of a Ray Pointer in the case that the Pointer is intersecting something."}}, + {"Pointers.LaserPointerProperties":{"prefix":"Pointers.LaserPointerProperties","body":["Pointers.LaserPointerProperties"],"description":"A set of properties that can be passed to {@link Pointers.createPointer} to create a new Pointer. Contains the relevant {@link Picks.PickProperties} to define the underlying Pick."}}, + {"Pointers.ParabolaProperties":{"prefix":"Pointers.ParabolaProperties","body":["Pointers.ParabolaProperties"],"description":"The rendering properties of the parabolic path"}}, + {"Pointers.DefaultParabolaPointerRenderState":{"prefix":"Pointers.DefaultParabolaPointerRenderState","body":["Pointers.DefaultParabolaPointerRenderState"],"description":"A set of properties used to define the visual aspect of a Parabola Pointer in the case that the Pointer is not intersecting something. Same as a {@link Pointers.ParabolaPointerRenderState},\rbut with an additional distance field."}}, + {"Pointers.ParabolaPointerRenderState":{"prefix":"Pointers.ParabolaPointerRenderState","body":["Pointers.ParabolaPointerRenderState"],"description":"A set of properties used to define the visual aspect of a Parabola Pointer in the case that the Pointer is intersecting something."}}, + {"Pointers.ParabolaPointerProperties":{"prefix":"Pointers.ParabolaPointerProperties","body":["Pointers.ParabolaPointerProperties"],"description":"A set of properties that can be passed to {@link Pointers.createPointer} to create a new Pointer. Contains the relevant {@link Picks.PickProperties} to define the underlying Pick."}}, + {"Pointers":{"prefix":"Pointers","body":["Pointers"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Pointers API lets you create and manage objects for repeatedly calculating intersections in different ways, as well as the visual representation of those objects.\r Pointers can also be configured to automatically generate {@link PointerEvent}s on {@link Entities} and {@link Overlays}."}}, + {"Pointers.Trigger":{"prefix":"Pointers.Trigger","body":["Pointers.Trigger"],"description":"A trigger mechanism for Ray and Parabola Pointers."}}, + {"Pointers.createPointer":{"prefix":"Pointers.createPointer","body":["Pointers.createPointer(${1:type: PickType},${2:properties: Pointers.LaserPointerProperties})"],"description":"Adds a new Pointer\rDifferent {@link PickType}s use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example,\r with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pointer, a Mouse Ray Pointer, or a Joint Ray Pointer."}}, + {"Pointers.enablePointer":{"prefix":"Pointers.enablePointer","body":["Pointers.enablePointer(${1:uid: number})"],"description":"Enables a Pointer."}}, + {"Pointers.disablePointer":{"prefix":"Pointers.disablePointer","body":["Pointers.disablePointer(${1:uid: number})"],"description":"Disables a Pointer."}}, + {"Pointers.removePointer":{"prefix":"Pointers.removePointer","body":["Pointers.removePointer(${1:uid: number})"],"description":"Removes a Pointer."}}, + {"Pointers.editRenderState":{"prefix":"Pointers.editRenderState","body":["Pointers.editRenderState(${1:uid: number},${2:renderState: string},${3:properties: Pointers.RayPointerRenderState})"],"description":"Edit some visual aspect of a Pointer. Currently only supported for Ray Pointers."}}, + {"Pointers.setRenderState":{"prefix":"Pointers.setRenderState","body":["Pointers.setRenderState(${1:uid: number},${2:renderState: string})"],"description":"Set the render state of a Pointer. For Ray Pointers, this means switching between their {@link Pointers.RayPointerRenderState}s, or \"\" to turn off rendering and hover/trigger events.\r For Stylus Pointers, there are three built-in options: \"events on\" (render and send events, the default), \"events off\" (render but don't send events), and \"disabled\" (don't render, don't send events)."}}, + {"Pointers.getPrevPickResult":{"prefix":"Pointers.getPrevPickResult","body":["Pointers.getPrevPickResult(${1:uid: number})"],"description":"Get the most recent pick result from this Pointer. This will be updated as long as the Pointer is enabled, regardless of the render state."}}, + {"Pointers.setPrecisionPicking":{"prefix":"Pointers.setPrecisionPicking","body":["Pointers.setPrecisionPicking(${1:uid: number},${2:precisionPicking: boolean})"],"description":"Sets whether or not to use precision picking."}}, + {"Pointers.setLength":{"prefix":"Pointers.setLength","body":["Pointers.setLength(${1:uid: number},${2:length: number})"],"description":"Sets the length of this Pointer. No effect on Stylus Pointers."}}, + {"Pointers.setIgnoreItems":{"prefix":"Pointers.setIgnoreItems","body":["Pointers.setIgnoreItems(${1:uid: number},${2:ignoreItems: Array.})"],"description":"Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Pointers."}}, + {"Pointers.setIncludeItems":{"prefix":"Pointers.setIncludeItems","body":["Pointers.setIncludeItems(${1:uid: number},${2:includeItems: Array.})"],"description":"Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus\r Pointers only intersect with objects in their include list."}}, + {"Pointers.setLockEndUUID":{"prefix":"Pointers.setLockEndUUID","body":["Pointers.setLockEndUUID(${1:uid: number},${2:objectID: Uuid},${3:isOverlay: boolean},${4:offsetMat: Mat4})"],"description":"Lock a Pointer onto a specific object (overlay, entity, or avatar). Optionally, provide an offset in object-space, otherwise the Pointer will lock on to the center of the object.\r Not used by Stylus Pointers."}}, + {"Pointers.isLeftHand":{"prefix":"Pointers.isLeftHand","body":["Pointers.isLeftHand(${1:uid: number})"],"description":"Check if a Pointer is associated with the left hand."}}, + {"Pointers.isRightHand":{"prefix":"Pointers.isRightHand","body":["Pointers.isRightHand(${1:uid: number})"],"description":"Check if a Pointer is associated with the right hand."}}, + {"Pointers.isMouse":{"prefix":"Pointers.isMouse","body":["Pointers.isMouse(${1:uid: number})"],"description":"Check if a Pointer is associated with the system mouse."}}, + {"Pointers.getPointerProperties":{"prefix":"Pointers.getPointerProperties","body":["Pointers.getPointerProperties(${1:uid: number})"],"description":"Returns information about an existing Pointer"}}, + {"RayPick":{"prefix":"RayPick","body":["RayPick"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Synonym for {@link Picks} as used for ray picks."}}, + {"RayPick.createRayPick":{"prefix":"RayPick.createRayPick","body":["RayPick.createRayPick(${1:undefined: Picks.RayPickProperties})"]}}, + {"RayPick.enableRayPick":{"prefix":"RayPick.enableRayPick","body":["RayPick.enableRayPick(${1:id: number})"]}}, + {"RayPick.disableRayPick":{"prefix":"RayPick.disableRayPick","body":["RayPick.disableRayPick(${1:id: number})"]}}, + {"RayPick.removeRayPick":{"prefix":"RayPick.removeRayPick","body":["RayPick.removeRayPick(${1:id: number})"]}}, + {"RayPick.getPrevRayPickResult":{"prefix":"RayPick.getPrevRayPickResult","body":["RayPick.getPrevRayPickResult(${1:id: number})"]}}, + {"RayPick.setPrecisionPicking":{"prefix":"RayPick.setPrecisionPicking","body":["RayPick.setPrecisionPicking(${1:id: number},${2:precisionPicking: boolean})"]}}, + {"RayPick.setIgnoreItems":{"prefix":"RayPick.setIgnoreItems","body":["RayPick.setIgnoreItems(${1:id: number},${2:{Uuid[])})"]}}, + {"RayPick.setIncludeItems":{"prefix":"RayPick.setIncludeItems","body":["RayPick.setIncludeItems(${1:id: number},${2:{Uuid[])})"]}}, + {"RayPick.isLeftHand":{"prefix":"RayPick.isLeftHand","body":["RayPick.isLeftHand(${1:id: number})"]}}, + {"RayPick.isRightHand":{"prefix":"RayPick.isRightHand","body":["RayPick.isRightHand(${1:id: number})"]}}, + {"RayPick.isMouse":{"prefix":"RayPick.isMouse","body":["RayPick.isMouse(${1:id: number})"]}}, + {"RayPick.PICK_NOTHING":{"prefix":"RayPick.PICK_NOTHING","body":["RayPick.PICK_NOTHING"]}}, + {"RayPick.PICK_ENTITIES":{"prefix":"RayPick.PICK_ENTITIES","body":["RayPick.PICK_ENTITIES"]}}, + {"RayPick.PICK_OVERLAYS":{"prefix":"RayPick.PICK_OVERLAYS","body":["RayPick.PICK_OVERLAYS"]}}, + {"RayPick.PICK_AVATARS":{"prefix":"RayPick.PICK_AVATARS","body":["RayPick.PICK_AVATARS"]}}, + {"RayPick.PICK_HUD":{"prefix":"RayPick.PICK_HUD","body":["RayPick.PICK_HUD"]}}, + {"RayPick.PICK_COARSE":{"prefix":"RayPick.PICK_COARSE","body":["RayPick.PICK_COARSE"]}}, + {"RayPick.PICK_INCLUDE_INVISIBLE":{"prefix":"RayPick.PICK_INCLUDE_INVISIBLE","body":["RayPick.PICK_INCLUDE_INVISIBLE"]}}, + {"RayPick.PICK_INCLUDE_NONCOLLIDABLE":{"prefix":"RayPick.PICK_INCLUDE_NONCOLLIDABLE","body":["RayPick.PICK_INCLUDE_NONCOLLIDABLE"]}}, + {"RayPick.PICK_ALL_INTERSECTIONS":{"prefix":"RayPick.PICK_ALL_INTERSECTIONS","body":["RayPick.PICK_ALL_INTERSECTIONS"]}}, + {"RayPick.INTERSECTED_NONE":{"prefix":"RayPick.INTERSECTED_NONE","body":["RayPick.INTERSECTED_NONE"]}}, + {"RayPick.INTERSECTED_ENTITY":{"prefix":"RayPick.INTERSECTED_ENTITY","body":["RayPick.INTERSECTED_ENTITY"]}}, + {"RayPick.INTERSECTED_OVERLAY":{"prefix":"RayPick.INTERSECTED_OVERLAY","body":["RayPick.INTERSECTED_OVERLAY"]}}, + {"RayPick.INTERSECTED_AVATAR":{"prefix":"RayPick.INTERSECTED_AVATAR","body":["RayPick.INTERSECTED_AVATAR"]}}, + {"RayPick.INTERSECTED_HUD":{"prefix":"RayPick.INTERSECTED_HUD","body":["RayPick.INTERSECTED_HUD"]}}, + {"AccountServices":{"prefix":"AccountServices","body":["AccountServices"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The AccountServices API contains helper functions related to user connectivity"}}, + {"AccountServices.getDownloadInfo":{"prefix":"AccountServices.getDownloadInfo","body":["AccountServices.getDownloadInfo"]}}, + {"AccountServices.updateDownloadInfo":{"prefix":"AccountServices.updateDownloadInfo","body":["AccountServices.updateDownloadInfo"]}}, + {"AccountServices.isLoggedIn":{"prefix":"AccountServices.isLoggedIn","body":["AccountServices.isLoggedIn"]}}, + {"AccountServices.checkAndSignalForAccessToken":{"prefix":"AccountServices.checkAndSignalForAccessToken","body":["AccountServices.checkAndSignalForAccessToken"]}}, + {"AccountServices.logOut":{"prefix":"AccountServices.logOut","body":["AccountServices.logOut"]}}, + {"AccountServices.connected":{"prefix":"AccountServices.connected","body":["AccountServices.connected"]}}, + {"AccountServices.disconnected":{"prefix":"AccountServices.disconnected","body":["AccountServices.disconnected(${1:reason: string})"]}}, + {"AccountServices.myUsernameChanged":{"prefix":"AccountServices.myUsernameChanged","body":["AccountServices.myUsernameChanged(${1:username: string})"]}}, + {"AccountServices.downloadInfoChanged":{"prefix":"AccountServices.downloadInfoChanged","body":["AccountServices.downloadInfoChanged(${1:info})"]}}, + {"AccountServices.findableByChanged":{"prefix":"AccountServices.findableByChanged","body":["AccountServices.findableByChanged(${1:discoverabilityMode: string})"]}}, + {"AccountServices.loggedInChanged":{"prefix":"AccountServices.loggedInChanged","body":["AccountServices.loggedInChanged(${1:loggedIn: boolean})"]}}, + {"Audio":{"prefix":"Audio","body":["Audio"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Audio API provides facilities to interact with audio inputs and outputs and to play sounds."}}, + {"Audio.setInputDevice":{"prefix":"Audio.setInputDevice","body":["Audio.setInputDevice(${1:device: object},${2:isHMD: boolean})"]}}, + {"Audio.setOutputDevice":{"prefix":"Audio.setOutputDevice","body":["Audio.setOutputDevice(${1:device: object},${2:isHMD: boolean})"]}}, + {"Audio.setReverb":{"prefix":"Audio.setReverb","body":["Audio.setReverb(${1:enable: boolean})"],"description":"Enable or disable reverberation. Reverberation is done by the client, on the post-mix audio. The reverberation options \rcome from either the domain's audio zone if used — configured on the server — or as scripted by \r{@link Audio.setReverbOptions|setReverbOptions}."}}, + {"Audio.setReverbOptions":{"prefix":"Audio.setReverbOptions","body":["Audio.setReverbOptions(${1:options: AudioEffectOptions})"],"description":"Configure reverberation options. Use {@link Audio.setReverb|setReverb} to enable or disable reverberation."}}, + {"Audio.startRecording":{"prefix":"Audio.startRecording","body":["Audio.startRecording(${1:filename: string})"],"description":"Starts making an audio recording of the audio being played in-world (i.e., not local-only audio) to a file in WAV format."}}, + {"Audio.stopRecording":{"prefix":"Audio.stopRecording","body":["Audio.stopRecording"],"description":"Finish making an audio recording started with {@link Audio.startRecording|startRecording}."}}, + {"Audio.getRecording":{"prefix":"Audio.getRecording","body":["Audio.getRecording"],"description":"Check whether an audio recording is currently being made."}}, + {"Audio.nop":{"prefix":"Audio.nop","body":["Audio.nop"]}}, + {"Audio.mutedChanged":{"prefix":"Audio.mutedChanged","body":["Audio.mutedChanged(${1:isMuted: boolean})"],"description":"Triggered when the audio input is muted or unmuted."}}, + {"Audio.noiseReductionChanged":{"prefix":"Audio.noiseReductionChanged","body":["Audio.noiseReductionChanged(${1:isEnabled: boolean})"],"description":"Triggered when the audio input noise reduction is enabled or disabled."}}, + {"Audio.inputVolumeChanged":{"prefix":"Audio.inputVolumeChanged","body":["Audio.inputVolumeChanged(${1:volume: number})"],"description":"Triggered when the input audio volume changes."}}, + {"Audio.inputLevelChanged":{"prefix":"Audio.inputLevelChanged","body":["Audio.inputLevelChanged(${1:level: number})"],"description":"Triggered when the input audio level changes."}}, + {"Audio.contextChanged":{"prefix":"Audio.contextChanged","body":["Audio.contextChanged(${1:context: string})"],"description":"Triggered when the current context of the audio changes."}}, + {"Audio.onContextChanged":{"prefix":"Audio.onContextChanged","body":["Audio.onContextChanged"]}}, + {"Clipboard":{"prefix":"Clipboard","body":["Clipboard"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Clipboard API enables you to export and import entities to and from JSON files."}}, + {"Clipboard.getContentsDimensions":{"prefix":"Clipboard.getContentsDimensions","body":["Clipboard.getContentsDimensions"],"description":"Compute the extents of the contents held in the clipboard."}}, + {"Clipboard.getClipboardContentsLargestDimension":{"prefix":"Clipboard.getClipboardContentsLargestDimension","body":["Clipboard.getClipboardContentsLargestDimension"],"description":"Compute the largest dimension of the extents of the contents held in the clipboard."}}, + {"Clipboard.importEntities":{"prefix":"Clipboard.importEntities","body":["Clipboard.importEntities(${1:filename: string})"],"description":"Import entities from a JSON file containing entity data into the clipboard.\rYou can generate a JSON file using {@link Clipboard.exportEntities}."}}, + {"Clipboard.exportEntities":{"prefix":"Clipboard.exportEntities","body":["Clipboard.exportEntities(${1:filename: string},${2:entityIDs: Array.})"],"description":"Export the entities specified to a JSON file."}}, + {"Clipboard.exportEntities":{"prefix":"Clipboard.exportEntities","body":["Clipboard.exportEntities(${1:filename: string},${2:x: number},${3:y: number},${4:z: number},${5:scale: number})"],"description":"Export the entities with centers within a cube to a JSON file."}}, + {"Clipboard.pasteEntities":{"prefix":"Clipboard.pasteEntities","body":["Clipboard.pasteEntities(${1:position: Vec3})"],"description":"Paste the contents of the clipboard into the world."}}, + {"Controller":{"prefix":"Controller","body":["Controller"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Controller API provides facilities to interact with computer and controller hardware.\r\r
Functions
\r\r

Properties

\r
    \r
  • {@link Controller.getActions|getActions}
  • \r
  • {@link Controller.getHardware|getHardware}
  • \r
  • {@link Controller.getStandard|getStandard}
  • \r
\r\r

Mappings

\r
    \r
  • {@link Controller.disableMapping|disableMapping}
  • \r
  • {@link Controller.enableMapping|enableMapping}
  • \r
  • {@link Controller.loadMapping|loadMapping}
  • \r
  • {@link Controller.newMapping|newMapping}
  • \r
  • {@link Controller.parseMapping|parseMapping}
  • \r
\r\r

Input, Hardware, and Action Reflection

\r
    \r
  • {@link Controller.findAction|findAction}
  • \r
  • {@link Controller.findDevice|findDevice}
  • \r
  • {@link Controller.getActionNames|getActionNames}
  • \r
  • {@link Controller.getAllActions|getAllActions}
  • \r
  • {@link Controller.getAvailableInputs|getAvailableInputs}
  • \r
  • {@link Controller.getDeviceName|getDeviceName}
  • \r
  • {@link Controller.getDeviceNames|getDeviceNames}
  • \r
\r\r

Input, Hardware, and Action Events

\r
    \r
  • {@link Controller.actionEvent|actionEvent}
  • \r
  • {@link Controller.hardwareChanged|hardwareChanged}
  • \r
  • {@link Controller.inputEvent|inputEvent}
  • \r
\r\r

Mouse, Keyboard, and Touch Events

\r
    \r
  • {@link Controller.keyPressEvent|keyPressEvent}
  • \r
  • {@link Controller.keyReleaseEvent|keyReleaseEvent}
  • \r
  • {@link Controller.mouseDoublePressEvent|mouseDoublePressEvent}
  • \r
  • {@link Controller.mouseMoveEvent|mouseMoveEvent}
  • \r
  • {@link Controller.mousePressEvent|mousePressEvent}
  • \r
  • {@link Controller.mouseReleaseEvent|mouseReleaseEvent}
  • \r
  • {@link Controller.touchBeginEvent|touchBeginEvent}
  • \r
  • {@link Controller.touchEndEvent|touchEndEvent}
  • \r
  • {@link Controller.touchUpdateEvent|touchUpdateEvent}
  • \r
  • {@link Controller.wheelEvent|wheelEvent}
  • \r
\r\r

Control Capturing

\r
    \r
  • {@link Controller.captureMouseEvents|captureMouseEvents}
  • \r
  • {@link Controller.captureTouchEvents|captureTouchEvents}
  • \r
  • {@link Controller.captureWheelEvents|captureWheelEvents}
  • \r
  • {@link Controller.releaseMouseEvents|releaseMouseEvents}
  • \r
  • {@link Controller.releaseTouchEvents|releaseTouchEvents}
  • \r
  • {@link Controller.releaseWheelEvents|releaseWheelEvents}
  • \r
\r\r

Action Capturing

\r
    \r
  • {@link Controller.captureActionEvents|captureActionEvents}
  • \r
  • {@link Controller.captureEntityClickEvents|captureEntityClickEvents}
  • \r
  • {@link Controller.captureJoystick|captureJoystick}
  • \r
  • {@link Controller.captureKeyEvents|captureKeyEvents}
  • \r
  • {@link Controller.releaseActionEvents|releaseActionEvents}
  • \r
  • {@link Controller.releaseEntityClickEvents|releaseEntityClickEvents}
  • \r
  • {@link Controller.releaseJoystick|releaseJoystick}
  • \r
  • {@link Controller.releaseKeyEvents|releaseKeyEvents}
  • \r
\r\r

Controller and Action Values

\r
    \r
  • {@link Controller.getValue|getValue}
  • \r
  • {@link Controller.getAxisValue|getAxisValue}
  • \r
  • {@link Controller.getPoseValue|getgetPoseValue}
  • \r
  • {@link Controller.getActionValue|getActionValue}
  • \r
\r\r

Haptics

\r
    \r
  • {@link Controller.triggerHapticPulse|triggerHapticPulse}
  • \r
  • {@link Controller.triggerHapticPulseOnDevice|triggerHapticPulseOnDevice}
  • \r
  • {@link Controller.triggerShortHapticPulse|triggerShortHapticPulse}
  • \r
  • {@link Controller.triggerShortHapticPulseOnDevice|triggerShortHapticPulseOnDevice}
  • \r
\r\r

Display Information

\r
    \r
  • {@link Controller.getViewportDimensions|getViewportDimensions}
  • \r
  • {@link Controller.getRecommendedHUDRect|getRecommendedHUDRect}
  • \r
\r\r

Virtual Game Pad

\r
    \r
  • {@link Controller.setVPadEnabled|setVPadEnabled}
  • \r
  • {@link Controller.setVPadHidden|setVPadHidden}
  • \r
  • {@link Controller.setVPadExtraBottomMargin|setVPadExtraBottomMargin}
  • \r
\r\r

Input Recordings

\r
    \r
  • {@link Controller.startInputRecording|startInputRecording}
  • \r
  • {@link Controller.stopInputRecording|stopInputRecording}
  • \r
  • {@link Controller.saveInputRecording|saveInputRecording}
  • \r
  • {@link Controller.getInputRecorderSaveDirectory|getInputRecorderSaveDirectory}
  • \r
  • {@link Controller.loadInputRecording|loadInputRecording}
  • \r
  • {@link Controller.startInputPlayback|startInputPlayback}
  • \r
  • {@link Controller.stopInputPlayback|stopInputPlayback}
  • \r
\r\r
Entity Methods:
\r\r

The default scripts implement hand controller actions that use {@link Entities.callEntityMethod} to call entity script \rmethods, if present in the entity being interacted with.

\r\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
Method NameDescriptionExample
startFarTrigger
continueFarTrigger
stopFarTrigger
These methods are called when a user is more than 0.3m away from the entity, the entity is triggerable, and the \r user starts, continues, or stops squeezing the trigger.A light switch that can be toggled on and off from a distance.
startNearTrigger
continueNearTrigger
stopNearTrigger
These methods are called when a user is less than 0.3m away from the entity, the entity is triggerable, and the \r user starts, continues, or stops squeezing the trigger.A doorbell that can be rung when a user is near.
startDistanceGrab
continueDistanceGrab
These methods are called when a user is more than 0.3m away from the entity, the entity is either cloneable, or\r grabbable and not locked, and the user starts or continues to squeeze the trigger.A comet that emits icy particle trails when a user is dragging it through the sky.
startNearGrab
continueNearGrab
These methods are called when a user is less than 0.3m away from the entity, the entity is either cloneable, or \r grabbable and not locked, and the user starts or continues to squeeze the trigger.A ball that glows when it's being held close.
releaseGrabThis method is called when a user releases the trigger when having been either distance or near grabbing an \r entity.Turn off the ball glow or comet trail with the user finishes grabbing it.
startEquip
continueEquip
releaseEquip
These methods are called when a user starts, continues, or stops equipping an entity.A glass that stays in the user's hand after the trigger is clicked.
\r

All the entity methods are called with the following two arguments:

\r
    \r
  • The entity ID.
  • \r
  • A string, \"hand,userID\" — where \"hand\" is \"left\" or \"right\", and \"userID\"\r is the user's {@link MyAvatar|MyAvatar.sessionUUID}.
  • \r
"}}, + {"Controller.captureKeyEvents":{"prefix":"Controller.captureKeyEvents","body":["Controller.captureKeyEvents(${1:event: KeyEvent})"],"description":"Disable default Interface actions for a particular key event."}}, + {"Controller.releaseKeyEvents":{"prefix":"Controller.releaseKeyEvents","body":["Controller.releaseKeyEvents(${1:event: KeyEvent})"],"description":"Re-enable default Interface actions for a particular key event that has been disabled using \r{@link Controller.captureKeyEvents|captureKeyEvents}."}}, + {"Controller.captureJoystick":{"prefix":"Controller.captureJoystick","body":["Controller.captureJoystick(${1:joystickID: number})"],"description":"Disable default Interface actions for a joystick."}}, + {"Controller.releaseJoystick":{"prefix":"Controller.releaseJoystick","body":["Controller.releaseJoystick(${1:joystickID: number})"],"description":"Re-enable default Interface actions for a joystick that has been disabled using \r{@link Controller.captureJoystick|captureJoystick}."}}, + {"Controller.captureEntityClickEvents":{"prefix":"Controller.captureEntityClickEvents","body":["Controller.captureEntityClickEvents"],"description":"Disable {@link Entities.mousePressOnEntity} and {@link Entities.mouseDoublePressOnEntity} events on entities."}}, + {"Controller.releaseEntityClickEvents":{"prefix":"Controller.releaseEntityClickEvents","body":["Controller.releaseEntityClickEvents"],"description":"Re-enable {@link Entities.mousePressOnEntity} and {@link Entities.mouseDoublePressOnEntity} events on entities that were \rdisabled using {@link Controller.captureEntityClickEvents|captureEntityClickEvents}."}}, + {"Controller.getViewportDimensions":{"prefix":"Controller.getViewportDimensions","body":["Controller.getViewportDimensions"],"description":"Get the dimensions of the Interface window's interior if in desktop mode or the HUD surface if in HMD mode."}}, + {"Controller.getRecommendedHUDRect":{"prefix":"Controller.getRecommendedHUDRect","body":["Controller.getRecommendedHUDRect"],"description":"Get the recommended area to position UI on the HUD surface if in HMD mode or Interface's window interior if in desktop \rmode."}}, + {"Controller.setVPadEnabled":{"prefix":"Controller.setVPadEnabled","body":["Controller.setVPadEnabled(${1:enable: boolean})"],"description":"Enables or disables the virtual game pad that is displayed on certain devices (e.g., Android)."}}, + {"Controller.setVPadHidden":{"prefix":"Controller.setVPadHidden","body":["Controller.setVPadHidden(${1:hidden: boolean})"],"description":"Shows or hides the virtual game pad that is displayed on certain devices (e.g., Android)."}}, + {"Controller.setVPadExtraBottomMargin":{"prefix":"Controller.setVPadExtraBottomMargin","body":["Controller.setVPadExtraBottomMargin(${1:margin: number})"],"description":"Sets the amount of extra margin between the virtual game pad that is displayed on certain devices (e.g., Android) and \rthe bottom of the display."}}, + {"Controller.keyPressEvent":{"prefix":"Controller.keyPressEvent","body":["Controller.keyPressEvent(${1:event: KeyEvent})"],"description":"Triggered when a keyboard key is pressed."}}, + {"Controller.keyReleaseEvent":{"prefix":"Controller.keyReleaseEvent","body":["Controller.keyReleaseEvent(${1:event: KeyEvent})"],"description":"Triggered when a keyboard key is released from being pressed."}}, + {"Controller.mouseMoveEvent":{"prefix":"Controller.mouseMoveEvent","body":["Controller.mouseMoveEvent(${1:event: MouseEvent})"],"description":"Triggered when the mouse moves."}}, + {"Controller.mousePressEvent":{"prefix":"Controller.mousePressEvent","body":["Controller.mousePressEvent(${1:event: MouseEvent})"],"description":"Triggered when a mouse button is pressed."}}, + {"Controller.mouseDoublePressEvent":{"prefix":"Controller.mouseDoublePressEvent","body":["Controller.mouseDoublePressEvent(${1:event: MouseEvent})"],"description":"Triggered when a mouse button is double-pressed."}}, + {"Controller.mouseReleaseEvent":{"prefix":"Controller.mouseReleaseEvent","body":["Controller.mouseReleaseEvent(${1:event: MouseEvent})"],"description":"Triggered when a mouse button is released from being pressed."}}, + {"Controller.touchBeginEvent":{"prefix":"Controller.touchBeginEvent","body":["Controller.touchBeginEvent(${1:event: TouchEvent})"],"description":"Triggered when a touch event starts in the Interface window on a touch-enabled display or device."}}, + {"Controller.touchEndEvent":{"prefix":"Controller.touchEndEvent","body":["Controller.touchEndEvent(${1:event: TouchEvent})"],"description":"Triggered when a touch event ends in the Interface window on a touch-enabled display or device."}}, + {"Controller.touchUpdateEvent":{"prefix":"Controller.touchUpdateEvent","body":["Controller.touchUpdateEvent(${1:event: TouchEvent})"],"description":"Triggered when a touch event update occurs in the Interface window on a touch-enabled display or device."}}, + {"Controller.wheelEvent":{"prefix":"Controller.wheelEvent","body":["Controller.wheelEvent(${1:event: WheelEvent})"],"description":"Triggered when the mouse wheel is rotated."}}, + {"Desktop":{"prefix":"Desktop","body":["Desktop"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"GooglePoly":{"prefix":"GooglePoly","body":["GooglePoly"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The GooglePoly API allows you to interact with Google Poly models direct from inside High Fidelity."}}, + {"GooglePoly.setAPIKey":{"prefix":"GooglePoly.setAPIKey","body":["GooglePoly.setAPIKey(${1:key: string})"]}}, + {"GooglePoly.getAssetList":{"prefix":"GooglePoly.getAssetList","body":["GooglePoly.getAssetList(${1:keyword: string},${2:category: string},${3:format: string})"]}}, + {"GooglePoly.getFBX":{"prefix":"GooglePoly.getFBX","body":["GooglePoly.getFBX(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getOBJ":{"prefix":"GooglePoly.getOBJ","body":["GooglePoly.getOBJ(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getBlocks":{"prefix":"GooglePoly.getBlocks","body":["GooglePoly.getBlocks(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getGLTF":{"prefix":"GooglePoly.getGLTF","body":["GooglePoly.getGLTF(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getGLTF2":{"prefix":"GooglePoly.getGLTF2","body":["GooglePoly.getGLTF2(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getTilt":{"prefix":"GooglePoly.getTilt","body":["GooglePoly.getTilt(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getModelInfo":{"prefix":"GooglePoly.getModelInfo","body":["GooglePoly.getModelInfo(${1:input: string})"]}}, + {"HMD":{"prefix":"HMD","body":["HMD"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The HMD API provides access to the HMD used in VR display mode."}}, + {"HMD.calculateRayUICollisionPoint":{"prefix":"HMD.calculateRayUICollisionPoint","body":["HMD.calculateRayUICollisionPoint(${1:position: Vec3},${2:direction: Vec3})"],"description":"Calculate the intersection of a ray with the HUD overlay."}}, + {"HMD.overlayFromWorldPoint":{"prefix":"HMD.overlayFromWorldPoint","body":["HMD.overlayFromWorldPoint(${1:position: Vec3})"],"description":"Get the 2D HUD overlay coordinates of a 3D point on the HUD overlay.\r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay."}}, + {"HMD.worldPointFromOverlay":{"prefix":"HMD.worldPointFromOverlay","body":["HMD.worldPointFromOverlay(${1:coordinates: Vec2})"],"description":"Get the 3D world coordinates of a 2D point on the HUD overlay.\r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay."}}, + {"HMD.sphericalToOverlay":{"prefix":"HMD.sphericalToOverlay","body":["HMD.sphericalToOverlay(${1:sphericalPos: Vec2})"],"description":"Get the 2D point on the HUD overlay represented by given spherical coordinates. \r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.\rSpherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD \roverlay."}}, + {"HMD.overlayToSpherical":{"prefix":"HMD.overlayToSpherical","body":["HMD.overlayToSpherical(${1:overlayPos: Vec2})"],"description":"Get the spherical coordinates of a 2D point on the HUD overlay.\r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.\rSpherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD\roverlay."}}, + {"HMD.centerUI":{"prefix":"HMD.centerUI","body":["HMD.centerUI"],"description":"Recenter the HMD HUD to the current HMD position and orientation."}}, + {"HMD.preferredAudioInput":{"prefix":"HMD.preferredAudioInput","body":["HMD.preferredAudioInput"],"description":"Get the name of the HMD audio input device."}}, + {"HMD.preferredAudioOutput":{"prefix":"HMD.preferredAudioOutput","body":["HMD.preferredAudioOutput"],"description":"Get the name of the HMD audio output device."}}, + {"HMD.isHMDAvailable":{"prefix":"HMD.isHMDAvailable","body":["HMD.isHMDAvailable(${1:name: string})"],"description":"Check whether there is an HMD available."}}, + {"HMD.isHeadControllerAvailable":{"prefix":"HMD.isHeadControllerAvailable","body":["HMD.isHeadControllerAvailable(${1:name: string})"],"description":"Check whether there is an HMD head controller available."}}, + {"HMD.isHandControllerAvailable":{"prefix":"HMD.isHandControllerAvailable","body":["HMD.isHandControllerAvailable(${1:name: string})"],"description":"Check whether there are HMD hand controllers available."}}, + {"HMD.isSubdeviceContainingNameAvailable":{"prefix":"HMD.isSubdeviceContainingNameAvailable","body":["HMD.isSubdeviceContainingNameAvailable(${1:name: string})"],"description":"Check whether there are specific HMD controllers available."}}, + {"HMD.requestShowHandControllers":{"prefix":"HMD.requestShowHandControllers","body":["HMD.requestShowHandControllers"],"description":"Signal that models of the HMD hand controllers being used should be displayed. The models are displayed at their actual, \rreal-world locations."}}, + {"HMD.requestHideHandControllers":{"prefix":"HMD.requestHideHandControllers","body":["HMD.requestHideHandControllers"],"description":"Signal that it is no longer necessary to display models of the HMD hand controllers being used. If no other scripts \rwant the models displayed then they are no longer displayed."}}, + {"HMD.shouldShowHandControllers":{"prefix":"HMD.shouldShowHandControllers","body":["HMD.shouldShowHandControllers"],"description":"Check whether any script wants models of the HMD hand controllers displayed. Requests are made and canceled using \r{@link HMD.requestShowHandControllers|requestShowHandControllers} and \r{@link HMD.requestHideHandControllers|requestHideHandControllers}."}}, + {"HMD.activateHMDHandMouse":{"prefix":"HMD.activateHMDHandMouse","body":["HMD.activateHMDHandMouse"],"description":"Causes the borders in HUD windows to be enlarged when the laser intersects them in HMD mode. By default, borders are not \renlarged."}}, + {"HMD.deactivateHMDHandMouse":{"prefix":"HMD.deactivateHMDHandMouse","body":["HMD.deactivateHMDHandMouse"],"description":"Causes the border in HUD windows to no longer be enlarged when the laser intersects them in HMD mode. By default, \rborders are not enlarged."}}, + {"HMD.suppressKeyboard":{"prefix":"HMD.suppressKeyboard","body":["HMD.suppressKeyboard"],"description":"Suppress the activation of the HMD-provided keyboard, if any. Successful calls should be balanced with a call to \r{@link HMD.unspressKeyboard|unspressKeyboard} within a reasonable amount of time."}}, + {"HMD.unsuppressKeyboard":{"prefix":"HMD.unsuppressKeyboard","body":["HMD.unsuppressKeyboard"],"description":"Unsuppress the activation of the HMD-provided keyboard, if any."}}, + {"HMD.isKeyboardVisible":{"prefix":"HMD.isKeyboardVisible","body":["HMD.isKeyboardVisible"],"description":"Check whether the HMD-provided keyboard, if any, is visible."}}, + {"HMD.closeTablet":{"prefix":"HMD.closeTablet","body":["HMD.closeTablet"],"description":"Closes the tablet if it is open."}}, + {"HMD.openTablet":{"prefix":"HMD.openTablet","body":["HMD.openTablet(${1:contextualMode: boolean})"],"description":"Opens the tablet if the tablet is used in the current display mode and it isn't already showing, and sets the tablet to \rcontextual mode if requested. In contextual mode, the page displayed on the tablet is wholly controlled by script (i.e., \rthe user cannot navigate to another)."}}, + {"HMD.shouldShowHandControllersChanged":{"prefix":"HMD.shouldShowHandControllersChanged","body":["HMD.shouldShowHandControllersChanged"],"description":"Triggered when a request to show or hide models of the HMD hand controllers is made using \r{@link HMD.requestShowHandControllers|requestShowHandControllers} or\r{@link HMD.requestHideHandControllers|requestHideHandControllers}."}}, + {"Menu":{"prefix":"Menu","body":["Menu"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Menu API provides access to the menu that is displayed at the top of the window\ron a user's desktop and in the tablet when the \"MENU\" button is pressed.\r\r

\r\r

Groupings

\r\rA \"grouping\" provides a way to group a set of menus or menu items together so \rthat they can all be set visible or invisible as a group. \rThere are two available groups: \"Advanced\" and \"Developer\".\rThese groupings can be toggled in the \"Settings\" menu.\rIf a menu item doesn't belong to a group it is always displayed."}}, + {"Menu.addMenu":{"prefix":"Menu.addMenu","body":["Menu.addMenu(${1:menuName: string},${2:grouping: string})"],"description":"Add a new top-level menu."}}, + {"Menu.removeMenu":{"prefix":"Menu.removeMenu","body":["Menu.removeMenu(${1:menuName: string})"],"description":"Remove a top-level menu."}}, + {"Menu.menuExists":{"prefix":"Menu.menuExists","body":["Menu.menuExists(${1:menuName: string})"],"description":"Check whether a top-level menu exists."}}, + {"Menu.addSeparator":{"prefix":"Menu.addSeparator","body":["Menu.addSeparator(${1:menuName: string},${2:separatorName: string})"],"description":"Add a separator with an unclickable label below it. The separator will be placed at the bottom of the menu.\rIf you want to add a separator at a specific point in the menu, use {@link Menu.addMenuItem} with\r{@link Menu.MenuItemProperties} instead."}}, + {"Menu.removeSeparator":{"prefix":"Menu.removeSeparator","body":["Menu.removeSeparator(${1:menuName: string},${2:separatorName: string})"],"description":"Remove a separator from a menu."}}, + {"Menu.addMenuItem":{"prefix":"Menu.addMenuItem","body":["Menu.addMenuItem(${1:properties: Menu.MenuItemProperties})"],"description":"Add a new menu item to a menu."}}, + {"Menu.addMenuItem":{"prefix":"Menu.addMenuItem","body":["Menu.addMenuItem(${1:menuName: string},${2:menuItem: string},${3:shortcutKey: string})"],"description":"Add a new menu item to a menu. The new item is added at the end of the menu."}}, + {"Menu.removeMenuItem":{"prefix":"Menu.removeMenuItem","body":["Menu.removeMenuItem(${1:menuName: string},${2:menuItem: string})"],"description":"Remove a menu item from a menu."}}, + {"Menu.menuItemExists":{"prefix":"Menu.menuItemExists","body":["Menu.menuItemExists(${1:menuName: string},${2:menuItem: string})"],"description":"Check if a menu item exists."}}, + {"Menu.isOptionChecked":{"prefix":"Menu.isOptionChecked","body":["Menu.isOptionChecked(${1:menuOption: string})"],"description":"Check whether a checkable menu item is checked."}}, + {"Menu.setIsOptionChecked":{"prefix":"Menu.setIsOptionChecked","body":["Menu.setIsOptionChecked(${1:menuOption: string},${2:isChecked: boolean})"],"description":"Set a checkable menu item as checked or unchecked."}}, + {"Menu.triggerOption":{"prefix":"Menu.triggerOption","body":["Menu.triggerOption(${1:menuOption: string})"],"description":"Trigger the menu item as if the user clicked on it."}}, + {"Menu.isMenuEnabled":{"prefix":"Menu.isMenuEnabled","body":["Menu.isMenuEnabled(${1:menuName: string})"],"description":"Check whether a menu or menu item is enabled. If disabled, the item is grayed out and unusable.\rMenus are enabled by default."}}, + {"Menu.setMenuEnabled":{"prefix":"Menu.setMenuEnabled","body":["Menu.setMenuEnabled(${1:menuName: string},${2:isEnabled: boolean})"],"description":"Set a menu or menu item to be enabled or disabled. If disabled, the item is grayed out and unusable."}}, + {"Menu.menuItemEvent":{"prefix":"Menu.menuItemEvent","body":["Menu.menuItemEvent(${1:menuItem: string})"],"description":"Triggered when a menu item is clicked (or triggered by {@link Menu.triggerOption})."}}, + {"Selection.ItemType":{"prefix":"Selection.ItemType","body":["Selection.ItemType"],"description":"\r \r \r \r \r \r \r \r \r
ValueDescription
\"avatar\"
\"entity\"
\"overlay\"
"}}, + {"Selection.SelectedItemsList":{"prefix":"Selection.SelectedItemsList","body":["Selection.SelectedItemsList"]}}, + {"Selection.HighlightStyle":{"prefix":"Selection.HighlightStyle","body":["Selection.HighlightStyle"]}}, + {"Selection":{"prefix":"Selection","body":["Selection"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Selection API provides a means of grouping together avatars, entities, and overlays in named lists."}}, + {"Selection.getListNames":{"prefix":"Selection.getListNames","body":["Selection.getListNames"],"description":"Get the names of all the selection lists."}}, + {"Selection.removeListFromMap":{"prefix":"Selection.removeListFromMap","body":["Selection.removeListFromMap(${1:listName: string})"],"description":"Delete a named selection list."}}, + {"Selection.addToSelectedItemsList":{"prefix":"Selection.addToSelectedItemsList","body":["Selection.addToSelectedItemsList(${1:listName: string},${2:itemType: Selection.ItemType},${3:id: Uuid})"],"description":"Add an item to a selection list."}}, + {"Selection.removeFromSelectedItemsList":{"prefix":"Selection.removeFromSelectedItemsList","body":["Selection.removeFromSelectedItemsList(${1:listName: string},${2:itemType: Selection.ItemType},${3:id: Uuid})"],"description":"Remove an item from a selection list."}}, + {"Selection.clearSelectedItemsList":{"prefix":"Selection.clearSelectedItemsList","body":["Selection.clearSelectedItemsList(${1:listName: string})"],"description":"Remove all items from a selection."}}, + {"Selection.printList":{"prefix":"Selection.printList","body":["Selection.printList(${1:listName: string})"],"description":"Print out the list of avatars, entities, and overlays in a selection to the debug log (not the script log)."}}, + {"Selection.getSelectedItemsList":{"prefix":"Selection.getSelectedItemsList","body":["Selection.getSelectedItemsList(${1:listName: string})"],"description":"Get the list of avatars, entities, and overlays stored in a selection list."}}, + {"Selection.getHighlightedListNames":{"prefix":"Selection.getHighlightedListNames","body":["Selection.getHighlightedListNames"],"description":"Get the names of the highlighted selection lists."}}, + {"Selection.enableListHighlight":{"prefix":"Selection.enableListHighlight","body":["Selection.enableListHighlight(${1:listName: string},${2:highlightStyle: Selection.HighlightStyle})"],"description":"Enable highlighting for a selection list.\rIf the selection list doesn't exist, it will be created.\rAll objects in the list will be displayed with the highlight effect specified.\rThe function can be called several times with different values in the style to modify it.
\rNote: This function implicitly calls {@link Selection.enableListToScene}."}}, + {"Selection.disableListHighlight":{"prefix":"Selection.disableListHighlight","body":["Selection.disableListHighlight(${1:listName: string})"],"description":"Disable highlighting for the selection list.\rIf the selection list doesn't exist or wasn't enabled for highlighting then nothing happens and false is\rreturned.
\rNote: This function implicitly calls {@link Selection.disableListToScene}."}}, + {"Selection.enableListToScene":{"prefix":"Selection.enableListToScene","body":["Selection.enableListToScene(${1:listName: string})"],"description":"Enable scene selection for the selection list.\rIf the Selection doesn't exist, it will be created.\rAll objects in the list will be sent to a scene selection."}}, + {"Selection.disableListToScene":{"prefix":"Selection.disableListToScene","body":["Selection.disableListToScene(${1:listName: string})"],"description":"Disable scene selection for the named selection.\rIf the selection list doesn't exist or wasn't enabled on the scene then nothing happens and false is\rreturned."}}, + {"Selection.getListHighlightStyle":{"prefix":"Selection.getListHighlightStyle","body":["Selection.getListHighlightStyle(${1:listName: string})"],"description":"Get the highlight style values for the a selection list.\rIf the selection doesn't exist or hasn't been highlight enabled yet, an empty object is returned."}}, + {"Selection.selectedItemsListChanged":{"prefix":"Selection.selectedItemsListChanged","body":["Selection.selectedItemsListChanged(${1:listName: string})"],"description":"Triggered when a list's content changes."}}, + {"Settings":{"prefix":"Settings","body":["Settings"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Settings API provides a facility to store and retrieve values that persist between Interface runs."}}, + {"Settings.getValue":{"prefix":"Settings.getValue","body":["Settings.getValue(${1:key: string},${2:defaultValue: string})"],"description":"Retrieve the value from a named setting."}}, + {"Settings.setValue":{"prefix":"Settings.setValue","body":["Settings.setValue(${1:key: string},${2:value: string})"],"description":"Store a value in a named setting. If the setting already exists its value is overwritten, otherwise a new setting is \rcreated. If the value is set to null or undefined, the setting is deleted."}}, + {"Test.quit":{"prefix":"Test.quit","body":["Test.quit"],"description":"Exits the application"}}, + {"Test.waitForTextureIdle":{"prefix":"Test.waitForTextureIdle","body":["Test.waitForTextureIdle"],"description":"Waits for all texture transfers to be complete"}}, + {"Test.waitForDownloadIdle":{"prefix":"Test.waitForDownloadIdle","body":["Test.waitForDownloadIdle"],"description":"Waits for all pending downloads to be complete"}}, + {"Test.waitForProcessingIdle":{"prefix":"Test.waitForProcessingIdle","body":["Test.waitForProcessingIdle"],"description":"Waits for all file parsing operations to be complete"}}, + {"Test.waitIdle":{"prefix":"Test.waitIdle","body":["Test.waitIdle"],"description":"Waits for all pending downloads, parsing and texture transfers to be complete"}}, + {"Test.waitForConnection":{"prefix":"Test.waitForConnection","body":["Test.waitForConnection(${1:maxWaitMs: int})"],"description":"Waits for establishment of connection to server"}}, + {"Test.wait":{"prefix":"Test.wait","body":["Test.wait(${1:milliseconds: int})"],"description":"Waits a specific number of milliseconds"}}, + {"Test.loadTestScene":{"prefix":"Test.loadTestScene","body":["Test.loadTestScene(${1:sceneFile: string})"],"description":"Waits for all pending downloads, parsing and texture transfers to be complete"}}, + {"Test.clear":{"prefix":"Test.clear","body":["Test.clear"],"description":"Clears all caches"}}, + {"Test.startTracing":{"prefix":"Test.startTracing","body":["Test.startTracing(${1:logrules: string})"],"description":"Start recording Chrome compatible tracing events\rlogRules can be used to specify a set of logging category rules to limit what gets captured"}}, + {"Test.stopTracing":{"prefix":"Test.stopTracing","body":["Test.stopTracing(${1:filename: string})"],"description":"Stop recording Chrome compatible tracing events and serialize recorded events to a file\rUsing a filename with a .gz extension will automatically compress the output file"}}, + {"Test.startTraceEvent":{"prefix":"Test.startTraceEvent","body":["Test.startTraceEvent(${1:name: string})"],"description":"Starts a specific trace event"}}, + {"Test.endTraceEvent":{"prefix":"Test.endTraceEvent","body":["Test.endTraceEvent(${1:filename: string})"],"description":"Stop a specific name event\rUsing a filename with a .gz extension will automatically compress the output file"}}, + {"Test.savePhysicsSimulationStats":{"prefix":"Test.savePhysicsSimulationStats","body":["Test.savePhysicsSimulationStats(${1:filename: string})"],"description":"Write detailed timing stats of next physics stepSimulation() to filename"}}, + {"Test.savePhysicsSimulationStats":{"prefix":"Test.savePhysicsSimulationStats","body":["Test.savePhysicsSimulationStats(${1:name: string},${2:function: function})"],"description":"Profiles a specific function"}}, + {"Test.clearCaches":{"prefix":"Test.clearCaches","body":["Test.clearCaches"],"description":"Clear all caches (menu command Reload Content)"}}, + {"Test.saveObject":{"prefix":"Test.saveObject","body":["Test.saveObject(${1:name: string},${2:filename: string})"],"description":"Save a JSON object to a file in the test results location"}}, + {"Test.showMaximized":{"prefix":"Test.showMaximized","body":["Test.showMaximized"],"description":"Maximizes the window"}}, + {"Test.setOtherAvatarsReplicaCount":{"prefix":"Test.setOtherAvatarsReplicaCount","body":["Test.setOtherAvatarsReplicaCount(${1:count: number})"],"description":"Values higher than 0 will create replicas of other-avatars when entering a domain for testing purpouses"}}, + {"Test.getOtherAvatarsReplicaCount":{"prefix":"Test.getOtherAvatarsReplicaCount","body":["Test.getOtherAvatarsReplicaCount"],"description":"Return the number of replicas that are being created of other-avatars when entering a domain"}}, + {"Wallet":{"prefix":"Wallet","body":["Wallet"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Wallet.refreshWalletStatus":{"prefix":"Wallet.refreshWalletStatus","body":["Wallet.refreshWalletStatus"]}}, + {"Wallet.getWalletStatus":{"prefix":"Wallet.getWalletStatus","body":["Wallet.getWalletStatus"]}}, + {"Wallet.proveAvatarEntityOwnershipVerification":{"prefix":"Wallet.proveAvatarEntityOwnershipVerification","body":["Wallet.proveAvatarEntityOwnershipVerification(${1:entityID: Uuid})"]}}, + {"Wallet.walletStatusChanged":{"prefix":"Wallet.walletStatusChanged","body":["Wallet.walletStatusChanged"]}}, + {"Wallet.walletNotSetup":{"prefix":"Wallet.walletNotSetup","body":["Wallet.walletNotSetup"]}}, + {"Wallet.ownershipVerificationSuccess":{"prefix":"Wallet.ownershipVerificationSuccess","body":["Wallet.ownershipVerificationSuccess(${1:entityID: Uuid})"]}}, + {"Wallet.ownershipVerificationFailed":{"prefix":"Wallet.ownershipVerificationFailed","body":["Wallet.ownershipVerificationFailed(${1:entityID: Uuid})"]}}, + {"Window.MessageBoxButton":{"prefix":"Window.MessageBoxButton","body":["Window.MessageBoxButton"],"description":"

The buttons that may be included in a message box created by {@link Window.openMessageBox|openMessageBox} are defined by\rnumeric values:\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ButtonValueDescription
NoButton 0x0 An invalid button.
Ok 0x400 \"OK\"
Save 0x800 \"Save\"
SaveAll 0x1000 \"Save All\"
Open 0x2000 \"Open\"
Yes 0x4000 \"Yes\"
YesToAll 0x8000 \"Yes to All\"
No 0x10000 \"No\"
NoToAll 0x20000 \"No to All\"
Abort 0x40000 \"Abort\"
Retry 0x80000 \"Retry\"
Ignore 0x100000 \"Ignore\"
Close 0x200000 \"Close\"
Cancel 0x400000 \"Cancel\"
Discard 0x800000 \"Discard\" or \"Don't Save\"
Help 0x1000000 \"Help\"
Apply 0x2000000 \"Apply\"
Reset 0x4000000 \"Reset\"
RestoreDefaults 0x8000000 \"Restore Defaults\"
"}}, + {"Window":{"prefix":"Window","body":["Window"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Window API provides various facilities not covered elsewhere: window dimensions, window focus, normal or entity camera\rview, clipboard, announcements, user connections, common dialog boxes, snapshots, file import, domain changes, domain \rphysics."}}, + {"Window.hasFocus":{"prefix":"Window.hasFocus","body":["Window.hasFocus"],"description":"Check if the Interface window has focus."}}, + {"Window.setFocus":{"prefix":"Window.setFocus","body":["Window.setFocus"],"description":"Make the Interface window have focus. On Windows, if Interface doesn't already have focus, the task bar icon flashes to \rindicate that Interface wants attention but focus isn't taken away from the application that the user is using."}}, + {"Window.raise":{"prefix":"Window.raise","body":["Window.raise"],"description":"Raise the Interface window if it is minimized. If raised, the window gains focus."}}, + {"Window.alert":{"prefix":"Window.alert","body":["Window.alert(${1:message: string})"],"description":"Display a dialog with the specified message and an \"OK\" button. The dialog is non-modal; the script continues without\rwaiting for a user response."}}, + {"Window.confirm":{"prefix":"Window.confirm","body":["Window.confirm(${1:message: string})"],"description":"Prompt the user to confirm something. Displays a modal dialog with a message plus \"Yes\" and \"No\" buttons.\rresponds."}}, + {"Window.prompt":{"prefix":"Window.prompt","body":["Window.prompt(${1:message: string},${2:defaultText: string})"],"description":"Prompt the user to enter some text. Displays a modal dialog with a message and a text box, plus \"OK\" and \"Cancel\" \rbuttons."}}, + {"Window.promptAsync":{"prefix":"Window.promptAsync","body":["Window.promptAsync(${1:message: string},${2:defaultText: string})"],"description":"Prompt the user to enter some text. Displays a non-modal dialog with a message and a text box, plus \"OK\" and \"Cancel\" \rbuttons. A {@link Window.promptTextChanged|promptTextChanged} signal is emitted when the user OKs the dialog; no signal \ris emitted if the user cancels the dialog."}}, + {"Window.browseDir":{"prefix":"Window.browseDir","body":["Window.browseDir(${1:title: string},${2:directory: string})"],"description":"Prompt the user to choose a directory. Displays a modal dialog that navigates the directory tree."}}, + {"Window.browseDirAsync":{"prefix":"Window.browseDirAsync","body":["Window.browseDirAsync(${1:title: string},${2:directory: string})"],"description":"Prompt the user to choose a directory. Displays a non-modal dialog that navigates the directory tree. A\r{@link Window.browseDirChanged|browseDirChanged} signal is emitted when a directory is chosen; no signal is emitted if\rthe user cancels the dialog."}}, + {"Window.browse":{"prefix":"Window.browse","body":["Window.browse(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to choose a file. Displays a modal dialog that navigates the directory tree."}}, + {"Window.browseAsync":{"prefix":"Window.browseAsync","body":["Window.browseAsync(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to choose a file. Displays a non-modal dialog that navigates the directory tree. A\r{@link Window.browseChanged|browseChanged} signal is emitted when a file is chosen; no signal is emitted if the user\rcancels the dialog."}}, + {"Window.save":{"prefix":"Window.save","body":["Window.save(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to specify the path and name of a file to save to. Displays a model dialog that navigates the directory\rtree and allows the user to type in a file name."}}, + {"Window.saveAsync":{"prefix":"Window.saveAsync","body":["Window.saveAsync(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to specify the path and name of a file to save to. Displays a non-model dialog that navigates the\rdirectory tree and allows the user to type in a file name. A {@link Window.saveFileChanged|saveFileChanged} signal is\remitted when a file is specified; no signal is emitted if the user cancels the dialog."}}, + {"Window.browseAssets":{"prefix":"Window.browseAssets","body":["Window.browseAssets(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to choose an Asset Server item. Displays a modal dialog that navigates the tree of assets on the Asset\rServer."}}, + {"Window.browseAssetsAsync":{"prefix":"Window.browseAssetsAsync","body":["Window.browseAssetsAsync(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to choose an Asset Server item. Displays a non-modal dialog that navigates the tree of assets on the \rAsset Server. A {@link Window.assetsDirChanged|assetsDirChanged} signal is emitted when an asset is chosen; no signal is\remitted if the user cancels the dialog."}}, + {"Window.showAssetServer":{"prefix":"Window.showAssetServer","body":["Window.showAssetServer(${1:uploadFile: string})"],"description":"Open the Asset Browser dialog. If a file to upload is specified, the user is prompted to enter the folder and name to\rmap the file to on the asset server."}}, + {"Window.checkVersion":{"prefix":"Window.checkVersion","body":["Window.checkVersion"],"description":"Get Interface's build number."}}, + {"Window.protocolSignature":{"prefix":"Window.protocolSignature","body":["Window.protocolSignature"],"description":"Get the signature for Interface's protocol version."}}, + {"Window.copyToClipboard":{"prefix":"Window.copyToClipboard","body":["Window.copyToClipboard(${1:text: string})"],"description":"Copies text to the operating system's clipboard."}}, + {"Window.takeSnapshot":{"prefix":"Window.takeSnapshot","body":["Window.takeSnapshot(${1:notify: boolean},${2:includeAnimated: boolean},${3:aspectRatio: number},${4:filename: string})"],"description":"Takes a snapshot of the current Interface view from the primary camera. When a still image only is captured, \r{@link Window.stillSnapshotTaken|stillSnapshotTaken} is emitted; when a still image plus moving images are captured, \r{@link Window.processingGifStarted|processingGifStarted} and {@link Window.processingGifCompleted|processingGifCompleted}\rare emitted. The path to store the snapshots and the length of the animated GIF to capture are specified in Settings >\rGeneral > Snapshots.\r\rIf user has supplied a specific filename for the snapshot:\r If the user's requested filename has a suffix that's contained within SUPPORTED_IMAGE_FORMATS,\r DON'T append \".jpg\" to the filename. QT will save the image in the format associated with the\r filename's suffix.\r If you want lossless Snapshots, supply a `.png` filename. Otherwise, use `.jpeg` or `.jpg`.\r Otherwise, \".jpg\" is appended to the user's requested filename so that the image is saved in JPG format.\rIf the user hasn't supplied a specific filename for the snapshot:\r Save the snapshot in JPG format according to FILENAME_PATH_FORMAT"}}, + {"Window.takeSecondaryCameraSnapshot":{"prefix":"Window.takeSecondaryCameraSnapshot","body":["Window.takeSecondaryCameraSnapshot(${1:notify: boolean},${2:filename: string})"],"description":"Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API."}}, + {"Window.takeSecondaryCamera360Snapshot":{"prefix":"Window.takeSecondaryCamera360Snapshot","body":["Window.takeSecondaryCamera360Snapshot(${1:cameraPosition: Vec3},${2:cubemapOutputFormat: boolean},${3:notify: boolean},${4:filename: string})"],"description":"Takes a 360° snapshot at a given position for the secondary camera. The secondary camera does not need to have been \r set up."}}, + {"Window.makeConnection":{"prefix":"Window.makeConnection","body":["Window.makeConnection(${1:success: boolean},${2:description: string})"],"description":"Emit a {@link Window.connectionAdded|connectionAdded} or a {@link Window.connectionError|connectionError} signal that\rindicates whether or not a user connection was successfully made using the Web API."}}, + {"Window.displayAnnouncement":{"prefix":"Window.displayAnnouncement","body":["Window.displayAnnouncement(${1:message: string})"],"description":"Display a notification message. Notifications are displayed in panels by the default script, nofications.js. An\r{@link Window.announcement|announcement} signal is emitted when this function is called."}}, + {"Window.shareSnapshot":{"prefix":"Window.shareSnapshot","body":["Window.shareSnapshot(${1:path: string},${2:href: string})"],"description":"Prepare a snapshot ready for sharing. A {@link Window.snapshotShared|snapshotShared} signal is emitted when the snapshot\rhas been prepared."}}, + {"Window.isPhysicsEnabled":{"prefix":"Window.isPhysicsEnabled","body":["Window.isPhysicsEnabled"],"description":"Check to see if physics is active for you in the domain you're visiting - there is a delay between your arrival at a\rdomain and physics becoming active for you in that domain."}}, + {"Window.setDisplayTexture":{"prefix":"Window.setDisplayTexture","body":["Window.setDisplayTexture(${1:texture: Window.DisplayTexture})"],"description":"Set what to show on the PC display: normal view or entity camera view. The entity camera is configured using\r{@link Camera.setCameraEntity} and {@link Camera|Camera.mode}."}}, + {"Window.DisplayTexture":{"prefix":"Window.DisplayTexture","body":["Window.DisplayTexture"],"description":"

The views that may be displayed on the PC display.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueView Displayed
\"\"Normal view.
\"resource://spectatorCameraFrame\"Entity camera view.
"}}, + {"Window.isPointOnDesktopWindow":{"prefix":"Window.isPointOnDesktopWindow","body":["Window.isPointOnDesktopWindow(${1:point: Vec2})"],"description":"Check if a 2D point is within the desktop window if in desktop mode, or the drawable area of the HUD overlay if in HMD\rmode."}}, + {"Window.getDeviceSize":{"prefix":"Window.getDeviceSize","body":["Window.getDeviceSize"],"description":"Get the size of the drawable area of the Interface window if in desktop mode or the HMD rendering surface if in HMD mode."}}, + {"Window.getLastDomainConnectionError":{"prefix":"Window.getLastDomainConnectionError","body":["Window.getLastDomainConnectionError"],"description":"Gets the last domain connection error when a connection is refused."}}, + {"Window.openMessageBox":{"prefix":"Window.openMessageBox","body":["Window.openMessageBox(${1:title: string},${2:text: string},${3:buttons: Window.MessageBoxButton},${4:defaultButton: Window.MessageBoxButton})"],"description":"Open a non-modal message box that can have a variety of button combinations. See also, \r{@link Window.updateMessageBox|updateMessageBox} and {@link Window.closeMessageBox|closeMessageBox}."}}, + {"Window.openUrl":{"prefix":"Window.openUrl","body":["Window.openUrl(${1:url: string})"],"description":"Open a URL in the Interface window or other application, depending on the URL's scheme. If the URL starts with \rhifi:// then that URL is navigated to in Interface, otherwise the URL is opened in the application the OS \rassociates with the URL's scheme (e.g., a Web browser for http://)."}}, + {"Window.openAndroidActivity":{"prefix":"Window.openAndroidActivity","body":["Window.openAndroidActivity(${1:activityName: string},${2:backToScene: boolean})"],"description":"Open an Android activity and optionally return back to the scene when the activity is completed. Android only."}}, + {"Window.updateMessageBox":{"prefix":"Window.updateMessageBox","body":["Window.updateMessageBox(${1:id: number},${2:title: string},${3:text: string},${4:buttons: Window.MessageBoxButton},${5:defaultButton: Window.MessageBoxButton})"],"description":"Update the content of a message box that was opened with {@link Window.openMessageBox|openMessageBox}."}}, + {"Window.closeMessageBox":{"prefix":"Window.closeMessageBox","body":["Window.closeMessageBox(${1:id: number})"],"description":"Close a message box that was opened with {@link Window.openMessageBox|openMessageBox}."}}, + {"Window.domainChanged":{"prefix":"Window.domainChanged","body":["Window.domainChanged(${1:domainURL: string})"],"description":"Triggered when you change the domain you're visiting. Warning: Is not emitted if you go to a domain \rthat isn't running."}}, + {"Window.svoImportRequested":{"prefix":"Window.svoImportRequested","body":["Window.svoImportRequested(${1:url: string})"],"description":"Triggered when you try to navigate to a *.json, *.svo, or *.svo.json URL in a Web browser within Interface."}}, + {"Window.domainConnectionRefused":{"prefix":"Window.domainConnectionRefused","body":["Window.domainConnectionRefused(${1:reasonMessage: string},${2:reasonCode: Window.ConnectionRefusedReason},${3:extraInfo: string})"],"description":"Triggered when you try to visit a domain but are refused connection."}}, + {"Window.redirectErrorStateChanged":{"prefix":"Window.redirectErrorStateChanged","body":["Window.redirectErrorStateChanged(${1:isInErrorState: boolean})"],"description":"Triggered when you try to visit a domain but are redirected into the error state."}}, + {"Window.stillSnapshotTaken":{"prefix":"Window.stillSnapshotTaken","body":["Window.stillSnapshotTaken(${1:pathStillSnapshot: string},${2:notify: boolean})"],"description":"Triggered when a still snapshot has been taken by calling {@link Window.takeSnapshot|takeSnapshot} with \r includeAnimated = false or {@link Window.takeSecondaryCameraSnapshot|takeSecondaryCameraSnapshot}."}}, + {"Window.snapshot360Taken":{"prefix":"Window.snapshot360Taken","body":["Window.snapshot360Taken(${1:pathStillSnapshot: string},${2:notify: boolean})"],"description":"Triggered when a still 360° snapshot has been taken by calling \r {@link Window.takeSecondaryCamera360Snapshot|takeSecondaryCamera360Snapshot}."}}, + {"Window.snapshotShared":{"prefix":"Window.snapshotShared","body":["Window.snapshotShared(${1:isError: boolean},${2:reply: string})"],"description":"Triggered when a snapshot submitted via {@link Window.shareSnapshot|shareSnapshot} is ready for sharing. The snapshot\rmay then be shared via the {@link Account.metaverseServerURL} Web API."}}, + {"Window.processingGifStarted":{"prefix":"Window.processingGifStarted","body":["Window.processingGifStarted(${1:pathStillSnapshot: string})"],"description":"Triggered when the snapshot images have been captured by {@link Window.takeSnapshot|takeSnapshot} and the GIF is\r starting to be processed."}}, + {"Window.processingGifCompleted":{"prefix":"Window.processingGifCompleted","body":["Window.processingGifCompleted(${1:pathAnimatedSnapshot: string})"],"description":"Triggered when a GIF has been prepared of the snapshot images captured by {@link Window.takeSnapshot|takeSnapshot}."}}, + {"Window.connectionAdded":{"prefix":"Window.connectionAdded","body":["Window.connectionAdded(${1:message: string})"],"description":"Triggered when you've successfully made a user connection."}}, + {"Window.connectionError":{"prefix":"Window.connectionError","body":["Window.connectionError(${1:message: string})"],"description":"Triggered when you failed to make a user connection."}}, + {"Window.announcement":{"prefix":"Window.announcement","body":["Window.announcement(${1:message: string})"],"description":"Triggered when a message is announced by {@link Window.displayAnnouncement|displayAnnouncement}."}}, + {"Window.messageBoxClosed":{"prefix":"Window.messageBoxClosed","body":["Window.messageBoxClosed(${1:id: number},${2:button: number})"],"description":"Triggered when the user closes a message box that was opened with {@link Window.openMessageBox|openMessageBox}."}}, + {"Window.browseDirChanged":{"prefix":"Window.browseDirChanged","body":["Window.browseDirChanged(${1:directory: string})"],"description":"Triggered when the user chooses a directory in a {@link Window.browseDirAsync|browseDirAsync} dialog."}}, + {"Window.assetsDirChanged":{"prefix":"Window.assetsDirChanged","body":["Window.assetsDirChanged(${1:asset: string})"],"description":"Triggered when the user chooses an asset in a {@link Window.browseAssetsAsync|browseAssetsAsync} dialog."}}, + {"Window.saveFileChanged":{"prefix":"Window.saveFileChanged","body":["Window.saveFileChanged(${1:filename: string})"],"description":"Triggered when the user specifies a file in a {@link Window.saveAsync|saveAsync} dialog."}}, + {"Window.browseChanged":{"prefix":"Window.browseChanged","body":["Window.browseChanged(${1:filename: string})"],"description":"Triggered when the user chooses a file in a {@link Window.browseAsync|browseAsync} dialog."}}, + {"Window.promptTextChanged":{"prefix":"Window.promptTextChanged","body":["Window.promptTextChanged(${1:text: string})"],"description":"Triggered when the user OKs a {@link Window.promptAsync|promptAsync} dialog."}}, + {"Window.geometryChanged":{"prefix":"Window.geometryChanged","body":["Window.geometryChanged(${1:geometry: Rect})"],"description":"Triggered when the position or size of the Interface window changes."}}, + {"AvatarInputs":{"prefix":"AvatarInputs","body":["AvatarInputs"],"description":"
Available in:Interface ScriptsClient Entity Scripts

API to help manage your Avatar's input"}}, + {"AvatarInputs.loudnessToAudioLevel":{"prefix":"AvatarInputs.loudnessToAudioLevel","body":["AvatarInputs.loudnessToAudioLevel(${1:loudness: number})"]}}, + {"AvatarInputs.setShowAudioTools":{"prefix":"AvatarInputs.setShowAudioTools","body":["AvatarInputs.setShowAudioTools(${1:showAudioTools: boolean})"]}}, + {"AvatarInputs.cameraEnabledChanged":{"prefix":"AvatarInputs.cameraEnabledChanged","body":["AvatarInputs.cameraEnabledChanged"]}}, + {"AvatarInputs.cameraMutedChanged":{"prefix":"AvatarInputs.cameraMutedChanged","body":["AvatarInputs.cameraMutedChanged"]}}, + {"AvatarInputs.isHMDChanged":{"prefix":"AvatarInputs.isHMDChanged","body":["AvatarInputs.isHMDChanged"]}}, + {"AvatarInputs.showAudioToolsChanged":{"prefix":"AvatarInputs.showAudioToolsChanged","body":["AvatarInputs.showAudioToolsChanged(${1:show: boolean})"]}}, + {"AvatarInputs.resetSensors":{"prefix":"AvatarInputs.resetSensors","body":["AvatarInputs.resetSensors"]}}, + {"AvatarInputs.toggleCameraMute":{"prefix":"AvatarInputs.toggleCameraMute","body":["AvatarInputs.toggleCameraMute"]}}, + {"Snapshot":{"prefix":"Snapshot","body":["Snapshot"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Snapshot.snapshotLocationSet":{"prefix":"Snapshot.snapshotLocationSet","body":["Snapshot.snapshotLocationSet(${1:location: string})"]}}, + {"Snapshot.getSnapshotsLocation":{"prefix":"Snapshot.getSnapshotsLocation","body":["Snapshot.getSnapshotsLocation"]}}, + {"Snapshot.setSnapshotsLocation":{"prefix":"Snapshot.setSnapshotsLocation","body":["Snapshot.setSnapshotsLocation(${1:location: String})"]}}, + {"Stats":{"prefix":"Stats","body":["Stats"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Stats.longsubmitsChanged":{"prefix":"Stats.longsubmitsChanged","body":["Stats.longsubmitsChanged"],"description":"Triggered when the value of the longsubmits property changes."}}, + {"Stats.longrendersChanged":{"prefix":"Stats.longrendersChanged","body":["Stats.longrendersChanged"],"description":"Triggered when the value of the longrenders property changes."}}, + {"Stats.longframesChanged":{"prefix":"Stats.longframesChanged","body":["Stats.longframesChanged"],"description":"Triggered when the value of the longframes property changes."}}, + {"Stats.appdroppedChanged":{"prefix":"Stats.appdroppedChanged","body":["Stats.appdroppedChanged"],"description":"Triggered when the value of the appdropped property changes."}}, + {"Stats.expandedChanged":{"prefix":"Stats.expandedChanged","body":["Stats.expandedChanged"],"description":"Triggered when the value of the expanded property changes."}}, + {"Stats.timingExpandedChanged":{"prefix":"Stats.timingExpandedChanged","body":["Stats.timingExpandedChanged"],"description":"Triggered when the value of the timingExpanded property changes."}}, + {"Stats.serverCountChanged":{"prefix":"Stats.serverCountChanged","body":["Stats.serverCountChanged"],"description":"Triggered when the value of the serverCount property changes."}}, + {"Stats.renderrateChanged":{"prefix":"Stats.renderrateChanged","body":["Stats.renderrateChanged"],"description":"Triggered when the value of the renderrate property changes."}}, + {"Stats.presentrateChanged":{"prefix":"Stats.presentrateChanged","body":["Stats.presentrateChanged"],"description":"Triggered when the value of the presentrate property changes."}}, + {"Stats.presentnewrateChanged":{"prefix":"Stats.presentnewrateChanged","body":["Stats.presentnewrateChanged"],"description":"Triggered when the value of the presentnewrate property changes."}}, + {"Stats.presentdroprateChanged":{"prefix":"Stats.presentdroprateChanged","body":["Stats.presentdroprateChanged"],"description":"Triggered when the value of the presentdroprate property changes."}}, + {"Stats.stutterrateChanged":{"prefix":"Stats.stutterrateChanged","body":["Stats.stutterrateChanged"],"description":"Triggered when the value of the stutterrate property changes."}}, + {"Stats.gameLoopRateChanged":{"prefix":"Stats.gameLoopRateChanged","body":["Stats.gameLoopRateChanged"],"description":"Triggered when the value of the gameLoopRate property changes."}}, + {"Stats.numPhysicsBodiesChanged":{"prefix":"Stats.numPhysicsBodiesChanged","body":["Stats.numPhysicsBodiesChanged"],"description":"Trigered when"}}, + {"Stats.avatarCountChanged":{"prefix":"Stats.avatarCountChanged","body":["Stats.avatarCountChanged"],"description":"Triggered when the value of the avatarCount property changes."}}, + {"Stats.updatedAvatarCountChanged":{"prefix":"Stats.updatedAvatarCountChanged","body":["Stats.updatedAvatarCountChanged"],"description":"Triggered when the value of the updatedAvatarCount property changes."}}, + {"Stats.notUpdatedAvatarCountChanged":{"prefix":"Stats.notUpdatedAvatarCountChanged","body":["Stats.notUpdatedAvatarCountChanged"],"description":"Triggered when the value of the notUpdatedAvatarCount property changes."}}, + {"Stats.packetInCountChanged":{"prefix":"Stats.packetInCountChanged","body":["Stats.packetInCountChanged"],"description":"Triggered when the value of the packetInCount property changes."}}, + {"Stats.packetOutCountChanged":{"prefix":"Stats.packetOutCountChanged","body":["Stats.packetOutCountChanged"],"description":"Triggered when the value of the packetOutCount property changes."}}, + {"Stats.mbpsInChanged":{"prefix":"Stats.mbpsInChanged","body":["Stats.mbpsInChanged"],"description":"Triggered when the value of the mbpsIn property changes."}}, + {"Stats.mbpsOutChanged":{"prefix":"Stats.mbpsOutChanged","body":["Stats.mbpsOutChanged"],"description":"Triggered when the value of the mbpsOut property changes."}}, + {"Stats.assetMbpsInChanged":{"prefix":"Stats.assetMbpsInChanged","body":["Stats.assetMbpsInChanged"],"description":"Triggered when the value of the assetMbpsIn property changes."}}, + {"Stats.assetMbpsOutChanged":{"prefix":"Stats.assetMbpsOutChanged","body":["Stats.assetMbpsOutChanged"],"description":"Triggered when the value of the assetMbpsOut property changes."}}, + {"Stats.audioPingChanged":{"prefix":"Stats.audioPingChanged","body":["Stats.audioPingChanged"],"description":"Triggered when the value of the audioPing property changes."}}, + {"Stats.avatarPingChanged":{"prefix":"Stats.avatarPingChanged","body":["Stats.avatarPingChanged"],"description":"Triggered when the value of the avatarPing property changes."}}, + {"Stats.entitiesPingChanged":{"prefix":"Stats.entitiesPingChanged","body":["Stats.entitiesPingChanged"],"description":"Triggered when the value of the entitiesPing property changes."}}, + {"Stats.assetPingChanged":{"prefix":"Stats.assetPingChanged","body":["Stats.assetPingChanged"],"description":"Triggered when the value of the assetPing property changes."}}, + {"Stats.messagePingChanged":{"prefix":"Stats.messagePingChanged","body":["Stats.messagePingChanged"],"description":"Triggered when the value of the messagePing property changes."}}, + {"Stats.positionChanged":{"prefix":"Stats.positionChanged","body":["Stats.positionChanged"],"description":"Triggered when the value of the position property changes."}}, + {"Stats.speedChanged":{"prefix":"Stats.speedChanged","body":["Stats.speedChanged"],"description":"Triggered when the value of the speed property changes."}}, + {"Stats.yawChanged":{"prefix":"Stats.yawChanged","body":["Stats.yawChanged"],"description":"Triggered when the value of the yaw property changes."}}, + {"Stats.avatarMixerInKbpsChanged":{"prefix":"Stats.avatarMixerInKbpsChanged","body":["Stats.avatarMixerInKbpsChanged"],"description":"Triggered when the value of the avatarMixerInKbps property changes."}}, + {"Stats.avatarMixerInPpsChanged":{"prefix":"Stats.avatarMixerInPpsChanged","body":["Stats.avatarMixerInPpsChanged"],"description":"Triggered when the value of the avatarMixerInPps property changes."}}, + {"Stats.avatarMixerOutKbpsChanged":{"prefix":"Stats.avatarMixerOutKbpsChanged","body":["Stats.avatarMixerOutKbpsChanged"],"description":"Triggered when the value of the avatarMixerOutKbps property changes."}}, + {"Stats.avatarMixerOutPpsChanged":{"prefix":"Stats.avatarMixerOutPpsChanged","body":["Stats.avatarMixerOutPpsChanged"],"description":"Triggered when the value of the avatarMixerOutPps property changes."}}, + {"Stats.myAvatarSendRateChanged":{"prefix":"Stats.myAvatarSendRateChanged","body":["Stats.myAvatarSendRateChanged"],"description":"Triggered when the value of the myAvatarSendRate property changes."}}, + {"Stats.audioMixerInKbpsChanged":{"prefix":"Stats.audioMixerInKbpsChanged","body":["Stats.audioMixerInKbpsChanged"],"description":"Triggered when the value of the audioMixerInKbps property changes."}}, + {"Stats.audioMixerInPpsChanged":{"prefix":"Stats.audioMixerInPpsChanged","body":["Stats.audioMixerInPpsChanged"],"description":"Triggered when the value of the audioMixerInPps property changes."}}, + {"Stats.audioMixerOutKbpsChanged":{"prefix":"Stats.audioMixerOutKbpsChanged","body":["Stats.audioMixerOutKbpsChanged"],"description":"Triggered when the value of the audioMixerOutKbps property changes."}}, + {"Stats.audioMixerOutPpsChanged":{"prefix":"Stats.audioMixerOutPpsChanged","body":["Stats.audioMixerOutPpsChanged"],"description":"Triggered when the value of the audioMixerOutPps property changes."}}, + {"Stats.audioMixerKbpsChanged":{"prefix":"Stats.audioMixerKbpsChanged","body":["Stats.audioMixerKbpsChanged"],"description":"Triggered when the value of the audioMixerKbps property changes."}}, + {"Stats.audioMixerPpsChanged":{"prefix":"Stats.audioMixerPpsChanged","body":["Stats.audioMixerPpsChanged"],"description":"Triggered when the value of the audioMixerPps property changes."}}, + {"Stats.audioOutboundPPSChanged":{"prefix":"Stats.audioOutboundPPSChanged","body":["Stats.audioOutboundPPSChanged"],"description":"Triggered when the value of the audioOutboundPPS property changes."}}, + {"Stats.audioSilentOutboundPPSChanged":{"prefix":"Stats.audioSilentOutboundPPSChanged","body":["Stats.audioSilentOutboundPPSChanged"],"description":"Triggered when the value of the audioSilentOutboundPPS property changes."}}, + {"Stats.audioAudioInboundPPSChanged":{"prefix":"Stats.audioAudioInboundPPSChanged","body":["Stats.audioAudioInboundPPSChanged"],"description":"Triggered when the value of the audioAudioInboundPPS property changes."}}, + {"Stats.audioSilentInboundPPSChanged":{"prefix":"Stats.audioSilentInboundPPSChanged","body":["Stats.audioSilentInboundPPSChanged"],"description":"Triggered when the value of the audioSilentInboundPPS property changes."}}, + {"Stats.audioPacketLossChanged":{"prefix":"Stats.audioPacketLossChanged","body":["Stats.audioPacketLossChanged"],"description":"Triggered when the value of the audioPacketLoss property changes."}}, + {"Stats.audioCodecChanged":{"prefix":"Stats.audioCodecChanged","body":["Stats.audioCodecChanged"],"description":"Triggered when the value of the audioCodec property changes."}}, + {"Stats.audioNoiseGateChanged":{"prefix":"Stats.audioNoiseGateChanged","body":["Stats.audioNoiseGateChanged"],"description":"Triggered when the value of the audioNoiseGate property changes."}}, + {"Stats.entityPacketsInKbpsChanged":{"prefix":"Stats.entityPacketsInKbpsChanged","body":["Stats.entityPacketsInKbpsChanged"],"description":"Triggered when the value of the entityPacketsInKbps property changes."}}, + {"Stats.downloadsChanged":{"prefix":"Stats.downloadsChanged","body":["Stats.downloadsChanged"],"description":"Triggered when the value of the downloads property changes."}}, + {"Stats.downloadLimitChanged":{"prefix":"Stats.downloadLimitChanged","body":["Stats.downloadLimitChanged"],"description":"Triggered when the value of the downloadLimit property changes."}}, + {"Stats.downloadsPendingChanged":{"prefix":"Stats.downloadsPendingChanged","body":["Stats.downloadsPendingChanged"],"description":"Triggered when the value of the downloadsPending property changes."}}, + {"Stats.downloadUrlsChanged":{"prefix":"Stats.downloadUrlsChanged","body":["Stats.downloadUrlsChanged"],"description":"Triggered when the value of the downloadUrls property changes."}}, + {"Stats.processingChanged":{"prefix":"Stats.processingChanged","body":["Stats.processingChanged"],"description":"Triggered when the value of the processing property changes."}}, + {"Stats.processingPendingChanged":{"prefix":"Stats.processingPendingChanged","body":["Stats.processingPendingChanged"],"description":"Triggered when the value of the processingPending property changes."}}, + {"Stats.trianglesChanged":{"prefix":"Stats.trianglesChanged","body":["Stats.trianglesChanged"],"description":"Triggered when the value of the triangles property changes."}}, + {"Stats.drawcallsChanged":{"prefix":"Stats.drawcallsChanged","body":["Stats.drawcallsChanged"],"description":"Triggered when the value of the drawcalls property changes.\rThis"}}, + {"Stats.materialSwitchesChanged":{"prefix":"Stats.materialSwitchesChanged","body":["Stats.materialSwitchesChanged"],"description":"Triggered when the value of the materialSwitches property changes."}}, + {"Stats.itemConsideredChanged":{"prefix":"Stats.itemConsideredChanged","body":["Stats.itemConsideredChanged"],"description":"Triggered when the value of the itemConsidered property changes."}}, + {"Stats.itemOutOfViewChanged":{"prefix":"Stats.itemOutOfViewChanged","body":["Stats.itemOutOfViewChanged"],"description":"Triggered when the value of the itemOutOfView property changes."}}, + {"Stats.itemTooSmallChanged":{"prefix":"Stats.itemTooSmallChanged","body":["Stats.itemTooSmallChanged"],"description":"Triggered when the value of the itemTooSmall property changes."}}, + {"Stats.itemRenderedChanged":{"prefix":"Stats.itemRenderedChanged","body":["Stats.itemRenderedChanged"],"description":"Triggered when the value of the itemRendered property changes."}}, + {"Stats.shadowConsideredChanged":{"prefix":"Stats.shadowConsideredChanged","body":["Stats.shadowConsideredChanged"],"description":"Triggered when the value of the shadowConsidered property changes."}}, + {"Stats.shadowOutOfViewChanged":{"prefix":"Stats.shadowOutOfViewChanged","body":["Stats.shadowOutOfViewChanged"],"description":"Triggered when the value of the shadowOutOfView property changes."}}, + {"Stats.shadowTooSmallChanged":{"prefix":"Stats.shadowTooSmallChanged","body":["Stats.shadowTooSmallChanged"],"description":"Triggered when the value of the shadowTooSmall property changes."}}, + {"Stats.shadowRenderedChanged":{"prefix":"Stats.shadowRenderedChanged","body":["Stats.shadowRenderedChanged"],"description":"Triggered when the value of the shadowRendered property changes."}}, + {"Stats.sendingModeChanged":{"prefix":"Stats.sendingModeChanged","body":["Stats.sendingModeChanged"],"description":"Triggered when the value of the sendingMode property changes."}}, + {"Stats.packetStatsChanged":{"prefix":"Stats.packetStatsChanged","body":["Stats.packetStatsChanged"],"description":"Triggered when the value of the packetStats property changes."}}, + {"Stats.lodStatusChanged":{"prefix":"Stats.lodStatusChanged","body":["Stats.lodStatusChanged"],"description":"Triggered when the value of the lodStatus property changes."}}, + {"Stats.serverElementsChanged":{"prefix":"Stats.serverElementsChanged","body":["Stats.serverElementsChanged"],"description":"Triggered when the value of the serverElements property changes."}}, + {"Stats.serverInternalChanged":{"prefix":"Stats.serverInternalChanged","body":["Stats.serverInternalChanged"],"description":"Triggered when the value of the serverInternal property changes."}}, + {"Stats.serverLeavesChanged":{"prefix":"Stats.serverLeavesChanged","body":["Stats.serverLeavesChanged"],"description":"Triggered when the value of the serverLeaves property changes."}}, + {"Stats.localElementsChanged":{"prefix":"Stats.localElementsChanged","body":["Stats.localElementsChanged"],"description":"Triggered when the value of the localElements property changes."}}, + {"Stats.localInternalChanged":{"prefix":"Stats.localInternalChanged","body":["Stats.localInternalChanged"],"description":"Triggered when the value of the localInternal property changes."}}, + {"Stats.localLeavesChanged":{"prefix":"Stats.localLeavesChanged","body":["Stats.localLeavesChanged"],"description":"Triggered when the value of the localLeaves property changes."}}, + {"Stats.timingStatsChanged":{"prefix":"Stats.timingStatsChanged","body":["Stats.timingStatsChanged"],"description":"Triggered when the value of the timingStats property changes."}}, + {"Stats.gameUpdateStatsChanged":{"prefix":"Stats.gameUpdateStatsChanged","body":["Stats.gameUpdateStatsChanged"],"description":"Triggered when the value of the gameUpdateStats property changes."}}, + {"Stats.glContextSwapchainMemoryChanged":{"prefix":"Stats.glContextSwapchainMemoryChanged","body":["Stats.glContextSwapchainMemoryChanged"],"description":"Triggered when the value of the glContextSwapchainMemory property changes."}}, + {"Stats.qmlTextureMemoryChanged":{"prefix":"Stats.qmlTextureMemoryChanged","body":["Stats.qmlTextureMemoryChanged"],"description":"Triggered when the value of the qmlTextureMemory property changes."}}, + {"Stats.texturePendingTransfersChanged":{"prefix":"Stats.texturePendingTransfersChanged","body":["Stats.texturePendingTransfersChanged"],"description":"Triggered when the value of the texturePendingTransfers property changes."}}, + {"Stats.gpuBuffersChanged":{"prefix":"Stats.gpuBuffersChanged","body":["Stats.gpuBuffersChanged"],"description":"Triggered when the value of the gpuBuffers property changes."}}, + {"Stats.gpuBufferMemoryChanged":{"prefix":"Stats.gpuBufferMemoryChanged","body":["Stats.gpuBufferMemoryChanged"],"description":"Triggered when the value of the gpuBufferMemory property changes."}}, + {"Stats.gpuTexturesChanged":{"prefix":"Stats.gpuTexturesChanged","body":["Stats.gpuTexturesChanged"],"description":"Triggered when the value of the gpuTextures property changes."}}, + {"Stats.gpuTextureMemoryChanged":{"prefix":"Stats.gpuTextureMemoryChanged","body":["Stats.gpuTextureMemoryChanged"],"description":"Triggered when the value of the gpuTextureMemory property changes."}}, + {"Stats.gpuTextureResidentMemoryChanged":{"prefix":"Stats.gpuTextureResidentMemoryChanged","body":["Stats.gpuTextureResidentMemoryChanged"],"description":"Triggered when the value of the gpuTextureResidentMemory property changes."}}, + {"Stats.gpuTextureFramebufferMemoryChanged":{"prefix":"Stats.gpuTextureFramebufferMemoryChanged","body":["Stats.gpuTextureFramebufferMemoryChanged"],"description":"Triggered when the value of the gpuTextureFramebufferMemory property changes."}}, + {"Stats.gpuTextureResourceMemoryChanged":{"prefix":"Stats.gpuTextureResourceMemoryChanged","body":["Stats.gpuTextureResourceMemoryChanged"],"description":"Triggered when the value of the gpuTextureResourceMemory property changes."}}, + {"Stats.gpuTextureResourceIdealMemoryChanged":{"prefix":"Stats.gpuTextureResourceIdealMemoryChanged","body":["Stats.gpuTextureResourceIdealMemoryChanged"],"description":"Triggered when the value of the gpuTextureResourceIdealMemory property changes."}}, + {"Stats.gpuTextureResourcePopulatedMemoryChanged":{"prefix":"Stats.gpuTextureResourcePopulatedMemoryChanged","body":["Stats.gpuTextureResourcePopulatedMemoryChanged"],"description":"Triggered when the value of the gpuTextureResourcePopulatedMemory property changes."}}, + {"Stats.gpuTextureExternalMemoryChanged":{"prefix":"Stats.gpuTextureExternalMemoryChanged","body":["Stats.gpuTextureExternalMemoryChanged"],"description":"Triggered when the value of the gpuTextureExternalMemory property changes."}}, + {"Stats.gpuTextureMemoryPressureStateChanged":{"prefix":"Stats.gpuTextureMemoryPressureStateChanged","body":["Stats.gpuTextureMemoryPressureStateChanged"],"description":"Triggered when the value of the gpuTextureMemoryPressureState property changes."}}, + {"Stats.gpuFreeMemoryChanged":{"prefix":"Stats.gpuFreeMemoryChanged","body":["Stats.gpuFreeMemoryChanged"],"description":"Triggered when the value of the gpuFreeMemory property changes."}}, + {"Stats.gpuFrameTimeChanged":{"prefix":"Stats.gpuFrameTimeChanged","body":["Stats.gpuFrameTimeChanged"],"description":"Triggered when the value of the gpuFrameTime property changes."}}, + {"Stats.gpuFrameTimeChanged":{"prefix":"Stats.gpuFrameTimeChanged","body":["Stats.gpuFrameTimeChanged"],"description":"Triggered when the value of the gpuFrameTime property changes."}}, + {"Stats.gpuFrameTimeChanged":{"prefix":"Stats.gpuFrameTimeChanged","body":["Stats.gpuFrameTimeChanged"],"description":"Triggered when the value of the gpuFrameTime property changes."}}, + {"Stats.batchFrameTimeChanged":{"prefix":"Stats.batchFrameTimeChanged","body":["Stats.batchFrameTimeChanged"],"description":"Triggered when the value of the batchFrameTime property changes."}}, + {"Stats.engineFrameTimeChanged":{"prefix":"Stats.engineFrameTimeChanged","body":["Stats.engineFrameTimeChanged"],"description":"Triggered when the value of the engineFrameTime property changes."}}, + {"Stats.avatarSimulationTimeChanged":{"prefix":"Stats.avatarSimulationTimeChanged","body":["Stats.avatarSimulationTimeChanged"],"description":"Triggered when the value of the avatarSimulationTime property changes."}}, + {"Stats.rectifiedTextureCountChanged":{"prefix":"Stats.rectifiedTextureCountChanged","body":["Stats.rectifiedTextureCountChanged"],"description":"Triggered when the value of the rectifiedTextureCount property changes."}}, + {"Stats.decimatedTextureCountChanged":{"prefix":"Stats.decimatedTextureCountChanged","body":["Stats.decimatedTextureCountChanged"],"description":"Triggered when the value of the decimatedTextureCount property changes."}}, + {"Stats.parentChanged":{"prefix":"Stats.parentChanged","body":["Stats.parentChanged(${1:parent: object})"],"description":"Triggered when the parent item changes."}}, + {"Stats.xChanged":{"prefix":"Stats.xChanged","body":["Stats.xChanged"],"description":"Triggered when the value of the x property changes."}}, + {"Stats.yChanged":{"prefix":"Stats.yChanged","body":["Stats.yChanged"],"description":"Triggered when the value of the y property changes."}}, + {"Stats.zChanged":{"prefix":"Stats.zChanged","body":["Stats.zChanged"],"description":"Triggered when the value of the z property changes."}}, + {"Stats.widthChanged":{"prefix":"Stats.widthChanged","body":["Stats.widthChanged"],"description":"Triggered when the value of the width property changes."}}, + {"Stats.heightChanged":{"prefix":"Stats.heightChanged","body":["Stats.heightChanged"],"description":"Triggered when the value of the height property changes."}}, + {"Stats.opacityChanged":{"prefix":"Stats.opacityChanged","body":["Stats.opacityChanged"],"description":"Triggered when the value of the opacity property changes."}}, + {"Stats.enabledChanged":{"prefix":"Stats.enabledChanged","body":["Stats.enabledChanged"],"description":"Triggered when the value of the enabled property changes."}}, + {"Stats.visibleChanged":{"prefix":"Stats.visibleChanged","body":["Stats.visibleChanged"],"description":"Triggered when the value of the visibleChanged property changes."}}, + {"Stats.visibleChildrenChanged":{"prefix":"Stats.visibleChildrenChanged","body":["Stats.visibleChildrenChanged"],"description":"Triggered when the list of visible children changes."}}, + {"Stats.stateChanged":{"prefix":"Stats.stateChanged","body":["Stats.stateChanged"],"description":"Triggered when the value of the state property changes."}}, + {"Stats.childrenRectChanged":{"prefix":"Stats.childrenRectChanged","body":["Stats.childrenRectChanged(${1:childrenRect: Rect})"],"description":"Triggered when the position and size of the rectangle containing the children changes."}}, + {"Stats.baselineOffsetChanged":{"prefix":"Stats.baselineOffsetChanged","body":["Stats.baselineOffsetChanged(${1:baselineOffset: number})"],"description":"Triggered when the value of the baselineOffset property changes."}}, + {"Stats.clipChanged":{"prefix":"Stats.clipChanged","body":["Stats.clipChanged(${1:clip: boolean})"],"description":"Triggered when the value of the clip property changes."}}, + {"Stats.focusChanged":{"prefix":"Stats.focusChanged","body":["Stats.focusChanged(${1:focus: boolean})"],"description":"Triggered when the value of the focus property changes."}}, + {"Stats.activeFocusChanged":{"prefix":"Stats.activeFocusChanged","body":["Stats.activeFocusChanged(${1:activeFocus: boolean})"],"description":"Triggered when the value of the activeFocus property changes."}}, + {"Stats.activeFocusOnTabChanged":{"prefix":"Stats.activeFocusOnTabChanged","body":["Stats.activeFocusOnTabChanged(${1:activeFocusOnTab: boolean})"],"description":"Triggered when the value of the activeFocusOnTab property changes."}}, + {"Stats.rotationChanged":{"prefix":"Stats.rotationChanged","body":["Stats.rotationChanged"],"description":"Triggered when the value of the rotation property changes."}}, + {"Stats.scaleChanged":{"prefix":"Stats.scaleChanged","body":["Stats.scaleChanged"],"description":"Triggered when the value of the scaleChanged property changes."}}, + {"Stats.transformOriginChanged":{"prefix":"Stats.transformOriginChanged","body":["Stats.transformOriginChanged(${1:transformOrigin: number})"],"description":"Triggered when the value of the transformOrigin property changes."}}, + {"Stats.smoothChanged":{"prefix":"Stats.smoothChanged","body":["Stats.smoothChanged(${1:smooth: boolean})"],"description":"Triggered when the value of the smooth property changes."}}, + {"Stats.antialiasingChanged":{"prefix":"Stats.antialiasingChanged","body":["Stats.antialiasingChanged(${1:antialiasing: boolean})"],"description":"Triggered when the value of the antialiasing property changes."}}, + {"Stats.implicitWidthChanged":{"prefix":"Stats.implicitWidthChanged","body":["Stats.implicitWidthChanged"],"description":"Triggered when the value of the implicitWidth property changes."}}, + {"Stats.implicitHeightChanged":{"prefix":"Stats.implicitHeightChanged","body":["Stats.implicitHeightChanged"],"description":"Triggered when the value of the implicitHeight property changes."}}, + {"Stats.windowChanged":{"prefix":"Stats.windowChanged","body":["Stats.windowChanged(${1:window: object})"]}}, + {"Stats.grabToImage":{"prefix":"Stats.grabToImage","body":["Stats.grabToImage(${1:callback: object},${2:targetSize: Size})"]}}, + {"Stats.contains":{"prefix":"Stats.contains","body":["Stats.contains(${1:point: Vec2})"]}}, + {"Stats.mapFromItem":{"prefix":"Stats.mapFromItem","body":["Stats.mapFromItem(${1:item: object})"]}}, + {"Stats.mapToItem":{"prefix":"Stats.mapToItem","body":["Stats.mapToItem(${1:item: object})"]}}, + {"Stats.mapFromGlobal":{"prefix":"Stats.mapFromGlobal","body":["Stats.mapFromGlobal(${1:global: object})"]}}, + {"Stats.mapToGlobal":{"prefix":"Stats.mapToGlobal","body":["Stats.mapToGlobal(${1:global: object})"]}}, + {"Stats.forceActiveFocus":{"prefix":"Stats.forceActiveFocus","body":["Stats.forceActiveFocus(${1:reason: number})"]}}, + {"Stats.nextItemInFocusChain":{"prefix":"Stats.nextItemInFocusChain","body":["Stats.nextItemInFocusChain(${1:forward: boolean})"]}}, + {"Stats.childAt":{"prefix":"Stats.childAt","body":["Stats.childAt(${1:x: number},${2:y: number})"]}}, + {"Stats.update":{"prefix":"Stats.update","body":["Stats.update"]}}, + {"Stats.stylusPicksCountChanged":{"prefix":"Stats.stylusPicksCountChanged","body":["Stats.stylusPicksCountChanged"],"description":"Triggered when the value of the stylusPicksCount property changes."}}, + {"Stats.rayPicksCountChanged":{"prefix":"Stats.rayPicksCountChanged","body":["Stats.rayPicksCountChanged"],"description":"Triggered when the value of the rayPicksCount property changes."}}, + {"Stats.parabolaPicksCountChanged":{"prefix":"Stats.parabolaPicksCountChanged","body":["Stats.parabolaPicksCountChanged"],"description":"Triggered when the value of the parabolaPicksCount property changes."}}, + {"Stats.collisionPicksCountChanged":{"prefix":"Stats.collisionPicksCountChanged","body":["Stats.collisionPicksCountChanged"],"description":"Triggered when the value of the collisionPicksCount property changes."}}, + {"Stats.stylusPicksUpdatedChanged":{"prefix":"Stats.stylusPicksUpdatedChanged","body":["Stats.stylusPicksUpdatedChanged"],"description":"Triggered when the value of the stylusPicksUpdated property changes."}}, + {"Stats.rayPicksUpdatedChanged":{"prefix":"Stats.rayPicksUpdatedChanged","body":["Stats.rayPicksUpdatedChanged"],"description":"Triggered when the value of the rayPicksUpdated property changes."}}, + {"Stats.parabolaPicksUpdatedChanged":{"prefix":"Stats.parabolaPicksUpdatedChanged","body":["Stats.parabolaPicksUpdatedChanged"],"description":"Triggered when the value of the parabolaPicksUpdated property changes."}}, + {"Stats.collisionPicksUpdatedChanged":{"prefix":"Stats.collisionPicksUpdatedChanged","body":["Stats.collisionPicksUpdatedChanged"],"description":"Triggered when the value of the collisionPicksUpdated property changes."}}, + {"Overlays.Circle3DProperties":{"prefix":"Overlays.Circle3DProperties","body":["Overlays.Circle3DProperties"],"description":"These are the properties of a circle3d {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.CubeProperties":{"prefix":"Overlays.CubeProperties","body":["Overlays.CubeProperties"],"description":"These are the properties of a cube {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.GridProperties":{"prefix":"Overlays.GridProperties","body":["Overlays.GridProperties"],"description":"These are the properties of a grid {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.Image3DProperties":{"prefix":"Overlays.Image3DProperties","body":["Overlays.Image3DProperties"],"description":"These are the properties of an image3d {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.ImageProperties":{"prefix":"Overlays.ImageProperties","body":["Overlays.ImageProperties"],"description":"These are the properties of an image {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.Line3DProperties":{"prefix":"Overlays.Line3DProperties","body":["Overlays.Line3DProperties"],"description":"These are the properties of a line3d {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.ModelProperties":{"prefix":"Overlays.ModelProperties","body":["Overlays.ModelProperties"],"description":"These are the properties of a model {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.OverlayType":{"prefix":"Overlays.OverlayType","body":["Overlays.OverlayType"],"description":"

An overlay may be one of the following types:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
Value2D/3DDescription
circle3d3DA circle.
cube3DA cube. Can also use a shape overlay to create a \r cube.
grid3DA grid of lines in a plane.
image2DAn image. Synonym: billboard.
image3d3DAn image.
line3d3DA line.
model3DA model.
rectangle2DA rectangle.
rectangle3d3DA rectangle.
shape3DA geometric shape, such as a cube, sphere, or cylinder.
sphere3DA sphere. Can also use a shape overlay to create a \r sphere.
text2DText.
text3d3DText.
web3d3DWeb content.
\r

2D overlays are rendered on the display surface in desktop mode and on the HUD surface in HMD mode. 3D overlays are\rrendered at a position and orientation in-world.

\r

Each overlay type has different {@link Overlays.OverlayProperties|OverlayProperties}.

"}}, + {"Overlays.OverlayProperties":{"prefix":"Overlays.OverlayProperties","body":["Overlays.OverlayProperties"],"description":"

Different overlay types have different properties:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
{@link Overlays.OverlayType|OverlayType}Overlay Properties
circle3d{@link Overlays.Circle3DProperties|Circle3DProperties}
cube{@link Overlays.CubeProperties|CubeProperties}
grid{@link Overlays.GridProperties|GridProperties}
image{@link Overlays.ImageProperties|ImageProperties}
image3d{@link Overlays.Image3DProperties|Image3DProperties}
line3d{@link Overlays.Line3DProperties|Line3DProperties}
model{@link Overlays.ModelProperties|ModelProperties}
rectangle{@link Overlays.RectangleProperties|RectangleProperties}
rectangle3d{@link Overlays.Rectangle3DProperties|Rectangle3DProperties}
shape{@link Overlays.ShapeProperties|ShapeProperties}
sphere{@link Overlays.SphereProperties|SphereProperties}
text{@link Overlays.TextProperties|TextProperties}
text3d{@link Overlays.Text3DProperties|Text3DProperties}
web3d{@link Overlays.Web3DProperties|Web3DProperties}
"}}, + {"Overlays.RayToOverlayIntersectionResult":{"prefix":"Overlays.RayToOverlayIntersectionResult","body":["Overlays.RayToOverlayIntersectionResult"],"description":"The result of a {@link PickRay} search using {@link Overlays.findRayIntersection|findRayIntersection} or \r{@link Overlays.findRayIntersectionVector|findRayIntersectionVector}."}}, + {"Overlays":{"prefix":"Overlays","body":["Overlays"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Overlays API provides facilities to create and interact with overlays. Overlays are 2D and 3D objects visible only to\ryourself and that aren't persisted to the domain. They are used for UI."}}, + {"Overlays.addOverlay":{"prefix":"Overlays.addOverlay","body":["Overlays.addOverlay(${1:type: Overlays.OverlayType},${2:properties: Overlays.OverlayProperties})"],"description":"Add an overlay to the scene."}}, + {"Overlays.cloneOverlay":{"prefix":"Overlays.cloneOverlay","body":["Overlays.cloneOverlay(${1:overlayID: Uuid})"],"description":"Create a clone of an existing overlay."}}, + {"Overlays.editOverlay":{"prefix":"Overlays.editOverlay","body":["Overlays.editOverlay(${1:overlayID: Uuid},${2:properties: Overlays.OverlayProperties})"],"description":"Edit an overlay's properties."}}, + {"Overlays.editOverlays":{"prefix":"Overlays.editOverlays","body":["Overlays.editOverlays(${1:propertiesById: object.})"],"description":"Edit multiple overlays' properties."}}, + {"Overlays.deleteOverlay":{"prefix":"Overlays.deleteOverlay","body":["Overlays.deleteOverlay(${1:overlayID: Uuid})"],"description":"Delete an overlay."}}, + {"Overlays.getOverlayType":{"prefix":"Overlays.getOverlayType","body":["Overlays.getOverlayType(${1:overlayID: Uuid})"],"description":"Get the type of an overlay."}}, + {"Overlays.getOverlayObject":{"prefix":"Overlays.getOverlayObject","body":["Overlays.getOverlayObject(${1:overlayID: Uuid})"],"description":"Get the overlay script object. In particular, this is useful for accessing the event bridge for a web3d \roverlay."}}, + {"Overlays.getOverlayAtPoint":{"prefix":"Overlays.getOverlayAtPoint","body":["Overlays.getOverlayAtPoint(${1:point: Vec2})"],"description":"Get the ID of the 2D overlay at a particular point on the screen or HUD."}}, + {"Overlays.getProperty":{"prefix":"Overlays.getProperty","body":["Overlays.getProperty(${1:overlayID: Uuid},${2:property: string})"],"description":"Get the value of a 3D overlay's property."}}, + {"Overlays.getProperties":{"prefix":"Overlays.getProperties","body":["Overlays.getProperties(${1:overlayID: Uuid},${2:properties: Array.})"],"description":"Get the values of an overlay's properties."}}, + {"Overlays.getOverlaysProperties":{"prefix":"Overlays.getOverlaysProperties","body":["Overlays.getOverlaysProperties(${1:propertiesById: object.>})"],"description":"Get the values of multiple overlays' properties."}}, + {"Overlays.findRayIntersection":{"prefix":"Overlays.findRayIntersection","body":["Overlays.findRayIntersection(${1:pickRay: PickRay},${2:precisionPicking: boolean},${3:overlayIDsToInclude: Array.},${4:overlayIDsToExclude: Array.},${5:visibleOnly: boolean},${6:collidableOnly: boolean})"],"description":"Find the closest 3D overlay intersected by a {@link PickRay}."}}, + {"Overlays.findOverlays":{"prefix":"Overlays.findOverlays","body":["Overlays.findOverlays(${1:center: Vec3},${2:radius: number})"],"description":"Return a list of 3D overlays with bounding boxes that touch a search sphere."}}, + {"Overlays.isLoaded":{"prefix":"Overlays.isLoaded","body":["Overlays.isLoaded(${1:overlayID: Uuid})"],"description":"Check whether an overlay's assets have been loaded. For example, for an image overlay the result indicates\rwhether its image has been loaded."}}, + {"Overlays.textSize":{"prefix":"Overlays.textSize","body":["Overlays.textSize(${1:overlayID: Uuid},${2:text: string})"],"description":"Calculates the size of the given text in the specified overlay if it is a text overlay."}}, + {"Overlays.width":{"prefix":"Overlays.width","body":["Overlays.width"],"description":"Get the width of the window or HUD."}}, + {"Overlays.height":{"prefix":"Overlays.height","body":["Overlays.height"],"description":"Get the height of the window or HUD."}}, + {"Overlays.isAddedOverlay":{"prefix":"Overlays.isAddedOverlay","body":["Overlays.isAddedOverlay(${1:overlayID: Uuid})"],"description":"Check if there is an overlay of a given ID."}}, + {"Overlays.sendMousePressOnOverlay":{"prefix":"Overlays.sendMousePressOnOverlay","body":["Overlays.sendMousePressOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Generate a mouse press event on an overlay."}}, + {"Overlays.sendMouseReleaseOnOverlay":{"prefix":"Overlays.sendMouseReleaseOnOverlay","body":["Overlays.sendMouseReleaseOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Generate a mouse release event on an overlay."}}, + {"Overlays.sendMouseMoveOnOverlay":{"prefix":"Overlays.sendMouseMoveOnOverlay","body":["Overlays.sendMouseMoveOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Generate a mouse move event on an overlay."}}, + {"Overlays.sendHoverEnterOverlay":{"prefix":"Overlays.sendHoverEnterOverlay","body":["Overlays.sendHoverEnterOverlay(${1:id: Uuid},${2:event: PointerEvent})"],"description":"Generate a hover enter event on an overlay."}}, + {"Overlays.sendHoverOverOverlay":{"prefix":"Overlays.sendHoverOverOverlay","body":["Overlays.sendHoverOverOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Generate a hover over event on an overlay."}}, + {"Overlays.sendHoverLeaveOverlay":{"prefix":"Overlays.sendHoverLeaveOverlay","body":["Overlays.sendHoverLeaveOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Generate a hover leave event on an overlay."}}, + {"Overlays.getKeyboardFocusOverlay":{"prefix":"Overlays.getKeyboardFocusOverlay","body":["Overlays.getKeyboardFocusOverlay"],"description":"Get the ID of the Web3D overlay that has keyboard focus."}}, + {"Overlays.setKeyboardFocusOverlay":{"prefix":"Overlays.setKeyboardFocusOverlay","body":["Overlays.setKeyboardFocusOverlay(${1:overlayID: Uuid})"],"description":"Set the Web3D overlay that has keyboard focus."}}, + {"Overlays.overlayDeleted":{"prefix":"Overlays.overlayDeleted","body":["Overlays.overlayDeleted(${1:overlayID: Uuid})"],"description":"Triggered when an overlay is deleted."}}, + {"Overlays.mousePressOnOverlay":{"prefix":"Overlays.mousePressOnOverlay","body":["Overlays.mousePressOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse press event occurs on an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendMousePressOnOverlay|sendMousePressOnOverlay} for a 2D overlay)."}}, + {"Overlays.mouseDoublePressOnOverlay":{"prefix":"Overlays.mouseDoublePressOnOverlay","body":["Overlays.mouseDoublePressOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse double press event occurs on an overlay. Only occurs for 3D overlays."}}, + {"Overlays.mouseReleaseOnOverlay":{"prefix":"Overlays.mouseReleaseOnOverlay","body":["Overlays.mouseReleaseOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse release event occurs on an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendMouseReleaseOnOverlay|sendMouseReleaseOnOverlay} for a 2D overlay)."}}, + {"Overlays.mouseMoveOnOverlay":{"prefix":"Overlays.mouseMoveOnOverlay","body":["Overlays.mouseMoveOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse move event occurs on an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendMouseMoveOnOverlay|sendMouseMoveOnOverlay} for a 2D overlay)."}}, + {"Overlays.mousePressOffOverlay":{"prefix":"Overlays.mousePressOffOverlay","body":["Overlays.mousePressOffOverlay"],"description":"Triggered when a mouse press event occurs on something other than a 3D overlay."}}, + {"Overlays.mouseDoublePressOffOverlay":{"prefix":"Overlays.mouseDoublePressOffOverlay","body":["Overlays.mouseDoublePressOffOverlay"],"description":"Triggered when a mouse double press event occurs on something other than a 3D overlay."}}, + {"Overlays.hoverEnterOverlay":{"prefix":"Overlays.hoverEnterOverlay","body":["Overlays.hoverEnterOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse cursor starts hovering over an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendHoverEnterOverlay|sendHoverEnterOverlay} for a 2D overlay)."}}, + {"Overlays.hoverOverOverlay":{"prefix":"Overlays.hoverOverOverlay","body":["Overlays.hoverOverOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse cursor continues hovering over an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendHoverOverOverlay|sendHoverOverOverlay} for a 2D overlay)."}}, + {"Overlays.hoverLeaveOverlay":{"prefix":"Overlays.hoverLeaveOverlay","body":["Overlays.hoverLeaveOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse cursor finishes hovering over an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendHoverLeaveOverlay|sendHoverLeaveOverlay} for a 2D overlay)."}}, + {"Overlays.Rectangle3DProperties":{"prefix":"Overlays.Rectangle3DProperties","body":["Overlays.Rectangle3DProperties"],"description":"These are the properties of a rectangle3d {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.RectangleProperties":{"prefix":"Overlays.RectangleProperties","body":["Overlays.RectangleProperties"],"description":"These are the properties of a rectangle {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.Shape":{"prefix":"Overlays.Shape","body":["Overlays.Shape"],"description":"

A shape {@link Overlays.OverlayType|OverlayType} may display as one of the following geometrical shapes:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDimensionsDescription
\"Circle\"2DA circle oriented in 3D.
\"Cone\"3D
\"Cube\"3D
\"Cylinder\"3D
\"Dodecahedron\"3D
\"Hexagon\"3DA hexagonal prism.
\"Icosahedron\"3D
\"Line\"1DA line oriented in 3D.
\"Octagon\"3DAn octagonal prism.
\"Octahedron\"3D
\"Quad\"2DA square oriented in 3D.
\"Sphere\"3D
\"Tetrahedron\"3D
\"Torus\"3DNot implemented.
\"Triangle\"3DA triangular prism.
"}}, + {"Overlays.ShapeProperties":{"prefix":"Overlays.ShapeProperties","body":["Overlays.ShapeProperties"],"description":"These are the properties of a shape {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.SphereProperties":{"prefix":"Overlays.SphereProperties","body":["Overlays.SphereProperties"],"description":"These are the properties of a sphere {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.Text3DProperties":{"prefix":"Overlays.Text3DProperties","body":["Overlays.Text3DProperties"],"description":"These are the properties of a text3d {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.TextProperties":{"prefix":"Overlays.TextProperties","body":["Overlays.TextProperties"],"description":"These are the properties of a text {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.Web3DProperties":{"prefix":"Overlays.Web3DProperties","body":["Overlays.Web3DProperties"],"description":"These are the properties of a web3d {@link Overlays.OverlayType|OverlayType}."}}, + {"AnimationObject":{"prefix":"AnimationObject","body":["AnimationObject"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"AnimationObject.getJointNames":{"prefix":"AnimationObject.getJointNames","body":["AnimationObject.getJointNames"]}}, + {"AnimationObject.getFrames":{"prefix":"AnimationObject.getFrames","body":["AnimationObject.getFrames"]}}, + {"AnimationCache":{"prefix":"AnimationCache","body":["AnimationCache"],"description":"
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

API to manage animation cache resources."}}, + {"AnimationCache.getAnimation":{"prefix":"AnimationCache.getAnimation","body":["AnimationCache.getAnimation(${1:url: string})"],"description":"Returns animation resource for particular animation."}}, + {"AudioStats.AudioStreamStats":{"prefix":"AudioStats.AudioStreamStats","body":["AudioStats.AudioStreamStats"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"AudioStats.AudioStreamStats.lossRateChanged":{"prefix":"AudioStats.AudioStreamStats.lossRateChanged","body":["AudioStats.AudioStreamStats.lossRateChanged(${1:lossRate: number})"]}}, + {"AudioStats.AudioStreamStats.lossCountChanged":{"prefix":"AudioStats.AudioStreamStats.lossCountChanged","body":["AudioStats.AudioStreamStats.lossCountChanged(${1:lossCount: number})"]}}, + {"AudioStats.AudioStreamStats.lossRateWindowChanged":{"prefix":"AudioStats.AudioStreamStats.lossRateWindowChanged","body":["AudioStats.AudioStreamStats.lossRateWindowChanged(${1:lossRateWindow: number})"]}}, + {"AudioStats.AudioStreamStats.lossCountWindowChanged":{"prefix":"AudioStats.AudioStreamStats.lossCountWindowChanged","body":["AudioStats.AudioStreamStats.lossCountWindowChanged(${1:lossCountWindow: number})"]}}, + {"AudioStats.AudioStreamStats.framesDesiredChanged":{"prefix":"AudioStats.AudioStreamStats.framesDesiredChanged","body":["AudioStats.AudioStreamStats.framesDesiredChanged(${1:framesDesired: number})"]}}, + {"AudioStats.AudioStreamStats.framesAvailableChanged":{"prefix":"AudioStats.AudioStreamStats.framesAvailableChanged","body":["AudioStats.AudioStreamStats.framesAvailableChanged(${1:framesAvailable: number})"]}}, + {"AudioStats.AudioStreamStats.framesAvailableAvgChanged":{"prefix":"AudioStats.AudioStreamStats.framesAvailableAvgChanged","body":["AudioStats.AudioStreamStats.framesAvailableAvgChanged(${1:framesAvailableAvg: number})"]}}, + {"AudioStats.AudioStreamStats.unplayedMsMaxChanged":{"prefix":"AudioStats.AudioStreamStats.unplayedMsMaxChanged","body":["AudioStats.AudioStreamStats.unplayedMsMaxChanged(${1:unplayedMsMax: number})"]}}, + {"AudioStats.AudioStreamStats.starveCountChanged":{"prefix":"AudioStats.AudioStreamStats.starveCountChanged","body":["AudioStats.AudioStreamStats.starveCountChanged(${1:starveCount: number})"]}}, + {"AudioStats.AudioStreamStats.lastStarveDurationCountChanged":{"prefix":"AudioStats.AudioStreamStats.lastStarveDurationCountChanged","body":["AudioStats.AudioStreamStats.lastStarveDurationCountChanged(${1:lastStarveDurationCount: number})"]}}, + {"AudioStats.AudioStreamStats.dropCountChanged":{"prefix":"AudioStats.AudioStreamStats.dropCountChanged","body":["AudioStats.AudioStreamStats.dropCountChanged(${1:dropCount: number})"]}}, + {"AudioStats.AudioStreamStats.overflowCountChanged":{"prefix":"AudioStats.AudioStreamStats.overflowCountChanged","body":["AudioStats.AudioStreamStats.overflowCountChanged(${1:overflowCount: number})"]}}, + {"AudioStats.AudioStreamStats.timegapMsMaxChanged":{"prefix":"AudioStats.AudioStreamStats.timegapMsMaxChanged","body":["AudioStats.AudioStreamStats.timegapMsMaxChanged(${1:timegapMsMax: number})"]}}, + {"AudioStats.AudioStreamStats.timegapMsAvgChanged":{"prefix":"AudioStats.AudioStreamStats.timegapMsAvgChanged","body":["AudioStats.AudioStreamStats.timegapMsAvgChanged(${1:timegapMsAvg: number})"]}}, + {"AudioStats.AudioStreamStats.timegapMsMaxWindowChanged":{"prefix":"AudioStats.AudioStreamStats.timegapMsMaxWindowChanged","body":["AudioStats.AudioStreamStats.timegapMsMaxWindowChanged(${1:timegapMsMaxWindow: number})"]}}, + {"AudioStats.AudioStreamStats.timegapMsAvgWindowChanged":{"prefix":"AudioStats.AudioStreamStats.timegapMsAvgWindowChanged","body":["AudioStats.AudioStreamStats.timegapMsAvgWindowChanged(${1:timegapMsAvgWindow: number})"]}}, + {"AudioStats":{"prefix":"AudioStats","body":["AudioStats"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Audio stats from the client."}}, + {"AudioStats.pingMsChanged":{"prefix":"AudioStats.pingMsChanged","body":["AudioStats.pingMsChanged(${1:pingMs: number})"]}}, + {"AudioStats.inputReadMsMaxChanged":{"prefix":"AudioStats.inputReadMsMaxChanged","body":["AudioStats.inputReadMsMaxChanged(${1:inputReadMsMax: number})"]}}, + {"AudioStats.inputUnplayedMsMaxChanged":{"prefix":"AudioStats.inputUnplayedMsMaxChanged","body":["AudioStats.inputUnplayedMsMaxChanged(${1:inputUnplayedMsMax: number})"]}}, + {"AudioStats.outputUnplayedMsMaxChanged":{"prefix":"AudioStats.outputUnplayedMsMaxChanged","body":["AudioStats.outputUnplayedMsMaxChanged(${1:outputUnplayedMsMax: number})"]}}, + {"AudioStats.sentTimegapMsMaxChanged":{"prefix":"AudioStats.sentTimegapMsMaxChanged","body":["AudioStats.sentTimegapMsMaxChanged(${1:sentTimegapMsMax: number})"]}}, + {"AudioStats.sentTimegapMsAvgChanged":{"prefix":"AudioStats.sentTimegapMsAvgChanged","body":["AudioStats.sentTimegapMsAvgChanged(${1:sentTimegapMsAvg: number})"]}}, + {"AudioStats.sentTimegapMsMaxWindowChanged":{"prefix":"AudioStats.sentTimegapMsMaxWindowChanged","body":["AudioStats.sentTimegapMsMaxWindowChanged(${1:sentTimegapMsMaxWindow: number})"]}}, + {"AudioStats.sentTimegapMsAvgWindowChanged":{"prefix":"AudioStats.sentTimegapMsAvgWindowChanged","body":["AudioStats.sentTimegapMsAvgWindowChanged(${1:sentTimegapMsAvgWindow: number})"]}}, + {"AudioStats.mixerStreamChanged":{"prefix":"AudioStats.mixerStreamChanged","body":["AudioStats.mixerStreamChanged"]}}, + {"AudioStats.clientStreamChanged":{"prefix":"AudioStats.clientStreamChanged","body":["AudioStats.clientStreamChanged"]}}, + {"AudioStats.injectorStreamsChanged":{"prefix":"AudioStats.injectorStreamsChanged","body":["AudioStats.injectorStreamsChanged"]}}, + {"AudioEffectOptions.ReverbOptions":{"prefix":"AudioEffectOptions.ReverbOptions","body":["AudioEffectOptions.ReverbOptions"],"description":"Reverberation options that can be used to initialize an {@link AudioEffectOptions} object when created."}}, + {"AudioEffectOptions":{"prefix":"AudioEffectOptions","body":["AudioEffectOptions(${1:reverbOptions: AudioEffectOptions.ReverbOptions})"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

Audio effect options used by the {@link Audio} API.\r\r

Create using new AudioEffectOptions(reverbOptions).

"}}, + {"AudioInjector.AudioInjectorOptions":{"prefix":"AudioInjector.AudioInjectorOptions","body":["AudioInjector.AudioInjectorOptions"],"description":"Configures how an audio injector plays its audio."}}, + {"SoundObject":{"prefix":"SoundObject","body":["SoundObject"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

An audio resource, created by {@link SoundCache.getSound}, to be played back using {@link Audio.playSound}.\r

Supported formats:

\r
    \r
  • WAV: 16-bit uncompressed WAV at any sample rate, with 1 (mono), 2(stereo), or 4 (ambisonic) channels.
  • \r
  • MP3: Mono or stereo, at any sample rate.
  • \r
  • RAW: 48khz 16-bit mono or stereo. Filename must include \".stereo\" to be interpreted as stereo.
  • \r
"}}, + {"SoundObject.ready":{"prefix":"SoundObject.ready","body":["SoundObject.ready"],"description":"Triggered when the sound has been downloaded and is ready to be played."}}, + {"SoundCache":{"prefix":"SoundCache","body":["SoundCache"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

API to manage sound cache resources."}}, + {"SoundCache.getSound":{"prefix":"SoundCache.getSound","body":["SoundCache.getSound(${1:url: string})"],"description":"Loads the content of an audio file into a {@link SoundObject}, ready for playback by {@link Audio.playSound}."}}, + {"AttachmentData":{"prefix":"AttachmentData","body":["AttachmentData"]}}, + {"MyAvatar.getDomainMinScale":{"prefix":"MyAvatar.getDomainMinScale","body":["MyAvatar.getDomainMinScale"],"description":"Returns the minimum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains."}}, + {"MyAvatar.getDomainMaxScale":{"prefix":"MyAvatar.getDomainMaxScale","body":["MyAvatar.getDomainMaxScale"],"description":"Returns the maximum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains."}}, + {"MyAvatar.getEyeHeight":{"prefix":"MyAvatar.getEyeHeight","body":["MyAvatar.getEyeHeight"],"description":"Provides read only access to the current eye height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints."}}, + {"MyAvatar.getHeight":{"prefix":"MyAvatar.getHeight","body":["MyAvatar.getHeight"],"description":"Provides read only access to the current height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints."}}, + {"MyAvatar.setHandState":{"prefix":"MyAvatar.setHandState","body":["MyAvatar.setHandState(${1:state: string})"]}}, + {"MyAvatar.getHandState":{"prefix":"MyAvatar.getHandState","body":["MyAvatar.getHandState"]}}, + {"MyAvatar.setRawJointData":{"prefix":"MyAvatar.setRawJointData","body":["MyAvatar.setRawJointData(${1:data: Array.})"]}}, + {"MyAvatar.setJointData":{"prefix":"MyAvatar.setJointData","body":["MyAvatar.setJointData(${1:index: number},${2:rotation: Quat},${3:translation: Vec3})"],"description":"Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.setJointRotation":{"prefix":"MyAvatar.setJointRotation","body":["MyAvatar.setJointRotation(${1:index: number},${2:rotation: Quat})"],"description":"Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.setJointTranslation":{"prefix":"MyAvatar.setJointTranslation","body":["MyAvatar.setJointTranslation(${1:index: number},${2:translation: Vec3})"],"description":"Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.clearJointData":{"prefix":"MyAvatar.clearJointData","body":["MyAvatar.clearJointData(${1:index: number})"],"description":"Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly faster than the function variation that specifies the joint name.

"}}, + {"MyAvatar.isJointDataValid":{"prefix":"MyAvatar.isJointDataValid","body":["MyAvatar.isJointDataValid(${1:index: number})"]}}, + {"MyAvatar.getJointRotation":{"prefix":"MyAvatar.getJointRotation","body":["MyAvatar.getJointRotation(${1:index: number})"],"description":"Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"MyAvatar.getJointTranslation":{"prefix":"MyAvatar.getJointTranslation","body":["MyAvatar.getJointTranslation(${1:index: number})"],"description":"Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"MyAvatar.setJointData":{"prefix":"MyAvatar.setJointData","body":["MyAvatar.setJointData(${1:name: string},${2:rotation: Quat},${3:translation: Vec3})"],"description":"Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.setJointRotation":{"prefix":"MyAvatar.setJointRotation","body":["MyAvatar.setJointRotation(${1:name: string},${2:rotation: Quat})"],"description":"Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.setJointTranslation":{"prefix":"MyAvatar.setJointTranslation","body":["MyAvatar.setJointTranslation(${1:name: string},${2:translation: Vec3})"],"description":"Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.clearJointData":{"prefix":"MyAvatar.clearJointData","body":["MyAvatar.clearJointData(${1:name: string})"],"description":"Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly slower than the function variation that specifies the joint index.

"}}, + {"MyAvatar.isJointDataValid":{"prefix":"MyAvatar.isJointDataValid","body":["MyAvatar.isJointDataValid(${1:name: string})"]}}, + {"MyAvatar.getJointRotation":{"prefix":"MyAvatar.getJointRotation","body":["MyAvatar.getJointRotation(${1:name: string})"],"description":"Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"MyAvatar.getJointTranslation":{"prefix":"MyAvatar.getJointTranslation","body":["MyAvatar.getJointTranslation(${1:name: number})"],"description":"Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"MyAvatar.getJointRotations":{"prefix":"MyAvatar.getJointRotations","body":["MyAvatar.getJointRotations"],"description":"Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint."}}, + {"MyAvatar.getJointTranslations":{"prefix":"MyAvatar.getJointTranslations","body":["MyAvatar.getJointTranslations"]}}, + {"MyAvatar.setJointRotations":{"prefix":"MyAvatar.setJointRotations","body":["MyAvatar.setJointRotations(${1:jointRotations: Array.})"],"description":"Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse\rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,\rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate\rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set\rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.setJointTranslations":{"prefix":"MyAvatar.setJointTranslations","body":["MyAvatar.setJointTranslations(${1:translations: Array.})"]}}, + {"MyAvatar.clearJointsData":{"prefix":"MyAvatar.clearJointsData","body":["MyAvatar.clearJointsData"],"description":"Clear all joint translations and rotations that have been set by script. This restores all motion from the default \ranimation system including inverse kinematics for all joints."}}, + {"MyAvatar.getJointIndex":{"prefix":"MyAvatar.getJointIndex","body":["MyAvatar.getJointIndex(${1:name: string})"],"description":"Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by \r{@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}."}}, + {"MyAvatar.getJointNames":{"prefix":"MyAvatar.getJointNames","body":["MyAvatar.getJointNames"],"description":"Get the names of all the joints in the current avatar."}}, + {"MyAvatar.setBlendshape":{"prefix":"MyAvatar.setBlendshape","body":["MyAvatar.setBlendshape(${1:name: string},${2:value: number})"]}}, + {"MyAvatar.getAttachmentsVariant":{"prefix":"MyAvatar.getAttachmentsVariant","body":["MyAvatar.getAttachmentsVariant"]}}, + {"MyAvatar.setAttachmentsVariant":{"prefix":"MyAvatar.setAttachmentsVariant","body":["MyAvatar.setAttachmentsVariant(${1:variant: object})"]}}, + {"MyAvatar.updateAvatarEntity":{"prefix":"MyAvatar.updateAvatarEntity","body":["MyAvatar.updateAvatarEntity(${1:entityID: Uuid},${2:entityData: string})"]}}, + {"MyAvatar.clearAvatarEntity":{"prefix":"MyAvatar.clearAvatarEntity","body":["MyAvatar.clearAvatarEntity(${1:entityID: Uuid})"]}}, + {"MyAvatar.setForceFaceTrackerConnected":{"prefix":"MyAvatar.setForceFaceTrackerConnected","body":["MyAvatar.setForceFaceTrackerConnected(${1:connected: boolean})"]}}, + {"MyAvatar.getAttachmentData":{"prefix":"MyAvatar.getAttachmentData","body":["MyAvatar.getAttachmentData"],"description":"Get information about all models currently attached to your avatar."}}, + {"MyAvatar.setAttachmentData":{"prefix":"MyAvatar.setAttachmentData","body":["MyAvatar.setAttachmentData(${1:attachmentData: Array.})"],"description":"Set all models currently attached to your avatar. For example, if you retrieve attachment data using \r{@link MyAvatar.getAttachmentData} or {@link Avatar.getAttachmentData}, make changes to it, and then want to update your avatar's attachments per the \rchanged data. You can also remove all attachments by using setting attachmentData to null."}}, + {"MyAvatar.attach":{"prefix":"MyAvatar.attach","body":["MyAvatar.attach(${1:modelURL: string},${2:jointName: string},${3:translation: Vec3},${4:rotation: Quat},${5:scale: number},${6:isSoft: boolean},${7:allowDuplicates: boolean},${8:useSaved: boolean})"],"description":"Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to \rstand on.\r

Note: Attached models are models only; they are not entities and can not be manipulated using the {@link Entities} API. \rNor can you use this function to attach an entity (such as a sphere or a box) to your avatar.

"}}, + {"MyAvatar.detachOne":{"prefix":"MyAvatar.detachOne","body":["MyAvatar.detachOne(${1:modelURL: string},${2:jointName: string})"],"description":"Detach the most recently attached instance of a particular model from either a specific joint or any joint."}}, + {"MyAvatar.detachAll":{"prefix":"MyAvatar.detachAll","body":["MyAvatar.detachAll(${1:modelURL: string},${2:jointName: string})"],"description":"Detach all instances of a particular model from either a specific joint or all joints."}}, + {"MyAvatar.getAvatarEntityData":{"prefix":"MyAvatar.getAvatarEntityData","body":["MyAvatar.getAvatarEntityData"]}}, + {"MyAvatar.setAvatarEntityData":{"prefix":"MyAvatar.setAvatarEntityData","body":["MyAvatar.setAvatarEntityData(${1:avatarEntityData: object})"]}}, + {"MyAvatar.getSensorToWorldMatrix":{"prefix":"MyAvatar.getSensorToWorldMatrix","body":["MyAvatar.getSensorToWorldMatrix"]}}, + {"MyAvatar.getSensorToWorldScale":{"prefix":"MyAvatar.getSensorToWorldScale","body":["MyAvatar.getSensorToWorldScale"]}}, + {"MyAvatar.getControllerLeftHandMatrix":{"prefix":"MyAvatar.getControllerLeftHandMatrix","body":["MyAvatar.getControllerLeftHandMatrix"]}}, + {"MyAvatar.getControllerRightHandMatrix":{"prefix":"MyAvatar.getControllerRightHandMatrix","body":["MyAvatar.getControllerRightHandMatrix"]}}, + {"MyAvatar.getDataRate":{"prefix":"MyAvatar.getDataRate","body":["MyAvatar.getDataRate(${1:rateName: string})"]}}, + {"MyAvatar.getUpdateRate":{"prefix":"MyAvatar.getUpdateRate","body":["MyAvatar.getUpdateRate(${1:rateName: string})"]}}, + {"MyAvatar.displayNameChanged":{"prefix":"MyAvatar.displayNameChanged","body":["MyAvatar.displayNameChanged"]}}, + {"MyAvatar.sessionDisplayNameChanged":{"prefix":"MyAvatar.sessionDisplayNameChanged","body":["MyAvatar.sessionDisplayNameChanged"]}}, + {"MyAvatar.skeletonModelURLChanged":{"prefix":"MyAvatar.skeletonModelURLChanged","body":["MyAvatar.skeletonModelURLChanged"]}}, + {"MyAvatar.lookAtSnappingChanged":{"prefix":"MyAvatar.lookAtSnappingChanged","body":["MyAvatar.lookAtSnappingChanged(${1:enabled: boolean})"]}}, + {"MyAvatar.sessionUUIDChanged":{"prefix":"MyAvatar.sessionUUIDChanged","body":["MyAvatar.sessionUUIDChanged"]}}, + {"MyAvatar.sendAvatarDataPacket":{"prefix":"MyAvatar.sendAvatarDataPacket","body":["MyAvatar.sendAvatarDataPacket(${1:sendAll: boolean})"]}}, + {"MyAvatar.sendIdentityPacket":{"prefix":"MyAvatar.sendIdentityPacket","body":["MyAvatar.sendIdentityPacket"]}}, + {"MyAvatar.setJointMappingsFromNetworkReply":{"prefix":"MyAvatar.setJointMappingsFromNetworkReply","body":["MyAvatar.setJointMappingsFromNetworkReply"]}}, + {"MyAvatar.setSessionUUID":{"prefix":"MyAvatar.setSessionUUID","body":["MyAvatar.setSessionUUID(${1:sessionUUID: Uuid})"]}}, + {"MyAvatar.getAbsoluteJointRotationInObjectFrame":{"prefix":"MyAvatar.getAbsoluteJointRotationInObjectFrame","body":["MyAvatar.getAbsoluteJointRotationInObjectFrame(${1:index: number})"]}}, + {"MyAvatar.getAbsoluteJointTranslationInObjectFrame":{"prefix":"MyAvatar.getAbsoluteJointTranslationInObjectFrame","body":["MyAvatar.getAbsoluteJointTranslationInObjectFrame(${1:index: number})"]}}, + {"MyAvatar.setAbsoluteJointRotationInObjectFrame":{"prefix":"MyAvatar.setAbsoluteJointRotationInObjectFrame","body":["MyAvatar.setAbsoluteJointRotationInObjectFrame(${1:index: number},${2:rotation: Quat})"]}}, + {"MyAvatar.setAbsoluteJointTranslationInObjectFrame":{"prefix":"MyAvatar.setAbsoluteJointTranslationInObjectFrame","body":["MyAvatar.setAbsoluteJointTranslationInObjectFrame(${1:index: number},${2:translation: Vec3})"]}}, + {"MyAvatar.getTargetScale":{"prefix":"MyAvatar.getTargetScale","body":["MyAvatar.getTargetScale"]}}, + {"MyAvatar.resetLastSent":{"prefix":"MyAvatar.resetLastSent","body":["MyAvatar.resetLastSent"]}}, + {"AvatarList":{"prefix":"AvatarList","body":["AvatarList"],"description":"
Available in:Assignment Client Scripts

Note: An AvatarList API is also provided for Interface and client entity scripts: it is a \rsynonym for the {@link AvatarManager} API."}}, + {"AvatarList.getAvatarIdentifiers":{"prefix":"AvatarList.getAvatarIdentifiers","body":["AvatarList.getAvatarIdentifiers"]}}, + {"AvatarList.getAvatarsInRange":{"prefix":"AvatarList.getAvatarsInRange","body":["AvatarList.getAvatarsInRange(${1:position: Vec3},${2:range: number})"]}}, + {"AvatarList.getAvatar":{"prefix":"AvatarList.getAvatar","body":["AvatarList.getAvatar(${1:avatarID: Uuid})"]}}, + {"AvatarList.avatarAddedEvent":{"prefix":"AvatarList.avatarAddedEvent","body":["AvatarList.avatarAddedEvent(${1:sessionUUID: Uuid})"]}}, + {"AvatarList.avatarRemovedEvent":{"prefix":"AvatarList.avatarRemovedEvent","body":["AvatarList.avatarRemovedEvent(${1:sessionUUID: Uuid})"]}}, + {"AvatarList.avatarSessionChangedEvent":{"prefix":"AvatarList.avatarSessionChangedEvent","body":["AvatarList.avatarSessionChangedEvent(${1:sessionUUID: Uuid},${2:oldSessionUUID: Uuid})"]}}, + {"AvatarList.isAvatarInRange":{"prefix":"AvatarList.isAvatarInRange","body":["AvatarList.isAvatarInRange(${1:position: string},${2:range: string})"]}}, + {"AvatarList.sessionUUIDChanged":{"prefix":"AvatarList.sessionUUIDChanged","body":["AvatarList.sessionUUIDChanged(${1:sessionUUID: Uuid},${2:oldSessionUUID: Uuid})"]}}, + {"AvatarList.processAvatarDataPacket":{"prefix":"AvatarList.processAvatarDataPacket","body":["AvatarList.processAvatarDataPacket(${1:message},${2:sendingNode})"]}}, + {"AvatarList.processAvatarIdentityPacket":{"prefix":"AvatarList.processAvatarIdentityPacket","body":["AvatarList.processAvatarIdentityPacket(${1:message},${2:sendingNode})"]}}, + {"AvatarList.processKillAvatar":{"prefix":"AvatarList.processKillAvatar","body":["AvatarList.processKillAvatar(${1:message},${2:sendingNode})"]}}, + {"MyAvatar.getDefaultJointRotation":{"prefix":"MyAvatar.getDefaultJointRotation","body":["MyAvatar.getDefaultJointRotation(${1:index: number})"]}}, + {"MyAvatar.getDefaultJointTranslation":{"prefix":"MyAvatar.getDefaultJointTranslation","body":["MyAvatar.getDefaultJointTranslation(${1:index: number})"]}}, + {"MyAvatar.getAbsoluteDefaultJointRotationInObjectFrame":{"prefix":"MyAvatar.getAbsoluteDefaultJointRotationInObjectFrame","body":["MyAvatar.getAbsoluteDefaultJointRotationInObjectFrame(${1:index: number})"],"description":"Provides read only access to the default joint rotations in avatar coordinates.\rThe default pose of the avatar is defined by the position and orientation of all bones\rin the avatar's model file. Typically this is a T-pose."}}, + {"MyAvatar.getAbsoluteDefaultJointTranslationInObjectFrame":{"prefix":"MyAvatar.getAbsoluteDefaultJointTranslationInObjectFrame","body":["MyAvatar.getAbsoluteDefaultJointTranslationInObjectFrame(${1:index: number})"],"description":"Provides read only access to the default joint translations in avatar coordinates.\rThe default pose of the avatar is defined by the position and orientation of all bones\rin the avatar's model file. Typically this is a T-pose."}}, + {"MyAvatar.setSkeletonOffset":{"prefix":"MyAvatar.setSkeletonOffset","body":["MyAvatar.setSkeletonOffset(${1:offset: Vec3})"],"description":"Set the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, \rwith an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly."}}, + {"MyAvatar.getSkeletonOffset":{"prefix":"MyAvatar.getSkeletonOffset","body":["MyAvatar.getSkeletonOffset"],"description":"Get the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, \rwith an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly."}}, + {"MyAvatar.getJointPosition":{"prefix":"MyAvatar.getJointPosition","body":["MyAvatar.getJointPosition(${1:index: number})"],"description":"Get the position of a joint in the current avatar."}}, + {"MyAvatar.getJointPosition":{"prefix":"MyAvatar.getJointPosition","body":["MyAvatar.getJointPosition(${1:name: string})"],"description":"Get the position of a joint in the current avatar."}}, + {"MyAvatar.getNeckPosition":{"prefix":"MyAvatar.getNeckPosition","body":["MyAvatar.getNeckPosition"],"description":"Get the position of the current avatar's neck in world coordinates."}}, + {"MyAvatar.getAcceleration":{"prefix":"MyAvatar.getAcceleration","body":["MyAvatar.getAcceleration"]}}, + {"MyAvatar.getWorldFeetPosition":{"prefix":"MyAvatar.getWorldFeetPosition","body":["MyAvatar.getWorldFeetPosition"],"description":"Get the position of the current avatar's feet (or rather, bottom of its collision capsule) in world coordinates."}}, + {"MyAvatar.getParentID":{"prefix":"MyAvatar.getParentID","body":["MyAvatar.getParentID"]}}, + {"MyAvatar.setParentID":{"prefix":"MyAvatar.setParentID","body":["MyAvatar.setParentID(${1:parentID: Uuid})"]}}, + {"MyAvatar.getParentJointIndex":{"prefix":"MyAvatar.getParentJointIndex","body":["MyAvatar.getParentJointIndex"]}}, + {"MyAvatar.setParentJointIndex":{"prefix":"MyAvatar.setParentJointIndex","body":["MyAvatar.setParentJointIndex(${1:parentJointIndex: number})"]}}, + {"MyAvatar.getSkeleton":{"prefix":"MyAvatar.getSkeleton","body":["MyAvatar.getSkeleton"],"description":"Returns an array of joints, where each joint is an object containing name, index, and parentIndex fields."}}, + {"MyAvatar.SkeletonJoint":{"prefix":"MyAvatar.SkeletonJoint","body":["MyAvatar.SkeletonJoint"],"description":"Information about a single joint in an Avatar's skeleton hierarchy."}}, + {"MyAvatar.getSimulationRate":{"prefix":"MyAvatar.getSimulationRate","body":["MyAvatar.getSimulationRate(${1:rateName: string})"]}}, + {"MyAvatar.getLeftPalmPosition":{"prefix":"MyAvatar.getLeftPalmPosition","body":["MyAvatar.getLeftPalmPosition"],"description":"Get the position of the left palm in world coordinates."}}, + {"MyAvatar.getLeftPalmRotation":{"prefix":"MyAvatar.getLeftPalmRotation","body":["MyAvatar.getLeftPalmRotation"],"description":"Get the rotation of the left palm in world coordinates."}}, + {"MyAvatar.getRightPalmPosition":{"prefix":"MyAvatar.getRightPalmPosition","body":["MyAvatar.getRightPalmPosition"],"description":"Get the position of the right palm in world coordinates."}}, + {"MyAvatar.getRightPalmRotation":{"prefix":"MyAvatar.getRightPalmRotation","body":["MyAvatar.getRightPalmRotation"],"description":"Get the rotation of the right palm in world coordinates."}}, + {"MyAvatar.rigReady":{"prefix":"MyAvatar.rigReady","body":["MyAvatar.rigReady"]}}, + {"MyAvatar.rigReset":{"prefix":"MyAvatar.rigReset","body":["MyAvatar.rigReset"]}}, + {"Controller.Actions":{"prefix":"Controller.Actions","body":["Controller.Actions"],"description":"

The Controller.Actions object has properties representing predefined actions on the user's avatar and \rInterface. The property values are integer IDs, uniquely identifying each action. Read-only. These can be used \ras end points in the routes of a {@link MappingObject}. The data routed to each action is either a number or a \r{@link Pose}.

\r\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
Avatar Movement
TranslateXnumbernumberMove the user's avatar in the direction of its \r x-axis, if the camera isn't in independent or mirror modes.
TranslateYnumbernumberMove the user's avatar in the direction of its \r y-axis, if the camera isn't in independent or mirror modes.
TranslateZnumbernumberMove the user's avatar in the direction of its \r z-axis, if the camera isn't in independent or mirror modes.
PitchnumbernumberRotate the user's avatar head and attached camera \r about its negative x-axis (i.e., positive values pitch down), if the camera isn't in HMD, independent, or mirror \r modes.
YawnumbernumberRotate the user's avatar about its y-axis, if the \r camera isn't in independent or mirror modes.
RollnumbernumberNo action.
StepTranslateXnumbernumberNo action.
StepTranslateYnumbernumberNo action.
StepTranslateZnumbernumberNo action.
StepPitchnumbernumberNo action.
StepYawnumbernumberRotate the user's avatar about its y-axis in a \r step increment, if the camera isn't in independent or mirror modes.
StepRollnumbernumberNo action.
Avatar Skeleton
Hipsnumber{@link Pose}Set the hips pose of the user's avatar.\r
Spine2number{@link Pose}Set the spine2 pose of the user's avatar.\r
Headnumber{@link Pose}Set the head pose of the user's avatar.\r
LeftArmnumber{@link Pose}Set the left arm pose of the user's avatar.\r
RightArmnumber{@link Pose}Set the right arm pose of the user's \r avatar.
LeftHandnumber{@link Pose}Set the left hand pose of the user's\r avatar.
LeftHandThumb1number{@link Pose}Set the left thumb 1 finger joint \r pose of the user's avatar.
LeftHandThumb2number{@link Pose}Set the left thumb 2 finger joint \r pose of the user's avatar.
LeftHandThumb3number{@link Pose}Set the left thumb 3 finger joint \r pose of the user's avatar.
LeftHandThumb4number{@link Pose}Set the left thumb 4 finger joint \r pose of the user's avatar.
LeftHandIndex1number{@link Pose}Set the left index 1 finger joint \r pose of the user's avatar.
LeftHandIndex2number{@link Pose}Set the left index 2 finger joint \r pose of the user's avatar.
LeftHandIndex3number{@link Pose}Set the left index 3 finger joint \r pose of the user's avatar.
LeftHandIndex4number{@link Pose}Set the left index 4 finger joint \r pose of the user's avatar.
LeftHandMiddle1number{@link Pose}Set the left middle 1 finger joint \r pose of the user's avatar.
LeftHandMiddle2number{@link Pose}Set the left middle 2 finger joint \r pose of the user's avatar.
LeftHandMiddle3number{@link Pose}Set the left middle 3 finger joint \r pose of the user's avatar.
LeftHandMiddle4number{@link Pose}Set the left middle 4 finger joint \r pose of the user's avatar.
LeftHandRing1number{@link Pose}Set the left ring 1 finger joint pose \r of the user's avatar.
LeftHandRing2number{@link Pose}Set the left ring 2 finger joint pose \r of the user's avatar.
LeftHandRing3number{@link Pose}Set the left ring 3 finger joint pose \r of the user's avatar.
LeftHandRing4number{@link Pose}Set the left ring 4 finger joint pose \r of the user's avatar.
LeftHandPinky1number{@link Pose}Set the left pinky 1 finger joint \r pose of the user's avatar.
LeftHandPinky2number{@link Pose}Set the left pinky 2 finger joint \r pose of the user's avatar.
LeftHandPinky3number{@link Pose}Set the left pinky 3 finger joint \r pose of the user's avatar.
LeftHandPinky4number{@link Pose}Set the left pinky 4 finger joint \r pose of the user's avatar.
RightHandnumber{@link Pose}Set the right hand of the user's avatar.\r
RightHandThumb1number{@link Pose}Set the right thumb 1 finger joint \r pose of the user's avatar.
RightHandThumb2number{@link Pose}Set the right thumb 2 finger joint \r pose of the user's avatar.
RightHandThumb3number{@link Pose}Set the right thumb 3 finger joint \r pose of the user's avatar.
RightHandThumb4number{@link Pose}Set the right thumb 4 finger joint \r pose of the user's avatar.
RightHandIndex1number{@link Pose}Set the right index 1 finger joint \r pose of the user's avatar.
RightHandIndex2number{@link Pose}Set the right index 2 finger joint \r pose of the user's avatar.
RightHandIndex3number{@link Pose}Set the right index 3 finger joint \r pose of the user's avatar.
RightHandIndex4number{@link Pose}Set the right index 4 finger joint \r pose of the user's avatar.
RightHandMiddle1number{@link Pose}Set the right middle 1 finger \r joint pose of the user's avatar.
RightHandMiddle2number{@link Pose}Set the right middle 2 finger \r joint pose of the user's avatar.
RightHandMiddle3number{@link Pose}Set the right middle 3 finger \r joint pose of the user's avatar.
RightHandMiddle4number{@link Pose}Set the right middle 4 finger \r joint pose of the user's avatar.
RightHandRing1number{@link Pose}Set the right ring 1 finger joint \r pose of the user's avatar.
RightHandRing2number{@link Pose}Set the right ring 2 finger joint \r pose of the user's avatar.
RightHandRing3number{@link Pose}Set the right ring 3 finger joint \r pose of the user's avatar.
RightHandRing4number{@link Pose}Set the right ring 4 finger joint \r pose of the user's avatar.
RightHandPinky1number{@link Pose}Set the right pinky 1 finger joint \r pose of the user's avatar.
RightHandPinky2number{@link Pose}Set the right pinky 2 finger joint \r pose of the user's avatar.
RightHandPinky3number{@link Pose}Set the right pinky 3 finger joint \r pose of the user's avatar.
RightHandPinky4number{@link Pose}Set the right pinky 4 finger joint \r pose of the user's avatar.
LeftFootnumber{@link Pose}Set the left foot pose of the user's\r avatar.
RightFootnumber{@link Pose}Set the right foot pose of the user's\r avatar.
Application
BoomInnumbernumberZoom camera in from third person toward first \r person view.
BoomOutnumbernumberZoom camera out from first person to third \r person view.
CycleCameranumbernumberCycle the camera view from first person, to \r third person, to full screen mirror, then back to first person and repeat.
ContextMenunumbernumberShow / hide the tablet.
ToggleMutenumbernumberToggle the microphone mute.
ToggleOverlaynumbernumberToggle the display of overlays.
SprintnumbernumberSet avatar sprint mode.
ReticleClicknumbernumberSet mouse-pressed.
ReticleXnumbernumberMove the cursor left/right in the x direction.\r
ReticleYnumbernumbermove the cursor up/down in the y direction.\r
ReticleLeftnumbernumberMove the cursor left.
ReticleRightnumbernumberMove the cursor right.
ReticleUpnumbernumberMove the cursor up.
ReticleDownnumbernumberMove the cursor down.
UiNavLateralnumbernumberGenerate a keyboard left or right arrow key \r event.
UiNavVerticalnumbernumberGenerate a keyboard up or down arrow key \r event.
UiNavGroupnumbernumberGenerate a keyboard tab or back-tab key event.\r
UiNavSelectnumbernumberGenerate a keyboard Enter key event.\r
UiNavBacknumbernumberGenerate a keyboard Esc key event.
LeftHandClicknumbernumberDeprecated: No action.\r
RightHandClicknumbernumberDeprecated: No action.\r
ShiftnumbernumberDeprecated: No action.
PrimaryActionnumbernumberDeprecated: No action.\r
SecondaryActionnumbernumberDeprecated: No action.\r
Aliases
BackwardnumbernumberAlias for TranslateZ in the \r positive direction.
ForwardnumbernumberAlias for TranslateZ in the negative \r direction.
StrafeRightnumbernumberAlias for TranslateX in the\r positive direction.
StrafeLeftnumbernumberAlias for TranslateX in the\r negative direction.
UpnumbernumberAlias for TranslateY in the positive\r direction.
DownnumbernumberAlias for TranslateY in the negative \r direction.
PitchDownnumbernumberAlias for Pitch in the positive \r direction.
PitchUpnumbernumberAlias for Pitch in the negative\r direction.
YawLeftnumbernumberAlias for Yaw in the positive\r direction.
YawRightnumbernumberAlias for Yaw in the negative \r direction.
Deprecated Aliases
LEFT_HANDnumber{@link Pose}Deprecated: Use \r LeftHand instead.
RIGHT_HANDnumber{@link Pose}Deprecated: Use \r RightHand instead.
BOOM_INnumbernumberDeprecated: Use \r BoomIn instead.
BOOM_OUTnumbernumberDeprecated: Use \r BoomOut instead.
CONTEXT_MENUnumbernumberDeprecated: Use \r ContextMenu instead.
TOGGLE_MUTEnumbernumberDeprecated: Use \r ToggleMute instead.
SPRINTnumbernumberDeprecated: Use \r Sprint instead.
LONGITUDINAL_BACKWARDnumbernumberDeprecated: Use \r Backward instead.
LONGITUDINAL_FORWARDnumbernumberDeprecated: Use \r Forward instead.
LATERAL_LEFTnumbernumberDeprecated: Use \r StrafeLeft instead.
LATERAL_RIGHTnumbernumberDeprecated: Use \r StrafeRight instead.
VERTICAL_UPnumbernumberDeprecated: Use \r Up instead.
VERTICAL_DOWNnumbernumberDeprecated: Use \r Down instead.
PITCH_DOWNnumbernumberDeprecated: Use \r PitchDown instead.
PITCH_UPnumbernumberDeprecated: Use \r PitchUp instead.
YAW_LEFTnumbernumberDeprecated: Use \r YawLeft instead.
YAW_RIGHTnumbernumberDeprecated: Use \r YawRight instead.
LEFT_HAND_CLICKnumbernumberDeprecated: Use \r LeftHandClick instead.
RIGHT_HAND_CLICKnumbernumberDeprecated: Use \r RightHandClick instead.
SHIFTnumbernumberDeprecated: Use \r Shift instead.
ACTION1numbernumberDeprecated: Use \r PrimaryAction instead.
ACTION2numbernumberDeprecated: Use \r SecondaryAction instead.
Deprecated Trackers
TrackedObject00number{@link Pose}Deprecated: No\r action.
TrackedObject01number{@link Pose}Deprecated: No\r action.
TrackedObject02number{@link Pose}Deprecated: No\r action.
TrackedObject03number{@link Pose}Deprecated: No\r action.
TrackedObject04number{@link Pose}Deprecated: No\r action.
TrackedObject05number{@link Pose}Deprecated: No\r action.
TrackedObject06number{@link Pose}Deprecated: No\r action.
TrackedObject07number{@link Pose}Deprecated: No\r action.
TrackedObject08number{@link Pose}Deprecated: No\r action.
TrackedObject09number{@link Pose}Deprecated: No\r action.
TrackedObject10number{@link Pose}Deprecated: No\r action.
TrackedObject11number{@link Pose}Deprecated: No\r action.
TrackedObject12number{@link Pose}Deprecated: No\r action.
TrackedObject13number{@link Pose}Deprecated: No\r action.
TrackedObject14number{@link Pose}Deprecated: No\r action.
TrackedObject15number{@link Pose}Deprecated: No\r action.
"}}, + {"Controller.Hand":{"prefix":"Controller.Hand","body":["Controller.Hand"],"description":"

Some controller actions may be associated with one or both hands:

\r\r \r \r \r \r \r \r \r \r
ValueDescription
0Left hand.
1Right hand.
2Both hands.
"}}, + {"Controller.Hardware":{"prefix":"Controller.Hardware","body":["Controller.Hardware"],"description":"

The Controller.Hardware object has properties representing standard and hardware-specific controller and \rcomputer outputs, plus predefined actions on Interface and the user's avatar. Read-only. The outputs can be mapped \rto actions or functions in a {@link RouteObject} mapping. Additionally, hardware-specific controller outputs can be mapped \rto standard controller outputs. \r\r

Controllers typically implement a subset of the {@link Controller.Standard} controls, plus they may implement some extras. \rSome common controllers are included in the table. You can see the outputs provided by these and others by \rviewing their {@link Controller.MappingJSON|MappingJSON} files at \r\rhttps://github.com/highfidelity/hifi/tree/master/interface/resources/controllers.

\r\r\r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDescription
Controller.Hardware.ActionsobjectSynonym for {@link Controller.Actions}.
Controller.Hardware.ApplicationobjectInterface state outputs. See \r {@link Controller.Hardware-Application}.
Controller.Hardware.KeyboardobjectKeyboard, mouse, and touch pad outputs. See\r {@link Controller.Hardware-Keyboard}.
Controller.Hardware.OculusTouchobjectOculus Rift HMD outputs. See\r {@link Controller.Hardware-OculusTouch}.
Controller.Hardware.ViveobjectVive HMD outputs. See\r {@link Controller.Hardware-Vive}.
"}}, + {"Pose":{"prefix":"Pose","body":["Pose"],"description":"The pose of a joint or other item relative to the world or a parent."}}, + {"Controller.getAllActions":{"prefix":"Controller.getAllActions","body":["Controller.getAllActions"],"description":"Get a list of all available actions."}}, + {"Controller.getAvailableInputs":{"prefix":"Controller.getAvailableInputs","body":["Controller.getAvailableInputs(${1:deviceID: number})"],"description":"Get a list of all available inputs for a hardware device."}}, + {"Controller.getDeviceName":{"prefix":"Controller.getDeviceName","body":["Controller.getDeviceName(${1:deviceID: number})"],"description":"Find the name of a particular controller from its device ID."}}, + {"Controller.getActionValue":{"prefix":"Controller.getActionValue","body":["Controller.getActionValue(${1:actionID: number})"],"description":"Get the current value of an action."}}, + {"Controller.findDevice":{"prefix":"Controller.findDevice","body":["Controller.findDevice(${1:deviceName: string})"],"description":"Find the ID of a specific controller from its device name."}}, + {"Controller.getDeviceNames":{"prefix":"Controller.getDeviceNames","body":["Controller.getDeviceNames"],"description":"Get the names of all currently available controller devices plus \"Actions\", \"Application\", and \"Standard\"."}}, + {"Controller.findAction":{"prefix":"Controller.findAction","body":["Controller.findAction(${1:actionName: string})"],"description":"Find the ID of an action from its name."}}, + {"Controller.getActionNames":{"prefix":"Controller.getActionNames","body":["Controller.getActionNames"],"description":"Get the names of all actions available as properties of {@link Controller.Actions}."}}, + {"Controller.getValue":{"prefix":"Controller.getValue","body":["Controller.getValue(${1:source: number})"],"description":"Get the value of a controller button or axis output. Note: Also gets the value of a controller axis output."}}, + {"Controller.getAxisValue":{"prefix":"Controller.getAxisValue","body":["Controller.getAxisValue(${1:source: number})"],"description":"Get the value of a controller axis output. Note: Also gets the value of a controller button output."}}, + {"Controller.getPoseValue":{"prefix":"Controller.getPoseValue","body":["Controller.getPoseValue(${1:source: number})"],"description":"Get the value of a controller pose output."}}, + {"Controller.triggerHapticPulse":{"prefix":"Controller.triggerHapticPulse","body":["Controller.triggerHapticPulse(${1:strength: number},${2:duration: number},${3:hand: Controller.Hand})"],"description":"Triggers a haptic pulse on connected and enabled devices that have the capability."}}, + {"Controller.triggerShortHapticPulse":{"prefix":"Controller.triggerShortHapticPulse","body":["Controller.triggerShortHapticPulse(${1:strength: number},${2:hand: Controller.Hand})"],"description":"Triggers a 250ms haptic pulse on connected and enabled devices that have the capability."}}, + {"Controller.triggerHapticPulseOnDevice":{"prefix":"Controller.triggerHapticPulseOnDevice","body":["Controller.triggerHapticPulseOnDevice(${1:deviceID: number},${2:strength: number},${3:duration: number},${4:hand: Controller.Hand})"],"description":"Triggers a haptic pulse on a particular device if connected and enabled and it has the capability."}}, + {"Controller.triggerShortHapticPulseOnDevice":{"prefix":"Controller.triggerShortHapticPulseOnDevice","body":["Controller.triggerShortHapticPulseOnDevice(${1:deviceID: number},${2:strength: number},${3:hand: Controller.Hand})"],"description":"Triggers a 250ms haptic pulse on a particular device if connected and enabled and it has the capability."}}, + {"Controller.newMapping":{"prefix":"Controller.newMapping","body":["Controller.newMapping(${1:mappingName: string})"],"description":"Create a new controller mapping. Routes can then be added to the mapping using {@link MappingObject} methods and \rrouted to Standard controls, Actions, or script functions using {@link RouteObject} \rmethods. The mapping can then be enabled using {@link Controller.enableMapping|enableMapping} for it to take effect."}}, + {"Controller.enableMapping":{"prefix":"Controller.enableMapping","body":["Controller.enableMapping(${1:mappingName: string},${2:enable: boolean})"],"description":"Enable or disable a controller mapping. When enabled, the routes in the mapping have effect."}}, + {"Controller.disableMapping":{"prefix":"Controller.disableMapping","body":["Controller.disableMapping(${1:mappingName: string})"],"description":"Disable a controller mapping. When disabled, the routes in the mapping have no effect."}}, + {"Controller.parseMapping":{"prefix":"Controller.parseMapping","body":["Controller.parseMapping(${1:jsonString: string})"],"description":"Create a new controller mapping from a {@link Controller.MappingJSON|MappingJSON} string. Use \r{@link Controller.enableMapping|enableMapping} to enable the mapping for it to take effect."}}, + {"Controller.loadMapping":{"prefix":"Controller.loadMapping","body":["Controller.loadMapping(${1:jsonURL: string})"],"description":"Create a new controller mapping from a {@link Controller.MappingJSON|MappingJSON} JSON file at a URL. Use \r{@link Controller.enableMapping|enableMapping} to enable the mapping for it to take effect."}}, + {"Controller.getHardware":{"prefix":"Controller.getHardware","body":["Controller.getHardware"],"description":"Get the {@link Controller.Hardware} property tree. Calling this function is the same as using the {@link Controller} \rproperty, Controller.Hardware."}}, + {"Controller.getActions":{"prefix":"Controller.getActions","body":["Controller.getActions"],"description":"Get the {@link Controller.Actions} property tree. Calling this function is the same as using the {@link Controller} \rproperty, Controller.Actions."}}, + {"Controller.getStandard":{"prefix":"Controller.getStandard","body":["Controller.getStandard"],"description":"Get the {@link Controller.Standard} property tree. Calling this function is the same as using the {@link Controller} \rproperty, Controller.Standard."}}, + {"Controller.startInputRecording":{"prefix":"Controller.startInputRecording","body":["Controller.startInputRecording"],"description":"Start making a recording of currently active controllers."}}, + {"Controller.stopInputRecording":{"prefix":"Controller.stopInputRecording","body":["Controller.stopInputRecording"],"description":"Stop making a recording started by {@link Controller.startInputRecording|startInputRecording}."}}, + {"Controller.startInputPlayback":{"prefix":"Controller.startInputPlayback","body":["Controller.startInputPlayback"],"description":"Play back the current recording from the beginning. The current recording may have been recorded by \r{@link Controller.startInputRecording|startInputRecording} and \r{@link Controller.stopInputRecording|stopInputRecording}, or loaded by \r{@link Controller.loadInputRecording|loadInputRecording}. Playback repeats in a loop until \r{@link Controller.stopInputPlayback|stopInputPlayback} is called."}}, + {"Controller.stopInputPlayback":{"prefix":"Controller.stopInputPlayback","body":["Controller.stopInputPlayback"],"description":"Stop play back of a recording started by {@link Controller.startInputPlayback|startInputPlayback}."}}, + {"Controller.saveInputRecording":{"prefix":"Controller.saveInputRecording","body":["Controller.saveInputRecording"],"description":"Save the current recording to a file. The current recording may have been recorded by\r{@link Controller.startInputRecording|startInputRecording} and\r{@link Controller.stopInputRecording|stopInputRecording}, or loaded by\r{@link Controller.loadInputRecording|loadInputRecording}. It is saved in the directory returned by \r{@link Controller.getInputRecorderSaveDirectory|getInputRecorderSaveDirectory}."}}, + {"Controller.loadInputRecording":{"prefix":"Controller.loadInputRecording","body":["Controller.loadInputRecording(${1:file: string})"],"description":"Load an input recording, ready for play back."}}, + {"Controller.getInputRecorderSaveDirectory":{"prefix":"Controller.getInputRecorderSaveDirectory","body":["Controller.getInputRecorderSaveDirectory"],"description":"Get the directory in which input recordings are saved."}}, + {"Controller.getRunningInputDevices":{"prefix":"Controller.getRunningInputDevices","body":["Controller.getRunningInputDevices"],"description":"Get all the active and enabled (running) input devices"}}, + {"Controller.captureMouseEvents":{"prefix":"Controller.captureMouseEvents","body":["Controller.captureMouseEvents"],"description":"Disable processing of mouse \"move\", \"press\", \"double-press\", and \"release\" events into \r{@link Controller.Hardware|Controller.Hardware.Keyboard} outputs."}}, + {"Controller.releaseMouseEvents":{"prefix":"Controller.releaseMouseEvents","body":["Controller.releaseMouseEvents"],"description":"Enable processing of mouse \"move\", \"press\", \"double-press\", and \"release\" events into \r{@link Controller.Hardware-Keyboard|Controller.Hardware.Keyboard} outputs that were disabled using \r{@link Controller.captureMouseEvents|captureMouseEvents}."}}, + {"Controller.captureTouchEvents":{"prefix":"Controller.captureTouchEvents","body":["Controller.captureTouchEvents"],"description":"Disable processing of touch \"begin\", \"update\", and \"end\" events into \r{@link Controller.Hardware|Controller.Hardware.Keyboard}, \r{@link Controller.Hardware|Controller.Hardware.Touchscreen}, and \r{@link Controller.Hardware|Controller.Hardware.TouchscreenVirtualPad} outputs."}}, + {"Controller.releaseTouchEvents":{"prefix":"Controller.releaseTouchEvents","body":["Controller.releaseTouchEvents"],"description":"Enable processing of touch \"begin\", \"update\", and \"end\" events into \r{@link Controller.Hardware|Controller.Hardware.Keyboard}, \r{@link Controller.Hardware|Controller.Hardware.Touchscreen}, and \r{@link Controller.Hardware|Controller.Hardware.TouchscreenVirtualPad} outputs that were disabled using \r{@link Controller.captureTouchEvents|captureTouchEvents}."}}, + {"Controller.captureWheelEvents":{"prefix":"Controller.captureWheelEvents","body":["Controller.captureWheelEvents"],"description":"Disable processing of mouse wheel rotation events into {@link Controller.Hardware|Controller.Hardware.Keyboard} \routputs."}}, + {"Controller.releaseWheelEvents":{"prefix":"Controller.releaseWheelEvents","body":["Controller.releaseWheelEvents"],"description":"Enable processing of mouse wheel rotation events into {@link Controller.Hardware|Controller.Hardware.Keyboard} \routputs that wer disabled using {@link Controller.captureWheelEvents|captureWheelEvents}."}}, + {"Controller.captureActionEvents":{"prefix":"Controller.captureActionEvents","body":["Controller.captureActionEvents"],"description":"Disable translating and rotating the user's avatar in response to keyboard and controller controls."}}, + {"Controller.releaseActionEvents":{"prefix":"Controller.releaseActionEvents","body":["Controller.releaseActionEvents"],"description":"Enable translating and rotating the user's avatar in response to keyboard and controller controls that were disabled \rusing {@link Controller.captureActionEvents|captureActionEvents}."}}, + {"Controller.actionEvent":{"prefix":"Controller.actionEvent","body":["Controller.actionEvent(${1:actionID: number},${2:value: number})"],"description":"Triggered when an action occurs."}}, + {"Controller.inputEvent":{"prefix":"Controller.inputEvent","body":["Controller.inputEvent(${1:action: number},${2:value: number})"],"description":"Triggered when there is a new controller input event."}}, + {"Controller.hardwareChanged":{"prefix":"Controller.hardwareChanged","body":["Controller.hardwareChanged"],"description":"Triggered when a device is registered or unregistered by a plugin. Not all plugins generate \rhardwareChanged events: for example connecting or disconnecting a mouse will not generate an event but \rconnecting or disconnecting an Xbox controller will."}}, + {"Controller.deviceRunningChanged":{"prefix":"Controller.deviceRunningChanged","body":["Controller.deviceRunningChanged(${1:deviceName: string},${2:isEnabled: boolean})"],"description":"Triggered when a device is enabled/disabled\rEnabling/Disabling Leapmotion on settings/controls will trigger this signal."}}, + {"Controller.Standard":{"prefix":"Controller.Standard","body":["Controller.Standard"],"description":"

The Controller.Standard object has properties representing standard controller outputs. Those for physical \rcontrollers are based on the XBox controller, with aliases for PlayStation. The property values are integer IDs, uniquely \ridentifying each output. Read-only. These can be mapped to actions or functions in a {@link RouteObject} \rmapping.

\r\r

The data value provided by each control is either a number or a {@link Pose}. Numbers are typically normalized to\r0.0 or 1.0 for button states, the range 0.0 – 1.0 for unidirectional scales,\rand the range -1.0 – 1.0 for bidirectional scales.

\r\r

Each hardware device has a mapping from its outputs to Controller.Standard items, specified in a JSON file.\rFor example, \rleapmotion.json and\rvive.json.

\r\r\r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r
PropertyTypeDataDescription
Buttons
Anumbernumber\"A\" button pressed.
Bnumbernumber\"B\" button pressed.
Xnumbernumber\"X\" button pressed.
Ynumbernumber\"Y\" button pressed.
DLnumbernumberD-pad left pressed.
DRnumbernumberD-pad right pressed.
DUnumbernumberD-pad up pressed.
DDnumbernumberD-pad down pressed.
Startnumbernumber\"Start\" center button pressed.
Backnumbernumber\"Back\" center button pressed.
LBnumbernumberLeft bumper button pressed.
RBnumbernumberRight bumper button pressed.
Sticks
LXnumbernumberLeft stick x-axis scale.
LYnumbernumberLeft stick y-axis scale.
RXnumbernumberRight stick x-axis scale.
RYnumbernumberRight stick y-axis scale.
LSnumbernumberLeft stick button pressed.
RSnumbernumberRight stick button pressed.
LSTouchnumbernumberLeft stick is touched.
RSTouchnumbernumberRight stick is touched.
Triggers
LTnumbernumberLeft trigger scale.
RTnumbernumberRight trigger scale.
LTClicknumbernumberLeft trigger click.
RTClicknumbernumberRight trigger click.
LeftGripnumbernumberLeft grip scale.
RightGripnumbernumberRight grip scale.
LeftGripTouchnumbernumberLeft grip is touched.
RightGripTouchnumbernumberRight grip is touched.
Aliases, PlayStation Style Names
CrossnumbernumberAlias for A.
CirclenumbernumberAlias for B.
SquarenumbernumberAlias for X.
TrianglenumbernumberAlias for Y.
LeftnumbernumberAlias for DL.
RightnumbernumberAlias for DR.
UpnumbernumberAlias for DU.
DownnumbernumberAlias for DD.
SelectnumbernumberAlias for Back.
L1numbernumberAlias for LB.
R1numbernumberAlias for RB.
L3numbernumberAlias for LS.
R3numbernumberAlias for RS.
L2numbernumberAlias for LT.
R2numbernumberAlias for RT.
Finger Abstractions
LeftPrimaryThumbnumbernumberLeft primary thumb button pressed.
LeftSecondaryThumbnumbernumberLeft secondary thumb button pressed.\r
RightPrimaryThumbnumbernumberRight primary thumb button pressed.\r
RightSecondaryThumbnumbernumberRight secondary thumb button pressed.\r
LeftPrimaryThumbTouchnumbernumberLeft thumb touching primary thumb \r button.
LeftSecondaryThumbTouchnumbernumberLeft thumb touching secondary thumb \r button.
LeftThumbUpnumbernumberLeft thumb not touching primary or secondary \r thumb buttons.
RightPrimaryThumbTouchnumbernumberRight thumb touching primary thumb \r button.
RightSecondaryThumbTouchnumbernumberRight thumb touching secondary thumb \r button.
RightThumbUpnumbernumberRight thumb not touching primary or secondary \r thumb buttons.
LeftPrimaryIndexnumbernumberLeft primary index control pressed. \r To Do: Implement this for current controllers.
LeftSecondaryIndexnumbernumberLeft secondary index control pressed.\r
RightPrimaryIndexnumbernumberRight primary index control pressed. \r To Do: Implement this for current controllers.
RightSecondaryIndexnumbernumberRight secondary index control pressed.\r
LeftPrimaryIndexTouchnumbernumberLeft index finger is touching primary \r index finger control.
LeftSecondaryIndexTouchnumbernumberLeft index finger is touching \r secondary index finger control.
LeftIndexPointnumbernumberLeft index finger is pointing, not touching \r primary or secondary index finger controls.
RightPrimaryIndexTouchnumbernumberRight index finger is touching primary \r index finger control.
RightSecondaryIndexTouchnumbernumberRight index finger is touching \r secondary index finger control.
RightIndexPointnumbernumberRight index finger is pointing, not touching \r primary or secondary index finger controls.
Avatar Skeleton
Hipsnumber{@link Pose}Hips pose.
Spine2number{@link Pose}Spine2 pose.
Headnumber{@link Pose}Head pose.
LeftArmnumber{@link Pose}Left arm pose.
RightArmnumber{@link Pose}Right arm pose
LeftHandnumber{@link Pose}Left hand pose.
LeftHandThumb1number{@link Pose}Left thumb 1 finger joint pose.
LeftHandThumb2number{@link Pose}Left thumb 2 finger joint pose.
LeftHandThumb3number{@link Pose}Left thumb 3 finger joint pose.
LeftHandThumb4number{@link Pose}Left thumb 4 finger joint pose.
LeftHandIndex1number{@link Pose}Left index 1 finger joint pose.
LeftHandIndex2number{@link Pose}Left index 2 finger joint pose.
LeftHandIndex3number{@link Pose}Left index 3 finger joint pose.
LeftHandIndex4number{@link Pose}Left index 4 finger joint pose.
LeftHandMiddle1number{@link Pose}Left middle 1 finger joint pose.\r
LeftHandMiddle2number{@link Pose}Left middle 2 finger joint pose.\r
LeftHandMiddle3number{@link Pose}Left middle 3 finger joint pose.\r
LeftHandMiddle4number{@link Pose}Left middle 4 finger joint pose.\r
LeftHandRing1number{@link Pose}Left ring 1 finger joint pose.
LeftHandRing2number{@link Pose}Left ring 2 finger joint pose.
LeftHandRing3number{@link Pose}Left ring 3 finger joint pose.
LeftHandRing4number{@link Pose}Left ring 4 finger joint pose.
LeftHandPinky1number{@link Pose}Left pinky 1 finger joint pose.
LeftHandPinky2number{@link Pose}Left pinky 2 finger joint pose.
LeftHandPinky3number{@link Pose}Left pinky 3 finger joint pose.
LeftHandPinky4number{@link Pose}Left pinky 4 finger joint pose.
RightHandnumber{@link Pose}Right hand pose.
RightHandThumb1number{@link Pose}Right thumb 1 finger joint pose.\r
RightHandThumb2number{@link Pose}Right thumb 2 finger joint pose.\r
RightHandThumb3number{@link Pose}Right thumb 3 finger joint pose.\r
RightHandThumb4number{@link Pose}Right thumb 4 finger joint pose.\r
RightHandIndex1number{@link Pose}Right index 1 finger joint pose.\r
RightHandIndex2number{@link Pose}Right index 2 finger joint pose.\r
RightHandIndex3number{@link Pose}Right index 3 finger joint pose.\r
RightHandIndex4number{@link Pose}Right index 4 finger joint pose.\r
RightHandMiddle1number{@link Pose}Right middle 1 finger joint pose.\r
RightHandMiddle2number{@link Pose}Right middle 2 finger joint pose.\r
RightHandMiddle3number{@link Pose}Right middle 3 finger joint pose.\r
RightHandMiddle4number{@link Pose}Right middle 4 finger joint pose.\r
RightHandRing1number{@link Pose}Right ring 1 finger joint pose.
RightHandRing2number{@link Pose}Right ring 2 finger joint pose.
RightHandRing3number{@link Pose}Right ring 3 finger joint pose.
RightHandRing4number{@link Pose}Right ring 4 finger joint pose.
RightHandPinky1number{@link Pose}Right pinky 1 finger joint pose.\r
RightHandPinky2number{@link Pose}Right pinky 2 finger joint pose.\r
RightHandPinky3number{@link Pose}Right pinky 3 finger joint pose.\r
RightHandPinky4number{@link Pose}Right pinky 4 finger joint pose.\r
LeftFootnumber{@link Pose}Left foot pose.
RightFootnumber{@link Pose}Right foot pose.
Trackers
TrackedObject00number{@link Pose}Tracker 0 pose.
TrackedObject01number{@link Pose}Tracker 1 pose.
TrackedObject02number{@link Pose}Tracker 2 pose.
TrackedObject03number{@link Pose}Tracker 3 pose.
TrackedObject04number{@link Pose}Tracker 4 pose.
TrackedObject05number{@link Pose}Tracker 5 pose.
TrackedObject06number{@link Pose}Tracker 6 pose.
TrackedObject07number{@link Pose}Tracker 7 pose.
TrackedObject08number{@link Pose}Tracker 8 pose.
TrackedObject09number{@link Pose}Tracker 9 pose.
TrackedObject10number{@link Pose}Tracker 10 pose.
TrackedObject11number{@link Pose}Tracker 11 pose.
TrackedObject12number{@link Pose}Tracker 12 pose.
TrackedObject13number{@link Pose}Tracker 13 pose.
TrackedObject14number{@link Pose}Tracker 14 pose.
TrackedObject15number{@link Pose}Tracker 15 pose.
"}}, + {"MappingObject":{"prefix":"MappingObject","body":["MappingObject"],"description":"
Available in:Interface ScriptsClient Entity Scripts

A {@link Controller} mapping object that can contain a set of routes that map:

\r
    \r
  • {@link Controller.Standard} outputs to {@link Controller.Actions} actions or script functions.
  • \r
  • {@link Controller.Hardware} outputs to {@link Controller.Standard} outputs, {@link Controller.Actions} actions, or \r script functions.
  • \r
\r\r

Create by one of the following methods:

\r
    \r
  • Use {@link Controller.newMapping} to create the mapping object, add routes using {@link MappingObject#from|from} or\r {@link MappingObject#makeAxis|makeAxis}, and map the routes to actions or functions using {@link RouteObject} \r methods.
  • \r
  • Use {@link Controller.parseMapping} or {@link Controller.loadMapping} to load a {@link Controller.MappingJSON}.
  • \r
\r\r

Enable the mapping using {@link MappingObject#enable|enable} or {@link Controller.enableMapping} for it to take \reffect.

\r\r

Mappings and their routes are applied according to the following rules:

\r
    \r
  • One read per output: after a controller output has been read, it can't be read again. Exception: You can use \r {@link RouteObject#peek} to read a value without marking that output as having been read.
  • \r
  • Existing mapping routes take precedence over new mapping routes: within a mapping, if a route is added for a control \r output that already has a route the new route is ignored.
  • \r
  • New mappings override previous mappings: each output is processed using the route in the most recently enabled \r mapping that contains that output.
  • \r
"}}, + {"Controller.MappingJSON":{"prefix":"Controller.MappingJSON","body":["Controller.MappingJSON"],"description":"A {@link MappingObject} can be specified in JSON format. A simple example is provided below. Full examples — the \rdefault mappings provided in Interface — can be found at \r\rhttps://github.com/highfidelity/hifi/tree/master/interface/resources/controllers."}}, + {"Controller.MappingJSONRoute":{"prefix":"Controller.MappingJSONRoute","body":["Controller.MappingJSONRoute"],"description":"A route in a {@link Controller.MappingJSON}."}}, + {"Controller.MappingJSONAxis":{"prefix":"Controller.MappingJSONAxis","body":["Controller.MappingJSONAxis"],"description":"An axis pair in a {@link Controller.MappingJSONRoute}."}}, + {"Controller.MappingJSONFilter":{"prefix":"Controller.MappingJSONFilter","body":["Controller.MappingJSONFilter"],"description":"A filter in a {@link Controller.MappingJSONRoute}."}}, + {"MappingObject#fromQml":{"prefix":"MappingObject#fromQml","body":["MappingObject#fromQml(${1:source: Controller.Standard})"],"description":"Create a new {@link RouteObject} from a controller output, ready to be mapped to a standard control, action, or \rfunction.
\rThis is a QML-specific version of {@link MappingObject#from|from}: use this version in QML files."}}, + {"MappingObject#makeAxisQml":{"prefix":"MappingObject#makeAxisQml","body":["MappingObject#makeAxisQml(${1:source1: Controller.Hardware},${2:source2: Controller.Hardware})"],"description":"Create a new {@link RouteObject} from two numeric {@link Controller.Hardware} outputs, one applied in the negative \rdirection and the other in the positive direction, ready to be mapped to a standard control, action, or function.
\rThis is a QML-specific version of {@link MappingObject#makeAxis|makeAxis}: use this version in QML files."}}, + {"MappingObject#from":{"prefix":"MappingObject#from","body":["MappingObject#from(${1:source: Controller.Standard})"],"description":"Create a new {@link RouteObject} from a controller output, ready to be mapped to a standard control, action, or \rfunction."}}, + {"MappingObject#makeAxis":{"prefix":"MappingObject#makeAxis","body":["MappingObject#makeAxis(${1:source1: Controller.Hardware},${2:source2: Controller.Hardware})"],"description":"Create a new {@link RouteObject} from two numeric {@link Controller.Hardware} outputs, one applied in the negative \rdirection and the other in the positive direction, ready to be mapped to a standard control, action, or function."}}, + {"MappingObject#enable":{"prefix":"MappingObject#enable","body":["MappingObject#enable(${1:enable: boolean})"],"description":"Enable or disable the mapping. When enabled, the routes in the mapping take effect.
\rSynonymous with {@link Controller.enableMapping}."}}, + {"MappingObject#disable":{"prefix":"MappingObject#disable","body":["MappingObject#disable"],"description":"Disable the mapping. When disabled, the routes in the mapping have no effect.
\rSynonymous with {@link Controller.disableMapping}."}}, + {"RouteObject":{"prefix":"RouteObject","body":["RouteObject"],"description":"
Available in:Interface ScriptsClient Entity Scripts

A route in a {@link MappingObject} used by the {@link Controller} API.

\r\r

Create a route using {@link MappingObject} methods and apply this object's methods to process it, terminating with \r{@link RouteObject#to} to apply it to a Standard control, action, or script function. Note: Loops are not \rpermitted.

\r\r

Some methods apply to routes with number data, some apply routes with {@link Pose} data, and some apply to both route \rtypes.

"}}, + {"RouteObject#toQml":{"prefix":"RouteObject#toQml","body":["RouteObject#toQml(${1:destination: Controller.Standard})"],"description":"Terminate the route with a standard control, an action, or a script function. The output value from the route is \rsent to the specified destination.
\rThis is a QML-specific version of {@link MappingObject#to|to}: use this version in QML files."}}, + {"RouteObject#whenQml":{"prefix":"RouteObject#whenQml","body":["RouteObject#whenQml(${1:expression: condition})"],"description":"Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and\rthe input is read only if the condition is true. Thus, if the condition is not met then subsequent\rroutes using the same input are processed.
\rThis is a QML-specific version of {@link MappingObject#to|to}: use this version in QML files."}}, + {"RouteObject#to":{"prefix":"RouteObject#to","body":["RouteObject#to(${1:destination: Controller.Standard})"],"description":"Terminate the route with a standard control, an action, or a script function. The output value from the route is \rsent to the specified destination."}}, + {"RouteObject#debug":{"prefix":"RouteObject#debug","body":["RouteObject#debug(${1:enable: boolean})"],"description":"Enable and disabling writing debug information for a route to the program log."}}, + {"RouteObject#peek":{"prefix":"RouteObject#peek","body":["RouteObject#peek(${1:enable: boolean})"],"description":"Process the route without marking the controller output as having been read, so that other routes from the same \rcontroller output can also process."}}, + {"RouteObject#when":{"prefix":"RouteObject#when","body":["RouteObject#when(${1:expression: condition})"],"description":"Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and \rthe input is read only if the condition is true. Thus, if the condition is not met then subsequent \rroutes using the same input are processed."}}, + {"RouteObject#clamp":{"prefix":"RouteObject#clamp","body":["RouteObject#clamp(${1:min: number},${2:max: number})"],"description":"Filter numeric route values to lie between two values; values outside this range are not passed on through the \rroute."}}, + {"RouteObject#hysteresis":{"prefix":"RouteObject#hysteresis","body":["RouteObject#hysteresis(${1:min: number},${2:max: number})"],"description":"Filter numeric route values such that they are rounded to 0 or 1 without output values \rflickering when the input value hovers around 0.5. For example, this enables you to use an analog input \ras if it were a toggle."}}, + {"RouteObject#pulse":{"prefix":"RouteObject#pulse","body":["RouteObject#pulse(${1:interval: number})"],"description":"Filter numeric route values to send at a specified interval."}}, + {"RouteObject#scale":{"prefix":"RouteObject#scale","body":["RouteObject#scale(${1:multiplier: number})"],"description":"Filter numeric and {@link Pose} route values to be scaled by a constant amount."}}, + {"RouteObject#invert":{"prefix":"RouteObject#invert","body":["RouteObject#invert"],"description":"Filter numeric and {@link Pose} route values to have the opposite sign, e.g., 0.5 is changed to \r-0.5."}}, + {"RouteObject#deadZone":{"prefix":"RouteObject#deadZone","body":["RouteObject#deadZone(${1:min: number})"],"description":"Filter numeric route values such that they're sent only when the input value is outside a dead-zone. When the input \rpasses the dead-zone value, output is sent starting at 0.0 and catching up with the input value. As the \rinput returns toward the dead-zone value, output values reduce to 0.0 at the dead-zone value."}}, + {"RouteObject#constrainToInteger":{"prefix":"RouteObject#constrainToInteger","body":["RouteObject#constrainToInteger"],"description":"Filter numeric route values such that they are rounded to -1, 0, or 1.\rFor example, this enables you to use an analog input as if it were a toggle or, in the case of a bidirectional axis, \ra tri-state switch."}}, + {"RouteObject#constrainToPositiveInteger":{"prefix":"RouteObject#constrainToPositiveInteger","body":["RouteObject#constrainToPositiveInteger"],"description":"Filter numeric route values such that they are rounded to 0 or 1. For example, this \renables you to use an analog input as if it were a toggle."}}, + {"RouteObject#translate":{"prefix":"RouteObject#translate","body":["RouteObject#translate(${1:translate: Vec3})"],"description":"Filter {@link Pose} route values to have a pre-translation applied."}}, + {"RouteObject#transform":{"prefix":"RouteObject#transform","body":["RouteObject#transform(${1:transform: Mat4})"],"description":"Filter {@link Pose} route values to have a pre-transform applied."}}, + {"RouteObject#postTransform":{"prefix":"RouteObject#postTransform","body":["RouteObject#postTransform(${1:transform: Mat4})"],"description":"Filter {@link Pose} route values to have a post-transform applied."}}, + {"RouteObject#rotate":{"prefix":"RouteObject#rotate","body":["RouteObject#rotate(${1:rotation: Quat})"],"description":"Filter {@link Pose} route values to have a pre-rotation applied."}}, + {"RouteObject#lowVelocity":{"prefix":"RouteObject#lowVelocity","body":["RouteObject#lowVelocity(${1:rotationConstant: number},${2:translationConstant: number})"],"description":"Filter {@link Pose} route values to be smoothed by a low velocity filter. The filter's rotation and translation \rvalues are calculated as: (1 - f) * currentValue + f * previousValue where \rf = currentVelocity / filterConstant. At low velocities, the filter value is largely the previous \rvalue; at high velocities the value is wholly the current controller value."}}, + {"RouteObject#exponentialSmoothing":{"prefix":"RouteObject#exponentialSmoothing","body":["RouteObject#exponentialSmoothing(${1:rotationConstant: number},${2:translationConstant: number})"],"description":"Filter {@link Pose} route values to be smoothed by an exponential decay filter. The filter's rotation and \rtranslation values are calculated as: filterConstant * currentValue + (1 - filterConstant) * \rpreviousValue. Values near 1 are less smooth with lower latency; values near 0 are more smooth with higher \rlatency."}}, + {"RouteObject#logicalNot":{"prefix":"RouteObject#logicalNot","body":["RouteObject#logicalNot"],"description":"Filter numeric route values such that a value of 0.0 is changed to 1.0, and other values \rare changed to 0.0."}}, + {"HMD.IPDScaleChanged":{"prefix":"HMD.IPDScaleChanged","body":["HMD.IPDScaleChanged"],"description":"Triggered when the HMD.ipdScale property value changes."}}, + {"HMD.displayModeChanged":{"prefix":"HMD.displayModeChanged","body":["HMD.displayModeChanged(${1:isHMDMode: boolean})"],"description":"Triggered when Interface's display mode changes and when the user puts on or takes off their HMD."}}, + {"HMD.mountedChanged":{"prefix":"HMD.mountedChanged","body":["HMD.mountedChanged"],"description":"Triggered when the HMD.mounted property value changes."}}, + {"Reticle":{"prefix":"Reticle","body":["Reticle"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Reticle.isMouseCaptured":{"prefix":"Reticle.isMouseCaptured","body":["Reticle.isMouseCaptured"]}}, + {"Reticle.getAllowMouseCapture":{"prefix":"Reticle.getAllowMouseCapture","body":["Reticle.getAllowMouseCapture"]}}, + {"Reticle.setAllowMouseCapture":{"prefix":"Reticle.setAllowMouseCapture","body":["Reticle.setAllowMouseCapture(${1:allowMouseCaptured: boolean})"]}}, + {"Reticle.isPointingAtSystemOverlay":{"prefix":"Reticle.isPointingAtSystemOverlay","body":["Reticle.isPointingAtSystemOverlay"]}}, + {"Reticle.getVisible":{"prefix":"Reticle.getVisible","body":["Reticle.getVisible"]}}, + {"Reticle.setVisible":{"prefix":"Reticle.setVisible","body":["Reticle.setVisible(${1:visible: boolean})"]}}, + {"Reticle.getDepth":{"prefix":"Reticle.getDepth","body":["Reticle.getDepth"]}}, + {"Reticle.setDepth":{"prefix":"Reticle.setDepth","body":["Reticle.setDepth(${1:depth: number})"]}}, + {"Reticle.getScale":{"prefix":"Reticle.getScale","body":["Reticle.getScale"]}}, + {"Reticle.setScale":{"prefix":"Reticle.setScale","body":["Reticle.setScale(${1:scale: number})"]}}, + {"Reticle.getPosition":{"prefix":"Reticle.getPosition","body":["Reticle.getPosition"]}}, + {"Reticle.setPosition":{"prefix":"Reticle.setPosition","body":["Reticle.setPosition(${1:position: Vec2})"]}}, + {"Reticle.getMaximumPosition":{"prefix":"Reticle.getMaximumPosition","body":["Reticle.getMaximumPosition"]}}, + {"Entities.AmbientLight":{"prefix":"Entities.AmbientLight","body":["Entities.AmbientLight"],"description":"Ambient light is defined by the following properties."}}, + {"Entities.AnimationProperties":{"prefix":"Entities.AnimationProperties","body":["Entities.AnimationProperties"],"description":"The AnimationProperties are used to configure an animation."}}, + {"Entities.Bloom":{"prefix":"Entities.Bloom","body":["Entities.Bloom"],"description":"Bloom is defined by the following properties."}}, + {"Entities.ActionType":{"prefix":"Entities.ActionType","body":["Entities.ActionType"],"description":"

An entity action may be one of the following types:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueTypeDescriptionArguments
\"far-grab\"Avatar actionMoves and rotates an entity to a target position and orientation, optionally relative to another entity. Collisions \r between the entity and the user's avatar are disabled during the far-grab.{@link Entities.ActionArguments-FarGrab}
\"hold\"Avatar actionPositions and rotates an entity relative to an avatar's hand. Collisions between the entity and the user's avatar \r are disabled during the hold.{@link Entities.ActionArguments-Hold}
\"offset\"Object actionMoves an entity so that it is a set distance away from a target point.{@link Entities.ActionArguments-Offset}
\"tractor\"Object actionMoves and rotates an entity to a target position and orientation, optionally relative to another entity.{@link Entities.ActionArguments-Tractor}
\"travel-oriented\"Object actionOrients an entity to align with its direction of travel.{@link Entities.ActionArguments-TravelOriented}
\"hinge\"Object constraintLets an entity pivot about an axis or connects two entities with a hinge joint.{@link Entities.ActionArguments-Hinge}
\"slider\"Object constraintLets an entity slide and rotate along an axis, or connects two entities that slide and rotate along a shared \r axis.{@link Entities.ActionArguments-Slider|ActionArguments-Slider}
\"cone-twist\"Object constraintConnects two entities with a joint that can move through a cone and can twist.{@link Entities.ActionArguments-ConeTwist}
\"ball-socket\"Object constraintConnects two entities with a ball and socket joint.{@link Entities.ActionArguments-BallSocket}
\"spring\"Synonym for \"tractor\". Legacy value.
"}}, + {"Entities.EntityProperties":{"prefix":"Entities.EntityProperties","body":["Entities.EntityProperties"],"description":"Different entity types have different properties: some common to all entities (listed below) and some specific to each \r{@link Entities.EntityType|EntityType} (linked to below). The properties are accessed as an object of property names and \rvalues."}}, + {"Entities.EntityProperties-Box":{"prefix":"Entities.EntityProperties-Box","body":["Entities.EntityProperties-Box"],"description":"The \"Box\" {@link Entities.EntityType|EntityType} is the same as the \"Shape\"\r{@link Entities.EntityType|EntityType} except that its shape value is always set to \"Cube\"\rwhen the entity is created. If its shape property value is subsequently changed then the entity's \rtype will be reported as \"Sphere\" if the shape is set to \"Sphere\", \rotherwise it will be reported as \"Shape\"."}}, + {"Entities.EntityProperties-Light":{"prefix":"Entities.EntityProperties-Light","body":["Entities.EntityProperties-Light"],"description":"The \"Light\" {@link Entities.EntityType|EntityType} adds local lighting effects.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-Line":{"prefix":"Entities.EntityProperties-Line","body":["Entities.EntityProperties-Line"],"description":"The \"Line\" {@link Entities.EntityType|EntityType} draws thin, straight lines between a sequence of two or more \rpoints.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-Material":{"prefix":"Entities.EntityProperties-Material","body":["Entities.EntityProperties-Material"],"description":"The \"Material\" {@link Entities.EntityType|EntityType} modifies the existing materials on\r{@link Entities.EntityType|Model} entities, {@link Entities.EntityType|Shape} entities (albedo only), \r{@link Overlays.OverlayType|model overlays}, and avatars.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.
\rTo apply a material to an entity or overlay, set the material entity's parentID property to the entity or \roverlay's ID.\rTo apply a material to an avatar, set the material entity's parentID property to the avatar's session UUID.\rTo apply a material to your avatar such that it persists across domains and log-ins, create the material as an avatar entity \rby setting the clientOnly parameter in {@link Entities.addEntity} to true.\rMaterial entities render as non-scalable spheres if they don't have their parent set."}}, + {"Entities.EntityProperties-Model":{"prefix":"Entities.EntityProperties-Model","body":["Entities.EntityProperties-Model"],"description":"The \"Model\" {@link Entities.EntityType|EntityType} displays an FBX or OBJ model.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-ParticleEffect":{"prefix":"Entities.EntityProperties-ParticleEffect","body":["Entities.EntityProperties-ParticleEffect"],"description":"The \"ParticleEffect\" {@link Entities.EntityType|EntityType} displays a particle system that can be used to \rsimulate things such as fire, smoke, snow, magic spells, etc. The particles emanate from an ellipsoid or part thereof.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-PolyLine":{"prefix":"Entities.EntityProperties-PolyLine","body":["Entities.EntityProperties-PolyLine"],"description":"The \"PolyLine\" {@link Entities.EntityType|EntityType} draws textured, straight lines between a sequence of \rpoints.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-PolyVox":{"prefix":"Entities.EntityProperties-PolyVox","body":["Entities.EntityProperties-PolyVox"],"description":"The \"PolyVox\" {@link Entities.EntityType|EntityType} displays a set of textured voxels. \rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.\rIf you have two or more neighboring PolyVox entities of the same size abutting each other, you can display them as joined by\rconfiguring their voxelSurfaceStyle and neighbor ID properties.
\rPolyVox entities uses a library from Volumes of Fun. Their\rlibrary documentation may be useful to read."}}, + {"Entities.EntityProperties-Shape":{"prefix":"Entities.EntityProperties-Shape","body":["Entities.EntityProperties-Shape"],"description":"The \"Shape\" {@link Entities.EntityType|EntityType} displays an entity of a specified shape.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-Sphere":{"prefix":"Entities.EntityProperties-Sphere","body":["Entities.EntityProperties-Sphere"],"description":"The \"Sphere\" {@link Entities.EntityType|EntityType} is the same as the \"Shape\"\r{@link Entities.EntityType|EntityType} except that its shape value is always set to \"Sphere\"\rwhen the entity is created. If its shape property value is subsequently changed then the entity's \rtype will be reported as \"Box\" if the shape is set to \"Cube\", \rotherwise it will be reported as \"Shape\"."}}, + {"Entities.EntityProperties-Text":{"prefix":"Entities.EntityProperties-Text","body":["Entities.EntityProperties-Text"],"description":"The \"Text\" {@link Entities.EntityType|EntityType} displays a 2D rectangle of text in the domain.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-Web":{"prefix":"Entities.EntityProperties-Web","body":["Entities.EntityProperties-Web"],"description":"The \"Web\" {@link Entities.EntityType|EntityType} displays a browsable Web page. Each user views their own copy \rof the Web page: if one user navigates to another page on the entity, other users do not see the change; if a video is being \rplayed, users don't see it in sync.\rThe entity has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-Zone":{"prefix":"Entities.EntityProperties-Zone","body":["Entities.EntityProperties-Zone"],"description":"The \"Zone\" {@link Entities.EntityType|EntityType} is a volume of lighting effects and avatar permissions.\rAvatar interaction events such as {@link Entities.enterEntity} are also often used with a Zone entity.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.BoundingBox":{"prefix":"Entities.BoundingBox","body":["Entities.BoundingBox"],"description":"The axis-aligned bounding box of an entity."}}, + {"Entities.RenderInfo":{"prefix":"Entities.RenderInfo","body":["Entities.RenderInfo"],"description":"Information on how an entity is rendered. Properties are only filled in for Model entities; other \rentity types have an empty object, {}."}}, + {"Entities.RayToEntityIntersectionResult":{"prefix":"Entities.RayToEntityIntersectionResult","body":["Entities.RayToEntityIntersectionResult"],"description":"The result of a {@link PickRay} search using {@link Entities.findRayIntersection|findRayIntersection} or \r{@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}."}}, + {"Entities":{"prefix":"Entities","body":["Entities"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Entities API provides facilities to create and interact with entities. Entities are 2D and 3D objects that are visible\rto everyone and typically are persisted to the domain. For Interface scripts, the entities available are those that \rInterface has displayed and so knows about."}}, + {"Entities.getMultipleEntityProperties":{"prefix":"Entities.getMultipleEntityProperties","body":["Entities.getMultipleEntityProperties(${1:entityIDs: Array.},${2:desiredProperties: Array.})"],"description":"Get the properties of multiple entities."}}, + {"Entities.canAdjustLocks":{"prefix":"Entities.canAdjustLocks","body":["Entities.canAdjustLocks"],"description":"Check whether or not you can change the locked property of entities. Locked entities have their \rlocked property set to true and cannot be edited or deleted. Whether or not you can change \rentities' locked properties is configured in the domain server's permissions."}}, + {"Entities.canRez":{"prefix":"Entities.canRez","body":["Entities.canRez"],"description":"Check whether or not you can rez (create) new entities in the domain."}}, + {"Entities.canRezTmp":{"prefix":"Entities.canRezTmp","body":["Entities.canRezTmp"],"description":"Check whether or not you can rez (create) new temporary entities in the domain. Temporary entities are entities with a\rfinite lifetime property value set."}}, + {"Entities.canRezCertified":{"prefix":"Entities.canRezCertified","body":["Entities.canRezCertified"],"description":"Check whether or not you can rez (create) new certified entities in the domain. Certified entities are entities that have\rPoP certificates."}}, + {"Entities.canRezTmpCertified":{"prefix":"Entities.canRezTmpCertified","body":["Entities.canRezTmpCertified"],"description":"Check whether or not you can rez (create) new temporary certified entities in the domain. Temporary entities are entities\rwith a finite lifetime property value set. Certified entities are entities that have PoP certificates."}}, + {"Entities.canWriteAssets":{"prefix":"Entities.canWriteAssets","body":["Entities.canWriteAssets"],"description":"Check whether or not you can make changes to the asset server's assets."}}, + {"Entities.canReplaceContent":{"prefix":"Entities.canReplaceContent","body":["Entities.canReplaceContent"],"description":"Check whether or not you can replace the domain's content set."}}, + {"Entities.addEntity":{"prefix":"Entities.addEntity","body":["Entities.addEntity(${1:properties: Entities.EntityProperties},${2:clientOnly: boolean})"],"description":"Add a new entity with specified properties."}}, + {"Entities.cloneEntity":{"prefix":"Entities.cloneEntity","body":["Entities.cloneEntity(${1:entityID: Uuid})"],"description":"Create a clone of an entity. A clone can be created by a client that doesn't have rez permissions in the current domain.\rThe entity must have its cloneable property set to true. The clone has a modified name, other \rproperties set per its clone related-properties, and its clone-related properties are set to defaults."}}, + {"Entities.getEntityProperties":{"prefix":"Entities.getEntityProperties","body":["Entities.getEntityProperties(${1:entityID: Uuid},${2:desiredProperties: Array.})"],"description":"Get the properties of an entity."}}, + {"Entities.editEntity":{"prefix":"Entities.editEntity","body":["Entities.editEntity(${1:entityID: Uuid},${2:properties: Entities.EntityProperties})"],"description":"Update an entity with specified properties."}}, + {"Entities.deleteEntity":{"prefix":"Entities.deleteEntity","body":["Entities.deleteEntity(${1:entityID: Uuid})"],"description":"Delete an entity."}}, + {"Entities.callEntityMethod":{"prefix":"Entities.callEntityMethod","body":["Entities.callEntityMethod(${1:entityID: Uuid},${2:method: string},${3:parameters: Array.})"],"description":"Call a method in a client entity script from a client script or client entity script, or call a method in a server \rentity script from a server entity script. The entity script method must be exposed as a property in the target client \rentity script. Additionally, if calling a server entity script, the server entity script must include the method's name \rin an exposed property called remotelyCallable that is an array of method names that can be called."}}, + {"Entities.callEntityServerMethod":{"prefix":"Entities.callEntityServerMethod","body":["Entities.callEntityServerMethod(${1:entityID: Uuid},${2:method: string},${3:parameters: Array.})"],"description":"Call a method in a server entity script from a client script or client entity script. The entity script method must be \rexposed as a property in the target server entity script. Additionally, the target server entity script must include the \rmethod's name in an exposed property called remotelyCallable that is an array of method names that can be \rcalled."}}, + {"Entities.callEntityClientMethod":{"prefix":"Entities.callEntityClientMethod","body":["Entities.callEntityClientMethod(${1:clientSessionID: Uuid},${2:entityID: Uuid},${3:method: string},${4:parameters: Array.})"],"description":"Call a method in a specific user's client entity script from a server entity script. The entity script method must be \rexposed as a property in the target client entity script."}}, + {"Entities.findClosestEntity":{"prefix":"Entities.findClosestEntity","body":["Entities.findClosestEntity(${1:center: Vec3},${2:radius: number})"],"description":"Find the entity with a position closest to a specified point and within a specified radius."}}, + {"Entities.findEntities":{"prefix":"Entities.findEntities","body":["Entities.findEntities(${1:center: Vec3},${2:radius: number})"],"description":"Find all entities that intersect a sphere defined by a center point and radius."}}, + {"Entities.findEntitiesInBox":{"prefix":"Entities.findEntitiesInBox","body":["Entities.findEntitiesInBox(${1:corner: Vec3},${2:dimensions: Vec3})"],"description":"Find all entities whose axis-aligned boxes intersect a search axis-aligned box defined by its minimum coordinates corner\rand dimensions."}}, + {"Entities.findEntitiesInFrustum":{"prefix":"Entities.findEntitiesInFrustum","body":["Entities.findEntitiesInFrustum(${1:frustum: ViewFrustum})"],"description":"Find all entities whose axis-aligned boxes intersect a search frustum."}}, + {"Entities.findEntitiesByType":{"prefix":"Entities.findEntitiesByType","body":["Entities.findEntitiesByType(${1:entityType: Entities.EntityType},${2:center: Vec3},${3:radius: number})"],"description":"Find all entities of a particular type that intersect a sphere defined by a center point and radius."}}, + {"Entities.findEntitiesByName":{"prefix":"Entities.findEntitiesByName","body":["Entities.findEntitiesByName(${1:entityName: string},${2:center: Vec3},${3:radius: number},${4:caseSensitive: boolean})"],"description":"Find all entities of a particular name that intersect a sphere defined by a center point and radius."}}, + {"Entities.findRayIntersection":{"prefix":"Entities.findRayIntersection","body":["Entities.findRayIntersection(${1:pickRay: PickRay},${2:precisionPicking: boolean},${3:entitiesToInclude: Array.},${4:entitiesToDiscard: Array.},${5:visibleOnly: boolean},${6:collideableOnly: boolean})"],"description":"Find the first entity intersected by a {@link PickRay}. Light and Zone entities are not \rintersected unless they've been configured as pickable using {@link Entities.setLightsArePickable|setLightsArePickable}\rand {@link Entities.setZonesArePickable|setZonesArePickable}, respectively.
"}}, + {"Entities.findRayIntersectionBlocking":{"prefix":"Entities.findRayIntersectionBlocking","body":["Entities.findRayIntersectionBlocking(${1:pickRay: PickRay},${2:precisionPicking: boolean},${3:entitiesToInclude: Array.},${4:entitiesToDiscard: Array.})"],"description":"Find the first entity intersected by a {@link PickRay}. Light and Zone entities are not \rintersected unless they've been configured as pickable using {@link Entities.setLightsArePickable|setLightsArePickable} \rand {@link Entities.setZonesArePickable|setZonesArePickable}, respectively.
\rThis is a synonym for {@link Entities.findRayIntersection|findRayIntersection}."}}, + {"Entities.reloadServerScripts":{"prefix":"Entities.reloadServerScripts","body":["Entities.reloadServerScripts(${1:entityID: Uuid})"],"description":"Reloads an entity's server entity script such that the latest version re-downloaded."}}, + {"Entities.getServerScriptStatus":{"prefix":"Entities.getServerScriptStatus","body":["Entities.getServerScriptStatus(${1:entityID: Uuid},${2:callback: Entities~getServerScriptStatusCallback})"],"description":"Gets the status of server entity script attached to an entity"}}, + {"Entities~getServerScriptStatusCallback":{"prefix":"Entities~getServerScriptStatusCallback","body":["Entities~getServerScriptStatusCallback(${1:success: boolean},${2:isRunning: boolean},${3:status: string},${4:errorInfo: string})"],"description":"Called when {@link Entities.getServerScriptStatus} is complete."}}, + {"Entities.queryPropertyMetadata":{"prefix":"Entities.queryPropertyMetadata","body":["Entities.queryPropertyMetadata(${1:entityID: Uuid},${2:property: string},${3:callback: Entities~queryPropertyMetadataCallback})"],"description":"Get metadata for certain entity properties such as script and serverScripts."}}, + {"Entities.queryPropertyMetadata":{"prefix":"Entities.queryPropertyMetadata","body":["Entities.queryPropertyMetadata(${1:entityID: Uuid},${2:property: string},${3:scope: object},${4:callback: Entities~queryPropertyMetadataCallback})"],"description":"Get metadata for certain entity properties such as script and serverScripts."}}, + {"Entities~queryPropertyMetadataCallback":{"prefix":"Entities~queryPropertyMetadataCallback","body":["Entities~queryPropertyMetadataCallback(${1:error: string},${2:result: object})"],"description":"Called when {@link Entities.queryPropertyMetadata} is complete."}}, + {"Entities.setLightsArePickable":{"prefix":"Entities.setLightsArePickable","body":["Entities.setLightsArePickable(${1:value: boolean})"],"description":"Set whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Light} entities. By default, Light \rentities are not intersected. The setting lasts for the Interface session. Ray picks are done using \r {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs."}}, + {"Entities.getLightsArePickable":{"prefix":"Entities.getLightsArePickable","body":["Entities.getLightsArePickable"],"description":"Get whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Light} entities. Ray picks are \r done using {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs."}}, + {"Entities.setZonesArePickable":{"prefix":"Entities.setZonesArePickable","body":["Entities.setZonesArePickable(${1:value: boolean})"],"description":"Set whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Zone} entities. By default, Light \rentities are not intersected. The setting lasts for the Interface session. Ray picks are done using \r {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs."}}, + {"Entities.getZonesArePickable":{"prefix":"Entities.getZonesArePickable","body":["Entities.getZonesArePickable"],"description":"Get whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Zone} entities. Ray picks are \r done using {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs."}}, + {"Entities.setDrawZoneBoundaries":{"prefix":"Entities.setDrawZoneBoundaries","body":["Entities.setDrawZoneBoundaries(${1:value: boolean})"],"description":"Set whether or not {@link Entities.EntityType|Zone} entities' boundaries should be drawn. Currently not used."}}, + {"Entities.getDrawZoneBoundaries":{"prefix":"Entities.getDrawZoneBoundaries","body":["Entities.getDrawZoneBoundaries"],"description":"Get whether or not {@link Entities.EntityType|Zone} entities' boundaries should be drawn. Currently not used."}}, + {"Entities.setVoxelSphere":{"prefix":"Entities.setVoxelSphere","body":["Entities.setVoxelSphere(${1:entityID: Uuid},${2:center: Vec3},${3:radius: number},${4:value: number})"],"description":"Set the values of all voxels in a spherical portion of a {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities.setVoxelCapsule":{"prefix":"Entities.setVoxelCapsule","body":["Entities.setVoxelCapsule(${1:entityID: Uuid},${2:start: Vec3},${3:end: Vec3},${4:radius: number},${5:value: number})"],"description":"Set the values of all voxels in a capsule-shaped portion of a {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities.setVoxel":{"prefix":"Entities.setVoxel","body":["Entities.setVoxel(${1:entityID: Uuid},${2:position: Vec3},${3:value: number})"],"description":"Set the value of a particular voxels in a {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities.setAllVoxels":{"prefix":"Entities.setAllVoxels","body":["Entities.setAllVoxels(${1:entityID: Uuid},${2:value: number})"],"description":"Set the values of all voxels in a {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities.setVoxelsInCuboid":{"prefix":"Entities.setVoxelsInCuboid","body":["Entities.setVoxelsInCuboid(${1:entityID: Uuid},${2:lowPosition: Vec3},${3:cuboidSize: Vec3},${4:value: number})"],"description":"Set the values of all voxels in a cubic portion of a {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities.voxelCoordsToWorldCoords":{"prefix":"Entities.voxelCoordsToWorldCoords","body":["Entities.voxelCoordsToWorldCoords(${1:entityID: Uuid},${2:voxelCoords: Vec3})"],"description":"Convert voxel coordinates in a {@link Entities.EntityType|PolyVox} entity to world coordinates. Voxel coordinates are \rrelative to the minimum axes values corner of the entity with a scale of Vec3.ONE being the dimensions of \reach voxel."}}, + {"Entities.worldCoordsToVoxelCoords":{"prefix":"Entities.worldCoordsToVoxelCoords","body":["Entities.worldCoordsToVoxelCoords(${1:entityID: Uuid},${2:worldCoords: Vec3})"],"description":"Convert world coordinates to voxel coordinates in a {@link Entities.EntityType|PolyVox} entity. Voxel coordinates are \rrelative to the minimum axes values corner of the entity, with a scale of Vec3.ONE being the dimensions of \reach voxel."}}, + {"Entities.voxelCoordsToLocalCoords":{"prefix":"Entities.voxelCoordsToLocalCoords","body":["Entities.voxelCoordsToLocalCoords(${1:entityID: Uuid},${2:voxelCoords: Vec3})"],"description":"Convert voxel coordinates in a {@link Entities.EntityType|PolyVox} entity to local coordinates relative to the minimum \raxes value corner of the entity, with the scale being the same as world coordinates."}}, + {"Entities.localCoordsToVoxelCoords":{"prefix":"Entities.localCoordsToVoxelCoords","body":["Entities.localCoordsToVoxelCoords(${1:entityID: Uuid},${2:localCoords: Vec3})"],"description":"Convert local coordinates to voxel coordinates in a {@link Entities.EntityType|PolyVox} entity. Local coordinates are \rrelative to the minimum axes value corner of the entity, with the scale being the same as world coordinates."}}, + {"Entities.setAllPoints":{"prefix":"Entities.setAllPoints","body":["Entities.setAllPoints(${1:entityID: Uuid},${2:points: Array.})"],"description":"Set the linePoints property of a {@link Entities.EntityType|Line} entity."}}, + {"Entities.appendPoint":{"prefix":"Entities.appendPoint","body":["Entities.appendPoint(${1:entityID: Uuid},${2:point: Vec3})"],"description":"Append a point to a {@link Entities.EntityType|Line} entity."}}, + {"Entities.dumpTree":{"prefix":"Entities.dumpTree","body":["Entities.dumpTree"],"description":"Dumps debug information about all entities in Interface's local in-memory tree of entities it knows about — domain\rand client-only — to the program log."}}, + {"Entities.addAction":{"prefix":"Entities.addAction","body":["Entities.addAction(${1:actionType: Entities.ActionType},${2:entityID: Uuid},${3:arguments: Entities.ActionArguments})"],"description":"Add an action to an entity. An action is registered with the physics engine and is applied every physics simulation \rstep. Any entity may have more than one action associated with it, but only as many as will fit in an entity's \ractionData property."}}, + {"Entities.updateAction":{"prefix":"Entities.updateAction","body":["Entities.updateAction(${1:entityID: Uuid},${2:actionID: Uuid},${3:arguments: Entities.ActionArguments})"],"description":"Update an entity action."}}, + {"Entities.deleteAction":{"prefix":"Entities.deleteAction","body":["Entities.deleteAction(${1:entityID: Uuid},${2:actionID: Uuid})"],"description":"Delete an action from an entity."}}, + {"Entities.getActionIDs":{"prefix":"Entities.getActionIDs","body":["Entities.getActionIDs(${1:entityID: Uuid})"],"description":"Get the IDs of the actions that are associated with an entity."}}, + {"Entities.getActionArguments":{"prefix":"Entities.getActionArguments","body":["Entities.getActionArguments(${1:entityID: Uuid},${2:actionID: Uuid})"],"description":"Get the arguments of an action."}}, + {"Entities.getAbsoluteJointTranslationInObjectFrame":{"prefix":"Entities.getAbsoluteJointTranslationInObjectFrame","body":["Entities.getAbsoluteJointTranslationInObjectFrame(${1:entityID: Uuid},${2:jointIndex: number})"],"description":"Get the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation."}}, + {"Entities.getAbsoluteJointRotationInObjectFrame":{"prefix":"Entities.getAbsoluteJointRotationInObjectFrame","body":["Entities.getAbsoluteJointRotationInObjectFrame(${1:entityID: Uuid},${2:jointIndex: number})"],"description":"Get the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation."}}, + {"Entities.setAbsoluteJointTranslationInObjectFrame":{"prefix":"Entities.setAbsoluteJointTranslationInObjectFrame","body":["Entities.setAbsoluteJointTranslationInObjectFrame(${1:entityID: Uuid},${2:jointIndex: number},${3:translation: Vec3})"],"description":"Set the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation."}}, + {"Entities.setAbsoluteJointRotationInObjectFrame":{"prefix":"Entities.setAbsoluteJointRotationInObjectFrame","body":["Entities.setAbsoluteJointRotationInObjectFrame(${1:entityID: Uuid},${2:jointIndex: number},${3:rotation: Quat})"],"description":"Set the rotation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation."}}, + {"Entities.getLocalJointTranslation":{"prefix":"Entities.getLocalJointTranslation","body":["Entities.getLocalJointTranslation(${1:entityID: Uuid},${2:jointIndex: number})"],"description":"Get the local translation of a joint in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.getLocalJointRotation":{"prefix":"Entities.getLocalJointRotation","body":["Entities.getLocalJointRotation(${1:entityID: Uuid},${2:jointIndex: number})"],"description":"Get the local rotation of a joint in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.setLocalJointTranslation":{"prefix":"Entities.setLocalJointTranslation","body":["Entities.setLocalJointTranslation(${1:entityID: Uuid},${2:jointIndex: number},${3:translation: Vec3})"],"description":"Set the local translation of a joint in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.setLocalJointRotation":{"prefix":"Entities.setLocalJointRotation","body":["Entities.setLocalJointRotation(${1:entityID: Uuid},${2:jointIndex: number},${3:rotation: Quat})"],"description":"Set the local rotation of a joint in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.setLocalJointTranslations":{"prefix":"Entities.setLocalJointTranslations","body":["Entities.setLocalJointTranslations(${1:entityID: Uuid},${2:translations: Array.})"],"description":"Set the local translations of joints in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.setLocalJointRotations":{"prefix":"Entities.setLocalJointRotations","body":["Entities.setLocalJointRotations(${1:entityID: Uuid},${2:rotations: Array.})"],"description":"Set the local rotations of joints in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.setLocalJointsData":{"prefix":"Entities.setLocalJointsData","body":["Entities.setLocalJointsData(${1:entityID: Uuid},${2:rotations: Array.},${3:translations: Array.})"],"description":"Set the local rotations and translations of joints in a {@link Entities.EntityType|Model} entity. This is the same as \rcalling both {@link Entities.setLocalJointRotations|setLocalJointRotations} and \r{@link Entities.setLocalJointTranslations|setLocalJointTranslations} at the same time."}}, + {"Entities.getJointIndex":{"prefix":"Entities.getJointIndex","body":["Entities.getJointIndex(${1:entityID: Uuid},${2:name: string})"],"description":"Get the index of a named joint in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.getJointNames":{"prefix":"Entities.getJointNames","body":["Entities.getJointNames(${1:entityID: Uuid})"],"description":"Get the names of all the joints in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.getChildrenIDs":{"prefix":"Entities.getChildrenIDs","body":["Entities.getChildrenIDs(${1:parentID: Uuid})"],"description":"Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model. Recurse on the IDs returned by the function to get all descendants of an entity, overlay, or avatar."}}, + {"Entities.getChildrenIDsOfJoint":{"prefix":"Entities.getChildrenIDsOfJoint","body":["Entities.getChildrenIDsOfJoint(${1:parentID: Uuid},${2:jointIndex: number})"],"description":"Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model's joint."}}, + {"Entities.isChildOfParent":{"prefix":"Entities.isChildOfParent","body":["Entities.isChildOfParent(${1:childID: Uuid},${2:parentID: Uuid})"],"description":"Check whether an entity or overlay has an entity as an ancestor (parent, parent's parent, etc.)."}}, + {"Entities.getNestableType":{"prefix":"Entities.getNestableType","body":["Entities.getNestableType(${1:entityID: Uuid})"],"description":"Get the type — entity, overlay, or avatar — of an in-world item."}}, + {"Entities.getKeyboardFocusEntity":{"prefix":"Entities.getKeyboardFocusEntity","body":["Entities.getKeyboardFocusEntity"],"description":"Get the ID of the {@link Entities.EntityType|Web} entity that has keyboard focus."}}, + {"Entities.setKeyboardFocusEntity":{"prefix":"Entities.setKeyboardFocusEntity","body":["Entities.setKeyboardFocusEntity(${1:entityID: Uuid})"],"description":"Set the {@link Entities.EntityType|Web} entity that has keyboard focus."}}, + {"Entities.sendMousePressOnEntity":{"prefix":"Entities.sendMousePressOnEntity","body":["Entities.sendMousePressOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.mousePressOnEntity|mousePressOnEntity} event."}}, + {"Entities.sendMouseMoveOnEntity":{"prefix":"Entities.sendMouseMoveOnEntity","body":["Entities.sendMouseMoveOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.mouseMoveOnEntity|mouseMoveOnEntity} event."}}, + {"Entities.sendMouseReleaseOnEntity":{"prefix":"Entities.sendMouseReleaseOnEntity","body":["Entities.sendMouseReleaseOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.mouseReleaseOnEntity|mouseReleaseOnEntity} event."}}, + {"Entities.sendClickDownOnEntity":{"prefix":"Entities.sendClickDownOnEntity","body":["Entities.sendClickDownOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.clickDownOnEntity|clickDownOnEntity} event."}}, + {"Entities.sendHoldingClickOnEntity":{"prefix":"Entities.sendHoldingClickOnEntity","body":["Entities.sendHoldingClickOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.holdingClickOnEntity|holdingClickOnEntity} event."}}, + {"Entities.sendClickReleaseOnEntity":{"prefix":"Entities.sendClickReleaseOnEntity","body":["Entities.sendClickReleaseOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.clickReleaseOnEntity|clickReleaseOnEntity} event."}}, + {"Entities.sendHoverEnterEntity":{"prefix":"Entities.sendHoverEnterEntity","body":["Entities.sendHoverEnterEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.hoverEnterEntity|hoverEnterEntity} event."}}, + {"Entities.sendHoverOverEntity":{"prefix":"Entities.sendHoverOverEntity","body":["Entities.sendHoverOverEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.hoverOverEntity|hoverOverEntity} event."}}, + {"Entities.sendHoverLeaveEntity":{"prefix":"Entities.sendHoverLeaveEntity","body":["Entities.sendHoverLeaveEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.hoverLeaveEntity|hoverLeaveEntity} event."}}, + {"Entities.wantsHandControllerPointerEvents":{"prefix":"Entities.wantsHandControllerPointerEvents","body":["Entities.wantsHandControllerPointerEvents(${1:entityID: Uuid})"],"description":"Check whether an entity wants hand controller pointer events. For example, a {@link Entities.EntityType|Web} entity does \rbut a {@link Entities.EntityType|Shape} entity doesn't."}}, + {"Entities.emitScriptEvent":{"prefix":"Entities.emitScriptEvent","body":["Entities.emitScriptEvent(${1:entityID: Uuid},${2:message: string})"],"description":"Send a script event over a {@link Entities.EntityType|Web} entity's EventBridge to the Web page's scripts."}}, + {"Entities.AABoxIntersectsCapsule":{"prefix":"Entities.AABoxIntersectsCapsule","body":["Entities.AABoxIntersectsCapsule(${1:brn: Vec3},${2:dimensions: Vec3},${3:start: Vec3},${4:end: Vec3},${5:radius: number})"],"description":"Check whether an axis-aligned box and a capsule intersect."}}, + {"Entities.getMeshes":{"prefix":"Entities.getMeshes","body":["Entities.getMeshes(${1:entityID: Uuid},${2:callback: Entities~getMeshesCallback})"],"description":"Get the meshes in a {@link Entities.EntityType|Model} or {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities~getMeshesCallback":{"prefix":"Entities~getMeshesCallback","body":["Entities~getMeshesCallback(${1:meshes: Array.},${2:success: boolean})"],"description":"Called when {@link Entities.getMeshes} is complete."}}, + {"Entities.getEntityTransform":{"prefix":"Entities.getEntityTransform","body":["Entities.getEntityTransform(${1:entityID: Uuid})"],"description":"Get the object to world transform, excluding scale, of an entity."}}, + {"Entities.getEntityLocalTransform":{"prefix":"Entities.getEntityLocalTransform","body":["Entities.getEntityLocalTransform(${1:entityID: Uuid})"],"description":"Get the object to parent transform, excluding scale, of an entity."}}, + {"Entities.getStaticCertificateJSON":{"prefix":"Entities.getStaticCertificateJSON","body":["Entities.getStaticCertificateJSON(${1:entityID: Uuid})"],"description":"Get the static certificate for an entity. The static certificate contains static properties of the item which cannot \rbe altered."}}, + {"Entities.verifyStaticCertificateProperties":{"prefix":"Entities.verifyStaticCertificateProperties","body":["Entities.verifyStaticCertificateProperties(${1:entityID: Uuid})"],"description":"Verify the entity's proof of provenance, i.e., that the entity's certificateID property was produced by \rHigh Fidelity signing the entity's static certificate JSON."}}, + {"Entities.collisionWithEntity":{"prefix":"Entities.collisionWithEntity","body":["Entities.collisionWithEntity(${1:idA: Uuid},${2:idB: Uuid},${3:collision: Collision})"],"description":"Triggered on the client that is the physics simulation owner during the collision of two entities. Note: Isn't triggered \rfor a collision with an avatar."}}, + {"Entities.canAdjustLocksChanged":{"prefix":"Entities.canAdjustLocksChanged","body":["Entities.canAdjustLocksChanged(${1:canAdjustLocks: boolean})"],"description":"Triggered when your ability to change the locked property of entities changes."}}, + {"Entities.canRezChanged":{"prefix":"Entities.canRezChanged","body":["Entities.canRezChanged(${1:canRez: boolean})"],"description":"Triggered when your ability to rez (create) entities changes."}}, + {"Entities.canRezTmpChanged":{"prefix":"Entities.canRezTmpChanged","body":["Entities.canRezTmpChanged(${1:canRezTmp: boolean})"],"description":"Triggered when your ability to rez (create) temporary entities changes. Temporary entities are entities with a finite\rlifetime property value set."}}, + {"Entities.canRezCertifiedChanged":{"prefix":"Entities.canRezCertifiedChanged","body":["Entities.canRezCertifiedChanged(${1:canRezCertified: boolean})"],"description":"Triggered when your ability to rez (create) certified entities changes. Certified entities are entities that have PoP\rcertificates."}}, + {"Entities.canRezTmpCertifiedChanged":{"prefix":"Entities.canRezTmpCertifiedChanged","body":["Entities.canRezTmpCertifiedChanged(${1:canRezTmpCertified: boolean})"],"description":"Triggered when your ability to rez (create) temporary certified entities changes. Temporary entities are entities with a\rfinite lifetime property value set. Certified entities are entities that have PoP certificates."}}, + {"Entities.canWriteAssetsChanged":{"prefix":"Entities.canWriteAssetsChanged","body":["Entities.canWriteAssetsChanged(${1:canWriteAssets: boolean})"],"description":"Triggered when your ability to make changes to the asset server's assets changes."}}, + {"Entities.mousePressOnEntity":{"prefix":"Entities.mousePressOnEntity","body":["Entities.mousePressOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse button is clicked while the mouse cursor is on an entity, or a controller trigger is fully \rpressed while its laser is on an entity."}}, + {"Entities.mouseDoublePressOnEntity":{"prefix":"Entities.mouseDoublePressOnEntity","body":["Entities.mouseDoublePressOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse button is double-clicked while the mouse cursor is on an entity."}}, + {"Entities.mouseMoveOnEntity":{"prefix":"Entities.mouseMoveOnEntity","body":["Entities.mouseMoveOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Repeatedly triggered while the mouse cursor or controller laser moves on an entity."}}, + {"Entities.mouseReleaseOnEntity":{"prefix":"Entities.mouseReleaseOnEntity","body":["Entities.mouseReleaseOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse button is released after clicking on an entity or the controller trigger is partly or fully \rreleased after pressing on an entity, even if the mouse pointer or controller laser has moved off the entity."}}, + {"Entities.mousePressOffEntity":{"prefix":"Entities.mousePressOffEntity","body":["Entities.mousePressOffEntity(${1:event: PointerEvent})"],"description":"Triggered when a mouse button is clicked while the mouse cursor is not on an entity."}}, + {"Entities.mouseDoublePressOffEntity":{"prefix":"Entities.mouseDoublePressOffEntity","body":["Entities.mouseDoublePressOffEntity(${1:event: PointerEvent})"],"description":"Triggered when a mouse button is double-clicked while the mouse cursor is not on an entity."}}, + {"Entities.clickDownOnEntity":{"prefix":"Entities.clickDownOnEntity","body":["Entities.clickDownOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse button is clicked while the mouse cursor is on an entity. Note: Not triggered by controller."}}, + {"Entities.holdingClickOnEntity":{"prefix":"Entities.holdingClickOnEntity","body":["Entities.holdingClickOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Repeatedly triggered while a mouse button continues to be held after clicking an entity, even if the mouse cursor has \rmoved off the entity. Note: Not triggered by controller."}}, + {"Entities.clickReleaseOnEntity":{"prefix":"Entities.clickReleaseOnEntity","body":["Entities.clickReleaseOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse button is released after clicking on an entity, even if the mouse cursor has moved off the \rentity. Note: Not triggered by controller."}}, + {"Entities.hoverEnterEntity":{"prefix":"Entities.hoverEnterEntity","body":["Entities.hoverEnterEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when the mouse cursor or controller laser starts hovering on an entity."}}, + {"Entities.hoverOverEntity":{"prefix":"Entities.hoverOverEntity","body":["Entities.hoverOverEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Repeatedly triggered when the mouse cursor or controller laser moves while hovering over an entity."}}, + {"Entities.hoverLeaveEntity":{"prefix":"Entities.hoverLeaveEntity","body":["Entities.hoverLeaveEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when the mouse cursor or controller laser stops hovering over an entity."}}, + {"Entities.enterEntity":{"prefix":"Entities.enterEntity","body":["Entities.enterEntity(${1:entityID: Uuid})"],"description":"Triggered when an avatar enters an entity."}}, + {"Entities.leaveEntity":{"prefix":"Entities.leaveEntity","body":["Entities.leaveEntity(${1:entityID: Uuid})"],"description":"Triggered when an avatar leaves an entity."}}, + {"Entities.deletingEntity":{"prefix":"Entities.deletingEntity","body":["Entities.deletingEntity(${1:entityID: Uuid})"],"description":"Triggered when an entity is deleted."}}, + {"Entities.addingEntity":{"prefix":"Entities.addingEntity","body":["Entities.addingEntity(${1:entityID: Uuid})"],"description":"Triggered when an entity is added to Interface's local in-memory tree of entities it knows about. This may occur when \rentities are loaded upon visiting a domain, when the user rotates their view so that more entities become visible, and \rwhen a domain or client-only entity is added (e.g., by {@Entities.addEntity|addEntity})."}}, + {"Entities.clearingEntities":{"prefix":"Entities.clearingEntities","body":["Entities.clearingEntities"],"description":"Triggered when you disconnect from a domain, at which time Interface's local in-memory tree of entities it knows about\ris cleared."}}, + {"Entities.webEventReceived":{"prefix":"Entities.webEventReceived","body":["Entities.webEventReceived(${1:entityID: Uuid},${2:message: string})"],"description":"Triggered in when a script in a {@link Entities.EntityType|Web} entity's Web page script sends an event over the \rscript's EventBridge."}}, + {"Entities.EntityType":{"prefix":"Entities.EntityType","body":["Entities.EntityType"],"description":"

An entity may be one of the following types:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescriptionProperties
\"Box\"A rectangular prism. This is a synonym of \"Shape\" for the case \r where the entity's shape property value is \"Cube\".
\r If an entity is created with its type \r set to \"Box\" it will always be created with a shape property value of \r \"Cube\". If an entity of type Shape or Sphere has its shape set \r to \"Cube\" then its type will be reported as \"Box\".\r
{@link Entities.EntityProperties-Box|EntityProperties-Box}
\"Light\"A local lighting effect.{@link Entities.EntityProperties-Light|EntityProperties-Light}
\"Line\"A sequence of one or more simple straight lines.{@link Entities.EntityProperties-Line|EntityProperties-Line}
\"Material\"Modifies the existing materials on Model entities, Shape entities (albedo \r only), {@link Overlays.OverlayType|model overlays}, and avatars.{@link Entities.EntityProperties-Material|EntityProperties-Material}
\"Model\"A mesh model from an FBX or OBJ file.{@link Entities.EntityProperties-Model|EntityProperties-Model}
\"ParticleEffect\"A particle system that can be used to simulate things such as fire, \r smoke, snow, magic spells, etc.{@link Entities.EntityProperties-ParticleEffect|EntityProperties-ParticleEffect}
\"PolyLine\"A sequence of one or more textured straight lines.{@link Entities.EntityProperties-PolyLine|EntityProperties-PolyLine}
\"PolyVox\"A set of textured voxels.{@link Entities.EntityProperties-PolyVox|EntityProperties-PolyVox}
\"Shape\"A basic entity such as a cube.\r See also, the \"Box\" and \"Sphere\" entity types.{@link Entities.EntityProperties-Shape|EntityProperties-Shape}
\"Sphere\"A sphere. This is a synonym of \"Shape\" for the case\r where the entity's shape property value is \"Sphere\".
\r If an entity is created with its type\r set to \"Sphere\" it will always be created with a shape property value of\r \"Sphere\". If an entity of type Box or Shape has its shape set\r to \"Sphere\" then its type will be reported as \"Sphere\".\r
{@link Entities.EntityProperties-Sphere|EntityProperties-Sphere}
\"Text\"A pane of text oriented in space.{@link Entities.EntityProperties-Text|EntityProperties-Text}
\"Web\"A browsable Web page.{@link Entities.EntityProperties-Web|EntityProperties-Web}
\"Zone\"A volume of lighting effects and avatar permissions.{@link Entities.EntityProperties-Zone|EntityProperties-Zone}
"}}, + {"Entities.Haze":{"prefix":"Entities.Haze","body":["Entities.Haze"],"description":"Haze is defined by the following properties."}}, + {"Entities.KeyLight":{"prefix":"Entities.KeyLight","body":["Entities.KeyLight"],"description":"A key light is defined by the following properties."}}, + {"Entities.PolyVoxSurfaceStyle":{"prefix":"Entities.PolyVoxSurfaceStyle","body":["Entities.PolyVoxSurfaceStyle"],"description":"

A PolyVoxSurfaceStyle may be one of the following:

\r\r \r \r \r \r \r \r \r \r \r
ValueTypeDescription
0Marching cubes.Chamfered edges. Open volume.\r Joins neighboring PolyVox entities reasonably well.
1Cubic.Square edges. Open volume.\r Joins neighboring PolyVox entities cleanly.
2Edged cubic.Square edges. Enclosed volume.\r Joins neighboring PolyVox entities cleanly.
3Edged marching cubes.Chamfered edges. Enclosed volume.\r Doesn't join neighboring PolyVox entities.
"}}, + {"Entities.Shape":{"prefix":"Entities.Shape","body":["Entities.Shape"],"description":"

A Shape, Box, or Sphere {@link Entities.EntityType|EntityType} may display as \rone of the following geometrical shapes:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDimensionsNotes
\"Circle\"2DA circle oriented in 3D.
\"Cube\"3D
\"Cone\"3D
\"Cylinder\"3D
\"Dodecahedron\"3D
\"Hexagon\"3DA hexagonal prism.
\"Icosahedron\"3D
\"Octagon\"3DAn octagonal prism.
\"Octahedron\"3D
\"Quad\"2DA square oriented in 3D.
\"Sphere\"3D
\"Tetrahedron\"3D
\"Torus\"3DNot implemented.
\"Triangle\"3DA triangular prism.
"}}, + {"Entities.Skybox":{"prefix":"Entities.Skybox","body":["Entities.Skybox"],"description":"A skybox is defined by the following properties."}}, + {"FBXAnimationFrame":{"prefix":"FBXAnimationFrame","body":["FBXAnimationFrame"]}}, + {"Graphics.Topology":{"prefix":"Graphics.Topology","body":["Graphics.Topology"],"description":"\r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
0Points.
1Lines.
2Line strip.
3Triangles.
4Triangle strip.
5Quads.
6Quad strip.
"}}, + {"Graphics.Material":{"prefix":"Graphics.Material","body":["Graphics.Material"]}}, + {"Graphics.MaterialLayer":{"prefix":"Graphics.MaterialLayer","body":["Graphics.MaterialLayer"]}}, + {"Graphics.IFSData":{"prefix":"Graphics.IFSData","body":["Graphics.IFSData"]}}, + {"Graphics":{"prefix":"Graphics","body":["Graphics"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The experimental Graphics API (experimental) lets you query and manage certain graphics-related structures (like underlying meshes and textures) from scripting."}}, + {"Graphics.getModel":{"prefix":"Graphics.getModel","body":["Graphics.getModel(${1:entityID: UUID})"],"description":"Returns a model reference object associated with the specified UUID ({@link EntityID}, {@link OverlayID}, or {@link AvatarID})."}}, + {"Graphics.updateModel":{"prefix":"Graphics.updateModel","body":["Graphics.updateModel(${1:id: Uuid},${2:model: Graphics.Model})"]}}, + {"Graphics.canUpdateModel":{"prefix":"Graphics.canUpdateModel","body":["Graphics.canUpdateModel(${1:id: Uuid},${2:meshIndex: number},${3:partNumber: number})"]}}, + {"Graphics.newModel":{"prefix":"Graphics.newModel","body":["Graphics.newModel(${1:meshes: Array.})"]}}, + {"Graphics.newMesh":{"prefix":"Graphics.newMesh","body":["Graphics.newMesh(${1:ifsMeshData: Graphics.IFSData})"],"description":"Create a new Mesh / Mesh Part with the specified data buffers."}}, + {"Graphics.exportModelToOBJ":{"prefix":"Graphics.exportModelToOBJ","body":["Graphics.exportModelToOBJ(${1:model: Graphics.Model})"]}}, + {"Graphics.Mesh":{"prefix":"Graphics.Mesh","body":["Graphics.Mesh"]}}, + {"Graphics.MeshPart":{"prefix":"Graphics.MeshPart","body":["Graphics.MeshPart"]}}, + {"Graphics.Model":{"prefix":"Graphics.Model","body":["Graphics.Model"]}}, + {"Controller.Hardware-Keyboard":{"prefix":"Controller.Hardware-Keyboard","body":["Controller.Hardware-Keyboard"],"description":"

The Controller.Hardware.Keyboard object has properties representing keyboard, mouse, and display touch \revents. The property values are integer IDs, uniquely identifying each output. Read-only. These can be mapped to \ractions or functions or Controller.Standard items in a {@link RouteObject} mapping. For presses, each data \rvalue is either 1.0 for \"true\" or 0.0 for \"false\".

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
09numbernumberA \"0\" – \"1\" key on the \r keyboard or keypad is pressed.
AZnumbernumberA \"A\" – \"Z\" key on the \r keyboard is pressed.
SpacenumbernumberThe space bar on the keyboard is pressed.
TabnumbernumberThe tab key on the keyboard is pressed.
ShiftnumbernumberThe shift key on the keyboard is pressed.
ControlnumbernumberThe control key on the keyboard is pressed. (The \r \"Command\" key on OSX.)
LeftnumbernumberThe left arrow key on the keyboard or keypad is pressed.\r
RightnumbernumberThe right arrow key on the keyboard or keypad is \r pressed.
UpnumbernumberThe up arrow key on the keyboard or keypad is pressed.\r
DownnumbernumberThe down arrow key on the keyboard or keypad is pressed.\r
PgUpnumbernumberThe page up key on the keyboard or keypad is pressed.\r
PgDownnumbernumberThe page down key on the keyboard or keypad is pressed.\r
LeftMouseButtonnumbernumberThe left mouse button pressed.
MiddleMouseButtonnumbernumberThe middle mouse button pressed.
RightMouseButtonnumbernumberThe right mouse button pressed.
LeftMouseClickednumbernumberThe left mouse button clicked.
MiddleMouseClickednumbernumberThe middle mouse button clicked.
RightMouseClickednumbernumberThe right mouse button clicked.
MouseMoveRightnumbernumberThe mouse moved right.
MouseMoveLeftnumbernumberThe mouse moved left.
MouseMoveUpnumbernumberThe mouse moved up.
MouseMoveDownnumbernumberThe mouse moved down.
MouseXnumbernumberThe mouse x-coordinate changed. The data value is its \r new x-coordinate value.
MouseYnumbernumberThe mouse y-coordinate changed. The data value is its \r new y-coordinate value.
MouseWheelRightnumbernumberThe mouse wheel rotated left. The data value \r is the number of units rotated (typically 1.0).
MouseWheelLeftnumbernumberThe mouse wheel rotated left. The data value \r is the number of units rotated (typically 1.0).
MouseWheelUpnumbernumberThe mouse wheel rotated up. The data value \r is the number of units rotated (typically 1.0).
MouseWheelDownnumbernumberThe mouse wheel rotated down. The data value \r is the number of units rotated (typically 1.0).
TouchpadRightnumbernumberThe average touch on a touch-enabled device \r moved right. The data value is how far the average position of all touch points moved.
TouchpadLeftnumbernumberThe average touch on a touch-enabled device \r moved left. The data value is how far the average position of all touch points moved.
TouchpadUpnumbernumberThe average touch on a touch-enabled device \r moved up. The data value is how far the average position of all touch points moved.
TouchpadDownnumbernumberThe average touch on a touch-enabled device \r moved down. The data value is how far the average position of all touch points moved.
"}}, + {"Midi":{"prefix":"Midi","body":["Midi"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Midi.sendRawDword":{"prefix":"Midi.sendRawDword","body":["Midi.sendRawDword(${1:device: number},${2:raw: number})"],"description":"Send Raw MIDI packet to a particular device."}}, + {"Midi.sendMidiMessage":{"prefix":"Midi.sendMidiMessage","body":["Midi.sendMidiMessage(${1:device: number},${2:channel: number},${3:type: number},${4:note: number},${5:velocity: number})"],"description":"Send MIDI message to a particular device."}}, + {"Midi.playMidiNote":{"prefix":"Midi.playMidiNote","body":["Midi.playMidiNote(${1:status: number},${2:note: number},${3:velocity: number})"],"description":"Play a note on all connected devices."}}, + {"Midi.allNotesOff":{"prefix":"Midi.allNotesOff","body":["Midi.allNotesOff"],"description":"Turn off all notes on all connected devices."}}, + {"Midi.resetDevices":{"prefix":"Midi.resetDevices","body":["Midi.resetDevices"],"description":"Clean up and re-discover attached devices."}}, + {"Midi.listMidiDevices":{"prefix":"Midi.listMidiDevices","body":["Midi.listMidiDevices(${1:output: boolean})"],"description":"Get a list of inputs/outputs."}}, + {"Midi.blockMidiDevice":{"prefix":"Midi.blockMidiDevice","body":["Midi.blockMidiDevice(${1:name: string},${2:output: boolean})"],"description":"Block an input/output by name."}}, + {"Midi.unblockMidiDevice":{"prefix":"Midi.unblockMidiDevice","body":["Midi.unblockMidiDevice(${1:name: string},${2:output: boolean})"],"description":"Unblock an input/output by name."}}, + {"Midi.thruModeEnable":{"prefix":"Midi.thruModeEnable","body":["Midi.thruModeEnable(${1:enable: boolean})"],"description":"Repeat all incoming notes to all outputs (default disabled)."}}, + {"Midi.broadcastEnable":{"prefix":"Midi.broadcastEnable","body":["Midi.broadcastEnable(${1:enable: boolean})"],"description":"Broadcast on all unblocked devices."}}, + {"Midi.typeNoteOffEnable":{"prefix":"Midi.typeNoteOffEnable","body":["Midi.typeNoteOffEnable(${1:enable: boolean})"]}}, + {"Midi.typeNoteOnEnable":{"prefix":"Midi.typeNoteOnEnable","body":["Midi.typeNoteOnEnable(${1:enable: boolean})"]}}, + {"Midi.typePolyKeyPressureEnable":{"prefix":"Midi.typePolyKeyPressureEnable","body":["Midi.typePolyKeyPressureEnable(${1:enable: boolean})"]}}, + {"Midi.typeControlChangeEnable":{"prefix":"Midi.typeControlChangeEnable","body":["Midi.typeControlChangeEnable(${1:enable: boolean})"]}}, + {"Midi.typeProgramChangeEnable":{"prefix":"Midi.typeProgramChangeEnable","body":["Midi.typeProgramChangeEnable(${1:enable: boolean})"]}}, + {"Midi.typeChanPressureEnable":{"prefix":"Midi.typeChanPressureEnable","body":["Midi.typeChanPressureEnable(${1:enable: boolean})"]}}, + {"Midi.typePitchBendEnable":{"prefix":"Midi.typePitchBendEnable","body":["Midi.typePitchBendEnable(${1:enable: boolean})"]}}, + {"Midi.typeSystemMessageEnable":{"prefix":"Midi.typeSystemMessageEnable","body":["Midi.typeSystemMessageEnable(${1:enable: boolean})"]}}, + {"RGBS":{"prefix":"RGBS","body":["RGBS"],"description":"

An RGB or SRGB color value.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r
IndexTypeAttributesDefaultValue
0numberRed component value. Number in the range 0.01.0.
1numberGreen component value. Number in the range 0.01.0.
2numberBlue component value. Number in the range 0.01.0.
3boolean<optional>falseIf true then the color is an SRGB color.
"}}, + {"MaterialResource":{"prefix":"MaterialResource","body":["MaterialResource"],"description":"A material or set of materials such as may be used by a {@link Entities.EntityType|Material} entity."}}, + {"Material":{"prefix":"Material","body":["Material"],"description":"A material such as may be used by a {@link Entities.EntityType|Material} entity."}}, + {"ModelCache":{"prefix":"ModelCache","body":["ModelCache"],"description":"
Available in:Interface ScriptsClient Entity Scripts

API to manage model cache resources."}}, + {"TextureCache":{"prefix":"TextureCache","body":["TextureCache"],"description":"
Available in:Interface ScriptsClient Entity Scripts

API to manage texture cache resources."}}, + {"TextureCache.prefetch":{"prefix":"TextureCache.prefetch","body":["TextureCache.prefetch(${1:url: string},${2:type: number},${3:maxNumPixels: number})"]}}, + {"TextureCache.spectatorCameraFramebufferReset":{"prefix":"TextureCache.spectatorCameraFramebufferReset","body":["TextureCache.spectatorCameraFramebufferReset"]}}, + {"location":{"prefix":"location","body":["location"],"description":"
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

The location API provides facilities related to your current location in the metaverse.\r\r
Getter/Setter
\r

You can get and set your current metaverse address by directly reading a string value from and writing a string value to \rthe location object. This is an alternative to using the location.href property or this object's\rfunctions.

"}}, + {"location.LookupTrigger":{"prefix":"location.LookupTrigger","body":["location.LookupTrigger"],"description":"

The reasons for an address lookup via the metaverse API are defined by numeric values:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
NameValueDescription
UserInput0User-typed input.
Back1Address from a {@link location.goBack|goBack} call.
Forward2Address from a {@link location.goForward|goForward} call.
StartupFromSettings3Initial location at Interface start-up from settings.
DomainPathResponse4A named path in the domain.
Internal5An internal attempt to resolve an alternative path.
AttemptedRefresh6A refresh after connecting to a domain.
Suggestions7Address from the Goto dialog.
VisitUserFromPAL8User from the People dialog.
"}}, + {"location.handleLookupString":{"prefix":"location.handleLookupString","body":["location.handleLookupString(${1:address: string},${2:fromSuggestions: boolean})"],"description":"Go to a specified metaverse address."}}, + {"location.goToViewpointForPath":{"prefix":"location.goToViewpointForPath","body":["location.goToViewpointForPath(${1:path: string},${2:namedPath: string})"],"description":"Go to a position and orientation resulting from a lookup for a named path in the domain (set in the domain server's \rsettings)."}}, + {"location.goBack":{"prefix":"location.goBack","body":["location.goBack"],"description":"Go back to the previous location in your navigation history, if there is one."}}, + {"location.goForward":{"prefix":"location.goForward","body":["location.goForward"],"description":"Go forward to the next location in your navigation history, if there is one."}}, + {"location.goToLocalSandbox":{"prefix":"location.goToLocalSandbox","body":["location.goToLocalSandbox(${1:path: string},${2:trigger: location.LookupTrigger})"],"description":"Go to the local Sandbox server that's running on the same PC as Interface."}}, + {"location.goToEntry":{"prefix":"location.goToEntry","body":["location.goToEntry(${1:trigger: location.LookupTrigger})"],"description":"Go to the default \"welcome\" metaverse address."}}, + {"location.goToUser":{"prefix":"location.goToUser","body":["location.goToUser(${1:username: string},${2:matchOrientation: boolean})"],"description":"Go to the specified user's location."}}, + {"location.goToLastAddress":{"prefix":"location.goToLastAddress","body":["location.goToLastAddress"],"description":"Go to the last address tried. This will be the last URL tried from location.handleLookupString"}}, + {"location.canGoBack":{"prefix":"location.canGoBack","body":["location.canGoBack"],"description":"Returns if going back is possible."}}, + {"location.refreshPreviousLookup":{"prefix":"location.refreshPreviousLookup","body":["location.refreshPreviousLookup"],"description":"Refresh the current address, e.g., after connecting to a domain in order to position the user to the desired location."}}, + {"location.storeCurrentAddress":{"prefix":"location.storeCurrentAddress","body":["location.storeCurrentAddress"],"description":"Update your current metaverse location in Interface's {@link Settings} file as your last-known address. This can be used\rto ensure that you start up at that address if you exit Interface without a later address automatically being saved."}}, + {"location.copyAddress":{"prefix":"location.copyAddress","body":["location.copyAddress"],"description":"Copy your current metaverse address (i.e., location.href property value) to the OS clipboard."}}, + {"location.copyPath":{"prefix":"location.copyPath","body":["location.copyPath"],"description":"Copy your current metaverse location and orientation (i.e., location.pathname property value) to the OS \rclipboard."}}, + {"location.lookupShareableNameForDomainID":{"prefix":"location.lookupShareableNameForDomainID","body":["location.lookupShareableNameForDomainID(${1:domainID: Uuid})"],"description":"Retrieve and remember the place name for the given domain ID if the place name is not already known."}}, + {"location.lookupResultsFinished":{"prefix":"location.lookupResultsFinished","body":["location.lookupResultsFinished"],"description":"Triggered when looking up the details of a metaverse user or location to go to has completed (successfully or\runsuccessfully)."}}, + {"location.lookupResultIsOffline":{"prefix":"location.lookupResultIsOffline","body":["location.lookupResultIsOffline"],"description":"Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user is \roffline."}}, + {"location.lookupResultIsNotFound":{"prefix":"location.lookupResultIsNotFound","body":["location.lookupResultIsNotFound"],"description":"Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user could\rnot be found."}}, + {"location.possibleDomainChangeRequired":{"prefix":"location.possibleDomainChangeRequired","body":["location.possibleDomainChangeRequired(${1:domainURL: Url},${2:domainID: Uuid})"],"description":"Triggered when a request is made to go to an IP address."}}, + {"location.possibleDomainChangeRequiredViaICEForID":{"prefix":"location.possibleDomainChangeRequiredViaICEForID","body":["location.possibleDomainChangeRequiredViaICEForID(${1:iceServerHostName: string},${2:domainID: Uuid})"],"description":"Triggered when a request is made to go to a named domain or user."}}, + {"location.locationChangeRequired":{"prefix":"location.locationChangeRequired","body":["location.locationChangeRequired(${1:position: Vec3},${2:hasOrientationChange: boolean},${3:orientation: Quat},${4:shouldFaceLocation: boolean})"],"description":"Triggered when an attempt is made to send your avatar to a specified position on the current domain. For example, when\ryou change domains or enter a position to go to in the \"Goto\" dialog."}}, + {"location.pathChangeRequired":{"prefix":"location.pathChangeRequired","body":["location.pathChangeRequired(${1:path: string})"],"description":"Triggered when an attempt is made to send your avatar to a new named path on the domain (set in the domain server's\rsettings). For example, when you enter a \"/\" followed by the path's name in the \"GOTO\" dialog."}}, + {"location.hostChanged":{"prefix":"location.hostChanged","body":["location.hostChanged(${1:hostname: string})"],"description":"Triggered when you navigate to a new domain."}}, + {"location.goBackPossible":{"prefix":"location.goBackPossible","body":["location.goBackPossible(${1:isPossible: boolean})"],"description":"Triggered when there's a change in whether or not there's a previous location that can be navigated to using\r{@link location.goBack|goBack}. (Reflects changes in the state of the \"Goto\" dialog's back arrow.)"}}, + {"location.goForwardPossible":{"prefix":"location.goForwardPossible","body":["location.goForwardPossible(${1:isPossible: boolean})"],"description":"Triggered when there's a change in whether or not there's a forward location that can be navigated to using\r{@link location.goForward|goForward}. (Reflects changes in the state of the \"Goto\" dialog's forward arrow.)"}}, + {"Assets.isValidPath":{"prefix":"Assets.isValidPath","body":["Assets.isValidPath(${1:input: string})"]}}, + {"Assets.isValidFilePath":{"prefix":"Assets.isValidFilePath","body":["Assets.isValidFilePath(${1:input: string})"]}}, + {"Assets.getATPUrl":{"prefix":"Assets.getATPUrl","body":["Assets.getATPUrl(${1:input: string})"]}}, + {"Assets.extractAssetHash":{"prefix":"Assets.extractAssetHash","body":["Assets.extractAssetHash(${1:input: string})"]}}, + {"Assets.isValidHash":{"prefix":"Assets.isValidHash","body":["Assets.isValidHash(${1:input: string})"]}}, + {"Assets.hashData":{"prefix":"Assets.hashData","body":["Assets.hashData(${1:data})"]}}, + {"Assets.hashDataHex":{"prefix":"Assets.hashDataHex","body":["Assets.hashDataHex(${1:data})"]}}, + {"Window.ConnectionRefusedReason":{"prefix":"Window.ConnectionRefusedReason","body":["Window.ConnectionRefusedReason"],"description":"

The reasons that you may be refused connection to a domain are defined by numeric values:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ReasonValueDescription
Unknown0Some unknown reason.
ProtocolMismatch1The communications protocols of the domain and your Interface are not the same.
LoginError2You could not be logged into the domain.
NotAuthorized3You are not authorized to connect to the domain.
TooManyUsers4The domain already has its maximum number of users.
TimedOut5Connecting to the domain timed out.
"}}, + {"Messages":{"prefix":"Messages","body":["Messages"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Messages API enables text and data to be sent between scripts over named \"channels\". A channel can have an arbitrary \rname to help separate messaging between different sets of scripts.

\r\r

Note: If you want to call a function in another script, you should use one of the following rather than \rsending a message:

\r
    \r
  • {@link Entities.callEntityClientMethod}
  • \r
  • {@link Entities.callEntityMethod}
  • \r
  • {@link Entities.callEntityServerMethod}
  • \r
  • {@link Script.callEntityScriptMethod}
  • \r
"}}, + {"Messages.sendMessage":{"prefix":"Messages.sendMessage","body":["Messages.sendMessage(${1:channel: string},${2:message: string},${3:localOnly: boolean})"],"description":"Send a text message on a channel."}}, + {"Messages.sendLocalMessage":{"prefix":"Messages.sendLocalMessage","body":["Messages.sendLocalMessage(${1:channel: string},${2:message: string})"],"description":"Send a text message locally on a channel.\rThis is the same as calling {@link Messages.sendMessage|sendMessage} with localOnly set to \rtrue."}}, + {"Messages.sendData":{"prefix":"Messages.sendData","body":["Messages.sendData(${1:channel: string},${2:data: object},${3:localOnly: boolean})"],"description":"Send a data message on a channel."}}, + {"Messages.subscribe":{"prefix":"Messages.subscribe","body":["Messages.subscribe(${1:channel: string})"],"description":"Subscribe the scripting environment — Interface, the entity script server, or assignment client instance — \rto receive messages on a specific channel. Note that, for example, if there are two Interface scripts that subscribe to \rdifferent channels, both scripts will receive messages on both channels."}}, + {"Messages.unsubscribe":{"prefix":"Messages.unsubscribe","body":["Messages.unsubscribe(${1:channel: string})"],"description":"Unsubscribe the scripting environment from receiving messages on a specific channel."}}, + {"Messages.messageReceived":{"prefix":"Messages.messageReceived","body":["Messages.messageReceived(${1:channel: string},${2:message: string},${3:senderID: Uuid},${4:localOnly: boolean})"],"description":"Triggered when the a text message is received."}}, + {"Messages.dataReceived":{"prefix":"Messages.dataReceived","body":["Messages.dataReceived(${1:channel: string},${2:data: object},${3:senderID: Uuid},${4:localOnly: boolean})"],"description":"Triggered when a data message is received."}}, + {"ResourceObject":{"prefix":"ResourceObject","body":["ResourceObject"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Resource.State":{"prefix":"Resource.State","body":["Resource.State"]}}, + {"ResourceObject#release":{"prefix":"ResourceObject#release","body":["ResourceObject#release"],"description":"Release this resource."}}, + {"ResourceObject#progressChanged":{"prefix":"ResourceObject#progressChanged","body":["ResourceObject#progressChanged(${1:bytesReceived: number},${2:bytesTotal: number})"],"description":"Triggered when download progress for this resource has changed."}}, + {"ResourceObject#stateChanged":{"prefix":"ResourceObject#stateChanged","body":["ResourceObject#stateChanged(${1:state: Resource.State})"],"description":"Triggered when resource loading state has changed."}}, + {"ResourceCache.getResourceList":{"prefix":"ResourceCache.getResourceList","body":["ResourceCache.getResourceList"],"description":"Get the list of all resource URLs."}}, + {"ResourceCache.updateTotalSize":{"prefix":"ResourceCache.updateTotalSize","body":["ResourceCache.updateTotalSize(${1:deltaSize: number})"]}}, + {"ResourceCache.prefetch":{"prefix":"ResourceCache.prefetch","body":["ResourceCache.prefetch(${1:url: string},${2:extra: object})"],"description":"Prefetches a resource."}}, + {"ResourceCache.dirty":{"prefix":"ResourceCache.dirty","body":["ResourceCache.dirty"]}}, + {"Resources":{"prefix":"Resources","body":["Resources"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Resources.overrideUrlPrefix":{"prefix":"Resources.overrideUrlPrefix","body":["Resources.overrideUrlPrefix(${1:prefix: string},${2:replacement: string})"]}}, + {"Resources.restoreUrlPrefix":{"prefix":"Resources.restoreUrlPrefix","body":["Resources.restoreUrlPrefix(${1:prefix: string})"]}}, + {"Entities.setPacketsPerSecond":{"prefix":"Entities.setPacketsPerSecond","body":["Entities.setPacketsPerSecond(${1:packetsPerSecond: number})"],"description":"Set the maximum number of entity packets that the client can send per second."}}, + {"Entities.getPacketsPerSecond":{"prefix":"Entities.getPacketsPerSecond","body":["Entities.getPacketsPerSecond"],"description":"Get the maximum number of entity packets that the client can send per second."}}, + {"Entities.serversExist":{"prefix":"Entities.serversExist","body":["Entities.serversExist"],"description":"Check whether servers exist for the client to send entity packets to, i.e., whether you are connected to a domain and \rits entity server is working."}}, + {"Entities.hasPacketsToSend":{"prefix":"Entities.hasPacketsToSend","body":["Entities.hasPacketsToSend"],"description":"Check whether the client has entity packets waiting to be sent."}}, + {"Entities.packetsToSendCount":{"prefix":"Entities.packetsToSendCount","body":["Entities.packetsToSendCount"],"description":"Get the number of entity packets the client has waiting to be sent."}}, + {"Entities.getLifetimePPS":{"prefix":"Entities.getLifetimePPS","body":["Entities.getLifetimePPS"],"description":"Get the entity packets per second send rate of the client over its lifetime."}}, + {"Entities.getLifetimeBPS":{"prefix":"Entities.getLifetimeBPS","body":["Entities.getLifetimeBPS"],"description":"Get the entity bytes per second send rate of the client over its lifetime."}}, + {"Entities.getLifetimePPSQueued":{"prefix":"Entities.getLifetimePPSQueued","body":["Entities.getLifetimePPSQueued"],"description":"Get the entity packets per second queued rate of the client over its lifetime."}}, + {"Entities.getLifetimeBPSQueued":{"prefix":"Entities.getLifetimeBPSQueued","body":["Entities.getLifetimeBPSQueued"],"description":"Get the entity bytes per second queued rate of the client over its lifetime."}}, + {"Entities.getLifetimeInUsecs":{"prefix":"Entities.getLifetimeInUsecs","body":["Entities.getLifetimeInUsecs"],"description":"Get the lifetime of the client from the first entity packet sent until now, in microseconds."}}, + {"Entities.getLifetimeInSeconds":{"prefix":"Entities.getLifetimeInSeconds","body":["Entities.getLifetimeInSeconds"],"description":"Get the lifetime of the client from the first entity packet sent until now, in seconds."}}, + {"Entities.getLifetimePacketsSent":{"prefix":"Entities.getLifetimePacketsSent","body":["Entities.getLifetimePacketsSent"],"description":"Get the total number of entity packets sent by the client over its lifetime."}}, + {"Entities.getLifetimeBytesSent":{"prefix":"Entities.getLifetimeBytesSent","body":["Entities.getLifetimeBytesSent"],"description":"Get the total bytes of entity packets sent by the client over its lifetime."}}, + {"Entities.getLifetimePacketsQueued":{"prefix":"Entities.getLifetimePacketsQueued","body":["Entities.getLifetimePacketsQueued"],"description":"Get the total number of entity packets queued by the client over its lifetime."}}, + {"Entities.getLifetimeBytesQueued":{"prefix":"Entities.getLifetimeBytesQueued","body":["Entities.getLifetimeBytesQueued"],"description":"Get the total bytes of entity packets queued by the client over its lifetime."}}, + {"Entities.ActionArguments-Offset":{"prefix":"Entities.ActionArguments-Offset","body":["Entities.ActionArguments-Offset"],"description":"The \"offset\" {@link Entities.ActionType|ActionType} moves an entity so that it is a set distance away from a \rtarget point.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-Tractor":{"prefix":"Entities.ActionArguments-Tractor","body":["Entities.ActionArguments-Tractor"],"description":"The \"tractor\" {@link Entities.ActionType|ActionType} moves and rotates an entity to a target position and \rorientation, optionally relative to another entity.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-TravelOriented":{"prefix":"Entities.ActionArguments-TravelOriented","body":["Entities.ActionArguments-TravelOriented"],"description":"The \"travel-oriented\" {@link Entities.ActionType|ActionType} orients an entity to align with its direction of \rtravel.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-BallSocket":{"prefix":"Entities.ActionArguments-BallSocket","body":["Entities.ActionArguments-BallSocket"],"description":"The \"ball-socket\" {@link Entities.ActionType|ActionType} connects two entities with a ball and socket joint. \rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-ConeTwist":{"prefix":"Entities.ActionArguments-ConeTwist","body":["Entities.ActionArguments-ConeTwist"],"description":"The \"cone-twist\" {@link Entities.ActionType|ActionType} connects two entities with a joint that can move \rthrough a cone and can twist.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-Hinge":{"prefix":"Entities.ActionArguments-Hinge","body":["Entities.ActionArguments-Hinge"],"description":"The \"hinge\" {@link Entities.ActionType|ActionType} lets an entity pivot about an axis or connects two entities\rwith a hinge joint.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-Slider":{"prefix":"Entities.ActionArguments-Slider","body":["Entities.ActionArguments-Slider"],"description":"The \"slider\" {@link Entities.ActionType|ActionType} lets an entity slide and rotate along an axis, or connects \rtwo entities that slide and rotate along a shared axis.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments":{"prefix":"Entities.ActionArguments","body":["Entities.ActionArguments"],"description":"Different entity action types have different arguments: some common to all actions (listed below) and some specific to each \r{@link Entities.ActionType|ActionType} (linked to below). The arguments are accessed as an object of property names and \rvalues."}}, + {"Entities.PhysicsMotionType":{"prefix":"Entities.PhysicsMotionType","body":["Entities.PhysicsMotionType"],"description":"

An entity's physics motion type may be one of the following:

\r\r \r \r \r \r \r \r \r \r
ValueDescription
\"static\"There is no motion because the entity is locked — its locked \r property is set to true.
\"kinematic\"Motion is applied without physical laws (e.g., damping) because the entity is \r not locked and has its dynamic property set to false.
\"dynamic\"Motion is applied according to physical laws (e.g., damping) because the entity \r is not locked and has its dynamic property set to true.
"}}, + {"Steam":{"prefix":"Steam","body":["Steam"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Steam.isRunning":{"prefix":"Steam.isRunning","body":["Steam.isRunning"]}}, + {"Steam.openInviteOverlay":{"prefix":"Steam.openInviteOverlay","body":["Steam.openInviteOverlay"]}}, + {"PickType":{"prefix":"PickType","body":["PickType"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Enum for different types of Picks and Pointers."}}, + {"PickType":{"prefix":"PickType","body":["PickType"],"description":"\r \r \r \r \r \r \r \r \r
ValueDescription
{@link PickType(0)|PickType.Ray}
{@link PickType(0)|PickType.Stylus}
{@link PickType(0)|PickType.Parabola}
"}}, + {"Assets.GetOptions.ResponseType":{"prefix":"Assets.GetOptions.ResponseType","body":["Assets.GetOptions.ResponseType"],"description":"

Available responseType values for use with @{link Assets.getAsset} and @{link Assets.loadFromCache} configuration option.

\r\r \r \r \r \r \r \r \r \r
responseTypetypeof response value
\"text\"contents returned as utf-8 decoded String value
\"arraybuffer\"contents as a binary ArrayBuffer object
\"json\"contents as a parsed JSON object
"}}, + {"Assets":{"prefix":"Assets","body":["Assets"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Assets API allows you to communicate with the Asset Browser."}}, + {"Assets.uploadData":{"prefix":"Assets.uploadData","body":["Assets.uploadData(${1:data: string},${2:callback: Assets~uploadDataCallback})"],"description":"Upload content to the connected domain's asset server."}}, + {"Assets~uploadDataCallback":{"prefix":"Assets~uploadDataCallback","body":["Assets~uploadDataCallback(${1:url: string},${2:hash: string})"],"description":"Called when uploadData is complete"}}, + {"Assets.downloadData":{"prefix":"Assets.downloadData","body":["Assets.downloadData(${1:url: string},${2:callback: Assets~downloadDataCallback})"],"description":"Download data from the connected domain's asset server."}}, + {"Assets~downloadDataCallback":{"prefix":"Assets~downloadDataCallback","body":["Assets~downloadDataCallback(${1:data: string})"],"description":"Called when downloadData is complete"}}, + {"Assets.setMapping":{"prefix":"Assets.setMapping","body":["Assets.setMapping(${1:path: string},${2:hash: string},${3:callback: Assets~setMappingCallback})"],"description":"Sets up a path to hash mapping within the connected domain's asset server"}}, + {"Assets~setMappingCallback":{"prefix":"Assets~setMappingCallback","body":["Assets~setMappingCallback(${1:error: string})"],"description":"Called when setMapping is complete"}}, + {"Assets.getMapping":{"prefix":"Assets.getMapping","body":["Assets.getMapping(${1:path: string},${2:callback: Assets~getMappingCallback})"],"description":"Look up a path to hash mapping within the connected domain's asset server"}}, + {"Assets~getMappingCallback":{"prefix":"Assets~getMappingCallback","body":["Assets~getMappingCallback(${1:assetID: string},${2:error: string})"],"description":"Called when getMapping is complete."}}, + {"Assets.setBakingEnabled":{"prefix":"Assets.setBakingEnabled","body":["Assets.setBakingEnabled(${1:path: string},${2:enabled: boolean},${3:callback})"]}}, + {"Assets~setBakingEnabledCallback":{"prefix":"Assets~setBakingEnabledCallback","body":["Assets~setBakingEnabledCallback"],"description":"Called when setBakingEnabled is complete."}}, + {"Assets.getAsset":{"prefix":"Assets.getAsset","body":["Assets.getAsset(${1:options: URL},${2:scope: Assets~getAssetCallback},${3:callback: function})"],"description":"Request Asset data from the ATP Server"}}, + {"Assets.GetOptions":{"prefix":"Assets.GetOptions","body":["Assets.GetOptions"],"description":"A set of properties that can be passed to {@link Assets.getAsset}."}}, + {"Assets~getAssetCallback":{"prefix":"Assets~getAssetCallback","body":["Assets~getAssetCallback(${1:error: string},${2:result: Asset~getAssetResult})"],"description":"Called when Assets.getAsset is complete."}}, + {"Assets~getAssetResult":{"prefix":"Assets~getAssetResult","body":["Assets~getAssetResult"],"description":"Result value returned by {@link Assets.getAsset}."}}, + {"Assets.putAsset":{"prefix":"Assets.putAsset","body":["Assets.putAsset(${1:options: Assets.PutOptions},${2:scope[callback: Assets~putAssetCallback},${3:callback: function})"],"description":"Upload Asset data to the ATP Server"}}, + {"Assets.PutOptions":{"prefix":"Assets.PutOptions","body":["Assets.PutOptions"],"description":"A set of properties that can be passed to {@link Assets.putAsset}."}}, + {"Assets~puttAssetCallback":{"prefix":"Assets~puttAssetCallback","body":["Assets~puttAssetCallback(${1:error: string},${2:result: Asset~putAssetResult})"],"description":"Called when Assets.putAsset is complete."}}, + {"Assets~putAssetResult":{"prefix":"Assets~putAssetResult","body":["Assets~putAssetResult"],"description":"Result value returned by {@link Assets.putAsset}."}}, + {"Assets.deleteAsset":{"prefix":"Assets.deleteAsset","body":["Assets.deleteAsset(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.resolveAsset":{"prefix":"Assets.resolveAsset","body":["Assets.resolveAsset(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.decompressData":{"prefix":"Assets.decompressData","body":["Assets.decompressData(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.compressData":{"prefix":"Assets.compressData","body":["Assets.compressData(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.initializeCache":{"prefix":"Assets.initializeCache","body":["Assets.initializeCache"]}}, + {"Assets.canWriteCacheValue":{"prefix":"Assets.canWriteCacheValue","body":["Assets.canWriteCacheValue(${1:url: string})"]}}, + {"Assets.getCacheStatus":{"prefix":"Assets.getCacheStatus","body":["Assets.getCacheStatus(${1:scope},${2:callback})"]}}, + {"Assets.queryCacheMeta":{"prefix":"Assets.queryCacheMeta","body":["Assets.queryCacheMeta(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.loadFromCache":{"prefix":"Assets.loadFromCache","body":["Assets.loadFromCache(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.saveToCache":{"prefix":"Assets.saveToCache","body":["Assets.saveToCache(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.saveToCache":{"prefix":"Assets.saveToCache","body":["Assets.saveToCache(${1:url},${2:data},${3:metadata},${4:scope},${5:callback})"]}}, + {"Audio.playSound":{"prefix":"Audio.playSound","body":["Audio.playSound(${1:sound: SoundObject},${2:injectorOptions: AudioInjector.AudioInjectorOptions})"],"description":"Starts playing — \"injecting\" — the content of an audio file. The sound is played globally (sent to the audio \rmixer) so that everyone hears it, unless the injectorOptions has localOnly set to \rtrue in which case only the client hears the sound played. No sound is played if sent to the audio mixer \rbut the client is not connected to an audio mixer. The {@link AudioInjector} object returned by the function can be used \rto control the playback and get information about its current state."}}, + {"Audio.playSystemSound":{"prefix":"Audio.playSystemSound","body":["Audio.playSystemSound(${1:sound: SoundObject},${2:position: Vec3})"],"description":"Start playing the content of an audio file, locally (isn't sent to the audio mixer). This is the same as calling \r{@link Audio.playSound} with {@link AudioInjector.AudioInjectorOptions} localOnly set true and \rthe specified position."}}, + {"Audio.setStereoInput":{"prefix":"Audio.setStereoInput","body":["Audio.setStereoInput(${1:stereo: boolean})"],"description":"Set whether or not the audio input should be used in stereo. If the audio input does not support stereo then setting a \rvalue of true has no effect."}}, + {"Audio.isStereoInput":{"prefix":"Audio.isStereoInput","body":["Audio.isStereoInput"],"description":"Get whether or not the audio input is used in stereo."}}, + {"Audio.mutedByMixer":{"prefix":"Audio.mutedByMixer","body":["Audio.mutedByMixer"],"description":"Triggered when the client is muted by the mixer because their loudness value for the noise background has reached the \rthreshold set for the domain in the server settings."}}, + {"Audio.environmentMuted":{"prefix":"Audio.environmentMuted","body":["Audio.environmentMuted"],"description":"Triggered when the client is muted by the mixer because they're within a certain radius (50m) of someone who requested \rthe mute through Developer > Audio > Mute Environment."}}, + {"Audio.receivedFirstPacket":{"prefix":"Audio.receivedFirstPacket","body":["Audio.receivedFirstPacket"],"description":"Triggered when the client receives its first packet from the audio mixer."}}, + {"Audio.disconnected":{"prefix":"Audio.disconnected","body":["Audio.disconnected"],"description":"Triggered when the client is disconnected from the audio mixer."}}, + {"Audio.noiseGateOpened":{"prefix":"Audio.noiseGateOpened","body":["Audio.noiseGateOpened"],"description":"Triggered when the noise gate is opened: the input audio signal is no longer blocked (fully attenuated) because it has \rrisen above an adaptive threshold set just above the noise floor. Only occurs if Audio.noiseReduction is \rtrue."}}, + {"Audio.noiseGateClosed":{"prefix":"Audio.noiseGateClosed","body":["Audio.noiseGateClosed"],"description":"Triggered when the noise gate is closed: the input audio signal is blocked (fully attenuated) because it has fallen \rbelow an adaptive threshold set just above the noise floor. Only occurs if Audio.noiseReduction is \rtrue."}}, + {"Audio.inputReceived":{"prefix":"Audio.inputReceived","body":["Audio.inputReceived(${1:inputSamples: Int16Array})"],"description":"Triggered when a frame of audio input is processed."}}, + {"Audio.isStereoInputChanged":{"prefix":"Audio.isStereoInputChanged","body":["Audio.isStereoInputChanged(${1:isStereo: boolean})"],"description":"Triggered when the input audio use changes between mono and stereo."}}, + {"File":{"prefix":"File","body":["File"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"File.convertUrlToPath":{"prefix":"File.convertUrlToPath","body":["File.convertUrlToPath(${1:url: string})"]}}, + {"File.runUnzip":{"prefix":"File.runUnzip","body":["File.runUnzip(${1:path: string},${2:url: string},${3:autoAdd: boolean},${4:isZip: boolean},${5:isBlocks: boolean})"]}}, + {"File.getTempDir":{"prefix":"File.getTempDir","body":["File.getTempDir"]}}, + {"File.unzipResult":{"prefix":"File.unzipResult","body":["File.unzipResult(${1:zipFile: string},${2:unzipFile: string},${3:autoAdd: boolean},${4:isZip: boolean},${5:isBlocks: boolean})"]}}, + {"KeyEvent":{"prefix":"KeyEvent","body":["KeyEvent"],"description":"A keyboard key event."}}, + {"Mat4":{"prefix":"Mat4","body":["Mat4"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Mat4.multiply":{"prefix":"Mat4.multiply","body":["Mat4.multiply(${1:m1: Mat4},${2:m2: Mat4})"]}}, + {"Mat4.createFromRotAndTrans":{"prefix":"Mat4.createFromRotAndTrans","body":["Mat4.createFromRotAndTrans(${1:rot: Quat},${2:trans: Vec3})"]}}, + {"Mat4.createFromScaleRotAndTrans":{"prefix":"Mat4.createFromScaleRotAndTrans","body":["Mat4.createFromScaleRotAndTrans(${1:scale: Vec3},${2:rot: Quat},${3:trans: Vec3})"]}}, + {"Mat4.createFromColumns":{"prefix":"Mat4.createFromColumns","body":["Mat4.createFromColumns(${1:col0: Vec4},${2:col1: Vec4},${3:col2: Vec4},${4:col: Vec4})"]}}, + {"Mat4.createFromArray":{"prefix":"Mat4.createFromArray","body":["Mat4.createFromArray(${1:numbers: Array.})"]}}, + {"Mat4.extractTranslation":{"prefix":"Mat4.extractTranslation","body":["Mat4.extractTranslation(${1:m: Mat4})"]}}, + {"Mat4.extractRotation":{"prefix":"Mat4.extractRotation","body":["Mat4.extractRotation(${1:m: Mat4})"]}}, + {"Mat4.extractScale":{"prefix":"Mat4.extractScale","body":["Mat4.extractScale(${1:m: Mat4})"]}}, + {"Mat4.transformPoint":{"prefix":"Mat4.transformPoint","body":["Mat4.transformPoint(${1:m: Mat4},${2:point: Vec3})"]}}, + {"Mat4.transformVector":{"prefix":"Mat4.transformVector","body":["Mat4.transformVector(${1:m: Mat4},${2:vector: Vec3})"]}}, + {"Mat4.inverse":{"prefix":"Mat4.inverse","body":["Mat4.inverse(${1:m: Mat4})"]}}, + {"Mat4.getFront":{"prefix":"Mat4.getFront","body":["Mat4.getFront(${1:m: Mat4})"]}}, + {"Mat4.getForward":{"prefix":"Mat4.getForward","body":["Mat4.getForward(${1:m: Mat4})"]}}, + {"Mat4.getRight":{"prefix":"Mat4.getRight","body":["Mat4.getRight(${1:m: Mat4})"]}}, + {"Mat4.getUp":{"prefix":"Mat4.getUp","body":["Mat4.getUp(${1:m: Mat4})"]}}, + {"Mat4.print":{"prefix":"Mat4.print","body":["Mat4.print(${1:label: string},${2:m: Mat4},${3:transpose: boolean})"]}}, + {"Menu.MenuItemProperties":{"prefix":"Menu.MenuItemProperties","body":["Menu.MenuItemProperties"],"description":"A set of properties that can be passed to {@link Menu.addMenuItem} to create a new menu item.\r\rIf none of position, beforeItem, afterItem, or grouping are specified, \rthe menu item will be placed at the end of the menu."}}, + {"MouseEvent":{"prefix":"MouseEvent","body":["MouseEvent"],"description":"A controller mouse movement or button event."}}, + {"Quat":{"prefix":"Quat","body":["Quat"],"description":"A quaternion value. See also the {@link Quat(0)|Quat} object."}}, + {"Quat":{"prefix":"Quat","body":["Quat"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Quat API provides facilities for generating and manipulating quaternions.\rQuaternions should be used in preference to Euler angles wherever possible because quaternions don't suffer from the problem\rof gimbal lock."}}, + {"Quat.multiply":{"prefix":"Quat.multiply","body":["Quat.multiply(${1:q1: Quat},${2:q2: Quat})"],"description":"Multiply two quaternions."}}, + {"Quat.normalize":{"prefix":"Quat.normalize","body":["Quat.normalize(${1:q: Quat})"],"description":"Normalizes a quaternion."}}, + {"Quat.conjugate":{"prefix":"Quat.conjugate","body":["Quat.conjugate(${1:q: Quat})"],"description":"Calculate the conjugate of a quaternion. For a unit quaternion, its conjugate is the same as its \r {@link Quat(0).inverse|Quat.inverse}."}}, + {"Quat.lookAt":{"prefix":"Quat.lookAt","body":["Quat.lookAt(${1:eye: Vec3},${2:target: Vec3},${3:up: Vec3})"],"description":"Calculate a camera orientation given eye position, point of interest, and \"up\" direction. The camera's negative z-axis is\rthe forward direction. The result has zero roll about its forward direction with respect to the given \"up\" direction."}}, + {"Quat.lookAtSimple":{"prefix":"Quat.lookAtSimple","body":["Quat.lookAtSimple(${1:eye: Vec3},${2:target: Vec3})"],"description":"Calculate a camera orientation given eye position and point of interest. The camera's negative z-axis is the forward \rdirection. The result has zero roll about its forward direction."}}, + {"Quat.rotationBetween":{"prefix":"Quat.rotationBetween","body":["Quat.rotationBetween(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate the shortest rotation from a first vector onto a second."}}, + {"Quat.fromVec3Degrees":{"prefix":"Quat.fromVec3Degrees","body":["Quat.fromVec3Degrees(${1:vector: Vec3})"],"description":"Generate a quaternion from a {@link Vec3} of Euler angles in degrees."}}, + {"Quat.fromVec3Radians":{"prefix":"Quat.fromVec3Radians","body":["Quat.fromVec3Radians(${1:vector: Vec3})"],"description":"Generate a quaternion from a {@link Vec3} of Euler angles in radians."}}, + {"Quat.fromPitchYawRollDegrees":{"prefix":"Quat.fromPitchYawRollDegrees","body":["Quat.fromPitchYawRollDegrees(${1:pitch: number},${2:yaw: number},${3:roll: number})"],"description":"Generate a quaternion from pitch, yaw, and roll values in degrees."}}, + {"Quat.fromPitchYawRollRadians":{"prefix":"Quat.fromPitchYawRollRadians","body":["Quat.fromPitchYawRollRadians(${1:pitch: number},${2:yaw: number},${3:roll: number})"],"description":"Generate a quaternion from pitch, yaw, and roll values in radians."}}, + {"Quat.inverse":{"prefix":"Quat.inverse","body":["Quat.inverse(${1:q: Quat})"],"description":"Calculate the inverse of a quaternion. For a unit quaternion, its inverse is the same as its\r {@link Quat(0).conjugate|Quat.conjugate}."}}, + {"Quat.getFront":{"prefix":"Quat.getFront","body":["Quat.getFront(${1:orientation: Quat})"],"description":"Get the \"front\" direction that the camera would face if its orientation was set to the quaternion value.\rThis is a synonym for {@link Quat(0).getForward|Quat.getForward}.\rThe High Fidelity camera has axes x = right, y = up, -z = forward."}}, + {"Quat.getForward":{"prefix":"Quat.getForward","body":["Quat.getForward(${1:orientation: Quat})"],"description":"Get the \"forward\" direction that the camera would face if its orientation was set to the quaternion value.\rThis is a synonym for {@link Quat(0).getFront|Quat.getFront}.\rThe High Fidelity camera has axes x = right, y = up, -z = forward."}}, + {"Quat.getRight":{"prefix":"Quat.getRight","body":["Quat.getRight(${1:orientation: Quat})"],"description":"Get the \"right\" direction that the camera would have if its orientation was set to the quaternion value.\rThe High Fidelity camera has axes x = right, y = up, -z = forward."}}, + {"Quat.getUp":{"prefix":"Quat.getUp","body":["Quat.getUp(${1:orientation: Quat})"],"description":"Get the \"up\" direction that the camera would have if its orientation was set to the quaternion value.\rThe High Fidelity camera has axes x = right, y = up, -z = forward."}}, + {"Quat.safeEulerAngles":{"prefix":"Quat.safeEulerAngles","body":["Quat.safeEulerAngles(${1:orientation: Quat})"],"description":"Calculate the Euler angles for the quaternion, in degrees. (The \"safe\" in the name signifies that the angle results will\rnot be garbage even when the rotation is particularly difficult to decompose with pitches around +/-90 degrees.)"}}, + {"Quat.angleAxis":{"prefix":"Quat.angleAxis","body":["Quat.angleAxis(${1:angle: number},${2:axis: Vec3})"],"description":"Generate a quaternion given an angle to rotate through and an axis to rotate about."}}, + {"Quat.axis":{"prefix":"Quat.axis","body":["Quat.axis(${1:q: Quat})"],"description":"Get the rotation axis for a quaternion."}}, + {"Quat.angle":{"prefix":"Quat.angle","body":["Quat.angle(${1:q: Quat})"],"description":"Get the rotation angle for a quaternion."}}, + {"Quat.mix":{"prefix":"Quat.mix","body":["Quat.mix(${1:q1: Quat},${2:q2: Quat},${3:alpha: number})"],"description":"Compute a spherical linear interpolation between two rotations, safely handling two rotations that are very similar.\rSee also, {@link Quat(0).slerp|Quat.slerp}."}}, + {"Quat.slerp":{"prefix":"Quat.slerp","body":["Quat.slerp(${1:q1: Quat},${2:q2: Quat},${3:alpha: number})"],"description":"Compute a spherical linear interpolation between two rotations, for rotations that are not very similar.\rSee also, {@link Quat(0).mix|Quat.mix}."}}, + {"Quat.squad":{"prefix":"Quat.squad","body":["Quat.squad(${1:q1: Quat},${2:q2: Quat},${3:s1: Quat},${4:s2: Quat},${5:alpha: number})"],"description":"Compute a spherical quadrangle interpolation between two rotations along a path oriented toward two other rotations.\rEquivalent to: Quat.slerp(Quat.slerp(q1, q2, alpha), Quat.slerp(s1, s2, alpha), 2 * alpha * (1.0 - alpha))."}}, + {"Quat.dot":{"prefix":"Quat.dot","body":["Quat.dot(${1:q1: Quat},${2:q2: Quat})"],"description":"Calculate the dot product of two quaternions. The closer the quaternions are to each other the more non-zero the value is\r(either positive or negative). Identical unit rotations have a dot product of +/- 1."}}, + {"Quat.print":{"prefix":"Quat.print","body":["Quat.print(${1:label: string},${2:q: Quat},${3:asDegrees: boolean})"],"description":"Print to the program log a text label followed by a quaternion's pitch, yaw, and roll Euler angles."}}, + {"Quat.equal":{"prefix":"Quat.equal","body":["Quat.equal(${1:q1: Quat},${2:q2: Quat})"],"description":"Test whether two quaternions are equal. Note: The quaternions must be exactly equal in order for \rtrue to be returned; it is often better to use {@link Quat(0).dot|Quat.dot} and test for closeness to +/-1."}}, + {"Quat.cancelOutRollAndPitch":{"prefix":"Quat.cancelOutRollAndPitch","body":["Quat.cancelOutRollAndPitch(${1:orientation: Quat})"],"description":"Cancels out the roll and pitch component of a quaternion so that its completely horizontal with a yaw pointing in the \rgiven quaternion's direction."}}, + {"Quat.cancelOutRoll":{"prefix":"Quat.cancelOutRoll","body":["Quat.cancelOutRoll(${1:orientation: Quat})"],"description":"Cancels out the roll component of a quaternion so that its horizontal axis is level."}}, + {"Recording":{"prefix":"Recording","body":["Recording"],"description":"
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

"}}, + {"Recording.loadRecording":{"prefix":"Recording.loadRecording","body":["Recording.loadRecording(${1:url: string},${2:callback: Recording~loadRecordingCallback})"]}}, + {"Recording~loadRecordingCallback":{"prefix":"Recording~loadRecordingCallback","body":["Recording~loadRecordingCallback(${1:success: boolean},${2:url: string})"],"description":"Called when {@link Recording.loadRecording} is complete."}}, + {"Recording.startPlaying":{"prefix":"Recording.startPlaying","body":["Recording.startPlaying"]}}, + {"Recording.pausePlayer":{"prefix":"Recording.pausePlayer","body":["Recording.pausePlayer"]}}, + {"Recording.stopPlaying":{"prefix":"Recording.stopPlaying","body":["Recording.stopPlaying"]}}, + {"Recording.isPlaying":{"prefix":"Recording.isPlaying","body":["Recording.isPlaying"]}}, + {"Recording.isPaused":{"prefix":"Recording.isPaused","body":["Recording.isPaused"]}}, + {"Recording.playerElapsed":{"prefix":"Recording.playerElapsed","body":["Recording.playerElapsed"]}}, + {"Recording.playerLength":{"prefix":"Recording.playerLength","body":["Recording.playerLength"]}}, + {"Recording.setPlayerVolume":{"prefix":"Recording.setPlayerVolume","body":["Recording.setPlayerVolume(${1:volume: number})"]}}, + {"Recording.setPlayerAudioOffset":{"prefix":"Recording.setPlayerAudioOffset","body":["Recording.setPlayerAudioOffset(${1:audioOffset: number})"]}}, + {"Recording.setPlayerTime":{"prefix":"Recording.setPlayerTime","body":["Recording.setPlayerTime(${1:time: number})"]}}, + {"Recording.setPlayerLoop":{"prefix":"Recording.setPlayerLoop","body":["Recording.setPlayerLoop(${1:loop: boolean})"]}}, + {"Recording.setPlayerUseDisplayName":{"prefix":"Recording.setPlayerUseDisplayName","body":["Recording.setPlayerUseDisplayName(${1:useDisplayName: boolean})"]}}, + {"Recording.setPlayerUseAttachments":{"prefix":"Recording.setPlayerUseAttachments","body":["Recording.setPlayerUseAttachments(${1:useAttachments: boolean})"]}}, + {"Recording.setPlayerUseHeadModel":{"prefix":"Recording.setPlayerUseHeadModel","body":["Recording.setPlayerUseHeadModel(${1:useHeadModel: boolean})"]}}, + {"Recording.setPlayerUseSkeletonModel":{"prefix":"Recording.setPlayerUseSkeletonModel","body":["Recording.setPlayerUseSkeletonModel(${1:useSkeletonModel: boolean})"]}}, + {"Recording.setPlayFromCurrentLocation":{"prefix":"Recording.setPlayFromCurrentLocation","body":["Recording.setPlayFromCurrentLocation(${1:playFromCurrentLocation: boolean})"]}}, + {"Recording.getPlayerUseDisplayName":{"prefix":"Recording.getPlayerUseDisplayName","body":["Recording.getPlayerUseDisplayName"]}}, + {"Recording.getPlayerUseAttachments":{"prefix":"Recording.getPlayerUseAttachments","body":["Recording.getPlayerUseAttachments"]}}, + {"Recording.getPlayerUseHeadModel":{"prefix":"Recording.getPlayerUseHeadModel","body":["Recording.getPlayerUseHeadModel"]}}, + {"Recording.getPlayerUseSkeletonModel":{"prefix":"Recording.getPlayerUseSkeletonModel","body":["Recording.getPlayerUseSkeletonModel"]}}, + {"Recording.getPlayFromCurrentLocation":{"prefix":"Recording.getPlayFromCurrentLocation","body":["Recording.getPlayFromCurrentLocation"]}}, + {"Recording.startRecording":{"prefix":"Recording.startRecording","body":["Recording.startRecording"]}}, + {"Recording.stopRecording":{"prefix":"Recording.stopRecording","body":["Recording.stopRecording"]}}, + {"Recording.isRecording":{"prefix":"Recording.isRecording","body":["Recording.isRecording"]}}, + {"Recording.recorderElapsed":{"prefix":"Recording.recorderElapsed","body":["Recording.recorderElapsed"]}}, + {"Recording.getDefaultRecordingSaveDirectory":{"prefix":"Recording.getDefaultRecordingSaveDirectory","body":["Recording.getDefaultRecordingSaveDirectory"]}}, + {"Recording.saveRecording":{"prefix":"Recording.saveRecording","body":["Recording.saveRecording(${1:filename: string})"]}}, + {"Recording.saveRecordingToAsset":{"prefix":"Recording.saveRecordingToAsset","body":["Recording.saveRecordingToAsset(${1:getClipAtpUrl: function})"]}}, + {"Recording.loadLastRecording":{"prefix":"Recording.loadLastRecording","body":["Recording.loadLastRecording"]}}, + {"Scene.Stage.Location":{"prefix":"Scene.Stage.Location","body":["Scene.Stage.Location"]}}, + {"Scene.Stage.Time":{"prefix":"Scene.Stage.Time","body":["Scene.Stage.Time"]}}, + {"Scene.Stage.KeyLight":{"prefix":"Scene.Stage.KeyLight","body":["Scene.Stage.KeyLight"]}}, + {"Scene.Stage":{"prefix":"Scene.Stage","body":["Scene.Stage"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Scene.Stage.setOrientation":{"prefix":"Scene.Stage.setOrientation","body":["Scene.Stage.setOrientation(${1:orientation: Quat})"]}}, + {"Scene.Stage.setLocation":{"prefix":"Scene.Stage.setLocation","body":["Scene.Stage.setLocation(${1:longitude: number},${2:latitude: number},${3:altitude: number})"]}}, + {"Scene":{"prefix":"Scene","body":["Scene"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Scene.shouldRenderAvatarsChanged":{"prefix":"Scene.shouldRenderAvatarsChanged","body":["Scene.shouldRenderAvatarsChanged(${1:shouldRenderAvatars: boolean})"]}}, + {"Scene.shouldRenderEntitiesChanged":{"prefix":"Scene.shouldRenderEntitiesChanged","body":["Scene.shouldRenderEntitiesChanged(${1:shouldRenderEntities: boolean})"]}}, + {"AudioInjector":{"prefix":"AudioInjector","body":["AudioInjector"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

Plays — \"injects\" — the content of an audio file. Used in the {@link Audio} API."}}, + {"AudioInjector.restart":{"prefix":"AudioInjector.restart","body":["AudioInjector.restart"],"description":"Stop current playback, if any, and start playing from the beginning."}}, + {"AudioInjector.stop":{"prefix":"AudioInjector.stop","body":["AudioInjector.stop"],"description":"Stop audio playback."}}, + {"AudioInjector.getOptions":{"prefix":"AudioInjector.getOptions","body":["AudioInjector.getOptions"],"description":"Get the current configuration of the audio injector."}}, + {"AudioInjector.setOptions":{"prefix":"AudioInjector.setOptions","body":["AudioInjector.setOptions(${1:options: AudioInjector.AudioInjectorOptions})"],"description":"Configure how the injector plays the audio."}}, + {"AudioInjector.getLoudness":{"prefix":"AudioInjector.getLoudness","body":["AudioInjector.getLoudness"],"description":"Get the loudness of the most recent frame of audio played."}}, + {"AudioInjector.isPlaying":{"prefix":"AudioInjector.isPlaying","body":["AudioInjector.isPlaying"],"description":"Get whether or not the audio is currently playing."}}, + {"AudioInjector.finished":{"prefix":"AudioInjector.finished","body":["AudioInjector.finished"],"description":"Triggered when the audio has finished playing."}}, + {"AudioInjector.stopInjectorImmediately":{"prefix":"AudioInjector.stopInjectorImmediately","body":["AudioInjector.stopInjectorImmediately"],"description":"Stop audio playback. (Synonym of {@link AudioInjector.stop|stop}.)"}}, + {"Resource":{"prefix":"Resource","body":["Resource"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Entities.preload":{"prefix":"Entities.preload","body":["Entities.preload(${1:entityID: Uuid})"],"description":"Triggered when the script starts for a user.\r

Note: Can only be connected to via this.preload = function (...) { ... } in the entity script.

\r
Available in:Client Entity ScriptsServer Entity Scripts
"}}, + {"Entities.unload":{"prefix":"Entities.unload","body":["Entities.unload"],"description":"Triggered when the script terminates for a user.\r

Note: Can only be connected to via this.unoad = function () { ... } in the entity script.

\r
Available in:Client Entity ScriptsServer Entity Scripts
"}}, + {"Script":{"prefix":"Script","body":["Script"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Script.stop":{"prefix":"Script.stop","body":["Script.stop(${1:marshal: boolean})"],"description":"Stop the current script."}}, + {"Script.registerGlobalObject":{"prefix":"Script.registerGlobalObject","body":["Script.registerGlobalObject(${1:name: string},${2:object: object})"]}}, + {"Script.registerGetterSetter":{"prefix":"Script.registerGetterSetter","body":["Script.registerGetterSetter(${1:name: string},${2:getter: object},${3:setter: object},${4:parent: string})"]}}, + {"Script.registerFunction":{"prefix":"Script.registerFunction","body":["Script.registerFunction(${1:name: string},${2:function: object},${3:numArguments: number})"]}}, + {"Script.registerFunction":{"prefix":"Script.registerFunction","body":["Script.registerFunction(${1:parent: string},${2:name: string},${3:function: object},${4:numArguments: number})"]}}, + {"Script.registerValue":{"prefix":"Script.registerValue","body":["Script.registerValue(${1:name: string},${2:value: object})"]}}, + {"Script.evaluate":{"prefix":"Script.evaluate","body":["Script.evaluate(${1:program: string},${2:filename: string},${3:lineNumber: number})"]}}, + {"Script.evaluateInClosure":{"prefix":"Script.evaluateInClosure","body":["Script.evaluateInClosure(${1:locals: object},${2:program: object})"]}}, + {"Script.getContext":{"prefix":"Script.getContext","body":["Script.getContext"]}}, + {"Script.isClientScript":{"prefix":"Script.isClientScript","body":["Script.isClientScript"]}}, + {"Script.isDebugMode":{"prefix":"Script.isDebugMode","body":["Script.isDebugMode"]}}, + {"Script.isEntityClientScript":{"prefix":"Script.isEntityClientScript","body":["Script.isEntityClientScript"]}}, + {"Script.isEntityServerScript":{"prefix":"Script.isEntityServerScript","body":["Script.isEntityServerScript"]}}, + {"Script.isAgentScript":{"prefix":"Script.isAgentScript","body":["Script.isAgentScript"]}}, + {"Script.addEventHandler":{"prefix":"Script.addEventHandler","body":["Script.addEventHandler(${1:entityID: Uuid},${2:eventName: string},${3:handler: function})"]}}, + {"Script.removeEventHandler":{"prefix":"Script.removeEventHandler","body":["Script.removeEventHandler(${1:entityID: Uuid},${2:eventName: string},${3:handler: function})"]}}, + {"Script.load":{"prefix":"Script.load","body":["Script.load(${1:filename: string})"],"description":"Start a new Interface or entity script."}}, + {"Script.include":{"prefix":"Script.include","body":["Script.include(${1:filenames: Array.},${2:callback: function})"],"description":"Include JavaScript from other files in the current script. If a callback is specified the files are loaded and included \rasynchronously, otherwise they are included synchronously (i.e., script execution blocks while the files are included)."}}, + {"Script.include":{"prefix":"Script.include","body":["Script.include(${1:filename: string},${2:callback: function})"],"description":"Include JavaScript from another file in the current script. If a callback is specified the file is loaded and included \rasynchronously, otherwise it is included synchronously (i.e., script execution blocks while the file is included)."}}, + {"Script.require":{"prefix":"Script.require","body":["Script.require(${1:module: string})"]}}, + {"Script.resetModuleCache":{"prefix":"Script.resetModuleCache","body":["Script.resetModuleCache(${1:deleteScriptCache: boolean})"]}}, + {"Script.setInterval":{"prefix":"Script.setInterval","body":["Script.setInterval(${1:function: function},${2:interval: number})"],"description":"Call a function at a set interval."}}, + {"Script.setTimeout":{"prefix":"Script.setTimeout","body":["Script.setTimeout(${1:function: function},${2:timeout: number})"],"description":"Call a function after a delay."}}, + {"Script.clearInterval":{"prefix":"Script.clearInterval","body":["Script.clearInterval(${1:timer: object})"],"description":"Stop an interval timer set by {@link Script.setInterval|setInterval}."}}, + {"Script.clearTimeout":{"prefix":"Script.clearTimeout","body":["Script.clearTimeout(${1:timer: object})"],"description":"Clear a timeout timer set by {@link Script.setTimeout|setTimeout}."}}, + {"Script.print":{"prefix":"Script.print","body":["Script.print(${1:message: string})"]}}, + {"Script.resolvePath":{"prefix":"Script.resolvePath","body":["Script.resolvePath(${1:path: string})"],"description":"Resolve a relative path to an absolute path."}}, + {"Script.resourcesPath":{"prefix":"Script.resourcesPath","body":["Script.resourcesPath"]}}, + {"Script.beginProfileRange":{"prefix":"Script.beginProfileRange","body":["Script.beginProfileRange(${1:label: string})"]}}, + {"Script.endProfileRange":{"prefix":"Script.endProfileRange","body":["Script.endProfileRange(${1:label: string})"]}}, + {"Script.isEntityScriptRunning":{"prefix":"Script.isEntityScriptRunning","body":["Script.isEntityScriptRunning(${1:entityID: Uuid})"]}}, + {"Script.loadEntityScript":{"prefix":"Script.loadEntityScript","body":["Script.loadEntityScript(${1:entityID: Uuid},${2:script: string},${3:forceRedownload: boolean})"]}}, + {"Script.unloadEntityScript":{"prefix":"Script.unloadEntityScript","body":["Script.unloadEntityScript(${1:entityID: Uuid},${2:shouldRemoveFromMap: boolean})"]}}, + {"Script.unloadAllEntityScripts":{"prefix":"Script.unloadAllEntityScripts","body":["Script.unloadAllEntityScripts"]}}, + {"Script.callEntityScriptMethod":{"prefix":"Script.callEntityScriptMethod","body":["Script.callEntityScriptMethod(${1:entityID: Uuid},${2:methodName: string},${3:parameters: Array.},${4:remoteCallerID: Uuid})"]}}, + {"Script.callEntityScriptMethod":{"prefix":"Script.callEntityScriptMethod","body":["Script.callEntityScriptMethod(${1:entityID: Uuid},${2:methodName: string},${3:event: PointerEvent})"]}}, + {"Script.callEntityScriptMethod":{"prefix":"Script.callEntityScriptMethod","body":["Script.callEntityScriptMethod(${1:entityID: Uuid},${2:methodName: string},${3:otherID: Uuid},${4:collision: Collision})"]}}, + {"Script.requestGarbageCollection":{"prefix":"Script.requestGarbageCollection","body":["Script.requestGarbageCollection"]}}, + {"Script.generateUUID":{"prefix":"Script.generateUUID","body":["Script.generateUUID"]}}, + {"Script.callAnimationStateHandler":{"prefix":"Script.callAnimationStateHandler","body":["Script.callAnimationStateHandler(${1:callback: function},${2:parameters: object},${3:names: Array.},${4:useNames: boolean},${5:resultHandler: object})"]}}, + {"Script.updateMemoryCost":{"prefix":"Script.updateMemoryCost","body":["Script.updateMemoryCost(${1:deltaSize: number})"]}}, + {"Script.scriptLoaded":{"prefix":"Script.scriptLoaded","body":["Script.scriptLoaded(${1:filename: string})"]}}, + {"Script.errorLoadingScript":{"prefix":"Script.errorLoadingScript","body":["Script.errorLoadingScript(${1:filename: string})"]}}, + {"Script.update":{"prefix":"Script.update","body":["Script.update(${1:deltaTime: number})"],"description":"Triggered regularly at a system-determined frequency."}}, + {"Script.scriptEnding":{"prefix":"Script.scriptEnding","body":["Script.scriptEnding"],"description":"Triggered when the script is ending."}}, + {"Script.finished":{"prefix":"Script.finished","body":["Script.finished(${1:filename: string},${2:engine: object})"]}}, + {"Script.cleanupMenuItem":{"prefix":"Script.cleanupMenuItem","body":["Script.cleanupMenuItem(${1:menuItem: string})"]}}, + {"Script.printedMessage":{"prefix":"Script.printedMessage","body":["Script.printedMessage(${1:message: string},${2:scriptName: string})"]}}, + {"Script.errorMessage":{"prefix":"Script.errorMessage","body":["Script.errorMessage(${1:message: string},${2:scriptName: string})"]}}, + {"Script.warningMessage":{"prefix":"Script.warningMessage","body":["Script.warningMessage(${1:message: string},${2:scriptName: string})"]}}, + {"Script.infoMessage":{"prefix":"Script.infoMessage","body":["Script.infoMessage(${1:message: string},${2:scriptName: string})"]}}, + {"Script.runningStateChanged":{"prefix":"Script.runningStateChanged","body":["Script.runningStateChanged"]}}, + {"Script.clearDebugWindow":{"prefix":"Script.clearDebugWindow","body":["Script.clearDebugWindow"]}}, + {"Script.loadScript":{"prefix":"Script.loadScript","body":["Script.loadScript(${1:scriptName: string},${2:isUserLoaded: boolean})"]}}, + {"Script.reloadScript":{"prefix":"Script.reloadScript","body":["Script.reloadScript(${1:scriptName: string},${2:isUserLoaded: boolean})"]}}, + {"Script.doneRunning":{"prefix":"Script.doneRunning","body":["Script.doneRunning"]}}, + {"Script.entityScriptDetailsUpdated":{"prefix":"Script.entityScriptDetailsUpdated","body":["Script.entityScriptDetailsUpdated"]}}, + {"Script.entityScriptPreloadFinished":{"prefix":"Script.entityScriptPreloadFinished","body":["Script.entityScriptPreloadFinished"]}}, + {"Script.executeOnScriptThread":{"prefix":"Script.executeOnScriptThread","body":["Script.executeOnScriptThread(${1:function: object},${2:type: ConnectionType})"]}}, + {"Script._requireResolve":{"prefix":"Script._requireResolve","body":["Script._requireResolve(${1:module: string},${2:relativeTo: string})"]}}, + {"Script.entityScriptContentAvailable":{"prefix":"Script.entityScriptContentAvailable","body":["Script.entityScriptContentAvailable(${1:entityID: Uuid},${2:scriptOrURL: string},${3:contents: string},${4:isURL: boolean},${5:success: boolean},${6:status: string})"]}}, + {"ScriptDiscoveryService":{"prefix":"ScriptDiscoveryService","body":["ScriptDiscoveryService"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"ScriptDiscoveryService.loadOneScript":{"prefix":"ScriptDiscoveryService.loadOneScript","body":["ScriptDiscoveryService.loadOneScript(${1:filename: string})"]}}, + {"ScriptDiscoveryService.loadScript":{"prefix":"ScriptDiscoveryService.loadScript","body":["ScriptDiscoveryService.loadScript(${1:filename: string},${2:isUserLoaded: boolean},${3:loadScriptFromEditor: boolean},${4:activateMainWindow: boolean},${5:reload: boolean},${6:quitWhenFinished: boolean})"]}}, + {"ScriptDiscoveryService.stopScript":{"prefix":"ScriptDiscoveryService.stopScript","body":["ScriptDiscoveryService.stopScript(${1:scriptHash: string},${2:restart: boolean})"]}}, + {"ScriptDiscoveryService.reloadAllScripts":{"prefix":"ScriptDiscoveryService.reloadAllScripts","body":["ScriptDiscoveryService.reloadAllScripts"]}}, + {"ScriptDiscoveryService.stopAllScripts":{"prefix":"ScriptDiscoveryService.stopAllScripts","body":["ScriptDiscoveryService.stopAllScripts(${1:restart: boolean})"]}}, + {"ScriptDiscoveryService.getRunning":{"prefix":"ScriptDiscoveryService.getRunning","body":["ScriptDiscoveryService.getRunning"]}}, + {"ScriptDiscoveryService.getPublic":{"prefix":"ScriptDiscoveryService.getPublic","body":["ScriptDiscoveryService.getPublic"]}}, + {"ScriptDiscoveryService.getLocal":{"prefix":"ScriptDiscoveryService.getLocal","body":["ScriptDiscoveryService.getLocal"]}}, + {"ScriptDiscoveryService.scriptCountChanged":{"prefix":"ScriptDiscoveryService.scriptCountChanged","body":["ScriptDiscoveryService.scriptCountChanged"]}}, + {"ScriptDiscoveryService.scriptsReloading":{"prefix":"ScriptDiscoveryService.scriptsReloading","body":["ScriptDiscoveryService.scriptsReloading"]}}, + {"ScriptDiscoveryService.scriptLoadError":{"prefix":"ScriptDiscoveryService.scriptLoadError","body":["ScriptDiscoveryService.scriptLoadError(${1:filename: string},${2:error: string})"]}}, + {"ScriptDiscoveryService.printedMessage":{"prefix":"ScriptDiscoveryService.printedMessage","body":["ScriptDiscoveryService.printedMessage(${1:message: string},${2:engineName: string})"]}}, + {"ScriptDiscoveryService.errorMessage":{"prefix":"ScriptDiscoveryService.errorMessage","body":["ScriptDiscoveryService.errorMessage(${1:message: string},${2:engineName: string})"]}}, + {"ScriptDiscoveryService.warningMessage":{"prefix":"ScriptDiscoveryService.warningMessage","body":["ScriptDiscoveryService.warningMessage(${1:message: string},${2:engineName: string})"]}}, + {"ScriptDiscoveryService.infoMessage":{"prefix":"ScriptDiscoveryService.infoMessage","body":["ScriptDiscoveryService.infoMessage(${1:message: string},${2:engineName: string})"]}}, + {"ScriptDiscoveryService.errorLoadingScript":{"prefix":"ScriptDiscoveryService.errorLoadingScript","body":["ScriptDiscoveryService.errorLoadingScript(${1:url: string})"]}}, + {"ScriptDiscoveryService.clearDebugWindow":{"prefix":"ScriptDiscoveryService.clearDebugWindow","body":["ScriptDiscoveryService.clearDebugWindow"]}}, + {"ScriptDiscoveryService.onPrintedMessage":{"prefix":"ScriptDiscoveryService.onPrintedMessage","body":["ScriptDiscoveryService.onPrintedMessage(${1:message: string},${2:scriptName: string})"]}}, + {"ScriptDiscoveryService.onErrorMessage":{"prefix":"ScriptDiscoveryService.onErrorMessage","body":["ScriptDiscoveryService.onErrorMessage(${1:message: string},${2:scriptName: string})"]}}, + {"ScriptDiscoveryService.onWarningMessage":{"prefix":"ScriptDiscoveryService.onWarningMessage","body":["ScriptDiscoveryService.onWarningMessage(${1:message: string},${2:scriptName: string})"]}}, + {"ScriptDiscoveryService.onInfoMessage":{"prefix":"ScriptDiscoveryService.onInfoMessage","body":["ScriptDiscoveryService.onInfoMessage(${1:message: string},${2:scriptName: string})"]}}, + {"ScriptDiscoveryService.onErrorLoadingScript":{"prefix":"ScriptDiscoveryService.onErrorLoadingScript","body":["ScriptDiscoveryService.onErrorLoadingScript(${1:url: string})"]}}, + {"ScriptDiscoveryService.onClearDebugWindow":{"prefix":"ScriptDiscoveryService.onClearDebugWindow","body":["ScriptDiscoveryService.onClearDebugWindow"]}}, + {"ScriptDiscoveryService.onScriptFinished":{"prefix":"ScriptDiscoveryService.onScriptFinished","body":["ScriptDiscoveryService.onScriptFinished(${1:filename: string},${2:engine: object})"]}}, + {"ScriptsModel":{"prefix":"ScriptsModel","body":["ScriptsModel"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Provided as a property of {@link ScriptDiscoveryService}.

\r

Has properties and functions below in addition to those of \rhttp://doc.qt.io/qt-5/qabstractitemmodel.html.

"}}, + {"ScriptsModel.index":{"prefix":"ScriptsModel.index","body":["ScriptsModel.index(${1:row: number},${2:column: number},${3:parent: QModelIndex})"]}}, + {"ScriptsModel.parent":{"prefix":"ScriptsModel.parent","body":["ScriptsModel.parent(${1:child: QModelIndex})"]}}, + {"ScriptsModel.data":{"prefix":"ScriptsModel.data","body":["ScriptsModel.data(${1:index: QModelIndex},${2:role: number})"]}}, + {"ScriptsModel.rowCount":{"prefix":"ScriptsModel.rowCount","body":["ScriptsModel.rowCount(${1:parent: QmodelIndex})"]}}, + {"ScriptsModel.columnCount":{"prefix":"ScriptsModel.columnCount","body":["ScriptsModel.columnCount(${1:parent: QmodelIndex})"]}}, + {"ScriptsModel.getTreeNodeFromIndex":{"prefix":"ScriptsModel.getTreeNodeFromIndex","body":["ScriptsModel.getTreeNodeFromIndex(${1:index: QmodelIndex})"]}}, + {"ScriptsModel.getFolderNodes":{"prefix":"ScriptsModel.getFolderNodes","body":["ScriptsModel.getFolderNodes(${1:parent: TreeNodeFolder})"]}}, + {"ScriptsModelFilter":{"prefix":"ScriptsModelFilter","body":["ScriptsModelFilter"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Provided as a property of {@link ScriptDiscoveryService}.

\r

Has properties and functions per \rhttp://doc.qt.io/qt-5/qsortfilterproxymodel.html.

"}}, + {"Uuid":{"prefix":"Uuid","body":["Uuid"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

A UUID (Universally Unique IDentifier) is used to uniquely identify entities, overlays, avatars, and the like. It is\rrepresented in JavaScript as a string in the format, {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}, where the \"n\"s are\rhexadecimal digits."}}, + {"Uuid.fromString":{"prefix":"Uuid.fromString","body":["Uuid.fromString(${1:string: string})"],"description":"Generates a UUID from a string representation of the UUID."}}, + {"Uuid.toString":{"prefix":"Uuid.toString","body":["Uuid.toString(${1:id: Uuid})"],"description":"Generates a string representation of a UUID. However, because UUIDs are represented in JavaScript as strings, this is in\reffect a no-op."}}, + {"Uuid.generate":{"prefix":"Uuid.generate","body":["Uuid.generate"],"description":"Generate a new UUID."}}, + {"Uuid.isEqual":{"prefix":"Uuid.isEqual","body":["Uuid.isEqual(${1:idA: Uuid},${2:idB: Uuid})"],"description":"Test whether two given UUIDs are equal."}}, + {"Uuid.isNull":{"prefix":"Uuid.isNull","body":["Uuid.isNull(${1:id: Uuid})"],"description":"Test whether a given UUID is null."}}, + {"Uuid.print":{"prefix":"Uuid.print","body":["Uuid.print(${1:label: string},${2:id: Uuid})"],"description":"Print to the program log a text label followed by the UUID value."}}, + {"TouchEvent":{"prefix":"TouchEvent","body":["TouchEvent"],"description":"A display or device touch event."}}, + {"Users":{"prefix":"Users","body":["Users"],"description":"
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

"}}, + {"Users.ignore":{"prefix":"Users.ignore","body":["Users.ignore(${1:nodeID: Uuid},${2:enable: boolean})"],"description":"Personally ignore another user, making them disappear for you and you disappear for them."}}, + {"Users.getIgnoreStatus":{"prefix":"Users.getIgnoreStatus","body":["Users.getIgnoreStatus(${1:nodeID: Uuid})"],"description":"Get whether or not you have ignored the node with the given UUID."}}, + {"Users.personalMute":{"prefix":"Users.personalMute","body":["Users.personalMute(${1:nodeID: Uuid},${2:muteEnabled: boolean})"],"description":"Mute another user for you and you only. They won't be able to hear you, and you won't be able to hear them."}}, + {"Users.requestPersonalMuteStatus":{"prefix":"Users.requestPersonalMuteStatus","body":["Users.requestPersonalMuteStatus(${1:nodeID: Uuid})"],"description":"Get whether or not you have personally muted the node with the given UUID."}}, + {"Users.setAvatarGain":{"prefix":"Users.setAvatarGain","body":["Users.setAvatarGain(${1:nodeID: Uuid},${2:gain: number})"],"description":"Sets an avatar's gain for you and you only.\rUnits are Decibels (dB)"}}, + {"Users.getAvatarGain":{"prefix":"Users.getAvatarGain","body":["Users.getAvatarGain(${1:nodeID: Uuid})"],"description":"Gets an avatar's gain for you and you only."}}, + {"Users.kick":{"prefix":"Users.kick","body":["Users.kick(${1:nodeID: Uuid})"],"description":"Kick/ban another user. Removes them from the server and prevents them from returning. Bans by either user name (if \ravailable) or machine fingerprint otherwise. This will only do anything if you're an admin of the domain you're in."}}, + {"Users.mute":{"prefix":"Users.mute","body":["Users.mute(${1:nodeID: Uuid})"],"description":"Mutes another user's microphone for everyone. Not permanent; the silenced user can unmute themselves with the UNMUTE \rbutton in their HUD. This will only do anything if you're an admin of the domain you're in."}}, + {"Users.requestUsernameFromID":{"prefix":"Users.requestUsernameFromID","body":["Users.requestUsernameFromID(${1:nodeID: Uuid})"],"description":"Request the user name and machine fingerprint associated with the given UUID. The user name will be returned in a \r{@link Users.usernameFromIDReply|usernameFromIDReply} signal. This will only do anything if you're an admin of the domain \ryou're in."}}, + {"Users.getCanKick":{"prefix":"Users.getCanKick","body":["Users.getCanKick"],"description":"Returns `true` if the DomainServer will allow this Node/Avatar to make kick."}}, + {"Users.toggleIgnoreRadius":{"prefix":"Users.toggleIgnoreRadius","body":["Users.toggleIgnoreRadius"],"description":"Toggle the state of the space bubble feature."}}, + {"Users.enableIgnoreRadius":{"prefix":"Users.enableIgnoreRadius","body":["Users.enableIgnoreRadius"],"description":"Enables the space bubble feature."}}, + {"Users.disableIgnoreRadius":{"prefix":"Users.disableIgnoreRadius","body":["Users.disableIgnoreRadius"],"description":"Disables the space bubble feature."}}, + {"Users.getIgnoreRadiusEnabled":{"prefix":"Users.getIgnoreRadiusEnabled","body":["Users.getIgnoreRadiusEnabled"],"description":"Returns `true` if the space bubble feature is enabled."}}, + {"Users.canKickChanged":{"prefix":"Users.canKickChanged","body":["Users.canKickChanged(${1:canKick: boolean})"]}}, + {"Users.ignoreRadiusEnabledChanged":{"prefix":"Users.ignoreRadiusEnabledChanged","body":["Users.ignoreRadiusEnabledChanged(${1:isEnabled: boolean})"]}}, + {"Users.enteredIgnoreRadius":{"prefix":"Users.enteredIgnoreRadius","body":["Users.enteredIgnoreRadius"],"description":"Notifies scripts that another user has entered the ignore radius."}}, + {"Users.usernameFromIDReply":{"prefix":"Users.usernameFromIDReply","body":["Users.usernameFromIDReply(${1:nodeID: Uuid},${2:userName: string},${3:machineFingerprint: string},${4:isAdmin: boolean})"],"description":"Triggered in response to a {@link Users.requestUsernameFromID|requestUsernameFromID} call. Provides the user name and \rmachine fingerprint associated with a UUID.\rUsername and machineFingerprint will be their default constructor output if the requesting user isn't an admin."}}, + {"Users.avatarDisconnected":{"prefix":"Users.avatarDisconnected","body":["Users.avatarDisconnected(${1:nodeID: Uuid})"],"description":"Notifies scripts that a user has disconnected from the domain."}}, + {"Vec3":{"prefix":"Vec3","body":["Vec3"],"description":"A 3-dimensional vector. See also the {@link Vec3(0)|Vec3} object."}}, + {"Vec3Color":{"prefix":"Vec3Color","body":["Vec3Color"],"description":"A color vector. See also the {@link Vec3(0)|Vec3} object."}}, + {"Vec3":{"prefix":"Vec3","body":["Vec3"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Vec3 API facilities for generating and manipulating 3-dimensional vectors. High Fidelity uses a right-handed \rCartesian coordinate system where the y-axis is the \"up\" and the negative z-axis is the \"front\" direction.\r\"High"}}, + {"Vec3.reflect":{"prefix":"Vec3.reflect","body":["Vec3.reflect(${1:v: Vec3},${2:normal: Vec3})"],"description":"Calculate the reflection of a vector in a plane."}}, + {"Vec3.cross":{"prefix":"Vec3.cross","body":["Vec3.cross(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate the cross product of two vectors."}}, + {"Vec3.dot":{"prefix":"Vec3.dot","body":["Vec3.dot(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate the dot product of two vectors."}}, + {"Vec3.multiply":{"prefix":"Vec3.multiply","body":["Vec3.multiply(${1:v: Vec3},${2:scale: number})"],"description":"Multiply a vector by a scale factor."}}, + {"Vec3.multiply":{"prefix":"Vec3.multiply","body":["Vec3.multiply(${1:scale: number},${2:v: Vec3})"],"description":"Multiply a vector by a scale factor."}}, + {"Vec3.multiplyVbyV":{"prefix":"Vec3.multiplyVbyV","body":["Vec3.multiplyVbyV(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Multiply two vectors."}}, + {"Vec3.multiplyQbyV":{"prefix":"Vec3.multiplyQbyV","body":["Vec3.multiplyQbyV(${1:q: Quat},${2:v: Vec3})"],"description":"Rotate a vector."}}, + {"Vec3.sum":{"prefix":"Vec3.sum","body":["Vec3.sum(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate the sum of two vectors."}}, + {"Vec3.subtract":{"prefix":"Vec3.subtract","body":["Vec3.subtract(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate one vector subtracted from another."}}, + {"Vec3.length":{"prefix":"Vec3.length","body":["Vec3.length(${1:v: Vec3})"],"description":"Calculate the length of a vector"}}, + {"Vec3.distance":{"prefix":"Vec3.distance","body":["Vec3.distance(${1:p1: Vec3},${2:p2: Vec3})"],"description":"Calculate the distance between two points."}}, + {"Vec3.orientedAngle":{"prefix":"Vec3.orientedAngle","body":["Vec3.orientedAngle(${1:v1: Vec3},${2:v2: Vec3},${3:ref: Vec3})"],"description":"Calculate the angle of rotation from one vector onto another, with the sign depending on a reference vector."}}, + {"Vec3.normalize":{"prefix":"Vec3.normalize","body":["Vec3.normalize(${1:v: Vec3})"],"description":"Normalize a vector so that its length is 1."}}, + {"Vec3.mix":{"prefix":"Vec3.mix","body":["Vec3.mix(${1:v1: Vec3},${2:v2: Vec3},${3:factor: number})"],"description":"Calculate a linear interpolation between two vectors."}}, + {"Vec3.print":{"prefix":"Vec3.print","body":["Vec3.print(${1:label: string},${2:v: Vec3})"],"description":"Print to the program log a text label followed by a vector value."}}, + {"Vec3.equal":{"prefix":"Vec3.equal","body":["Vec3.equal(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Test whether two vectors are equal. Note: The vectors must be exactly equal in order for \rtrue to be returned; it is often better to use {@link Vec3(0).withinEpsilon|withinEpsilon}."}}, + {"Vec3.withinEpsilon":{"prefix":"Vec3.withinEpsilon","body":["Vec3.withinEpsilon(${1:v1: Vec3},${2:v2: Vec3},${3:epsilon: number})"],"description":"Test whether two vectors are equal within a tolerance. Note: It is often better to use this function \rthan {@link Vec3(0).equal|equal}."}}, + {"Vec3.toPolar":{"prefix":"Vec3.toPolar","body":["Vec3.toPolar(${1:p: Vec3})"],"description":"Calculate polar coordinates (elevation, azimuth, radius) that transform the unit z-axis vector onto a point."}}, + {"Vec3.fromPolar":{"prefix":"Vec3.fromPolar","body":["Vec3.fromPolar(${1:polar: Vec3})"],"description":"Calculate the coordinates of a point from polar coordinate transformation of the unit z-axis vector."}}, + {"Vec3.fromPolar":{"prefix":"Vec3.fromPolar","body":["Vec3.fromPolar(${1:elevation: number},${2:azimuth: number})"],"description":"Calculate the unit vector corresponding to polar coordinates elevation and azimuth transformation of the unit z-axis \rvector."}}, + {"Vec3.getAngle":{"prefix":"Vec3.getAngle","body":["Vec3.getAngle(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate the angle between two vectors."}}, + {"WheelEvent":{"prefix":"WheelEvent","body":["WheelEvent"],"description":"A mouse wheel event."}}, + {"BoxFace":{"prefix":"BoxFace","body":["BoxFace"],"description":"

A BoxFace specifies the face of an axis-aligned (AA) box.\r\r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
\"MIN_X_FACE\"The minimum x-axis face.
\"MAX_X_FACE\"The maximum x-axis face.
\"MIN_Y_FACE\"The minimum y-axis face.
\"MAX_Y_FACE\"The maximum y-axis face.
\"MIN_Z_FACE\"The minimum z-axis face.
\"MAX_Z_FACE\"The maximum z-axis face.
\"UNKNOWN_FACE\"Unknown value.
"}}, + {"DebugDraw":{"prefix":"DebugDraw","body":["DebugDraw"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

Helper functions to render ephemeral debug markers and lines.\rDebugDraw markers and lines are only visible locally, they are not visible by other users."}}, + {"DebugDraw.drawRay":{"prefix":"DebugDraw.drawRay","body":["DebugDraw.drawRay(${1:start: Vec3},${2:end: Vec3},${3:color: Vec4})"],"description":"Draws a line in world space, but it will only be visible for a single frame."}}, + {"DebugDraw.addMarker":{"prefix":"DebugDraw.addMarker","body":["DebugDraw.addMarker(${1:key: string},${2:rotation: Quat},${3:position: Vec3},${4:color: Vec4})"],"description":"Adds a debug marker to the world. This marker will be drawn every frame until it is removed with DebugDraw.removeMarker.\rThis can be called repeatedly to change the position of the marker."}}, + {"DebugDraw.removeMarker":{"prefix":"DebugDraw.removeMarker","body":["DebugDraw.removeMarker(${1:key: string})"],"description":"Removes debug marker from the world. Once a marker is removed, it will no longer be visible."}}, + {"DebugDraw.addMyAvatarMarker":{"prefix":"DebugDraw.addMyAvatarMarker","body":["DebugDraw.addMyAvatarMarker(${1:key: string},${2:rotation: Quat},${3:position: Vec3},${4:color: Vec4})"],"description":"Adds a debug marker to the world, this marker will be drawn every frame until it is removed with DebugDraw.removeMyAvatarMarker.\rThis can be called repeatedly to change the position of the marker."}}, + {"DebugDraw.removeMyAvatarMarker":{"prefix":"DebugDraw.removeMyAvatarMarker","body":["DebugDraw.removeMyAvatarMarker(${1:key: string})"],"description":"Removes debug marker from the world. Once a marker is removed, it will no longer be visible"}}, + {"Paths":{"prefix":"Paths","body":["Paths"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Paths API provides absolute paths to the scripts and resources directories."}}, + {"Entities.CollisionMask":{"prefix":"Entities.CollisionMask","body":["Entities.CollisionMask"],"description":"

An entity may collide with the following types of items:

\r\r \r \r \r \r \r \r \r \r \r \r
ValueDescription
1Static entities — non-dynamic entities with no velocity.
2Dynamic entities — entities that have their dynamic property set to\r true.
4Kinematic entities — non-dynamic entities with velocity.
8My avatar.
16Other avatars.
\r

The values for the collision types that are enabled are added together to give the CollisionMask value. For example, a\rvalue of 31 means that an entity will collide with all item types.

"}}, + {"PointerEvent":{"prefix":"PointerEvent","body":["PointerEvent"],"description":"A PointerEvent defines a 2D or 3D mouse or similar pointer event."}}, + {"KeyboardModifiers":{"prefix":"KeyboardModifiers","body":["KeyboardModifiers"],"description":"

A KeyboardModifiers value is used to specify which modifier keys on the keyboard are pressed. The value is the sum \r(bitwise OR) of the relevant combination of values from the following table:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
KeyHexadecimal valueDecimal valueDescription
Shift0x0200000033554432A Shift key on the keyboard is pressed.
Control0x0400000067108864A control key on the keyboard is pressed. On Windows the \"control\" key is the Ctrl key; on OSX it is the Command \r key.
Alt0x08000000134217728An Alt key on the keyboard is pressed.
Meta0x10000000268435456A meta key on the keyboard is pressed. On Windows the \"meta\" key is the Windows key; on OSX it is the Control \r (Splat) key.
Keypad0x20000000536870912A keypad button is pressed.
Group0x400000001073741824X11 operating system only: An AltGr / Mode_switch key on the keyboard is pressed.
"}}, + {"Rect":{"prefix":"Rect","body":["Rect"],"description":"Defines a rectangular portion of an image or screen, or similar."}}, + {"Color":{"prefix":"Color","body":["Color"],"description":"An RGB color value."}}, + {"AACube":{"prefix":"AACube","body":["AACube"],"description":"An axis-aligned cube, defined as the bottom right near (minimum axes values) corner of the cube plus the dimension of its \rsides."}}, + {"Collision":{"prefix":"Collision","body":["Collision"]}}, + {"Size":{"prefix":"Size","body":["Size"],"description":"A 2D size value."}}, + {"Avatar.AnimationDetails":{"prefix":"Avatar.AnimationDetails","body":["Avatar.AnimationDetails"]}}, + {"Vec4":{"prefix":"Vec4","body":["Vec4"],"description":"A 4-dimensional vector."}}, + {"Vec2":{"prefix":"Vec2","body":["Vec2"],"description":"A 2-dimensional vector."}}, + {"PickRay":{"prefix":"PickRay","body":["PickRay"],"description":"A PickRay defines a vector with a starting point. It is used, for example, when finding entities or overlays that lie under a\rmouse click or intersect a laser beam."}}, + {"StylusTip":{"prefix":"StylusTip","body":["StylusTip"],"description":"A StylusTip defines the tip of a stylus."}}, + {"PickParabola":{"prefix":"PickParabola","body":["PickParabola"],"description":"A PickParabola defines a parabola with a starting point, intitial velocity, and acceleration."}}, + {"CollisionRegion":{"prefix":"CollisionRegion","body":["CollisionRegion"],"description":"A CollisionRegion defines a volume for checking collisions in the physics simulation."}}, + {"ContactEventType":{"prefix":"ContactEventType","body":["ContactEventType"],"description":"

The type of a collision contact event.\r\r \r \r \r \r \r \r \r \r
ValueDescription
0Start of the collision.
1Continuation of the collision.
2End of the collision.
"}}, + {"MeshProxy":{"prefix":"MeshProxy","body":["MeshProxy"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

A handle for a mesh in an entity, such as returned by {@link Entities.getMeshes}."}}, + {"MeshProxy#getNumVertices":{"prefix":"MeshProxy#getNumVertices","body":["MeshProxy#getNumVertices"],"description":"Get the number of vertices in the mesh."}}, + {"MeshProxy#getPos":{"prefix":"MeshProxy#getPos","body":["MeshProxy#getPos(${1:index: number})"],"description":"Get the position of a vertex in the mesh."}}, + {"ShapeType":{"prefix":"ShapeType","body":["ShapeType"],"description":"

A ShapeType defines the shape used for collisions or zones.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
\"none\"No shape.
\"box\"A cube.
\"sphere\"A sphere.
\"capsule-x\"A capsule (cylinder with spherical ends) oriented on the x-axis.
\"capsule-y\"A capsule (cylinder with spherical ends) oriented on the y-axis.
\"capsule-z\"A capsule (cylinder with spherical ends) oriented on the z-axis.
\"cylinder-x\"A cylinder oriented on the x-axis.
\"cylinder-y\"A cylinder oriented on the y-axis.
\"cylinder-z\"A cylinder oriented on the z-axis.
\"hull\"Not used.
\"compound\"A compound convex hull specified in an OBJ file.
\"simple-hull\"A convex hull automatically generated from the model.
\"simple-compound\"A compound convex hull automatically generated from the model, using \r sub-meshes.
\"static-mesh\"The exact shape of the model.
\"plane\"A plane.
"}}, + {"Camera.Mode":{"prefix":"Camera.Mode","body":["Camera.Mode"],"description":"

Camera modes affect the position of the camera and the controls for camera movement. The camera can be in one of the\rfollowing modes:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ModeStringDescription
First Person\"first person\"The camera is positioned such that you have the same view as your avatar. The camera moves and rotates with your\r avatar.
Third Person\"third person\"The camera is positioned such that you have a view from just behind your avatar. The camera moves and rotates with\r your avatar.
Mirror\"mirror\"The camera is positioned such that you are looking directly at your avatar. The camera moves and rotates with your \r avatar.
Independent\"independent\"The camera's position and orientation don't change with your avatar movement. Instead, they can be set via \r scripting.
Entity\"entity\"The camera's position and orientation are set to be the same as a specified entity's, and move with the entity as\r it moves.\r
"}}, + {"ViewFrustum":{"prefix":"ViewFrustum","body":["ViewFrustum"],"description":"A ViewFrustum has a \"keyhole\" shape: a regular frustum for stuff that is visible plus a central sphere for stuff that is\rnearby (for physics simulation)."}}, + {"Camera":{"prefix":"Camera","body":["Camera"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Camera API provides access to the \"camera\" that defines your view in desktop and HMD display modes."}}, + {"Camera.getModeString":{"prefix":"Camera.getModeString","body":["Camera.getModeString"],"description":"Get the current camera mode. You can also get the mode using the Camera.mode property."}}, + {"Camera.setModeString":{"prefix":"Camera.setModeString","body":["Camera.setModeString(${1:mode: Camera.Mode})"],"description":"Set the camera mode. You can also set the mode using the Camera.mode property."}}, + {"Camera.getPosition":{"prefix":"Camera.getPosition","body":["Camera.getPosition"],"description":"Get the current camera position. You can also get the position using the Camera.position property."}}, + {"Camera.setPosition":{"prefix":"Camera.setPosition","body":["Camera.setPosition(${1:position: Vec3})"],"description":"Set the camera position. You can also set the position using the Camera.position property. Only works if the\r camera is in independent mode."}}, + {"Camera.getOrientation":{"prefix":"Camera.getOrientation","body":["Camera.getOrientation"],"description":"Get the current camera orientation. You can also get the orientation using the Camera.orientation property."}}, + {"Camera.setOrientation":{"prefix":"Camera.setOrientation","body":["Camera.setOrientation(${1:orientation: Quat})"],"description":"Set the camera orientation. You can also set the orientation using the Camera.orientation property. Only\r works if the camera is in independent mode."}}, + {"Camera.computePickRay":{"prefix":"Camera.computePickRay","body":["Camera.computePickRay(${1:x: number},${2:y: number})"],"description":"Compute a {@link PickRay} based on the current camera configuration and the specified x, y position on the \r screen. The {@link PickRay} can be used in functions such as {@link Entities.findRayIntersection} and \r {@link Overlays.findRayIntersection}."}}, + {"Camera.lookAt":{"prefix":"Camera.lookAt","body":["Camera.lookAt(${1:position: Vec3})"],"description":"Rotate the camera to look at the specified position. Only works if the camera is in independent mode."}}, + {"Camera.keepLookingAt":{"prefix":"Camera.keepLookingAt","body":["Camera.keepLookingAt(${1:position: Vec3})"],"description":"Set the camera to continue looking at the specified position even while the camera moves. Only works if the \rcamera is in independent mode."}}, + {"Camera.stopLookingAt":{"prefix":"Camera.stopLookingAt","body":["Camera.stopLookingAt"],"description":"Stops the camera from continually looking at the position that was set with Camera.keepLookingAt."}}, + {"Camera.modeUpdated":{"prefix":"Camera.modeUpdated","body":["Camera.modeUpdated(${1:newMode: Camera.Mode})"],"description":"Triggered when the camera mode changes."}}, + {"Render.toJSON":{"prefix":"Render.toJSON","body":["Render.toJSON"]}}, + {"Render.load":{"prefix":"Render.load","body":["Render.load(${1:map: object})"]}}, + {"Render.isTask":{"prefix":"Render.isTask","body":["Render.isTask"]}}, + {"Render.getSubConfigs":{"prefix":"Render.getSubConfigs","body":["Render.getSubConfigs"]}}, + {"Render.getNumSubs":{"prefix":"Render.getNumSubs","body":["Render.getNumSubs"]}}, + {"Render.getSubConfig":{"prefix":"Render.getSubConfig","body":["Render.getSubConfig(${1:index: number})"]}}, + {"Render.load":{"prefix":"Render.load","body":["Render.load(${1:map: object})"]}}, + {"Render.loaded":{"prefix":"Render.loaded","body":["Render.loaded"]}}, + {"Render.newStats":{"prefix":"Render.newStats","body":["Render.newStats"]}}, + {"Render.dirtyEnabled":{"prefix":"Render.dirtyEnabled","body":["Render.dirtyEnabled"]}}, + {"Render":{"prefix":"Render","body":["Render"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Render.getConfig":{"prefix":"Render.getConfig","body":["Render.getConfig(${1:name: string})"]}}, + {"Render.refresh":{"prefix":"Render.refresh","body":["Render.refresh"]}}, + {"FaceTracker.muteToggled":{"prefix":"FaceTracker.muteToggled","body":["FaceTracker.muteToggled"]}}, + {"FaceTracker.toggleMute":{"prefix":"FaceTracker.toggleMute","body":["FaceTracker.toggleMute"]}}, + {"FaceTracker.getMuted":{"prefix":"FaceTracker.getMuted","body":["FaceTracker.getMuted"]}}, + {"InteractiveWindow":{"prefix":"InteractiveWindow","body":["InteractiveWindow"],"description":"
Available in:Interface Scripts

"}}, + {"InteractiveWindow.sendToQml":{"prefix":"InteractiveWindow.sendToQml","body":["InteractiveWindow.sendToQml(${1:message: object})"]}}, + {"InteractiveWindow.emitScriptEvent":{"prefix":"InteractiveWindow.emitScriptEvent","body":["InteractiveWindow.emitScriptEvent(${1:message: object})"]}}, + {"InteractiveWindow.emitWebEvent":{"prefix":"InteractiveWindow.emitWebEvent","body":["InteractiveWindow.emitWebEvent(${1:message: object})"]}}, + {"InteractiveWindow.close":{"prefix":"InteractiveWindow.close","body":["InteractiveWindow.close"]}}, + {"InteractiveWindow.show":{"prefix":"InteractiveWindow.show","body":["InteractiveWindow.show"]}}, + {"InteractiveWindow.raise":{"prefix":"InteractiveWindow.raise","body":["InteractiveWindow.raise"]}}, + {"InteractiveWindow.visibleChanged":{"prefix":"InteractiveWindow.visibleChanged","body":["InteractiveWindow.visibleChanged"]}}, + {"InteractiveWindow.positionChanged":{"prefix":"InteractiveWindow.positionChanged","body":["InteractiveWindow.positionChanged"]}}, + {"InteractiveWindow.sizeChanged":{"prefix":"InteractiveWindow.sizeChanged","body":["InteractiveWindow.sizeChanged"]}}, + {"InteractiveWindow.presentationModeChanged":{"prefix":"InteractiveWindow.presentationModeChanged","body":["InteractiveWindow.presentationModeChanged"]}}, + {"InteractiveWindow.titleChanged":{"prefix":"InteractiveWindow.titleChanged","body":["InteractiveWindow.titleChanged"]}}, + {"InteractiveWindow.closed":{"prefix":"InteractiveWindow.closed","body":["InteractiveWindow.closed"]}}, + {"InteractiveWindow.fromQml":{"prefix":"InteractiveWindow.fromQml","body":["InteractiveWindow.fromQml(${1:message: object})"]}}, + {"InteractiveWindow.scriptEventReceived":{"prefix":"InteractiveWindow.scriptEventReceived","body":["InteractiveWindow.scriptEventReceived(${1:message: object})"]}}, + {"InteractiveWindow.webEventReceived":{"prefix":"InteractiveWindow.webEventReceived","body":["InteractiveWindow.webEventReceived(${1:message: object})"]}}, + {"InteractiveWindow.qmlToScript":{"prefix":"InteractiveWindow.qmlToScript","body":["InteractiveWindow.qmlToScript(${1:message: object})"]}}, + {"OffscreenFlags":{"prefix":"OffscreenFlags","body":["OffscreenFlags"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"OffscreenFlags.navigationFocusedChanged":{"prefix":"OffscreenFlags.navigationFocusedChanged","body":["OffscreenFlags.navigationFocusedChanged"]}}, + {"OffscreenFlags.navigationFocusDisabledChanged":{"prefix":"OffscreenFlags.navigationFocusDisabledChanged","body":["OffscreenFlags.navigationFocusDisabledChanged"]}}, + {"QmlFragmentClass#addButton":{"prefix":"QmlFragmentClass#addButton","body":["QmlFragmentClass#addButton(${1:properties: object})"],"description":"Creates a new button, adds it to this and returns it."}}, + {"OverlayWebWindow":{"prefix":"OverlayWebWindow","body":["OverlayWebWindow(${1:properties: OverlayWindow.Properties})"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"OverlayWebWindow.getURL":{"prefix":"OverlayWebWindow.getURL","body":["OverlayWebWindow.getURL"]}}, + {"OverlayWebWindow.setURL":{"prefix":"OverlayWebWindow.setURL","body":["OverlayWebWindow.setURL(${1:url: string})"]}}, + {"OverlayWebWindow.setScriptURL":{"prefix":"OverlayWebWindow.setScriptURL","body":["OverlayWebWindow.setScriptURL(${1:script: string})"]}}, + {"OverlayWebWindow.urlChanged":{"prefix":"OverlayWebWindow.urlChanged","body":["OverlayWebWindow.urlChanged"]}}, + {"OverlayWindow.Properties":{"prefix":"OverlayWindow.Properties","body":["OverlayWindow.Properties"]}}, + {"OverlayWindow":{"prefix":"OverlayWindow","body":["OverlayWindow(${1:properties: OverlayWindow.Properties})"],"description":"
Available in:Interface Scripts

"}}, + {"OverlayWindow.initQml":{"prefix":"OverlayWindow.initQml","body":["OverlayWindow.initQml(${1:properties: OverlayWindow.Properties})"]}}, + {"OverlayWindow.isVisible":{"prefix":"OverlayWindow.isVisible","body":["OverlayWindow.isVisible"]}}, + {"OverlayWindow.setVisible":{"prefix":"OverlayWindow.setVisible","body":["OverlayWindow.setVisible(${1:visible: boolean})"]}}, + {"OverlayWindow.getPosition":{"prefix":"OverlayWindow.getPosition","body":["OverlayWindow.getPosition"]}}, + {"OverlayWindow.setPosition":{"prefix":"OverlayWindow.setPosition","body":["OverlayWindow.setPosition(${1:position: Vec2})"]}}, + {"OverlayWindow.setPosition":{"prefix":"OverlayWindow.setPosition","body":["OverlayWindow.setPosition(${1:x: number},${2:y: number})"]}}, + {"OverlayWindow.getSize":{"prefix":"OverlayWindow.getSize","body":["OverlayWindow.getSize"]}}, + {"OverlayWindow.setSize":{"prefix":"OverlayWindow.setSize","body":["OverlayWindow.setSize(${1:size: Vec2})"]}}, + {"OverlayWindow.setSize":{"prefix":"OverlayWindow.setSize","body":["OverlayWindow.setSize(${1:width: number},${2:height: number})"]}}, + {"OverlayWindow.setTitle":{"prefix":"OverlayWindow.setTitle","body":["OverlayWindow.setTitle(${1:title: string})"]}}, + {"OverlayWindow.raise":{"prefix":"OverlayWindow.raise","body":["OverlayWindow.raise"]}}, + {"OverlayWindow.close":{"prefix":"OverlayWindow.close","body":["OverlayWindow.close"]}}, + {"OverlayWindow.getEventBridge":{"prefix":"OverlayWindow.getEventBridge","body":["OverlayWindow.getEventBridge"]}}, + {"OverlayWindow.sendToQml":{"prefix":"OverlayWindow.sendToQml","body":["OverlayWindow.sendToQml(${1:message: object})"]}}, + {"OverlayWindow.clearDebugWindow":{"prefix":"OverlayWindow.clearDebugWindow","body":["OverlayWindow.clearDebugWindow"]}}, + {"OverlayWindow.emitScriptEvent":{"prefix":"OverlayWindow.emitScriptEvent","body":["OverlayWindow.emitScriptEvent(${1:message: object})"]}}, + {"OverlayWindow.emitWebEvent":{"prefix":"OverlayWindow.emitWebEvent","body":["OverlayWindow.emitWebEvent(${1:message: object})"]}}, + {"OverlayWindow.visibleChanged":{"prefix":"OverlayWindow.visibleChanged","body":["OverlayWindow.visibleChanged"]}}, + {"OverlayWindow.positionChanged":{"prefix":"OverlayWindow.positionChanged","body":["OverlayWindow.positionChanged"]}}, + {"OverlayWindow.sizeChanged":{"prefix":"OverlayWindow.sizeChanged","body":["OverlayWindow.sizeChanged"]}}, + {"OverlayWindow.moved":{"prefix":"OverlayWindow.moved","body":["OverlayWindow.moved(${1:position: Vec2})"]}}, + {"OverlayWindow.resized":{"prefix":"OverlayWindow.resized","body":["OverlayWindow.resized(${1:size: Size})"]}}, + {"OverlayWindow.closed":{"prefix":"OverlayWindow.closed","body":["OverlayWindow.closed"]}}, + {"OverlayWindow.fromQml":{"prefix":"OverlayWindow.fromQml","body":["OverlayWindow.fromQml(${1:message: object})"]}}, + {"OverlayWindow.scriptEventReceived":{"prefix":"OverlayWindow.scriptEventReceived","body":["OverlayWindow.scriptEventReceived(${1:message: object})"]}}, + {"OverlayWindow.webEventReceived":{"prefix":"OverlayWindow.webEventReceived","body":["OverlayWindow.webEventReceived(${1:message: object})"]}}, + {"OverlayWindow.hasMoved":{"prefix":"OverlayWindow.hasMoved","body":["OverlayWindow.hasMoved(${1:position: Vec2})"]}}, + {"OverlayWindow.hasClosed":{"prefix":"OverlayWindow.hasClosed","body":["OverlayWindow.hasClosed"]}}, + {"OverlayWindow.qmlToScript":{"prefix":"OverlayWindow.qmlToScript","body":["OverlayWindow.qmlToScript(${1:message: object})"]}}, + {"Tablet":{"prefix":"Tablet","body":["Tablet"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"tabletInterface":{"prefix":"tabletInterface","body":["tabletInterface"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Tablet.AudioEvents":{"prefix":"Tablet.AudioEvents","body":["Tablet.AudioEvents"],"description":"\r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
0Button click.
1Button hover.
2Tablet open.
3Tablet hands in.
4Tablet hands out.
5Last.
"}}, + {"Tablet.getTablet":{"prefix":"Tablet.getTablet","body":["Tablet.getTablet(${1:name: string})"],"description":"Creates or returns a new TabletProxy and returns it."}}, + {"tabletInterface.getTablet":{"prefix":"tabletInterface.getTablet","body":["tabletInterface.getTablet(${1:name: string})"],"description":"Creates or returns a new TabletProxy and returns it."}}, + {"Tablet.playSound":{"prefix":"Tablet.playSound","body":["Tablet.playSound(${1:sound: Tablet.AudioEvents})"]}}, + {"tabletInterface.playSound":{"prefix":"tabletInterface.playSound","body":["tabletInterface.playSound(${1:sound: Tablet.AudioEvents})"]}}, + {"Tablet.tabletNotification":{"prefix":"Tablet.tabletNotification","body":["Tablet.tabletNotification"],"description":"Triggered when a tablet message or dialog is created."}}, + {"tabletInterface.tabletNotification":{"prefix":"tabletInterface.tabletNotification","body":["tabletInterface.tabletNotification"],"description":"Triggered when a tablet message or dialog is created."}}, + {"TabletProxy#ButtonList":{"prefix":"TabletProxy#ButtonList","body":["TabletProxy#ButtonList"]}}, + {"TabletProxy":{"prefix":"TabletProxy","body":["TabletProxy"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"TabletProxy#gotoMenuScreen":{"prefix":"TabletProxy#gotoMenuScreen","body":["TabletProxy#gotoMenuScreen(${1:submenu: string})"]}}, + {"TabletProxy#initialScreen":{"prefix":"TabletProxy#initialScreen","body":["TabletProxy#initialScreen(${1:url: string})"]}}, + {"TabletProxy#gotoHomeScreen":{"prefix":"TabletProxy#gotoHomeScreen","body":["TabletProxy#gotoHomeScreen"],"description":"Transition to the home screen."}}, + {"TabletProxy#gotoWebScreen":{"prefix":"TabletProxy#gotoWebScreen","body":["TabletProxy#gotoWebScreen(${1:url: string},${2:injectedJavaScriptUrl: string},${3:loadOtherBase: boolean})"],"description":"Show the specified Web url on the tablet."}}, + {"TabletProxy#loadQMLSource":{"prefix":"TabletProxy#loadQMLSource","body":["TabletProxy#loadQMLSource(${1:path: string},${2:resizable: boolean})"]}}, + {"TabletProxy#pushOntoStack":{"prefix":"TabletProxy#pushOntoStack","body":["TabletProxy#pushOntoStack(${1:path: string})"]}}, + {"TabletProxy#popFromStack":{"prefix":"TabletProxy#popFromStack","body":["TabletProxy#popFromStack"]}}, + {"TabletProxy#loadQMLOnTop":{"prefix":"TabletProxy#loadQMLOnTop","body":["TabletProxy#loadQMLOnTop(${1:path: string})"]}}, + {"TabletProxy#loadWebScreenOnTop":{"prefix":"TabletProxy#loadWebScreenOnTop","body":["TabletProxy#loadWebScreenOnTop(${1:path: string},${2:injectedJavaScriptURL: string})"]}}, + {"TabletProxy#returnToPreviousApp":{"prefix":"TabletProxy#returnToPreviousApp","body":["TabletProxy#returnToPreviousApp"]}}, + {"TabletProxy#isMessageDialogOpen":{"prefix":"TabletProxy#isMessageDialogOpen","body":["TabletProxy#isMessageDialogOpen"],"description":"Check if the tablet has a message dialog open."}}, + {"TabletProxy#closeDialog":{"prefix":"TabletProxy#closeDialog","body":["TabletProxy#closeDialog"],"description":"Close any open dialogs."}}, + {"TabletProxy#addButton":{"prefix":"TabletProxy#addButton","body":["TabletProxy#addButton(${1:properties: object})"],"description":"Creates a new button, adds it to this and returns it."}}, + {"TabletProxy#removeButton":{"prefix":"TabletProxy#removeButton","body":["TabletProxy#removeButton(${1:button: TabletButtonProxy})"],"description":"Removes a button from the tablet."}}, + {"TabletProxy#emitScriptEvent":{"prefix":"TabletProxy#emitScriptEvent","body":["TabletProxy#emitScriptEvent(${1:message: object})"],"description":"Used to send an event to the HTML/JavaScript embedded in the tablet."}}, + {"TabletProxy#sendToQml":{"prefix":"TabletProxy#sendToQml","body":["TabletProxy#sendToQml(${1:message: object})"],"description":"Used to send an event to the QML embedded in the tablet."}}, + {"TabletProxy#onHomeScreen":{"prefix":"TabletProxy#onHomeScreen","body":["TabletProxy#onHomeScreen"],"description":"Check if the tablet is on the home screen."}}, + {"TabletProxy#setLandscape":{"prefix":"TabletProxy#setLandscape","body":["TabletProxy#setLandscape(${1:landscape: boolean})"],"description":"Set tablet into or out of landscape mode."}}, + {"TabletProxy#getLandscape":{"prefix":"TabletProxy#getLandscape","body":["TabletProxy#getLandscape"]}}, + {"TabletProxy#isPathLoaded":{"prefix":"TabletProxy#isPathLoaded","body":["TabletProxy#isPathLoaded(${1:path: string})"]}}, + {"TabletProxy#webEventReceived":{"prefix":"TabletProxy#webEventReceived","body":["TabletProxy#webEventReceived(${1:message: object})"],"description":"Signaled when this tablet receives an event from the html/js embedded in the tablet."}}, + {"TabletProxy#fromQml":{"prefix":"TabletProxy#fromQml","body":["TabletProxy#fromQml(${1:message: object})"],"description":"Signaled when this tablet receives an event from the qml embedded in the tablet."}}, + {"TabletProxy#screenChanged":{"prefix":"TabletProxy#screenChanged","body":["TabletProxy#screenChanged(${1:type: string},${2:url: string})"],"description":"Signaled when this tablet screen changes."}}, + {"TabletProxy#isTabletShownChanged":{"prefix":"TabletProxy#isTabletShownChanged","body":["TabletProxy#isTabletShownChanged"],"description":"Signaled when the tablet becomes visible or becomes invisible."}}, + {"TabletProxy#toolbarModeChanged":{"prefix":"TabletProxy#toolbarModeChanged","body":["TabletProxy#toolbarModeChanged"]}}, + {"TabletButtonProxy":{"prefix":"TabletButtonProxy","body":["TabletButtonProxy"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"TabletButtonProxy#getProperties":{"prefix":"TabletButtonProxy#getProperties","body":["TabletButtonProxy#getProperties"],"description":"Returns the current value of this button's properties."}}, + {"TabletButtonProxy#editProperties":{"prefix":"TabletButtonProxy#editProperties","body":["TabletButtonProxy#editProperties(${1:properties: TabletButtonProxy.ButtonProperties})"],"description":"Replace the values of some of this button's properties."}}, + {"TabletButtonProxy#clicked":{"prefix":"TabletButtonProxy#clicked","body":["TabletButtonProxy#clicked"],"description":"Triggered when this button has been clicked on by the user."}}, + {"TabletButtonProxy#propertiesChanged":{"prefix":"TabletButtonProxy#propertiesChanged","body":["TabletButtonProxy#propertiesChanged"]}}, + {"TabletButtonProxy.ButtonProperties":{"prefix":"TabletButtonProxy.ButtonProperties","body":["TabletButtonProxy.ButtonProperties"]}}, + {"ToolbarButtonProxy":{"prefix":"ToolbarButtonProxy","body":["ToolbarButtonProxy"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"ToolbarButtonProxy#editProperties":{"prefix":"ToolbarButtonProxy#editProperties","body":["ToolbarButtonProxy#editProperties(${1:properties: object})"]}}, + {"ToolbarButtonProxy#writeProperty":{"prefix":"ToolbarButtonProxy#writeProperty","body":["ToolbarButtonProxy#writeProperty(${1:propertyValue: object})"]}}, + {"ToolbarButtonProxy#writeProperties":{"prefix":"ToolbarButtonProxy#writeProperties","body":["ToolbarButtonProxy#writeProperties(${1:properties: object})"]}}, + {"ToolbarButtonProxy#readProperty":{"prefix":"ToolbarButtonProxy#readProperty","body":["ToolbarButtonProxy#readProperty(${1:propertyName: string})"]}}, + {"ToolbarButtonProxy#readProperties":{"prefix":"ToolbarButtonProxy#readProperties","body":["ToolbarButtonProxy#readProperties(${1:propertyList: Array.})"]}}, + {"ToolbarButtonProxy#clicked":{"prefix":"ToolbarButtonProxy#clicked","body":["ToolbarButtonProxy#clicked"]}}, + {"ToolbarProxy":{"prefix":"ToolbarProxy","body":["ToolbarProxy"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"ToolbarProxy#addButton":{"prefix":"ToolbarProxy#addButton","body":["ToolbarProxy#addButton(${1:properties: object})"]}}, + {"ToolbarProxy#removeButton":{"prefix":"ToolbarProxy#removeButton","body":["ToolbarProxy#removeButton(${1:name: string})"]}}, + {"ToolbarProxy#writeProperty":{"prefix":"ToolbarProxy#writeProperty","body":["ToolbarProxy#writeProperty(${1:propertyValue: object})"]}}, + {"ToolbarProxy#writeProperties":{"prefix":"ToolbarProxy#writeProperties","body":["ToolbarProxy#writeProperties(${1:properties: object})"]}}, + {"ToolbarProxy#readProperty":{"prefix":"ToolbarProxy#readProperty","body":["ToolbarProxy#readProperty(${1:propertyName: string})"]}}, + {"ToolbarProxy#readProperties":{"prefix":"ToolbarProxy#readProperties","body":["ToolbarProxy#readProperties(${1:propertyList: Array.})"]}}, + {"Toolbars":{"prefix":"Toolbars","body":["Toolbars"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Toolbars.getToolbar":{"prefix":"Toolbars.getToolbar","body":["Toolbars.getToolbar(${1:toolbarID: string})"]}}, + {"Controller.Hardware-OculusTouch":{"prefix":"Controller.Hardware-OculusTouch","body":["Controller.Hardware-OculusTouch"],"description":"

The Controller.Hardware.OculusTouch object has properties representing Oculus Rift. The property values are \rinteger IDs, uniquely identifying each output. Read-only. These can be mapped to actions or functions or \rController.Standard items in a {@link RouteObject} mapping.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
Buttons
Anumbernumber\"A\" button pressed.
Bnumbernumber\"B\" button pressed.
Xnumbernumber\"X\" button pressed.
Ynumbernumber\"Y\" button pressed.
LeftApplicationMenunumbernumberLeft application menu button pressed.\r
RightApplicationMenunumbernumberRight application menu button pressed.\r
Sticks
LXnumbernumberLeft stick x-axis scale.
LYnumbernumberLeft stick y-axis scale.
RXnumbernumberRight stick x-axis scale.
RYnumbernumberRight stick y-axis scale.
LSnumbernumberLeft stick button pressed.
RSnumbernumberRight stick button pressed.
LSTouchnumbernumberLeft stick is touched.
RSTouchnumbernumberRight stick is touched.
Triggers
LTnumbernumberLeft trigger scale.
RTnumbernumberRight trigger scale.
LeftGripnumbernumberLeft grip scale.
RightGripnumbernumberRight grip scale.
Finger Abstractions
LeftPrimaryThumbTouchnumbernumberLeft thumb touching primary thumb \r button.
LeftSecondaryThumbTouchnumbernumberLeft thumb touching secondary thumb \r button.
LeftThumbUpnumbernumberLeft thumb not touching primary or secondary \r thumb buttons.
RightPrimaryThumbTouchnumbernumberRight thumb touching primary thumb \r button.
RightSecondaryThumbTouchnumbernumberRight thumb touching secondary thumb \r button.
RightThumbUpnumbernumberRight thumb not touching primary or secondary \r thumb buttons.
LeftPrimaryIndexTouchnumbernumberLeft index finger is touching primary \r index finger control.
LeftIndexPointnumbernumberLeft index finger is pointing, not touching \r primary or secondary index finger controls.
RightPrimaryIndexTouchnumbernumberRight index finger is touching primary \r index finger control.
RightIndexPointnumbernumberRight index finger is pointing, not touching \r primary or secondary index finger controls.
Avatar Skeleton
Headnumber{@link Pose}Head pose.
LeftHandnumber{@link Pose}Left hand pose.
RightHandnumber{@link Pose}right hand pose.
"}}, + {"Controller.Hardware-Vive":{"prefix":"Controller.Hardware-Vive","body":["Controller.Hardware-Vive"],"description":"

The Controller.Hardware.Vive object has properties representing Vive. The property values are integer IDs,\runiquely identifying each output. Read-only. These can be mapped to actions or functions or \rController.Standard items in a {@link RouteObject} mapping.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
Touch Pad (Sticks)
LXnumbernumberLeft touch pad x-axis scale.
LYnumbernumberLeft touch pad y-axis scale.
RXnumbernumberRight stick x-axis scale.
RYnumbernumberRight stick y-axis scale.
LSnumbernumberLeft touch pad pressed.
LS_CENTERnumbernumberLeft touch pad center pressed.
LS_XnumbernumberLeft touch pad pressed x-coordinate.
LS_YnumbernumberLeft touch pad pressed y-coordinate.
RSnumbernumberRight touch pad pressed.
RS_CENTERnumbernumberRight touch pad center pressed.
RS_XnumbernumberRight touch pad pressed x-coordinate.
RS_YnumbernumberRight touch pad pressed y-coordinate.
LSTouchnumbernumberLeft touch pad is touched.
RSTouchnumbernumberRight touch pad is touched.
Triggers
LTnumbernumberLeft trigger scale.
RTnumbernumberRight trigger scale.
LTClicknumbernumberLeft trigger click.
RTClicknumbernumberRight trigger click.
LeftGripnumbernumberLeft grip scale.
RightGripnumbernumberRight grip scale.
Avatar Skeleton
Hipsnumber{@link Pose}Hips pose.
Spine2number{@link Pose}Spine2 pose.
Headnumber{@link Pose}Head pose.
LeftArmnumber{@link Pose}Left arm pose.
RightArmnumber{@link Pose}Right arm pose
LeftHandnumber{@link Pose}Left hand pose.
RightHandnumber{@link Pose}Right hand pose.
Trackers
TrackedObject00number{@link Pose}Tracker 0 pose.
TrackedObject01number{@link Pose}Tracker 1 pose.
TrackedObject02number{@link Pose}Tracker 2 pose.
TrackedObject03number{@link Pose}Tracker 3 pose.
TrackedObject04number{@link Pose}Tracker 4 pose.
TrackedObject05number{@link Pose}Tracker 5 pose.
TrackedObject06number{@link Pose}Tracker 6 pose.
TrackedObject07number{@link Pose}Tracker 7 pose.
TrackedObject08number{@link Pose}Tracker 8 pose.
TrackedObject09number{@link Pose}Tracker 9 pose.
TrackedObject10number{@link Pose}Tracker 10 pose.
TrackedObject11number{@link Pose}Tracker 11 pose.
TrackedObject12number{@link Pose}Tracker 12 pose.
TrackedObject13number{@link Pose}Tracker 13 pose.
TrackedObject14number{@link Pose}Tracker 14 pose.
TrackedObject15number{@link Pose}Tracker 15 pose.
"}}, + {"package:undefined":{"prefix":"package:undefined","body":["package:undefined"]}}, + {"Avatar.getDomainMinScale":{"prefix":"Avatar.getDomainMinScale","body":["Avatar.getDomainMinScale"],"description":"Returns the minimum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains."}}, + {"Avatar.getDomainMaxScale":{"prefix":"Avatar.getDomainMaxScale","body":["Avatar.getDomainMaxScale"],"description":"Returns the maximum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains."}}, + {"Avatar.getEyeHeight":{"prefix":"Avatar.getEyeHeight","body":["Avatar.getEyeHeight"],"description":"Provides read only access to the current eye height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints."}}, + {"Avatar.getHeight":{"prefix":"Avatar.getHeight","body":["Avatar.getHeight"],"description":"Provides read only access to the current height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints."}}, + {"Avatar.setHandState":{"prefix":"Avatar.setHandState","body":["Avatar.setHandState(${1:state: string})"]}}, + {"Avatar.getHandState":{"prefix":"Avatar.getHandState","body":["Avatar.getHandState"]}}, + {"Avatar.setRawJointData":{"prefix":"Avatar.setRawJointData","body":["Avatar.setRawJointData(${1:data: Array.})"]}}, + {"Avatar.setJointData":{"prefix":"Avatar.setJointData","body":["Avatar.setJointData(${1:index: number},${2:rotation: Quat},${3:translation: Vec3})"],"description":"Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointData":{"prefix":"Avatar.setJointData","body":["Avatar.setJointData(${1:name: string},${2:rotation: Quat},${3:translation: Vec3})"],"description":"Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointRotation":{"prefix":"Avatar.setJointRotation","body":["Avatar.setJointRotation(${1:index: number},${2:rotation: Quat})"],"description":"Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointRotation":{"prefix":"Avatar.setJointRotation","body":["Avatar.setJointRotation(${1:name: string},${2:rotation: Quat})"],"description":"Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointTranslation":{"prefix":"Avatar.setJointTranslation","body":["Avatar.setJointTranslation(${1:index: number},${2:translation: Vec3})"],"description":"Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointTranslation":{"prefix":"Avatar.setJointTranslation","body":["Avatar.setJointTranslation(${1:name: string},${2:translation: Vec3})"],"description":"Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.clearJointData":{"prefix":"Avatar.clearJointData","body":["Avatar.clearJointData(${1:index: number})"],"description":"Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly faster than the function variation that specifies the joint name.

"}}, + {"Avatar.clearJointData":{"prefix":"Avatar.clearJointData","body":["Avatar.clearJointData(${1:name: string})"],"description":"Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly slower than the function variation that specifies the joint index.

"}}, + {"Avatar.isJointDataValid":{"prefix":"Avatar.isJointDataValid","body":["Avatar.isJointDataValid(${1:index: number})"]}}, + {"Avatar.isJointDataValid":{"prefix":"Avatar.isJointDataValid","body":["Avatar.isJointDataValid(${1:name: string})"]}}, + {"Avatar.getJointRotation":{"prefix":"Avatar.getJointRotation","body":["Avatar.getJointRotation(${1:index: number})"],"description":"Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"Avatar.getJointRotation":{"prefix":"Avatar.getJointRotation","body":["Avatar.getJointRotation(${1:name: string})"],"description":"Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"Avatar.getJointTranslation":{"prefix":"Avatar.getJointTranslation","body":["Avatar.getJointTranslation(${1:index: number})"],"description":"Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"Avatar.getJointTranslation":{"prefix":"Avatar.getJointTranslation","body":["Avatar.getJointTranslation(${1:name: number})"],"description":"Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"Avatar.getJointRotations":{"prefix":"Avatar.getJointRotations","body":["Avatar.getJointRotations"],"description":"Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint."}}, + {"Avatar.getJointTranslations":{"prefix":"Avatar.getJointTranslations","body":["Avatar.getJointTranslations"]}}, + {"Avatar.setJointRotations":{"prefix":"Avatar.setJointRotations","body":["Avatar.setJointRotations(${1:jointRotations: Array.})"],"description":"Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse\rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,\rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate\rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set\rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointTranslations":{"prefix":"Avatar.setJointTranslations","body":["Avatar.setJointTranslations(${1:translations: Array.})"]}}, + {"Avatar.clearJointsData":{"prefix":"Avatar.clearJointsData","body":["Avatar.clearJointsData"],"description":"Clear all joint translations and rotations that have been set by script. This restores all motion from the default \ranimation system including inverse kinematics for all joints."}}, + {"Avatar.getJointIndex":{"prefix":"Avatar.getJointIndex","body":["Avatar.getJointIndex(${1:name: string})"],"description":"Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by \r{@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}."}}, + {"Avatar.getJointNames":{"prefix":"Avatar.getJointNames","body":["Avatar.getJointNames"],"description":"Get the names of all the joints in the current avatar."}}, + {"Avatar.setBlendshape":{"prefix":"Avatar.setBlendshape","body":["Avatar.setBlendshape(${1:name: string},${2:value: number})"]}}, + {"Avatar.getAttachmentsVariant":{"prefix":"Avatar.getAttachmentsVariant","body":["Avatar.getAttachmentsVariant"]}}, + {"Avatar.setAttachmentsVariant":{"prefix":"Avatar.setAttachmentsVariant","body":["Avatar.setAttachmentsVariant(${1:variant: object})"]}}, + {"Avatar.updateAvatarEntity":{"prefix":"Avatar.updateAvatarEntity","body":["Avatar.updateAvatarEntity(${1:entityID: Uuid},${2:entityData: string})"]}}, + {"Avatar.clearAvatarEntity":{"prefix":"Avatar.clearAvatarEntity","body":["Avatar.clearAvatarEntity(${1:entityID: Uuid})"]}}, + {"Avatar.setForceFaceTrackerConnected":{"prefix":"Avatar.setForceFaceTrackerConnected","body":["Avatar.setForceFaceTrackerConnected(${1:connected: boolean})"]}}, + {"Avatar.getAttachmentData":{"prefix":"Avatar.getAttachmentData","body":["Avatar.getAttachmentData"],"description":"Get information about all models currently attached to your avatar."}}, + {"Avatar.setAttachmentData":{"prefix":"Avatar.setAttachmentData","body":["Avatar.setAttachmentData(${1:attachmentData: Array.})"],"description":"Set all models currently attached to your avatar. For example, if you retrieve attachment data using \r{@link MyAvatar.getAttachmentData} or {@link Avatar.getAttachmentData}, make changes to it, and then want to update your avatar's attachments per the \rchanged data. You can also remove all attachments by using setting attachmentData to null."}}, + {"Avatar.attach":{"prefix":"Avatar.attach","body":["Avatar.attach(${1:modelURL: string},${2:jointName: string},${3:translation: Vec3},${4:rotation: Quat},${5:scale: number},${6:isSoft: boolean},${7:allowDuplicates: boolean},${8:useSaved: boolean})"],"description":"Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to \rstand on.\r

Note: Attached models are models only; they are not entities and can not be manipulated using the {@link Entities} API. \rNor can you use this function to attach an entity (such as a sphere or a box) to your avatar.

"}}, + {"Avatar.detachOne":{"prefix":"Avatar.detachOne","body":["Avatar.detachOne(${1:modelURL: string},${2:jointName: string})"],"description":"Detach the most recently attached instance of a particular model from either a specific joint or any joint."}}, + {"Avatar.detachAll":{"prefix":"Avatar.detachAll","body":["Avatar.detachAll(${1:modelURL: string},${2:jointName: string})"],"description":"Detach all instances of a particular model from either a specific joint or all joints."}}, + {"Avatar.getAvatarEntityData":{"prefix":"Avatar.getAvatarEntityData","body":["Avatar.getAvatarEntityData"]}}, + {"Avatar.setAvatarEntityData":{"prefix":"Avatar.setAvatarEntityData","body":["Avatar.setAvatarEntityData(${1:avatarEntityData: object})"]}}, + {"Avatar.getSensorToWorldMatrix":{"prefix":"Avatar.getSensorToWorldMatrix","body":["Avatar.getSensorToWorldMatrix"]}}, + {"Avatar.getSensorToWorldScale":{"prefix":"Avatar.getSensorToWorldScale","body":["Avatar.getSensorToWorldScale"]}}, + {"Avatar.getControllerLeftHandMatrix":{"prefix":"Avatar.getControllerLeftHandMatrix","body":["Avatar.getControllerLeftHandMatrix"]}}, + {"Avatar.getControllerRightHandMatrix":{"prefix":"Avatar.getControllerRightHandMatrix","body":["Avatar.getControllerRightHandMatrix"]}}, + {"Avatar.getDataRate":{"prefix":"Avatar.getDataRate","body":["Avatar.getDataRate(${1:rateName: string})"]}}, + {"Avatar.getUpdateRate":{"prefix":"Avatar.getUpdateRate","body":["Avatar.getUpdateRate(${1:rateName: string})"]}}, + {"Avatar.displayNameChanged":{"prefix":"Avatar.displayNameChanged","body":["Avatar.displayNameChanged"]}}, + {"Avatar.sessionDisplayNameChanged":{"prefix":"Avatar.sessionDisplayNameChanged","body":["Avatar.sessionDisplayNameChanged"]}}, + {"Avatar.skeletonModelURLChanged":{"prefix":"Avatar.skeletonModelURLChanged","body":["Avatar.skeletonModelURLChanged"]}}, + {"Avatar.lookAtSnappingChanged":{"prefix":"Avatar.lookAtSnappingChanged","body":["Avatar.lookAtSnappingChanged(${1:enabled: boolean})"]}}, + {"Avatar.sessionUUIDChanged":{"prefix":"Avatar.sessionUUIDChanged","body":["Avatar.sessionUUIDChanged"]}}, + {"Avatar.sendAvatarDataPacket":{"prefix":"Avatar.sendAvatarDataPacket","body":["Avatar.sendAvatarDataPacket(${1:sendAll: boolean})"]}}, + {"Avatar.sendIdentityPacket":{"prefix":"Avatar.sendIdentityPacket","body":["Avatar.sendIdentityPacket"]}}, + {"Avatar.setJointMappingsFromNetworkReply":{"prefix":"Avatar.setJointMappingsFromNetworkReply","body":["Avatar.setJointMappingsFromNetworkReply"]}}, + {"Avatar.setSessionUUID":{"prefix":"Avatar.setSessionUUID","body":["Avatar.setSessionUUID(${1:sessionUUID: Uuid})"]}}, + {"Avatar.getAbsoluteJointRotationInObjectFrame":{"prefix":"Avatar.getAbsoluteJointRotationInObjectFrame","body":["Avatar.getAbsoluteJointRotationInObjectFrame(${1:index: number})"]}}, + {"Avatar.getAbsoluteJointTranslationInObjectFrame":{"prefix":"Avatar.getAbsoluteJointTranslationInObjectFrame","body":["Avatar.getAbsoluteJointTranslationInObjectFrame(${1:index: number})"]}}, + {"Avatar.setAbsoluteJointRotationInObjectFrame":{"prefix":"Avatar.setAbsoluteJointRotationInObjectFrame","body":["Avatar.setAbsoluteJointRotationInObjectFrame(${1:index: number},${2:rotation: Quat})"]}}, + {"Avatar.setAbsoluteJointTranslationInObjectFrame":{"prefix":"Avatar.setAbsoluteJointTranslationInObjectFrame","body":["Avatar.setAbsoluteJointTranslationInObjectFrame(${1:index: number},${2:translation: Vec3})"]}}, + {"Avatar.getTargetScale":{"prefix":"Avatar.getTargetScale","body":["Avatar.getTargetScale"]}}, + {"Avatar.resetLastSent":{"prefix":"Avatar.resetLastSent","body":["Avatar.resetLastSent"]}}, + {"AvatarManager.getAvatarIdentifiers":{"prefix":"AvatarManager.getAvatarIdentifiers","body":["AvatarManager.getAvatarIdentifiers"]}}, + {"AvatarManager.getAvatarsInRange":{"prefix":"AvatarManager.getAvatarsInRange","body":["AvatarManager.getAvatarsInRange(${1:position: Vec3},${2:range: number})"]}}, + {"AvatarManager.avatarAddedEvent":{"prefix":"AvatarManager.avatarAddedEvent","body":["AvatarManager.avatarAddedEvent(${1:sessionUUID: Uuid})"]}}, + {"AvatarManager.avatarRemovedEvent":{"prefix":"AvatarManager.avatarRemovedEvent","body":["AvatarManager.avatarRemovedEvent(${1:sessionUUID: Uuid})"]}}, + {"AvatarManager.avatarSessionChangedEvent":{"prefix":"AvatarManager.avatarSessionChangedEvent","body":["AvatarManager.avatarSessionChangedEvent(${1:sessionUUID: Uuid},${2:oldSessionUUID: Uuid})"]}}, + {"AvatarManager.isAvatarInRange":{"prefix":"AvatarManager.isAvatarInRange","body":["AvatarManager.isAvatarInRange(${1:position: string},${2:range: string})"]}}, + {"AvatarManager.sessionUUIDChanged":{"prefix":"AvatarManager.sessionUUIDChanged","body":["AvatarManager.sessionUUIDChanged(${1:sessionUUID: Uuid},${2:oldSessionUUID: Uuid})"]}}, + {"AvatarManager.processAvatarDataPacket":{"prefix":"AvatarManager.processAvatarDataPacket","body":["AvatarManager.processAvatarDataPacket(${1:message},${2:sendingNode})"]}}, + {"AvatarManager.processAvatarIdentityPacket":{"prefix":"AvatarManager.processAvatarIdentityPacket","body":["AvatarManager.processAvatarIdentityPacket(${1:message},${2:sendingNode})"]}}, + {"AvatarManager.processKillAvatar":{"prefix":"AvatarManager.processKillAvatar","body":["AvatarManager.processKillAvatar(${1:message},${2:sendingNode})"]}}, + {"AnimationCache.getResourceList":{"prefix":"AnimationCache.getResourceList","body":["AnimationCache.getResourceList"],"description":"Get the list of all resource URLs."}}, + {"AnimationCache.updateTotalSize":{"prefix":"AnimationCache.updateTotalSize","body":["AnimationCache.updateTotalSize(${1:deltaSize: number})"]}}, + {"AnimationCache.prefetch":{"prefix":"AnimationCache.prefetch","body":["AnimationCache.prefetch(${1:url: string},${2:extra: object})"],"description":"Prefetches a resource."}}, + {"AnimationCache.dirty":{"prefix":"AnimationCache.dirty","body":["AnimationCache.dirty"]}}, + {"SoundCache.getResourceList":{"prefix":"SoundCache.getResourceList","body":["SoundCache.getResourceList"],"description":"Get the list of all resource URLs."}}, + {"SoundCache.updateTotalSize":{"prefix":"SoundCache.updateTotalSize","body":["SoundCache.updateTotalSize(${1:deltaSize: number})"]}}, + {"SoundCache.prefetch":{"prefix":"SoundCache.prefetch","body":["SoundCache.prefetch(${1:url: string},${2:extra: object})"],"description":"Prefetches a resource."}}, + {"SoundCache.dirty":{"prefix":"SoundCache.dirty","body":["SoundCache.dirty"]}}, + {"ModelCache.getResourceList":{"prefix":"ModelCache.getResourceList","body":["ModelCache.getResourceList"],"description":"Get the list of all resource URLs."}}, + {"ModelCache.updateTotalSize":{"prefix":"ModelCache.updateTotalSize","body":["ModelCache.updateTotalSize(${1:deltaSize: number})"]}}, + {"ModelCache.prefetch":{"prefix":"ModelCache.prefetch","body":["ModelCache.prefetch(${1:url: string},${2:extra: object})"],"description":"Prefetches a resource."}}, + {"ModelCache.dirty":{"prefix":"ModelCache.dirty","body":["ModelCache.dirty"]}}, + {"TextureCache.getResourceList":{"prefix":"TextureCache.getResourceList","body":["TextureCache.getResourceList"],"description":"Get the list of all resource URLs."}}, + {"TextureCache.updateTotalSize":{"prefix":"TextureCache.updateTotalSize","body":["TextureCache.updateTotalSize(${1:deltaSize: number})"]}}, + {"TextureCache.prefetch":{"prefix":"TextureCache.prefetch","body":["TextureCache.prefetch(${1:url: string},${2:extra: object})"],"description":"Prefetches a resource."}}, + {"TextureCache.dirty":{"prefix":"TextureCache.dirty","body":["TextureCache.dirty"]}}, + {"OverlayWebWindow.initQml":{"prefix":"OverlayWebWindow.initQml","body":["OverlayWebWindow.initQml(${1:properties: OverlayWindow.Properties})"]}}, + {"OverlayWebWindow.isVisible":{"prefix":"OverlayWebWindow.isVisible","body":["OverlayWebWindow.isVisible"]}}, + {"OverlayWebWindow.setVisible":{"prefix":"OverlayWebWindow.setVisible","body":["OverlayWebWindow.setVisible(${1:visible: boolean})"]}}, + {"OverlayWebWindow.getPosition":{"prefix":"OverlayWebWindow.getPosition","body":["OverlayWebWindow.getPosition"]}}, + {"OverlayWebWindow.setPosition":{"prefix":"OverlayWebWindow.setPosition","body":["OverlayWebWindow.setPosition(${1:position: Vec2})"]}}, + {"OverlayWebWindow.setPosition":{"prefix":"OverlayWebWindow.setPosition","body":["OverlayWebWindow.setPosition(${1:x: number},${2:y: number})"]}}, + {"OverlayWebWindow.getSize":{"prefix":"OverlayWebWindow.getSize","body":["OverlayWebWindow.getSize"]}}, + {"OverlayWebWindow.setSize":{"prefix":"OverlayWebWindow.setSize","body":["OverlayWebWindow.setSize(${1:size: Vec2})"]}}, + {"OverlayWebWindow.setSize":{"prefix":"OverlayWebWindow.setSize","body":["OverlayWebWindow.setSize(${1:width: number},${2:height: number})"]}}, + {"OverlayWebWindow.setTitle":{"prefix":"OverlayWebWindow.setTitle","body":["OverlayWebWindow.setTitle(${1:title: string})"]}}, + {"OverlayWebWindow.raise":{"prefix":"OverlayWebWindow.raise","body":["OverlayWebWindow.raise"]}}, + {"OverlayWebWindow.close":{"prefix":"OverlayWebWindow.close","body":["OverlayWebWindow.close"]}}, + {"OverlayWebWindow.getEventBridge":{"prefix":"OverlayWebWindow.getEventBridge","body":["OverlayWebWindow.getEventBridge"]}}, + {"OverlayWebWindow.sendToQml":{"prefix":"OverlayWebWindow.sendToQml","body":["OverlayWebWindow.sendToQml(${1:message: object})"]}}, + {"OverlayWebWindow.clearDebugWindow":{"prefix":"OverlayWebWindow.clearDebugWindow","body":["OverlayWebWindow.clearDebugWindow"]}}, + {"OverlayWebWindow.emitScriptEvent":{"prefix":"OverlayWebWindow.emitScriptEvent","body":["OverlayWebWindow.emitScriptEvent(${1:message: object})"]}}, + {"OverlayWebWindow.emitWebEvent":{"prefix":"OverlayWebWindow.emitWebEvent","body":["OverlayWebWindow.emitWebEvent(${1:message: object})"]}}, + {"OverlayWebWindow.visibleChanged":{"prefix":"OverlayWebWindow.visibleChanged","body":["OverlayWebWindow.visibleChanged"]}}, + {"OverlayWebWindow.positionChanged":{"prefix":"OverlayWebWindow.positionChanged","body":["OverlayWebWindow.positionChanged"]}}, + {"OverlayWebWindow.sizeChanged":{"prefix":"OverlayWebWindow.sizeChanged","body":["OverlayWebWindow.sizeChanged"]}}, + {"OverlayWebWindow.moved":{"prefix":"OverlayWebWindow.moved","body":["OverlayWebWindow.moved(${1:position: Vec2})"]}}, + {"OverlayWebWindow.resized":{"prefix":"OverlayWebWindow.resized","body":["OverlayWebWindow.resized(${1:size: Size})"]}}, + {"OverlayWebWindow.closed":{"prefix":"OverlayWebWindow.closed","body":["OverlayWebWindow.closed"]}}, + {"OverlayWebWindow.fromQml":{"prefix":"OverlayWebWindow.fromQml","body":["OverlayWebWindow.fromQml(${1:message: object})"]}}, + {"OverlayWebWindow.scriptEventReceived":{"prefix":"OverlayWebWindow.scriptEventReceived","body":["OverlayWebWindow.scriptEventReceived(${1:message: object})"]}}, + {"OverlayWebWindow.webEventReceived":{"prefix":"OverlayWebWindow.webEventReceived","body":["OverlayWebWindow.webEventReceived(${1:message: object})"]}}, + {"OverlayWebWindow.hasMoved":{"prefix":"OverlayWebWindow.hasMoved","body":["OverlayWebWindow.hasMoved(${1:position: Vec2})"]}}, + {"OverlayWebWindow.hasClosed":{"prefix":"OverlayWebWindow.hasClosed","body":["OverlayWebWindow.hasClosed"]}}, + {"OverlayWebWindow.qmlToScript":{"prefix":"OverlayWebWindow.qmlToScript","body":["OverlayWebWindow.qmlToScript(${1:message: object})"]}} + ] + \ No newline at end of file diff --git a/Utilities/Editor/VSCode_TS-Definitions_Snippets/readme.md b/Utilities/Editor/VSCode_TS-Definitions_Snippets/readme.md new file mode 100644 index 000000000..85260c493 --- /dev/null +++ b/Utilities/Editor/VSCode_TS-Definitions_Snippets/readme.md @@ -0,0 +1,9 @@ +hifi-vscode.js: +This will create a json javascript snippet file you can copy and paste into your local snippets directory. + +hifiTSStubGenerator.js: +This will create a TS file you can use for typscript compatible ide. + + +Run either one of those with: +node {name-of-js.js} \ No newline at end of file diff --git a/hifiVsCode.json b/hifiVsCode.json new file mode 100644 index 000000000..46fdd0ac7 --- /dev/null +++ b/hifiVsCode.json @@ -0,0 +1,1870 @@ + + [ + {"Agent":{"prefix":"Agent","body":["Agent"],"description":"
Available in:Assignment Client Scripts

"}}, + {"Agent.setIsAvatar":{"prefix":"Agent.setIsAvatar","body":["Agent.setIsAvatar(${1:isAvatar: boolean})"]}}, + {"Agent.isAvatar":{"prefix":"Agent.isAvatar","body":["Agent.isAvatar"]}}, + {"Agent.playAvatarSound":{"prefix":"Agent.playAvatarSound","body":["Agent.playAvatarSound(${1:avatarSound: object})"]}}, + {"Avatar":{"prefix":"Avatar","body":["Avatar"],"description":"
Available in:Assignment Client Scripts

The Avatar API is used to manipulate scriptable avatars on the domain. This API is a subset of the \r{@link MyAvatar} API.\r\r

Note: In the examples, use \"Avatar\" instead of \"MyAvatar\".

"}}, + {"Avatar.startAnimation":{"prefix":"Avatar.startAnimation","body":["Avatar.startAnimation(${1:url: string},${2:fps: number},${3:priority: number},${4:loop: boolean},${5:hold: boolean},${6:firstFrame: number},${7:lastFrame: number},${8:maskedJoints: Array.})"]}}, + {"Avatar.stopAnimation":{"prefix":"Avatar.stopAnimation","body":["Avatar.stopAnimation"]}}, + {"Avatar.getAnimationDetails":{"prefix":"Avatar.getAnimationDetails","body":["Avatar.getAnimationDetails"]}}, + {"EntityViewer":{"prefix":"EntityViewer","body":["EntityViewer"],"description":"
Available in:Assignment Client Scripts

"}}, + {"EntityViewer.queryOctree":{"prefix":"EntityViewer.queryOctree","body":["EntityViewer.queryOctree"]}}, + {"EntityViewer.setPosition":{"prefix":"EntityViewer.setPosition","body":["EntityViewer.setPosition(${1:position: Vec3})"]}}, + {"EntityViewer.setOrientation":{"prefix":"EntityViewer.setOrientation","body":["EntityViewer.setOrientation(${1:orientation: Quat})"]}}, + {"EntityViewer.setCenterRadius":{"prefix":"EntityViewer.setCenterRadius","body":["EntityViewer.setCenterRadius(${1:radius: number})"]}}, + {"EntityViewer.setKeyholeRadius":{"prefix":"EntityViewer.setKeyholeRadius","body":["EntityViewer.setKeyholeRadius(${1:radius: number})"]}}, + {"EntityViewer.setVoxelSizeScale":{"prefix":"EntityViewer.setVoxelSizeScale","body":["EntityViewer.setVoxelSizeScale(${1:sizeScale: number})"]}}, + {"EntityViewer.setBoundaryLevelAdjust":{"prefix":"EntityViewer.setBoundaryLevelAdjust","body":["EntityViewer.setBoundaryLevelAdjust(${1:boundaryLevelAdjust: number})"]}}, + {"EntityViewer.setMaxPacketsPerSecond":{"prefix":"EntityViewer.setMaxPacketsPerSecond","body":["EntityViewer.setMaxPacketsPerSecond(${1:maxPacketsPerSecond: number})"]}}, + {"EntityViewer.getPosition":{"prefix":"EntityViewer.getPosition","body":["EntityViewer.getPosition"]}}, + {"EntityViewer.getOrientation":{"prefix":"EntityViewer.getOrientation","body":["EntityViewer.getOrientation"]}}, + {"EntityViewer.getVoxelSizeScale":{"prefix":"EntityViewer.getVoxelSizeScale","body":["EntityViewer.getVoxelSizeScale"]}}, + {"EntityViewer.getBoundaryLevelAdjust":{"prefix":"EntityViewer.getBoundaryLevelAdjust","body":["EntityViewer.getBoundaryLevelAdjust"]}}, + {"EntityViewer.getMaxPacketsPerSecond":{"prefix":"EntityViewer.getMaxPacketsPerSecond","body":["EntityViewer.getMaxPacketsPerSecond"]}}, + {"EntityViewer.getOctreeElementsCount":{"prefix":"EntityViewer.getOctreeElementsCount","body":["EntityViewer.getOctreeElementsCount"]}}, + {"HifiAbout":{"prefix":"HifiAbout","body":["HifiAbout"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"HifiAbout.openUrl":{"prefix":"HifiAbout.openUrl","body":["HifiAbout.openUrl(${1:url: string})"]}}, + {"Controller.Hardware-Application":{"prefix":"Controller.Hardware-Application","body":["Controller.Hardware-Application"],"description":"

The Controller.Hardware.Application object has properties representing Interface's state. The property\rvalues are integer IDs, uniquely identifying each output. Read-only. These can be mapped to actions or functions or\rController.Standard items in a {@link RouteObject} mapping (e.g., using the {@link RouteObject#when} method).\rEach data value is either 1.0 for \"true\" or 0.0 for \"false\".

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
CameraFirstPersonnumbernumberThe camera is in first-person mode.\r
CameraThirdPersonnumbernumberThe camera is in third-person mode.\r
CameraFSMnumbernumberThe camera is in full screen mirror mode.
CameraIndependentnumbernumberThe camera is in independent mode.
CameraEntitynumbernumberThe camera is in entity mode.
InHMDnumbernumberThe user is in HMD mode.
AdvancedMovementnumbernumberAdvanced movement controls are enabled.\r
SnapTurnnumbernumberSnap turn is enabled.
GroundednumbernumberThe user's avatar is on the ground.
NavigationFocusednumbernumberNot used.
"}}, + {"AvatarBookmarks":{"prefix":"AvatarBookmarks","body":["AvatarBookmarks"],"description":"
Available in:Interface ScriptsClient Entity Scripts

This API helps manage adding and deleting avatar bookmarks."}}, + {"AvatarBookmarks.addBookMark":{"prefix":"AvatarBookmarks.addBookMark","body":["AvatarBookmarks.addBookMark"],"description":"Add the current Avatar to your avatar bookmarks."}}, + {"AvatarBookmarks.bookmarkLoaded":{"prefix":"AvatarBookmarks.bookmarkLoaded","body":["AvatarBookmarks.bookmarkLoaded(${1:bookmarkName: string})"],"description":"This function gets triggered after avatar loaded from bookmark"}}, + {"AvatarBookmarks.bookmarkDeleted":{"prefix":"AvatarBookmarks.bookmarkDeleted","body":["AvatarBookmarks.bookmarkDeleted(${1:bookmarkName: string})"],"description":"This function gets triggered after avatar bookmark deleted"}}, + {"AvatarBookmarks.bookmarkAdded":{"prefix":"AvatarBookmarks.bookmarkAdded","body":["AvatarBookmarks.bookmarkAdded(${1:bookmarkName: string})"],"description":"This function gets triggered after avatar bookmark added"}}, + {"AvatarBookmarks.deleteBookmark":{"prefix":"AvatarBookmarks.deleteBookmark","body":["AvatarBookmarks.deleteBookmark"]}}, + {"LocationBookmarks.deleteBookmark":{"prefix":"LocationBookmarks.deleteBookmark","body":["LocationBookmarks.deleteBookmark"]}}, + {"Camera.getCameraEntity":{"prefix":"Camera.getCameraEntity","body":["Camera.getCameraEntity"],"description":"Get the ID of the entity that the camera is set to use the position and orientation from when it's in entity mode. You can\r also get the entity ID using the Camera.cameraEntity property."}}, + {"Camera.setCameraEntity":{"prefix":"Camera.setCameraEntity","body":["Camera.setCameraEntity(${1:entityID: Uuid})"],"description":"Set the entity that the camera should use the position and orientation from when it's in entity mode. You can also set the\r entity using the Camera.cameraEntity property."}}, + {"LocationBookmarks":{"prefix":"LocationBookmarks","body":["LocationBookmarks"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"LocationBookmarks.addBookmark":{"prefix":"LocationBookmarks.addBookmark","body":["LocationBookmarks.addBookmark"]}}, + {"LocationBookmarks.setHomeLocationToAddress":{"prefix":"LocationBookmarks.setHomeLocationToAddress","body":["LocationBookmarks.setHomeLocationToAddress(${1:address: string})"]}}, + {"LODManager":{"prefix":"LODManager","body":["LODManager"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The LOD class manages your Level of Detail functions within Interface."}}, + {"LODManager.setAutomaticLODAdjust":{"prefix":"LODManager.setAutomaticLODAdjust","body":["LODManager.setAutomaticLODAdjust(${1:value: boolean})"]}}, + {"LODManager.getAutomaticLODAdjust":{"prefix":"LODManager.getAutomaticLODAdjust","body":["LODManager.getAutomaticLODAdjust"]}}, + {"LODManager.setDesktopLODTargetFPS":{"prefix":"LODManager.setDesktopLODTargetFPS","body":["LODManager.setDesktopLODTargetFPS(${1:value: number})"]}}, + {"LODManager.getDesktopLODTargetFPS":{"prefix":"LODManager.getDesktopLODTargetFPS","body":["LODManager.getDesktopLODTargetFPS"]}}, + {"LODManager.setHMDLODTargetFPS":{"prefix":"LODManager.setHMDLODTargetFPS","body":["LODManager.setHMDLODTargetFPS(${1:value: number})"]}}, + {"LODManager.getHMDLODTargetFPS":{"prefix":"LODManager.getHMDLODTargetFPS","body":["LODManager.getHMDLODTargetFPS"]}}, + {"LODManager.getLODFeedbackText":{"prefix":"LODManager.getLODFeedbackText","body":["LODManager.getLODFeedbackText"]}}, + {"LODManager.setOctreeSizeScale":{"prefix":"LODManager.setOctreeSizeScale","body":["LODManager.setOctreeSizeScale(${1:sizeScale: number})"]}}, + {"LODManager.getOctreeSizeScale":{"prefix":"LODManager.getOctreeSizeScale","body":["LODManager.getOctreeSizeScale"]}}, + {"LODManager.setBoundaryLevelAdjust":{"prefix":"LODManager.setBoundaryLevelAdjust","body":["LODManager.setBoundaryLevelAdjust(${1:boundaryLevelAdjust: number})"]}}, + {"LODManager.getBoundaryLevelAdjust":{"prefix":"LODManager.getBoundaryLevelAdjust","body":["LODManager.getBoundaryLevelAdjust"]}}, + {"LODManager.getLODTargetFPS":{"prefix":"LODManager.getLODTargetFPS","body":["LODManager.getLODTargetFPS"]}}, + {"LODManager.LODIncreased":{"prefix":"LODManager.LODIncreased","body":["LODManager.LODIncreased"]}}, + {"LODManager.LODDecreased":{"prefix":"LODManager.LODDecreased","body":["LODManager.LODDecreased"]}}, + {"SpeechRecognizer":{"prefix":"SpeechRecognizer","body":["SpeechRecognizer"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"SpeechRecognizer.setEnabled":{"prefix":"SpeechRecognizer.setEnabled","body":["SpeechRecognizer.setEnabled(${1:enabled: boolean})"]}}, + {"SpeechRecognizer.addCommand":{"prefix":"SpeechRecognizer.addCommand","body":["SpeechRecognizer.addCommand(${1:command: string})"]}}, + {"SpeechRecognizer.removeCommand":{"prefix":"SpeechRecognizer.removeCommand","body":["SpeechRecognizer.removeCommand(${1:command: string})"]}}, + {"SpeechRecognizer.commandRecognized":{"prefix":"SpeechRecognizer.commandRecognized","body":["SpeechRecognizer.commandRecognized(${1:command: string})"]}}, + {"SpeechRecognizer.enabledUpdated":{"prefix":"SpeechRecognizer.enabledUpdated","body":["SpeechRecognizer.enabledUpdated(${1:enabled: boolean})"]}}, + {"AudioScope":{"prefix":"AudioScope","body":["AudioScope"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The AudioScope API helps control the Audio Scope features in Interface"}}, + {"AudioScope.toggle":{"prefix":"AudioScope.toggle","body":["AudioScope.toggle"]}}, + {"AudioScope.setVisible":{"prefix":"AudioScope.setVisible","body":["AudioScope.setVisible(${1:visible: boolean})"]}}, + {"AudioScope.getVisible":{"prefix":"AudioScope.getVisible","body":["AudioScope.getVisible"]}}, + {"AudioScope.togglePause":{"prefix":"AudioScope.togglePause","body":["AudioScope.togglePause"]}}, + {"AudioScope.setPause":{"prefix":"AudioScope.setPause","body":["AudioScope.setPause(${1:paused: boolean})"]}}, + {"AudioScope.getPause":{"prefix":"AudioScope.getPause","body":["AudioScope.getPause"]}}, + {"AudioScope.toggleTrigger":{"prefix":"AudioScope.toggleTrigger","body":["AudioScope.toggleTrigger"]}}, + {"AudioScope.getAutoTrigger":{"prefix":"AudioScope.getAutoTrigger","body":["AudioScope.getAutoTrigger"]}}, + {"AudioScope.setAutoTrigger":{"prefix":"AudioScope.setAutoTrigger","body":["AudioScope.setAutoTrigger(${1:autoTrigger: boolean})"]}}, + {"AudioScope.setTriggerValues":{"prefix":"AudioScope.setTriggerValues","body":["AudioScope.setTriggerValues(${1:x: number},${2:y: number})"]}}, + {"AudioScope.setTriggered":{"prefix":"AudioScope.setTriggered","body":["AudioScope.setTriggered(${1:triggered: boolean})"]}}, + {"AudioScope.getTriggered":{"prefix":"AudioScope.getTriggered","body":["AudioScope.getTriggered"]}}, + {"AudioScope.getFramesPerSecond":{"prefix":"AudioScope.getFramesPerSecond","body":["AudioScope.getFramesPerSecond"]}}, + {"AudioScope.getFramesPerScope":{"prefix":"AudioScope.getFramesPerScope","body":["AudioScope.getFramesPerScope"]}}, + {"AudioScope.selectAudioScopeFiveFrames":{"prefix":"AudioScope.selectAudioScopeFiveFrames","body":["AudioScope.selectAudioScopeFiveFrames"]}}, + {"AudioScope.selectAudioScopeTwentyFrames":{"prefix":"AudioScope.selectAudioScopeTwentyFrames","body":["AudioScope.selectAudioScopeTwentyFrames"]}}, + {"AudioScope.selectAudioScopeFiftyFrames":{"prefix":"AudioScope.selectAudioScopeFiftyFrames","body":["AudioScope.selectAudioScopeFiftyFrames"]}}, + {"AudioScope.getScopeInput":{"prefix":"AudioScope.getScopeInput","body":["AudioScope.getScopeInput"]}}, + {"AudioScope.getScopeOutputLeft":{"prefix":"AudioScope.getScopeOutputLeft","body":["AudioScope.getScopeOutputLeft"]}}, + {"AudioScope.getScopeOutputRight":{"prefix":"AudioScope.getScopeOutputRight","body":["AudioScope.getScopeOutputRight"]}}, + {"AudioScope.getTriggerInput":{"prefix":"AudioScope.getTriggerInput","body":["AudioScope.getTriggerInput"]}}, + {"AudioScope.getTriggerOutputLeft":{"prefix":"AudioScope.getTriggerOutputLeft","body":["AudioScope.getTriggerOutputLeft"]}}, + {"AudioScope.getTriggerOutputRight":{"prefix":"AudioScope.getTriggerOutputRight","body":["AudioScope.getTriggerOutputRight"]}}, + {"AudioScope.setLocalEcho":{"prefix":"AudioScope.setLocalEcho","body":["AudioScope.setLocalEcho"]}}, + {"AudioScope.setServerEcho":{"prefix":"AudioScope.setServerEcho","body":["AudioScope.setServerEcho"]}}, + {"AudioScope.pauseChanged":{"prefix":"AudioScope.pauseChanged","body":["AudioScope.pauseChanged"]}}, + {"AudioScope.triggered":{"prefix":"AudioScope.triggered","body":["AudioScope.triggered"]}}, + {"Entities.ActionArguments-FarGrab":{"prefix":"Entities.ActionArguments-FarGrab","body":["Entities.ActionArguments-FarGrab"],"description":"The \"far-grab\" {@link Entities.ActionType|ActionType} moves and rotates an entity to a target position and \rorientation, optionally relative to another entity. Collisions between the entity and the user's avatar are disabled during \rthe far-grab.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-Hold":{"prefix":"Entities.ActionArguments-Hold","body":["Entities.ActionArguments-Hold"],"description":"The \"hold\" {@link Entities.ActionType|ActionType} positions and rotates an entity relative to an avatar's hand. \rCollisions between the entity and the user's avatar are disabled during the hold.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"AvatarManager":{"prefix":"AvatarManager","body":["AvatarManager"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The AvatarManager API has properties and methods which manage Avatars within the same domain.\r\r

Note: This API is also provided to Interface and client entity scripts as the synonym, \rAvatarList. For assignment client scripts, see the separate {@link AvatarList} API."}}, + {"AvatarManager.getAvatar":{"prefix":"AvatarManager.getAvatar","body":["AvatarManager.getAvatar(${1:avatarID: Uuid})"]}}, + {"AvatarManager.getAvatarDataRate":{"prefix":"AvatarManager.getAvatarDataRate","body":["AvatarManager.getAvatarDataRate(${1:sessionID: Uuid},${2:rateName: string})"]}}, + {"AvatarManager.getAvatarUpdateRate":{"prefix":"AvatarManager.getAvatarUpdateRate","body":["AvatarManager.getAvatarUpdateRate(${1:sessionID: Uuid},${2:rateName: string})"]}}, + {"AvatarManager.getAvatarSimulationRate":{"prefix":"AvatarManager.getAvatarSimulationRate","body":["AvatarManager.getAvatarSimulationRate(${1:sessionID: Uuid},${2:rateName: string})"]}}, + {"AvatarManager.findRayIntersection":{"prefix":"AvatarManager.findRayIntersection","body":["AvatarManager.findRayIntersection(${1:ray: PickRay},${2:avatarsToInclude: Array.},${3:avatarsToDiscard: Array.})"]}}, + {"AvatarManager.findRayIntersectionVector":{"prefix":"AvatarManager.findRayIntersectionVector","body":["AvatarManager.findRayIntersectionVector(${1:ray: PickRay},${2:avatarsToInclude: Array.},${3:avatarsToDiscard: Array.})"]}}, + {"AvatarManager.getAvatarSortCoefficient":{"prefix":"AvatarManager.getAvatarSortCoefficient","body":["AvatarManager.getAvatarSortCoefficient(${1:name: string})"]}}, + {"AvatarManager.setAvatarSortCoefficient":{"prefix":"AvatarManager.setAvatarSortCoefficient","body":["AvatarManager.setAvatarSortCoefficient(${1:name: string},${2:value: number})"]}}, + {"AvatarManager.getPalData":{"prefix":"AvatarManager.getPalData","body":["AvatarManager.getPalData(${1:specificAvatarIdentifiers: Array.})"],"description":"Used in the PAL for getting PAL-related data about avatars nearby. Using this method is faster\rthan iterating over each avatar and obtaining data about them in JavaScript, as that method\rlocks and unlocks each avatar's data structure potentially hundreds of times per update tick."}}, + {"AvatarManager.updateAvatarRenderStatus":{"prefix":"AvatarManager.updateAvatarRenderStatus","body":["AvatarManager.updateAvatarRenderStatus(${1:shouldRenderAvatars: boolean})"]}}, + {"MyAvatar":{"prefix":"MyAvatar","body":["MyAvatar"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Your avatar is your in-world representation of you. The MyAvatar API is used to manipulate the avatar.\rFor example, you can customize the avatar's appearance, run custom avatar animations,\rchange the avatar's position within the domain, or manage the avatar's collisions with other objects."}}, + {"MyAvatar.resetSensorsAndBody":{"prefix":"MyAvatar.resetSensorsAndBody","body":["MyAvatar.resetSensorsAndBody"]}}, + {"MyAvatar.centerBody":{"prefix":"MyAvatar.centerBody","body":["MyAvatar.centerBody"],"description":"Moves and orients the avatar, such that it is directly underneath the HMD, with toes pointed forward."}}, + {"MyAvatar.clearIKJointLimitHistory":{"prefix":"MyAvatar.clearIKJointLimitHistory","body":["MyAvatar.clearIKJointLimitHistory"],"description":"The internal inverse-kinematics system maintains a record of which joints are \"locked\". Sometimes it is useful to forget this history, to prevent\rcontorted joints."}}, + {"MyAvatar.setOrientationVar":{"prefix":"MyAvatar.setOrientationVar","body":["MyAvatar.setOrientationVar(${1:newOrientationVar: object})"]}}, + {"MyAvatar.getOrientationVar":{"prefix":"MyAvatar.getOrientationVar","body":["MyAvatar.getOrientationVar"]}}, + {"MyAvatar.getDefaultEyePosition":{"prefix":"MyAvatar.getDefaultEyePosition","body":["MyAvatar.getDefaultEyePosition"],"description":"Get the position in world coordinates of the point directly between your avatar's eyes assuming your avatar was in its\rdefault pose. This is a reference position; it does not change as your avatar's head moves relative to the avatar \rposition."}}, + {"MyAvatar.overrideAnimation":{"prefix":"MyAvatar.overrideAnimation","body":["MyAvatar.overrideAnimation(${1:url: string},${2:fps: number},${3:loop: boolean},${4:firstFrame: number},${5:lastFrame: number})"],"description":"The avatar animation system includes a set of default animations along with rules for how those animations are blended\rtogether with procedural data (such as look at vectors, hand sensors etc.). overrideAnimation() is used to completely\roverride all motion from the default animation system (including inverse kinematics for hand and head controllers) and\rplay a set of specified animations. To end these animations and restore the default animations, use \r{@link MyAvatar.restoreAnimation}.
\r

Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target \rrig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, \rthe avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see \rAvatar Standards.

"}}, + {"MyAvatar.restoreAnimation":{"prefix":"MyAvatar.restoreAnimation","body":["MyAvatar.restoreAnimation"],"description":"The avatar animation system includes a set of default animations along with rules for how those animations are blended together with\rprocedural data (such as look at vectors, hand sensors etc.). Playing your own custom animations will override the default animations.\rrestoreAnimation() is used to restore all motion from the default animation system including inverse kinematics for hand and head\rcontrollers. If you aren't currently playing an override animation, this function will have no effect."}}, + {"MyAvatar.getAnimationRoles":{"prefix":"MyAvatar.getAnimationRoles","body":["MyAvatar.getAnimationRoles"],"description":"Each avatar has an avatar-animation.json file that defines which animations are used and how they are blended together with procedural data\r(such as look at vectors, hand sensors etc.). Each animation specified in the avatar-animation.json file is known as an animation role.\rAnimation roles map to easily understandable actions that the avatar can perform, such as \"idleStand\", \"idleTalk\", or \"walkFwd.\"\rgetAnimationRoles() is used get the list of animation roles defined in the avatar-animation.json."}}, + {"MyAvatar.overrideRoleAnimation":{"prefix":"MyAvatar.overrideRoleAnimation","body":["MyAvatar.overrideRoleAnimation(${1:role: string},${2:url: string},${3:fps: number},${4:loop: boolean},${5:firstFrame: number},${6:lastFrame: number})"],"description":"Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions\rthat the avatar can perform, such as \"idleStand\", \"idleTalk\", or \"walkFwd\". To get the full list of roles, use getAnimationRoles().\rFor each role, the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended\rtogether with procedural data (such as look at vectors, hand sensors etc.).\roverrideRoleAnimation() is used to change the animation clip (.FBX) associated with a specified animation role. To end \rthe animations and restore the default animations, use {@link MyAvatar.restoreRoleAnimation}.
\r

Note: Hand roles only affect the hand. Other 'main' roles, like 'idleStand', 'idleTalk', 'takeoffStand' are full body.

\r

Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target\rrig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different,\rthe avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see \rAvatar Standards."}}, + {"MyAvatar.restoreRoleAnimation":{"prefix":"MyAvatar.restoreRoleAnimation","body":["MyAvatar.restoreRoleAnimation(${1:role: string})"],"description":"Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions that\rthe avatar can perform, such as \"idleStand\", \"idleTalk\", or \"walkFwd\". To get the full list of roles, use getAnimationRoles(). For each role,\rthe avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended together with\rprocedural data (such as look at vectors, hand sensors etc.). You can change the animation clip (.FBX) associated with a specified animation\rrole using overrideRoleAnimation().\rrestoreRoleAnimation() is used to restore a specified animation role's default animation clip. If you have not specified an override animation\rfor the specified role, this function will have no effect."}}, + {"MyAvatar.removeAnimationStateHandler":{"prefix":"MyAvatar.removeAnimationStateHandler","body":["MyAvatar.removeAnimationStateHandler(${1:handler: number})"]}}, + {"MyAvatar.getSnapTurn":{"prefix":"MyAvatar.getSnapTurn","body":["MyAvatar.getSnapTurn"]}}, + {"MyAvatar.setSnapTurn":{"prefix":"MyAvatar.setSnapTurn","body":["MyAvatar.setSnapTurn(${1:on: boolean})"]}}, + {"MyAvatar.setDominantHand":{"prefix":"MyAvatar.setDominantHand","body":["MyAvatar.setDominantHand(${1:hand: string})"]}}, + {"MyAvatar.getDominantHand":{"prefix":"MyAvatar.getDominantHand","body":["MyAvatar.getDominantHand"]}}, + {"MyAvatar.setCenterOfGravityModelEnabled":{"prefix":"MyAvatar.setCenterOfGravityModelEnabled","body":["MyAvatar.setCenterOfGravityModelEnabled(${1:enabled: boolean})"]}}, + {"MyAvatar.getCenterOfGravityModelEnabled":{"prefix":"MyAvatar.getCenterOfGravityModelEnabled","body":["MyAvatar.getCenterOfGravityModelEnabled"]}}, + {"MyAvatar.setHMDLeanRecenterEnabled":{"prefix":"MyAvatar.setHMDLeanRecenterEnabled","body":["MyAvatar.setHMDLeanRecenterEnabled(${1:enabled: boolean})"]}}, + {"MyAvatar.getHMDLeanRecenterEnabled":{"prefix":"MyAvatar.getHMDLeanRecenterEnabled","body":["MyAvatar.getHMDLeanRecenterEnabled"]}}, + {"MyAvatar.requestEnableHandTouch":{"prefix":"MyAvatar.requestEnableHandTouch","body":["MyAvatar.requestEnableHandTouch"],"description":"Request to enable hand touch effect globally"}}, + {"MyAvatar.requestDisableHandTouch":{"prefix":"MyAvatar.requestDisableHandTouch","body":["MyAvatar.requestDisableHandTouch"],"description":"Request to disable hand touch effect globally"}}, + {"MyAvatar.disableHandTouchForID":{"prefix":"MyAvatar.disableHandTouchForID","body":["MyAvatar.disableHandTouchForID(${1:entityID: Uuid})"],"description":"Disables hand touch effect on a specific entity"}}, + {"MyAvatar.enableHandTouchForID":{"prefix":"MyAvatar.enableHandTouchForID","body":["MyAvatar.enableHandTouchForID(${1:entityID: Uuid})"],"description":"Enables hand touch effect on a specific entity"}}, + {"MyAvatar.getRawDriveKey":{"prefix":"MyAvatar.getRawDriveKey","body":["MyAvatar.getRawDriveKey(${1:key: DriveKeys})"]}}, + {"MyAvatar.disableDriveKey":{"prefix":"MyAvatar.disableDriveKey","body":["MyAvatar.disableDriveKey(${1:key: DriveKeys})"]}}, + {"MyAvatar.enableDriveKey":{"prefix":"MyAvatar.enableDriveKey","body":["MyAvatar.enableDriveKey(${1:key: DriveKeys})"]}}, + {"MyAvatar.isDriveKeyDisabled":{"prefix":"MyAvatar.isDriveKeyDisabled","body":["MyAvatar.isDriveKeyDisabled(${1:key: DriveKeys})"]}}, + {"MyAvatar.triggerVerticalRecenter":{"prefix":"MyAvatar.triggerVerticalRecenter","body":["MyAvatar.triggerVerticalRecenter"],"description":"Recenter the avatar in the vertical direction, if {@link MyAvatar|MyAvatar.hmdLeanRecenterEnabled} is \rfalse."}}, + {"MyAvatar.triggerRotationRecenter":{"prefix":"MyAvatar.triggerRotationRecenter","body":["MyAvatar.triggerRotationRecenter"],"description":"Recenter the avatar's rotation, if {@link MyAvatar|MyAvatar.hmdLeanRecenterEnabled} is false."}}, + {"MyAvatar.isRecenteringHorizontally":{"prefix":"MyAvatar.isRecenteringHorizontally","body":["MyAvatar.isRecenteringHorizontally"],"description":"The isRecenteringHorizontally function returns true if MyAvatar\ris translating the root of the Avatar to keep the center of gravity under the head.\risActive(Horizontal) is returned."}}, + {"MyAvatar.getHeadPosition":{"prefix":"MyAvatar.getHeadPosition","body":["MyAvatar.getHeadPosition"],"description":"Get the current position of the avatar's \"Head\" joint."}}, + {"MyAvatar.getHeadFinalYaw":{"prefix":"MyAvatar.getHeadFinalYaw","body":["MyAvatar.getHeadFinalYaw"]}}, + {"MyAvatar.getHeadFinalRoll":{"prefix":"MyAvatar.getHeadFinalRoll","body":["MyAvatar.getHeadFinalRoll"]}}, + {"MyAvatar.getHeadFinalPitch":{"prefix":"MyAvatar.getHeadFinalPitch","body":["MyAvatar.getHeadFinalPitch"]}}, + {"MyAvatar.getHeadDeltaPitch":{"prefix":"MyAvatar.getHeadDeltaPitch","body":["MyAvatar.getHeadDeltaPitch"]}}, + {"MyAvatar.getEyePosition":{"prefix":"MyAvatar.getEyePosition","body":["MyAvatar.getEyePosition"],"description":"Get the current position of the point directly between the avatar's eyes."}}, + {"MyAvatar.getTargetAvatarPosition":{"prefix":"MyAvatar.getTargetAvatarPosition","body":["MyAvatar.getTargetAvatarPosition"]}}, + {"MyAvatar.getTargetAvatar":{"prefix":"MyAvatar.getTargetAvatar","body":["MyAvatar.getTargetAvatar"]}}, + {"MyAvatar.getLeftHandPosition":{"prefix":"MyAvatar.getLeftHandPosition","body":["MyAvatar.getLeftHandPosition"],"description":"Get the position of the avatar's left hand as positioned by a hand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.)

"}}, + {"MyAvatar.getRightHandPosition":{"prefix":"MyAvatar.getRightHandPosition","body":["MyAvatar.getRightHandPosition"],"description":"Get the position of the avatar's right hand as positioned by a hand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.)

"}}, + {"MyAvatar.getLeftHandTipPosition":{"prefix":"MyAvatar.getLeftHandTipPosition","body":["MyAvatar.getLeftHandTipPosition"]}}, + {"MyAvatar.getRightHandTipPosition":{"prefix":"MyAvatar.getRightHandTipPosition","body":["MyAvatar.getRightHandTipPosition"]}}, + {"MyAvatar.getLeftHandPose":{"prefix":"MyAvatar.getLeftHandPose","body":["MyAvatar.getLeftHandPose"],"description":"Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a \rhand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.) If you are using the Leap Motion, the return value's valid property will be \rfalse and any pose values returned will not be meaningful.

"}}, + {"MyAvatar.getRightHandPose":{"prefix":"MyAvatar.getRightHandPose","body":["MyAvatar.getRightHandPose"],"description":"Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a \rhand controller (e.g., Oculus Touch or Vive).
\r

Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints \rfor hand animation.) If you are using the Leap Motion, the return value's valid property will be \rfalse and any pose values returned will not be meaningful.

"}}, + {"MyAvatar.getLeftHandTipPose":{"prefix":"MyAvatar.getLeftHandTipPose","body":["MyAvatar.getLeftHandTipPose"]}}, + {"MyAvatar.getRightHandTipPose":{"prefix":"MyAvatar.getRightHandTipPose","body":["MyAvatar.getRightHandTipPose"]}}, + {"MyAvatar.worldToJointPoint":{"prefix":"MyAvatar.worldToJointPoint","body":["MyAvatar.worldToJointPoint(${1:position: Vec3},${2:jointIndex: number})"]}}, + {"MyAvatar.worldToJointDirection":{"prefix":"MyAvatar.worldToJointDirection","body":["MyAvatar.worldToJointDirection(${1:direction: Vec3},${2:jointIndex: number})"]}}, + {"MyAvatar.worldToJointRotation":{"prefix":"MyAvatar.worldToJointRotation","body":["MyAvatar.worldToJointRotation(${1:rotation: Quat},${2:jointIndex: number})"]}}, + {"MyAvatar.jointToWorldPoint":{"prefix":"MyAvatar.jointToWorldPoint","body":["MyAvatar.jointToWorldPoint(${1:position: vec3},${2:jointIndex: number})"]}}, + {"MyAvatar.jointToWorldDirection":{"prefix":"MyAvatar.jointToWorldDirection","body":["MyAvatar.jointToWorldDirection(${1:direction: Vec3},${2:jointIndex: number})"]}}, + {"MyAvatar.jointToWorldRotation":{"prefix":"MyAvatar.jointToWorldRotation","body":["MyAvatar.jointToWorldRotation(${1:rotation: Quat},${2:jointIndex: number})"]}}, + {"MyAvatar.pinJoint":{"prefix":"MyAvatar.pinJoint","body":["MyAvatar.pinJoint(${1:index: number},${2:position: Vec3},${3:orientation: Quat})"]}}, + {"MyAvatar.clearPinOnJoint":{"prefix":"MyAvatar.clearPinOnJoint","body":["MyAvatar.clearPinOnJoint(${1:index: number})"]}}, + {"MyAvatar.getIKErrorOnLastSolve":{"prefix":"MyAvatar.getIKErrorOnLastSolve","body":["MyAvatar.getIKErrorOnLastSolve"]}}, + {"MyAvatar.useFullAvatarURL":{"prefix":"MyAvatar.useFullAvatarURL","body":["MyAvatar.useFullAvatarURL(${1:fullAvatarURL: string},${2:modelName: string})"]}}, + {"MyAvatar.getFullAvatarURLFromPreferences":{"prefix":"MyAvatar.getFullAvatarURLFromPreferences","body":["MyAvatar.getFullAvatarURLFromPreferences"],"description":"Get the complete URL for the current avatar."}}, + {"MyAvatar.getFullAvatarModelName":{"prefix":"MyAvatar.getFullAvatarModelName","body":["MyAvatar.getFullAvatarModelName"],"description":"Get the full avatar model name for the current avatar."}}, + {"MyAvatar.getAvatarEntitiesVariant()":{"prefix":"MyAvatar.getAvatarEntitiesVariant()","body":["MyAvatar.getAvatarEntitiesVariant()"],"description":"Function returns list of avatar entities"}}, + {"MyAvatar.isFlying":{"prefix":"MyAvatar.isFlying","body":["MyAvatar.isFlying"]}}, + {"MyAvatar.isInAir":{"prefix":"MyAvatar.isInAir","body":["MyAvatar.isInAir"]}}, + {"MyAvatar.setFlyingEnabled":{"prefix":"MyAvatar.setFlyingEnabled","body":["MyAvatar.setFlyingEnabled(${1:enabled: boolean})"]}}, + {"MyAvatar.getFlyingEnabled":{"prefix":"MyAvatar.getFlyingEnabled","body":["MyAvatar.getFlyingEnabled"]}}, + {"MyAvatar.setFlyingDesktopPref":{"prefix":"MyAvatar.setFlyingDesktopPref","body":["MyAvatar.setFlyingDesktopPref(${1:enabled: boolean})"]}}, + {"MyAvatar.getFlyingDesktopPref":{"prefix":"MyAvatar.getFlyingDesktopPref","body":["MyAvatar.getFlyingDesktopPref"]}}, + {"MyAvatar.setFlyingDesktopPref":{"prefix":"MyAvatar.setFlyingDesktopPref","body":["MyAvatar.setFlyingDesktopPref(${1:enabled: boolean})"]}}, + {"MyAvatar.getFlyingDesktopPref":{"prefix":"MyAvatar.getFlyingDesktopPref","body":["MyAvatar.getFlyingDesktopPref"]}}, + {"MyAvatar.getAvatarScale":{"prefix":"MyAvatar.getAvatarScale","body":["MyAvatar.getAvatarScale"]}}, + {"MyAvatar.setAvatarScale":{"prefix":"MyAvatar.setAvatarScale","body":["MyAvatar.setAvatarScale(${1:scale: number})"]}}, + {"MyAvatar.setCollisionsEnabled":{"prefix":"MyAvatar.setCollisionsEnabled","body":["MyAvatar.setCollisionsEnabled(${1:enabled: boolean})"]}}, + {"MyAvatar.getCollisionsEnabled":{"prefix":"MyAvatar.getCollisionsEnabled","body":["MyAvatar.getCollisionsEnabled"]}}, + {"MyAvatar.getCollisionCapsule":{"prefix":"MyAvatar.getCollisionCapsule","body":["MyAvatar.getCollisionCapsule"]}}, + {"MyAvatar.setCharacterControllerEnabled":{"prefix":"MyAvatar.setCharacterControllerEnabled","body":["MyAvatar.setCharacterControllerEnabled(${1:enabled: boolean})"]}}, + {"MyAvatar.getCharacterControllerEnabled":{"prefix":"MyAvatar.getCharacterControllerEnabled","body":["MyAvatar.getCharacterControllerEnabled"]}}, + {"MyAvatar.isUp":{"prefix":"MyAvatar.isUp","body":["MyAvatar.isUp(${1:direction: Vec3})"]}}, + {"MyAvatar.isDown":{"prefix":"MyAvatar.isDown","body":["MyAvatar.isDown(${1:direction: Vec3})"]}}, + {"MyAvatar.increaseSize":{"prefix":"MyAvatar.increaseSize","body":["MyAvatar.increaseSize"],"description":"Increase the avatar's scale by five percent, up to a minimum scale of 1000."}}, + {"MyAvatar.decreaseSize":{"prefix":"MyAvatar.decreaseSize","body":["MyAvatar.decreaseSize"],"description":"Decrease the avatar's scale by five percent, down to a minimum scale of 0.25."}}, + {"MyAvatar.resetSize":{"prefix":"MyAvatar.resetSize","body":["MyAvatar.resetSize"],"description":"Reset the avatar's scale back to the default scale of 1.0."}}, + {"MyAvatar.animGraphLoaded":{"prefix":"MyAvatar.animGraphLoaded","body":["MyAvatar.animGraphLoaded"]}}, + {"MyAvatar.setGravity":{"prefix":"MyAvatar.setGravity","body":["MyAvatar.setGravity(${1:gravity: number})"]}}, + {"MyAvatar.getGravity":{"prefix":"MyAvatar.getGravity","body":["MyAvatar.getGravity"]}}, + {"MyAvatar.goToFeetLocation":{"prefix":"MyAvatar.goToFeetLocation","body":["MyAvatar.goToFeetLocation(${1:position: Vec3},${2:hasOrientation: boolean},${3:orientation: Quat},${4:shouldFaceLocation: boolean})"],"description":"Move the avatar to a new position and/or orientation in the domain, while taking into account Avatar leg-length."}}, + {"MyAvatar.goToLocation":{"prefix":"MyAvatar.goToLocation","body":["MyAvatar.goToLocation(${1:position: Vec3},${2:hasOrientation: boolean},${3:orientation: Quat},${4:shouldFaceLocation: boolean},${5:withSafeLanding: boolean})"],"description":"Move the avatar to a new position and/or orientation in the domain."}}, + {"MyAvatar.goToLocation":{"prefix":"MyAvatar.goToLocation","body":["MyAvatar.goToLocation(${1:properties: object})"]}}, + {"MyAvatar.goToLocationAndEnableCollisions":{"prefix":"MyAvatar.goToLocationAndEnableCollisions","body":["MyAvatar.goToLocationAndEnableCollisions(${1:position: Vec3})"]}}, + {"MyAvatar.safeLanding":{"prefix":"MyAvatar.safeLanding","body":["MyAvatar.safeLanding(${1:position: Vec3})"]}}, + {"MyAvatar.restrictScaleFromDomainSettings":{"prefix":"MyAvatar.restrictScaleFromDomainSettings","body":["MyAvatar.restrictScaleFromDomainSettings(${1:domainSettingsObject: objecct})"]}}, + {"MyAvatar.clearScaleRestriction":{"prefix":"MyAvatar.clearScaleRestriction","body":["MyAvatar.clearScaleRestriction"]}}, + {"MyAvatar.addThrust":{"prefix":"MyAvatar.addThrust","body":["MyAvatar.addThrust(${1:thrust: Vec3})"]}}, + {"MyAvatar.getThrust":{"prefix":"MyAvatar.getThrust","body":["MyAvatar.getThrust"]}}, + {"MyAvatar.setThrust":{"prefix":"MyAvatar.setThrust","body":["MyAvatar.setThrust(${1:thrust: Vec3})"]}}, + {"MyAvatar.updateMotionBehaviorFromMenu":{"prefix":"MyAvatar.updateMotionBehaviorFromMenu","body":["MyAvatar.updateMotionBehaviorFromMenu"]}}, + {"MyAvatar.setToggleHips":{"prefix":"MyAvatar.setToggleHips","body":["MyAvatar.setToggleHips(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawBaseOfSupport":{"prefix":"MyAvatar.setEnableDebugDrawBaseOfSupport","body":["MyAvatar.setEnableDebugDrawBaseOfSupport(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawDefaultPose":{"prefix":"MyAvatar.setEnableDebugDrawDefaultPose","body":["MyAvatar.setEnableDebugDrawDefaultPose(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawAnimPose":{"prefix":"MyAvatar.setEnableDebugDrawAnimPose","body":["MyAvatar.setEnableDebugDrawAnimPose(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawPosition":{"prefix":"MyAvatar.setEnableDebugDrawPosition","body":["MyAvatar.setEnableDebugDrawPosition(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawHandControllers":{"prefix":"MyAvatar.setEnableDebugDrawHandControllers","body":["MyAvatar.setEnableDebugDrawHandControllers(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawSensorToWorldMatrix":{"prefix":"MyAvatar.setEnableDebugDrawSensorToWorldMatrix","body":["MyAvatar.setEnableDebugDrawSensorToWorldMatrix(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawIKTargets":{"prefix":"MyAvatar.setEnableDebugDrawIKTargets","body":["MyAvatar.setEnableDebugDrawIKTargets(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawIKConstraints":{"prefix":"MyAvatar.setEnableDebugDrawIKConstraints","body":["MyAvatar.setEnableDebugDrawIKConstraints(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawIKChains":{"prefix":"MyAvatar.setEnableDebugDrawIKChains","body":["MyAvatar.setEnableDebugDrawIKChains(${1:enabled: boolean})"]}}, + {"MyAvatar.setEnableDebugDrawDetailedCollision":{"prefix":"MyAvatar.setEnableDebugDrawDetailedCollision","body":["MyAvatar.setEnableDebugDrawDetailedCollision(${1:enabled: boolean})"]}}, + {"MyAvatar.getEnableMeshVisible":{"prefix":"MyAvatar.getEnableMeshVisible","body":["MyAvatar.getEnableMeshVisible"],"description":"Get whether or not your avatar mesh is visible."}}, + {"MyAvatar.setEnableMeshVisible":{"prefix":"MyAvatar.setEnableMeshVisible","body":["MyAvatar.setEnableMeshVisible(${1:visible: boolean})"],"description":"Set whether or not your avatar mesh is visible."}}, + {"MyAvatar.setEnableInverseKinematics":{"prefix":"MyAvatar.setEnableInverseKinematics","body":["MyAvatar.setEnableInverseKinematics(${1:enabled: boolean})"]}}, + {"MyAvatar.getAnimGraphOverrideUrl":{"prefix":"MyAvatar.getAnimGraphOverrideUrl","body":["MyAvatar.getAnimGraphOverrideUrl"]}}, + {"MyAvatar.setAnimGraphOverrideUrl":{"prefix":"MyAvatar.setAnimGraphOverrideUrl","body":["MyAvatar.setAnimGraphOverrideUrl(${1:url: string})"]}}, + {"MyAvatar.getAnimGraphUrl":{"prefix":"MyAvatar.getAnimGraphUrl","body":["MyAvatar.getAnimGraphUrl"]}}, + {"MyAvatar.setAnimGraphUrl":{"prefix":"MyAvatar.setAnimGraphUrl","body":["MyAvatar.setAnimGraphUrl(${1:url: string})"]}}, + {"MyAvatar.getPositionForAudio":{"prefix":"MyAvatar.getPositionForAudio","body":["MyAvatar.getPositionForAudio"]}}, + {"MyAvatar.getOrientationForAudio":{"prefix":"MyAvatar.getOrientationForAudio","body":["MyAvatar.getOrientationForAudio"]}}, + {"MyAvatar.setModelScale":{"prefix":"MyAvatar.setModelScale","body":["MyAvatar.setModelScale(${1:scale: number})"]}}, + {"MyAvatar.audioListenerModeChanged":{"prefix":"MyAvatar.audioListenerModeChanged","body":["MyAvatar.audioListenerModeChanged"]}}, + {"MyAvatar.transformChanged":{"prefix":"MyAvatar.transformChanged","body":["MyAvatar.transformChanged"]}}, + {"MyAvatar.newCollisionSoundURL":{"prefix":"MyAvatar.newCollisionSoundURL","body":["MyAvatar.newCollisionSoundURL(${1:url: string})"]}}, + {"MyAvatar.collisionWithEntity":{"prefix":"MyAvatar.collisionWithEntity","body":["MyAvatar.collisionWithEntity(${1:collision: Collision})"],"description":"Triggered when the avatar collides with an entity."}}, + {"MyAvatar.collisionsEnabledChanged":{"prefix":"MyAvatar.collisionsEnabledChanged","body":["MyAvatar.collisionsEnabledChanged(${1:enabled: boolean})"],"description":"Triggered when collisions with avatar enabled or disabled"}}, + {"MyAvatar.animGraphUrlChanged":{"prefix":"MyAvatar.animGraphUrlChanged","body":["MyAvatar.animGraphUrlChanged(${1:url: url})"],"description":"Triggered when avatar's animation url changes"}}, + {"MyAvatar.energyChanged":{"prefix":"MyAvatar.energyChanged","body":["MyAvatar.energyChanged(${1:energy: number})"]}}, + {"MyAvatar.positionGoneTo":{"prefix":"MyAvatar.positionGoneTo","body":["MyAvatar.positionGoneTo"]}}, + {"MyAvatar.onLoadComplete":{"prefix":"MyAvatar.onLoadComplete","body":["MyAvatar.onLoadComplete"]}}, + {"MyAvatar.wentAway":{"prefix":"MyAvatar.wentAway","body":["MyAvatar.wentAway"]}}, + {"MyAvatar.wentActive":{"prefix":"MyAvatar.wentActive","body":["MyAvatar.wentActive"]}}, + {"MyAvatar.skeletonChanged":{"prefix":"MyAvatar.skeletonChanged","body":["MyAvatar.skeletonChanged"]}}, + {"MyAvatar.dominantHandChanged":{"prefix":"MyAvatar.dominantHandChanged","body":["MyAvatar.dominantHandChanged(${1:hand: string})"]}}, + {"MyAvatar.sensorToWorldScaleChanged":{"prefix":"MyAvatar.sensorToWorldScaleChanged","body":["MyAvatar.sensorToWorldScaleChanged(${1:scale: number})"]}}, + {"MyAvatar.attachmentsChanged":{"prefix":"MyAvatar.attachmentsChanged","body":["MyAvatar.attachmentsChanged"]}}, + {"MyAvatar.scaleChanged":{"prefix":"MyAvatar.scaleChanged","body":["MyAvatar.scaleChanged"]}}, + {"MyAvatar.shouldDisableHandTouchChanged":{"prefix":"MyAvatar.shouldDisableHandTouchChanged","body":["MyAvatar.shouldDisableHandTouchChanged(${1:shouldDisable: boolean})"],"description":"Triggered when hand touch is globally enabled or disabled"}}, + {"MyAvatar.disableHandTouchForIDChanged":{"prefix":"MyAvatar.disableHandTouchForIDChanged","body":["MyAvatar.disableHandTouchForIDChanged(${1:entityID: Uuid},${2:disable: boolean})"],"description":"Triggered when hand touch is enabled or disabled for an specific entity"}}, + {"FaceTracker":{"prefix":"FaceTracker","body":["FaceTracker"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The FaceTracker API helps manage facial tracking hardware."}}, + {"FaceTracker.setEnabled":{"prefix":"FaceTracker.setEnabled","body":["FaceTracker.setEnabled(${1:enabled: boolean})"]}}, + {"FaceTracker.calibrate":{"prefix":"FaceTracker.calibrate","body":["FaceTracker.calibrate"]}}, + {"LaserPointers":{"prefix":"LaserPointers","body":["LaserPointers"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Synonym for {@link Pointers} as used for laser pointers."}}, + {"LaserPointers.createLaserPointer":{"prefix":"LaserPointers.createLaserPointer","body":["LaserPointers.createLaserPointer(${1:properties: Pointers.LaserPointerProperties})"]}}, + {"LaserPointers.enableLaserPointer":{"prefix":"LaserPointers.enableLaserPointer","body":["LaserPointers.enableLaserPointer(${1:id: number})"]}}, + {"LaserPointers.disableLaserPointer":{"prefix":"LaserPointers.disableLaserPointer","body":["LaserPointers.disableLaserPointer(${1:id: number})"]}}, + {"LaserPointers.removeLaserPointer":{"prefix":"LaserPointers.removeLaserPointer","body":["LaserPointers.removeLaserPointer(${1:id: number})"]}}, + {"LaserPointers.editRenderState":{"prefix":"LaserPointers.editRenderState","body":["LaserPointers.editRenderState(${1:id: number},${2:renderState: string},${3:properties: Pointers.RayPointerRenderState})"]}}, + {"LaserPointers.setRenderState":{"prefix":"LaserPointers.setRenderState","body":["LaserPointers.setRenderState(${1:renderState: string},${2:id: number})"]}}, + {"LaserPointers.getPrevRayPickResult":{"prefix":"LaserPointers.getPrevRayPickResult","body":["LaserPointers.getPrevRayPickResult(${1:id: number})"]}}, + {"LaserPointers.setPrecisionPicking":{"prefix":"LaserPointers.setPrecisionPicking","body":["LaserPointers.setPrecisionPicking(${1:id: number},${2:precisionPicking: boolean})"]}}, + {"LaserPointers.setLaserLength":{"prefix":"LaserPointers.setLaserLength","body":["LaserPointers.setLaserLength(${1:id: number},${2:laserLength: number})"]}}, + {"LaserPointers.setIgnoreItems":{"prefix":"LaserPointers.setIgnoreItems","body":["LaserPointers.setIgnoreItems(${1:id: number},${2:ignoreItems: Array.})"]}}, + {"LaserPointers.setIncludeItems":{"prefix":"LaserPointers.setIncludeItems","body":["LaserPointers.setIncludeItems(${1:id: number},${2:includeItems: Array.})"]}}, + {"LaserPointers.setLockEndUUID":{"prefix":"LaserPointers.setLockEndUUID","body":["LaserPointers.setLockEndUUID(${1:id: number},${2:itemID: Uuid},${3:isOverlay: boolean},${4:offsetMat: Mat4})"]}}, + {"LaserPointers.isLeftHand":{"prefix":"LaserPointers.isLeftHand","body":["LaserPointers.isLeftHand(${1:id: number})"]}}, + {"LaserPointers.isRightHand":{"prefix":"LaserPointers.isRightHand","body":["LaserPointers.isRightHand(${1:id: number})"]}}, + {"LaserPointers.isMouse":{"prefix":"LaserPointers.isMouse","body":["LaserPointers.isMouse(${1:id: number})"]}}, + {"Picks.RayPickProperties":{"prefix":"Picks.RayPickProperties","body":["Picks.RayPickProperties"],"description":"A set of properties that can be passed to {@link Picks.createPick} to create a new Ray Pick."}}, + {"Picks.StylusPickProperties":{"prefix":"Picks.StylusPickProperties","body":["Picks.StylusPickProperties"],"description":"A set of properties that can be passed to {@link Picks.createPick} to create a new Stylus Pick."}}, + {"Picks.ParabolaPickProperties":{"prefix":"Picks.ParabolaPickProperties","body":["Picks.ParabolaPickProperties"],"description":"A set of properties that can be passed to {@link Picks.createPick} to create a new Parabola Pick."}}, + {"Shape":{"prefix":"Shape","body":["Shape"],"description":"A Shape defines a physical volume."}}, + {"Picks.CollisionPickProperties":{"prefix":"Picks.CollisionPickProperties","body":["Picks.CollisionPickProperties"],"description":"A set of properties that can be passed to {@link Picks.createPick} to create a new Collision Pick."}}, + {"Picks":{"prefix":"Picks","body":["Picks"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Picks API lets you create and manage objects for repeatedly calculating intersections in different ways."}}, + {"Picks.createPick":{"prefix":"Picks.createPick","body":["Picks.createPick(${1:type: PickType},${2:properties: Picks.RayPickProperties})"],"description":"Adds a new Pick.\rDifferent {@link PickType}s use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example,\r with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pick, a Mouse Ray Pick, or a Joint Ray Pick."}}, + {"Picks.enablePick":{"prefix":"Picks.enablePick","body":["Picks.enablePick(${1:uid: number})"],"description":"Enables a Pick."}}, + {"Picks.disablePick":{"prefix":"Picks.disablePick","body":["Picks.disablePick(${1:uid: number})"],"description":"Disables a Pick."}}, + {"Picks.removePick":{"prefix":"Picks.removePick","body":["Picks.removePick(${1:uid: number})"],"description":"Removes a Pick."}}, + {"RayPickResult":{"prefix":"RayPickResult","body":["RayPickResult"],"description":"An intersection result for a Ray Pick."}}, + {"StylusPickResult":{"prefix":"StylusPickResult","body":["StylusPickResult"],"description":"An intersection result for a Stylus Pick."}}, + {"ParabolaPickResult":{"prefix":"ParabolaPickResult","body":["ParabolaPickResult"],"description":"An intersection result for a Parabola Pick."}}, + {"CollisionPickResult":{"prefix":"CollisionPickResult","body":["CollisionPickResult"],"description":"An intersection result for a Collision Pick."}}, + {"IntersectingObject":{"prefix":"IntersectingObject","body":["IntersectingObject"],"description":"Information about the Collision Pick's intersection with an object"}}, + {"CollisionContact":{"prefix":"CollisionContact","body":["CollisionContact"],"description":"A pair of points that represents part of an overlap between a Collision Pick and an object in the physics engine. Points which are further apart represent deeper overlap"}}, + {"Picks.getPrevPickResult":{"prefix":"Picks.getPrevPickResult","body":["Picks.getPrevPickResult(${1:uid: number})"],"description":"Get the most recent pick result from this Pick. This will be updated as long as the Pick is enabled."}}, + {"Picks.setPrecisionPicking":{"prefix":"Picks.setPrecisionPicking","body":["Picks.setPrecisionPicking(${1:uid: number},${2:precisionPicking: boolean})"],"description":"Sets whether or not to use precision picking."}}, + {"Picks.setIgnoreItems":{"prefix":"Picks.setIgnoreItems","body":["Picks.setIgnoreItems(${1:uid: number},${2:ignoreItems: Array.})"],"description":"Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Picks."}}, + {"Picks.setIncludeItems":{"prefix":"Picks.setIncludeItems","body":["Picks.setIncludeItems(${1:uid: number},${2:includeItems: Array.})"],"description":"Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus\r Picks only intersect with objects in their include list."}}, + {"Picks.isLeftHand":{"prefix":"Picks.isLeftHand","body":["Picks.isLeftHand(${1:uid: number})"],"description":"Check if a Pick is associated with the left hand."}}, + {"Picks.isRightHand":{"prefix":"Picks.isRightHand","body":["Picks.isRightHand(${1:uid: number})"],"description":"Check if a Pick is associated with the right hand."}}, + {"Picks.isMouse":{"prefix":"Picks.isMouse","body":["Picks.isMouse(${1:uid: number})"],"description":"Check if a Pick is associated with the system mouse."}}, + {"Picks.PICK_NOTHING":{"prefix":"Picks.PICK_NOTHING","body":["Picks.PICK_NOTHING"]}}, + {"Picks.PICK_ENTITIES":{"prefix":"Picks.PICK_ENTITIES","body":["Picks.PICK_ENTITIES"]}}, + {"Picks.PICK_OVERLAYS":{"prefix":"Picks.PICK_OVERLAYS","body":["Picks.PICK_OVERLAYS"]}}, + {"Picks.PICK_AVATARS":{"prefix":"Picks.PICK_AVATARS","body":["Picks.PICK_AVATARS"]}}, + {"Picks.PICK_HUD":{"prefix":"Picks.PICK_HUD","body":["Picks.PICK_HUD"]}}, + {"Picks.PICK_COARSE":{"prefix":"Picks.PICK_COARSE","body":["Picks.PICK_COARSE"]}}, + {"Picks.PICK_INCLUDE_INVISIBLE":{"prefix":"Picks.PICK_INCLUDE_INVISIBLE","body":["Picks.PICK_INCLUDE_INVISIBLE"]}}, + {"Picks.PICK_INCLUDE_NONCOLLIDABLE":{"prefix":"Picks.PICK_INCLUDE_NONCOLLIDABLE","body":["Picks.PICK_INCLUDE_NONCOLLIDABLE"]}}, + {"Picks.PICK_ALL_INTERSECTIONS":{"prefix":"Picks.PICK_ALL_INTERSECTIONS","body":["Picks.PICK_ALL_INTERSECTIONS"]}}, + {"Picks.INTERSECTED_NONE":{"prefix":"Picks.INTERSECTED_NONE","body":["Picks.INTERSECTED_NONE"]}}, + {"Picks.INTERSECTED_ENTITY":{"prefix":"Picks.INTERSECTED_ENTITY","body":["Picks.INTERSECTED_ENTITY"]}}, + {"Picks.INTERSECTED_OVERLAY":{"prefix":"Picks.INTERSECTED_OVERLAY","body":["Picks.INTERSECTED_OVERLAY"]}}, + {"Picks.INTERSECTED_AVATAR":{"prefix":"Picks.INTERSECTED_AVATAR","body":["Picks.INTERSECTED_AVATAR"]}}, + {"Picks.INTERSECTED_HUD":{"prefix":"Picks.INTERSECTED_HUD","body":["Picks.INTERSECTED_HUD"]}}, + {"Pointers.StylusPointerProperties":{"prefix":"Pointers.StylusPointerProperties","body":["Pointers.StylusPointerProperties"],"description":"A set of properties that can be passed to {@link Pointers.createPointer} to create a new Pointer. Contains the relevant {@link Picks.PickProperties} to define the underlying Pick."}}, + {"Pointers.DefaultRayPointerRenderState":{"prefix":"Pointers.DefaultRayPointerRenderState","body":["Pointers.DefaultRayPointerRenderState"],"description":"A set of properties used to define the visual aspect of a Ray Pointer in the case that the Pointer is not intersecting something. Same as a {@link Pointers.RayPointerRenderState},\rbut with an additional distance field."}}, + {"Pointers.RayPointerRenderState":{"prefix":"Pointers.RayPointerRenderState","body":["Pointers.RayPointerRenderState"],"description":"A set of properties which define the visual aspect of a Ray Pointer in the case that the Pointer is intersecting something."}}, + {"Pointers.LaserPointerProperties":{"prefix":"Pointers.LaserPointerProperties","body":["Pointers.LaserPointerProperties"],"description":"A set of properties that can be passed to {@link Pointers.createPointer} to create a new Pointer. Contains the relevant {@link Picks.PickProperties} to define the underlying Pick."}}, + {"Pointers.ParabolaProperties":{"prefix":"Pointers.ParabolaProperties","body":["Pointers.ParabolaProperties"],"description":"The rendering properties of the parabolic path"}}, + {"Pointers.DefaultParabolaPointerRenderState":{"prefix":"Pointers.DefaultParabolaPointerRenderState","body":["Pointers.DefaultParabolaPointerRenderState"],"description":"A set of properties used to define the visual aspect of a Parabola Pointer in the case that the Pointer is not intersecting something. Same as a {@link Pointers.ParabolaPointerRenderState},\rbut with an additional distance field."}}, + {"Pointers.ParabolaPointerRenderState":{"prefix":"Pointers.ParabolaPointerRenderState","body":["Pointers.ParabolaPointerRenderState"],"description":"A set of properties used to define the visual aspect of a Parabola Pointer in the case that the Pointer is intersecting something."}}, + {"Pointers.ParabolaPointerProperties":{"prefix":"Pointers.ParabolaPointerProperties","body":["Pointers.ParabolaPointerProperties"],"description":"A set of properties that can be passed to {@link Pointers.createPointer} to create a new Pointer. Contains the relevant {@link Picks.PickProperties} to define the underlying Pick."}}, + {"Pointers":{"prefix":"Pointers","body":["Pointers"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Pointers API lets you create and manage objects for repeatedly calculating intersections in different ways, as well as the visual representation of those objects.\r Pointers can also be configured to automatically generate {@link PointerEvent}s on {@link Entities} and {@link Overlays}."}}, + {"Pointers.Trigger":{"prefix":"Pointers.Trigger","body":["Pointers.Trigger"],"description":"A trigger mechanism for Ray and Parabola Pointers."}}, + {"Pointers.createPointer":{"prefix":"Pointers.createPointer","body":["Pointers.createPointer(${1:type: PickType},${2:properties: Pointers.LaserPointerProperties})"],"description":"Adds a new Pointer\rDifferent {@link PickType}s use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example,\r with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pointer, a Mouse Ray Pointer, or a Joint Ray Pointer."}}, + {"Pointers.enablePointer":{"prefix":"Pointers.enablePointer","body":["Pointers.enablePointer(${1:uid: number})"],"description":"Enables a Pointer."}}, + {"Pointers.disablePointer":{"prefix":"Pointers.disablePointer","body":["Pointers.disablePointer(${1:uid: number})"],"description":"Disables a Pointer."}}, + {"Pointers.removePointer":{"prefix":"Pointers.removePointer","body":["Pointers.removePointer(${1:uid: number})"],"description":"Removes a Pointer."}}, + {"Pointers.editRenderState":{"prefix":"Pointers.editRenderState","body":["Pointers.editRenderState(${1:uid: number},${2:renderState: string},${3:properties: Pointers.RayPointerRenderState})"],"description":"Edit some visual aspect of a Pointer. Currently only supported for Ray Pointers."}}, + {"Pointers.setRenderState":{"prefix":"Pointers.setRenderState","body":["Pointers.setRenderState(${1:uid: number},${2:renderState: string})"],"description":"Set the render state of a Pointer. For Ray Pointers, this means switching between their {@link Pointers.RayPointerRenderState}s, or \"\" to turn off rendering and hover/trigger events.\r For Stylus Pointers, there are three built-in options: \"events on\" (render and send events, the default), \"events off\" (render but don't send events), and \"disabled\" (don't render, don't send events)."}}, + {"Pointers.getPrevPickResult":{"prefix":"Pointers.getPrevPickResult","body":["Pointers.getPrevPickResult(${1:uid: number})"],"description":"Get the most recent pick result from this Pointer. This will be updated as long as the Pointer is enabled, regardless of the render state."}}, + {"Pointers.setPrecisionPicking":{"prefix":"Pointers.setPrecisionPicking","body":["Pointers.setPrecisionPicking(${1:uid: number},${2:precisionPicking: boolean})"],"description":"Sets whether or not to use precision picking."}}, + {"Pointers.setLength":{"prefix":"Pointers.setLength","body":["Pointers.setLength(${1:uid: number},${2:length: number})"],"description":"Sets the length of this Pointer. No effect on Stylus Pointers."}}, + {"Pointers.setIgnoreItems":{"prefix":"Pointers.setIgnoreItems","body":["Pointers.setIgnoreItems(${1:uid: number},${2:ignoreItems: Array.})"],"description":"Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Pointers."}}, + {"Pointers.setIncludeItems":{"prefix":"Pointers.setIncludeItems","body":["Pointers.setIncludeItems(${1:uid: number},${2:includeItems: Array.})"],"description":"Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus\r Pointers only intersect with objects in their include list."}}, + {"Pointers.setLockEndUUID":{"prefix":"Pointers.setLockEndUUID","body":["Pointers.setLockEndUUID(${1:uid: number},${2:objectID: Uuid},${3:isOverlay: boolean},${4:offsetMat: Mat4})"],"description":"Lock a Pointer onto a specific object (overlay, entity, or avatar). Optionally, provide an offset in object-space, otherwise the Pointer will lock on to the center of the object.\r Not used by Stylus Pointers."}}, + {"Pointers.isLeftHand":{"prefix":"Pointers.isLeftHand","body":["Pointers.isLeftHand(${1:uid: number})"],"description":"Check if a Pointer is associated with the left hand."}}, + {"Pointers.isRightHand":{"prefix":"Pointers.isRightHand","body":["Pointers.isRightHand(${1:uid: number})"],"description":"Check if a Pointer is associated with the right hand."}}, + {"Pointers.isMouse":{"prefix":"Pointers.isMouse","body":["Pointers.isMouse(${1:uid: number})"],"description":"Check if a Pointer is associated with the system mouse."}}, + {"Pointers.getPointerProperties":{"prefix":"Pointers.getPointerProperties","body":["Pointers.getPointerProperties(${1:uid: number})"],"description":"Returns information about an existing Pointer"}}, + {"RayPick":{"prefix":"RayPick","body":["RayPick"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Synonym for {@link Picks} as used for ray picks."}}, + {"RayPick.createRayPick":{"prefix":"RayPick.createRayPick","body":["RayPick.createRayPick(${1:undefined: Picks.RayPickProperties})"]}}, + {"RayPick.enableRayPick":{"prefix":"RayPick.enableRayPick","body":["RayPick.enableRayPick(${1:id: number})"]}}, + {"RayPick.disableRayPick":{"prefix":"RayPick.disableRayPick","body":["RayPick.disableRayPick(${1:id: number})"]}}, + {"RayPick.removeRayPick":{"prefix":"RayPick.removeRayPick","body":["RayPick.removeRayPick(${1:id: number})"]}}, + {"RayPick.getPrevRayPickResult":{"prefix":"RayPick.getPrevRayPickResult","body":["RayPick.getPrevRayPickResult(${1:id: number})"]}}, + {"RayPick.setPrecisionPicking":{"prefix":"RayPick.setPrecisionPicking","body":["RayPick.setPrecisionPicking(${1:id: number},${2:precisionPicking: boolean})"]}}, + {"RayPick.setIgnoreItems":{"prefix":"RayPick.setIgnoreItems","body":["RayPick.setIgnoreItems(${1:id: number},${2:{Uuid[])})"]}}, + {"RayPick.setIncludeItems":{"prefix":"RayPick.setIncludeItems","body":["RayPick.setIncludeItems(${1:id: number},${2:{Uuid[])})"]}}, + {"RayPick.isLeftHand":{"prefix":"RayPick.isLeftHand","body":["RayPick.isLeftHand(${1:id: number})"]}}, + {"RayPick.isRightHand":{"prefix":"RayPick.isRightHand","body":["RayPick.isRightHand(${1:id: number})"]}}, + {"RayPick.isMouse":{"prefix":"RayPick.isMouse","body":["RayPick.isMouse(${1:id: number})"]}}, + {"RayPick.PICK_NOTHING":{"prefix":"RayPick.PICK_NOTHING","body":["RayPick.PICK_NOTHING"]}}, + {"RayPick.PICK_ENTITIES":{"prefix":"RayPick.PICK_ENTITIES","body":["RayPick.PICK_ENTITIES"]}}, + {"RayPick.PICK_OVERLAYS":{"prefix":"RayPick.PICK_OVERLAYS","body":["RayPick.PICK_OVERLAYS"]}}, + {"RayPick.PICK_AVATARS":{"prefix":"RayPick.PICK_AVATARS","body":["RayPick.PICK_AVATARS"]}}, + {"RayPick.PICK_HUD":{"prefix":"RayPick.PICK_HUD","body":["RayPick.PICK_HUD"]}}, + {"RayPick.PICK_COARSE":{"prefix":"RayPick.PICK_COARSE","body":["RayPick.PICK_COARSE"]}}, + {"RayPick.PICK_INCLUDE_INVISIBLE":{"prefix":"RayPick.PICK_INCLUDE_INVISIBLE","body":["RayPick.PICK_INCLUDE_INVISIBLE"]}}, + {"RayPick.PICK_INCLUDE_NONCOLLIDABLE":{"prefix":"RayPick.PICK_INCLUDE_NONCOLLIDABLE","body":["RayPick.PICK_INCLUDE_NONCOLLIDABLE"]}}, + {"RayPick.PICK_ALL_INTERSECTIONS":{"prefix":"RayPick.PICK_ALL_INTERSECTIONS","body":["RayPick.PICK_ALL_INTERSECTIONS"]}}, + {"RayPick.INTERSECTED_NONE":{"prefix":"RayPick.INTERSECTED_NONE","body":["RayPick.INTERSECTED_NONE"]}}, + {"RayPick.INTERSECTED_ENTITY":{"prefix":"RayPick.INTERSECTED_ENTITY","body":["RayPick.INTERSECTED_ENTITY"]}}, + {"RayPick.INTERSECTED_OVERLAY":{"prefix":"RayPick.INTERSECTED_OVERLAY","body":["RayPick.INTERSECTED_OVERLAY"]}}, + {"RayPick.INTERSECTED_AVATAR":{"prefix":"RayPick.INTERSECTED_AVATAR","body":["RayPick.INTERSECTED_AVATAR"]}}, + {"RayPick.INTERSECTED_HUD":{"prefix":"RayPick.INTERSECTED_HUD","body":["RayPick.INTERSECTED_HUD"]}}, + {"AccountServices":{"prefix":"AccountServices","body":["AccountServices"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The AccountServices API contains helper functions related to user connectivity"}}, + {"AccountServices.getDownloadInfo":{"prefix":"AccountServices.getDownloadInfo","body":["AccountServices.getDownloadInfo"]}}, + {"AccountServices.updateDownloadInfo":{"prefix":"AccountServices.updateDownloadInfo","body":["AccountServices.updateDownloadInfo"]}}, + {"AccountServices.isLoggedIn":{"prefix":"AccountServices.isLoggedIn","body":["AccountServices.isLoggedIn"]}}, + {"AccountServices.checkAndSignalForAccessToken":{"prefix":"AccountServices.checkAndSignalForAccessToken","body":["AccountServices.checkAndSignalForAccessToken"]}}, + {"AccountServices.logOut":{"prefix":"AccountServices.logOut","body":["AccountServices.logOut"]}}, + {"AccountServices.connected":{"prefix":"AccountServices.connected","body":["AccountServices.connected"]}}, + {"AccountServices.disconnected":{"prefix":"AccountServices.disconnected","body":["AccountServices.disconnected(${1:reason: string})"]}}, + {"AccountServices.myUsernameChanged":{"prefix":"AccountServices.myUsernameChanged","body":["AccountServices.myUsernameChanged(${1:username: string})"]}}, + {"AccountServices.downloadInfoChanged":{"prefix":"AccountServices.downloadInfoChanged","body":["AccountServices.downloadInfoChanged(${1:info})"]}}, + {"AccountServices.findableByChanged":{"prefix":"AccountServices.findableByChanged","body":["AccountServices.findableByChanged(${1:discoverabilityMode: string})"]}}, + {"AccountServices.loggedInChanged":{"prefix":"AccountServices.loggedInChanged","body":["AccountServices.loggedInChanged(${1:loggedIn: boolean})"]}}, + {"Audio":{"prefix":"Audio","body":["Audio"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Audio API provides facilities to interact with audio inputs and outputs and to play sounds."}}, + {"Audio.setInputDevice":{"prefix":"Audio.setInputDevice","body":["Audio.setInputDevice(${1:device: object},${2:isHMD: boolean})"]}}, + {"Audio.setOutputDevice":{"prefix":"Audio.setOutputDevice","body":["Audio.setOutputDevice(${1:device: object},${2:isHMD: boolean})"]}}, + {"Audio.setReverb":{"prefix":"Audio.setReverb","body":["Audio.setReverb(${1:enable: boolean})"],"description":"Enable or disable reverberation. Reverberation is done by the client, on the post-mix audio. The reverberation options \rcome from either the domain's audio zone if used — configured on the server — or as scripted by \r{@link Audio.setReverbOptions|setReverbOptions}."}}, + {"Audio.setReverbOptions":{"prefix":"Audio.setReverbOptions","body":["Audio.setReverbOptions(${1:options: AudioEffectOptions})"],"description":"Configure reverberation options. Use {@link Audio.setReverb|setReverb} to enable or disable reverberation."}}, + {"Audio.startRecording":{"prefix":"Audio.startRecording","body":["Audio.startRecording(${1:filename: string})"],"description":"Starts making an audio recording of the audio being played in-world (i.e., not local-only audio) to a file in WAV format."}}, + {"Audio.stopRecording":{"prefix":"Audio.stopRecording","body":["Audio.stopRecording"],"description":"Finish making an audio recording started with {@link Audio.startRecording|startRecording}."}}, + {"Audio.getRecording":{"prefix":"Audio.getRecording","body":["Audio.getRecording"],"description":"Check whether an audio recording is currently being made."}}, + {"Audio.nop":{"prefix":"Audio.nop","body":["Audio.nop"]}}, + {"Audio.mutedChanged":{"prefix":"Audio.mutedChanged","body":["Audio.mutedChanged(${1:isMuted: boolean})"],"description":"Triggered when the audio input is muted or unmuted."}}, + {"Audio.noiseReductionChanged":{"prefix":"Audio.noiseReductionChanged","body":["Audio.noiseReductionChanged(${1:isEnabled: boolean})"],"description":"Triggered when the audio input noise reduction is enabled or disabled."}}, + {"Audio.inputVolumeChanged":{"prefix":"Audio.inputVolumeChanged","body":["Audio.inputVolumeChanged(${1:volume: number})"],"description":"Triggered when the input audio volume changes."}}, + {"Audio.inputLevelChanged":{"prefix":"Audio.inputLevelChanged","body":["Audio.inputLevelChanged(${1:level: number})"],"description":"Triggered when the input audio level changes."}}, + {"Audio.contextChanged":{"prefix":"Audio.contextChanged","body":["Audio.contextChanged(${1:context: string})"],"description":"Triggered when the current context of the audio changes."}}, + {"Audio.onContextChanged":{"prefix":"Audio.onContextChanged","body":["Audio.onContextChanged"]}}, + {"Clipboard":{"prefix":"Clipboard","body":["Clipboard"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Clipboard API enables you to export and import entities to and from JSON files."}}, + {"Clipboard.getContentsDimensions":{"prefix":"Clipboard.getContentsDimensions","body":["Clipboard.getContentsDimensions"],"description":"Compute the extents of the contents held in the clipboard."}}, + {"Clipboard.getClipboardContentsLargestDimension":{"prefix":"Clipboard.getClipboardContentsLargestDimension","body":["Clipboard.getClipboardContentsLargestDimension"],"description":"Compute the largest dimension of the extents of the contents held in the clipboard."}}, + {"Clipboard.importEntities":{"prefix":"Clipboard.importEntities","body":["Clipboard.importEntities(${1:filename: string})"],"description":"Import entities from a JSON file containing entity data into the clipboard.\rYou can generate a JSON file using {@link Clipboard.exportEntities}."}}, + {"Clipboard.exportEntities":{"prefix":"Clipboard.exportEntities","body":["Clipboard.exportEntities(${1:filename: string},${2:entityIDs: Array.})"],"description":"Export the entities specified to a JSON file."}}, + {"Clipboard.exportEntities":{"prefix":"Clipboard.exportEntities","body":["Clipboard.exportEntities(${1:filename: string},${2:x: number},${3:y: number},${4:z: number},${5:scale: number})"],"description":"Export the entities with centers within a cube to a JSON file."}}, + {"Clipboard.pasteEntities":{"prefix":"Clipboard.pasteEntities","body":["Clipboard.pasteEntities(${1:position: Vec3})"],"description":"Paste the contents of the clipboard into the world."}}, + {"Controller":{"prefix":"Controller","body":["Controller"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Controller API provides facilities to interact with computer and controller hardware.\r\r
Functions
\r\r

Properties

\r
    \r
  • {@link Controller.getActions|getActions}
  • \r
  • {@link Controller.getHardware|getHardware}
  • \r
  • {@link Controller.getStandard|getStandard}
  • \r
\r\r

Mappings

\r
    \r
  • {@link Controller.disableMapping|disableMapping}
  • \r
  • {@link Controller.enableMapping|enableMapping}
  • \r
  • {@link Controller.loadMapping|loadMapping}
  • \r
  • {@link Controller.newMapping|newMapping}
  • \r
  • {@link Controller.parseMapping|parseMapping}
  • \r
\r\r

Input, Hardware, and Action Reflection

\r
    \r
  • {@link Controller.findAction|findAction}
  • \r
  • {@link Controller.findDevice|findDevice}
  • \r
  • {@link Controller.getActionNames|getActionNames}
  • \r
  • {@link Controller.getAllActions|getAllActions}
  • \r
  • {@link Controller.getAvailableInputs|getAvailableInputs}
  • \r
  • {@link Controller.getDeviceName|getDeviceName}
  • \r
  • {@link Controller.getDeviceNames|getDeviceNames}
  • \r
\r\r

Input, Hardware, and Action Events

\r
    \r
  • {@link Controller.actionEvent|actionEvent}
  • \r
  • {@link Controller.hardwareChanged|hardwareChanged}
  • \r
  • {@link Controller.inputEvent|inputEvent}
  • \r
\r\r

Mouse, Keyboard, and Touch Events

\r
    \r
  • {@link Controller.keyPressEvent|keyPressEvent}
  • \r
  • {@link Controller.keyReleaseEvent|keyReleaseEvent}
  • \r
  • {@link Controller.mouseDoublePressEvent|mouseDoublePressEvent}
  • \r
  • {@link Controller.mouseMoveEvent|mouseMoveEvent}
  • \r
  • {@link Controller.mousePressEvent|mousePressEvent}
  • \r
  • {@link Controller.mouseReleaseEvent|mouseReleaseEvent}
  • \r
  • {@link Controller.touchBeginEvent|touchBeginEvent}
  • \r
  • {@link Controller.touchEndEvent|touchEndEvent}
  • \r
  • {@link Controller.touchUpdateEvent|touchUpdateEvent}
  • \r
  • {@link Controller.wheelEvent|wheelEvent}
  • \r
\r\r

Control Capturing

\r
    \r
  • {@link Controller.captureMouseEvents|captureMouseEvents}
  • \r
  • {@link Controller.captureTouchEvents|captureTouchEvents}
  • \r
  • {@link Controller.captureWheelEvents|captureWheelEvents}
  • \r
  • {@link Controller.releaseMouseEvents|releaseMouseEvents}
  • \r
  • {@link Controller.releaseTouchEvents|releaseTouchEvents}
  • \r
  • {@link Controller.releaseWheelEvents|releaseWheelEvents}
  • \r
\r\r

Action Capturing

\r
    \r
  • {@link Controller.captureActionEvents|captureActionEvents}
  • \r
  • {@link Controller.captureEntityClickEvents|captureEntityClickEvents}
  • \r
  • {@link Controller.captureJoystick|captureJoystick}
  • \r
  • {@link Controller.captureKeyEvents|captureKeyEvents}
  • \r
  • {@link Controller.releaseActionEvents|releaseActionEvents}
  • \r
  • {@link Controller.releaseEntityClickEvents|releaseEntityClickEvents}
  • \r
  • {@link Controller.releaseJoystick|releaseJoystick}
  • \r
  • {@link Controller.releaseKeyEvents|releaseKeyEvents}
  • \r
\r\r

Controller and Action Values

\r
    \r
  • {@link Controller.getValue|getValue}
  • \r
  • {@link Controller.getAxisValue|getAxisValue}
  • \r
  • {@link Controller.getPoseValue|getgetPoseValue}
  • \r
  • {@link Controller.getActionValue|getActionValue}
  • \r
\r\r

Haptics

\r
    \r
  • {@link Controller.triggerHapticPulse|triggerHapticPulse}
  • \r
  • {@link Controller.triggerHapticPulseOnDevice|triggerHapticPulseOnDevice}
  • \r
  • {@link Controller.triggerShortHapticPulse|triggerShortHapticPulse}
  • \r
  • {@link Controller.triggerShortHapticPulseOnDevice|triggerShortHapticPulseOnDevice}
  • \r
\r\r

Display Information

\r
    \r
  • {@link Controller.getViewportDimensions|getViewportDimensions}
  • \r
  • {@link Controller.getRecommendedHUDRect|getRecommendedHUDRect}
  • \r
\r\r

Virtual Game Pad

\r
    \r
  • {@link Controller.setVPadEnabled|setVPadEnabled}
  • \r
  • {@link Controller.setVPadHidden|setVPadHidden}
  • \r
  • {@link Controller.setVPadExtraBottomMargin|setVPadExtraBottomMargin}
  • \r
\r\r

Input Recordings

\r
    \r
  • {@link Controller.startInputRecording|startInputRecording}
  • \r
  • {@link Controller.stopInputRecording|stopInputRecording}
  • \r
  • {@link Controller.saveInputRecording|saveInputRecording}
  • \r
  • {@link Controller.getInputRecorderSaveDirectory|getInputRecorderSaveDirectory}
  • \r
  • {@link Controller.loadInputRecording|loadInputRecording}
  • \r
  • {@link Controller.startInputPlayback|startInputPlayback}
  • \r
  • {@link Controller.stopInputPlayback|stopInputPlayback}
  • \r
\r\r
Entity Methods:
\r\r

The default scripts implement hand controller actions that use {@link Entities.callEntityMethod} to call entity script \rmethods, if present in the entity being interacted with.

\r\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
Method NameDescriptionExample
startFarTrigger
continueFarTrigger
stopFarTrigger
These methods are called when a user is more than 0.3m away from the entity, the entity is triggerable, and the \r user starts, continues, or stops squeezing the trigger.A light switch that can be toggled on and off from a distance.
startNearTrigger
continueNearTrigger
stopNearTrigger
These methods are called when a user is less than 0.3m away from the entity, the entity is triggerable, and the \r user starts, continues, or stops squeezing the trigger.A doorbell that can be rung when a user is near.
startDistanceGrab
continueDistanceGrab
These methods are called when a user is more than 0.3m away from the entity, the entity is either cloneable, or\r grabbable and not locked, and the user starts or continues to squeeze the trigger.A comet that emits icy particle trails when a user is dragging it through the sky.
startNearGrab
continueNearGrab
These methods are called when a user is less than 0.3m away from the entity, the entity is either cloneable, or \r grabbable and not locked, and the user starts or continues to squeeze the trigger.A ball that glows when it's being held close.
releaseGrabThis method is called when a user releases the trigger when having been either distance or near grabbing an \r entity.Turn off the ball glow or comet trail with the user finishes grabbing it.
startEquip
continueEquip
releaseEquip
These methods are called when a user starts, continues, or stops equipping an entity.A glass that stays in the user's hand after the trigger is clicked.
\r

All the entity methods are called with the following two arguments:

\r
    \r
  • The entity ID.
  • \r
  • A string, \"hand,userID\" — where \"hand\" is \"left\" or \"right\", and \"userID\"\r is the user's {@link MyAvatar|MyAvatar.sessionUUID}.
  • \r
"}}, + {"Controller.captureKeyEvents":{"prefix":"Controller.captureKeyEvents","body":["Controller.captureKeyEvents(${1:event: KeyEvent})"],"description":"Disable default Interface actions for a particular key event."}}, + {"Controller.releaseKeyEvents":{"prefix":"Controller.releaseKeyEvents","body":["Controller.releaseKeyEvents(${1:event: KeyEvent})"],"description":"Re-enable default Interface actions for a particular key event that has been disabled using \r{@link Controller.captureKeyEvents|captureKeyEvents}."}}, + {"Controller.captureJoystick":{"prefix":"Controller.captureJoystick","body":["Controller.captureJoystick(${1:joystickID: number})"],"description":"Disable default Interface actions for a joystick."}}, + {"Controller.releaseJoystick":{"prefix":"Controller.releaseJoystick","body":["Controller.releaseJoystick(${1:joystickID: number})"],"description":"Re-enable default Interface actions for a joystick that has been disabled using \r{@link Controller.captureJoystick|captureJoystick}."}}, + {"Controller.captureEntityClickEvents":{"prefix":"Controller.captureEntityClickEvents","body":["Controller.captureEntityClickEvents"],"description":"Disable {@link Entities.mousePressOnEntity} and {@link Entities.mouseDoublePressOnEntity} events on entities."}}, + {"Controller.releaseEntityClickEvents":{"prefix":"Controller.releaseEntityClickEvents","body":["Controller.releaseEntityClickEvents"],"description":"Re-enable {@link Entities.mousePressOnEntity} and {@link Entities.mouseDoublePressOnEntity} events on entities that were \rdisabled using {@link Controller.captureEntityClickEvents|captureEntityClickEvents}."}}, + {"Controller.getViewportDimensions":{"prefix":"Controller.getViewportDimensions","body":["Controller.getViewportDimensions"],"description":"Get the dimensions of the Interface window's interior if in desktop mode or the HUD surface if in HMD mode."}}, + {"Controller.getRecommendedHUDRect":{"prefix":"Controller.getRecommendedHUDRect","body":["Controller.getRecommendedHUDRect"],"description":"Get the recommended area to position UI on the HUD surface if in HMD mode or Interface's window interior if in desktop \rmode."}}, + {"Controller.setVPadEnabled":{"prefix":"Controller.setVPadEnabled","body":["Controller.setVPadEnabled(${1:enable: boolean})"],"description":"Enables or disables the virtual game pad that is displayed on certain devices (e.g., Android)."}}, + {"Controller.setVPadHidden":{"prefix":"Controller.setVPadHidden","body":["Controller.setVPadHidden(${1:hidden: boolean})"],"description":"Shows or hides the virtual game pad that is displayed on certain devices (e.g., Android)."}}, + {"Controller.setVPadExtraBottomMargin":{"prefix":"Controller.setVPadExtraBottomMargin","body":["Controller.setVPadExtraBottomMargin(${1:margin: number})"],"description":"Sets the amount of extra margin between the virtual game pad that is displayed on certain devices (e.g., Android) and \rthe bottom of the display."}}, + {"Controller.keyPressEvent":{"prefix":"Controller.keyPressEvent","body":["Controller.keyPressEvent(${1:event: KeyEvent})"],"description":"Triggered when a keyboard key is pressed."}}, + {"Controller.keyReleaseEvent":{"prefix":"Controller.keyReleaseEvent","body":["Controller.keyReleaseEvent(${1:event: KeyEvent})"],"description":"Triggered when a keyboard key is released from being pressed."}}, + {"Controller.mouseMoveEvent":{"prefix":"Controller.mouseMoveEvent","body":["Controller.mouseMoveEvent(${1:event: MouseEvent})"],"description":"Triggered when the mouse moves."}}, + {"Controller.mousePressEvent":{"prefix":"Controller.mousePressEvent","body":["Controller.mousePressEvent(${1:event: MouseEvent})"],"description":"Triggered when a mouse button is pressed."}}, + {"Controller.mouseDoublePressEvent":{"prefix":"Controller.mouseDoublePressEvent","body":["Controller.mouseDoublePressEvent(${1:event: MouseEvent})"],"description":"Triggered when a mouse button is double-pressed."}}, + {"Controller.mouseReleaseEvent":{"prefix":"Controller.mouseReleaseEvent","body":["Controller.mouseReleaseEvent(${1:event: MouseEvent})"],"description":"Triggered when a mouse button is released from being pressed."}}, + {"Controller.touchBeginEvent":{"prefix":"Controller.touchBeginEvent","body":["Controller.touchBeginEvent(${1:event: TouchEvent})"],"description":"Triggered when a touch event starts in the Interface window on a touch-enabled display or device."}}, + {"Controller.touchEndEvent":{"prefix":"Controller.touchEndEvent","body":["Controller.touchEndEvent(${1:event: TouchEvent})"],"description":"Triggered when a touch event ends in the Interface window on a touch-enabled display or device."}}, + {"Controller.touchUpdateEvent":{"prefix":"Controller.touchUpdateEvent","body":["Controller.touchUpdateEvent(${1:event: TouchEvent})"],"description":"Triggered when a touch event update occurs in the Interface window on a touch-enabled display or device."}}, + {"Controller.wheelEvent":{"prefix":"Controller.wheelEvent","body":["Controller.wheelEvent(${1:event: WheelEvent})"],"description":"Triggered when the mouse wheel is rotated."}}, + {"Desktop":{"prefix":"Desktop","body":["Desktop"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"GooglePoly":{"prefix":"GooglePoly","body":["GooglePoly"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The GooglePoly API allows you to interact with Google Poly models direct from inside High Fidelity."}}, + {"GooglePoly.setAPIKey":{"prefix":"GooglePoly.setAPIKey","body":["GooglePoly.setAPIKey(${1:key: string})"]}}, + {"GooglePoly.getAssetList":{"prefix":"GooglePoly.getAssetList","body":["GooglePoly.getAssetList(${1:keyword: string},${2:category: string},${3:format: string})"]}}, + {"GooglePoly.getFBX":{"prefix":"GooglePoly.getFBX","body":["GooglePoly.getFBX(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getOBJ":{"prefix":"GooglePoly.getOBJ","body":["GooglePoly.getOBJ(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getBlocks":{"prefix":"GooglePoly.getBlocks","body":["GooglePoly.getBlocks(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getGLTF":{"prefix":"GooglePoly.getGLTF","body":["GooglePoly.getGLTF(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getGLTF2":{"prefix":"GooglePoly.getGLTF2","body":["GooglePoly.getGLTF2(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getTilt":{"prefix":"GooglePoly.getTilt","body":["GooglePoly.getTilt(${1:keyword: string},${2:category: string})"]}}, + {"GooglePoly.getModelInfo":{"prefix":"GooglePoly.getModelInfo","body":["GooglePoly.getModelInfo(${1:input: string})"]}}, + {"HMD":{"prefix":"HMD","body":["HMD"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The HMD API provides access to the HMD used in VR display mode."}}, + {"HMD.calculateRayUICollisionPoint":{"prefix":"HMD.calculateRayUICollisionPoint","body":["HMD.calculateRayUICollisionPoint(${1:position: Vec3},${2:direction: Vec3})"],"description":"Calculate the intersection of a ray with the HUD overlay."}}, + {"HMD.overlayFromWorldPoint":{"prefix":"HMD.overlayFromWorldPoint","body":["HMD.overlayFromWorldPoint(${1:position: Vec3})"],"description":"Get the 2D HUD overlay coordinates of a 3D point on the HUD overlay.\r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay."}}, + {"HMD.worldPointFromOverlay":{"prefix":"HMD.worldPointFromOverlay","body":["HMD.worldPointFromOverlay(${1:coordinates: Vec2})"],"description":"Get the 3D world coordinates of a 2D point on the HUD overlay.\r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay."}}, + {"HMD.sphericalToOverlay":{"prefix":"HMD.sphericalToOverlay","body":["HMD.sphericalToOverlay(${1:sphericalPos: Vec2})"],"description":"Get the 2D point on the HUD overlay represented by given spherical coordinates. \r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.\rSpherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD \roverlay."}}, + {"HMD.overlayToSpherical":{"prefix":"HMD.overlayToSpherical","body":["HMD.overlayToSpherical(${1:overlayPos: Vec2})"],"description":"Get the spherical coordinates of a 2D point on the HUD overlay.\r2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.\rSpherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD\roverlay."}}, + {"HMD.centerUI":{"prefix":"HMD.centerUI","body":["HMD.centerUI"],"description":"Recenter the HMD HUD to the current HMD position and orientation."}}, + {"HMD.preferredAudioInput":{"prefix":"HMD.preferredAudioInput","body":["HMD.preferredAudioInput"],"description":"Get the name of the HMD audio input device."}}, + {"HMD.preferredAudioOutput":{"prefix":"HMD.preferredAudioOutput","body":["HMD.preferredAudioOutput"],"description":"Get the name of the HMD audio output device."}}, + {"HMD.isHMDAvailable":{"prefix":"HMD.isHMDAvailable","body":["HMD.isHMDAvailable(${1:name: string})"],"description":"Check whether there is an HMD available."}}, + {"HMD.isHeadControllerAvailable":{"prefix":"HMD.isHeadControllerAvailable","body":["HMD.isHeadControllerAvailable(${1:name: string})"],"description":"Check whether there is an HMD head controller available."}}, + {"HMD.isHandControllerAvailable":{"prefix":"HMD.isHandControllerAvailable","body":["HMD.isHandControllerAvailable(${1:name: string})"],"description":"Check whether there are HMD hand controllers available."}}, + {"HMD.isSubdeviceContainingNameAvailable":{"prefix":"HMD.isSubdeviceContainingNameAvailable","body":["HMD.isSubdeviceContainingNameAvailable(${1:name: string})"],"description":"Check whether there are specific HMD controllers available."}}, + {"HMD.requestShowHandControllers":{"prefix":"HMD.requestShowHandControllers","body":["HMD.requestShowHandControllers"],"description":"Signal that models of the HMD hand controllers being used should be displayed. The models are displayed at their actual, \rreal-world locations."}}, + {"HMD.requestHideHandControllers":{"prefix":"HMD.requestHideHandControllers","body":["HMD.requestHideHandControllers"],"description":"Signal that it is no longer necessary to display models of the HMD hand controllers being used. If no other scripts \rwant the models displayed then they are no longer displayed."}}, + {"HMD.shouldShowHandControllers":{"prefix":"HMD.shouldShowHandControllers","body":["HMD.shouldShowHandControllers"],"description":"Check whether any script wants models of the HMD hand controllers displayed. Requests are made and canceled using \r{@link HMD.requestShowHandControllers|requestShowHandControllers} and \r{@link HMD.requestHideHandControllers|requestHideHandControllers}."}}, + {"HMD.activateHMDHandMouse":{"prefix":"HMD.activateHMDHandMouse","body":["HMD.activateHMDHandMouse"],"description":"Causes the borders in HUD windows to be enlarged when the laser intersects them in HMD mode. By default, borders are not \renlarged."}}, + {"HMD.deactivateHMDHandMouse":{"prefix":"HMD.deactivateHMDHandMouse","body":["HMD.deactivateHMDHandMouse"],"description":"Causes the border in HUD windows to no longer be enlarged when the laser intersects them in HMD mode. By default, \rborders are not enlarged."}}, + {"HMD.suppressKeyboard":{"prefix":"HMD.suppressKeyboard","body":["HMD.suppressKeyboard"],"description":"Suppress the activation of the HMD-provided keyboard, if any. Successful calls should be balanced with a call to \r{@link HMD.unspressKeyboard|unspressKeyboard} within a reasonable amount of time."}}, + {"HMD.unsuppressKeyboard":{"prefix":"HMD.unsuppressKeyboard","body":["HMD.unsuppressKeyboard"],"description":"Unsuppress the activation of the HMD-provided keyboard, if any."}}, + {"HMD.isKeyboardVisible":{"prefix":"HMD.isKeyboardVisible","body":["HMD.isKeyboardVisible"],"description":"Check whether the HMD-provided keyboard, if any, is visible."}}, + {"HMD.closeTablet":{"prefix":"HMD.closeTablet","body":["HMD.closeTablet"],"description":"Closes the tablet if it is open."}}, + {"HMD.openTablet":{"prefix":"HMD.openTablet","body":["HMD.openTablet(${1:contextualMode: boolean})"],"description":"Opens the tablet if the tablet is used in the current display mode and it isn't already showing, and sets the tablet to \rcontextual mode if requested. In contextual mode, the page displayed on the tablet is wholly controlled by script (i.e., \rthe user cannot navigate to another)."}}, + {"HMD.shouldShowHandControllersChanged":{"prefix":"HMD.shouldShowHandControllersChanged","body":["HMD.shouldShowHandControllersChanged"],"description":"Triggered when a request to show or hide models of the HMD hand controllers is made using \r{@link HMD.requestShowHandControllers|requestShowHandControllers} or\r{@link HMD.requestHideHandControllers|requestHideHandControllers}."}}, + {"Menu":{"prefix":"Menu","body":["Menu"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Menu API provides access to the menu that is displayed at the top of the window\ron a user's desktop and in the tablet when the \"MENU\" button is pressed.\r\r

\r\r

Groupings

\r\rA \"grouping\" provides a way to group a set of menus or menu items together so \rthat they can all be set visible or invisible as a group. \rThere are two available groups: \"Advanced\" and \"Developer\".\rThese groupings can be toggled in the \"Settings\" menu.\rIf a menu item doesn't belong to a group it is always displayed."}}, + {"Menu.addMenu":{"prefix":"Menu.addMenu","body":["Menu.addMenu(${1:menuName: string},${2:grouping: string})"],"description":"Add a new top-level menu."}}, + {"Menu.removeMenu":{"prefix":"Menu.removeMenu","body":["Menu.removeMenu(${1:menuName: string})"],"description":"Remove a top-level menu."}}, + {"Menu.menuExists":{"prefix":"Menu.menuExists","body":["Menu.menuExists(${1:menuName: string})"],"description":"Check whether a top-level menu exists."}}, + {"Menu.addSeparator":{"prefix":"Menu.addSeparator","body":["Menu.addSeparator(${1:menuName: string},${2:separatorName: string})"],"description":"Add a separator with an unclickable label below it. The separator will be placed at the bottom of the menu.\rIf you want to add a separator at a specific point in the menu, use {@link Menu.addMenuItem} with\r{@link Menu.MenuItemProperties} instead."}}, + {"Menu.removeSeparator":{"prefix":"Menu.removeSeparator","body":["Menu.removeSeparator(${1:menuName: string},${2:separatorName: string})"],"description":"Remove a separator from a menu."}}, + {"Menu.addMenuItem":{"prefix":"Menu.addMenuItem","body":["Menu.addMenuItem(${1:properties: Menu.MenuItemProperties})"],"description":"Add a new menu item to a menu."}}, + {"Menu.addMenuItem":{"prefix":"Menu.addMenuItem","body":["Menu.addMenuItem(${1:menuName: string},${2:menuItem: string},${3:shortcutKey: string})"],"description":"Add a new menu item to a menu. The new item is added at the end of the menu."}}, + {"Menu.removeMenuItem":{"prefix":"Menu.removeMenuItem","body":["Menu.removeMenuItem(${1:menuName: string},${2:menuItem: string})"],"description":"Remove a menu item from a menu."}}, + {"Menu.menuItemExists":{"prefix":"Menu.menuItemExists","body":["Menu.menuItemExists(${1:menuName: string},${2:menuItem: string})"],"description":"Check if a menu item exists."}}, + {"Menu.isOptionChecked":{"prefix":"Menu.isOptionChecked","body":["Menu.isOptionChecked(${1:menuOption: string})"],"description":"Check whether a checkable menu item is checked."}}, + {"Menu.setIsOptionChecked":{"prefix":"Menu.setIsOptionChecked","body":["Menu.setIsOptionChecked(${1:menuOption: string},${2:isChecked: boolean})"],"description":"Set a checkable menu item as checked or unchecked."}}, + {"Menu.triggerOption":{"prefix":"Menu.triggerOption","body":["Menu.triggerOption(${1:menuOption: string})"],"description":"Trigger the menu item as if the user clicked on it."}}, + {"Menu.isMenuEnabled":{"prefix":"Menu.isMenuEnabled","body":["Menu.isMenuEnabled(${1:menuName: string})"],"description":"Check whether a menu or menu item is enabled. If disabled, the item is grayed out and unusable.\rMenus are enabled by default."}}, + {"Menu.setMenuEnabled":{"prefix":"Menu.setMenuEnabled","body":["Menu.setMenuEnabled(${1:menuName: string},${2:isEnabled: boolean})"],"description":"Set a menu or menu item to be enabled or disabled. If disabled, the item is grayed out and unusable."}}, + {"Menu.menuItemEvent":{"prefix":"Menu.menuItemEvent","body":["Menu.menuItemEvent(${1:menuItem: string})"],"description":"Triggered when a menu item is clicked (or triggered by {@link Menu.triggerOption})."}}, + {"Selection.ItemType":{"prefix":"Selection.ItemType","body":["Selection.ItemType"],"description":"\r \r \r \r \r \r \r \r \r
ValueDescription
\"avatar\"
\"entity\"
\"overlay\"
"}}, + {"Selection.SelectedItemsList":{"prefix":"Selection.SelectedItemsList","body":["Selection.SelectedItemsList"]}}, + {"Selection.HighlightStyle":{"prefix":"Selection.HighlightStyle","body":["Selection.HighlightStyle"]}}, + {"Selection":{"prefix":"Selection","body":["Selection"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Selection API provides a means of grouping together avatars, entities, and overlays in named lists."}}, + {"Selection.getListNames":{"prefix":"Selection.getListNames","body":["Selection.getListNames"],"description":"Get the names of all the selection lists."}}, + {"Selection.removeListFromMap":{"prefix":"Selection.removeListFromMap","body":["Selection.removeListFromMap(${1:listName: string})"],"description":"Delete a named selection list."}}, + {"Selection.addToSelectedItemsList":{"prefix":"Selection.addToSelectedItemsList","body":["Selection.addToSelectedItemsList(${1:listName: string},${2:itemType: Selection.ItemType},${3:id: Uuid})"],"description":"Add an item to a selection list."}}, + {"Selection.removeFromSelectedItemsList":{"prefix":"Selection.removeFromSelectedItemsList","body":["Selection.removeFromSelectedItemsList(${1:listName: string},${2:itemType: Selection.ItemType},${3:id: Uuid})"],"description":"Remove an item from a selection list."}}, + {"Selection.clearSelectedItemsList":{"prefix":"Selection.clearSelectedItemsList","body":["Selection.clearSelectedItemsList(${1:listName: string})"],"description":"Remove all items from a selection."}}, + {"Selection.printList":{"prefix":"Selection.printList","body":["Selection.printList(${1:listName: string})"],"description":"Print out the list of avatars, entities, and overlays in a selection to the debug log (not the script log)."}}, + {"Selection.getSelectedItemsList":{"prefix":"Selection.getSelectedItemsList","body":["Selection.getSelectedItemsList(${1:listName: string})"],"description":"Get the list of avatars, entities, and overlays stored in a selection list."}}, + {"Selection.getHighlightedListNames":{"prefix":"Selection.getHighlightedListNames","body":["Selection.getHighlightedListNames"],"description":"Get the names of the highlighted selection lists."}}, + {"Selection.enableListHighlight":{"prefix":"Selection.enableListHighlight","body":["Selection.enableListHighlight(${1:listName: string},${2:highlightStyle: Selection.HighlightStyle})"],"description":"Enable highlighting for a selection list.\rIf the selection list doesn't exist, it will be created.\rAll objects in the list will be displayed with the highlight effect specified.\rThe function can be called several times with different values in the style to modify it.
\rNote: This function implicitly calls {@link Selection.enableListToScene}."}}, + {"Selection.disableListHighlight":{"prefix":"Selection.disableListHighlight","body":["Selection.disableListHighlight(${1:listName: string})"],"description":"Disable highlighting for the selection list.\rIf the selection list doesn't exist or wasn't enabled for highlighting then nothing happens and false is\rreturned.
\rNote: This function implicitly calls {@link Selection.disableListToScene}."}}, + {"Selection.enableListToScene":{"prefix":"Selection.enableListToScene","body":["Selection.enableListToScene(${1:listName: string})"],"description":"Enable scene selection for the selection list.\rIf the Selection doesn't exist, it will be created.\rAll objects in the list will be sent to a scene selection."}}, + {"Selection.disableListToScene":{"prefix":"Selection.disableListToScene","body":["Selection.disableListToScene(${1:listName: string})"],"description":"Disable scene selection for the named selection.\rIf the selection list doesn't exist or wasn't enabled on the scene then nothing happens and false is\rreturned."}}, + {"Selection.getListHighlightStyle":{"prefix":"Selection.getListHighlightStyle","body":["Selection.getListHighlightStyle(${1:listName: string})"],"description":"Get the highlight style values for the a selection list.\rIf the selection doesn't exist or hasn't been highlight enabled yet, an empty object is returned."}}, + {"Selection.selectedItemsListChanged":{"prefix":"Selection.selectedItemsListChanged","body":["Selection.selectedItemsListChanged(${1:listName: string})"],"description":"Triggered when a list's content changes."}}, + {"Settings":{"prefix":"Settings","body":["Settings"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Settings API provides a facility to store and retrieve values that persist between Interface runs."}}, + {"Settings.getValue":{"prefix":"Settings.getValue","body":["Settings.getValue(${1:key: string},${2:defaultValue: string})"],"description":"Retrieve the value from a named setting."}}, + {"Settings.setValue":{"prefix":"Settings.setValue","body":["Settings.setValue(${1:key: string},${2:value: string})"],"description":"Store a value in a named setting. If the setting already exists its value is overwritten, otherwise a new setting is \rcreated. If the value is set to null or undefined, the setting is deleted."}}, + {"Test.quit":{"prefix":"Test.quit","body":["Test.quit"],"description":"Exits the application"}}, + {"Test.waitForTextureIdle":{"prefix":"Test.waitForTextureIdle","body":["Test.waitForTextureIdle"],"description":"Waits for all texture transfers to be complete"}}, + {"Test.waitForDownloadIdle":{"prefix":"Test.waitForDownloadIdle","body":["Test.waitForDownloadIdle"],"description":"Waits for all pending downloads to be complete"}}, + {"Test.waitForProcessingIdle":{"prefix":"Test.waitForProcessingIdle","body":["Test.waitForProcessingIdle"],"description":"Waits for all file parsing operations to be complete"}}, + {"Test.waitIdle":{"prefix":"Test.waitIdle","body":["Test.waitIdle"],"description":"Waits for all pending downloads, parsing and texture transfers to be complete"}}, + {"Test.waitForConnection":{"prefix":"Test.waitForConnection","body":["Test.waitForConnection(${1:maxWaitMs: int})"],"description":"Waits for establishment of connection to server"}}, + {"Test.wait":{"prefix":"Test.wait","body":["Test.wait(${1:milliseconds: int})"],"description":"Waits a specific number of milliseconds"}}, + {"Test.loadTestScene":{"prefix":"Test.loadTestScene","body":["Test.loadTestScene(${1:sceneFile: string})"],"description":"Waits for all pending downloads, parsing and texture transfers to be complete"}}, + {"Test.clear":{"prefix":"Test.clear","body":["Test.clear"],"description":"Clears all caches"}}, + {"Test.startTracing":{"prefix":"Test.startTracing","body":["Test.startTracing(${1:logrules: string})"],"description":"Start recording Chrome compatible tracing events\rlogRules can be used to specify a set of logging category rules to limit what gets captured"}}, + {"Test.stopTracing":{"prefix":"Test.stopTracing","body":["Test.stopTracing(${1:filename: string})"],"description":"Stop recording Chrome compatible tracing events and serialize recorded events to a file\rUsing a filename with a .gz extension will automatically compress the output file"}}, + {"Test.startTraceEvent":{"prefix":"Test.startTraceEvent","body":["Test.startTraceEvent(${1:name: string})"],"description":"Starts a specific trace event"}}, + {"Test.endTraceEvent":{"prefix":"Test.endTraceEvent","body":["Test.endTraceEvent(${1:filename: string})"],"description":"Stop a specific name event\rUsing a filename with a .gz extension will automatically compress the output file"}}, + {"Test.savePhysicsSimulationStats":{"prefix":"Test.savePhysicsSimulationStats","body":["Test.savePhysicsSimulationStats(${1:filename: string})"],"description":"Write detailed timing stats of next physics stepSimulation() to filename"}}, + {"Test.savePhysicsSimulationStats":{"prefix":"Test.savePhysicsSimulationStats","body":["Test.savePhysicsSimulationStats(${1:name: string},${2:function: function})"],"description":"Profiles a specific function"}}, + {"Test.clearCaches":{"prefix":"Test.clearCaches","body":["Test.clearCaches"],"description":"Clear all caches (menu command Reload Content)"}}, + {"Test.saveObject":{"prefix":"Test.saveObject","body":["Test.saveObject(${1:name: string},${2:filename: string})"],"description":"Save a JSON object to a file in the test results location"}}, + {"Test.showMaximized":{"prefix":"Test.showMaximized","body":["Test.showMaximized"],"description":"Maximizes the window"}}, + {"Test.setOtherAvatarsReplicaCount":{"prefix":"Test.setOtherAvatarsReplicaCount","body":["Test.setOtherAvatarsReplicaCount(${1:count: number})"],"description":"Values higher than 0 will create replicas of other-avatars when entering a domain for testing purpouses"}}, + {"Test.getOtherAvatarsReplicaCount":{"prefix":"Test.getOtherAvatarsReplicaCount","body":["Test.getOtherAvatarsReplicaCount"],"description":"Return the number of replicas that are being created of other-avatars when entering a domain"}}, + {"Wallet":{"prefix":"Wallet","body":["Wallet"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Wallet.refreshWalletStatus":{"prefix":"Wallet.refreshWalletStatus","body":["Wallet.refreshWalletStatus"]}}, + {"Wallet.getWalletStatus":{"prefix":"Wallet.getWalletStatus","body":["Wallet.getWalletStatus"]}}, + {"Wallet.proveAvatarEntityOwnershipVerification":{"prefix":"Wallet.proveAvatarEntityOwnershipVerification","body":["Wallet.proveAvatarEntityOwnershipVerification(${1:entityID: Uuid})"]}}, + {"Wallet.walletStatusChanged":{"prefix":"Wallet.walletStatusChanged","body":["Wallet.walletStatusChanged"]}}, + {"Wallet.walletNotSetup":{"prefix":"Wallet.walletNotSetup","body":["Wallet.walletNotSetup"]}}, + {"Wallet.ownershipVerificationSuccess":{"prefix":"Wallet.ownershipVerificationSuccess","body":["Wallet.ownershipVerificationSuccess(${1:entityID: Uuid})"]}}, + {"Wallet.ownershipVerificationFailed":{"prefix":"Wallet.ownershipVerificationFailed","body":["Wallet.ownershipVerificationFailed(${1:entityID: Uuid})"]}}, + {"Window.MessageBoxButton":{"prefix":"Window.MessageBoxButton","body":["Window.MessageBoxButton"],"description":"

The buttons that may be included in a message box created by {@link Window.openMessageBox|openMessageBox} are defined by\rnumeric values:\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ButtonValueDescription
NoButton 0x0 An invalid button.
Ok 0x400 \"OK\"
Save 0x800 \"Save\"
SaveAll 0x1000 \"Save All\"
Open 0x2000 \"Open\"
Yes 0x4000 \"Yes\"
YesToAll 0x8000 \"Yes to All\"
No 0x10000 \"No\"
NoToAll 0x20000 \"No to All\"
Abort 0x40000 \"Abort\"
Retry 0x80000 \"Retry\"
Ignore 0x100000 \"Ignore\"
Close 0x200000 \"Close\"
Cancel 0x400000 \"Cancel\"
Discard 0x800000 \"Discard\" or \"Don't Save\"
Help 0x1000000 \"Help\"
Apply 0x2000000 \"Apply\"
Reset 0x4000000 \"Reset\"
RestoreDefaults 0x8000000 \"Restore Defaults\"
"}}, + {"Window":{"prefix":"Window","body":["Window"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Window API provides various facilities not covered elsewhere: window dimensions, window focus, normal or entity camera\rview, clipboard, announcements, user connections, common dialog boxes, snapshots, file import, domain changes, domain \rphysics."}}, + {"Window.hasFocus":{"prefix":"Window.hasFocus","body":["Window.hasFocus"],"description":"Check if the Interface window has focus."}}, + {"Window.setFocus":{"prefix":"Window.setFocus","body":["Window.setFocus"],"description":"Make the Interface window have focus. On Windows, if Interface doesn't already have focus, the task bar icon flashes to \rindicate that Interface wants attention but focus isn't taken away from the application that the user is using."}}, + {"Window.raise":{"prefix":"Window.raise","body":["Window.raise"],"description":"Raise the Interface window if it is minimized. If raised, the window gains focus."}}, + {"Window.alert":{"prefix":"Window.alert","body":["Window.alert(${1:message: string})"],"description":"Display a dialog with the specified message and an \"OK\" button. The dialog is non-modal; the script continues without\rwaiting for a user response."}}, + {"Window.confirm":{"prefix":"Window.confirm","body":["Window.confirm(${1:message: string})"],"description":"Prompt the user to confirm something. Displays a modal dialog with a message plus \"Yes\" and \"No\" buttons.\rresponds."}}, + {"Window.prompt":{"prefix":"Window.prompt","body":["Window.prompt(${1:message: string},${2:defaultText: string})"],"description":"Prompt the user to enter some text. Displays a modal dialog with a message and a text box, plus \"OK\" and \"Cancel\" \rbuttons."}}, + {"Window.promptAsync":{"prefix":"Window.promptAsync","body":["Window.promptAsync(${1:message: string},${2:defaultText: string})"],"description":"Prompt the user to enter some text. Displays a non-modal dialog with a message and a text box, plus \"OK\" and \"Cancel\" \rbuttons. A {@link Window.promptTextChanged|promptTextChanged} signal is emitted when the user OKs the dialog; no signal \ris emitted if the user cancels the dialog."}}, + {"Window.browseDir":{"prefix":"Window.browseDir","body":["Window.browseDir(${1:title: string},${2:directory: string})"],"description":"Prompt the user to choose a directory. Displays a modal dialog that navigates the directory tree."}}, + {"Window.browseDirAsync":{"prefix":"Window.browseDirAsync","body":["Window.browseDirAsync(${1:title: string},${2:directory: string})"],"description":"Prompt the user to choose a directory. Displays a non-modal dialog that navigates the directory tree. A\r{@link Window.browseDirChanged|browseDirChanged} signal is emitted when a directory is chosen; no signal is emitted if\rthe user cancels the dialog."}}, + {"Window.browse":{"prefix":"Window.browse","body":["Window.browse(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to choose a file. Displays a modal dialog that navigates the directory tree."}}, + {"Window.browseAsync":{"prefix":"Window.browseAsync","body":["Window.browseAsync(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to choose a file. Displays a non-modal dialog that navigates the directory tree. A\r{@link Window.browseChanged|browseChanged} signal is emitted when a file is chosen; no signal is emitted if the user\rcancels the dialog."}}, + {"Window.save":{"prefix":"Window.save","body":["Window.save(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to specify the path and name of a file to save to. Displays a model dialog that navigates the directory\rtree and allows the user to type in a file name."}}, + {"Window.saveAsync":{"prefix":"Window.saveAsync","body":["Window.saveAsync(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to specify the path and name of a file to save to. Displays a non-model dialog that navigates the\rdirectory tree and allows the user to type in a file name. A {@link Window.saveFileChanged|saveFileChanged} signal is\remitted when a file is specified; no signal is emitted if the user cancels the dialog."}}, + {"Window.browseAssets":{"prefix":"Window.browseAssets","body":["Window.browseAssets(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to choose an Asset Server item. Displays a modal dialog that navigates the tree of assets on the Asset\rServer."}}, + {"Window.browseAssetsAsync":{"prefix":"Window.browseAssetsAsync","body":["Window.browseAssetsAsync(${1:title: string},${2:directory: string},${3:nameFilter: string})"],"description":"Prompt the user to choose an Asset Server item. Displays a non-modal dialog that navigates the tree of assets on the \rAsset Server. A {@link Window.assetsDirChanged|assetsDirChanged} signal is emitted when an asset is chosen; no signal is\remitted if the user cancels the dialog."}}, + {"Window.showAssetServer":{"prefix":"Window.showAssetServer","body":["Window.showAssetServer(${1:uploadFile: string})"],"description":"Open the Asset Browser dialog. If a file to upload is specified, the user is prompted to enter the folder and name to\rmap the file to on the asset server."}}, + {"Window.checkVersion":{"prefix":"Window.checkVersion","body":["Window.checkVersion"],"description":"Get Interface's build number."}}, + {"Window.protocolSignature":{"prefix":"Window.protocolSignature","body":["Window.protocolSignature"],"description":"Get the signature for Interface's protocol version."}}, + {"Window.copyToClipboard":{"prefix":"Window.copyToClipboard","body":["Window.copyToClipboard(${1:text: string})"],"description":"Copies text to the operating system's clipboard."}}, + {"Window.takeSnapshot":{"prefix":"Window.takeSnapshot","body":["Window.takeSnapshot(${1:notify: boolean},${2:includeAnimated: boolean},${3:aspectRatio: number},${4:filename: string})"],"description":"Takes a snapshot of the current Interface view from the primary camera. When a still image only is captured, \r{@link Window.stillSnapshotTaken|stillSnapshotTaken} is emitted; when a still image plus moving images are captured, \r{@link Window.processingGifStarted|processingGifStarted} and {@link Window.processingGifCompleted|processingGifCompleted}\rare emitted. The path to store the snapshots and the length of the animated GIF to capture are specified in Settings >\rGeneral > Snapshots.\r\rIf user has supplied a specific filename for the snapshot:\r If the user's requested filename has a suffix that's contained within SUPPORTED_IMAGE_FORMATS,\r DON'T append \".jpg\" to the filename. QT will save the image in the format associated with the\r filename's suffix.\r If you want lossless Snapshots, supply a `.png` filename. Otherwise, use `.jpeg` or `.jpg`.\r Otherwise, \".jpg\" is appended to the user's requested filename so that the image is saved in JPG format.\rIf the user hasn't supplied a specific filename for the snapshot:\r Save the snapshot in JPG format according to FILENAME_PATH_FORMAT"}}, + {"Window.takeSecondaryCameraSnapshot":{"prefix":"Window.takeSecondaryCameraSnapshot","body":["Window.takeSecondaryCameraSnapshot(${1:notify: boolean},${2:filename: string})"],"description":"Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API."}}, + {"Window.takeSecondaryCamera360Snapshot":{"prefix":"Window.takeSecondaryCamera360Snapshot","body":["Window.takeSecondaryCamera360Snapshot(${1:cameraPosition: Vec3},${2:cubemapOutputFormat: boolean},${3:notify: boolean},${4:filename: string})"],"description":"Takes a 360° snapshot at a given position for the secondary camera. The secondary camera does not need to have been \r set up."}}, + {"Window.makeConnection":{"prefix":"Window.makeConnection","body":["Window.makeConnection(${1:success: boolean},${2:description: string})"],"description":"Emit a {@link Window.connectionAdded|connectionAdded} or a {@link Window.connectionError|connectionError} signal that\rindicates whether or not a user connection was successfully made using the Web API."}}, + {"Window.displayAnnouncement":{"prefix":"Window.displayAnnouncement","body":["Window.displayAnnouncement(${1:message: string})"],"description":"Display a notification message. Notifications are displayed in panels by the default script, nofications.js. An\r{@link Window.announcement|announcement} signal is emitted when this function is called."}}, + {"Window.shareSnapshot":{"prefix":"Window.shareSnapshot","body":["Window.shareSnapshot(${1:path: string},${2:href: string})"],"description":"Prepare a snapshot ready for sharing. A {@link Window.snapshotShared|snapshotShared} signal is emitted when the snapshot\rhas been prepared."}}, + {"Window.isPhysicsEnabled":{"prefix":"Window.isPhysicsEnabled","body":["Window.isPhysicsEnabled"],"description":"Check to see if physics is active for you in the domain you're visiting - there is a delay between your arrival at a\rdomain and physics becoming active for you in that domain."}}, + {"Window.setDisplayTexture":{"prefix":"Window.setDisplayTexture","body":["Window.setDisplayTexture(${1:texture: Window.DisplayTexture})"],"description":"Set what to show on the PC display: normal view or entity camera view. The entity camera is configured using\r{@link Camera.setCameraEntity} and {@link Camera|Camera.mode}."}}, + {"Window.DisplayTexture":{"prefix":"Window.DisplayTexture","body":["Window.DisplayTexture"],"description":"

The views that may be displayed on the PC display.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueView Displayed
\"\"Normal view.
\"resource://spectatorCameraFrame\"Entity camera view.
"}}, + {"Window.isPointOnDesktopWindow":{"prefix":"Window.isPointOnDesktopWindow","body":["Window.isPointOnDesktopWindow(${1:point: Vec2})"],"description":"Check if a 2D point is within the desktop window if in desktop mode, or the drawable area of the HUD overlay if in HMD\rmode."}}, + {"Window.getDeviceSize":{"prefix":"Window.getDeviceSize","body":["Window.getDeviceSize"],"description":"Get the size of the drawable area of the Interface window if in desktop mode or the HMD rendering surface if in HMD mode."}}, + {"Window.getLastDomainConnectionError":{"prefix":"Window.getLastDomainConnectionError","body":["Window.getLastDomainConnectionError"],"description":"Gets the last domain connection error when a connection is refused."}}, + {"Window.openMessageBox":{"prefix":"Window.openMessageBox","body":["Window.openMessageBox(${1:title: string},${2:text: string},${3:buttons: Window.MessageBoxButton},${4:defaultButton: Window.MessageBoxButton})"],"description":"Open a non-modal message box that can have a variety of button combinations. See also, \r{@link Window.updateMessageBox|updateMessageBox} and {@link Window.closeMessageBox|closeMessageBox}."}}, + {"Window.openUrl":{"prefix":"Window.openUrl","body":["Window.openUrl(${1:url: string})"],"description":"Open a URL in the Interface window or other application, depending on the URL's scheme. If the URL starts with \rhifi:// then that URL is navigated to in Interface, otherwise the URL is opened in the application the OS \rassociates with the URL's scheme (e.g., a Web browser for http://)."}}, + {"Window.openAndroidActivity":{"prefix":"Window.openAndroidActivity","body":["Window.openAndroidActivity(${1:activityName: string},${2:backToScene: boolean})"],"description":"Open an Android activity and optionally return back to the scene when the activity is completed. Android only."}}, + {"Window.updateMessageBox":{"prefix":"Window.updateMessageBox","body":["Window.updateMessageBox(${1:id: number},${2:title: string},${3:text: string},${4:buttons: Window.MessageBoxButton},${5:defaultButton: Window.MessageBoxButton})"],"description":"Update the content of a message box that was opened with {@link Window.openMessageBox|openMessageBox}."}}, + {"Window.closeMessageBox":{"prefix":"Window.closeMessageBox","body":["Window.closeMessageBox(${1:id: number})"],"description":"Close a message box that was opened with {@link Window.openMessageBox|openMessageBox}."}}, + {"Window.domainChanged":{"prefix":"Window.domainChanged","body":["Window.domainChanged(${1:domainURL: string})"],"description":"Triggered when you change the domain you're visiting. Warning: Is not emitted if you go to a domain \rthat isn't running."}}, + {"Window.svoImportRequested":{"prefix":"Window.svoImportRequested","body":["Window.svoImportRequested(${1:url: string})"],"description":"Triggered when you try to navigate to a *.json, *.svo, or *.svo.json URL in a Web browser within Interface."}}, + {"Window.domainConnectionRefused":{"prefix":"Window.domainConnectionRefused","body":["Window.domainConnectionRefused(${1:reasonMessage: string},${2:reasonCode: Window.ConnectionRefusedReason},${3:extraInfo: string})"],"description":"Triggered when you try to visit a domain but are refused connection."}}, + {"Window.redirectErrorStateChanged":{"prefix":"Window.redirectErrorStateChanged","body":["Window.redirectErrorStateChanged(${1:isInErrorState: boolean})"],"description":"Triggered when you try to visit a domain but are redirected into the error state."}}, + {"Window.stillSnapshotTaken":{"prefix":"Window.stillSnapshotTaken","body":["Window.stillSnapshotTaken(${1:pathStillSnapshot: string},${2:notify: boolean})"],"description":"Triggered when a still snapshot has been taken by calling {@link Window.takeSnapshot|takeSnapshot} with \r includeAnimated = false or {@link Window.takeSecondaryCameraSnapshot|takeSecondaryCameraSnapshot}."}}, + {"Window.snapshot360Taken":{"prefix":"Window.snapshot360Taken","body":["Window.snapshot360Taken(${1:pathStillSnapshot: string},${2:notify: boolean})"],"description":"Triggered when a still 360° snapshot has been taken by calling \r {@link Window.takeSecondaryCamera360Snapshot|takeSecondaryCamera360Snapshot}."}}, + {"Window.snapshotShared":{"prefix":"Window.snapshotShared","body":["Window.snapshotShared(${1:isError: boolean},${2:reply: string})"],"description":"Triggered when a snapshot submitted via {@link Window.shareSnapshot|shareSnapshot} is ready for sharing. The snapshot\rmay then be shared via the {@link Account.metaverseServerURL} Web API."}}, + {"Window.processingGifStarted":{"prefix":"Window.processingGifStarted","body":["Window.processingGifStarted(${1:pathStillSnapshot: string})"],"description":"Triggered when the snapshot images have been captured by {@link Window.takeSnapshot|takeSnapshot} and the GIF is\r starting to be processed."}}, + {"Window.processingGifCompleted":{"prefix":"Window.processingGifCompleted","body":["Window.processingGifCompleted(${1:pathAnimatedSnapshot: string})"],"description":"Triggered when a GIF has been prepared of the snapshot images captured by {@link Window.takeSnapshot|takeSnapshot}."}}, + {"Window.connectionAdded":{"prefix":"Window.connectionAdded","body":["Window.connectionAdded(${1:message: string})"],"description":"Triggered when you've successfully made a user connection."}}, + {"Window.connectionError":{"prefix":"Window.connectionError","body":["Window.connectionError(${1:message: string})"],"description":"Triggered when you failed to make a user connection."}}, + {"Window.announcement":{"prefix":"Window.announcement","body":["Window.announcement(${1:message: string})"],"description":"Triggered when a message is announced by {@link Window.displayAnnouncement|displayAnnouncement}."}}, + {"Window.messageBoxClosed":{"prefix":"Window.messageBoxClosed","body":["Window.messageBoxClosed(${1:id: number},${2:button: number})"],"description":"Triggered when the user closes a message box that was opened with {@link Window.openMessageBox|openMessageBox}."}}, + {"Window.browseDirChanged":{"prefix":"Window.browseDirChanged","body":["Window.browseDirChanged(${1:directory: string})"],"description":"Triggered when the user chooses a directory in a {@link Window.browseDirAsync|browseDirAsync} dialog."}}, + {"Window.assetsDirChanged":{"prefix":"Window.assetsDirChanged","body":["Window.assetsDirChanged(${1:asset: string})"],"description":"Triggered when the user chooses an asset in a {@link Window.browseAssetsAsync|browseAssetsAsync} dialog."}}, + {"Window.saveFileChanged":{"prefix":"Window.saveFileChanged","body":["Window.saveFileChanged(${1:filename: string})"],"description":"Triggered when the user specifies a file in a {@link Window.saveAsync|saveAsync} dialog."}}, + {"Window.browseChanged":{"prefix":"Window.browseChanged","body":["Window.browseChanged(${1:filename: string})"],"description":"Triggered when the user chooses a file in a {@link Window.browseAsync|browseAsync} dialog."}}, + {"Window.promptTextChanged":{"prefix":"Window.promptTextChanged","body":["Window.promptTextChanged(${1:text: string})"],"description":"Triggered when the user OKs a {@link Window.promptAsync|promptAsync} dialog."}}, + {"Window.geometryChanged":{"prefix":"Window.geometryChanged","body":["Window.geometryChanged(${1:geometry: Rect})"],"description":"Triggered when the position or size of the Interface window changes."}}, + {"AvatarInputs":{"prefix":"AvatarInputs","body":["AvatarInputs"],"description":"
Available in:Interface ScriptsClient Entity Scripts

API to help manage your Avatar's input"}}, + {"AvatarInputs.loudnessToAudioLevel":{"prefix":"AvatarInputs.loudnessToAudioLevel","body":["AvatarInputs.loudnessToAudioLevel(${1:loudness: number})"]}}, + {"AvatarInputs.setShowAudioTools":{"prefix":"AvatarInputs.setShowAudioTools","body":["AvatarInputs.setShowAudioTools(${1:showAudioTools: boolean})"]}}, + {"AvatarInputs.cameraEnabledChanged":{"prefix":"AvatarInputs.cameraEnabledChanged","body":["AvatarInputs.cameraEnabledChanged"]}}, + {"AvatarInputs.cameraMutedChanged":{"prefix":"AvatarInputs.cameraMutedChanged","body":["AvatarInputs.cameraMutedChanged"]}}, + {"AvatarInputs.isHMDChanged":{"prefix":"AvatarInputs.isHMDChanged","body":["AvatarInputs.isHMDChanged"]}}, + {"AvatarInputs.showAudioToolsChanged":{"prefix":"AvatarInputs.showAudioToolsChanged","body":["AvatarInputs.showAudioToolsChanged(${1:show: boolean})"]}}, + {"AvatarInputs.resetSensors":{"prefix":"AvatarInputs.resetSensors","body":["AvatarInputs.resetSensors"]}}, + {"AvatarInputs.toggleCameraMute":{"prefix":"AvatarInputs.toggleCameraMute","body":["AvatarInputs.toggleCameraMute"]}}, + {"Snapshot":{"prefix":"Snapshot","body":["Snapshot"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Snapshot.snapshotLocationSet":{"prefix":"Snapshot.snapshotLocationSet","body":["Snapshot.snapshotLocationSet(${1:location: string})"]}}, + {"Snapshot.getSnapshotsLocation":{"prefix":"Snapshot.getSnapshotsLocation","body":["Snapshot.getSnapshotsLocation"]}}, + {"Snapshot.setSnapshotsLocation":{"prefix":"Snapshot.setSnapshotsLocation","body":["Snapshot.setSnapshotsLocation(${1:location: String})"]}}, + {"Stats":{"prefix":"Stats","body":["Stats"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Stats.longsubmitsChanged":{"prefix":"Stats.longsubmitsChanged","body":["Stats.longsubmitsChanged"],"description":"Triggered when the value of the longsubmits property changes."}}, + {"Stats.longrendersChanged":{"prefix":"Stats.longrendersChanged","body":["Stats.longrendersChanged"],"description":"Triggered when the value of the longrenders property changes."}}, + {"Stats.longframesChanged":{"prefix":"Stats.longframesChanged","body":["Stats.longframesChanged"],"description":"Triggered when the value of the longframes property changes."}}, + {"Stats.appdroppedChanged":{"prefix":"Stats.appdroppedChanged","body":["Stats.appdroppedChanged"],"description":"Triggered when the value of the appdropped property changes."}}, + {"Stats.expandedChanged":{"prefix":"Stats.expandedChanged","body":["Stats.expandedChanged"],"description":"Triggered when the value of the expanded property changes."}}, + {"Stats.timingExpandedChanged":{"prefix":"Stats.timingExpandedChanged","body":["Stats.timingExpandedChanged"],"description":"Triggered when the value of the timingExpanded property changes."}}, + {"Stats.serverCountChanged":{"prefix":"Stats.serverCountChanged","body":["Stats.serverCountChanged"],"description":"Triggered when the value of the serverCount property changes."}}, + {"Stats.renderrateChanged":{"prefix":"Stats.renderrateChanged","body":["Stats.renderrateChanged"],"description":"Triggered when the value of the renderrate property changes."}}, + {"Stats.presentrateChanged":{"prefix":"Stats.presentrateChanged","body":["Stats.presentrateChanged"],"description":"Triggered when the value of the presentrate property changes."}}, + {"Stats.presentnewrateChanged":{"prefix":"Stats.presentnewrateChanged","body":["Stats.presentnewrateChanged"],"description":"Triggered when the value of the presentnewrate property changes."}}, + {"Stats.presentdroprateChanged":{"prefix":"Stats.presentdroprateChanged","body":["Stats.presentdroprateChanged"],"description":"Triggered when the value of the presentdroprate property changes."}}, + {"Stats.stutterrateChanged":{"prefix":"Stats.stutterrateChanged","body":["Stats.stutterrateChanged"],"description":"Triggered when the value of the stutterrate property changes."}}, + {"Stats.gameLoopRateChanged":{"prefix":"Stats.gameLoopRateChanged","body":["Stats.gameLoopRateChanged"],"description":"Triggered when the value of the gameLoopRate property changes."}}, + {"Stats.numPhysicsBodiesChanged":{"prefix":"Stats.numPhysicsBodiesChanged","body":["Stats.numPhysicsBodiesChanged"],"description":"Trigered when"}}, + {"Stats.avatarCountChanged":{"prefix":"Stats.avatarCountChanged","body":["Stats.avatarCountChanged"],"description":"Triggered when the value of the avatarCount property changes."}}, + {"Stats.updatedAvatarCountChanged":{"prefix":"Stats.updatedAvatarCountChanged","body":["Stats.updatedAvatarCountChanged"],"description":"Triggered when the value of the updatedAvatarCount property changes."}}, + {"Stats.notUpdatedAvatarCountChanged":{"prefix":"Stats.notUpdatedAvatarCountChanged","body":["Stats.notUpdatedAvatarCountChanged"],"description":"Triggered when the value of the notUpdatedAvatarCount property changes."}}, + {"Stats.packetInCountChanged":{"prefix":"Stats.packetInCountChanged","body":["Stats.packetInCountChanged"],"description":"Triggered when the value of the packetInCount property changes."}}, + {"Stats.packetOutCountChanged":{"prefix":"Stats.packetOutCountChanged","body":["Stats.packetOutCountChanged"],"description":"Triggered when the value of the packetOutCount property changes."}}, + {"Stats.mbpsInChanged":{"prefix":"Stats.mbpsInChanged","body":["Stats.mbpsInChanged"],"description":"Triggered when the value of the mbpsIn property changes."}}, + {"Stats.mbpsOutChanged":{"prefix":"Stats.mbpsOutChanged","body":["Stats.mbpsOutChanged"],"description":"Triggered when the value of the mbpsOut property changes."}}, + {"Stats.assetMbpsInChanged":{"prefix":"Stats.assetMbpsInChanged","body":["Stats.assetMbpsInChanged"],"description":"Triggered when the value of the assetMbpsIn property changes."}}, + {"Stats.assetMbpsOutChanged":{"prefix":"Stats.assetMbpsOutChanged","body":["Stats.assetMbpsOutChanged"],"description":"Triggered when the value of the assetMbpsOut property changes."}}, + {"Stats.audioPingChanged":{"prefix":"Stats.audioPingChanged","body":["Stats.audioPingChanged"],"description":"Triggered when the value of the audioPing property changes."}}, + {"Stats.avatarPingChanged":{"prefix":"Stats.avatarPingChanged","body":["Stats.avatarPingChanged"],"description":"Triggered when the value of the avatarPing property changes."}}, + {"Stats.entitiesPingChanged":{"prefix":"Stats.entitiesPingChanged","body":["Stats.entitiesPingChanged"],"description":"Triggered when the value of the entitiesPing property changes."}}, + {"Stats.assetPingChanged":{"prefix":"Stats.assetPingChanged","body":["Stats.assetPingChanged"],"description":"Triggered when the value of the assetPing property changes."}}, + {"Stats.messagePingChanged":{"prefix":"Stats.messagePingChanged","body":["Stats.messagePingChanged"],"description":"Triggered when the value of the messagePing property changes."}}, + {"Stats.positionChanged":{"prefix":"Stats.positionChanged","body":["Stats.positionChanged"],"description":"Triggered when the value of the position property changes."}}, + {"Stats.speedChanged":{"prefix":"Stats.speedChanged","body":["Stats.speedChanged"],"description":"Triggered when the value of the speed property changes."}}, + {"Stats.yawChanged":{"prefix":"Stats.yawChanged","body":["Stats.yawChanged"],"description":"Triggered when the value of the yaw property changes."}}, + {"Stats.avatarMixerInKbpsChanged":{"prefix":"Stats.avatarMixerInKbpsChanged","body":["Stats.avatarMixerInKbpsChanged"],"description":"Triggered when the value of the avatarMixerInKbps property changes."}}, + {"Stats.avatarMixerInPpsChanged":{"prefix":"Stats.avatarMixerInPpsChanged","body":["Stats.avatarMixerInPpsChanged"],"description":"Triggered when the value of the avatarMixerInPps property changes."}}, + {"Stats.avatarMixerOutKbpsChanged":{"prefix":"Stats.avatarMixerOutKbpsChanged","body":["Stats.avatarMixerOutKbpsChanged"],"description":"Triggered when the value of the avatarMixerOutKbps property changes."}}, + {"Stats.avatarMixerOutPpsChanged":{"prefix":"Stats.avatarMixerOutPpsChanged","body":["Stats.avatarMixerOutPpsChanged"],"description":"Triggered when the value of the avatarMixerOutPps property changes."}}, + {"Stats.myAvatarSendRateChanged":{"prefix":"Stats.myAvatarSendRateChanged","body":["Stats.myAvatarSendRateChanged"],"description":"Triggered when the value of the myAvatarSendRate property changes."}}, + {"Stats.audioMixerInKbpsChanged":{"prefix":"Stats.audioMixerInKbpsChanged","body":["Stats.audioMixerInKbpsChanged"],"description":"Triggered when the value of the audioMixerInKbps property changes."}}, + {"Stats.audioMixerInPpsChanged":{"prefix":"Stats.audioMixerInPpsChanged","body":["Stats.audioMixerInPpsChanged"],"description":"Triggered when the value of the audioMixerInPps property changes."}}, + {"Stats.audioMixerOutKbpsChanged":{"prefix":"Stats.audioMixerOutKbpsChanged","body":["Stats.audioMixerOutKbpsChanged"],"description":"Triggered when the value of the audioMixerOutKbps property changes."}}, + {"Stats.audioMixerOutPpsChanged":{"prefix":"Stats.audioMixerOutPpsChanged","body":["Stats.audioMixerOutPpsChanged"],"description":"Triggered when the value of the audioMixerOutPps property changes."}}, + {"Stats.audioMixerKbpsChanged":{"prefix":"Stats.audioMixerKbpsChanged","body":["Stats.audioMixerKbpsChanged"],"description":"Triggered when the value of the audioMixerKbps property changes."}}, + {"Stats.audioMixerPpsChanged":{"prefix":"Stats.audioMixerPpsChanged","body":["Stats.audioMixerPpsChanged"],"description":"Triggered when the value of the audioMixerPps property changes."}}, + {"Stats.audioOutboundPPSChanged":{"prefix":"Stats.audioOutboundPPSChanged","body":["Stats.audioOutboundPPSChanged"],"description":"Triggered when the value of the audioOutboundPPS property changes."}}, + {"Stats.audioSilentOutboundPPSChanged":{"prefix":"Stats.audioSilentOutboundPPSChanged","body":["Stats.audioSilentOutboundPPSChanged"],"description":"Triggered when the value of the audioSilentOutboundPPS property changes."}}, + {"Stats.audioAudioInboundPPSChanged":{"prefix":"Stats.audioAudioInboundPPSChanged","body":["Stats.audioAudioInboundPPSChanged"],"description":"Triggered when the value of the audioAudioInboundPPS property changes."}}, + {"Stats.audioSilentInboundPPSChanged":{"prefix":"Stats.audioSilentInboundPPSChanged","body":["Stats.audioSilentInboundPPSChanged"],"description":"Triggered when the value of the audioSilentInboundPPS property changes."}}, + {"Stats.audioPacketLossChanged":{"prefix":"Stats.audioPacketLossChanged","body":["Stats.audioPacketLossChanged"],"description":"Triggered when the value of the audioPacketLoss property changes."}}, + {"Stats.audioCodecChanged":{"prefix":"Stats.audioCodecChanged","body":["Stats.audioCodecChanged"],"description":"Triggered when the value of the audioCodec property changes."}}, + {"Stats.audioNoiseGateChanged":{"prefix":"Stats.audioNoiseGateChanged","body":["Stats.audioNoiseGateChanged"],"description":"Triggered when the value of the audioNoiseGate property changes."}}, + {"Stats.entityPacketsInKbpsChanged":{"prefix":"Stats.entityPacketsInKbpsChanged","body":["Stats.entityPacketsInKbpsChanged"],"description":"Triggered when the value of the entityPacketsInKbps property changes."}}, + {"Stats.downloadsChanged":{"prefix":"Stats.downloadsChanged","body":["Stats.downloadsChanged"],"description":"Triggered when the value of the downloads property changes."}}, + {"Stats.downloadLimitChanged":{"prefix":"Stats.downloadLimitChanged","body":["Stats.downloadLimitChanged"],"description":"Triggered when the value of the downloadLimit property changes."}}, + {"Stats.downloadsPendingChanged":{"prefix":"Stats.downloadsPendingChanged","body":["Stats.downloadsPendingChanged"],"description":"Triggered when the value of the downloadsPending property changes."}}, + {"Stats.downloadUrlsChanged":{"prefix":"Stats.downloadUrlsChanged","body":["Stats.downloadUrlsChanged"],"description":"Triggered when the value of the downloadUrls property changes."}}, + {"Stats.processingChanged":{"prefix":"Stats.processingChanged","body":["Stats.processingChanged"],"description":"Triggered when the value of the processing property changes."}}, + {"Stats.processingPendingChanged":{"prefix":"Stats.processingPendingChanged","body":["Stats.processingPendingChanged"],"description":"Triggered when the value of the processingPending property changes."}}, + {"Stats.trianglesChanged":{"prefix":"Stats.trianglesChanged","body":["Stats.trianglesChanged"],"description":"Triggered when the value of the triangles property changes."}}, + {"Stats.drawcallsChanged":{"prefix":"Stats.drawcallsChanged","body":["Stats.drawcallsChanged"],"description":"Triggered when the value of the drawcalls property changes.\rThis"}}, + {"Stats.materialSwitchesChanged":{"prefix":"Stats.materialSwitchesChanged","body":["Stats.materialSwitchesChanged"],"description":"Triggered when the value of the materialSwitches property changes."}}, + {"Stats.itemConsideredChanged":{"prefix":"Stats.itemConsideredChanged","body":["Stats.itemConsideredChanged"],"description":"Triggered when the value of the itemConsidered property changes."}}, + {"Stats.itemOutOfViewChanged":{"prefix":"Stats.itemOutOfViewChanged","body":["Stats.itemOutOfViewChanged"],"description":"Triggered when the value of the itemOutOfView property changes."}}, + {"Stats.itemTooSmallChanged":{"prefix":"Stats.itemTooSmallChanged","body":["Stats.itemTooSmallChanged"],"description":"Triggered when the value of the itemTooSmall property changes."}}, + {"Stats.itemRenderedChanged":{"prefix":"Stats.itemRenderedChanged","body":["Stats.itemRenderedChanged"],"description":"Triggered when the value of the itemRendered property changes."}}, + {"Stats.shadowConsideredChanged":{"prefix":"Stats.shadowConsideredChanged","body":["Stats.shadowConsideredChanged"],"description":"Triggered when the value of the shadowConsidered property changes."}}, + {"Stats.shadowOutOfViewChanged":{"prefix":"Stats.shadowOutOfViewChanged","body":["Stats.shadowOutOfViewChanged"],"description":"Triggered when the value of the shadowOutOfView property changes."}}, + {"Stats.shadowTooSmallChanged":{"prefix":"Stats.shadowTooSmallChanged","body":["Stats.shadowTooSmallChanged"],"description":"Triggered when the value of the shadowTooSmall property changes."}}, + {"Stats.shadowRenderedChanged":{"prefix":"Stats.shadowRenderedChanged","body":["Stats.shadowRenderedChanged"],"description":"Triggered when the value of the shadowRendered property changes."}}, + {"Stats.sendingModeChanged":{"prefix":"Stats.sendingModeChanged","body":["Stats.sendingModeChanged"],"description":"Triggered when the value of the sendingMode property changes."}}, + {"Stats.packetStatsChanged":{"prefix":"Stats.packetStatsChanged","body":["Stats.packetStatsChanged"],"description":"Triggered when the value of the packetStats property changes."}}, + {"Stats.lodStatusChanged":{"prefix":"Stats.lodStatusChanged","body":["Stats.lodStatusChanged"],"description":"Triggered when the value of the lodStatus property changes."}}, + {"Stats.serverElementsChanged":{"prefix":"Stats.serverElementsChanged","body":["Stats.serverElementsChanged"],"description":"Triggered when the value of the serverElements property changes."}}, + {"Stats.serverInternalChanged":{"prefix":"Stats.serverInternalChanged","body":["Stats.serverInternalChanged"],"description":"Triggered when the value of the serverInternal property changes."}}, + {"Stats.serverLeavesChanged":{"prefix":"Stats.serverLeavesChanged","body":["Stats.serverLeavesChanged"],"description":"Triggered when the value of the serverLeaves property changes."}}, + {"Stats.localElementsChanged":{"prefix":"Stats.localElementsChanged","body":["Stats.localElementsChanged"],"description":"Triggered when the value of the localElements property changes."}}, + {"Stats.localInternalChanged":{"prefix":"Stats.localInternalChanged","body":["Stats.localInternalChanged"],"description":"Triggered when the value of the localInternal property changes."}}, + {"Stats.localLeavesChanged":{"prefix":"Stats.localLeavesChanged","body":["Stats.localLeavesChanged"],"description":"Triggered when the value of the localLeaves property changes."}}, + {"Stats.timingStatsChanged":{"prefix":"Stats.timingStatsChanged","body":["Stats.timingStatsChanged"],"description":"Triggered when the value of the timingStats property changes."}}, + {"Stats.gameUpdateStatsChanged":{"prefix":"Stats.gameUpdateStatsChanged","body":["Stats.gameUpdateStatsChanged"],"description":"Triggered when the value of the gameUpdateStats property changes."}}, + {"Stats.glContextSwapchainMemoryChanged":{"prefix":"Stats.glContextSwapchainMemoryChanged","body":["Stats.glContextSwapchainMemoryChanged"],"description":"Triggered when the value of the glContextSwapchainMemory property changes."}}, + {"Stats.qmlTextureMemoryChanged":{"prefix":"Stats.qmlTextureMemoryChanged","body":["Stats.qmlTextureMemoryChanged"],"description":"Triggered when the value of the qmlTextureMemory property changes."}}, + {"Stats.texturePendingTransfersChanged":{"prefix":"Stats.texturePendingTransfersChanged","body":["Stats.texturePendingTransfersChanged"],"description":"Triggered when the value of the texturePendingTransfers property changes."}}, + {"Stats.gpuBuffersChanged":{"prefix":"Stats.gpuBuffersChanged","body":["Stats.gpuBuffersChanged"],"description":"Triggered when the value of the gpuBuffers property changes."}}, + {"Stats.gpuBufferMemoryChanged":{"prefix":"Stats.gpuBufferMemoryChanged","body":["Stats.gpuBufferMemoryChanged"],"description":"Triggered when the value of the gpuBufferMemory property changes."}}, + {"Stats.gpuTexturesChanged":{"prefix":"Stats.gpuTexturesChanged","body":["Stats.gpuTexturesChanged"],"description":"Triggered when the value of the gpuTextures property changes."}}, + {"Stats.gpuTextureMemoryChanged":{"prefix":"Stats.gpuTextureMemoryChanged","body":["Stats.gpuTextureMemoryChanged"],"description":"Triggered when the value of the gpuTextureMemory property changes."}}, + {"Stats.gpuTextureResidentMemoryChanged":{"prefix":"Stats.gpuTextureResidentMemoryChanged","body":["Stats.gpuTextureResidentMemoryChanged"],"description":"Triggered when the value of the gpuTextureResidentMemory property changes."}}, + {"Stats.gpuTextureFramebufferMemoryChanged":{"prefix":"Stats.gpuTextureFramebufferMemoryChanged","body":["Stats.gpuTextureFramebufferMemoryChanged"],"description":"Triggered when the value of the gpuTextureFramebufferMemory property changes."}}, + {"Stats.gpuTextureResourceMemoryChanged":{"prefix":"Stats.gpuTextureResourceMemoryChanged","body":["Stats.gpuTextureResourceMemoryChanged"],"description":"Triggered when the value of the gpuTextureResourceMemory property changes."}}, + {"Stats.gpuTextureResourceIdealMemoryChanged":{"prefix":"Stats.gpuTextureResourceIdealMemoryChanged","body":["Stats.gpuTextureResourceIdealMemoryChanged"],"description":"Triggered when the value of the gpuTextureResourceIdealMemory property changes."}}, + {"Stats.gpuTextureResourcePopulatedMemoryChanged":{"prefix":"Stats.gpuTextureResourcePopulatedMemoryChanged","body":["Stats.gpuTextureResourcePopulatedMemoryChanged"],"description":"Triggered when the value of the gpuTextureResourcePopulatedMemory property changes."}}, + {"Stats.gpuTextureExternalMemoryChanged":{"prefix":"Stats.gpuTextureExternalMemoryChanged","body":["Stats.gpuTextureExternalMemoryChanged"],"description":"Triggered when the value of the gpuTextureExternalMemory property changes."}}, + {"Stats.gpuTextureMemoryPressureStateChanged":{"prefix":"Stats.gpuTextureMemoryPressureStateChanged","body":["Stats.gpuTextureMemoryPressureStateChanged"],"description":"Triggered when the value of the gpuTextureMemoryPressureState property changes."}}, + {"Stats.gpuFreeMemoryChanged":{"prefix":"Stats.gpuFreeMemoryChanged","body":["Stats.gpuFreeMemoryChanged"],"description":"Triggered when the value of the gpuFreeMemory property changes."}}, + {"Stats.gpuFrameTimeChanged":{"prefix":"Stats.gpuFrameTimeChanged","body":["Stats.gpuFrameTimeChanged"],"description":"Triggered when the value of the gpuFrameTime property changes."}}, + {"Stats.gpuFrameTimeChanged":{"prefix":"Stats.gpuFrameTimeChanged","body":["Stats.gpuFrameTimeChanged"],"description":"Triggered when the value of the gpuFrameTime property changes."}}, + {"Stats.gpuFrameTimeChanged":{"prefix":"Stats.gpuFrameTimeChanged","body":["Stats.gpuFrameTimeChanged"],"description":"Triggered when the value of the gpuFrameTime property changes."}}, + {"Stats.batchFrameTimeChanged":{"prefix":"Stats.batchFrameTimeChanged","body":["Stats.batchFrameTimeChanged"],"description":"Triggered when the value of the batchFrameTime property changes."}}, + {"Stats.engineFrameTimeChanged":{"prefix":"Stats.engineFrameTimeChanged","body":["Stats.engineFrameTimeChanged"],"description":"Triggered when the value of the engineFrameTime property changes."}}, + {"Stats.avatarSimulationTimeChanged":{"prefix":"Stats.avatarSimulationTimeChanged","body":["Stats.avatarSimulationTimeChanged"],"description":"Triggered when the value of the avatarSimulationTime property changes."}}, + {"Stats.rectifiedTextureCountChanged":{"prefix":"Stats.rectifiedTextureCountChanged","body":["Stats.rectifiedTextureCountChanged"],"description":"Triggered when the value of the rectifiedTextureCount property changes."}}, + {"Stats.decimatedTextureCountChanged":{"prefix":"Stats.decimatedTextureCountChanged","body":["Stats.decimatedTextureCountChanged"],"description":"Triggered when the value of the decimatedTextureCount property changes."}}, + {"Stats.parentChanged":{"prefix":"Stats.parentChanged","body":["Stats.parentChanged(${1:parent: object})"],"description":"Triggered when the parent item changes."}}, + {"Stats.xChanged":{"prefix":"Stats.xChanged","body":["Stats.xChanged"],"description":"Triggered when the value of the x property changes."}}, + {"Stats.yChanged":{"prefix":"Stats.yChanged","body":["Stats.yChanged"],"description":"Triggered when the value of the y property changes."}}, + {"Stats.zChanged":{"prefix":"Stats.zChanged","body":["Stats.zChanged"],"description":"Triggered when the value of the z property changes."}}, + {"Stats.widthChanged":{"prefix":"Stats.widthChanged","body":["Stats.widthChanged"],"description":"Triggered when the value of the width property changes."}}, + {"Stats.heightChanged":{"prefix":"Stats.heightChanged","body":["Stats.heightChanged"],"description":"Triggered when the value of the height property changes."}}, + {"Stats.opacityChanged":{"prefix":"Stats.opacityChanged","body":["Stats.opacityChanged"],"description":"Triggered when the value of the opacity property changes."}}, + {"Stats.enabledChanged":{"prefix":"Stats.enabledChanged","body":["Stats.enabledChanged"],"description":"Triggered when the value of the enabled property changes."}}, + {"Stats.visibleChanged":{"prefix":"Stats.visibleChanged","body":["Stats.visibleChanged"],"description":"Triggered when the value of the visibleChanged property changes."}}, + {"Stats.visibleChildrenChanged":{"prefix":"Stats.visibleChildrenChanged","body":["Stats.visibleChildrenChanged"],"description":"Triggered when the list of visible children changes."}}, + {"Stats.stateChanged":{"prefix":"Stats.stateChanged","body":["Stats.stateChanged"],"description":"Triggered when the value of the state property changes."}}, + {"Stats.childrenRectChanged":{"prefix":"Stats.childrenRectChanged","body":["Stats.childrenRectChanged(${1:childrenRect: Rect})"],"description":"Triggered when the position and size of the rectangle containing the children changes."}}, + {"Stats.baselineOffsetChanged":{"prefix":"Stats.baselineOffsetChanged","body":["Stats.baselineOffsetChanged(${1:baselineOffset: number})"],"description":"Triggered when the value of the baselineOffset property changes."}}, + {"Stats.clipChanged":{"prefix":"Stats.clipChanged","body":["Stats.clipChanged(${1:clip: boolean})"],"description":"Triggered when the value of the clip property changes."}}, + {"Stats.focusChanged":{"prefix":"Stats.focusChanged","body":["Stats.focusChanged(${1:focus: boolean})"],"description":"Triggered when the value of the focus property changes."}}, + {"Stats.activeFocusChanged":{"prefix":"Stats.activeFocusChanged","body":["Stats.activeFocusChanged(${1:activeFocus: boolean})"],"description":"Triggered when the value of the activeFocus property changes."}}, + {"Stats.activeFocusOnTabChanged":{"prefix":"Stats.activeFocusOnTabChanged","body":["Stats.activeFocusOnTabChanged(${1:activeFocusOnTab: boolean})"],"description":"Triggered when the value of the activeFocusOnTab property changes."}}, + {"Stats.rotationChanged":{"prefix":"Stats.rotationChanged","body":["Stats.rotationChanged"],"description":"Triggered when the value of the rotation property changes."}}, + {"Stats.scaleChanged":{"prefix":"Stats.scaleChanged","body":["Stats.scaleChanged"],"description":"Triggered when the value of the scaleChanged property changes."}}, + {"Stats.transformOriginChanged":{"prefix":"Stats.transformOriginChanged","body":["Stats.transformOriginChanged(${1:transformOrigin: number})"],"description":"Triggered when the value of the transformOrigin property changes."}}, + {"Stats.smoothChanged":{"prefix":"Stats.smoothChanged","body":["Stats.smoothChanged(${1:smooth: boolean})"],"description":"Triggered when the value of the smooth property changes."}}, + {"Stats.antialiasingChanged":{"prefix":"Stats.antialiasingChanged","body":["Stats.antialiasingChanged(${1:antialiasing: boolean})"],"description":"Triggered when the value of the antialiasing property changes."}}, + {"Stats.implicitWidthChanged":{"prefix":"Stats.implicitWidthChanged","body":["Stats.implicitWidthChanged"],"description":"Triggered when the value of the implicitWidth property changes."}}, + {"Stats.implicitHeightChanged":{"prefix":"Stats.implicitHeightChanged","body":["Stats.implicitHeightChanged"],"description":"Triggered when the value of the implicitHeight property changes."}}, + {"Stats.windowChanged":{"prefix":"Stats.windowChanged","body":["Stats.windowChanged(${1:window: object})"]}}, + {"Stats.grabToImage":{"prefix":"Stats.grabToImage","body":["Stats.grabToImage(${1:callback: object},${2:targetSize: Size})"]}}, + {"Stats.contains":{"prefix":"Stats.contains","body":["Stats.contains(${1:point: Vec2})"]}}, + {"Stats.mapFromItem":{"prefix":"Stats.mapFromItem","body":["Stats.mapFromItem(${1:item: object})"]}}, + {"Stats.mapToItem":{"prefix":"Stats.mapToItem","body":["Stats.mapToItem(${1:item: object})"]}}, + {"Stats.mapFromGlobal":{"prefix":"Stats.mapFromGlobal","body":["Stats.mapFromGlobal(${1:global: object})"]}}, + {"Stats.mapToGlobal":{"prefix":"Stats.mapToGlobal","body":["Stats.mapToGlobal(${1:global: object})"]}}, + {"Stats.forceActiveFocus":{"prefix":"Stats.forceActiveFocus","body":["Stats.forceActiveFocus(${1:reason: number})"]}}, + {"Stats.nextItemInFocusChain":{"prefix":"Stats.nextItemInFocusChain","body":["Stats.nextItemInFocusChain(${1:forward: boolean})"]}}, + {"Stats.childAt":{"prefix":"Stats.childAt","body":["Stats.childAt(${1:x: number},${2:y: number})"]}}, + {"Stats.update":{"prefix":"Stats.update","body":["Stats.update"]}}, + {"Stats.stylusPicksCountChanged":{"prefix":"Stats.stylusPicksCountChanged","body":["Stats.stylusPicksCountChanged"],"description":"Triggered when the value of the stylusPicksCount property changes."}}, + {"Stats.rayPicksCountChanged":{"prefix":"Stats.rayPicksCountChanged","body":["Stats.rayPicksCountChanged"],"description":"Triggered when the value of the rayPicksCount property changes."}}, + {"Stats.parabolaPicksCountChanged":{"prefix":"Stats.parabolaPicksCountChanged","body":["Stats.parabolaPicksCountChanged"],"description":"Triggered when the value of the parabolaPicksCount property changes."}}, + {"Stats.collisionPicksCountChanged":{"prefix":"Stats.collisionPicksCountChanged","body":["Stats.collisionPicksCountChanged"],"description":"Triggered when the value of the collisionPicksCount property changes."}}, + {"Stats.stylusPicksUpdatedChanged":{"prefix":"Stats.stylusPicksUpdatedChanged","body":["Stats.stylusPicksUpdatedChanged"],"description":"Triggered when the value of the stylusPicksUpdated property changes."}}, + {"Stats.rayPicksUpdatedChanged":{"prefix":"Stats.rayPicksUpdatedChanged","body":["Stats.rayPicksUpdatedChanged"],"description":"Triggered when the value of the rayPicksUpdated property changes."}}, + {"Stats.parabolaPicksUpdatedChanged":{"prefix":"Stats.parabolaPicksUpdatedChanged","body":["Stats.parabolaPicksUpdatedChanged"],"description":"Triggered when the value of the parabolaPicksUpdated property changes."}}, + {"Stats.collisionPicksUpdatedChanged":{"prefix":"Stats.collisionPicksUpdatedChanged","body":["Stats.collisionPicksUpdatedChanged"],"description":"Triggered when the value of the collisionPicksUpdated property changes."}}, + {"Overlays.Circle3DProperties":{"prefix":"Overlays.Circle3DProperties","body":["Overlays.Circle3DProperties"],"description":"These are the properties of a circle3d {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.CubeProperties":{"prefix":"Overlays.CubeProperties","body":["Overlays.CubeProperties"],"description":"These are the properties of a cube {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.GridProperties":{"prefix":"Overlays.GridProperties","body":["Overlays.GridProperties"],"description":"These are the properties of a grid {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.Image3DProperties":{"prefix":"Overlays.Image3DProperties","body":["Overlays.Image3DProperties"],"description":"These are the properties of an image3d {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.ImageProperties":{"prefix":"Overlays.ImageProperties","body":["Overlays.ImageProperties"],"description":"These are the properties of an image {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.Line3DProperties":{"prefix":"Overlays.Line3DProperties","body":["Overlays.Line3DProperties"],"description":"These are the properties of a line3d {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.ModelProperties":{"prefix":"Overlays.ModelProperties","body":["Overlays.ModelProperties"],"description":"These are the properties of a model {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.OverlayType":{"prefix":"Overlays.OverlayType","body":["Overlays.OverlayType"],"description":"

An overlay may be one of the following types:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
Value2D/3DDescription
circle3d3DA circle.
cube3DA cube. Can also use a shape overlay to create a \r cube.
grid3DA grid of lines in a plane.
image2DAn image. Synonym: billboard.
image3d3DAn image.
line3d3DA line.
model3DA model.
rectangle2DA rectangle.
rectangle3d3DA rectangle.
shape3DA geometric shape, such as a cube, sphere, or cylinder.
sphere3DA sphere. Can also use a shape overlay to create a \r sphere.
text2DText.
text3d3DText.
web3d3DWeb content.
\r

2D overlays are rendered on the display surface in desktop mode and on the HUD surface in HMD mode. 3D overlays are\rrendered at a position and orientation in-world.

\r

Each overlay type has different {@link Overlays.OverlayProperties|OverlayProperties}.

"}}, + {"Overlays.OverlayProperties":{"prefix":"Overlays.OverlayProperties","body":["Overlays.OverlayProperties"],"description":"

Different overlay types have different properties:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
{@link Overlays.OverlayType|OverlayType}Overlay Properties
circle3d{@link Overlays.Circle3DProperties|Circle3DProperties}
cube{@link Overlays.CubeProperties|CubeProperties}
grid{@link Overlays.GridProperties|GridProperties}
image{@link Overlays.ImageProperties|ImageProperties}
image3d{@link Overlays.Image3DProperties|Image3DProperties}
line3d{@link Overlays.Line3DProperties|Line3DProperties}
model{@link Overlays.ModelProperties|ModelProperties}
rectangle{@link Overlays.RectangleProperties|RectangleProperties}
rectangle3d{@link Overlays.Rectangle3DProperties|Rectangle3DProperties}
shape{@link Overlays.ShapeProperties|ShapeProperties}
sphere{@link Overlays.SphereProperties|SphereProperties}
text{@link Overlays.TextProperties|TextProperties}
text3d{@link Overlays.Text3DProperties|Text3DProperties}
web3d{@link Overlays.Web3DProperties|Web3DProperties}
"}}, + {"Overlays.RayToOverlayIntersectionResult":{"prefix":"Overlays.RayToOverlayIntersectionResult","body":["Overlays.RayToOverlayIntersectionResult"],"description":"The result of a {@link PickRay} search using {@link Overlays.findRayIntersection|findRayIntersection} or \r{@link Overlays.findRayIntersectionVector|findRayIntersectionVector}."}}, + {"Overlays":{"prefix":"Overlays","body":["Overlays"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Overlays API provides facilities to create and interact with overlays. Overlays are 2D and 3D objects visible only to\ryourself and that aren't persisted to the domain. They are used for UI."}}, + {"Overlays.addOverlay":{"prefix":"Overlays.addOverlay","body":["Overlays.addOverlay(${1:type: Overlays.OverlayType},${2:properties: Overlays.OverlayProperties})"],"description":"Add an overlay to the scene."}}, + {"Overlays.cloneOverlay":{"prefix":"Overlays.cloneOverlay","body":["Overlays.cloneOverlay(${1:overlayID: Uuid})"],"description":"Create a clone of an existing overlay."}}, + {"Overlays.editOverlay":{"prefix":"Overlays.editOverlay","body":["Overlays.editOverlay(${1:overlayID: Uuid},${2:properties: Overlays.OverlayProperties})"],"description":"Edit an overlay's properties."}}, + {"Overlays.editOverlays":{"prefix":"Overlays.editOverlays","body":["Overlays.editOverlays(${1:propertiesById: object.})"],"description":"Edit multiple overlays' properties."}}, + {"Overlays.deleteOverlay":{"prefix":"Overlays.deleteOverlay","body":["Overlays.deleteOverlay(${1:overlayID: Uuid})"],"description":"Delete an overlay."}}, + {"Overlays.getOverlayType":{"prefix":"Overlays.getOverlayType","body":["Overlays.getOverlayType(${1:overlayID: Uuid})"],"description":"Get the type of an overlay."}}, + {"Overlays.getOverlayObject":{"prefix":"Overlays.getOverlayObject","body":["Overlays.getOverlayObject(${1:overlayID: Uuid})"],"description":"Get the overlay script object. In particular, this is useful for accessing the event bridge for a web3d \roverlay."}}, + {"Overlays.getOverlayAtPoint":{"prefix":"Overlays.getOverlayAtPoint","body":["Overlays.getOverlayAtPoint(${1:point: Vec2})"],"description":"Get the ID of the 2D overlay at a particular point on the screen or HUD."}}, + {"Overlays.getProperty":{"prefix":"Overlays.getProperty","body":["Overlays.getProperty(${1:overlayID: Uuid},${2:property: string})"],"description":"Get the value of a 3D overlay's property."}}, + {"Overlays.getProperties":{"prefix":"Overlays.getProperties","body":["Overlays.getProperties(${1:overlayID: Uuid},${2:properties: Array.})"],"description":"Get the values of an overlay's properties."}}, + {"Overlays.getOverlaysProperties":{"prefix":"Overlays.getOverlaysProperties","body":["Overlays.getOverlaysProperties(${1:propertiesById: object.>})"],"description":"Get the values of multiple overlays' properties."}}, + {"Overlays.findRayIntersection":{"prefix":"Overlays.findRayIntersection","body":["Overlays.findRayIntersection(${1:pickRay: PickRay},${2:precisionPicking: boolean},${3:overlayIDsToInclude: Array.},${4:overlayIDsToExclude: Array.},${5:visibleOnly: boolean},${6:collidableOnly: boolean})"],"description":"Find the closest 3D overlay intersected by a {@link PickRay}."}}, + {"Overlays.findOverlays":{"prefix":"Overlays.findOverlays","body":["Overlays.findOverlays(${1:center: Vec3},${2:radius: number})"],"description":"Return a list of 3D overlays with bounding boxes that touch a search sphere."}}, + {"Overlays.isLoaded":{"prefix":"Overlays.isLoaded","body":["Overlays.isLoaded(${1:overlayID: Uuid})"],"description":"Check whether an overlay's assets have been loaded. For example, for an image overlay the result indicates\rwhether its image has been loaded."}}, + {"Overlays.textSize":{"prefix":"Overlays.textSize","body":["Overlays.textSize(${1:overlayID: Uuid},${2:text: string})"],"description":"Calculates the size of the given text in the specified overlay if it is a text overlay."}}, + {"Overlays.width":{"prefix":"Overlays.width","body":["Overlays.width"],"description":"Get the width of the window or HUD."}}, + {"Overlays.height":{"prefix":"Overlays.height","body":["Overlays.height"],"description":"Get the height of the window or HUD."}}, + {"Overlays.isAddedOverlay":{"prefix":"Overlays.isAddedOverlay","body":["Overlays.isAddedOverlay(${1:overlayID: Uuid})"],"description":"Check if there is an overlay of a given ID."}}, + {"Overlays.sendMousePressOnOverlay":{"prefix":"Overlays.sendMousePressOnOverlay","body":["Overlays.sendMousePressOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Generate a mouse press event on an overlay."}}, + {"Overlays.sendMouseReleaseOnOverlay":{"prefix":"Overlays.sendMouseReleaseOnOverlay","body":["Overlays.sendMouseReleaseOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Generate a mouse release event on an overlay."}}, + {"Overlays.sendMouseMoveOnOverlay":{"prefix":"Overlays.sendMouseMoveOnOverlay","body":["Overlays.sendMouseMoveOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Generate a mouse move event on an overlay."}}, + {"Overlays.sendHoverEnterOverlay":{"prefix":"Overlays.sendHoverEnterOverlay","body":["Overlays.sendHoverEnterOverlay(${1:id: Uuid},${2:event: PointerEvent})"],"description":"Generate a hover enter event on an overlay."}}, + {"Overlays.sendHoverOverOverlay":{"prefix":"Overlays.sendHoverOverOverlay","body":["Overlays.sendHoverOverOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Generate a hover over event on an overlay."}}, + {"Overlays.sendHoverLeaveOverlay":{"prefix":"Overlays.sendHoverLeaveOverlay","body":["Overlays.sendHoverLeaveOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Generate a hover leave event on an overlay."}}, + {"Overlays.getKeyboardFocusOverlay":{"prefix":"Overlays.getKeyboardFocusOverlay","body":["Overlays.getKeyboardFocusOverlay"],"description":"Get the ID of the Web3D overlay that has keyboard focus."}}, + {"Overlays.setKeyboardFocusOverlay":{"prefix":"Overlays.setKeyboardFocusOverlay","body":["Overlays.setKeyboardFocusOverlay(${1:overlayID: Uuid})"],"description":"Set the Web3D overlay that has keyboard focus."}}, + {"Overlays.overlayDeleted":{"prefix":"Overlays.overlayDeleted","body":["Overlays.overlayDeleted(${1:overlayID: Uuid})"],"description":"Triggered when an overlay is deleted."}}, + {"Overlays.mousePressOnOverlay":{"prefix":"Overlays.mousePressOnOverlay","body":["Overlays.mousePressOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse press event occurs on an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendMousePressOnOverlay|sendMousePressOnOverlay} for a 2D overlay)."}}, + {"Overlays.mouseDoublePressOnOverlay":{"prefix":"Overlays.mouseDoublePressOnOverlay","body":["Overlays.mouseDoublePressOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse double press event occurs on an overlay. Only occurs for 3D overlays."}}, + {"Overlays.mouseReleaseOnOverlay":{"prefix":"Overlays.mouseReleaseOnOverlay","body":["Overlays.mouseReleaseOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse release event occurs on an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendMouseReleaseOnOverlay|sendMouseReleaseOnOverlay} for a 2D overlay)."}}, + {"Overlays.mouseMoveOnOverlay":{"prefix":"Overlays.mouseMoveOnOverlay","body":["Overlays.mouseMoveOnOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse move event occurs on an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendMouseMoveOnOverlay|sendMouseMoveOnOverlay} for a 2D overlay)."}}, + {"Overlays.mousePressOffOverlay":{"prefix":"Overlays.mousePressOffOverlay","body":["Overlays.mousePressOffOverlay"],"description":"Triggered when a mouse press event occurs on something other than a 3D overlay."}}, + {"Overlays.mouseDoublePressOffOverlay":{"prefix":"Overlays.mouseDoublePressOffOverlay","body":["Overlays.mouseDoublePressOffOverlay"],"description":"Triggered when a mouse double press event occurs on something other than a 3D overlay."}}, + {"Overlays.hoverEnterOverlay":{"prefix":"Overlays.hoverEnterOverlay","body":["Overlays.hoverEnterOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse cursor starts hovering over an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendHoverEnterOverlay|sendHoverEnterOverlay} for a 2D overlay)."}}, + {"Overlays.hoverOverOverlay":{"prefix":"Overlays.hoverOverOverlay","body":["Overlays.hoverOverOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse cursor continues hovering over an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendHoverOverOverlay|sendHoverOverOverlay} for a 2D overlay)."}}, + {"Overlays.hoverLeaveOverlay":{"prefix":"Overlays.hoverLeaveOverlay","body":["Overlays.hoverLeaveOverlay(${1:overlayID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse cursor finishes hovering over an overlay. Only occurs for 3D overlays (unless you use \r {@link Overlays.sendHoverLeaveOverlay|sendHoverLeaveOverlay} for a 2D overlay)."}}, + {"Overlays.Rectangle3DProperties":{"prefix":"Overlays.Rectangle3DProperties","body":["Overlays.Rectangle3DProperties"],"description":"These are the properties of a rectangle3d {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.RectangleProperties":{"prefix":"Overlays.RectangleProperties","body":["Overlays.RectangleProperties"],"description":"These are the properties of a rectangle {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.Shape":{"prefix":"Overlays.Shape","body":["Overlays.Shape"],"description":"

A shape {@link Overlays.OverlayType|OverlayType} may display as one of the following geometrical shapes:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDimensionsDescription
\"Circle\"2DA circle oriented in 3D.
\"Cone\"3D
\"Cube\"3D
\"Cylinder\"3D
\"Dodecahedron\"3D
\"Hexagon\"3DA hexagonal prism.
\"Icosahedron\"3D
\"Line\"1DA line oriented in 3D.
\"Octagon\"3DAn octagonal prism.
\"Octahedron\"3D
\"Quad\"2DA square oriented in 3D.
\"Sphere\"3D
\"Tetrahedron\"3D
\"Torus\"3DNot implemented.
\"Triangle\"3DA triangular prism.
"}}, + {"Overlays.ShapeProperties":{"prefix":"Overlays.ShapeProperties","body":["Overlays.ShapeProperties"],"description":"These are the properties of a shape {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.SphereProperties":{"prefix":"Overlays.SphereProperties","body":["Overlays.SphereProperties"],"description":"These are the properties of a sphere {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.Text3DProperties":{"prefix":"Overlays.Text3DProperties","body":["Overlays.Text3DProperties"],"description":"These are the properties of a text3d {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.TextProperties":{"prefix":"Overlays.TextProperties","body":["Overlays.TextProperties"],"description":"These are the properties of a text {@link Overlays.OverlayType|OverlayType}."}}, + {"Overlays.Web3DProperties":{"prefix":"Overlays.Web3DProperties","body":["Overlays.Web3DProperties"],"description":"These are the properties of a web3d {@link Overlays.OverlayType|OverlayType}."}}, + {"AnimationObject":{"prefix":"AnimationObject","body":["AnimationObject"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"AnimationObject.getJointNames":{"prefix":"AnimationObject.getJointNames","body":["AnimationObject.getJointNames"]}}, + {"AnimationObject.getFrames":{"prefix":"AnimationObject.getFrames","body":["AnimationObject.getFrames"]}}, + {"AnimationCache":{"prefix":"AnimationCache","body":["AnimationCache"],"description":"
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

API to manage animation cache resources."}}, + {"AnimationCache.getAnimation":{"prefix":"AnimationCache.getAnimation","body":["AnimationCache.getAnimation(${1:url: string})"],"description":"Returns animation resource for particular animation."}}, + {"AudioStats.AudioStreamStats":{"prefix":"AudioStats.AudioStreamStats","body":["AudioStats.AudioStreamStats"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"AudioStats.AudioStreamStats.lossRateChanged":{"prefix":"AudioStats.AudioStreamStats.lossRateChanged","body":["AudioStats.AudioStreamStats.lossRateChanged(${1:lossRate: number})"]}}, + {"AudioStats.AudioStreamStats.lossCountChanged":{"prefix":"AudioStats.AudioStreamStats.lossCountChanged","body":["AudioStats.AudioStreamStats.lossCountChanged(${1:lossCount: number})"]}}, + {"AudioStats.AudioStreamStats.lossRateWindowChanged":{"prefix":"AudioStats.AudioStreamStats.lossRateWindowChanged","body":["AudioStats.AudioStreamStats.lossRateWindowChanged(${1:lossRateWindow: number})"]}}, + {"AudioStats.AudioStreamStats.lossCountWindowChanged":{"prefix":"AudioStats.AudioStreamStats.lossCountWindowChanged","body":["AudioStats.AudioStreamStats.lossCountWindowChanged(${1:lossCountWindow: number})"]}}, + {"AudioStats.AudioStreamStats.framesDesiredChanged":{"prefix":"AudioStats.AudioStreamStats.framesDesiredChanged","body":["AudioStats.AudioStreamStats.framesDesiredChanged(${1:framesDesired: number})"]}}, + {"AudioStats.AudioStreamStats.framesAvailableChanged":{"prefix":"AudioStats.AudioStreamStats.framesAvailableChanged","body":["AudioStats.AudioStreamStats.framesAvailableChanged(${1:framesAvailable: number})"]}}, + {"AudioStats.AudioStreamStats.framesAvailableAvgChanged":{"prefix":"AudioStats.AudioStreamStats.framesAvailableAvgChanged","body":["AudioStats.AudioStreamStats.framesAvailableAvgChanged(${1:framesAvailableAvg: number})"]}}, + {"AudioStats.AudioStreamStats.unplayedMsMaxChanged":{"prefix":"AudioStats.AudioStreamStats.unplayedMsMaxChanged","body":["AudioStats.AudioStreamStats.unplayedMsMaxChanged(${1:unplayedMsMax: number})"]}}, + {"AudioStats.AudioStreamStats.starveCountChanged":{"prefix":"AudioStats.AudioStreamStats.starveCountChanged","body":["AudioStats.AudioStreamStats.starveCountChanged(${1:starveCount: number})"]}}, + {"AudioStats.AudioStreamStats.lastStarveDurationCountChanged":{"prefix":"AudioStats.AudioStreamStats.lastStarveDurationCountChanged","body":["AudioStats.AudioStreamStats.lastStarveDurationCountChanged(${1:lastStarveDurationCount: number})"]}}, + {"AudioStats.AudioStreamStats.dropCountChanged":{"prefix":"AudioStats.AudioStreamStats.dropCountChanged","body":["AudioStats.AudioStreamStats.dropCountChanged(${1:dropCount: number})"]}}, + {"AudioStats.AudioStreamStats.overflowCountChanged":{"prefix":"AudioStats.AudioStreamStats.overflowCountChanged","body":["AudioStats.AudioStreamStats.overflowCountChanged(${1:overflowCount: number})"]}}, + {"AudioStats.AudioStreamStats.timegapMsMaxChanged":{"prefix":"AudioStats.AudioStreamStats.timegapMsMaxChanged","body":["AudioStats.AudioStreamStats.timegapMsMaxChanged(${1:timegapMsMax: number})"]}}, + {"AudioStats.AudioStreamStats.timegapMsAvgChanged":{"prefix":"AudioStats.AudioStreamStats.timegapMsAvgChanged","body":["AudioStats.AudioStreamStats.timegapMsAvgChanged(${1:timegapMsAvg: number})"]}}, + {"AudioStats.AudioStreamStats.timegapMsMaxWindowChanged":{"prefix":"AudioStats.AudioStreamStats.timegapMsMaxWindowChanged","body":["AudioStats.AudioStreamStats.timegapMsMaxWindowChanged(${1:timegapMsMaxWindow: number})"]}}, + {"AudioStats.AudioStreamStats.timegapMsAvgWindowChanged":{"prefix":"AudioStats.AudioStreamStats.timegapMsAvgWindowChanged","body":["AudioStats.AudioStreamStats.timegapMsAvgWindowChanged(${1:timegapMsAvgWindow: number})"]}}, + {"AudioStats":{"prefix":"AudioStats","body":["AudioStats"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Audio stats from the client."}}, + {"AudioStats.pingMsChanged":{"prefix":"AudioStats.pingMsChanged","body":["AudioStats.pingMsChanged(${1:pingMs: number})"]}}, + {"AudioStats.inputReadMsMaxChanged":{"prefix":"AudioStats.inputReadMsMaxChanged","body":["AudioStats.inputReadMsMaxChanged(${1:inputReadMsMax: number})"]}}, + {"AudioStats.inputUnplayedMsMaxChanged":{"prefix":"AudioStats.inputUnplayedMsMaxChanged","body":["AudioStats.inputUnplayedMsMaxChanged(${1:inputUnplayedMsMax: number})"]}}, + {"AudioStats.outputUnplayedMsMaxChanged":{"prefix":"AudioStats.outputUnplayedMsMaxChanged","body":["AudioStats.outputUnplayedMsMaxChanged(${1:outputUnplayedMsMax: number})"]}}, + {"AudioStats.sentTimegapMsMaxChanged":{"prefix":"AudioStats.sentTimegapMsMaxChanged","body":["AudioStats.sentTimegapMsMaxChanged(${1:sentTimegapMsMax: number})"]}}, + {"AudioStats.sentTimegapMsAvgChanged":{"prefix":"AudioStats.sentTimegapMsAvgChanged","body":["AudioStats.sentTimegapMsAvgChanged(${1:sentTimegapMsAvg: number})"]}}, + {"AudioStats.sentTimegapMsMaxWindowChanged":{"prefix":"AudioStats.sentTimegapMsMaxWindowChanged","body":["AudioStats.sentTimegapMsMaxWindowChanged(${1:sentTimegapMsMaxWindow: number})"]}}, + {"AudioStats.sentTimegapMsAvgWindowChanged":{"prefix":"AudioStats.sentTimegapMsAvgWindowChanged","body":["AudioStats.sentTimegapMsAvgWindowChanged(${1:sentTimegapMsAvgWindow: number})"]}}, + {"AudioStats.mixerStreamChanged":{"prefix":"AudioStats.mixerStreamChanged","body":["AudioStats.mixerStreamChanged"]}}, + {"AudioStats.clientStreamChanged":{"prefix":"AudioStats.clientStreamChanged","body":["AudioStats.clientStreamChanged"]}}, + {"AudioStats.injectorStreamsChanged":{"prefix":"AudioStats.injectorStreamsChanged","body":["AudioStats.injectorStreamsChanged"]}}, + {"AudioEffectOptions.ReverbOptions":{"prefix":"AudioEffectOptions.ReverbOptions","body":["AudioEffectOptions.ReverbOptions"],"description":"Reverberation options that can be used to initialize an {@link AudioEffectOptions} object when created."}}, + {"AudioEffectOptions":{"prefix":"AudioEffectOptions","body":["AudioEffectOptions(${1:reverbOptions: AudioEffectOptions.ReverbOptions})"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

Audio effect options used by the {@link Audio} API.\r\r

Create using new AudioEffectOptions(reverbOptions).

"}}, + {"AudioInjector.AudioInjectorOptions":{"prefix":"AudioInjector.AudioInjectorOptions","body":["AudioInjector.AudioInjectorOptions"],"description":"Configures how an audio injector plays its audio."}}, + {"SoundObject":{"prefix":"SoundObject","body":["SoundObject"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

An audio resource, created by {@link SoundCache.getSound}, to be played back using {@link Audio.playSound}.\r

Supported formats:

\r
    \r
  • WAV: 16-bit uncompressed WAV at any sample rate, with 1 (mono), 2(stereo), or 4 (ambisonic) channels.
  • \r
  • MP3: Mono or stereo, at any sample rate.
  • \r
  • RAW: 48khz 16-bit mono or stereo. Filename must include \".stereo\" to be interpreted as stereo.
  • \r
"}}, + {"SoundObject.ready":{"prefix":"SoundObject.ready","body":["SoundObject.ready"],"description":"Triggered when the sound has been downloaded and is ready to be played."}}, + {"SoundCache":{"prefix":"SoundCache","body":["SoundCache"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

API to manage sound cache resources."}}, + {"SoundCache.getSound":{"prefix":"SoundCache.getSound","body":["SoundCache.getSound(${1:url: string})"],"description":"Loads the content of an audio file into a {@link SoundObject}, ready for playback by {@link Audio.playSound}."}}, + {"AttachmentData":{"prefix":"AttachmentData","body":["AttachmentData"]}}, + {"MyAvatar.getDomainMinScale":{"prefix":"MyAvatar.getDomainMinScale","body":["MyAvatar.getDomainMinScale"],"description":"Returns the minimum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains."}}, + {"MyAvatar.getDomainMaxScale":{"prefix":"MyAvatar.getDomainMaxScale","body":["MyAvatar.getDomainMaxScale"],"description":"Returns the maximum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains."}}, + {"MyAvatar.getEyeHeight":{"prefix":"MyAvatar.getEyeHeight","body":["MyAvatar.getEyeHeight"],"description":"Provides read only access to the current eye height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints."}}, + {"MyAvatar.getHeight":{"prefix":"MyAvatar.getHeight","body":["MyAvatar.getHeight"],"description":"Provides read only access to the current height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints."}}, + {"MyAvatar.setHandState":{"prefix":"MyAvatar.setHandState","body":["MyAvatar.setHandState(${1:state: string})"]}}, + {"MyAvatar.getHandState":{"prefix":"MyAvatar.getHandState","body":["MyAvatar.getHandState"]}}, + {"MyAvatar.setRawJointData":{"prefix":"MyAvatar.setRawJointData","body":["MyAvatar.setRawJointData(${1:data: Array.})"]}}, + {"MyAvatar.setJointData":{"prefix":"MyAvatar.setJointData","body":["MyAvatar.setJointData(${1:index: number},${2:rotation: Quat},${3:translation: Vec3})"],"description":"Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.setJointRotation":{"prefix":"MyAvatar.setJointRotation","body":["MyAvatar.setJointRotation(${1:index: number},${2:rotation: Quat})"],"description":"Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.setJointTranslation":{"prefix":"MyAvatar.setJointTranslation","body":["MyAvatar.setJointTranslation(${1:index: number},${2:translation: Vec3})"],"description":"Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.clearJointData":{"prefix":"MyAvatar.clearJointData","body":["MyAvatar.clearJointData(${1:index: number})"],"description":"Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly faster than the function variation that specifies the joint name.

"}}, + {"MyAvatar.isJointDataValid":{"prefix":"MyAvatar.isJointDataValid","body":["MyAvatar.isJointDataValid(${1:index: number})"]}}, + {"MyAvatar.getJointRotation":{"prefix":"MyAvatar.getJointRotation","body":["MyAvatar.getJointRotation(${1:index: number})"],"description":"Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"MyAvatar.getJointTranslation":{"prefix":"MyAvatar.getJointTranslation","body":["MyAvatar.getJointTranslation(${1:index: number})"],"description":"Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"MyAvatar.setJointData":{"prefix":"MyAvatar.setJointData","body":["MyAvatar.setJointData(${1:name: string},${2:rotation: Quat},${3:translation: Vec3})"],"description":"Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.setJointRotation":{"prefix":"MyAvatar.setJointRotation","body":["MyAvatar.setJointRotation(${1:name: string},${2:rotation: Quat})"],"description":"Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.setJointTranslation":{"prefix":"MyAvatar.setJointTranslation","body":["MyAvatar.setJointTranslation(${1:name: string},${2:translation: Vec3})"],"description":"Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.clearJointData":{"prefix":"MyAvatar.clearJointData","body":["MyAvatar.clearJointData(${1:name: string})"],"description":"Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly slower than the function variation that specifies the joint index.

"}}, + {"MyAvatar.isJointDataValid":{"prefix":"MyAvatar.isJointDataValid","body":["MyAvatar.isJointDataValid(${1:name: string})"]}}, + {"MyAvatar.getJointRotation":{"prefix":"MyAvatar.getJointRotation","body":["MyAvatar.getJointRotation(${1:name: string})"],"description":"Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"MyAvatar.getJointTranslation":{"prefix":"MyAvatar.getJointTranslation","body":["MyAvatar.getJointTranslation(${1:name: number})"],"description":"Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"MyAvatar.getJointRotations":{"prefix":"MyAvatar.getJointRotations","body":["MyAvatar.getJointRotations"],"description":"Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint."}}, + {"MyAvatar.getJointTranslations":{"prefix":"MyAvatar.getJointTranslations","body":["MyAvatar.getJointTranslations"]}}, + {"MyAvatar.setJointRotations":{"prefix":"MyAvatar.setJointRotations","body":["MyAvatar.setJointRotations(${1:jointRotations: Array.})"],"description":"Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse\rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,\rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate\rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set\rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"MyAvatar.setJointTranslations":{"prefix":"MyAvatar.setJointTranslations","body":["MyAvatar.setJointTranslations(${1:translations: Array.})"]}}, + {"MyAvatar.clearJointsData":{"prefix":"MyAvatar.clearJointsData","body":["MyAvatar.clearJointsData"],"description":"Clear all joint translations and rotations that have been set by script. This restores all motion from the default \ranimation system including inverse kinematics for all joints."}}, + {"MyAvatar.getJointIndex":{"prefix":"MyAvatar.getJointIndex","body":["MyAvatar.getJointIndex(${1:name: string})"],"description":"Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by \r{@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}."}}, + {"MyAvatar.getJointNames":{"prefix":"MyAvatar.getJointNames","body":["MyAvatar.getJointNames"],"description":"Get the names of all the joints in the current avatar."}}, + {"MyAvatar.setBlendshape":{"prefix":"MyAvatar.setBlendshape","body":["MyAvatar.setBlendshape(${1:name: string},${2:value: number})"]}}, + {"MyAvatar.getAttachmentsVariant":{"prefix":"MyAvatar.getAttachmentsVariant","body":["MyAvatar.getAttachmentsVariant"]}}, + {"MyAvatar.setAttachmentsVariant":{"prefix":"MyAvatar.setAttachmentsVariant","body":["MyAvatar.setAttachmentsVariant(${1:variant: object})"]}}, + {"MyAvatar.updateAvatarEntity":{"prefix":"MyAvatar.updateAvatarEntity","body":["MyAvatar.updateAvatarEntity(${1:entityID: Uuid},${2:entityData: string})"]}}, + {"MyAvatar.clearAvatarEntity":{"prefix":"MyAvatar.clearAvatarEntity","body":["MyAvatar.clearAvatarEntity(${1:entityID: Uuid})"]}}, + {"MyAvatar.setForceFaceTrackerConnected":{"prefix":"MyAvatar.setForceFaceTrackerConnected","body":["MyAvatar.setForceFaceTrackerConnected(${1:connected: boolean})"]}}, + {"MyAvatar.getAttachmentData":{"prefix":"MyAvatar.getAttachmentData","body":["MyAvatar.getAttachmentData"],"description":"Get information about all models currently attached to your avatar."}}, + {"MyAvatar.setAttachmentData":{"prefix":"MyAvatar.setAttachmentData","body":["MyAvatar.setAttachmentData(${1:attachmentData: Array.})"],"description":"Set all models currently attached to your avatar. For example, if you retrieve attachment data using \r{@link MyAvatar.getAttachmentData} or {@link Avatar.getAttachmentData}, make changes to it, and then want to update your avatar's attachments per the \rchanged data. You can also remove all attachments by using setting attachmentData to null."}}, + {"MyAvatar.attach":{"prefix":"MyAvatar.attach","body":["MyAvatar.attach(${1:modelURL: string},${2:jointName: string},${3:translation: Vec3},${4:rotation: Quat},${5:scale: number},${6:isSoft: boolean},${7:allowDuplicates: boolean},${8:useSaved: boolean})"],"description":"Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to \rstand on.\r

Note: Attached models are models only; they are not entities and can not be manipulated using the {@link Entities} API. \rNor can you use this function to attach an entity (such as a sphere or a box) to your avatar.

"}}, + {"MyAvatar.detachOne":{"prefix":"MyAvatar.detachOne","body":["MyAvatar.detachOne(${1:modelURL: string},${2:jointName: string})"],"description":"Detach the most recently attached instance of a particular model from either a specific joint or any joint."}}, + {"MyAvatar.detachAll":{"prefix":"MyAvatar.detachAll","body":["MyAvatar.detachAll(${1:modelURL: string},${2:jointName: string})"],"description":"Detach all instances of a particular model from either a specific joint or all joints."}}, + {"MyAvatar.getAvatarEntityData":{"prefix":"MyAvatar.getAvatarEntityData","body":["MyAvatar.getAvatarEntityData"]}}, + {"MyAvatar.setAvatarEntityData":{"prefix":"MyAvatar.setAvatarEntityData","body":["MyAvatar.setAvatarEntityData(${1:avatarEntityData: object})"]}}, + {"MyAvatar.getSensorToWorldMatrix":{"prefix":"MyAvatar.getSensorToWorldMatrix","body":["MyAvatar.getSensorToWorldMatrix"]}}, + {"MyAvatar.getSensorToWorldScale":{"prefix":"MyAvatar.getSensorToWorldScale","body":["MyAvatar.getSensorToWorldScale"]}}, + {"MyAvatar.getControllerLeftHandMatrix":{"prefix":"MyAvatar.getControllerLeftHandMatrix","body":["MyAvatar.getControllerLeftHandMatrix"]}}, + {"MyAvatar.getControllerRightHandMatrix":{"prefix":"MyAvatar.getControllerRightHandMatrix","body":["MyAvatar.getControllerRightHandMatrix"]}}, + {"MyAvatar.getDataRate":{"prefix":"MyAvatar.getDataRate","body":["MyAvatar.getDataRate(${1:rateName: string})"]}}, + {"MyAvatar.getUpdateRate":{"prefix":"MyAvatar.getUpdateRate","body":["MyAvatar.getUpdateRate(${1:rateName: string})"]}}, + {"MyAvatar.displayNameChanged":{"prefix":"MyAvatar.displayNameChanged","body":["MyAvatar.displayNameChanged"]}}, + {"MyAvatar.sessionDisplayNameChanged":{"prefix":"MyAvatar.sessionDisplayNameChanged","body":["MyAvatar.sessionDisplayNameChanged"]}}, + {"MyAvatar.skeletonModelURLChanged":{"prefix":"MyAvatar.skeletonModelURLChanged","body":["MyAvatar.skeletonModelURLChanged"]}}, + {"MyAvatar.lookAtSnappingChanged":{"prefix":"MyAvatar.lookAtSnappingChanged","body":["MyAvatar.lookAtSnappingChanged(${1:enabled: boolean})"]}}, + {"MyAvatar.sessionUUIDChanged":{"prefix":"MyAvatar.sessionUUIDChanged","body":["MyAvatar.sessionUUIDChanged"]}}, + {"MyAvatar.sendAvatarDataPacket":{"prefix":"MyAvatar.sendAvatarDataPacket","body":["MyAvatar.sendAvatarDataPacket(${1:sendAll: boolean})"]}}, + {"MyAvatar.sendIdentityPacket":{"prefix":"MyAvatar.sendIdentityPacket","body":["MyAvatar.sendIdentityPacket"]}}, + {"MyAvatar.setJointMappingsFromNetworkReply":{"prefix":"MyAvatar.setJointMappingsFromNetworkReply","body":["MyAvatar.setJointMappingsFromNetworkReply"]}}, + {"MyAvatar.setSessionUUID":{"prefix":"MyAvatar.setSessionUUID","body":["MyAvatar.setSessionUUID(${1:sessionUUID: Uuid})"]}}, + {"MyAvatar.getAbsoluteJointRotationInObjectFrame":{"prefix":"MyAvatar.getAbsoluteJointRotationInObjectFrame","body":["MyAvatar.getAbsoluteJointRotationInObjectFrame(${1:index: number})"]}}, + {"MyAvatar.getAbsoluteJointTranslationInObjectFrame":{"prefix":"MyAvatar.getAbsoluteJointTranslationInObjectFrame","body":["MyAvatar.getAbsoluteJointTranslationInObjectFrame(${1:index: number})"]}}, + {"MyAvatar.setAbsoluteJointRotationInObjectFrame":{"prefix":"MyAvatar.setAbsoluteJointRotationInObjectFrame","body":["MyAvatar.setAbsoluteJointRotationInObjectFrame(${1:index: number},${2:rotation: Quat})"]}}, + {"MyAvatar.setAbsoluteJointTranslationInObjectFrame":{"prefix":"MyAvatar.setAbsoluteJointTranslationInObjectFrame","body":["MyAvatar.setAbsoluteJointTranslationInObjectFrame(${1:index: number},${2:translation: Vec3})"]}}, + {"MyAvatar.getTargetScale":{"prefix":"MyAvatar.getTargetScale","body":["MyAvatar.getTargetScale"]}}, + {"MyAvatar.resetLastSent":{"prefix":"MyAvatar.resetLastSent","body":["MyAvatar.resetLastSent"]}}, + {"AvatarList":{"prefix":"AvatarList","body":["AvatarList"],"description":"
Available in:Assignment Client Scripts

Note: An AvatarList API is also provided for Interface and client entity scripts: it is a \rsynonym for the {@link AvatarManager} API."}}, + {"AvatarList.getAvatarIdentifiers":{"prefix":"AvatarList.getAvatarIdentifiers","body":["AvatarList.getAvatarIdentifiers"]}}, + {"AvatarList.getAvatarsInRange":{"prefix":"AvatarList.getAvatarsInRange","body":["AvatarList.getAvatarsInRange(${1:position: Vec3},${2:range: number})"]}}, + {"AvatarList.getAvatar":{"prefix":"AvatarList.getAvatar","body":["AvatarList.getAvatar(${1:avatarID: Uuid})"]}}, + {"AvatarList.avatarAddedEvent":{"prefix":"AvatarList.avatarAddedEvent","body":["AvatarList.avatarAddedEvent(${1:sessionUUID: Uuid})"]}}, + {"AvatarList.avatarRemovedEvent":{"prefix":"AvatarList.avatarRemovedEvent","body":["AvatarList.avatarRemovedEvent(${1:sessionUUID: Uuid})"]}}, + {"AvatarList.avatarSessionChangedEvent":{"prefix":"AvatarList.avatarSessionChangedEvent","body":["AvatarList.avatarSessionChangedEvent(${1:sessionUUID: Uuid},${2:oldSessionUUID: Uuid})"]}}, + {"AvatarList.isAvatarInRange":{"prefix":"AvatarList.isAvatarInRange","body":["AvatarList.isAvatarInRange(${1:position: string},${2:range: string})"]}}, + {"AvatarList.sessionUUIDChanged":{"prefix":"AvatarList.sessionUUIDChanged","body":["AvatarList.sessionUUIDChanged(${1:sessionUUID: Uuid},${2:oldSessionUUID: Uuid})"]}}, + {"AvatarList.processAvatarDataPacket":{"prefix":"AvatarList.processAvatarDataPacket","body":["AvatarList.processAvatarDataPacket(${1:message},${2:sendingNode})"]}}, + {"AvatarList.processAvatarIdentityPacket":{"prefix":"AvatarList.processAvatarIdentityPacket","body":["AvatarList.processAvatarIdentityPacket(${1:message},${2:sendingNode})"]}}, + {"AvatarList.processKillAvatar":{"prefix":"AvatarList.processKillAvatar","body":["AvatarList.processKillAvatar(${1:message},${2:sendingNode})"]}}, + {"MyAvatar.getDefaultJointRotation":{"prefix":"MyAvatar.getDefaultJointRotation","body":["MyAvatar.getDefaultJointRotation(${1:index: number})"]}}, + {"MyAvatar.getDefaultJointTranslation":{"prefix":"MyAvatar.getDefaultJointTranslation","body":["MyAvatar.getDefaultJointTranslation(${1:index: number})"]}}, + {"MyAvatar.getAbsoluteDefaultJointRotationInObjectFrame":{"prefix":"MyAvatar.getAbsoluteDefaultJointRotationInObjectFrame","body":["MyAvatar.getAbsoluteDefaultJointRotationInObjectFrame(${1:index: number})"],"description":"Provides read only access to the default joint rotations in avatar coordinates.\rThe default pose of the avatar is defined by the position and orientation of all bones\rin the avatar's model file. Typically this is a T-pose."}}, + {"MyAvatar.getAbsoluteDefaultJointTranslationInObjectFrame":{"prefix":"MyAvatar.getAbsoluteDefaultJointTranslationInObjectFrame","body":["MyAvatar.getAbsoluteDefaultJointTranslationInObjectFrame(${1:index: number})"],"description":"Provides read only access to the default joint translations in avatar coordinates.\rThe default pose of the avatar is defined by the position and orientation of all bones\rin the avatar's model file. Typically this is a T-pose."}}, + {"MyAvatar.setSkeletonOffset":{"prefix":"MyAvatar.setSkeletonOffset","body":["MyAvatar.setSkeletonOffset(${1:offset: Vec3})"],"description":"Set the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, \rwith an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly."}}, + {"MyAvatar.getSkeletonOffset":{"prefix":"MyAvatar.getSkeletonOffset","body":["MyAvatar.getSkeletonOffset"],"description":"Get the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, \rwith an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly."}}, + {"MyAvatar.getJointPosition":{"prefix":"MyAvatar.getJointPosition","body":["MyAvatar.getJointPosition(${1:index: number})"],"description":"Get the position of a joint in the current avatar."}}, + {"MyAvatar.getJointPosition":{"prefix":"MyAvatar.getJointPosition","body":["MyAvatar.getJointPosition(${1:name: string})"],"description":"Get the position of a joint in the current avatar."}}, + {"MyAvatar.getNeckPosition":{"prefix":"MyAvatar.getNeckPosition","body":["MyAvatar.getNeckPosition"],"description":"Get the position of the current avatar's neck in world coordinates."}}, + {"MyAvatar.getAcceleration":{"prefix":"MyAvatar.getAcceleration","body":["MyAvatar.getAcceleration"]}}, + {"MyAvatar.getWorldFeetPosition":{"prefix":"MyAvatar.getWorldFeetPosition","body":["MyAvatar.getWorldFeetPosition"],"description":"Get the position of the current avatar's feet (or rather, bottom of its collision capsule) in world coordinates."}}, + {"MyAvatar.getParentID":{"prefix":"MyAvatar.getParentID","body":["MyAvatar.getParentID"]}}, + {"MyAvatar.setParentID":{"prefix":"MyAvatar.setParentID","body":["MyAvatar.setParentID(${1:parentID: Uuid})"]}}, + {"MyAvatar.getParentJointIndex":{"prefix":"MyAvatar.getParentJointIndex","body":["MyAvatar.getParentJointIndex"]}}, + {"MyAvatar.setParentJointIndex":{"prefix":"MyAvatar.setParentJointIndex","body":["MyAvatar.setParentJointIndex(${1:parentJointIndex: number})"]}}, + {"MyAvatar.getSkeleton":{"prefix":"MyAvatar.getSkeleton","body":["MyAvatar.getSkeleton"],"description":"Returns an array of joints, where each joint is an object containing name, index, and parentIndex fields."}}, + {"MyAvatar.SkeletonJoint":{"prefix":"MyAvatar.SkeletonJoint","body":["MyAvatar.SkeletonJoint"],"description":"Information about a single joint in an Avatar's skeleton hierarchy."}}, + {"MyAvatar.getSimulationRate":{"prefix":"MyAvatar.getSimulationRate","body":["MyAvatar.getSimulationRate(${1:rateName: string})"]}}, + {"MyAvatar.getLeftPalmPosition":{"prefix":"MyAvatar.getLeftPalmPosition","body":["MyAvatar.getLeftPalmPosition"],"description":"Get the position of the left palm in world coordinates."}}, + {"MyAvatar.getLeftPalmRotation":{"prefix":"MyAvatar.getLeftPalmRotation","body":["MyAvatar.getLeftPalmRotation"],"description":"Get the rotation of the left palm in world coordinates."}}, + {"MyAvatar.getRightPalmPosition":{"prefix":"MyAvatar.getRightPalmPosition","body":["MyAvatar.getRightPalmPosition"],"description":"Get the position of the right palm in world coordinates."}}, + {"MyAvatar.getRightPalmRotation":{"prefix":"MyAvatar.getRightPalmRotation","body":["MyAvatar.getRightPalmRotation"],"description":"Get the rotation of the right palm in world coordinates."}}, + {"MyAvatar.rigReady":{"prefix":"MyAvatar.rigReady","body":["MyAvatar.rigReady"]}}, + {"MyAvatar.rigReset":{"prefix":"MyAvatar.rigReset","body":["MyAvatar.rigReset"]}}, + {"Controller.Actions":{"prefix":"Controller.Actions","body":["Controller.Actions"],"description":"

The Controller.Actions object has properties representing predefined actions on the user's avatar and \rInterface. The property values are integer IDs, uniquely identifying each action. Read-only. These can be used \ras end points in the routes of a {@link MappingObject}. The data routed to each action is either a number or a \r{@link Pose}.

\r\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
Avatar Movement
TranslateXnumbernumberMove the user's avatar in the direction of its \r x-axis, if the camera isn't in independent or mirror modes.
TranslateYnumbernumberMove the user's avatar in the direction of its \r y-axis, if the camera isn't in independent or mirror modes.
TranslateZnumbernumberMove the user's avatar in the direction of its \r z-axis, if the camera isn't in independent or mirror modes.
PitchnumbernumberRotate the user's avatar head and attached camera \r about its negative x-axis (i.e., positive values pitch down), if the camera isn't in HMD, independent, or mirror \r modes.
YawnumbernumberRotate the user's avatar about its y-axis, if the \r camera isn't in independent or mirror modes.
RollnumbernumberNo action.
StepTranslateXnumbernumberNo action.
StepTranslateYnumbernumberNo action.
StepTranslateZnumbernumberNo action.
StepPitchnumbernumberNo action.
StepYawnumbernumberRotate the user's avatar about its y-axis in a \r step increment, if the camera isn't in independent or mirror modes.
StepRollnumbernumberNo action.
Avatar Skeleton
Hipsnumber{@link Pose}Set the hips pose of the user's avatar.\r
Spine2number{@link Pose}Set the spine2 pose of the user's avatar.\r
Headnumber{@link Pose}Set the head pose of the user's avatar.\r
LeftArmnumber{@link Pose}Set the left arm pose of the user's avatar.\r
RightArmnumber{@link Pose}Set the right arm pose of the user's \r avatar.
LeftHandnumber{@link Pose}Set the left hand pose of the user's\r avatar.
LeftHandThumb1number{@link Pose}Set the left thumb 1 finger joint \r pose of the user's avatar.
LeftHandThumb2number{@link Pose}Set the left thumb 2 finger joint \r pose of the user's avatar.
LeftHandThumb3number{@link Pose}Set the left thumb 3 finger joint \r pose of the user's avatar.
LeftHandThumb4number{@link Pose}Set the left thumb 4 finger joint \r pose of the user's avatar.
LeftHandIndex1number{@link Pose}Set the left index 1 finger joint \r pose of the user's avatar.
LeftHandIndex2number{@link Pose}Set the left index 2 finger joint \r pose of the user's avatar.
LeftHandIndex3number{@link Pose}Set the left index 3 finger joint \r pose of the user's avatar.
LeftHandIndex4number{@link Pose}Set the left index 4 finger joint \r pose of the user's avatar.
LeftHandMiddle1number{@link Pose}Set the left middle 1 finger joint \r pose of the user's avatar.
LeftHandMiddle2number{@link Pose}Set the left middle 2 finger joint \r pose of the user's avatar.
LeftHandMiddle3number{@link Pose}Set the left middle 3 finger joint \r pose of the user's avatar.
LeftHandMiddle4number{@link Pose}Set the left middle 4 finger joint \r pose of the user's avatar.
LeftHandRing1number{@link Pose}Set the left ring 1 finger joint pose \r of the user's avatar.
LeftHandRing2number{@link Pose}Set the left ring 2 finger joint pose \r of the user's avatar.
LeftHandRing3number{@link Pose}Set the left ring 3 finger joint pose \r of the user's avatar.
LeftHandRing4number{@link Pose}Set the left ring 4 finger joint pose \r of the user's avatar.
LeftHandPinky1number{@link Pose}Set the left pinky 1 finger joint \r pose of the user's avatar.
LeftHandPinky2number{@link Pose}Set the left pinky 2 finger joint \r pose of the user's avatar.
LeftHandPinky3number{@link Pose}Set the left pinky 3 finger joint \r pose of the user's avatar.
LeftHandPinky4number{@link Pose}Set the left pinky 4 finger joint \r pose of the user's avatar.
RightHandnumber{@link Pose}Set the right hand of the user's avatar.\r
RightHandThumb1number{@link Pose}Set the right thumb 1 finger joint \r pose of the user's avatar.
RightHandThumb2number{@link Pose}Set the right thumb 2 finger joint \r pose of the user's avatar.
RightHandThumb3number{@link Pose}Set the right thumb 3 finger joint \r pose of the user's avatar.
RightHandThumb4number{@link Pose}Set the right thumb 4 finger joint \r pose of the user's avatar.
RightHandIndex1number{@link Pose}Set the right index 1 finger joint \r pose of the user's avatar.
RightHandIndex2number{@link Pose}Set the right index 2 finger joint \r pose of the user's avatar.
RightHandIndex3number{@link Pose}Set the right index 3 finger joint \r pose of the user's avatar.
RightHandIndex4number{@link Pose}Set the right index 4 finger joint \r pose of the user's avatar.
RightHandMiddle1number{@link Pose}Set the right middle 1 finger \r joint pose of the user's avatar.
RightHandMiddle2number{@link Pose}Set the right middle 2 finger \r joint pose of the user's avatar.
RightHandMiddle3number{@link Pose}Set the right middle 3 finger \r joint pose of the user's avatar.
RightHandMiddle4number{@link Pose}Set the right middle 4 finger \r joint pose of the user's avatar.
RightHandRing1number{@link Pose}Set the right ring 1 finger joint \r pose of the user's avatar.
RightHandRing2number{@link Pose}Set the right ring 2 finger joint \r pose of the user's avatar.
RightHandRing3number{@link Pose}Set the right ring 3 finger joint \r pose of the user's avatar.
RightHandRing4number{@link Pose}Set the right ring 4 finger joint \r pose of the user's avatar.
RightHandPinky1number{@link Pose}Set the right pinky 1 finger joint \r pose of the user's avatar.
RightHandPinky2number{@link Pose}Set the right pinky 2 finger joint \r pose of the user's avatar.
RightHandPinky3number{@link Pose}Set the right pinky 3 finger joint \r pose of the user's avatar.
RightHandPinky4number{@link Pose}Set the right pinky 4 finger joint \r pose of the user's avatar.
LeftFootnumber{@link Pose}Set the left foot pose of the user's\r avatar.
RightFootnumber{@link Pose}Set the right foot pose of the user's\r avatar.
Application
BoomInnumbernumberZoom camera in from third person toward first \r person view.
BoomOutnumbernumberZoom camera out from first person to third \r person view.
CycleCameranumbernumberCycle the camera view from first person, to \r third person, to full screen mirror, then back to first person and repeat.
ContextMenunumbernumberShow / hide the tablet.
ToggleMutenumbernumberToggle the microphone mute.
ToggleOverlaynumbernumberToggle the display of overlays.
SprintnumbernumberSet avatar sprint mode.
ReticleClicknumbernumberSet mouse-pressed.
ReticleXnumbernumberMove the cursor left/right in the x direction.\r
ReticleYnumbernumbermove the cursor up/down in the y direction.\r
ReticleLeftnumbernumberMove the cursor left.
ReticleRightnumbernumberMove the cursor right.
ReticleUpnumbernumberMove the cursor up.
ReticleDownnumbernumberMove the cursor down.
UiNavLateralnumbernumberGenerate a keyboard left or right arrow key \r event.
UiNavVerticalnumbernumberGenerate a keyboard up or down arrow key \r event.
UiNavGroupnumbernumberGenerate a keyboard tab or back-tab key event.\r
UiNavSelectnumbernumberGenerate a keyboard Enter key event.\r
UiNavBacknumbernumberGenerate a keyboard Esc key event.
LeftHandClicknumbernumberDeprecated: No action.\r
RightHandClicknumbernumberDeprecated: No action.\r
ShiftnumbernumberDeprecated: No action.
PrimaryActionnumbernumberDeprecated: No action.\r
SecondaryActionnumbernumberDeprecated: No action.\r
Aliases
BackwardnumbernumberAlias for TranslateZ in the \r positive direction.
ForwardnumbernumberAlias for TranslateZ in the negative \r direction.
StrafeRightnumbernumberAlias for TranslateX in the\r positive direction.
StrafeLeftnumbernumberAlias for TranslateX in the\r negative direction.
UpnumbernumberAlias for TranslateY in the positive\r direction.
DownnumbernumberAlias for TranslateY in the negative \r direction.
PitchDownnumbernumberAlias for Pitch in the positive \r direction.
PitchUpnumbernumberAlias for Pitch in the negative\r direction.
YawLeftnumbernumberAlias for Yaw in the positive\r direction.
YawRightnumbernumberAlias for Yaw in the negative \r direction.
Deprecated Aliases
LEFT_HANDnumber{@link Pose}Deprecated: Use \r LeftHand instead.
RIGHT_HANDnumber{@link Pose}Deprecated: Use \r RightHand instead.
BOOM_INnumbernumberDeprecated: Use \r BoomIn instead.
BOOM_OUTnumbernumberDeprecated: Use \r BoomOut instead.
CONTEXT_MENUnumbernumberDeprecated: Use \r ContextMenu instead.
TOGGLE_MUTEnumbernumberDeprecated: Use \r ToggleMute instead.
SPRINTnumbernumberDeprecated: Use \r Sprint instead.
LONGITUDINAL_BACKWARDnumbernumberDeprecated: Use \r Backward instead.
LONGITUDINAL_FORWARDnumbernumberDeprecated: Use \r Forward instead.
LATERAL_LEFTnumbernumberDeprecated: Use \r StrafeLeft instead.
LATERAL_RIGHTnumbernumberDeprecated: Use \r StrafeRight instead.
VERTICAL_UPnumbernumberDeprecated: Use \r Up instead.
VERTICAL_DOWNnumbernumberDeprecated: Use \r Down instead.
PITCH_DOWNnumbernumberDeprecated: Use \r PitchDown instead.
PITCH_UPnumbernumberDeprecated: Use \r PitchUp instead.
YAW_LEFTnumbernumberDeprecated: Use \r YawLeft instead.
YAW_RIGHTnumbernumberDeprecated: Use \r YawRight instead.
LEFT_HAND_CLICKnumbernumberDeprecated: Use \r LeftHandClick instead.
RIGHT_HAND_CLICKnumbernumberDeprecated: Use \r RightHandClick instead.
SHIFTnumbernumberDeprecated: Use \r Shift instead.
ACTION1numbernumberDeprecated: Use \r PrimaryAction instead.
ACTION2numbernumberDeprecated: Use \r SecondaryAction instead.
Deprecated Trackers
TrackedObject00number{@link Pose}Deprecated: No\r action.
TrackedObject01number{@link Pose}Deprecated: No\r action.
TrackedObject02number{@link Pose}Deprecated: No\r action.
TrackedObject03number{@link Pose}Deprecated: No\r action.
TrackedObject04number{@link Pose}Deprecated: No\r action.
TrackedObject05number{@link Pose}Deprecated: No\r action.
TrackedObject06number{@link Pose}Deprecated: No\r action.
TrackedObject07number{@link Pose}Deprecated: No\r action.
TrackedObject08number{@link Pose}Deprecated: No\r action.
TrackedObject09number{@link Pose}Deprecated: No\r action.
TrackedObject10number{@link Pose}Deprecated: No\r action.
TrackedObject11number{@link Pose}Deprecated: No\r action.
TrackedObject12number{@link Pose}Deprecated: No\r action.
TrackedObject13number{@link Pose}Deprecated: No\r action.
TrackedObject14number{@link Pose}Deprecated: No\r action.
TrackedObject15number{@link Pose}Deprecated: No\r action.
"}}, + {"Controller.Hand":{"prefix":"Controller.Hand","body":["Controller.Hand"],"description":"

Some controller actions may be associated with one or both hands:

\r\r \r \r \r \r \r \r \r \r
ValueDescription
0Left hand.
1Right hand.
2Both hands.
"}}, + {"Controller.Hardware":{"prefix":"Controller.Hardware","body":["Controller.Hardware"],"description":"

The Controller.Hardware object has properties representing standard and hardware-specific controller and \rcomputer outputs, plus predefined actions on Interface and the user's avatar. Read-only. The outputs can be mapped \rto actions or functions in a {@link RouteObject} mapping. Additionally, hardware-specific controller outputs can be mapped \rto standard controller outputs. \r\r

Controllers typically implement a subset of the {@link Controller.Standard} controls, plus they may implement some extras. \rSome common controllers are included in the table. You can see the outputs provided by these and others by \rviewing their {@link Controller.MappingJSON|MappingJSON} files at \r\rhttps://github.com/highfidelity/hifi/tree/master/interface/resources/controllers.

\r\r\r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDescription
Controller.Hardware.ActionsobjectSynonym for {@link Controller.Actions}.
Controller.Hardware.ApplicationobjectInterface state outputs. See \r {@link Controller.Hardware-Application}.
Controller.Hardware.KeyboardobjectKeyboard, mouse, and touch pad outputs. See\r {@link Controller.Hardware-Keyboard}.
Controller.Hardware.OculusTouchobjectOculus Rift HMD outputs. See\r {@link Controller.Hardware-OculusTouch}.
Controller.Hardware.ViveobjectVive HMD outputs. See\r {@link Controller.Hardware-Vive}.
"}}, + {"Pose":{"prefix":"Pose","body":["Pose"],"description":"The pose of a joint or other item relative to the world or a parent."}}, + {"Controller.getAllActions":{"prefix":"Controller.getAllActions","body":["Controller.getAllActions"],"description":"Get a list of all available actions."}}, + {"Controller.getAvailableInputs":{"prefix":"Controller.getAvailableInputs","body":["Controller.getAvailableInputs(${1:deviceID: number})"],"description":"Get a list of all available inputs for a hardware device."}}, + {"Controller.getDeviceName":{"prefix":"Controller.getDeviceName","body":["Controller.getDeviceName(${1:deviceID: number})"],"description":"Find the name of a particular controller from its device ID."}}, + {"Controller.getActionValue":{"prefix":"Controller.getActionValue","body":["Controller.getActionValue(${1:actionID: number})"],"description":"Get the current value of an action."}}, + {"Controller.findDevice":{"prefix":"Controller.findDevice","body":["Controller.findDevice(${1:deviceName: string})"],"description":"Find the ID of a specific controller from its device name."}}, + {"Controller.getDeviceNames":{"prefix":"Controller.getDeviceNames","body":["Controller.getDeviceNames"],"description":"Get the names of all currently available controller devices plus \"Actions\", \"Application\", and \"Standard\"."}}, + {"Controller.findAction":{"prefix":"Controller.findAction","body":["Controller.findAction(${1:actionName: string})"],"description":"Find the ID of an action from its name."}}, + {"Controller.getActionNames":{"prefix":"Controller.getActionNames","body":["Controller.getActionNames"],"description":"Get the names of all actions available as properties of {@link Controller.Actions}."}}, + {"Controller.getValue":{"prefix":"Controller.getValue","body":["Controller.getValue(${1:source: number})"],"description":"Get the value of a controller button or axis output. Note: Also gets the value of a controller axis output."}}, + {"Controller.getAxisValue":{"prefix":"Controller.getAxisValue","body":["Controller.getAxisValue(${1:source: number})"],"description":"Get the value of a controller axis output. Note: Also gets the value of a controller button output."}}, + {"Controller.getPoseValue":{"prefix":"Controller.getPoseValue","body":["Controller.getPoseValue(${1:source: number})"],"description":"Get the value of a controller pose output."}}, + {"Controller.triggerHapticPulse":{"prefix":"Controller.triggerHapticPulse","body":["Controller.triggerHapticPulse(${1:strength: number},${2:duration: number},${3:hand: Controller.Hand})"],"description":"Triggers a haptic pulse on connected and enabled devices that have the capability."}}, + {"Controller.triggerShortHapticPulse":{"prefix":"Controller.triggerShortHapticPulse","body":["Controller.triggerShortHapticPulse(${1:strength: number},${2:hand: Controller.Hand})"],"description":"Triggers a 250ms haptic pulse on connected and enabled devices that have the capability."}}, + {"Controller.triggerHapticPulseOnDevice":{"prefix":"Controller.triggerHapticPulseOnDevice","body":["Controller.triggerHapticPulseOnDevice(${1:deviceID: number},${2:strength: number},${3:duration: number},${4:hand: Controller.Hand})"],"description":"Triggers a haptic pulse on a particular device if connected and enabled and it has the capability."}}, + {"Controller.triggerShortHapticPulseOnDevice":{"prefix":"Controller.triggerShortHapticPulseOnDevice","body":["Controller.triggerShortHapticPulseOnDevice(${1:deviceID: number},${2:strength: number},${3:hand: Controller.Hand})"],"description":"Triggers a 250ms haptic pulse on a particular device if connected and enabled and it has the capability."}}, + {"Controller.newMapping":{"prefix":"Controller.newMapping","body":["Controller.newMapping(${1:mappingName: string})"],"description":"Create a new controller mapping. Routes can then be added to the mapping using {@link MappingObject} methods and \rrouted to Standard controls, Actions, or script functions using {@link RouteObject} \rmethods. The mapping can then be enabled using {@link Controller.enableMapping|enableMapping} for it to take effect."}}, + {"Controller.enableMapping":{"prefix":"Controller.enableMapping","body":["Controller.enableMapping(${1:mappingName: string},${2:enable: boolean})"],"description":"Enable or disable a controller mapping. When enabled, the routes in the mapping have effect."}}, + {"Controller.disableMapping":{"prefix":"Controller.disableMapping","body":["Controller.disableMapping(${1:mappingName: string})"],"description":"Disable a controller mapping. When disabled, the routes in the mapping have no effect."}}, + {"Controller.parseMapping":{"prefix":"Controller.parseMapping","body":["Controller.parseMapping(${1:jsonString: string})"],"description":"Create a new controller mapping from a {@link Controller.MappingJSON|MappingJSON} string. Use \r{@link Controller.enableMapping|enableMapping} to enable the mapping for it to take effect."}}, + {"Controller.loadMapping":{"prefix":"Controller.loadMapping","body":["Controller.loadMapping(${1:jsonURL: string})"],"description":"Create a new controller mapping from a {@link Controller.MappingJSON|MappingJSON} JSON file at a URL. Use \r{@link Controller.enableMapping|enableMapping} to enable the mapping for it to take effect."}}, + {"Controller.getHardware":{"prefix":"Controller.getHardware","body":["Controller.getHardware"],"description":"Get the {@link Controller.Hardware} property tree. Calling this function is the same as using the {@link Controller} \rproperty, Controller.Hardware."}}, + {"Controller.getActions":{"prefix":"Controller.getActions","body":["Controller.getActions"],"description":"Get the {@link Controller.Actions} property tree. Calling this function is the same as using the {@link Controller} \rproperty, Controller.Actions."}}, + {"Controller.getStandard":{"prefix":"Controller.getStandard","body":["Controller.getStandard"],"description":"Get the {@link Controller.Standard} property tree. Calling this function is the same as using the {@link Controller} \rproperty, Controller.Standard."}}, + {"Controller.startInputRecording":{"prefix":"Controller.startInputRecording","body":["Controller.startInputRecording"],"description":"Start making a recording of currently active controllers."}}, + {"Controller.stopInputRecording":{"prefix":"Controller.stopInputRecording","body":["Controller.stopInputRecording"],"description":"Stop making a recording started by {@link Controller.startInputRecording|startInputRecording}."}}, + {"Controller.startInputPlayback":{"prefix":"Controller.startInputPlayback","body":["Controller.startInputPlayback"],"description":"Play back the current recording from the beginning. The current recording may have been recorded by \r{@link Controller.startInputRecording|startInputRecording} and \r{@link Controller.stopInputRecording|stopInputRecording}, or loaded by \r{@link Controller.loadInputRecording|loadInputRecording}. Playback repeats in a loop until \r{@link Controller.stopInputPlayback|stopInputPlayback} is called."}}, + {"Controller.stopInputPlayback":{"prefix":"Controller.stopInputPlayback","body":["Controller.stopInputPlayback"],"description":"Stop play back of a recording started by {@link Controller.startInputPlayback|startInputPlayback}."}}, + {"Controller.saveInputRecording":{"prefix":"Controller.saveInputRecording","body":["Controller.saveInputRecording"],"description":"Save the current recording to a file. The current recording may have been recorded by\r{@link Controller.startInputRecording|startInputRecording} and\r{@link Controller.stopInputRecording|stopInputRecording}, or loaded by\r{@link Controller.loadInputRecording|loadInputRecording}. It is saved in the directory returned by \r{@link Controller.getInputRecorderSaveDirectory|getInputRecorderSaveDirectory}."}}, + {"Controller.loadInputRecording":{"prefix":"Controller.loadInputRecording","body":["Controller.loadInputRecording(${1:file: string})"],"description":"Load an input recording, ready for play back."}}, + {"Controller.getInputRecorderSaveDirectory":{"prefix":"Controller.getInputRecorderSaveDirectory","body":["Controller.getInputRecorderSaveDirectory"],"description":"Get the directory in which input recordings are saved."}}, + {"Controller.getRunningInputDevices":{"prefix":"Controller.getRunningInputDevices","body":["Controller.getRunningInputDevices"],"description":"Get all the active and enabled (running) input devices"}}, + {"Controller.captureMouseEvents":{"prefix":"Controller.captureMouseEvents","body":["Controller.captureMouseEvents"],"description":"Disable processing of mouse \"move\", \"press\", \"double-press\", and \"release\" events into \r{@link Controller.Hardware|Controller.Hardware.Keyboard} outputs."}}, + {"Controller.releaseMouseEvents":{"prefix":"Controller.releaseMouseEvents","body":["Controller.releaseMouseEvents"],"description":"Enable processing of mouse \"move\", \"press\", \"double-press\", and \"release\" events into \r{@link Controller.Hardware-Keyboard|Controller.Hardware.Keyboard} outputs that were disabled using \r{@link Controller.captureMouseEvents|captureMouseEvents}."}}, + {"Controller.captureTouchEvents":{"prefix":"Controller.captureTouchEvents","body":["Controller.captureTouchEvents"],"description":"Disable processing of touch \"begin\", \"update\", and \"end\" events into \r{@link Controller.Hardware|Controller.Hardware.Keyboard}, \r{@link Controller.Hardware|Controller.Hardware.Touchscreen}, and \r{@link Controller.Hardware|Controller.Hardware.TouchscreenVirtualPad} outputs."}}, + {"Controller.releaseTouchEvents":{"prefix":"Controller.releaseTouchEvents","body":["Controller.releaseTouchEvents"],"description":"Enable processing of touch \"begin\", \"update\", and \"end\" events into \r{@link Controller.Hardware|Controller.Hardware.Keyboard}, \r{@link Controller.Hardware|Controller.Hardware.Touchscreen}, and \r{@link Controller.Hardware|Controller.Hardware.TouchscreenVirtualPad} outputs that were disabled using \r{@link Controller.captureTouchEvents|captureTouchEvents}."}}, + {"Controller.captureWheelEvents":{"prefix":"Controller.captureWheelEvents","body":["Controller.captureWheelEvents"],"description":"Disable processing of mouse wheel rotation events into {@link Controller.Hardware|Controller.Hardware.Keyboard} \routputs."}}, + {"Controller.releaseWheelEvents":{"prefix":"Controller.releaseWheelEvents","body":["Controller.releaseWheelEvents"],"description":"Enable processing of mouse wheel rotation events into {@link Controller.Hardware|Controller.Hardware.Keyboard} \routputs that wer disabled using {@link Controller.captureWheelEvents|captureWheelEvents}."}}, + {"Controller.captureActionEvents":{"prefix":"Controller.captureActionEvents","body":["Controller.captureActionEvents"],"description":"Disable translating and rotating the user's avatar in response to keyboard and controller controls."}}, + {"Controller.releaseActionEvents":{"prefix":"Controller.releaseActionEvents","body":["Controller.releaseActionEvents"],"description":"Enable translating and rotating the user's avatar in response to keyboard and controller controls that were disabled \rusing {@link Controller.captureActionEvents|captureActionEvents}."}}, + {"Controller.actionEvent":{"prefix":"Controller.actionEvent","body":["Controller.actionEvent(${1:actionID: number},${2:value: number})"],"description":"Triggered when an action occurs."}}, + {"Controller.inputEvent":{"prefix":"Controller.inputEvent","body":["Controller.inputEvent(${1:action: number},${2:value: number})"],"description":"Triggered when there is a new controller input event."}}, + {"Controller.hardwareChanged":{"prefix":"Controller.hardwareChanged","body":["Controller.hardwareChanged"],"description":"Triggered when a device is registered or unregistered by a plugin. Not all plugins generate \rhardwareChanged events: for example connecting or disconnecting a mouse will not generate an event but \rconnecting or disconnecting an Xbox controller will."}}, + {"Controller.deviceRunningChanged":{"prefix":"Controller.deviceRunningChanged","body":["Controller.deviceRunningChanged(${1:deviceName: string},${2:isEnabled: boolean})"],"description":"Triggered when a device is enabled/disabled\rEnabling/Disabling Leapmotion on settings/controls will trigger this signal."}}, + {"Controller.Standard":{"prefix":"Controller.Standard","body":["Controller.Standard"],"description":"

The Controller.Standard object has properties representing standard controller outputs. Those for physical \rcontrollers are based on the XBox controller, with aliases for PlayStation. The property values are integer IDs, uniquely \ridentifying each output. Read-only. These can be mapped to actions or functions in a {@link RouteObject} \rmapping.

\r\r

The data value provided by each control is either a number or a {@link Pose}. Numbers are typically normalized to\r0.0 or 1.0 for button states, the range 0.0 – 1.0 for unidirectional scales,\rand the range -1.0 – 1.0 for bidirectional scales.

\r\r

Each hardware device has a mapping from its outputs to Controller.Standard items, specified in a JSON file.\rFor example, \rleapmotion.json and\rvive.json.

\r\r\r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r\r \r
PropertyTypeDataDescription
Buttons
Anumbernumber\"A\" button pressed.
Bnumbernumber\"B\" button pressed.
Xnumbernumber\"X\" button pressed.
Ynumbernumber\"Y\" button pressed.
DLnumbernumberD-pad left pressed.
DRnumbernumberD-pad right pressed.
DUnumbernumberD-pad up pressed.
DDnumbernumberD-pad down pressed.
Startnumbernumber\"Start\" center button pressed.
Backnumbernumber\"Back\" center button pressed.
LBnumbernumberLeft bumper button pressed.
RBnumbernumberRight bumper button pressed.
Sticks
LXnumbernumberLeft stick x-axis scale.
LYnumbernumberLeft stick y-axis scale.
RXnumbernumberRight stick x-axis scale.
RYnumbernumberRight stick y-axis scale.
LSnumbernumberLeft stick button pressed.
RSnumbernumberRight stick button pressed.
LSTouchnumbernumberLeft stick is touched.
RSTouchnumbernumberRight stick is touched.
Triggers
LTnumbernumberLeft trigger scale.
RTnumbernumberRight trigger scale.
LTClicknumbernumberLeft trigger click.
RTClicknumbernumberRight trigger click.
LeftGripnumbernumberLeft grip scale.
RightGripnumbernumberRight grip scale.
LeftGripTouchnumbernumberLeft grip is touched.
RightGripTouchnumbernumberRight grip is touched.
Aliases, PlayStation Style Names
CrossnumbernumberAlias for A.
CirclenumbernumberAlias for B.
SquarenumbernumberAlias for X.
TrianglenumbernumberAlias for Y.
LeftnumbernumberAlias for DL.
RightnumbernumberAlias for DR.
UpnumbernumberAlias for DU.
DownnumbernumberAlias for DD.
SelectnumbernumberAlias for Back.
L1numbernumberAlias for LB.
R1numbernumberAlias for RB.
L3numbernumberAlias for LS.
R3numbernumberAlias for RS.
L2numbernumberAlias for LT.
R2numbernumberAlias for RT.
Finger Abstractions
LeftPrimaryThumbnumbernumberLeft primary thumb button pressed.
LeftSecondaryThumbnumbernumberLeft secondary thumb button pressed.\r
RightPrimaryThumbnumbernumberRight primary thumb button pressed.\r
RightSecondaryThumbnumbernumberRight secondary thumb button pressed.\r
LeftPrimaryThumbTouchnumbernumberLeft thumb touching primary thumb \r button.
LeftSecondaryThumbTouchnumbernumberLeft thumb touching secondary thumb \r button.
LeftThumbUpnumbernumberLeft thumb not touching primary or secondary \r thumb buttons.
RightPrimaryThumbTouchnumbernumberRight thumb touching primary thumb \r button.
RightSecondaryThumbTouchnumbernumberRight thumb touching secondary thumb \r button.
RightThumbUpnumbernumberRight thumb not touching primary or secondary \r thumb buttons.
LeftPrimaryIndexnumbernumberLeft primary index control pressed. \r To Do: Implement this for current controllers.
LeftSecondaryIndexnumbernumberLeft secondary index control pressed.\r
RightPrimaryIndexnumbernumberRight primary index control pressed. \r To Do: Implement this for current controllers.
RightSecondaryIndexnumbernumberRight secondary index control pressed.\r
LeftPrimaryIndexTouchnumbernumberLeft index finger is touching primary \r index finger control.
LeftSecondaryIndexTouchnumbernumberLeft index finger is touching \r secondary index finger control.
LeftIndexPointnumbernumberLeft index finger is pointing, not touching \r primary or secondary index finger controls.
RightPrimaryIndexTouchnumbernumberRight index finger is touching primary \r index finger control.
RightSecondaryIndexTouchnumbernumberRight index finger is touching \r secondary index finger control.
RightIndexPointnumbernumberRight index finger is pointing, not touching \r primary or secondary index finger controls.
Avatar Skeleton
Hipsnumber{@link Pose}Hips pose.
Spine2number{@link Pose}Spine2 pose.
Headnumber{@link Pose}Head pose.
LeftArmnumber{@link Pose}Left arm pose.
RightArmnumber{@link Pose}Right arm pose
LeftHandnumber{@link Pose}Left hand pose.
LeftHandThumb1number{@link Pose}Left thumb 1 finger joint pose.
LeftHandThumb2number{@link Pose}Left thumb 2 finger joint pose.
LeftHandThumb3number{@link Pose}Left thumb 3 finger joint pose.
LeftHandThumb4number{@link Pose}Left thumb 4 finger joint pose.
LeftHandIndex1number{@link Pose}Left index 1 finger joint pose.
LeftHandIndex2number{@link Pose}Left index 2 finger joint pose.
LeftHandIndex3number{@link Pose}Left index 3 finger joint pose.
LeftHandIndex4number{@link Pose}Left index 4 finger joint pose.
LeftHandMiddle1number{@link Pose}Left middle 1 finger joint pose.\r
LeftHandMiddle2number{@link Pose}Left middle 2 finger joint pose.\r
LeftHandMiddle3number{@link Pose}Left middle 3 finger joint pose.\r
LeftHandMiddle4number{@link Pose}Left middle 4 finger joint pose.\r
LeftHandRing1number{@link Pose}Left ring 1 finger joint pose.
LeftHandRing2number{@link Pose}Left ring 2 finger joint pose.
LeftHandRing3number{@link Pose}Left ring 3 finger joint pose.
LeftHandRing4number{@link Pose}Left ring 4 finger joint pose.
LeftHandPinky1number{@link Pose}Left pinky 1 finger joint pose.
LeftHandPinky2number{@link Pose}Left pinky 2 finger joint pose.
LeftHandPinky3number{@link Pose}Left pinky 3 finger joint pose.
LeftHandPinky4number{@link Pose}Left pinky 4 finger joint pose.
RightHandnumber{@link Pose}Right hand pose.
RightHandThumb1number{@link Pose}Right thumb 1 finger joint pose.\r
RightHandThumb2number{@link Pose}Right thumb 2 finger joint pose.\r
RightHandThumb3number{@link Pose}Right thumb 3 finger joint pose.\r
RightHandThumb4number{@link Pose}Right thumb 4 finger joint pose.\r
RightHandIndex1number{@link Pose}Right index 1 finger joint pose.\r
RightHandIndex2number{@link Pose}Right index 2 finger joint pose.\r
RightHandIndex3number{@link Pose}Right index 3 finger joint pose.\r
RightHandIndex4number{@link Pose}Right index 4 finger joint pose.\r
RightHandMiddle1number{@link Pose}Right middle 1 finger joint pose.\r
RightHandMiddle2number{@link Pose}Right middle 2 finger joint pose.\r
RightHandMiddle3number{@link Pose}Right middle 3 finger joint pose.\r
RightHandMiddle4number{@link Pose}Right middle 4 finger joint pose.\r
RightHandRing1number{@link Pose}Right ring 1 finger joint pose.
RightHandRing2number{@link Pose}Right ring 2 finger joint pose.
RightHandRing3number{@link Pose}Right ring 3 finger joint pose.
RightHandRing4number{@link Pose}Right ring 4 finger joint pose.
RightHandPinky1number{@link Pose}Right pinky 1 finger joint pose.\r
RightHandPinky2number{@link Pose}Right pinky 2 finger joint pose.\r
RightHandPinky3number{@link Pose}Right pinky 3 finger joint pose.\r
RightHandPinky4number{@link Pose}Right pinky 4 finger joint pose.\r
LeftFootnumber{@link Pose}Left foot pose.
RightFootnumber{@link Pose}Right foot pose.
Trackers
TrackedObject00number{@link Pose}Tracker 0 pose.
TrackedObject01number{@link Pose}Tracker 1 pose.
TrackedObject02number{@link Pose}Tracker 2 pose.
TrackedObject03number{@link Pose}Tracker 3 pose.
TrackedObject04number{@link Pose}Tracker 4 pose.
TrackedObject05number{@link Pose}Tracker 5 pose.
TrackedObject06number{@link Pose}Tracker 6 pose.
TrackedObject07number{@link Pose}Tracker 7 pose.
TrackedObject08number{@link Pose}Tracker 8 pose.
TrackedObject09number{@link Pose}Tracker 9 pose.
TrackedObject10number{@link Pose}Tracker 10 pose.
TrackedObject11number{@link Pose}Tracker 11 pose.
TrackedObject12number{@link Pose}Tracker 12 pose.
TrackedObject13number{@link Pose}Tracker 13 pose.
TrackedObject14number{@link Pose}Tracker 14 pose.
TrackedObject15number{@link Pose}Tracker 15 pose.
"}}, + {"MappingObject":{"prefix":"MappingObject","body":["MappingObject"],"description":"
Available in:Interface ScriptsClient Entity Scripts

A {@link Controller} mapping object that can contain a set of routes that map:

\r
    \r
  • {@link Controller.Standard} outputs to {@link Controller.Actions} actions or script functions.
  • \r
  • {@link Controller.Hardware} outputs to {@link Controller.Standard} outputs, {@link Controller.Actions} actions, or \r script functions.
  • \r
\r\r

Create by one of the following methods:

\r
    \r
  • Use {@link Controller.newMapping} to create the mapping object, add routes using {@link MappingObject#from|from} or\r {@link MappingObject#makeAxis|makeAxis}, and map the routes to actions or functions using {@link RouteObject} \r methods.
  • \r
  • Use {@link Controller.parseMapping} or {@link Controller.loadMapping} to load a {@link Controller.MappingJSON}.
  • \r
\r\r

Enable the mapping using {@link MappingObject#enable|enable} or {@link Controller.enableMapping} for it to take \reffect.

\r\r

Mappings and their routes are applied according to the following rules:

\r
    \r
  • One read per output: after a controller output has been read, it can't be read again. Exception: You can use \r {@link RouteObject#peek} to read a value without marking that output as having been read.
  • \r
  • Existing mapping routes take precedence over new mapping routes: within a mapping, if a route is added for a control \r output that already has a route the new route is ignored.
  • \r
  • New mappings override previous mappings: each output is processed using the route in the most recently enabled \r mapping that contains that output.
  • \r
"}}, + {"Controller.MappingJSON":{"prefix":"Controller.MappingJSON","body":["Controller.MappingJSON"],"description":"A {@link MappingObject} can be specified in JSON format. A simple example is provided below. Full examples — the \rdefault mappings provided in Interface — can be found at \r\rhttps://github.com/highfidelity/hifi/tree/master/interface/resources/controllers."}}, + {"Controller.MappingJSONRoute":{"prefix":"Controller.MappingJSONRoute","body":["Controller.MappingJSONRoute"],"description":"A route in a {@link Controller.MappingJSON}."}}, + {"Controller.MappingJSONAxis":{"prefix":"Controller.MappingJSONAxis","body":["Controller.MappingJSONAxis"],"description":"An axis pair in a {@link Controller.MappingJSONRoute}."}}, + {"Controller.MappingJSONFilter":{"prefix":"Controller.MappingJSONFilter","body":["Controller.MappingJSONFilter"],"description":"A filter in a {@link Controller.MappingJSONRoute}."}}, + {"MappingObject#fromQml":{"prefix":"MappingObject#fromQml","body":["MappingObject#fromQml(${1:source: Controller.Standard})"],"description":"Create a new {@link RouteObject} from a controller output, ready to be mapped to a standard control, action, or \rfunction.
\rThis is a QML-specific version of {@link MappingObject#from|from}: use this version in QML files."}}, + {"MappingObject#makeAxisQml":{"prefix":"MappingObject#makeAxisQml","body":["MappingObject#makeAxisQml(${1:source1: Controller.Hardware},${2:source2: Controller.Hardware})"],"description":"Create a new {@link RouteObject} from two numeric {@link Controller.Hardware} outputs, one applied in the negative \rdirection and the other in the positive direction, ready to be mapped to a standard control, action, or function.
\rThis is a QML-specific version of {@link MappingObject#makeAxis|makeAxis}: use this version in QML files."}}, + {"MappingObject#from":{"prefix":"MappingObject#from","body":["MappingObject#from(${1:source: Controller.Standard})"],"description":"Create a new {@link RouteObject} from a controller output, ready to be mapped to a standard control, action, or \rfunction."}}, + {"MappingObject#makeAxis":{"prefix":"MappingObject#makeAxis","body":["MappingObject#makeAxis(${1:source1: Controller.Hardware},${2:source2: Controller.Hardware})"],"description":"Create a new {@link RouteObject} from two numeric {@link Controller.Hardware} outputs, one applied in the negative \rdirection and the other in the positive direction, ready to be mapped to a standard control, action, or function."}}, + {"MappingObject#enable":{"prefix":"MappingObject#enable","body":["MappingObject#enable(${1:enable: boolean})"],"description":"Enable or disable the mapping. When enabled, the routes in the mapping take effect.
\rSynonymous with {@link Controller.enableMapping}."}}, + {"MappingObject#disable":{"prefix":"MappingObject#disable","body":["MappingObject#disable"],"description":"Disable the mapping. When disabled, the routes in the mapping have no effect.
\rSynonymous with {@link Controller.disableMapping}."}}, + {"RouteObject":{"prefix":"RouteObject","body":["RouteObject"],"description":"
Available in:Interface ScriptsClient Entity Scripts

A route in a {@link MappingObject} used by the {@link Controller} API.

\r\r

Create a route using {@link MappingObject} methods and apply this object's methods to process it, terminating with \r{@link RouteObject#to} to apply it to a Standard control, action, or script function. Note: Loops are not \rpermitted.

\r\r

Some methods apply to routes with number data, some apply routes with {@link Pose} data, and some apply to both route \rtypes.

"}}, + {"RouteObject#toQml":{"prefix":"RouteObject#toQml","body":["RouteObject#toQml(${1:destination: Controller.Standard})"],"description":"Terminate the route with a standard control, an action, or a script function. The output value from the route is \rsent to the specified destination.
\rThis is a QML-specific version of {@link MappingObject#to|to}: use this version in QML files."}}, + {"RouteObject#whenQml":{"prefix":"RouteObject#whenQml","body":["RouteObject#whenQml(${1:expression: condition})"],"description":"Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and\rthe input is read only if the condition is true. Thus, if the condition is not met then subsequent\rroutes using the same input are processed.
\rThis is a QML-specific version of {@link MappingObject#to|to}: use this version in QML files."}}, + {"RouteObject#to":{"prefix":"RouteObject#to","body":["RouteObject#to(${1:destination: Controller.Standard})"],"description":"Terminate the route with a standard control, an action, or a script function. The output value from the route is \rsent to the specified destination."}}, + {"RouteObject#debug":{"prefix":"RouteObject#debug","body":["RouteObject#debug(${1:enable: boolean})"],"description":"Enable and disabling writing debug information for a route to the program log."}}, + {"RouteObject#peek":{"prefix":"RouteObject#peek","body":["RouteObject#peek(${1:enable: boolean})"],"description":"Process the route without marking the controller output as having been read, so that other routes from the same \rcontroller output can also process."}}, + {"RouteObject#when":{"prefix":"RouteObject#when","body":["RouteObject#when(${1:expression: condition})"],"description":"Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and \rthe input is read only if the condition is true. Thus, if the condition is not met then subsequent \rroutes using the same input are processed."}}, + {"RouteObject#clamp":{"prefix":"RouteObject#clamp","body":["RouteObject#clamp(${1:min: number},${2:max: number})"],"description":"Filter numeric route values to lie between two values; values outside this range are not passed on through the \rroute."}}, + {"RouteObject#hysteresis":{"prefix":"RouteObject#hysteresis","body":["RouteObject#hysteresis(${1:min: number},${2:max: number})"],"description":"Filter numeric route values such that they are rounded to 0 or 1 without output values \rflickering when the input value hovers around 0.5. For example, this enables you to use an analog input \ras if it were a toggle."}}, + {"RouteObject#pulse":{"prefix":"RouteObject#pulse","body":["RouteObject#pulse(${1:interval: number})"],"description":"Filter numeric route values to send at a specified interval."}}, + {"RouteObject#scale":{"prefix":"RouteObject#scale","body":["RouteObject#scale(${1:multiplier: number})"],"description":"Filter numeric and {@link Pose} route values to be scaled by a constant amount."}}, + {"RouteObject#invert":{"prefix":"RouteObject#invert","body":["RouteObject#invert"],"description":"Filter numeric and {@link Pose} route values to have the opposite sign, e.g., 0.5 is changed to \r-0.5."}}, + {"RouteObject#deadZone":{"prefix":"RouteObject#deadZone","body":["RouteObject#deadZone(${1:min: number})"],"description":"Filter numeric route values such that they're sent only when the input value is outside a dead-zone. When the input \rpasses the dead-zone value, output is sent starting at 0.0 and catching up with the input value. As the \rinput returns toward the dead-zone value, output values reduce to 0.0 at the dead-zone value."}}, + {"RouteObject#constrainToInteger":{"prefix":"RouteObject#constrainToInteger","body":["RouteObject#constrainToInteger"],"description":"Filter numeric route values such that they are rounded to -1, 0, or 1.\rFor example, this enables you to use an analog input as if it were a toggle or, in the case of a bidirectional axis, \ra tri-state switch."}}, + {"RouteObject#constrainToPositiveInteger":{"prefix":"RouteObject#constrainToPositiveInteger","body":["RouteObject#constrainToPositiveInteger"],"description":"Filter numeric route values such that they are rounded to 0 or 1. For example, this \renables you to use an analog input as if it were a toggle."}}, + {"RouteObject#translate":{"prefix":"RouteObject#translate","body":["RouteObject#translate(${1:translate: Vec3})"],"description":"Filter {@link Pose} route values to have a pre-translation applied."}}, + {"RouteObject#transform":{"prefix":"RouteObject#transform","body":["RouteObject#transform(${1:transform: Mat4})"],"description":"Filter {@link Pose} route values to have a pre-transform applied."}}, + {"RouteObject#postTransform":{"prefix":"RouteObject#postTransform","body":["RouteObject#postTransform(${1:transform: Mat4})"],"description":"Filter {@link Pose} route values to have a post-transform applied."}}, + {"RouteObject#rotate":{"prefix":"RouteObject#rotate","body":["RouteObject#rotate(${1:rotation: Quat})"],"description":"Filter {@link Pose} route values to have a pre-rotation applied."}}, + {"RouteObject#lowVelocity":{"prefix":"RouteObject#lowVelocity","body":["RouteObject#lowVelocity(${1:rotationConstant: number},${2:translationConstant: number})"],"description":"Filter {@link Pose} route values to be smoothed by a low velocity filter. The filter's rotation and translation \rvalues are calculated as: (1 - f) * currentValue + f * previousValue where \rf = currentVelocity / filterConstant. At low velocities, the filter value is largely the previous \rvalue; at high velocities the value is wholly the current controller value."}}, + {"RouteObject#exponentialSmoothing":{"prefix":"RouteObject#exponentialSmoothing","body":["RouteObject#exponentialSmoothing(${1:rotationConstant: number},${2:translationConstant: number})"],"description":"Filter {@link Pose} route values to be smoothed by an exponential decay filter. The filter's rotation and \rtranslation values are calculated as: filterConstant * currentValue + (1 - filterConstant) * \rpreviousValue. Values near 1 are less smooth with lower latency; values near 0 are more smooth with higher \rlatency."}}, + {"RouteObject#logicalNot":{"prefix":"RouteObject#logicalNot","body":["RouteObject#logicalNot"],"description":"Filter numeric route values such that a value of 0.0 is changed to 1.0, and other values \rare changed to 0.0."}}, + {"HMD.IPDScaleChanged":{"prefix":"HMD.IPDScaleChanged","body":["HMD.IPDScaleChanged"],"description":"Triggered when the HMD.ipdScale property value changes."}}, + {"HMD.displayModeChanged":{"prefix":"HMD.displayModeChanged","body":["HMD.displayModeChanged(${1:isHMDMode: boolean})"],"description":"Triggered when Interface's display mode changes and when the user puts on or takes off their HMD."}}, + {"HMD.mountedChanged":{"prefix":"HMD.mountedChanged","body":["HMD.mountedChanged"],"description":"Triggered when the HMD.mounted property value changes."}}, + {"Reticle":{"prefix":"Reticle","body":["Reticle"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Reticle.isMouseCaptured":{"prefix":"Reticle.isMouseCaptured","body":["Reticle.isMouseCaptured"]}}, + {"Reticle.getAllowMouseCapture":{"prefix":"Reticle.getAllowMouseCapture","body":["Reticle.getAllowMouseCapture"]}}, + {"Reticle.setAllowMouseCapture":{"prefix":"Reticle.setAllowMouseCapture","body":["Reticle.setAllowMouseCapture(${1:allowMouseCaptured: boolean})"]}}, + {"Reticle.isPointingAtSystemOverlay":{"prefix":"Reticle.isPointingAtSystemOverlay","body":["Reticle.isPointingAtSystemOverlay"]}}, + {"Reticle.getVisible":{"prefix":"Reticle.getVisible","body":["Reticle.getVisible"]}}, + {"Reticle.setVisible":{"prefix":"Reticle.setVisible","body":["Reticle.setVisible(${1:visible: boolean})"]}}, + {"Reticle.getDepth":{"prefix":"Reticle.getDepth","body":["Reticle.getDepth"]}}, + {"Reticle.setDepth":{"prefix":"Reticle.setDepth","body":["Reticle.setDepth(${1:depth: number})"]}}, + {"Reticle.getScale":{"prefix":"Reticle.getScale","body":["Reticle.getScale"]}}, + {"Reticle.setScale":{"prefix":"Reticle.setScale","body":["Reticle.setScale(${1:scale: number})"]}}, + {"Reticle.getPosition":{"prefix":"Reticle.getPosition","body":["Reticle.getPosition"]}}, + {"Reticle.setPosition":{"prefix":"Reticle.setPosition","body":["Reticle.setPosition(${1:position: Vec2})"]}}, + {"Reticle.getMaximumPosition":{"prefix":"Reticle.getMaximumPosition","body":["Reticle.getMaximumPosition"]}}, + {"Entities.AmbientLight":{"prefix":"Entities.AmbientLight","body":["Entities.AmbientLight"],"description":"Ambient light is defined by the following properties."}}, + {"Entities.AnimationProperties":{"prefix":"Entities.AnimationProperties","body":["Entities.AnimationProperties"],"description":"The AnimationProperties are used to configure an animation."}}, + {"Entities.Bloom":{"prefix":"Entities.Bloom","body":["Entities.Bloom"],"description":"Bloom is defined by the following properties."}}, + {"Entities.ActionType":{"prefix":"Entities.ActionType","body":["Entities.ActionType"],"description":"

An entity action may be one of the following types:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueTypeDescriptionArguments
\"far-grab\"Avatar actionMoves and rotates an entity to a target position and orientation, optionally relative to another entity. Collisions \r between the entity and the user's avatar are disabled during the far-grab.{@link Entities.ActionArguments-FarGrab}
\"hold\"Avatar actionPositions and rotates an entity relative to an avatar's hand. Collisions between the entity and the user's avatar \r are disabled during the hold.{@link Entities.ActionArguments-Hold}
\"offset\"Object actionMoves an entity so that it is a set distance away from a target point.{@link Entities.ActionArguments-Offset}
\"tractor\"Object actionMoves and rotates an entity to a target position and orientation, optionally relative to another entity.{@link Entities.ActionArguments-Tractor}
\"travel-oriented\"Object actionOrients an entity to align with its direction of travel.{@link Entities.ActionArguments-TravelOriented}
\"hinge\"Object constraintLets an entity pivot about an axis or connects two entities with a hinge joint.{@link Entities.ActionArguments-Hinge}
\"slider\"Object constraintLets an entity slide and rotate along an axis, or connects two entities that slide and rotate along a shared \r axis.{@link Entities.ActionArguments-Slider|ActionArguments-Slider}
\"cone-twist\"Object constraintConnects two entities with a joint that can move through a cone and can twist.{@link Entities.ActionArguments-ConeTwist}
\"ball-socket\"Object constraintConnects two entities with a ball and socket joint.{@link Entities.ActionArguments-BallSocket}
\"spring\"Synonym for \"tractor\". Legacy value.
"}}, + {"Entities.EntityProperties":{"prefix":"Entities.EntityProperties","body":["Entities.EntityProperties"],"description":"Different entity types have different properties: some common to all entities (listed below) and some specific to each \r{@link Entities.EntityType|EntityType} (linked to below). The properties are accessed as an object of property names and \rvalues."}}, + {"Entities.EntityProperties-Box":{"prefix":"Entities.EntityProperties-Box","body":["Entities.EntityProperties-Box"],"description":"The \"Box\" {@link Entities.EntityType|EntityType} is the same as the \"Shape\"\r{@link Entities.EntityType|EntityType} except that its shape value is always set to \"Cube\"\rwhen the entity is created. If its shape property value is subsequently changed then the entity's \rtype will be reported as \"Sphere\" if the shape is set to \"Sphere\", \rotherwise it will be reported as \"Shape\"."}}, + {"Entities.EntityProperties-Light":{"prefix":"Entities.EntityProperties-Light","body":["Entities.EntityProperties-Light"],"description":"The \"Light\" {@link Entities.EntityType|EntityType} adds local lighting effects.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-Line":{"prefix":"Entities.EntityProperties-Line","body":["Entities.EntityProperties-Line"],"description":"The \"Line\" {@link Entities.EntityType|EntityType} draws thin, straight lines between a sequence of two or more \rpoints.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-Material":{"prefix":"Entities.EntityProperties-Material","body":["Entities.EntityProperties-Material"],"description":"The \"Material\" {@link Entities.EntityType|EntityType} modifies the existing materials on\r{@link Entities.EntityType|Model} entities, {@link Entities.EntityType|Shape} entities (albedo only), \r{@link Overlays.OverlayType|model overlays}, and avatars.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.
\rTo apply a material to an entity or overlay, set the material entity's parentID property to the entity or \roverlay's ID.\rTo apply a material to an avatar, set the material entity's parentID property to the avatar's session UUID.\rTo apply a material to your avatar such that it persists across domains and log-ins, create the material as an avatar entity \rby setting the clientOnly parameter in {@link Entities.addEntity} to true.\rMaterial entities render as non-scalable spheres if they don't have their parent set."}}, + {"Entities.EntityProperties-Model":{"prefix":"Entities.EntityProperties-Model","body":["Entities.EntityProperties-Model"],"description":"The \"Model\" {@link Entities.EntityType|EntityType} displays an FBX or OBJ model.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-ParticleEffect":{"prefix":"Entities.EntityProperties-ParticleEffect","body":["Entities.EntityProperties-ParticleEffect"],"description":"The \"ParticleEffect\" {@link Entities.EntityType|EntityType} displays a particle system that can be used to \rsimulate things such as fire, smoke, snow, magic spells, etc. The particles emanate from an ellipsoid or part thereof.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-PolyLine":{"prefix":"Entities.EntityProperties-PolyLine","body":["Entities.EntityProperties-PolyLine"],"description":"The \"PolyLine\" {@link Entities.EntityType|EntityType} draws textured, straight lines between a sequence of \rpoints.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-PolyVox":{"prefix":"Entities.EntityProperties-PolyVox","body":["Entities.EntityProperties-PolyVox"],"description":"The \"PolyVox\" {@link Entities.EntityType|EntityType} displays a set of textured voxels. \rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.\rIf you have two or more neighboring PolyVox entities of the same size abutting each other, you can display them as joined by\rconfiguring their voxelSurfaceStyle and neighbor ID properties.
\rPolyVox entities uses a library from Volumes of Fun. Their\rlibrary documentation may be useful to read."}}, + {"Entities.EntityProperties-Shape":{"prefix":"Entities.EntityProperties-Shape","body":["Entities.EntityProperties-Shape"],"description":"The \"Shape\" {@link Entities.EntityType|EntityType} displays an entity of a specified shape.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-Sphere":{"prefix":"Entities.EntityProperties-Sphere","body":["Entities.EntityProperties-Sphere"],"description":"The \"Sphere\" {@link Entities.EntityType|EntityType} is the same as the \"Shape\"\r{@link Entities.EntityType|EntityType} except that its shape value is always set to \"Sphere\"\rwhen the entity is created. If its shape property value is subsequently changed then the entity's \rtype will be reported as \"Box\" if the shape is set to \"Cube\", \rotherwise it will be reported as \"Shape\"."}}, + {"Entities.EntityProperties-Text":{"prefix":"Entities.EntityProperties-Text","body":["Entities.EntityProperties-Text"],"description":"The \"Text\" {@link Entities.EntityType|EntityType} displays a 2D rectangle of text in the domain.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-Web":{"prefix":"Entities.EntityProperties-Web","body":["Entities.EntityProperties-Web"],"description":"The \"Web\" {@link Entities.EntityType|EntityType} displays a browsable Web page. Each user views their own copy \rof the Web page: if one user navigates to another page on the entity, other users do not see the change; if a video is being \rplayed, users don't see it in sync.\rThe entity has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.EntityProperties-Zone":{"prefix":"Entities.EntityProperties-Zone","body":["Entities.EntityProperties-Zone"],"description":"The \"Zone\" {@link Entities.EntityType|EntityType} is a volume of lighting effects and avatar permissions.\rAvatar interaction events such as {@link Entities.enterEntity} are also often used with a Zone entity.\rIt has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}."}}, + {"Entities.BoundingBox":{"prefix":"Entities.BoundingBox","body":["Entities.BoundingBox"],"description":"The axis-aligned bounding box of an entity."}}, + {"Entities.RenderInfo":{"prefix":"Entities.RenderInfo","body":["Entities.RenderInfo"],"description":"Information on how an entity is rendered. Properties are only filled in for Model entities; other \rentity types have an empty object, {}."}}, + {"Entities.RayToEntityIntersectionResult":{"prefix":"Entities.RayToEntityIntersectionResult","body":["Entities.RayToEntityIntersectionResult"],"description":"The result of a {@link PickRay} search using {@link Entities.findRayIntersection|findRayIntersection} or \r{@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}."}}, + {"Entities":{"prefix":"Entities","body":["Entities"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Entities API provides facilities to create and interact with entities. Entities are 2D and 3D objects that are visible\rto everyone and typically are persisted to the domain. For Interface scripts, the entities available are those that \rInterface has displayed and so knows about."}}, + {"Entities.getMultipleEntityProperties":{"prefix":"Entities.getMultipleEntityProperties","body":["Entities.getMultipleEntityProperties(${1:entityIDs: Array.},${2:desiredProperties: Array.})"],"description":"Get the properties of multiple entities."}}, + {"Entities.canAdjustLocks":{"prefix":"Entities.canAdjustLocks","body":["Entities.canAdjustLocks"],"description":"Check whether or not you can change the locked property of entities. Locked entities have their \rlocked property set to true and cannot be edited or deleted. Whether or not you can change \rentities' locked properties is configured in the domain server's permissions."}}, + {"Entities.canRez":{"prefix":"Entities.canRez","body":["Entities.canRez"],"description":"Check whether or not you can rez (create) new entities in the domain."}}, + {"Entities.canRezTmp":{"prefix":"Entities.canRezTmp","body":["Entities.canRezTmp"],"description":"Check whether or not you can rez (create) new temporary entities in the domain. Temporary entities are entities with a\rfinite lifetime property value set."}}, + {"Entities.canRezCertified":{"prefix":"Entities.canRezCertified","body":["Entities.canRezCertified"],"description":"Check whether or not you can rez (create) new certified entities in the domain. Certified entities are entities that have\rPoP certificates."}}, + {"Entities.canRezTmpCertified":{"prefix":"Entities.canRezTmpCertified","body":["Entities.canRezTmpCertified"],"description":"Check whether or not you can rez (create) new temporary certified entities in the domain. Temporary entities are entities\rwith a finite lifetime property value set. Certified entities are entities that have PoP certificates."}}, + {"Entities.canWriteAssets":{"prefix":"Entities.canWriteAssets","body":["Entities.canWriteAssets"],"description":"Check whether or not you can make changes to the asset server's assets."}}, + {"Entities.canReplaceContent":{"prefix":"Entities.canReplaceContent","body":["Entities.canReplaceContent"],"description":"Check whether or not you can replace the domain's content set."}}, + {"Entities.addEntity":{"prefix":"Entities.addEntity","body":["Entities.addEntity(${1:properties: Entities.EntityProperties},${2:clientOnly: boolean})"],"description":"Add a new entity with specified properties."}}, + {"Entities.cloneEntity":{"prefix":"Entities.cloneEntity","body":["Entities.cloneEntity(${1:entityID: Uuid})"],"description":"Create a clone of an entity. A clone can be created by a client that doesn't have rez permissions in the current domain.\rThe entity must have its cloneable property set to true. The clone has a modified name, other \rproperties set per its clone related-properties, and its clone-related properties are set to defaults."}}, + {"Entities.getEntityProperties":{"prefix":"Entities.getEntityProperties","body":["Entities.getEntityProperties(${1:entityID: Uuid},${2:desiredProperties: Array.})"],"description":"Get the properties of an entity."}}, + {"Entities.editEntity":{"prefix":"Entities.editEntity","body":["Entities.editEntity(${1:entityID: Uuid},${2:properties: Entities.EntityProperties})"],"description":"Update an entity with specified properties."}}, + {"Entities.deleteEntity":{"prefix":"Entities.deleteEntity","body":["Entities.deleteEntity(${1:entityID: Uuid})"],"description":"Delete an entity."}}, + {"Entities.callEntityMethod":{"prefix":"Entities.callEntityMethod","body":["Entities.callEntityMethod(${1:entityID: Uuid},${2:method: string},${3:parameters: Array.})"],"description":"Call a method in a client entity script from a client script or client entity script, or call a method in a server \rentity script from a server entity script. The entity script method must be exposed as a property in the target client \rentity script. Additionally, if calling a server entity script, the server entity script must include the method's name \rin an exposed property called remotelyCallable that is an array of method names that can be called."}}, + {"Entities.callEntityServerMethod":{"prefix":"Entities.callEntityServerMethod","body":["Entities.callEntityServerMethod(${1:entityID: Uuid},${2:method: string},${3:parameters: Array.})"],"description":"Call a method in a server entity script from a client script or client entity script. The entity script method must be \rexposed as a property in the target server entity script. Additionally, the target server entity script must include the \rmethod's name in an exposed property called remotelyCallable that is an array of method names that can be \rcalled."}}, + {"Entities.callEntityClientMethod":{"prefix":"Entities.callEntityClientMethod","body":["Entities.callEntityClientMethod(${1:clientSessionID: Uuid},${2:entityID: Uuid},${3:method: string},${4:parameters: Array.})"],"description":"Call a method in a specific user's client entity script from a server entity script. The entity script method must be \rexposed as a property in the target client entity script."}}, + {"Entities.findClosestEntity":{"prefix":"Entities.findClosestEntity","body":["Entities.findClosestEntity(${1:center: Vec3},${2:radius: number})"],"description":"Find the entity with a position closest to a specified point and within a specified radius."}}, + {"Entities.findEntities":{"prefix":"Entities.findEntities","body":["Entities.findEntities(${1:center: Vec3},${2:radius: number})"],"description":"Find all entities that intersect a sphere defined by a center point and radius."}}, + {"Entities.findEntitiesInBox":{"prefix":"Entities.findEntitiesInBox","body":["Entities.findEntitiesInBox(${1:corner: Vec3},${2:dimensions: Vec3})"],"description":"Find all entities whose axis-aligned boxes intersect a search axis-aligned box defined by its minimum coordinates corner\rand dimensions."}}, + {"Entities.findEntitiesInFrustum":{"prefix":"Entities.findEntitiesInFrustum","body":["Entities.findEntitiesInFrustum(${1:frustum: ViewFrustum})"],"description":"Find all entities whose axis-aligned boxes intersect a search frustum."}}, + {"Entities.findEntitiesByType":{"prefix":"Entities.findEntitiesByType","body":["Entities.findEntitiesByType(${1:entityType: Entities.EntityType},${2:center: Vec3},${3:radius: number})"],"description":"Find all entities of a particular type that intersect a sphere defined by a center point and radius."}}, + {"Entities.findEntitiesByName":{"prefix":"Entities.findEntitiesByName","body":["Entities.findEntitiesByName(${1:entityName: string},${2:center: Vec3},${3:radius: number},${4:caseSensitive: boolean})"],"description":"Find all entities of a particular name that intersect a sphere defined by a center point and radius."}}, + {"Entities.findRayIntersection":{"prefix":"Entities.findRayIntersection","body":["Entities.findRayIntersection(${1:pickRay: PickRay},${2:precisionPicking: boolean},${3:entitiesToInclude: Array.},${4:entitiesToDiscard: Array.},${5:visibleOnly: boolean},${6:collideableOnly: boolean})"],"description":"Find the first entity intersected by a {@link PickRay}. Light and Zone entities are not \rintersected unless they've been configured as pickable using {@link Entities.setLightsArePickable|setLightsArePickable}\rand {@link Entities.setZonesArePickable|setZonesArePickable}, respectively.
"}}, + {"Entities.findRayIntersectionBlocking":{"prefix":"Entities.findRayIntersectionBlocking","body":["Entities.findRayIntersectionBlocking(${1:pickRay: PickRay},${2:precisionPicking: boolean},${3:entitiesToInclude: Array.},${4:entitiesToDiscard: Array.})"],"description":"Find the first entity intersected by a {@link PickRay}. Light and Zone entities are not \rintersected unless they've been configured as pickable using {@link Entities.setLightsArePickable|setLightsArePickable} \rand {@link Entities.setZonesArePickable|setZonesArePickable}, respectively.
\rThis is a synonym for {@link Entities.findRayIntersection|findRayIntersection}."}}, + {"Entities.reloadServerScripts":{"prefix":"Entities.reloadServerScripts","body":["Entities.reloadServerScripts(${1:entityID: Uuid})"],"description":"Reloads an entity's server entity script such that the latest version re-downloaded."}}, + {"Entities.getServerScriptStatus":{"prefix":"Entities.getServerScriptStatus","body":["Entities.getServerScriptStatus(${1:entityID: Uuid},${2:callback: Entities~getServerScriptStatusCallback})"],"description":"Gets the status of server entity script attached to an entity"}}, + {"Entities~getServerScriptStatusCallback":{"prefix":"Entities~getServerScriptStatusCallback","body":["Entities~getServerScriptStatusCallback(${1:success: boolean},${2:isRunning: boolean},${3:status: string},${4:errorInfo: string})"],"description":"Called when {@link Entities.getServerScriptStatus} is complete."}}, + {"Entities.queryPropertyMetadata":{"prefix":"Entities.queryPropertyMetadata","body":["Entities.queryPropertyMetadata(${1:entityID: Uuid},${2:property: string},${3:callback: Entities~queryPropertyMetadataCallback})"],"description":"Get metadata for certain entity properties such as script and serverScripts."}}, + {"Entities.queryPropertyMetadata":{"prefix":"Entities.queryPropertyMetadata","body":["Entities.queryPropertyMetadata(${1:entityID: Uuid},${2:property: string},${3:scope: object},${4:callback: Entities~queryPropertyMetadataCallback})"],"description":"Get metadata for certain entity properties such as script and serverScripts."}}, + {"Entities~queryPropertyMetadataCallback":{"prefix":"Entities~queryPropertyMetadataCallback","body":["Entities~queryPropertyMetadataCallback(${1:error: string},${2:result: object})"],"description":"Called when {@link Entities.queryPropertyMetadata} is complete."}}, + {"Entities.setLightsArePickable":{"prefix":"Entities.setLightsArePickable","body":["Entities.setLightsArePickable(${1:value: boolean})"],"description":"Set whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Light} entities. By default, Light \rentities are not intersected. The setting lasts for the Interface session. Ray picks are done using \r {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs."}}, + {"Entities.getLightsArePickable":{"prefix":"Entities.getLightsArePickable","body":["Entities.getLightsArePickable"],"description":"Get whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Light} entities. Ray picks are \r done using {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs."}}, + {"Entities.setZonesArePickable":{"prefix":"Entities.setZonesArePickable","body":["Entities.setZonesArePickable(${1:value: boolean})"],"description":"Set whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Zone} entities. By default, Light \rentities are not intersected. The setting lasts for the Interface session. Ray picks are done using \r {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs."}}, + {"Entities.getZonesArePickable":{"prefix":"Entities.getZonesArePickable","body":["Entities.getZonesArePickable"],"description":"Get whether or not ray picks intersect the bounding box of {@link Entities.EntityType|Zone} entities. Ray picks are \r done using {@link Entities.findRayIntersection|findRayIntersection} or \r {@link Entities.findRayIntersectionBlocking|findRayIntersectionBlocking}, or the {@link Picks} and {@link RayPick} \r APIs."}}, + {"Entities.setDrawZoneBoundaries":{"prefix":"Entities.setDrawZoneBoundaries","body":["Entities.setDrawZoneBoundaries(${1:value: boolean})"],"description":"Set whether or not {@link Entities.EntityType|Zone} entities' boundaries should be drawn. Currently not used."}}, + {"Entities.getDrawZoneBoundaries":{"prefix":"Entities.getDrawZoneBoundaries","body":["Entities.getDrawZoneBoundaries"],"description":"Get whether or not {@link Entities.EntityType|Zone} entities' boundaries should be drawn. Currently not used."}}, + {"Entities.setVoxelSphere":{"prefix":"Entities.setVoxelSphere","body":["Entities.setVoxelSphere(${1:entityID: Uuid},${2:center: Vec3},${3:radius: number},${4:value: number})"],"description":"Set the values of all voxels in a spherical portion of a {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities.setVoxelCapsule":{"prefix":"Entities.setVoxelCapsule","body":["Entities.setVoxelCapsule(${1:entityID: Uuid},${2:start: Vec3},${3:end: Vec3},${4:radius: number},${5:value: number})"],"description":"Set the values of all voxels in a capsule-shaped portion of a {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities.setVoxel":{"prefix":"Entities.setVoxel","body":["Entities.setVoxel(${1:entityID: Uuid},${2:position: Vec3},${3:value: number})"],"description":"Set the value of a particular voxels in a {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities.setAllVoxels":{"prefix":"Entities.setAllVoxels","body":["Entities.setAllVoxels(${1:entityID: Uuid},${2:value: number})"],"description":"Set the values of all voxels in a {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities.setVoxelsInCuboid":{"prefix":"Entities.setVoxelsInCuboid","body":["Entities.setVoxelsInCuboid(${1:entityID: Uuid},${2:lowPosition: Vec3},${3:cuboidSize: Vec3},${4:value: number})"],"description":"Set the values of all voxels in a cubic portion of a {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities.voxelCoordsToWorldCoords":{"prefix":"Entities.voxelCoordsToWorldCoords","body":["Entities.voxelCoordsToWorldCoords(${1:entityID: Uuid},${2:voxelCoords: Vec3})"],"description":"Convert voxel coordinates in a {@link Entities.EntityType|PolyVox} entity to world coordinates. Voxel coordinates are \rrelative to the minimum axes values corner of the entity with a scale of Vec3.ONE being the dimensions of \reach voxel."}}, + {"Entities.worldCoordsToVoxelCoords":{"prefix":"Entities.worldCoordsToVoxelCoords","body":["Entities.worldCoordsToVoxelCoords(${1:entityID: Uuid},${2:worldCoords: Vec3})"],"description":"Convert world coordinates to voxel coordinates in a {@link Entities.EntityType|PolyVox} entity. Voxel coordinates are \rrelative to the minimum axes values corner of the entity, with a scale of Vec3.ONE being the dimensions of \reach voxel."}}, + {"Entities.voxelCoordsToLocalCoords":{"prefix":"Entities.voxelCoordsToLocalCoords","body":["Entities.voxelCoordsToLocalCoords(${1:entityID: Uuid},${2:voxelCoords: Vec3})"],"description":"Convert voxel coordinates in a {@link Entities.EntityType|PolyVox} entity to local coordinates relative to the minimum \raxes value corner of the entity, with the scale being the same as world coordinates."}}, + {"Entities.localCoordsToVoxelCoords":{"prefix":"Entities.localCoordsToVoxelCoords","body":["Entities.localCoordsToVoxelCoords(${1:entityID: Uuid},${2:localCoords: Vec3})"],"description":"Convert local coordinates to voxel coordinates in a {@link Entities.EntityType|PolyVox} entity. Local coordinates are \rrelative to the minimum axes value corner of the entity, with the scale being the same as world coordinates."}}, + {"Entities.setAllPoints":{"prefix":"Entities.setAllPoints","body":["Entities.setAllPoints(${1:entityID: Uuid},${2:points: Array.})"],"description":"Set the linePoints property of a {@link Entities.EntityType|Line} entity."}}, + {"Entities.appendPoint":{"prefix":"Entities.appendPoint","body":["Entities.appendPoint(${1:entityID: Uuid},${2:point: Vec3})"],"description":"Append a point to a {@link Entities.EntityType|Line} entity."}}, + {"Entities.dumpTree":{"prefix":"Entities.dumpTree","body":["Entities.dumpTree"],"description":"Dumps debug information about all entities in Interface's local in-memory tree of entities it knows about — domain\rand client-only — to the program log."}}, + {"Entities.addAction":{"prefix":"Entities.addAction","body":["Entities.addAction(${1:actionType: Entities.ActionType},${2:entityID: Uuid},${3:arguments: Entities.ActionArguments})"],"description":"Add an action to an entity. An action is registered with the physics engine and is applied every physics simulation \rstep. Any entity may have more than one action associated with it, but only as many as will fit in an entity's \ractionData property."}}, + {"Entities.updateAction":{"prefix":"Entities.updateAction","body":["Entities.updateAction(${1:entityID: Uuid},${2:actionID: Uuid},${3:arguments: Entities.ActionArguments})"],"description":"Update an entity action."}}, + {"Entities.deleteAction":{"prefix":"Entities.deleteAction","body":["Entities.deleteAction(${1:entityID: Uuid},${2:actionID: Uuid})"],"description":"Delete an action from an entity."}}, + {"Entities.getActionIDs":{"prefix":"Entities.getActionIDs","body":["Entities.getActionIDs(${1:entityID: Uuid})"],"description":"Get the IDs of the actions that are associated with an entity."}}, + {"Entities.getActionArguments":{"prefix":"Entities.getActionArguments","body":["Entities.getActionArguments(${1:entityID: Uuid},${2:actionID: Uuid})"],"description":"Get the arguments of an action."}}, + {"Entities.getAbsoluteJointTranslationInObjectFrame":{"prefix":"Entities.getAbsoluteJointTranslationInObjectFrame","body":["Entities.getAbsoluteJointTranslationInObjectFrame(${1:entityID: Uuid},${2:jointIndex: number})"],"description":"Get the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation."}}, + {"Entities.getAbsoluteJointRotationInObjectFrame":{"prefix":"Entities.getAbsoluteJointRotationInObjectFrame","body":["Entities.getAbsoluteJointRotationInObjectFrame(${1:entityID: Uuid},${2:jointIndex: number})"],"description":"Get the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation."}}, + {"Entities.setAbsoluteJointTranslationInObjectFrame":{"prefix":"Entities.setAbsoluteJointTranslationInObjectFrame","body":["Entities.setAbsoluteJointTranslationInObjectFrame(${1:entityID: Uuid},${2:jointIndex: number},${3:translation: Vec3})"],"description":"Set the translation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation."}}, + {"Entities.setAbsoluteJointRotationInObjectFrame":{"prefix":"Entities.setAbsoluteJointRotationInObjectFrame","body":["Entities.setAbsoluteJointRotationInObjectFrame(${1:entityID: Uuid},${2:jointIndex: number},${3:rotation: Quat})"],"description":"Set the rotation of a joint in a {@link Entities.EntityType|Model} entity relative to the entity's position and \rorientation."}}, + {"Entities.getLocalJointTranslation":{"prefix":"Entities.getLocalJointTranslation","body":["Entities.getLocalJointTranslation(${1:entityID: Uuid},${2:jointIndex: number})"],"description":"Get the local translation of a joint in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.getLocalJointRotation":{"prefix":"Entities.getLocalJointRotation","body":["Entities.getLocalJointRotation(${1:entityID: Uuid},${2:jointIndex: number})"],"description":"Get the local rotation of a joint in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.setLocalJointTranslation":{"prefix":"Entities.setLocalJointTranslation","body":["Entities.setLocalJointTranslation(${1:entityID: Uuid},${2:jointIndex: number},${3:translation: Vec3})"],"description":"Set the local translation of a joint in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.setLocalJointRotation":{"prefix":"Entities.setLocalJointRotation","body":["Entities.setLocalJointRotation(${1:entityID: Uuid},${2:jointIndex: number},${3:rotation: Quat})"],"description":"Set the local rotation of a joint in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.setLocalJointTranslations":{"prefix":"Entities.setLocalJointTranslations","body":["Entities.setLocalJointTranslations(${1:entityID: Uuid},${2:translations: Array.})"],"description":"Set the local translations of joints in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.setLocalJointRotations":{"prefix":"Entities.setLocalJointRotations","body":["Entities.setLocalJointRotations(${1:entityID: Uuid},${2:rotations: Array.})"],"description":"Set the local rotations of joints in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.setLocalJointsData":{"prefix":"Entities.setLocalJointsData","body":["Entities.setLocalJointsData(${1:entityID: Uuid},${2:rotations: Array.},${3:translations: Array.})"],"description":"Set the local rotations and translations of joints in a {@link Entities.EntityType|Model} entity. This is the same as \rcalling both {@link Entities.setLocalJointRotations|setLocalJointRotations} and \r{@link Entities.setLocalJointTranslations|setLocalJointTranslations} at the same time."}}, + {"Entities.getJointIndex":{"prefix":"Entities.getJointIndex","body":["Entities.getJointIndex(${1:entityID: Uuid},${2:name: string})"],"description":"Get the index of a named joint in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.getJointNames":{"prefix":"Entities.getJointNames","body":["Entities.getJointNames(${1:entityID: Uuid})"],"description":"Get the names of all the joints in a {@link Entities.EntityType|Model} entity."}}, + {"Entities.getChildrenIDs":{"prefix":"Entities.getChildrenIDs","body":["Entities.getChildrenIDs(${1:parentID: Uuid})"],"description":"Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model. Recurse on the IDs returned by the function to get all descendants of an entity, overlay, or avatar."}}, + {"Entities.getChildrenIDsOfJoint":{"prefix":"Entities.getChildrenIDsOfJoint","body":["Entities.getChildrenIDsOfJoint(${1:parentID: Uuid},${2:jointIndex: number})"],"description":"Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model's joint."}}, + {"Entities.isChildOfParent":{"prefix":"Entities.isChildOfParent","body":["Entities.isChildOfParent(${1:childID: Uuid},${2:parentID: Uuid})"],"description":"Check whether an entity or overlay has an entity as an ancestor (parent, parent's parent, etc.)."}}, + {"Entities.getNestableType":{"prefix":"Entities.getNestableType","body":["Entities.getNestableType(${1:entityID: Uuid})"],"description":"Get the type — entity, overlay, or avatar — of an in-world item."}}, + {"Entities.getKeyboardFocusEntity":{"prefix":"Entities.getKeyboardFocusEntity","body":["Entities.getKeyboardFocusEntity"],"description":"Get the ID of the {@link Entities.EntityType|Web} entity that has keyboard focus."}}, + {"Entities.setKeyboardFocusEntity":{"prefix":"Entities.setKeyboardFocusEntity","body":["Entities.setKeyboardFocusEntity(${1:entityID: Uuid})"],"description":"Set the {@link Entities.EntityType|Web} entity that has keyboard focus."}}, + {"Entities.sendMousePressOnEntity":{"prefix":"Entities.sendMousePressOnEntity","body":["Entities.sendMousePressOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.mousePressOnEntity|mousePressOnEntity} event."}}, + {"Entities.sendMouseMoveOnEntity":{"prefix":"Entities.sendMouseMoveOnEntity","body":["Entities.sendMouseMoveOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.mouseMoveOnEntity|mouseMoveOnEntity} event."}}, + {"Entities.sendMouseReleaseOnEntity":{"prefix":"Entities.sendMouseReleaseOnEntity","body":["Entities.sendMouseReleaseOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.mouseReleaseOnEntity|mouseReleaseOnEntity} event."}}, + {"Entities.sendClickDownOnEntity":{"prefix":"Entities.sendClickDownOnEntity","body":["Entities.sendClickDownOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.clickDownOnEntity|clickDownOnEntity} event."}}, + {"Entities.sendHoldingClickOnEntity":{"prefix":"Entities.sendHoldingClickOnEntity","body":["Entities.sendHoldingClickOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.holdingClickOnEntity|holdingClickOnEntity} event."}}, + {"Entities.sendClickReleaseOnEntity":{"prefix":"Entities.sendClickReleaseOnEntity","body":["Entities.sendClickReleaseOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.clickReleaseOnEntity|clickReleaseOnEntity} event."}}, + {"Entities.sendHoverEnterEntity":{"prefix":"Entities.sendHoverEnterEntity","body":["Entities.sendHoverEnterEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.hoverEnterEntity|hoverEnterEntity} event."}}, + {"Entities.sendHoverOverEntity":{"prefix":"Entities.sendHoverOverEntity","body":["Entities.sendHoverOverEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.hoverOverEntity|hoverOverEntity} event."}}, + {"Entities.sendHoverLeaveEntity":{"prefix":"Entities.sendHoverLeaveEntity","body":["Entities.sendHoverLeaveEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Emit a {@link Entities.hoverLeaveEntity|hoverLeaveEntity} event."}}, + {"Entities.wantsHandControllerPointerEvents":{"prefix":"Entities.wantsHandControllerPointerEvents","body":["Entities.wantsHandControllerPointerEvents(${1:entityID: Uuid})"],"description":"Check whether an entity wants hand controller pointer events. For example, a {@link Entities.EntityType|Web} entity does \rbut a {@link Entities.EntityType|Shape} entity doesn't."}}, + {"Entities.emitScriptEvent":{"prefix":"Entities.emitScriptEvent","body":["Entities.emitScriptEvent(${1:entityID: Uuid},${2:message: string})"],"description":"Send a script event over a {@link Entities.EntityType|Web} entity's EventBridge to the Web page's scripts."}}, + {"Entities.AABoxIntersectsCapsule":{"prefix":"Entities.AABoxIntersectsCapsule","body":["Entities.AABoxIntersectsCapsule(${1:brn: Vec3},${2:dimensions: Vec3},${3:start: Vec3},${4:end: Vec3},${5:radius: number})"],"description":"Check whether an axis-aligned box and a capsule intersect."}}, + {"Entities.getMeshes":{"prefix":"Entities.getMeshes","body":["Entities.getMeshes(${1:entityID: Uuid},${2:callback: Entities~getMeshesCallback})"],"description":"Get the meshes in a {@link Entities.EntityType|Model} or {@link Entities.EntityType|PolyVox} entity."}}, + {"Entities~getMeshesCallback":{"prefix":"Entities~getMeshesCallback","body":["Entities~getMeshesCallback(${1:meshes: Array.},${2:success: boolean})"],"description":"Called when {@link Entities.getMeshes} is complete."}}, + {"Entities.getEntityTransform":{"prefix":"Entities.getEntityTransform","body":["Entities.getEntityTransform(${1:entityID: Uuid})"],"description":"Get the object to world transform, excluding scale, of an entity."}}, + {"Entities.getEntityLocalTransform":{"prefix":"Entities.getEntityLocalTransform","body":["Entities.getEntityLocalTransform(${1:entityID: Uuid})"],"description":"Get the object to parent transform, excluding scale, of an entity."}}, + {"Entities.getStaticCertificateJSON":{"prefix":"Entities.getStaticCertificateJSON","body":["Entities.getStaticCertificateJSON(${1:entityID: Uuid})"],"description":"Get the static certificate for an entity. The static certificate contains static properties of the item which cannot \rbe altered."}}, + {"Entities.verifyStaticCertificateProperties":{"prefix":"Entities.verifyStaticCertificateProperties","body":["Entities.verifyStaticCertificateProperties(${1:entityID: Uuid})"],"description":"Verify the entity's proof of provenance, i.e., that the entity's certificateID property was produced by \rHigh Fidelity signing the entity's static certificate JSON."}}, + {"Entities.collisionWithEntity":{"prefix":"Entities.collisionWithEntity","body":["Entities.collisionWithEntity(${1:idA: Uuid},${2:idB: Uuid},${3:collision: Collision})"],"description":"Triggered on the client that is the physics simulation owner during the collision of two entities. Note: Isn't triggered \rfor a collision with an avatar."}}, + {"Entities.canAdjustLocksChanged":{"prefix":"Entities.canAdjustLocksChanged","body":["Entities.canAdjustLocksChanged(${1:canAdjustLocks: boolean})"],"description":"Triggered when your ability to change the locked property of entities changes."}}, + {"Entities.canRezChanged":{"prefix":"Entities.canRezChanged","body":["Entities.canRezChanged(${1:canRez: boolean})"],"description":"Triggered when your ability to rez (create) entities changes."}}, + {"Entities.canRezTmpChanged":{"prefix":"Entities.canRezTmpChanged","body":["Entities.canRezTmpChanged(${1:canRezTmp: boolean})"],"description":"Triggered when your ability to rez (create) temporary entities changes. Temporary entities are entities with a finite\rlifetime property value set."}}, + {"Entities.canRezCertifiedChanged":{"prefix":"Entities.canRezCertifiedChanged","body":["Entities.canRezCertifiedChanged(${1:canRezCertified: boolean})"],"description":"Triggered when your ability to rez (create) certified entities changes. Certified entities are entities that have PoP\rcertificates."}}, + {"Entities.canRezTmpCertifiedChanged":{"prefix":"Entities.canRezTmpCertifiedChanged","body":["Entities.canRezTmpCertifiedChanged(${1:canRezTmpCertified: boolean})"],"description":"Triggered when your ability to rez (create) temporary certified entities changes. Temporary entities are entities with a\rfinite lifetime property value set. Certified entities are entities that have PoP certificates."}}, + {"Entities.canWriteAssetsChanged":{"prefix":"Entities.canWriteAssetsChanged","body":["Entities.canWriteAssetsChanged(${1:canWriteAssets: boolean})"],"description":"Triggered when your ability to make changes to the asset server's assets changes."}}, + {"Entities.mousePressOnEntity":{"prefix":"Entities.mousePressOnEntity","body":["Entities.mousePressOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse button is clicked while the mouse cursor is on an entity, or a controller trigger is fully \rpressed while its laser is on an entity."}}, + {"Entities.mouseDoublePressOnEntity":{"prefix":"Entities.mouseDoublePressOnEntity","body":["Entities.mouseDoublePressOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse button is double-clicked while the mouse cursor is on an entity."}}, + {"Entities.mouseMoveOnEntity":{"prefix":"Entities.mouseMoveOnEntity","body":["Entities.mouseMoveOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Repeatedly triggered while the mouse cursor or controller laser moves on an entity."}}, + {"Entities.mouseReleaseOnEntity":{"prefix":"Entities.mouseReleaseOnEntity","body":["Entities.mouseReleaseOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse button is released after clicking on an entity or the controller trigger is partly or fully \rreleased after pressing on an entity, even if the mouse pointer or controller laser has moved off the entity."}}, + {"Entities.mousePressOffEntity":{"prefix":"Entities.mousePressOffEntity","body":["Entities.mousePressOffEntity(${1:event: PointerEvent})"],"description":"Triggered when a mouse button is clicked while the mouse cursor is not on an entity."}}, + {"Entities.mouseDoublePressOffEntity":{"prefix":"Entities.mouseDoublePressOffEntity","body":["Entities.mouseDoublePressOffEntity(${1:event: PointerEvent})"],"description":"Triggered when a mouse button is double-clicked while the mouse cursor is not on an entity."}}, + {"Entities.clickDownOnEntity":{"prefix":"Entities.clickDownOnEntity","body":["Entities.clickDownOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse button is clicked while the mouse cursor is on an entity. Note: Not triggered by controller."}}, + {"Entities.holdingClickOnEntity":{"prefix":"Entities.holdingClickOnEntity","body":["Entities.holdingClickOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Repeatedly triggered while a mouse button continues to be held after clicking an entity, even if the mouse cursor has \rmoved off the entity. Note: Not triggered by controller."}}, + {"Entities.clickReleaseOnEntity":{"prefix":"Entities.clickReleaseOnEntity","body":["Entities.clickReleaseOnEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when a mouse button is released after clicking on an entity, even if the mouse cursor has moved off the \rentity. Note: Not triggered by controller."}}, + {"Entities.hoverEnterEntity":{"prefix":"Entities.hoverEnterEntity","body":["Entities.hoverEnterEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when the mouse cursor or controller laser starts hovering on an entity."}}, + {"Entities.hoverOverEntity":{"prefix":"Entities.hoverOverEntity","body":["Entities.hoverOverEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Repeatedly triggered when the mouse cursor or controller laser moves while hovering over an entity."}}, + {"Entities.hoverLeaveEntity":{"prefix":"Entities.hoverLeaveEntity","body":["Entities.hoverLeaveEntity(${1:entityID: Uuid},${2:event: PointerEvent})"],"description":"Triggered when the mouse cursor or controller laser stops hovering over an entity."}}, + {"Entities.enterEntity":{"prefix":"Entities.enterEntity","body":["Entities.enterEntity(${1:entityID: Uuid})"],"description":"Triggered when an avatar enters an entity."}}, + {"Entities.leaveEntity":{"prefix":"Entities.leaveEntity","body":["Entities.leaveEntity(${1:entityID: Uuid})"],"description":"Triggered when an avatar leaves an entity."}}, + {"Entities.deletingEntity":{"prefix":"Entities.deletingEntity","body":["Entities.deletingEntity(${1:entityID: Uuid})"],"description":"Triggered when an entity is deleted."}}, + {"Entities.addingEntity":{"prefix":"Entities.addingEntity","body":["Entities.addingEntity(${1:entityID: Uuid})"],"description":"Triggered when an entity is added to Interface's local in-memory tree of entities it knows about. This may occur when \rentities are loaded upon visiting a domain, when the user rotates their view so that more entities become visible, and \rwhen a domain or client-only entity is added (e.g., by {@Entities.addEntity|addEntity})."}}, + {"Entities.clearingEntities":{"prefix":"Entities.clearingEntities","body":["Entities.clearingEntities"],"description":"Triggered when you disconnect from a domain, at which time Interface's local in-memory tree of entities it knows about\ris cleared."}}, + {"Entities.webEventReceived":{"prefix":"Entities.webEventReceived","body":["Entities.webEventReceived(${1:entityID: Uuid},${2:message: string})"],"description":"Triggered in when a script in a {@link Entities.EntityType|Web} entity's Web page script sends an event over the \rscript's EventBridge."}}, + {"Entities.EntityType":{"prefix":"Entities.EntityType","body":["Entities.EntityType"],"description":"

An entity may be one of the following types:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescriptionProperties
\"Box\"A rectangular prism. This is a synonym of \"Shape\" for the case \r where the entity's shape property value is \"Cube\".
\r If an entity is created with its type \r set to \"Box\" it will always be created with a shape property value of \r \"Cube\". If an entity of type Shape or Sphere has its shape set \r to \"Cube\" then its type will be reported as \"Box\".\r
{@link Entities.EntityProperties-Box|EntityProperties-Box}
\"Light\"A local lighting effect.{@link Entities.EntityProperties-Light|EntityProperties-Light}
\"Line\"A sequence of one or more simple straight lines.{@link Entities.EntityProperties-Line|EntityProperties-Line}
\"Material\"Modifies the existing materials on Model entities, Shape entities (albedo \r only), {@link Overlays.OverlayType|model overlays}, and avatars.{@link Entities.EntityProperties-Material|EntityProperties-Material}
\"Model\"A mesh model from an FBX or OBJ file.{@link Entities.EntityProperties-Model|EntityProperties-Model}
\"ParticleEffect\"A particle system that can be used to simulate things such as fire, \r smoke, snow, magic spells, etc.{@link Entities.EntityProperties-ParticleEffect|EntityProperties-ParticleEffect}
\"PolyLine\"A sequence of one or more textured straight lines.{@link Entities.EntityProperties-PolyLine|EntityProperties-PolyLine}
\"PolyVox\"A set of textured voxels.{@link Entities.EntityProperties-PolyVox|EntityProperties-PolyVox}
\"Shape\"A basic entity such as a cube.\r See also, the \"Box\" and \"Sphere\" entity types.{@link Entities.EntityProperties-Shape|EntityProperties-Shape}
\"Sphere\"A sphere. This is a synonym of \"Shape\" for the case\r where the entity's shape property value is \"Sphere\".
\r If an entity is created with its type\r set to \"Sphere\" it will always be created with a shape property value of\r \"Sphere\". If an entity of type Box or Shape has its shape set\r to \"Sphere\" then its type will be reported as \"Sphere\".\r
{@link Entities.EntityProperties-Sphere|EntityProperties-Sphere}
\"Text\"A pane of text oriented in space.{@link Entities.EntityProperties-Text|EntityProperties-Text}
\"Web\"A browsable Web page.{@link Entities.EntityProperties-Web|EntityProperties-Web}
\"Zone\"A volume of lighting effects and avatar permissions.{@link Entities.EntityProperties-Zone|EntityProperties-Zone}
"}}, + {"Entities.Haze":{"prefix":"Entities.Haze","body":["Entities.Haze"],"description":"Haze is defined by the following properties."}}, + {"Entities.KeyLight":{"prefix":"Entities.KeyLight","body":["Entities.KeyLight"],"description":"A key light is defined by the following properties."}}, + {"Entities.PolyVoxSurfaceStyle":{"prefix":"Entities.PolyVoxSurfaceStyle","body":["Entities.PolyVoxSurfaceStyle"],"description":"

A PolyVoxSurfaceStyle may be one of the following:

\r\r \r \r \r \r \r \r \r \r \r
ValueTypeDescription
0Marching cubes.Chamfered edges. Open volume.\r Joins neighboring PolyVox entities reasonably well.
1Cubic.Square edges. Open volume.\r Joins neighboring PolyVox entities cleanly.
2Edged cubic.Square edges. Enclosed volume.\r Joins neighboring PolyVox entities cleanly.
3Edged marching cubes.Chamfered edges. Enclosed volume.\r Doesn't join neighboring PolyVox entities.
"}}, + {"Entities.Shape":{"prefix":"Entities.Shape","body":["Entities.Shape"],"description":"

A Shape, Box, or Sphere {@link Entities.EntityType|EntityType} may display as \rone of the following geometrical shapes:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDimensionsNotes
\"Circle\"2DA circle oriented in 3D.
\"Cube\"3D
\"Cone\"3D
\"Cylinder\"3D
\"Dodecahedron\"3D
\"Hexagon\"3DA hexagonal prism.
\"Icosahedron\"3D
\"Octagon\"3DAn octagonal prism.
\"Octahedron\"3D
\"Quad\"2DA square oriented in 3D.
\"Sphere\"3D
\"Tetrahedron\"3D
\"Torus\"3DNot implemented.
\"Triangle\"3DA triangular prism.
"}}, + {"Entities.Skybox":{"prefix":"Entities.Skybox","body":["Entities.Skybox"],"description":"A skybox is defined by the following properties."}}, + {"FBXAnimationFrame":{"prefix":"FBXAnimationFrame","body":["FBXAnimationFrame"]}}, + {"Graphics.Topology":{"prefix":"Graphics.Topology","body":["Graphics.Topology"],"description":"\r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
0Points.
1Lines.
2Line strip.
3Triangles.
4Triangle strip.
5Quads.
6Quad strip.
"}}, + {"Graphics.Material":{"prefix":"Graphics.Material","body":["Graphics.Material"]}}, + {"Graphics.MaterialLayer":{"prefix":"Graphics.MaterialLayer","body":["Graphics.MaterialLayer"]}}, + {"Graphics.IFSData":{"prefix":"Graphics.IFSData","body":["Graphics.IFSData"]}}, + {"Graphics":{"prefix":"Graphics","body":["Graphics"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The experimental Graphics API (experimental) lets you query and manage certain graphics-related structures (like underlying meshes and textures) from scripting."}}, + {"Graphics.getModel":{"prefix":"Graphics.getModel","body":["Graphics.getModel(${1:entityID: UUID})"],"description":"Returns a model reference object associated with the specified UUID ({@link EntityID}, {@link OverlayID}, or {@link AvatarID})."}}, + {"Graphics.updateModel":{"prefix":"Graphics.updateModel","body":["Graphics.updateModel(${1:id: Uuid},${2:model: Graphics.Model})"]}}, + {"Graphics.canUpdateModel":{"prefix":"Graphics.canUpdateModel","body":["Graphics.canUpdateModel(${1:id: Uuid},${2:meshIndex: number},${3:partNumber: number})"]}}, + {"Graphics.newModel":{"prefix":"Graphics.newModel","body":["Graphics.newModel(${1:meshes: Array.})"]}}, + {"Graphics.newMesh":{"prefix":"Graphics.newMesh","body":["Graphics.newMesh(${1:ifsMeshData: Graphics.IFSData})"],"description":"Create a new Mesh / Mesh Part with the specified data buffers."}}, + {"Graphics.exportModelToOBJ":{"prefix":"Graphics.exportModelToOBJ","body":["Graphics.exportModelToOBJ(${1:model: Graphics.Model})"]}}, + {"Graphics.Mesh":{"prefix":"Graphics.Mesh","body":["Graphics.Mesh"]}}, + {"Graphics.MeshPart":{"prefix":"Graphics.MeshPart","body":["Graphics.MeshPart"]}}, + {"Graphics.Model":{"prefix":"Graphics.Model","body":["Graphics.Model"]}}, + {"Controller.Hardware-Keyboard":{"prefix":"Controller.Hardware-Keyboard","body":["Controller.Hardware-Keyboard"],"description":"

The Controller.Hardware.Keyboard object has properties representing keyboard, mouse, and display touch \revents. The property values are integer IDs, uniquely identifying each output. Read-only. These can be mapped to \ractions or functions or Controller.Standard items in a {@link RouteObject} mapping. For presses, each data \rvalue is either 1.0 for \"true\" or 0.0 for \"false\".

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
09numbernumberA \"0\" – \"1\" key on the \r keyboard or keypad is pressed.
AZnumbernumberA \"A\" – \"Z\" key on the \r keyboard is pressed.
SpacenumbernumberThe space bar on the keyboard is pressed.
TabnumbernumberThe tab key on the keyboard is pressed.
ShiftnumbernumberThe shift key on the keyboard is pressed.
ControlnumbernumberThe control key on the keyboard is pressed. (The \r \"Command\" key on OSX.)
LeftnumbernumberThe left arrow key on the keyboard or keypad is pressed.\r
RightnumbernumberThe right arrow key on the keyboard or keypad is \r pressed.
UpnumbernumberThe up arrow key on the keyboard or keypad is pressed.\r
DownnumbernumberThe down arrow key on the keyboard or keypad is pressed.\r
PgUpnumbernumberThe page up key on the keyboard or keypad is pressed.\r
PgDownnumbernumberThe page down key on the keyboard or keypad is pressed.\r
LeftMouseButtonnumbernumberThe left mouse button pressed.
MiddleMouseButtonnumbernumberThe middle mouse button pressed.
RightMouseButtonnumbernumberThe right mouse button pressed.
LeftMouseClickednumbernumberThe left mouse button clicked.
MiddleMouseClickednumbernumberThe middle mouse button clicked.
RightMouseClickednumbernumberThe right mouse button clicked.
MouseMoveRightnumbernumberThe mouse moved right.
MouseMoveLeftnumbernumberThe mouse moved left.
MouseMoveUpnumbernumberThe mouse moved up.
MouseMoveDownnumbernumberThe mouse moved down.
MouseXnumbernumberThe mouse x-coordinate changed. The data value is its \r new x-coordinate value.
MouseYnumbernumberThe mouse y-coordinate changed. The data value is its \r new y-coordinate value.
MouseWheelRightnumbernumberThe mouse wheel rotated left. The data value \r is the number of units rotated (typically 1.0).
MouseWheelLeftnumbernumberThe mouse wheel rotated left. The data value \r is the number of units rotated (typically 1.0).
MouseWheelUpnumbernumberThe mouse wheel rotated up. The data value \r is the number of units rotated (typically 1.0).
MouseWheelDownnumbernumberThe mouse wheel rotated down. The data value \r is the number of units rotated (typically 1.0).
TouchpadRightnumbernumberThe average touch on a touch-enabled device \r moved right. The data value is how far the average position of all touch points moved.
TouchpadLeftnumbernumberThe average touch on a touch-enabled device \r moved left. The data value is how far the average position of all touch points moved.
TouchpadUpnumbernumberThe average touch on a touch-enabled device \r moved up. The data value is how far the average position of all touch points moved.
TouchpadDownnumbernumberThe average touch on a touch-enabled device \r moved down. The data value is how far the average position of all touch points moved.
"}}, + {"Midi":{"prefix":"Midi","body":["Midi"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Midi.sendRawDword":{"prefix":"Midi.sendRawDword","body":["Midi.sendRawDword(${1:device: number},${2:raw: number})"],"description":"Send Raw MIDI packet to a particular device."}}, + {"Midi.sendMidiMessage":{"prefix":"Midi.sendMidiMessage","body":["Midi.sendMidiMessage(${1:device: number},${2:channel: number},${3:type: number},${4:note: number},${5:velocity: number})"],"description":"Send MIDI message to a particular device."}}, + {"Midi.playMidiNote":{"prefix":"Midi.playMidiNote","body":["Midi.playMidiNote(${1:status: number},${2:note: number},${3:velocity: number})"],"description":"Play a note on all connected devices."}}, + {"Midi.allNotesOff":{"prefix":"Midi.allNotesOff","body":["Midi.allNotesOff"],"description":"Turn off all notes on all connected devices."}}, + {"Midi.resetDevices":{"prefix":"Midi.resetDevices","body":["Midi.resetDevices"],"description":"Clean up and re-discover attached devices."}}, + {"Midi.listMidiDevices":{"prefix":"Midi.listMidiDevices","body":["Midi.listMidiDevices(${1:output: boolean})"],"description":"Get a list of inputs/outputs."}}, + {"Midi.blockMidiDevice":{"prefix":"Midi.blockMidiDevice","body":["Midi.blockMidiDevice(${1:name: string},${2:output: boolean})"],"description":"Block an input/output by name."}}, + {"Midi.unblockMidiDevice":{"prefix":"Midi.unblockMidiDevice","body":["Midi.unblockMidiDevice(${1:name: string},${2:output: boolean})"],"description":"Unblock an input/output by name."}}, + {"Midi.thruModeEnable":{"prefix":"Midi.thruModeEnable","body":["Midi.thruModeEnable(${1:enable: boolean})"],"description":"Repeat all incoming notes to all outputs (default disabled)."}}, + {"Midi.broadcastEnable":{"prefix":"Midi.broadcastEnable","body":["Midi.broadcastEnable(${1:enable: boolean})"],"description":"Broadcast on all unblocked devices."}}, + {"Midi.typeNoteOffEnable":{"prefix":"Midi.typeNoteOffEnable","body":["Midi.typeNoteOffEnable(${1:enable: boolean})"]}}, + {"Midi.typeNoteOnEnable":{"prefix":"Midi.typeNoteOnEnable","body":["Midi.typeNoteOnEnable(${1:enable: boolean})"]}}, + {"Midi.typePolyKeyPressureEnable":{"prefix":"Midi.typePolyKeyPressureEnable","body":["Midi.typePolyKeyPressureEnable(${1:enable: boolean})"]}}, + {"Midi.typeControlChangeEnable":{"prefix":"Midi.typeControlChangeEnable","body":["Midi.typeControlChangeEnable(${1:enable: boolean})"]}}, + {"Midi.typeProgramChangeEnable":{"prefix":"Midi.typeProgramChangeEnable","body":["Midi.typeProgramChangeEnable(${1:enable: boolean})"]}}, + {"Midi.typeChanPressureEnable":{"prefix":"Midi.typeChanPressureEnable","body":["Midi.typeChanPressureEnable(${1:enable: boolean})"]}}, + {"Midi.typePitchBendEnable":{"prefix":"Midi.typePitchBendEnable","body":["Midi.typePitchBendEnable(${1:enable: boolean})"]}}, + {"Midi.typeSystemMessageEnable":{"prefix":"Midi.typeSystemMessageEnable","body":["Midi.typeSystemMessageEnable(${1:enable: boolean})"]}}, + {"RGBS":{"prefix":"RGBS","body":["RGBS"],"description":"

An RGB or SRGB color value.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r
IndexTypeAttributesDefaultValue
0numberRed component value. Number in the range 0.01.0.
1numberGreen component value. Number in the range 0.01.0.
2numberBlue component value. Number in the range 0.01.0.
3boolean<optional>falseIf true then the color is an SRGB color.
"}}, + {"MaterialResource":{"prefix":"MaterialResource","body":["MaterialResource"],"description":"A material or set of materials such as may be used by a {@link Entities.EntityType|Material} entity."}}, + {"Material":{"prefix":"Material","body":["Material"],"description":"A material such as may be used by a {@link Entities.EntityType|Material} entity."}}, + {"ModelCache":{"prefix":"ModelCache","body":["ModelCache"],"description":"
Available in:Interface ScriptsClient Entity Scripts

API to manage model cache resources."}}, + {"TextureCache":{"prefix":"TextureCache","body":["TextureCache"],"description":"
Available in:Interface ScriptsClient Entity Scripts

API to manage texture cache resources."}}, + {"TextureCache.prefetch":{"prefix":"TextureCache.prefetch","body":["TextureCache.prefetch(${1:url: string},${2:type: number},${3:maxNumPixels: number})"]}}, + {"TextureCache.spectatorCameraFramebufferReset":{"prefix":"TextureCache.spectatorCameraFramebufferReset","body":["TextureCache.spectatorCameraFramebufferReset"]}}, + {"location":{"prefix":"location","body":["location"],"description":"
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

The location API provides facilities related to your current location in the metaverse.\r\r
Getter/Setter
\r

You can get and set your current metaverse address by directly reading a string value from and writing a string value to \rthe location object. This is an alternative to using the location.href property or this object's\rfunctions.

"}}, + {"location.LookupTrigger":{"prefix":"location.LookupTrigger","body":["location.LookupTrigger"],"description":"

The reasons for an address lookup via the metaverse API are defined by numeric values:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
NameValueDescription
UserInput0User-typed input.
Back1Address from a {@link location.goBack|goBack} call.
Forward2Address from a {@link location.goForward|goForward} call.
StartupFromSettings3Initial location at Interface start-up from settings.
DomainPathResponse4A named path in the domain.
Internal5An internal attempt to resolve an alternative path.
AttemptedRefresh6A refresh after connecting to a domain.
Suggestions7Address from the Goto dialog.
VisitUserFromPAL8User from the People dialog.
"}}, + {"location.handleLookupString":{"prefix":"location.handleLookupString","body":["location.handleLookupString(${1:address: string},${2:fromSuggestions: boolean})"],"description":"Go to a specified metaverse address."}}, + {"location.goToViewpointForPath":{"prefix":"location.goToViewpointForPath","body":["location.goToViewpointForPath(${1:path: string},${2:namedPath: string})"],"description":"Go to a position and orientation resulting from a lookup for a named path in the domain (set in the domain server's \rsettings)."}}, + {"location.goBack":{"prefix":"location.goBack","body":["location.goBack"],"description":"Go back to the previous location in your navigation history, if there is one."}}, + {"location.goForward":{"prefix":"location.goForward","body":["location.goForward"],"description":"Go forward to the next location in your navigation history, if there is one."}}, + {"location.goToLocalSandbox":{"prefix":"location.goToLocalSandbox","body":["location.goToLocalSandbox(${1:path: string},${2:trigger: location.LookupTrigger})"],"description":"Go to the local Sandbox server that's running on the same PC as Interface."}}, + {"location.goToEntry":{"prefix":"location.goToEntry","body":["location.goToEntry(${1:trigger: location.LookupTrigger})"],"description":"Go to the default \"welcome\" metaverse address."}}, + {"location.goToUser":{"prefix":"location.goToUser","body":["location.goToUser(${1:username: string},${2:matchOrientation: boolean})"],"description":"Go to the specified user's location."}}, + {"location.goToLastAddress":{"prefix":"location.goToLastAddress","body":["location.goToLastAddress"],"description":"Go to the last address tried. This will be the last URL tried from location.handleLookupString"}}, + {"location.canGoBack":{"prefix":"location.canGoBack","body":["location.canGoBack"],"description":"Returns if going back is possible."}}, + {"location.refreshPreviousLookup":{"prefix":"location.refreshPreviousLookup","body":["location.refreshPreviousLookup"],"description":"Refresh the current address, e.g., after connecting to a domain in order to position the user to the desired location."}}, + {"location.storeCurrentAddress":{"prefix":"location.storeCurrentAddress","body":["location.storeCurrentAddress"],"description":"Update your current metaverse location in Interface's {@link Settings} file as your last-known address. This can be used\rto ensure that you start up at that address if you exit Interface without a later address automatically being saved."}}, + {"location.copyAddress":{"prefix":"location.copyAddress","body":["location.copyAddress"],"description":"Copy your current metaverse address (i.e., location.href property value) to the OS clipboard."}}, + {"location.copyPath":{"prefix":"location.copyPath","body":["location.copyPath"],"description":"Copy your current metaverse location and orientation (i.e., location.pathname property value) to the OS \rclipboard."}}, + {"location.lookupShareableNameForDomainID":{"prefix":"location.lookupShareableNameForDomainID","body":["location.lookupShareableNameForDomainID(${1:domainID: Uuid})"],"description":"Retrieve and remember the place name for the given domain ID if the place name is not already known."}}, + {"location.lookupResultsFinished":{"prefix":"location.lookupResultsFinished","body":["location.lookupResultsFinished"],"description":"Triggered when looking up the details of a metaverse user or location to go to has completed (successfully or\runsuccessfully)."}}, + {"location.lookupResultIsOffline":{"prefix":"location.lookupResultIsOffline","body":["location.lookupResultIsOffline"],"description":"Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user is \roffline."}}, + {"location.lookupResultIsNotFound":{"prefix":"location.lookupResultIsNotFound","body":["location.lookupResultIsNotFound"],"description":"Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user could\rnot be found."}}, + {"location.possibleDomainChangeRequired":{"prefix":"location.possibleDomainChangeRequired","body":["location.possibleDomainChangeRequired(${1:domainURL: Url},${2:domainID: Uuid})"],"description":"Triggered when a request is made to go to an IP address."}}, + {"location.possibleDomainChangeRequiredViaICEForID":{"prefix":"location.possibleDomainChangeRequiredViaICEForID","body":["location.possibleDomainChangeRequiredViaICEForID(${1:iceServerHostName: string},${2:domainID: Uuid})"],"description":"Triggered when a request is made to go to a named domain or user."}}, + {"location.locationChangeRequired":{"prefix":"location.locationChangeRequired","body":["location.locationChangeRequired(${1:position: Vec3},${2:hasOrientationChange: boolean},${3:orientation: Quat},${4:shouldFaceLocation: boolean})"],"description":"Triggered when an attempt is made to send your avatar to a specified position on the current domain. For example, when\ryou change domains or enter a position to go to in the \"Goto\" dialog."}}, + {"location.pathChangeRequired":{"prefix":"location.pathChangeRequired","body":["location.pathChangeRequired(${1:path: string})"],"description":"Triggered when an attempt is made to send your avatar to a new named path on the domain (set in the domain server's\rsettings). For example, when you enter a \"/\" followed by the path's name in the \"GOTO\" dialog."}}, + {"location.hostChanged":{"prefix":"location.hostChanged","body":["location.hostChanged(${1:hostname: string})"],"description":"Triggered when you navigate to a new domain."}}, + {"location.goBackPossible":{"prefix":"location.goBackPossible","body":["location.goBackPossible(${1:isPossible: boolean})"],"description":"Triggered when there's a change in whether or not there's a previous location that can be navigated to using\r{@link location.goBack|goBack}. (Reflects changes in the state of the \"Goto\" dialog's back arrow.)"}}, + {"location.goForwardPossible":{"prefix":"location.goForwardPossible","body":["location.goForwardPossible(${1:isPossible: boolean})"],"description":"Triggered when there's a change in whether or not there's a forward location that can be navigated to using\r{@link location.goForward|goForward}. (Reflects changes in the state of the \"Goto\" dialog's forward arrow.)"}}, + {"Assets.isValidPath":{"prefix":"Assets.isValidPath","body":["Assets.isValidPath(${1:input: string})"]}}, + {"Assets.isValidFilePath":{"prefix":"Assets.isValidFilePath","body":["Assets.isValidFilePath(${1:input: string})"]}}, + {"Assets.getATPUrl":{"prefix":"Assets.getATPUrl","body":["Assets.getATPUrl(${1:input: string})"]}}, + {"Assets.extractAssetHash":{"prefix":"Assets.extractAssetHash","body":["Assets.extractAssetHash(${1:input: string})"]}}, + {"Assets.isValidHash":{"prefix":"Assets.isValidHash","body":["Assets.isValidHash(${1:input: string})"]}}, + {"Assets.hashData":{"prefix":"Assets.hashData","body":["Assets.hashData(${1:data})"]}}, + {"Assets.hashDataHex":{"prefix":"Assets.hashDataHex","body":["Assets.hashDataHex(${1:data})"]}}, + {"Window.ConnectionRefusedReason":{"prefix":"Window.ConnectionRefusedReason","body":["Window.ConnectionRefusedReason"],"description":"

The reasons that you may be refused connection to a domain are defined by numeric values:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ReasonValueDescription
Unknown0Some unknown reason.
ProtocolMismatch1The communications protocols of the domain and your Interface are not the same.
LoginError2You could not be logged into the domain.
NotAuthorized3You are not authorized to connect to the domain.
TooManyUsers4The domain already has its maximum number of users.
TimedOut5Connecting to the domain timed out.
"}}, + {"Messages":{"prefix":"Messages","body":["Messages"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Messages API enables text and data to be sent between scripts over named \"channels\". A channel can have an arbitrary \rname to help separate messaging between different sets of scripts.

\r\r

Note: If you want to call a function in another script, you should use one of the following rather than \rsending a message:

\r
    \r
  • {@link Entities.callEntityClientMethod}
  • \r
  • {@link Entities.callEntityMethod}
  • \r
  • {@link Entities.callEntityServerMethod}
  • \r
  • {@link Script.callEntityScriptMethod}
  • \r
"}}, + {"Messages.sendMessage":{"prefix":"Messages.sendMessage","body":["Messages.sendMessage(${1:channel: string},${2:message: string},${3:localOnly: boolean})"],"description":"Send a text message on a channel."}}, + {"Messages.sendLocalMessage":{"prefix":"Messages.sendLocalMessage","body":["Messages.sendLocalMessage(${1:channel: string},${2:message: string})"],"description":"Send a text message locally on a channel.\rThis is the same as calling {@link Messages.sendMessage|sendMessage} with localOnly set to \rtrue."}}, + {"Messages.sendData":{"prefix":"Messages.sendData","body":["Messages.sendData(${1:channel: string},${2:data: object},${3:localOnly: boolean})"],"description":"Send a data message on a channel."}}, + {"Messages.subscribe":{"prefix":"Messages.subscribe","body":["Messages.subscribe(${1:channel: string})"],"description":"Subscribe the scripting environment — Interface, the entity script server, or assignment client instance — \rto receive messages on a specific channel. Note that, for example, if there are two Interface scripts that subscribe to \rdifferent channels, both scripts will receive messages on both channels."}}, + {"Messages.unsubscribe":{"prefix":"Messages.unsubscribe","body":["Messages.unsubscribe(${1:channel: string})"],"description":"Unsubscribe the scripting environment from receiving messages on a specific channel."}}, + {"Messages.messageReceived":{"prefix":"Messages.messageReceived","body":["Messages.messageReceived(${1:channel: string},${2:message: string},${3:senderID: Uuid},${4:localOnly: boolean})"],"description":"Triggered when the a text message is received."}}, + {"Messages.dataReceived":{"prefix":"Messages.dataReceived","body":["Messages.dataReceived(${1:channel: string},${2:data: object},${3:senderID: Uuid},${4:localOnly: boolean})"],"description":"Triggered when a data message is received."}}, + {"ResourceObject":{"prefix":"ResourceObject","body":["ResourceObject"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Resource.State":{"prefix":"Resource.State","body":["Resource.State"]}}, + {"ResourceObject#release":{"prefix":"ResourceObject#release","body":["ResourceObject#release"],"description":"Release this resource."}}, + {"ResourceObject#progressChanged":{"prefix":"ResourceObject#progressChanged","body":["ResourceObject#progressChanged(${1:bytesReceived: number},${2:bytesTotal: number})"],"description":"Triggered when download progress for this resource has changed."}}, + {"ResourceObject#stateChanged":{"prefix":"ResourceObject#stateChanged","body":["ResourceObject#stateChanged(${1:state: Resource.State})"],"description":"Triggered when resource loading state has changed."}}, + {"ResourceCache.getResourceList":{"prefix":"ResourceCache.getResourceList","body":["ResourceCache.getResourceList"],"description":"Get the list of all resource URLs."}}, + {"ResourceCache.updateTotalSize":{"prefix":"ResourceCache.updateTotalSize","body":["ResourceCache.updateTotalSize(${1:deltaSize: number})"]}}, + {"ResourceCache.prefetch":{"prefix":"ResourceCache.prefetch","body":["ResourceCache.prefetch(${1:url: string},${2:extra: object})"],"description":"Prefetches a resource."}}, + {"ResourceCache.dirty":{"prefix":"ResourceCache.dirty","body":["ResourceCache.dirty"]}}, + {"Resources":{"prefix":"Resources","body":["Resources"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Resources.overrideUrlPrefix":{"prefix":"Resources.overrideUrlPrefix","body":["Resources.overrideUrlPrefix(${1:prefix: string},${2:replacement: string})"]}}, + {"Resources.restoreUrlPrefix":{"prefix":"Resources.restoreUrlPrefix","body":["Resources.restoreUrlPrefix(${1:prefix: string})"]}}, + {"Entities.setPacketsPerSecond":{"prefix":"Entities.setPacketsPerSecond","body":["Entities.setPacketsPerSecond(${1:packetsPerSecond: number})"],"description":"Set the maximum number of entity packets that the client can send per second."}}, + {"Entities.getPacketsPerSecond":{"prefix":"Entities.getPacketsPerSecond","body":["Entities.getPacketsPerSecond"],"description":"Get the maximum number of entity packets that the client can send per second."}}, + {"Entities.serversExist":{"prefix":"Entities.serversExist","body":["Entities.serversExist"],"description":"Check whether servers exist for the client to send entity packets to, i.e., whether you are connected to a domain and \rits entity server is working."}}, + {"Entities.hasPacketsToSend":{"prefix":"Entities.hasPacketsToSend","body":["Entities.hasPacketsToSend"],"description":"Check whether the client has entity packets waiting to be sent."}}, + {"Entities.packetsToSendCount":{"prefix":"Entities.packetsToSendCount","body":["Entities.packetsToSendCount"],"description":"Get the number of entity packets the client has waiting to be sent."}}, + {"Entities.getLifetimePPS":{"prefix":"Entities.getLifetimePPS","body":["Entities.getLifetimePPS"],"description":"Get the entity packets per second send rate of the client over its lifetime."}}, + {"Entities.getLifetimeBPS":{"prefix":"Entities.getLifetimeBPS","body":["Entities.getLifetimeBPS"],"description":"Get the entity bytes per second send rate of the client over its lifetime."}}, + {"Entities.getLifetimePPSQueued":{"prefix":"Entities.getLifetimePPSQueued","body":["Entities.getLifetimePPSQueued"],"description":"Get the entity packets per second queued rate of the client over its lifetime."}}, + {"Entities.getLifetimeBPSQueued":{"prefix":"Entities.getLifetimeBPSQueued","body":["Entities.getLifetimeBPSQueued"],"description":"Get the entity bytes per second queued rate of the client over its lifetime."}}, + {"Entities.getLifetimeInUsecs":{"prefix":"Entities.getLifetimeInUsecs","body":["Entities.getLifetimeInUsecs"],"description":"Get the lifetime of the client from the first entity packet sent until now, in microseconds."}}, + {"Entities.getLifetimeInSeconds":{"prefix":"Entities.getLifetimeInSeconds","body":["Entities.getLifetimeInSeconds"],"description":"Get the lifetime of the client from the first entity packet sent until now, in seconds."}}, + {"Entities.getLifetimePacketsSent":{"prefix":"Entities.getLifetimePacketsSent","body":["Entities.getLifetimePacketsSent"],"description":"Get the total number of entity packets sent by the client over its lifetime."}}, + {"Entities.getLifetimeBytesSent":{"prefix":"Entities.getLifetimeBytesSent","body":["Entities.getLifetimeBytesSent"],"description":"Get the total bytes of entity packets sent by the client over its lifetime."}}, + {"Entities.getLifetimePacketsQueued":{"prefix":"Entities.getLifetimePacketsQueued","body":["Entities.getLifetimePacketsQueued"],"description":"Get the total number of entity packets queued by the client over its lifetime."}}, + {"Entities.getLifetimeBytesQueued":{"prefix":"Entities.getLifetimeBytesQueued","body":["Entities.getLifetimeBytesQueued"],"description":"Get the total bytes of entity packets queued by the client over its lifetime."}}, + {"Entities.ActionArguments-Offset":{"prefix":"Entities.ActionArguments-Offset","body":["Entities.ActionArguments-Offset"],"description":"The \"offset\" {@link Entities.ActionType|ActionType} moves an entity so that it is a set distance away from a \rtarget point.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-Tractor":{"prefix":"Entities.ActionArguments-Tractor","body":["Entities.ActionArguments-Tractor"],"description":"The \"tractor\" {@link Entities.ActionType|ActionType} moves and rotates an entity to a target position and \rorientation, optionally relative to another entity.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-TravelOriented":{"prefix":"Entities.ActionArguments-TravelOriented","body":["Entities.ActionArguments-TravelOriented"],"description":"The \"travel-oriented\" {@link Entities.ActionType|ActionType} orients an entity to align with its direction of \rtravel.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-BallSocket":{"prefix":"Entities.ActionArguments-BallSocket","body":["Entities.ActionArguments-BallSocket"],"description":"The \"ball-socket\" {@link Entities.ActionType|ActionType} connects two entities with a ball and socket joint. \rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-ConeTwist":{"prefix":"Entities.ActionArguments-ConeTwist","body":["Entities.ActionArguments-ConeTwist"],"description":"The \"cone-twist\" {@link Entities.ActionType|ActionType} connects two entities with a joint that can move \rthrough a cone and can twist.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-Hinge":{"prefix":"Entities.ActionArguments-Hinge","body":["Entities.ActionArguments-Hinge"],"description":"The \"hinge\" {@link Entities.ActionType|ActionType} lets an entity pivot about an axis or connects two entities\rwith a hinge joint.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments-Slider":{"prefix":"Entities.ActionArguments-Slider","body":["Entities.ActionArguments-Slider"],"description":"The \"slider\" {@link Entities.ActionType|ActionType} lets an entity slide and rotate along an axis, or connects \rtwo entities that slide and rotate along a shared axis.\rIt has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}."}}, + {"Entities.ActionArguments":{"prefix":"Entities.ActionArguments","body":["Entities.ActionArguments"],"description":"Different entity action types have different arguments: some common to all actions (listed below) and some specific to each \r{@link Entities.ActionType|ActionType} (linked to below). The arguments are accessed as an object of property names and \rvalues."}}, + {"Entities.PhysicsMotionType":{"prefix":"Entities.PhysicsMotionType","body":["Entities.PhysicsMotionType"],"description":"

An entity's physics motion type may be one of the following:

\r\r \r \r \r \r \r \r \r \r
ValueDescription
\"static\"There is no motion because the entity is locked — its locked \r property is set to true.
\"kinematic\"Motion is applied without physical laws (e.g., damping) because the entity is \r not locked and has its dynamic property set to false.
\"dynamic\"Motion is applied according to physical laws (e.g., damping) because the entity \r is not locked and has its dynamic property set to true.
"}}, + {"Steam":{"prefix":"Steam","body":["Steam"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Steam.isRunning":{"prefix":"Steam.isRunning","body":["Steam.isRunning"]}}, + {"Steam.openInviteOverlay":{"prefix":"Steam.openInviteOverlay","body":["Steam.openInviteOverlay"]}}, + {"PickType":{"prefix":"PickType","body":["PickType"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Enum for different types of Picks and Pointers."}}, + {"PickType":{"prefix":"PickType","body":["PickType"],"description":"\r \r \r \r \r \r \r \r \r
ValueDescription
{@link PickType(0)|PickType.Ray}
{@link PickType(0)|PickType.Stylus}
{@link PickType(0)|PickType.Parabola}
"}}, + {"Assets.GetOptions.ResponseType":{"prefix":"Assets.GetOptions.ResponseType","body":["Assets.GetOptions.ResponseType"],"description":"

Available responseType values for use with @{link Assets.getAsset} and @{link Assets.loadFromCache} configuration option.

\r\r \r \r \r \r \r \r \r \r
responseTypetypeof response value
\"text\"contents returned as utf-8 decoded String value
\"arraybuffer\"contents as a binary ArrayBuffer object
\"json\"contents as a parsed JSON object
"}}, + {"Assets":{"prefix":"Assets","body":["Assets"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Assets API allows you to communicate with the Asset Browser."}}, + {"Assets.uploadData":{"prefix":"Assets.uploadData","body":["Assets.uploadData(${1:data: string},${2:callback: Assets~uploadDataCallback})"],"description":"Upload content to the connected domain's asset server."}}, + {"Assets~uploadDataCallback":{"prefix":"Assets~uploadDataCallback","body":["Assets~uploadDataCallback(${1:url: string},${2:hash: string})"],"description":"Called when uploadData is complete"}}, + {"Assets.downloadData":{"prefix":"Assets.downloadData","body":["Assets.downloadData(${1:url: string},${2:callback: Assets~downloadDataCallback})"],"description":"Download data from the connected domain's asset server."}}, + {"Assets~downloadDataCallback":{"prefix":"Assets~downloadDataCallback","body":["Assets~downloadDataCallback(${1:data: string})"],"description":"Called when downloadData is complete"}}, + {"Assets.setMapping":{"prefix":"Assets.setMapping","body":["Assets.setMapping(${1:path: string},${2:hash: string},${3:callback: Assets~setMappingCallback})"],"description":"Sets up a path to hash mapping within the connected domain's asset server"}}, + {"Assets~setMappingCallback":{"prefix":"Assets~setMappingCallback","body":["Assets~setMappingCallback(${1:error: string})"],"description":"Called when setMapping is complete"}}, + {"Assets.getMapping":{"prefix":"Assets.getMapping","body":["Assets.getMapping(${1:path: string},${2:callback: Assets~getMappingCallback})"],"description":"Look up a path to hash mapping within the connected domain's asset server"}}, + {"Assets~getMappingCallback":{"prefix":"Assets~getMappingCallback","body":["Assets~getMappingCallback(${1:assetID: string},${2:error: string})"],"description":"Called when getMapping is complete."}}, + {"Assets.setBakingEnabled":{"prefix":"Assets.setBakingEnabled","body":["Assets.setBakingEnabled(${1:path: string},${2:enabled: boolean},${3:callback})"]}}, + {"Assets~setBakingEnabledCallback":{"prefix":"Assets~setBakingEnabledCallback","body":["Assets~setBakingEnabledCallback"],"description":"Called when setBakingEnabled is complete."}}, + {"Assets.getAsset":{"prefix":"Assets.getAsset","body":["Assets.getAsset(${1:options: URL},${2:scope: Assets~getAssetCallback},${3:callback: function})"],"description":"Request Asset data from the ATP Server"}}, + {"Assets.GetOptions":{"prefix":"Assets.GetOptions","body":["Assets.GetOptions"],"description":"A set of properties that can be passed to {@link Assets.getAsset}."}}, + {"Assets~getAssetCallback":{"prefix":"Assets~getAssetCallback","body":["Assets~getAssetCallback(${1:error: string},${2:result: Asset~getAssetResult})"],"description":"Called when Assets.getAsset is complete."}}, + {"Assets~getAssetResult":{"prefix":"Assets~getAssetResult","body":["Assets~getAssetResult"],"description":"Result value returned by {@link Assets.getAsset}."}}, + {"Assets.putAsset":{"prefix":"Assets.putAsset","body":["Assets.putAsset(${1:options: Assets.PutOptions},${2:scope[callback: Assets~putAssetCallback},${3:callback: function})"],"description":"Upload Asset data to the ATP Server"}}, + {"Assets.PutOptions":{"prefix":"Assets.PutOptions","body":["Assets.PutOptions"],"description":"A set of properties that can be passed to {@link Assets.putAsset}."}}, + {"Assets~puttAssetCallback":{"prefix":"Assets~puttAssetCallback","body":["Assets~puttAssetCallback(${1:error: string},${2:result: Asset~putAssetResult})"],"description":"Called when Assets.putAsset is complete."}}, + {"Assets~putAssetResult":{"prefix":"Assets~putAssetResult","body":["Assets~putAssetResult"],"description":"Result value returned by {@link Assets.putAsset}."}}, + {"Assets.deleteAsset":{"prefix":"Assets.deleteAsset","body":["Assets.deleteAsset(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.resolveAsset":{"prefix":"Assets.resolveAsset","body":["Assets.resolveAsset(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.decompressData":{"prefix":"Assets.decompressData","body":["Assets.decompressData(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.compressData":{"prefix":"Assets.compressData","body":["Assets.compressData(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.initializeCache":{"prefix":"Assets.initializeCache","body":["Assets.initializeCache"]}}, + {"Assets.canWriteCacheValue":{"prefix":"Assets.canWriteCacheValue","body":["Assets.canWriteCacheValue(${1:url: string})"]}}, + {"Assets.getCacheStatus":{"prefix":"Assets.getCacheStatus","body":["Assets.getCacheStatus(${1:scope},${2:callback})"]}}, + {"Assets.queryCacheMeta":{"prefix":"Assets.queryCacheMeta","body":["Assets.queryCacheMeta(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.loadFromCache":{"prefix":"Assets.loadFromCache","body":["Assets.loadFromCache(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.saveToCache":{"prefix":"Assets.saveToCache","body":["Assets.saveToCache(${1:options},${2:scope},${3:callback})"]}}, + {"Assets.saveToCache":{"prefix":"Assets.saveToCache","body":["Assets.saveToCache(${1:url},${2:data},${3:metadata},${4:scope},${5:callback})"]}}, + {"Audio.playSound":{"prefix":"Audio.playSound","body":["Audio.playSound(${1:sound: SoundObject},${2:injectorOptions: AudioInjector.AudioInjectorOptions})"],"description":"Starts playing — \"injecting\" — the content of an audio file. The sound is played globally (sent to the audio \rmixer) so that everyone hears it, unless the injectorOptions has localOnly set to \rtrue in which case only the client hears the sound played. No sound is played if sent to the audio mixer \rbut the client is not connected to an audio mixer. The {@link AudioInjector} object returned by the function can be used \rto control the playback and get information about its current state."}}, + {"Audio.playSystemSound":{"prefix":"Audio.playSystemSound","body":["Audio.playSystemSound(${1:sound: SoundObject},${2:position: Vec3})"],"description":"Start playing the content of an audio file, locally (isn't sent to the audio mixer). This is the same as calling \r{@link Audio.playSound} with {@link AudioInjector.AudioInjectorOptions} localOnly set true and \rthe specified position."}}, + {"Audio.setStereoInput":{"prefix":"Audio.setStereoInput","body":["Audio.setStereoInput(${1:stereo: boolean})"],"description":"Set whether or not the audio input should be used in stereo. If the audio input does not support stereo then setting a \rvalue of true has no effect."}}, + {"Audio.isStereoInput":{"prefix":"Audio.isStereoInput","body":["Audio.isStereoInput"],"description":"Get whether or not the audio input is used in stereo."}}, + {"Audio.mutedByMixer":{"prefix":"Audio.mutedByMixer","body":["Audio.mutedByMixer"],"description":"Triggered when the client is muted by the mixer because their loudness value for the noise background has reached the \rthreshold set for the domain in the server settings."}}, + {"Audio.environmentMuted":{"prefix":"Audio.environmentMuted","body":["Audio.environmentMuted"],"description":"Triggered when the client is muted by the mixer because they're within a certain radius (50m) of someone who requested \rthe mute through Developer > Audio > Mute Environment."}}, + {"Audio.receivedFirstPacket":{"prefix":"Audio.receivedFirstPacket","body":["Audio.receivedFirstPacket"],"description":"Triggered when the client receives its first packet from the audio mixer."}}, + {"Audio.disconnected":{"prefix":"Audio.disconnected","body":["Audio.disconnected"],"description":"Triggered when the client is disconnected from the audio mixer."}}, + {"Audio.noiseGateOpened":{"prefix":"Audio.noiseGateOpened","body":["Audio.noiseGateOpened"],"description":"Triggered when the noise gate is opened: the input audio signal is no longer blocked (fully attenuated) because it has \rrisen above an adaptive threshold set just above the noise floor. Only occurs if Audio.noiseReduction is \rtrue."}}, + {"Audio.noiseGateClosed":{"prefix":"Audio.noiseGateClosed","body":["Audio.noiseGateClosed"],"description":"Triggered when the noise gate is closed: the input audio signal is blocked (fully attenuated) because it has fallen \rbelow an adaptive threshold set just above the noise floor. Only occurs if Audio.noiseReduction is \rtrue."}}, + {"Audio.inputReceived":{"prefix":"Audio.inputReceived","body":["Audio.inputReceived(${1:inputSamples: Int16Array})"],"description":"Triggered when a frame of audio input is processed."}}, + {"Audio.isStereoInputChanged":{"prefix":"Audio.isStereoInputChanged","body":["Audio.isStereoInputChanged(${1:isStereo: boolean})"],"description":"Triggered when the input audio use changes between mono and stereo."}}, + {"File":{"prefix":"File","body":["File"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"File.convertUrlToPath":{"prefix":"File.convertUrlToPath","body":["File.convertUrlToPath(${1:url: string})"]}}, + {"File.runUnzip":{"prefix":"File.runUnzip","body":["File.runUnzip(${1:path: string},${2:url: string},${3:autoAdd: boolean},${4:isZip: boolean},${5:isBlocks: boolean})"]}}, + {"File.getTempDir":{"prefix":"File.getTempDir","body":["File.getTempDir"]}}, + {"File.unzipResult":{"prefix":"File.unzipResult","body":["File.unzipResult(${1:zipFile: string},${2:unzipFile: string},${3:autoAdd: boolean},${4:isZip: boolean},${5:isBlocks: boolean})"]}}, + {"KeyEvent":{"prefix":"KeyEvent","body":["KeyEvent"],"description":"A keyboard key event."}}, + {"Mat4":{"prefix":"Mat4","body":["Mat4"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Mat4.multiply":{"prefix":"Mat4.multiply","body":["Mat4.multiply(${1:m1: Mat4},${2:m2: Mat4})"]}}, + {"Mat4.createFromRotAndTrans":{"prefix":"Mat4.createFromRotAndTrans","body":["Mat4.createFromRotAndTrans(${1:rot: Quat},${2:trans: Vec3})"]}}, + {"Mat4.createFromScaleRotAndTrans":{"prefix":"Mat4.createFromScaleRotAndTrans","body":["Mat4.createFromScaleRotAndTrans(${1:scale: Vec3},${2:rot: Quat},${3:trans: Vec3})"]}}, + {"Mat4.createFromColumns":{"prefix":"Mat4.createFromColumns","body":["Mat4.createFromColumns(${1:col0: Vec4},${2:col1: Vec4},${3:col2: Vec4},${4:col: Vec4})"]}}, + {"Mat4.createFromArray":{"prefix":"Mat4.createFromArray","body":["Mat4.createFromArray(${1:numbers: Array.})"]}}, + {"Mat4.extractTranslation":{"prefix":"Mat4.extractTranslation","body":["Mat4.extractTranslation(${1:m: Mat4})"]}}, + {"Mat4.extractRotation":{"prefix":"Mat4.extractRotation","body":["Mat4.extractRotation(${1:m: Mat4})"]}}, + {"Mat4.extractScale":{"prefix":"Mat4.extractScale","body":["Mat4.extractScale(${1:m: Mat4})"]}}, + {"Mat4.transformPoint":{"prefix":"Mat4.transformPoint","body":["Mat4.transformPoint(${1:m: Mat4},${2:point: Vec3})"]}}, + {"Mat4.transformVector":{"prefix":"Mat4.transformVector","body":["Mat4.transformVector(${1:m: Mat4},${2:vector: Vec3})"]}}, + {"Mat4.inverse":{"prefix":"Mat4.inverse","body":["Mat4.inverse(${1:m: Mat4})"]}}, + {"Mat4.getFront":{"prefix":"Mat4.getFront","body":["Mat4.getFront(${1:m: Mat4})"]}}, + {"Mat4.getForward":{"prefix":"Mat4.getForward","body":["Mat4.getForward(${1:m: Mat4})"]}}, + {"Mat4.getRight":{"prefix":"Mat4.getRight","body":["Mat4.getRight(${1:m: Mat4})"]}}, + {"Mat4.getUp":{"prefix":"Mat4.getUp","body":["Mat4.getUp(${1:m: Mat4})"]}}, + {"Mat4.print":{"prefix":"Mat4.print","body":["Mat4.print(${1:label: string},${2:m: Mat4},${3:transpose: boolean})"]}}, + {"Menu.MenuItemProperties":{"prefix":"Menu.MenuItemProperties","body":["Menu.MenuItemProperties"],"description":"A set of properties that can be passed to {@link Menu.addMenuItem} to create a new menu item.\r\rIf none of position, beforeItem, afterItem, or grouping are specified, \rthe menu item will be placed at the end of the menu."}}, + {"MouseEvent":{"prefix":"MouseEvent","body":["MouseEvent"],"description":"A controller mouse movement or button event."}}, + {"Quat":{"prefix":"Quat","body":["Quat"],"description":"A quaternion value. See also the {@link Quat(0)|Quat} object."}}, + {"Quat":{"prefix":"Quat","body":["Quat"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Quat API provides facilities for generating and manipulating quaternions.\rQuaternions should be used in preference to Euler angles wherever possible because quaternions don't suffer from the problem\rof gimbal lock."}}, + {"Quat.multiply":{"prefix":"Quat.multiply","body":["Quat.multiply(${1:q1: Quat},${2:q2: Quat})"],"description":"Multiply two quaternions."}}, + {"Quat.normalize":{"prefix":"Quat.normalize","body":["Quat.normalize(${1:q: Quat})"],"description":"Normalizes a quaternion."}}, + {"Quat.conjugate":{"prefix":"Quat.conjugate","body":["Quat.conjugate(${1:q: Quat})"],"description":"Calculate the conjugate of a quaternion. For a unit quaternion, its conjugate is the same as its \r {@link Quat(0).inverse|Quat.inverse}."}}, + {"Quat.lookAt":{"prefix":"Quat.lookAt","body":["Quat.lookAt(${1:eye: Vec3},${2:target: Vec3},${3:up: Vec3})"],"description":"Calculate a camera orientation given eye position, point of interest, and \"up\" direction. The camera's negative z-axis is\rthe forward direction. The result has zero roll about its forward direction with respect to the given \"up\" direction."}}, + {"Quat.lookAtSimple":{"prefix":"Quat.lookAtSimple","body":["Quat.lookAtSimple(${1:eye: Vec3},${2:target: Vec3})"],"description":"Calculate a camera orientation given eye position and point of interest. The camera's negative z-axis is the forward \rdirection. The result has zero roll about its forward direction."}}, + {"Quat.rotationBetween":{"prefix":"Quat.rotationBetween","body":["Quat.rotationBetween(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate the shortest rotation from a first vector onto a second."}}, + {"Quat.fromVec3Degrees":{"prefix":"Quat.fromVec3Degrees","body":["Quat.fromVec3Degrees(${1:vector: Vec3})"],"description":"Generate a quaternion from a {@link Vec3} of Euler angles in degrees."}}, + {"Quat.fromVec3Radians":{"prefix":"Quat.fromVec3Radians","body":["Quat.fromVec3Radians(${1:vector: Vec3})"],"description":"Generate a quaternion from a {@link Vec3} of Euler angles in radians."}}, + {"Quat.fromPitchYawRollDegrees":{"prefix":"Quat.fromPitchYawRollDegrees","body":["Quat.fromPitchYawRollDegrees(${1:pitch: number},${2:yaw: number},${3:roll: number})"],"description":"Generate a quaternion from pitch, yaw, and roll values in degrees."}}, + {"Quat.fromPitchYawRollRadians":{"prefix":"Quat.fromPitchYawRollRadians","body":["Quat.fromPitchYawRollRadians(${1:pitch: number},${2:yaw: number},${3:roll: number})"],"description":"Generate a quaternion from pitch, yaw, and roll values in radians."}}, + {"Quat.inverse":{"prefix":"Quat.inverse","body":["Quat.inverse(${1:q: Quat})"],"description":"Calculate the inverse of a quaternion. For a unit quaternion, its inverse is the same as its\r {@link Quat(0).conjugate|Quat.conjugate}."}}, + {"Quat.getFront":{"prefix":"Quat.getFront","body":["Quat.getFront(${1:orientation: Quat})"],"description":"Get the \"front\" direction that the camera would face if its orientation was set to the quaternion value.\rThis is a synonym for {@link Quat(0).getForward|Quat.getForward}.\rThe High Fidelity camera has axes x = right, y = up, -z = forward."}}, + {"Quat.getForward":{"prefix":"Quat.getForward","body":["Quat.getForward(${1:orientation: Quat})"],"description":"Get the \"forward\" direction that the camera would face if its orientation was set to the quaternion value.\rThis is a synonym for {@link Quat(0).getFront|Quat.getFront}.\rThe High Fidelity camera has axes x = right, y = up, -z = forward."}}, + {"Quat.getRight":{"prefix":"Quat.getRight","body":["Quat.getRight(${1:orientation: Quat})"],"description":"Get the \"right\" direction that the camera would have if its orientation was set to the quaternion value.\rThe High Fidelity camera has axes x = right, y = up, -z = forward."}}, + {"Quat.getUp":{"prefix":"Quat.getUp","body":["Quat.getUp(${1:orientation: Quat})"],"description":"Get the \"up\" direction that the camera would have if its orientation was set to the quaternion value.\rThe High Fidelity camera has axes x = right, y = up, -z = forward."}}, + {"Quat.safeEulerAngles":{"prefix":"Quat.safeEulerAngles","body":["Quat.safeEulerAngles(${1:orientation: Quat})"],"description":"Calculate the Euler angles for the quaternion, in degrees. (The \"safe\" in the name signifies that the angle results will\rnot be garbage even when the rotation is particularly difficult to decompose with pitches around +/-90 degrees.)"}}, + {"Quat.angleAxis":{"prefix":"Quat.angleAxis","body":["Quat.angleAxis(${1:angle: number},${2:axis: Vec3})"],"description":"Generate a quaternion given an angle to rotate through and an axis to rotate about."}}, + {"Quat.axis":{"prefix":"Quat.axis","body":["Quat.axis(${1:q: Quat})"],"description":"Get the rotation axis for a quaternion."}}, + {"Quat.angle":{"prefix":"Quat.angle","body":["Quat.angle(${1:q: Quat})"],"description":"Get the rotation angle for a quaternion."}}, + {"Quat.mix":{"prefix":"Quat.mix","body":["Quat.mix(${1:q1: Quat},${2:q2: Quat},${3:alpha: number})"],"description":"Compute a spherical linear interpolation between two rotations, safely handling two rotations that are very similar.\rSee also, {@link Quat(0).slerp|Quat.slerp}."}}, + {"Quat.slerp":{"prefix":"Quat.slerp","body":["Quat.slerp(${1:q1: Quat},${2:q2: Quat},${3:alpha: number})"],"description":"Compute a spherical linear interpolation between two rotations, for rotations that are not very similar.\rSee also, {@link Quat(0).mix|Quat.mix}."}}, + {"Quat.squad":{"prefix":"Quat.squad","body":["Quat.squad(${1:q1: Quat},${2:q2: Quat},${3:s1: Quat},${4:s2: Quat},${5:alpha: number})"],"description":"Compute a spherical quadrangle interpolation between two rotations along a path oriented toward two other rotations.\rEquivalent to: Quat.slerp(Quat.slerp(q1, q2, alpha), Quat.slerp(s1, s2, alpha), 2 * alpha * (1.0 - alpha))."}}, + {"Quat.dot":{"prefix":"Quat.dot","body":["Quat.dot(${1:q1: Quat},${2:q2: Quat})"],"description":"Calculate the dot product of two quaternions. The closer the quaternions are to each other the more non-zero the value is\r(either positive or negative). Identical unit rotations have a dot product of +/- 1."}}, + {"Quat.print":{"prefix":"Quat.print","body":["Quat.print(${1:label: string},${2:q: Quat},${3:asDegrees: boolean})"],"description":"Print to the program log a text label followed by a quaternion's pitch, yaw, and roll Euler angles."}}, + {"Quat.equal":{"prefix":"Quat.equal","body":["Quat.equal(${1:q1: Quat},${2:q2: Quat})"],"description":"Test whether two quaternions are equal. Note: The quaternions must be exactly equal in order for \rtrue to be returned; it is often better to use {@link Quat(0).dot|Quat.dot} and test for closeness to +/-1."}}, + {"Quat.cancelOutRollAndPitch":{"prefix":"Quat.cancelOutRollAndPitch","body":["Quat.cancelOutRollAndPitch(${1:orientation: Quat})"],"description":"Cancels out the roll and pitch component of a quaternion so that its completely horizontal with a yaw pointing in the \rgiven quaternion's direction."}}, + {"Quat.cancelOutRoll":{"prefix":"Quat.cancelOutRoll","body":["Quat.cancelOutRoll(${1:orientation: Quat})"],"description":"Cancels out the roll component of a quaternion so that its horizontal axis is level."}}, + {"Recording":{"prefix":"Recording","body":["Recording"],"description":"
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

"}}, + {"Recording.loadRecording":{"prefix":"Recording.loadRecording","body":["Recording.loadRecording(${1:url: string},${2:callback: Recording~loadRecordingCallback})"]}}, + {"Recording~loadRecordingCallback":{"prefix":"Recording~loadRecordingCallback","body":["Recording~loadRecordingCallback(${1:success: boolean},${2:url: string})"],"description":"Called when {@link Recording.loadRecording} is complete."}}, + {"Recording.startPlaying":{"prefix":"Recording.startPlaying","body":["Recording.startPlaying"]}}, + {"Recording.pausePlayer":{"prefix":"Recording.pausePlayer","body":["Recording.pausePlayer"]}}, + {"Recording.stopPlaying":{"prefix":"Recording.stopPlaying","body":["Recording.stopPlaying"]}}, + {"Recording.isPlaying":{"prefix":"Recording.isPlaying","body":["Recording.isPlaying"]}}, + {"Recording.isPaused":{"prefix":"Recording.isPaused","body":["Recording.isPaused"]}}, + {"Recording.playerElapsed":{"prefix":"Recording.playerElapsed","body":["Recording.playerElapsed"]}}, + {"Recording.playerLength":{"prefix":"Recording.playerLength","body":["Recording.playerLength"]}}, + {"Recording.setPlayerVolume":{"prefix":"Recording.setPlayerVolume","body":["Recording.setPlayerVolume(${1:volume: number})"]}}, + {"Recording.setPlayerAudioOffset":{"prefix":"Recording.setPlayerAudioOffset","body":["Recording.setPlayerAudioOffset(${1:audioOffset: number})"]}}, + {"Recording.setPlayerTime":{"prefix":"Recording.setPlayerTime","body":["Recording.setPlayerTime(${1:time: number})"]}}, + {"Recording.setPlayerLoop":{"prefix":"Recording.setPlayerLoop","body":["Recording.setPlayerLoop(${1:loop: boolean})"]}}, + {"Recording.setPlayerUseDisplayName":{"prefix":"Recording.setPlayerUseDisplayName","body":["Recording.setPlayerUseDisplayName(${1:useDisplayName: boolean})"]}}, + {"Recording.setPlayerUseAttachments":{"prefix":"Recording.setPlayerUseAttachments","body":["Recording.setPlayerUseAttachments(${1:useAttachments: boolean})"]}}, + {"Recording.setPlayerUseHeadModel":{"prefix":"Recording.setPlayerUseHeadModel","body":["Recording.setPlayerUseHeadModel(${1:useHeadModel: boolean})"]}}, + {"Recording.setPlayerUseSkeletonModel":{"prefix":"Recording.setPlayerUseSkeletonModel","body":["Recording.setPlayerUseSkeletonModel(${1:useSkeletonModel: boolean})"]}}, + {"Recording.setPlayFromCurrentLocation":{"prefix":"Recording.setPlayFromCurrentLocation","body":["Recording.setPlayFromCurrentLocation(${1:playFromCurrentLocation: boolean})"]}}, + {"Recording.getPlayerUseDisplayName":{"prefix":"Recording.getPlayerUseDisplayName","body":["Recording.getPlayerUseDisplayName"]}}, + {"Recording.getPlayerUseAttachments":{"prefix":"Recording.getPlayerUseAttachments","body":["Recording.getPlayerUseAttachments"]}}, + {"Recording.getPlayerUseHeadModel":{"prefix":"Recording.getPlayerUseHeadModel","body":["Recording.getPlayerUseHeadModel"]}}, + {"Recording.getPlayerUseSkeletonModel":{"prefix":"Recording.getPlayerUseSkeletonModel","body":["Recording.getPlayerUseSkeletonModel"]}}, + {"Recording.getPlayFromCurrentLocation":{"prefix":"Recording.getPlayFromCurrentLocation","body":["Recording.getPlayFromCurrentLocation"]}}, + {"Recording.startRecording":{"prefix":"Recording.startRecording","body":["Recording.startRecording"]}}, + {"Recording.stopRecording":{"prefix":"Recording.stopRecording","body":["Recording.stopRecording"]}}, + {"Recording.isRecording":{"prefix":"Recording.isRecording","body":["Recording.isRecording"]}}, + {"Recording.recorderElapsed":{"prefix":"Recording.recorderElapsed","body":["Recording.recorderElapsed"]}}, + {"Recording.getDefaultRecordingSaveDirectory":{"prefix":"Recording.getDefaultRecordingSaveDirectory","body":["Recording.getDefaultRecordingSaveDirectory"]}}, + {"Recording.saveRecording":{"prefix":"Recording.saveRecording","body":["Recording.saveRecording(${1:filename: string})"]}}, + {"Recording.saveRecordingToAsset":{"prefix":"Recording.saveRecordingToAsset","body":["Recording.saveRecordingToAsset(${1:getClipAtpUrl: function})"]}}, + {"Recording.loadLastRecording":{"prefix":"Recording.loadLastRecording","body":["Recording.loadLastRecording"]}}, + {"Scene.Stage.Location":{"prefix":"Scene.Stage.Location","body":["Scene.Stage.Location"]}}, + {"Scene.Stage.Time":{"prefix":"Scene.Stage.Time","body":["Scene.Stage.Time"]}}, + {"Scene.Stage.KeyLight":{"prefix":"Scene.Stage.KeyLight","body":["Scene.Stage.KeyLight"]}}, + {"Scene.Stage":{"prefix":"Scene.Stage","body":["Scene.Stage"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Scene.Stage.setOrientation":{"prefix":"Scene.Stage.setOrientation","body":["Scene.Stage.setOrientation(${1:orientation: Quat})"]}}, + {"Scene.Stage.setLocation":{"prefix":"Scene.Stage.setLocation","body":["Scene.Stage.setLocation(${1:longitude: number},${2:latitude: number},${3:altitude: number})"]}}, + {"Scene":{"prefix":"Scene","body":["Scene"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Scene.shouldRenderAvatarsChanged":{"prefix":"Scene.shouldRenderAvatarsChanged","body":["Scene.shouldRenderAvatarsChanged(${1:shouldRenderAvatars: boolean})"]}}, + {"Scene.shouldRenderEntitiesChanged":{"prefix":"Scene.shouldRenderEntitiesChanged","body":["Scene.shouldRenderEntitiesChanged(${1:shouldRenderEntities: boolean})"]}}, + {"AudioInjector":{"prefix":"AudioInjector","body":["AudioInjector"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

Plays — \"injects\" — the content of an audio file. Used in the {@link Audio} API."}}, + {"AudioInjector.restart":{"prefix":"AudioInjector.restart","body":["AudioInjector.restart"],"description":"Stop current playback, if any, and start playing from the beginning."}}, + {"AudioInjector.stop":{"prefix":"AudioInjector.stop","body":["AudioInjector.stop"],"description":"Stop audio playback."}}, + {"AudioInjector.getOptions":{"prefix":"AudioInjector.getOptions","body":["AudioInjector.getOptions"],"description":"Get the current configuration of the audio injector."}}, + {"AudioInjector.setOptions":{"prefix":"AudioInjector.setOptions","body":["AudioInjector.setOptions(${1:options: AudioInjector.AudioInjectorOptions})"],"description":"Configure how the injector plays the audio."}}, + {"AudioInjector.getLoudness":{"prefix":"AudioInjector.getLoudness","body":["AudioInjector.getLoudness"],"description":"Get the loudness of the most recent frame of audio played."}}, + {"AudioInjector.isPlaying":{"prefix":"AudioInjector.isPlaying","body":["AudioInjector.isPlaying"],"description":"Get whether or not the audio is currently playing."}}, + {"AudioInjector.finished":{"prefix":"AudioInjector.finished","body":["AudioInjector.finished"],"description":"Triggered when the audio has finished playing."}}, + {"AudioInjector.stopInjectorImmediately":{"prefix":"AudioInjector.stopInjectorImmediately","body":["AudioInjector.stopInjectorImmediately"],"description":"Stop audio playback. (Synonym of {@link AudioInjector.stop|stop}.)"}}, + {"Resource":{"prefix":"Resource","body":["Resource"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Entities.preload":{"prefix":"Entities.preload","body":["Entities.preload(${1:entityID: Uuid})"],"description":"Triggered when the script starts for a user.\r

Note: Can only be connected to via this.preload = function (...) { ... } in the entity script.

\r
Available in:Client Entity ScriptsServer Entity Scripts
"}}, + {"Entities.unload":{"prefix":"Entities.unload","body":["Entities.unload"],"description":"Triggered when the script terminates for a user.\r

Note: Can only be connected to via this.unoad = function () { ... } in the entity script.

\r
Available in:Client Entity ScriptsServer Entity Scripts
"}}, + {"Script":{"prefix":"Script","body":["Script"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

"}}, + {"Script.stop":{"prefix":"Script.stop","body":["Script.stop(${1:marshal: boolean})"],"description":"Stop the current script."}}, + {"Script.registerGlobalObject":{"prefix":"Script.registerGlobalObject","body":["Script.registerGlobalObject(${1:name: string},${2:object: object})"]}}, + {"Script.registerGetterSetter":{"prefix":"Script.registerGetterSetter","body":["Script.registerGetterSetter(${1:name: string},${2:getter: object},${3:setter: object},${4:parent: string})"]}}, + {"Script.registerFunction":{"prefix":"Script.registerFunction","body":["Script.registerFunction(${1:name: string},${2:function: object},${3:numArguments: number})"]}}, + {"Script.registerFunction":{"prefix":"Script.registerFunction","body":["Script.registerFunction(${1:parent: string},${2:name: string},${3:function: object},${4:numArguments: number})"]}}, + {"Script.registerValue":{"prefix":"Script.registerValue","body":["Script.registerValue(${1:name: string},${2:value: object})"]}}, + {"Script.evaluate":{"prefix":"Script.evaluate","body":["Script.evaluate(${1:program: string},${2:filename: string},${3:lineNumber: number})"]}}, + {"Script.evaluateInClosure":{"prefix":"Script.evaluateInClosure","body":["Script.evaluateInClosure(${1:locals: object},${2:program: object})"]}}, + {"Script.getContext":{"prefix":"Script.getContext","body":["Script.getContext"]}}, + {"Script.isClientScript":{"prefix":"Script.isClientScript","body":["Script.isClientScript"]}}, + {"Script.isDebugMode":{"prefix":"Script.isDebugMode","body":["Script.isDebugMode"]}}, + {"Script.isEntityClientScript":{"prefix":"Script.isEntityClientScript","body":["Script.isEntityClientScript"]}}, + {"Script.isEntityServerScript":{"prefix":"Script.isEntityServerScript","body":["Script.isEntityServerScript"]}}, + {"Script.isAgentScript":{"prefix":"Script.isAgentScript","body":["Script.isAgentScript"]}}, + {"Script.addEventHandler":{"prefix":"Script.addEventHandler","body":["Script.addEventHandler(${1:entityID: Uuid},${2:eventName: string},${3:handler: function})"]}}, + {"Script.removeEventHandler":{"prefix":"Script.removeEventHandler","body":["Script.removeEventHandler(${1:entityID: Uuid},${2:eventName: string},${3:handler: function})"]}}, + {"Script.load":{"prefix":"Script.load","body":["Script.load(${1:filename: string})"],"description":"Start a new Interface or entity script."}}, + {"Script.include":{"prefix":"Script.include","body":["Script.include(${1:filenames: Array.},${2:callback: function})"],"description":"Include JavaScript from other files in the current script. If a callback is specified the files are loaded and included \rasynchronously, otherwise they are included synchronously (i.e., script execution blocks while the files are included)."}}, + {"Script.include":{"prefix":"Script.include","body":["Script.include(${1:filename: string},${2:callback: function})"],"description":"Include JavaScript from another file in the current script. If a callback is specified the file is loaded and included \rasynchronously, otherwise it is included synchronously (i.e., script execution blocks while the file is included)."}}, + {"Script.require":{"prefix":"Script.require","body":["Script.require(${1:module: string})"]}}, + {"Script.resetModuleCache":{"prefix":"Script.resetModuleCache","body":["Script.resetModuleCache(${1:deleteScriptCache: boolean})"]}}, + {"Script.setInterval":{"prefix":"Script.setInterval","body":["Script.setInterval(${1:function: function},${2:interval: number})"],"description":"Call a function at a set interval."}}, + {"Script.setTimeout":{"prefix":"Script.setTimeout","body":["Script.setTimeout(${1:function: function},${2:timeout: number})"],"description":"Call a function after a delay."}}, + {"Script.clearInterval":{"prefix":"Script.clearInterval","body":["Script.clearInterval(${1:timer: object})"],"description":"Stop an interval timer set by {@link Script.setInterval|setInterval}."}}, + {"Script.clearTimeout":{"prefix":"Script.clearTimeout","body":["Script.clearTimeout(${1:timer: object})"],"description":"Clear a timeout timer set by {@link Script.setTimeout|setTimeout}."}}, + {"Script.print":{"prefix":"Script.print","body":["Script.print(${1:message: string})"]}}, + {"Script.resolvePath":{"prefix":"Script.resolvePath","body":["Script.resolvePath(${1:path: string})"],"description":"Resolve a relative path to an absolute path."}}, + {"Script.resourcesPath":{"prefix":"Script.resourcesPath","body":["Script.resourcesPath"]}}, + {"Script.beginProfileRange":{"prefix":"Script.beginProfileRange","body":["Script.beginProfileRange(${1:label: string})"]}}, + {"Script.endProfileRange":{"prefix":"Script.endProfileRange","body":["Script.endProfileRange(${1:label: string})"]}}, + {"Script.isEntityScriptRunning":{"prefix":"Script.isEntityScriptRunning","body":["Script.isEntityScriptRunning(${1:entityID: Uuid})"]}}, + {"Script.loadEntityScript":{"prefix":"Script.loadEntityScript","body":["Script.loadEntityScript(${1:entityID: Uuid},${2:script: string},${3:forceRedownload: boolean})"]}}, + {"Script.unloadEntityScript":{"prefix":"Script.unloadEntityScript","body":["Script.unloadEntityScript(${1:entityID: Uuid},${2:shouldRemoveFromMap: boolean})"]}}, + {"Script.unloadAllEntityScripts":{"prefix":"Script.unloadAllEntityScripts","body":["Script.unloadAllEntityScripts"]}}, + {"Script.callEntityScriptMethod":{"prefix":"Script.callEntityScriptMethod","body":["Script.callEntityScriptMethod(${1:entityID: Uuid},${2:methodName: string},${3:parameters: Array.},${4:remoteCallerID: Uuid})"]}}, + {"Script.callEntityScriptMethod":{"prefix":"Script.callEntityScriptMethod","body":["Script.callEntityScriptMethod(${1:entityID: Uuid},${2:methodName: string},${3:event: PointerEvent})"]}}, + {"Script.callEntityScriptMethod":{"prefix":"Script.callEntityScriptMethod","body":["Script.callEntityScriptMethod(${1:entityID: Uuid},${2:methodName: string},${3:otherID: Uuid},${4:collision: Collision})"]}}, + {"Script.requestGarbageCollection":{"prefix":"Script.requestGarbageCollection","body":["Script.requestGarbageCollection"]}}, + {"Script.generateUUID":{"prefix":"Script.generateUUID","body":["Script.generateUUID"]}}, + {"Script.callAnimationStateHandler":{"prefix":"Script.callAnimationStateHandler","body":["Script.callAnimationStateHandler(${1:callback: function},${2:parameters: object},${3:names: Array.},${4:useNames: boolean},${5:resultHandler: object})"]}}, + {"Script.updateMemoryCost":{"prefix":"Script.updateMemoryCost","body":["Script.updateMemoryCost(${1:deltaSize: number})"]}}, + {"Script.scriptLoaded":{"prefix":"Script.scriptLoaded","body":["Script.scriptLoaded(${1:filename: string})"]}}, + {"Script.errorLoadingScript":{"prefix":"Script.errorLoadingScript","body":["Script.errorLoadingScript(${1:filename: string})"]}}, + {"Script.update":{"prefix":"Script.update","body":["Script.update(${1:deltaTime: number})"],"description":"Triggered regularly at a system-determined frequency."}}, + {"Script.scriptEnding":{"prefix":"Script.scriptEnding","body":["Script.scriptEnding"],"description":"Triggered when the script is ending."}}, + {"Script.finished":{"prefix":"Script.finished","body":["Script.finished(${1:filename: string},${2:engine: object})"]}}, + {"Script.cleanupMenuItem":{"prefix":"Script.cleanupMenuItem","body":["Script.cleanupMenuItem(${1:menuItem: string})"]}}, + {"Script.printedMessage":{"prefix":"Script.printedMessage","body":["Script.printedMessage(${1:message: string},${2:scriptName: string})"]}}, + {"Script.errorMessage":{"prefix":"Script.errorMessage","body":["Script.errorMessage(${1:message: string},${2:scriptName: string})"]}}, + {"Script.warningMessage":{"prefix":"Script.warningMessage","body":["Script.warningMessage(${1:message: string},${2:scriptName: string})"]}}, + {"Script.infoMessage":{"prefix":"Script.infoMessage","body":["Script.infoMessage(${1:message: string},${2:scriptName: string})"]}}, + {"Script.runningStateChanged":{"prefix":"Script.runningStateChanged","body":["Script.runningStateChanged"]}}, + {"Script.clearDebugWindow":{"prefix":"Script.clearDebugWindow","body":["Script.clearDebugWindow"]}}, + {"Script.loadScript":{"prefix":"Script.loadScript","body":["Script.loadScript(${1:scriptName: string},${2:isUserLoaded: boolean})"]}}, + {"Script.reloadScript":{"prefix":"Script.reloadScript","body":["Script.reloadScript(${1:scriptName: string},${2:isUserLoaded: boolean})"]}}, + {"Script.doneRunning":{"prefix":"Script.doneRunning","body":["Script.doneRunning"]}}, + {"Script.entityScriptDetailsUpdated":{"prefix":"Script.entityScriptDetailsUpdated","body":["Script.entityScriptDetailsUpdated"]}}, + {"Script.entityScriptPreloadFinished":{"prefix":"Script.entityScriptPreloadFinished","body":["Script.entityScriptPreloadFinished"]}}, + {"Script.executeOnScriptThread":{"prefix":"Script.executeOnScriptThread","body":["Script.executeOnScriptThread(${1:function: object},${2:type: ConnectionType})"]}}, + {"Script._requireResolve":{"prefix":"Script._requireResolve","body":["Script._requireResolve(${1:module: string},${2:relativeTo: string})"]}}, + {"Script.entityScriptContentAvailable":{"prefix":"Script.entityScriptContentAvailable","body":["Script.entityScriptContentAvailable(${1:entityID: Uuid},${2:scriptOrURL: string},${3:contents: string},${4:isURL: boolean},${5:success: boolean},${6:status: string})"]}}, + {"ScriptDiscoveryService":{"prefix":"ScriptDiscoveryService","body":["ScriptDiscoveryService"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"ScriptDiscoveryService.loadOneScript":{"prefix":"ScriptDiscoveryService.loadOneScript","body":["ScriptDiscoveryService.loadOneScript(${1:filename: string})"]}}, + {"ScriptDiscoveryService.loadScript":{"prefix":"ScriptDiscoveryService.loadScript","body":["ScriptDiscoveryService.loadScript(${1:filename: string},${2:isUserLoaded: boolean},${3:loadScriptFromEditor: boolean},${4:activateMainWindow: boolean},${5:reload: boolean},${6:quitWhenFinished: boolean})"]}}, + {"ScriptDiscoveryService.stopScript":{"prefix":"ScriptDiscoveryService.stopScript","body":["ScriptDiscoveryService.stopScript(${1:scriptHash: string},${2:restart: boolean})"]}}, + {"ScriptDiscoveryService.reloadAllScripts":{"prefix":"ScriptDiscoveryService.reloadAllScripts","body":["ScriptDiscoveryService.reloadAllScripts"]}}, + {"ScriptDiscoveryService.stopAllScripts":{"prefix":"ScriptDiscoveryService.stopAllScripts","body":["ScriptDiscoveryService.stopAllScripts(${1:restart: boolean})"]}}, + {"ScriptDiscoveryService.getRunning":{"prefix":"ScriptDiscoveryService.getRunning","body":["ScriptDiscoveryService.getRunning"]}}, + {"ScriptDiscoveryService.getPublic":{"prefix":"ScriptDiscoveryService.getPublic","body":["ScriptDiscoveryService.getPublic"]}}, + {"ScriptDiscoveryService.getLocal":{"prefix":"ScriptDiscoveryService.getLocal","body":["ScriptDiscoveryService.getLocal"]}}, + {"ScriptDiscoveryService.scriptCountChanged":{"prefix":"ScriptDiscoveryService.scriptCountChanged","body":["ScriptDiscoveryService.scriptCountChanged"]}}, + {"ScriptDiscoveryService.scriptsReloading":{"prefix":"ScriptDiscoveryService.scriptsReloading","body":["ScriptDiscoveryService.scriptsReloading"]}}, + {"ScriptDiscoveryService.scriptLoadError":{"prefix":"ScriptDiscoveryService.scriptLoadError","body":["ScriptDiscoveryService.scriptLoadError(${1:filename: string},${2:error: string})"]}}, + {"ScriptDiscoveryService.printedMessage":{"prefix":"ScriptDiscoveryService.printedMessage","body":["ScriptDiscoveryService.printedMessage(${1:message: string},${2:engineName: string})"]}}, + {"ScriptDiscoveryService.errorMessage":{"prefix":"ScriptDiscoveryService.errorMessage","body":["ScriptDiscoveryService.errorMessage(${1:message: string},${2:engineName: string})"]}}, + {"ScriptDiscoveryService.warningMessage":{"prefix":"ScriptDiscoveryService.warningMessage","body":["ScriptDiscoveryService.warningMessage(${1:message: string},${2:engineName: string})"]}}, + {"ScriptDiscoveryService.infoMessage":{"prefix":"ScriptDiscoveryService.infoMessage","body":["ScriptDiscoveryService.infoMessage(${1:message: string},${2:engineName: string})"]}}, + {"ScriptDiscoveryService.errorLoadingScript":{"prefix":"ScriptDiscoveryService.errorLoadingScript","body":["ScriptDiscoveryService.errorLoadingScript(${1:url: string})"]}}, + {"ScriptDiscoveryService.clearDebugWindow":{"prefix":"ScriptDiscoveryService.clearDebugWindow","body":["ScriptDiscoveryService.clearDebugWindow"]}}, + {"ScriptDiscoveryService.onPrintedMessage":{"prefix":"ScriptDiscoveryService.onPrintedMessage","body":["ScriptDiscoveryService.onPrintedMessage(${1:message: string},${2:scriptName: string})"]}}, + {"ScriptDiscoveryService.onErrorMessage":{"prefix":"ScriptDiscoveryService.onErrorMessage","body":["ScriptDiscoveryService.onErrorMessage(${1:message: string},${2:scriptName: string})"]}}, + {"ScriptDiscoveryService.onWarningMessage":{"prefix":"ScriptDiscoveryService.onWarningMessage","body":["ScriptDiscoveryService.onWarningMessage(${1:message: string},${2:scriptName: string})"]}}, + {"ScriptDiscoveryService.onInfoMessage":{"prefix":"ScriptDiscoveryService.onInfoMessage","body":["ScriptDiscoveryService.onInfoMessage(${1:message: string},${2:scriptName: string})"]}}, + {"ScriptDiscoveryService.onErrorLoadingScript":{"prefix":"ScriptDiscoveryService.onErrorLoadingScript","body":["ScriptDiscoveryService.onErrorLoadingScript(${1:url: string})"]}}, + {"ScriptDiscoveryService.onClearDebugWindow":{"prefix":"ScriptDiscoveryService.onClearDebugWindow","body":["ScriptDiscoveryService.onClearDebugWindow"]}}, + {"ScriptDiscoveryService.onScriptFinished":{"prefix":"ScriptDiscoveryService.onScriptFinished","body":["ScriptDiscoveryService.onScriptFinished(${1:filename: string},${2:engine: object})"]}}, + {"ScriptsModel":{"prefix":"ScriptsModel","body":["ScriptsModel"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Provided as a property of {@link ScriptDiscoveryService}.

\r

Has properties and functions below in addition to those of \rhttp://doc.qt.io/qt-5/qabstractitemmodel.html.

"}}, + {"ScriptsModel.index":{"prefix":"ScriptsModel.index","body":["ScriptsModel.index(${1:row: number},${2:column: number},${3:parent: QModelIndex})"]}}, + {"ScriptsModel.parent":{"prefix":"ScriptsModel.parent","body":["ScriptsModel.parent(${1:child: QModelIndex})"]}}, + {"ScriptsModel.data":{"prefix":"ScriptsModel.data","body":["ScriptsModel.data(${1:index: QModelIndex},${2:role: number})"]}}, + {"ScriptsModel.rowCount":{"prefix":"ScriptsModel.rowCount","body":["ScriptsModel.rowCount(${1:parent: QmodelIndex})"]}}, + {"ScriptsModel.columnCount":{"prefix":"ScriptsModel.columnCount","body":["ScriptsModel.columnCount(${1:parent: QmodelIndex})"]}}, + {"ScriptsModel.getTreeNodeFromIndex":{"prefix":"ScriptsModel.getTreeNodeFromIndex","body":["ScriptsModel.getTreeNodeFromIndex(${1:index: QmodelIndex})"]}}, + {"ScriptsModel.getFolderNodes":{"prefix":"ScriptsModel.getFolderNodes","body":["ScriptsModel.getFolderNodes(${1:parent: TreeNodeFolder})"]}}, + {"ScriptsModelFilter":{"prefix":"ScriptsModelFilter","body":["ScriptsModelFilter"],"description":"
Available in:Interface ScriptsClient Entity Scripts

Provided as a property of {@link ScriptDiscoveryService}.

\r

Has properties and functions per \rhttp://doc.qt.io/qt-5/qsortfilterproxymodel.html.

"}}, + {"Uuid":{"prefix":"Uuid","body":["Uuid"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

A UUID (Universally Unique IDentifier) is used to uniquely identify entities, overlays, avatars, and the like. It is\rrepresented in JavaScript as a string in the format, {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}, where the \"n\"s are\rhexadecimal digits."}}, + {"Uuid.fromString":{"prefix":"Uuid.fromString","body":["Uuid.fromString(${1:string: string})"],"description":"Generates a UUID from a string representation of the UUID."}}, + {"Uuid.toString":{"prefix":"Uuid.toString","body":["Uuid.toString(${1:id: Uuid})"],"description":"Generates a string representation of a UUID. However, because UUIDs are represented in JavaScript as strings, this is in\reffect a no-op."}}, + {"Uuid.generate":{"prefix":"Uuid.generate","body":["Uuid.generate"],"description":"Generate a new UUID."}}, + {"Uuid.isEqual":{"prefix":"Uuid.isEqual","body":["Uuid.isEqual(${1:idA: Uuid},${2:idB: Uuid})"],"description":"Test whether two given UUIDs are equal."}}, + {"Uuid.isNull":{"prefix":"Uuid.isNull","body":["Uuid.isNull(${1:id: Uuid})"],"description":"Test whether a given UUID is null."}}, + {"Uuid.print":{"prefix":"Uuid.print","body":["Uuid.print(${1:label: string},${2:id: Uuid})"],"description":"Print to the program log a text label followed by the UUID value."}}, + {"TouchEvent":{"prefix":"TouchEvent","body":["TouchEvent"],"description":"A display or device touch event."}}, + {"Users":{"prefix":"Users","body":["Users"],"description":"
Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts

"}}, + {"Users.ignore":{"prefix":"Users.ignore","body":["Users.ignore(${1:nodeID: Uuid},${2:enable: boolean})"],"description":"Personally ignore another user, making them disappear for you and you disappear for them."}}, + {"Users.getIgnoreStatus":{"prefix":"Users.getIgnoreStatus","body":["Users.getIgnoreStatus(${1:nodeID: Uuid})"],"description":"Get whether or not you have ignored the node with the given UUID."}}, + {"Users.personalMute":{"prefix":"Users.personalMute","body":["Users.personalMute(${1:nodeID: Uuid},${2:muteEnabled: boolean})"],"description":"Mute another user for you and you only. They won't be able to hear you, and you won't be able to hear them."}}, + {"Users.requestPersonalMuteStatus":{"prefix":"Users.requestPersonalMuteStatus","body":["Users.requestPersonalMuteStatus(${1:nodeID: Uuid})"],"description":"Get whether or not you have personally muted the node with the given UUID."}}, + {"Users.setAvatarGain":{"prefix":"Users.setAvatarGain","body":["Users.setAvatarGain(${1:nodeID: Uuid},${2:gain: number})"],"description":"Sets an avatar's gain for you and you only.\rUnits are Decibels (dB)"}}, + {"Users.getAvatarGain":{"prefix":"Users.getAvatarGain","body":["Users.getAvatarGain(${1:nodeID: Uuid})"],"description":"Gets an avatar's gain for you and you only."}}, + {"Users.kick":{"prefix":"Users.kick","body":["Users.kick(${1:nodeID: Uuid})"],"description":"Kick/ban another user. Removes them from the server and prevents them from returning. Bans by either user name (if \ravailable) or machine fingerprint otherwise. This will only do anything if you're an admin of the domain you're in."}}, + {"Users.mute":{"prefix":"Users.mute","body":["Users.mute(${1:nodeID: Uuid})"],"description":"Mutes another user's microphone for everyone. Not permanent; the silenced user can unmute themselves with the UNMUTE \rbutton in their HUD. This will only do anything if you're an admin of the domain you're in."}}, + {"Users.requestUsernameFromID":{"prefix":"Users.requestUsernameFromID","body":["Users.requestUsernameFromID(${1:nodeID: Uuid})"],"description":"Request the user name and machine fingerprint associated with the given UUID. The user name will be returned in a \r{@link Users.usernameFromIDReply|usernameFromIDReply} signal. This will only do anything if you're an admin of the domain \ryou're in."}}, + {"Users.getCanKick":{"prefix":"Users.getCanKick","body":["Users.getCanKick"],"description":"Returns `true` if the DomainServer will allow this Node/Avatar to make kick."}}, + {"Users.toggleIgnoreRadius":{"prefix":"Users.toggleIgnoreRadius","body":["Users.toggleIgnoreRadius"],"description":"Toggle the state of the space bubble feature."}}, + {"Users.enableIgnoreRadius":{"prefix":"Users.enableIgnoreRadius","body":["Users.enableIgnoreRadius"],"description":"Enables the space bubble feature."}}, + {"Users.disableIgnoreRadius":{"prefix":"Users.disableIgnoreRadius","body":["Users.disableIgnoreRadius"],"description":"Disables the space bubble feature."}}, + {"Users.getIgnoreRadiusEnabled":{"prefix":"Users.getIgnoreRadiusEnabled","body":["Users.getIgnoreRadiusEnabled"],"description":"Returns `true` if the space bubble feature is enabled."}}, + {"Users.canKickChanged":{"prefix":"Users.canKickChanged","body":["Users.canKickChanged(${1:canKick: boolean})"]}}, + {"Users.ignoreRadiusEnabledChanged":{"prefix":"Users.ignoreRadiusEnabledChanged","body":["Users.ignoreRadiusEnabledChanged(${1:isEnabled: boolean})"]}}, + {"Users.enteredIgnoreRadius":{"prefix":"Users.enteredIgnoreRadius","body":["Users.enteredIgnoreRadius"],"description":"Notifies scripts that another user has entered the ignore radius."}}, + {"Users.usernameFromIDReply":{"prefix":"Users.usernameFromIDReply","body":["Users.usernameFromIDReply(${1:nodeID: Uuid},${2:userName: string},${3:machineFingerprint: string},${4:isAdmin: boolean})"],"description":"Triggered in response to a {@link Users.requestUsernameFromID|requestUsernameFromID} call. Provides the user name and \rmachine fingerprint associated with a UUID.\rUsername and machineFingerprint will be their default constructor output if the requesting user isn't an admin."}}, + {"Users.avatarDisconnected":{"prefix":"Users.avatarDisconnected","body":["Users.avatarDisconnected(${1:nodeID: Uuid})"],"description":"Notifies scripts that a user has disconnected from the domain."}}, + {"Vec3":{"prefix":"Vec3","body":["Vec3"],"description":"A 3-dimensional vector. See also the {@link Vec3(0)|Vec3} object."}}, + {"Vec3Color":{"prefix":"Vec3Color","body":["Vec3Color"],"description":"A color vector. See also the {@link Vec3(0)|Vec3} object."}}, + {"Vec3":{"prefix":"Vec3","body":["Vec3"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

The Vec3 API facilities for generating and manipulating 3-dimensional vectors. High Fidelity uses a right-handed \rCartesian coordinate system where the y-axis is the \"up\" and the negative z-axis is the \"front\" direction.\r\"High"}}, + {"Vec3.reflect":{"prefix":"Vec3.reflect","body":["Vec3.reflect(${1:v: Vec3},${2:normal: Vec3})"],"description":"Calculate the reflection of a vector in a plane."}}, + {"Vec3.cross":{"prefix":"Vec3.cross","body":["Vec3.cross(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate the cross product of two vectors."}}, + {"Vec3.dot":{"prefix":"Vec3.dot","body":["Vec3.dot(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate the dot product of two vectors."}}, + {"Vec3.multiply":{"prefix":"Vec3.multiply","body":["Vec3.multiply(${1:v: Vec3},${2:scale: number})"],"description":"Multiply a vector by a scale factor."}}, + {"Vec3.multiply":{"prefix":"Vec3.multiply","body":["Vec3.multiply(${1:scale: number},${2:v: Vec3})"],"description":"Multiply a vector by a scale factor."}}, + {"Vec3.multiplyVbyV":{"prefix":"Vec3.multiplyVbyV","body":["Vec3.multiplyVbyV(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Multiply two vectors."}}, + {"Vec3.multiplyQbyV":{"prefix":"Vec3.multiplyQbyV","body":["Vec3.multiplyQbyV(${1:q: Quat},${2:v: Vec3})"],"description":"Rotate a vector."}}, + {"Vec3.sum":{"prefix":"Vec3.sum","body":["Vec3.sum(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate the sum of two vectors."}}, + {"Vec3.subtract":{"prefix":"Vec3.subtract","body":["Vec3.subtract(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate one vector subtracted from another."}}, + {"Vec3.length":{"prefix":"Vec3.length","body":["Vec3.length(${1:v: Vec3})"],"description":"Calculate the length of a vector"}}, + {"Vec3.distance":{"prefix":"Vec3.distance","body":["Vec3.distance(${1:p1: Vec3},${2:p2: Vec3})"],"description":"Calculate the distance between two points."}}, + {"Vec3.orientedAngle":{"prefix":"Vec3.orientedAngle","body":["Vec3.orientedAngle(${1:v1: Vec3},${2:v2: Vec3},${3:ref: Vec3})"],"description":"Calculate the angle of rotation from one vector onto another, with the sign depending on a reference vector."}}, + {"Vec3.normalize":{"prefix":"Vec3.normalize","body":["Vec3.normalize(${1:v: Vec3})"],"description":"Normalize a vector so that its length is 1."}}, + {"Vec3.mix":{"prefix":"Vec3.mix","body":["Vec3.mix(${1:v1: Vec3},${2:v2: Vec3},${3:factor: number})"],"description":"Calculate a linear interpolation between two vectors."}}, + {"Vec3.print":{"prefix":"Vec3.print","body":["Vec3.print(${1:label: string},${2:v: Vec3})"],"description":"Print to the program log a text label followed by a vector value."}}, + {"Vec3.equal":{"prefix":"Vec3.equal","body":["Vec3.equal(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Test whether two vectors are equal. Note: The vectors must be exactly equal in order for \rtrue to be returned; it is often better to use {@link Vec3(0).withinEpsilon|withinEpsilon}."}}, + {"Vec3.withinEpsilon":{"prefix":"Vec3.withinEpsilon","body":["Vec3.withinEpsilon(${1:v1: Vec3},${2:v2: Vec3},${3:epsilon: number})"],"description":"Test whether two vectors are equal within a tolerance. Note: It is often better to use this function \rthan {@link Vec3(0).equal|equal}."}}, + {"Vec3.toPolar":{"prefix":"Vec3.toPolar","body":["Vec3.toPolar(${1:p: Vec3})"],"description":"Calculate polar coordinates (elevation, azimuth, radius) that transform the unit z-axis vector onto a point."}}, + {"Vec3.fromPolar":{"prefix":"Vec3.fromPolar","body":["Vec3.fromPolar(${1:polar: Vec3})"],"description":"Calculate the coordinates of a point from polar coordinate transformation of the unit z-axis vector."}}, + {"Vec3.fromPolar":{"prefix":"Vec3.fromPolar","body":["Vec3.fromPolar(${1:elevation: number},${2:azimuth: number})"],"description":"Calculate the unit vector corresponding to polar coordinates elevation and azimuth transformation of the unit z-axis \rvector."}}, + {"Vec3.getAngle":{"prefix":"Vec3.getAngle","body":["Vec3.getAngle(${1:v1: Vec3},${2:v2: Vec3})"],"description":"Calculate the angle between two vectors."}}, + {"WheelEvent":{"prefix":"WheelEvent","body":["WheelEvent"],"description":"A mouse wheel event."}}, + {"BoxFace":{"prefix":"BoxFace","body":["BoxFace"],"description":"

A BoxFace specifies the face of an axis-aligned (AA) box.\r\r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
\"MIN_X_FACE\"The minimum x-axis face.
\"MAX_X_FACE\"The maximum x-axis face.
\"MIN_Y_FACE\"The minimum y-axis face.
\"MAX_Y_FACE\"The maximum y-axis face.
\"MIN_Z_FACE\"The minimum z-axis face.
\"MAX_Z_FACE\"The maximum z-axis face.
\"UNKNOWN_FACE\"Unknown value.
"}}, + {"DebugDraw":{"prefix":"DebugDraw","body":["DebugDraw"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

Helper functions to render ephemeral debug markers and lines.\rDebugDraw markers and lines are only visible locally, they are not visible by other users."}}, + {"DebugDraw.drawRay":{"prefix":"DebugDraw.drawRay","body":["DebugDraw.drawRay(${1:start: Vec3},${2:end: Vec3},${3:color: Vec4})"],"description":"Draws a line in world space, but it will only be visible for a single frame."}}, + {"DebugDraw.addMarker":{"prefix":"DebugDraw.addMarker","body":["DebugDraw.addMarker(${1:key: string},${2:rotation: Quat},${3:position: Vec3},${4:color: Vec4})"],"description":"Adds a debug marker to the world. This marker will be drawn every frame until it is removed with DebugDraw.removeMarker.\rThis can be called repeatedly to change the position of the marker."}}, + {"DebugDraw.removeMarker":{"prefix":"DebugDraw.removeMarker","body":["DebugDraw.removeMarker(${1:key: string})"],"description":"Removes debug marker from the world. Once a marker is removed, it will no longer be visible."}}, + {"DebugDraw.addMyAvatarMarker":{"prefix":"DebugDraw.addMyAvatarMarker","body":["DebugDraw.addMyAvatarMarker(${1:key: string},${2:rotation: Quat},${3:position: Vec3},${4:color: Vec4})"],"description":"Adds a debug marker to the world, this marker will be drawn every frame until it is removed with DebugDraw.removeMyAvatarMarker.\rThis can be called repeatedly to change the position of the marker."}}, + {"DebugDraw.removeMyAvatarMarker":{"prefix":"DebugDraw.removeMyAvatarMarker","body":["DebugDraw.removeMyAvatarMarker(${1:key: string})"],"description":"Removes debug marker from the world. Once a marker is removed, it will no longer be visible"}}, + {"Paths":{"prefix":"Paths","body":["Paths"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Paths API provides absolute paths to the scripts and resources directories."}}, + {"Entities.CollisionMask":{"prefix":"Entities.CollisionMask","body":["Entities.CollisionMask"],"description":"

An entity may collide with the following types of items:

\r\r \r \r \r \r \r \r \r \r \r \r
ValueDescription
1Static entities — non-dynamic entities with no velocity.
2Dynamic entities — entities that have their dynamic property set to\r true.
4Kinematic entities — non-dynamic entities with velocity.
8My avatar.
16Other avatars.
\r

The values for the collision types that are enabled are added together to give the CollisionMask value. For example, a\rvalue of 31 means that an entity will collide with all item types.

"}}, + {"PointerEvent":{"prefix":"PointerEvent","body":["PointerEvent"],"description":"A PointerEvent defines a 2D or 3D mouse or similar pointer event."}}, + {"KeyboardModifiers":{"prefix":"KeyboardModifiers","body":["KeyboardModifiers"],"description":"

A KeyboardModifiers value is used to specify which modifier keys on the keyboard are pressed. The value is the sum \r(bitwise OR) of the relevant combination of values from the following table:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
KeyHexadecimal valueDecimal valueDescription
Shift0x0200000033554432A Shift key on the keyboard is pressed.
Control0x0400000067108864A control key on the keyboard is pressed. On Windows the \"control\" key is the Ctrl key; on OSX it is the Command \r key.
Alt0x08000000134217728An Alt key on the keyboard is pressed.
Meta0x10000000268435456A meta key on the keyboard is pressed. On Windows the \"meta\" key is the Windows key; on OSX it is the Control \r (Splat) key.
Keypad0x20000000536870912A keypad button is pressed.
Group0x400000001073741824X11 operating system only: An AltGr / Mode_switch key on the keyboard is pressed.
"}}, + {"Rect":{"prefix":"Rect","body":["Rect"],"description":"Defines a rectangular portion of an image or screen, or similar."}}, + {"Color":{"prefix":"Color","body":["Color"],"description":"An RGB color value."}}, + {"AACube":{"prefix":"AACube","body":["AACube"],"description":"An axis-aligned cube, defined as the bottom right near (minimum axes values) corner of the cube plus the dimension of its \rsides."}}, + {"Collision":{"prefix":"Collision","body":["Collision"]}}, + {"Size":{"prefix":"Size","body":["Size"],"description":"A 2D size value."}}, + {"Avatar.AnimationDetails":{"prefix":"Avatar.AnimationDetails","body":["Avatar.AnimationDetails"]}}, + {"Vec4":{"prefix":"Vec4","body":["Vec4"],"description":"A 4-dimensional vector."}}, + {"Vec2":{"prefix":"Vec2","body":["Vec2"],"description":"A 2-dimensional vector."}}, + {"PickRay":{"prefix":"PickRay","body":["PickRay"],"description":"A PickRay defines a vector with a starting point. It is used, for example, when finding entities or overlays that lie under a\rmouse click or intersect a laser beam."}}, + {"StylusTip":{"prefix":"StylusTip","body":["StylusTip"],"description":"A StylusTip defines the tip of a stylus."}}, + {"PickParabola":{"prefix":"PickParabola","body":["PickParabola"],"description":"A PickParabola defines a parabola with a starting point, intitial velocity, and acceleration."}}, + {"CollisionRegion":{"prefix":"CollisionRegion","body":["CollisionRegion"],"description":"A CollisionRegion defines a volume for checking collisions in the physics simulation."}}, + {"ContactEventType":{"prefix":"ContactEventType","body":["ContactEventType"],"description":"

The type of a collision contact event.\r\r \r \r \r \r \r \r \r \r
ValueDescription
0Start of the collision.
1Continuation of the collision.
2End of the collision.
"}}, + {"MeshProxy":{"prefix":"MeshProxy","body":["MeshProxy"],"description":"
Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts

A handle for a mesh in an entity, such as returned by {@link Entities.getMeshes}."}}, + {"MeshProxy#getNumVertices":{"prefix":"MeshProxy#getNumVertices","body":["MeshProxy#getNumVertices"],"description":"Get the number of vertices in the mesh."}}, + {"MeshProxy#getPos":{"prefix":"MeshProxy#getPos","body":["MeshProxy#getPos(${1:index: number})"],"description":"Get the position of a vertex in the mesh."}}, + {"ShapeType":{"prefix":"ShapeType","body":["ShapeType"],"description":"

A ShapeType defines the shape used for collisions or zones.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
\"none\"No shape.
\"box\"A cube.
\"sphere\"A sphere.
\"capsule-x\"A capsule (cylinder with spherical ends) oriented on the x-axis.
\"capsule-y\"A capsule (cylinder with spherical ends) oriented on the y-axis.
\"capsule-z\"A capsule (cylinder with spherical ends) oriented on the z-axis.
\"cylinder-x\"A cylinder oriented on the x-axis.
\"cylinder-y\"A cylinder oriented on the y-axis.
\"cylinder-z\"A cylinder oriented on the z-axis.
\"hull\"Not used.
\"compound\"A compound convex hull specified in an OBJ file.
\"simple-hull\"A convex hull automatically generated from the model.
\"simple-compound\"A compound convex hull automatically generated from the model, using \r sub-meshes.
\"static-mesh\"The exact shape of the model.
\"plane\"A plane.
"}}, + {"Camera.Mode":{"prefix":"Camera.Mode","body":["Camera.Mode"],"description":"

Camera modes affect the position of the camera and the controls for camera movement. The camera can be in one of the\rfollowing modes:

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
ModeStringDescription
First Person\"first person\"The camera is positioned such that you have the same view as your avatar. The camera moves and rotates with your\r avatar.
Third Person\"third person\"The camera is positioned such that you have a view from just behind your avatar. The camera moves and rotates with\r your avatar.
Mirror\"mirror\"The camera is positioned such that you are looking directly at your avatar. The camera moves and rotates with your \r avatar.
Independent\"independent\"The camera's position and orientation don't change with your avatar movement. Instead, they can be set via \r scripting.
Entity\"entity\"The camera's position and orientation are set to be the same as a specified entity's, and move with the entity as\r it moves.\r
"}}, + {"ViewFrustum":{"prefix":"ViewFrustum","body":["ViewFrustum"],"description":"A ViewFrustum has a \"keyhole\" shape: a regular frustum for stuff that is visible plus a central sphere for stuff that is\rnearby (for physics simulation)."}}, + {"Camera":{"prefix":"Camera","body":["Camera"],"description":"
Available in:Interface ScriptsClient Entity Scripts

The Camera API provides access to the \"camera\" that defines your view in desktop and HMD display modes."}}, + {"Camera.getModeString":{"prefix":"Camera.getModeString","body":["Camera.getModeString"],"description":"Get the current camera mode. You can also get the mode using the Camera.mode property."}}, + {"Camera.setModeString":{"prefix":"Camera.setModeString","body":["Camera.setModeString(${1:mode: Camera.Mode})"],"description":"Set the camera mode. You can also set the mode using the Camera.mode property."}}, + {"Camera.getPosition":{"prefix":"Camera.getPosition","body":["Camera.getPosition"],"description":"Get the current camera position. You can also get the position using the Camera.position property."}}, + {"Camera.setPosition":{"prefix":"Camera.setPosition","body":["Camera.setPosition(${1:position: Vec3})"],"description":"Set the camera position. You can also set the position using the Camera.position property. Only works if the\r camera is in independent mode."}}, + {"Camera.getOrientation":{"prefix":"Camera.getOrientation","body":["Camera.getOrientation"],"description":"Get the current camera orientation. You can also get the orientation using the Camera.orientation property."}}, + {"Camera.setOrientation":{"prefix":"Camera.setOrientation","body":["Camera.setOrientation(${1:orientation: Quat})"],"description":"Set the camera orientation. You can also set the orientation using the Camera.orientation property. Only\r works if the camera is in independent mode."}}, + {"Camera.computePickRay":{"prefix":"Camera.computePickRay","body":["Camera.computePickRay(${1:x: number},${2:y: number})"],"description":"Compute a {@link PickRay} based on the current camera configuration and the specified x, y position on the \r screen. The {@link PickRay} can be used in functions such as {@link Entities.findRayIntersection} and \r {@link Overlays.findRayIntersection}."}}, + {"Camera.lookAt":{"prefix":"Camera.lookAt","body":["Camera.lookAt(${1:position: Vec3})"],"description":"Rotate the camera to look at the specified position. Only works if the camera is in independent mode."}}, + {"Camera.keepLookingAt":{"prefix":"Camera.keepLookingAt","body":["Camera.keepLookingAt(${1:position: Vec3})"],"description":"Set the camera to continue looking at the specified position even while the camera moves. Only works if the \rcamera is in independent mode."}}, + {"Camera.stopLookingAt":{"prefix":"Camera.stopLookingAt","body":["Camera.stopLookingAt"],"description":"Stops the camera from continually looking at the position that was set with Camera.keepLookingAt."}}, + {"Camera.modeUpdated":{"prefix":"Camera.modeUpdated","body":["Camera.modeUpdated(${1:newMode: Camera.Mode})"],"description":"Triggered when the camera mode changes."}}, + {"Render.toJSON":{"prefix":"Render.toJSON","body":["Render.toJSON"]}}, + {"Render.load":{"prefix":"Render.load","body":["Render.load(${1:map: object})"]}}, + {"Render.isTask":{"prefix":"Render.isTask","body":["Render.isTask"]}}, + {"Render.getSubConfigs":{"prefix":"Render.getSubConfigs","body":["Render.getSubConfigs"]}}, + {"Render.getNumSubs":{"prefix":"Render.getNumSubs","body":["Render.getNumSubs"]}}, + {"Render.getSubConfig":{"prefix":"Render.getSubConfig","body":["Render.getSubConfig(${1:index: number})"]}}, + {"Render.load":{"prefix":"Render.load","body":["Render.load(${1:map: object})"]}}, + {"Render.loaded":{"prefix":"Render.loaded","body":["Render.loaded"]}}, + {"Render.newStats":{"prefix":"Render.newStats","body":["Render.newStats"]}}, + {"Render.dirtyEnabled":{"prefix":"Render.dirtyEnabled","body":["Render.dirtyEnabled"]}}, + {"Render":{"prefix":"Render","body":["Render"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Render.getConfig":{"prefix":"Render.getConfig","body":["Render.getConfig(${1:name: string})"]}}, + {"Render.refresh":{"prefix":"Render.refresh","body":["Render.refresh"]}}, + {"FaceTracker.muteToggled":{"prefix":"FaceTracker.muteToggled","body":["FaceTracker.muteToggled"]}}, + {"FaceTracker.toggleMute":{"prefix":"FaceTracker.toggleMute","body":["FaceTracker.toggleMute"]}}, + {"FaceTracker.getMuted":{"prefix":"FaceTracker.getMuted","body":["FaceTracker.getMuted"]}}, + {"InteractiveWindow":{"prefix":"InteractiveWindow","body":["InteractiveWindow"],"description":"
Available in:Interface Scripts

"}}, + {"InteractiveWindow.sendToQml":{"prefix":"InteractiveWindow.sendToQml","body":["InteractiveWindow.sendToQml(${1:message: object})"]}}, + {"InteractiveWindow.emitScriptEvent":{"prefix":"InteractiveWindow.emitScriptEvent","body":["InteractiveWindow.emitScriptEvent(${1:message: object})"]}}, + {"InteractiveWindow.emitWebEvent":{"prefix":"InteractiveWindow.emitWebEvent","body":["InteractiveWindow.emitWebEvent(${1:message: object})"]}}, + {"InteractiveWindow.close":{"prefix":"InteractiveWindow.close","body":["InteractiveWindow.close"]}}, + {"InteractiveWindow.show":{"prefix":"InteractiveWindow.show","body":["InteractiveWindow.show"]}}, + {"InteractiveWindow.raise":{"prefix":"InteractiveWindow.raise","body":["InteractiveWindow.raise"]}}, + {"InteractiveWindow.visibleChanged":{"prefix":"InteractiveWindow.visibleChanged","body":["InteractiveWindow.visibleChanged"]}}, + {"InteractiveWindow.positionChanged":{"prefix":"InteractiveWindow.positionChanged","body":["InteractiveWindow.positionChanged"]}}, + {"InteractiveWindow.sizeChanged":{"prefix":"InteractiveWindow.sizeChanged","body":["InteractiveWindow.sizeChanged"]}}, + {"InteractiveWindow.presentationModeChanged":{"prefix":"InteractiveWindow.presentationModeChanged","body":["InteractiveWindow.presentationModeChanged"]}}, + {"InteractiveWindow.titleChanged":{"prefix":"InteractiveWindow.titleChanged","body":["InteractiveWindow.titleChanged"]}}, + {"InteractiveWindow.closed":{"prefix":"InteractiveWindow.closed","body":["InteractiveWindow.closed"]}}, + {"InteractiveWindow.fromQml":{"prefix":"InteractiveWindow.fromQml","body":["InteractiveWindow.fromQml(${1:message: object})"]}}, + {"InteractiveWindow.scriptEventReceived":{"prefix":"InteractiveWindow.scriptEventReceived","body":["InteractiveWindow.scriptEventReceived(${1:message: object})"]}}, + {"InteractiveWindow.webEventReceived":{"prefix":"InteractiveWindow.webEventReceived","body":["InteractiveWindow.webEventReceived(${1:message: object})"]}}, + {"InteractiveWindow.qmlToScript":{"prefix":"InteractiveWindow.qmlToScript","body":["InteractiveWindow.qmlToScript(${1:message: object})"]}}, + {"OffscreenFlags":{"prefix":"OffscreenFlags","body":["OffscreenFlags"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"OffscreenFlags.navigationFocusedChanged":{"prefix":"OffscreenFlags.navigationFocusedChanged","body":["OffscreenFlags.navigationFocusedChanged"]}}, + {"OffscreenFlags.navigationFocusDisabledChanged":{"prefix":"OffscreenFlags.navigationFocusDisabledChanged","body":["OffscreenFlags.navigationFocusDisabledChanged"]}}, + {"QmlFragmentClass#addButton":{"prefix":"QmlFragmentClass#addButton","body":["QmlFragmentClass#addButton(${1:properties: object})"],"description":"Creates a new button, adds it to this and returns it."}}, + {"OverlayWebWindow":{"prefix":"OverlayWebWindow","body":["OverlayWebWindow(${1:properties: OverlayWindow.Properties})"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"OverlayWebWindow.getURL":{"prefix":"OverlayWebWindow.getURL","body":["OverlayWebWindow.getURL"]}}, + {"OverlayWebWindow.setURL":{"prefix":"OverlayWebWindow.setURL","body":["OverlayWebWindow.setURL(${1:url: string})"]}}, + {"OverlayWebWindow.setScriptURL":{"prefix":"OverlayWebWindow.setScriptURL","body":["OverlayWebWindow.setScriptURL(${1:script: string})"]}}, + {"OverlayWebWindow.urlChanged":{"prefix":"OverlayWebWindow.urlChanged","body":["OverlayWebWindow.urlChanged"]}}, + {"OverlayWindow.Properties":{"prefix":"OverlayWindow.Properties","body":["OverlayWindow.Properties"]}}, + {"OverlayWindow":{"prefix":"OverlayWindow","body":["OverlayWindow(${1:properties: OverlayWindow.Properties})"],"description":"
Available in:Interface Scripts

"}}, + {"OverlayWindow.initQml":{"prefix":"OverlayWindow.initQml","body":["OverlayWindow.initQml(${1:properties: OverlayWindow.Properties})"]}}, + {"OverlayWindow.isVisible":{"prefix":"OverlayWindow.isVisible","body":["OverlayWindow.isVisible"]}}, + {"OverlayWindow.setVisible":{"prefix":"OverlayWindow.setVisible","body":["OverlayWindow.setVisible(${1:visible: boolean})"]}}, + {"OverlayWindow.getPosition":{"prefix":"OverlayWindow.getPosition","body":["OverlayWindow.getPosition"]}}, + {"OverlayWindow.setPosition":{"prefix":"OverlayWindow.setPosition","body":["OverlayWindow.setPosition(${1:position: Vec2})"]}}, + {"OverlayWindow.setPosition":{"prefix":"OverlayWindow.setPosition","body":["OverlayWindow.setPosition(${1:x: number},${2:y: number})"]}}, + {"OverlayWindow.getSize":{"prefix":"OverlayWindow.getSize","body":["OverlayWindow.getSize"]}}, + {"OverlayWindow.setSize":{"prefix":"OverlayWindow.setSize","body":["OverlayWindow.setSize(${1:size: Vec2})"]}}, + {"OverlayWindow.setSize":{"prefix":"OverlayWindow.setSize","body":["OverlayWindow.setSize(${1:width: number},${2:height: number})"]}}, + {"OverlayWindow.setTitle":{"prefix":"OverlayWindow.setTitle","body":["OverlayWindow.setTitle(${1:title: string})"]}}, + {"OverlayWindow.raise":{"prefix":"OverlayWindow.raise","body":["OverlayWindow.raise"]}}, + {"OverlayWindow.close":{"prefix":"OverlayWindow.close","body":["OverlayWindow.close"]}}, + {"OverlayWindow.getEventBridge":{"prefix":"OverlayWindow.getEventBridge","body":["OverlayWindow.getEventBridge"]}}, + {"OverlayWindow.sendToQml":{"prefix":"OverlayWindow.sendToQml","body":["OverlayWindow.sendToQml(${1:message: object})"]}}, + {"OverlayWindow.clearDebugWindow":{"prefix":"OverlayWindow.clearDebugWindow","body":["OverlayWindow.clearDebugWindow"]}}, + {"OverlayWindow.emitScriptEvent":{"prefix":"OverlayWindow.emitScriptEvent","body":["OverlayWindow.emitScriptEvent(${1:message: object})"]}}, + {"OverlayWindow.emitWebEvent":{"prefix":"OverlayWindow.emitWebEvent","body":["OverlayWindow.emitWebEvent(${1:message: object})"]}}, + {"OverlayWindow.visibleChanged":{"prefix":"OverlayWindow.visibleChanged","body":["OverlayWindow.visibleChanged"]}}, + {"OverlayWindow.positionChanged":{"prefix":"OverlayWindow.positionChanged","body":["OverlayWindow.positionChanged"]}}, + {"OverlayWindow.sizeChanged":{"prefix":"OverlayWindow.sizeChanged","body":["OverlayWindow.sizeChanged"]}}, + {"OverlayWindow.moved":{"prefix":"OverlayWindow.moved","body":["OverlayWindow.moved(${1:position: Vec2})"]}}, + {"OverlayWindow.resized":{"prefix":"OverlayWindow.resized","body":["OverlayWindow.resized(${1:size: Size})"]}}, + {"OverlayWindow.closed":{"prefix":"OverlayWindow.closed","body":["OverlayWindow.closed"]}}, + {"OverlayWindow.fromQml":{"prefix":"OverlayWindow.fromQml","body":["OverlayWindow.fromQml(${1:message: object})"]}}, + {"OverlayWindow.scriptEventReceived":{"prefix":"OverlayWindow.scriptEventReceived","body":["OverlayWindow.scriptEventReceived(${1:message: object})"]}}, + {"OverlayWindow.webEventReceived":{"prefix":"OverlayWindow.webEventReceived","body":["OverlayWindow.webEventReceived(${1:message: object})"]}}, + {"OverlayWindow.hasMoved":{"prefix":"OverlayWindow.hasMoved","body":["OverlayWindow.hasMoved(${1:position: Vec2})"]}}, + {"OverlayWindow.hasClosed":{"prefix":"OverlayWindow.hasClosed","body":["OverlayWindow.hasClosed"]}}, + {"OverlayWindow.qmlToScript":{"prefix":"OverlayWindow.qmlToScript","body":["OverlayWindow.qmlToScript(${1:message: object})"]}}, + {"Tablet":{"prefix":"Tablet","body":["Tablet"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"tabletInterface":{"prefix":"tabletInterface","body":["tabletInterface"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Tablet.AudioEvents":{"prefix":"Tablet.AudioEvents","body":["Tablet.AudioEvents"],"description":"\r \r \r \r \r \r \r \r \r \r \r \r
ValueDescription
0Button click.
1Button hover.
2Tablet open.
3Tablet hands in.
4Tablet hands out.
5Last.
"}}, + {"Tablet.getTablet":{"prefix":"Tablet.getTablet","body":["Tablet.getTablet(${1:name: string})"],"description":"Creates or returns a new TabletProxy and returns it."}}, + {"tabletInterface.getTablet":{"prefix":"tabletInterface.getTablet","body":["tabletInterface.getTablet(${1:name: string})"],"description":"Creates or returns a new TabletProxy and returns it."}}, + {"Tablet.playSound":{"prefix":"Tablet.playSound","body":["Tablet.playSound(${1:sound: Tablet.AudioEvents})"]}}, + {"tabletInterface.playSound":{"prefix":"tabletInterface.playSound","body":["tabletInterface.playSound(${1:sound: Tablet.AudioEvents})"]}}, + {"Tablet.tabletNotification":{"prefix":"Tablet.tabletNotification","body":["Tablet.tabletNotification"],"description":"Triggered when a tablet message or dialog is created."}}, + {"tabletInterface.tabletNotification":{"prefix":"tabletInterface.tabletNotification","body":["tabletInterface.tabletNotification"],"description":"Triggered when a tablet message or dialog is created."}}, + {"TabletProxy#ButtonList":{"prefix":"TabletProxy#ButtonList","body":["TabletProxy#ButtonList"]}}, + {"TabletProxy":{"prefix":"TabletProxy","body":["TabletProxy"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"TabletProxy#gotoMenuScreen":{"prefix":"TabletProxy#gotoMenuScreen","body":["TabletProxy#gotoMenuScreen(${1:submenu: string})"]}}, + {"TabletProxy#initialScreen":{"prefix":"TabletProxy#initialScreen","body":["TabletProxy#initialScreen(${1:url: string})"]}}, + {"TabletProxy#gotoHomeScreen":{"prefix":"TabletProxy#gotoHomeScreen","body":["TabletProxy#gotoHomeScreen"],"description":"Transition to the home screen."}}, + {"TabletProxy#gotoWebScreen":{"prefix":"TabletProxy#gotoWebScreen","body":["TabletProxy#gotoWebScreen(${1:url: string},${2:injectedJavaScriptUrl: string},${3:loadOtherBase: boolean})"],"description":"Show the specified Web url on the tablet."}}, + {"TabletProxy#loadQMLSource":{"prefix":"TabletProxy#loadQMLSource","body":["TabletProxy#loadQMLSource(${1:path: string},${2:resizable: boolean})"]}}, + {"TabletProxy#pushOntoStack":{"prefix":"TabletProxy#pushOntoStack","body":["TabletProxy#pushOntoStack(${1:path: string})"]}}, + {"TabletProxy#popFromStack":{"prefix":"TabletProxy#popFromStack","body":["TabletProxy#popFromStack"]}}, + {"TabletProxy#loadQMLOnTop":{"prefix":"TabletProxy#loadQMLOnTop","body":["TabletProxy#loadQMLOnTop(${1:path: string})"]}}, + {"TabletProxy#loadWebScreenOnTop":{"prefix":"TabletProxy#loadWebScreenOnTop","body":["TabletProxy#loadWebScreenOnTop(${1:path: string},${2:injectedJavaScriptURL: string})"]}}, + {"TabletProxy#returnToPreviousApp":{"prefix":"TabletProxy#returnToPreviousApp","body":["TabletProxy#returnToPreviousApp"]}}, + {"TabletProxy#isMessageDialogOpen":{"prefix":"TabletProxy#isMessageDialogOpen","body":["TabletProxy#isMessageDialogOpen"],"description":"Check if the tablet has a message dialog open."}}, + {"TabletProxy#closeDialog":{"prefix":"TabletProxy#closeDialog","body":["TabletProxy#closeDialog"],"description":"Close any open dialogs."}}, + {"TabletProxy#addButton":{"prefix":"TabletProxy#addButton","body":["TabletProxy#addButton(${1:properties: object})"],"description":"Creates a new button, adds it to this and returns it."}}, + {"TabletProxy#removeButton":{"prefix":"TabletProxy#removeButton","body":["TabletProxy#removeButton(${1:button: TabletButtonProxy})"],"description":"Removes a button from the tablet."}}, + {"TabletProxy#emitScriptEvent":{"prefix":"TabletProxy#emitScriptEvent","body":["TabletProxy#emitScriptEvent(${1:message: object})"],"description":"Used to send an event to the HTML/JavaScript embedded in the tablet."}}, + {"TabletProxy#sendToQml":{"prefix":"TabletProxy#sendToQml","body":["TabletProxy#sendToQml(${1:message: object})"],"description":"Used to send an event to the QML embedded in the tablet."}}, + {"TabletProxy#onHomeScreen":{"prefix":"TabletProxy#onHomeScreen","body":["TabletProxy#onHomeScreen"],"description":"Check if the tablet is on the home screen."}}, + {"TabletProxy#setLandscape":{"prefix":"TabletProxy#setLandscape","body":["TabletProxy#setLandscape(${1:landscape: boolean})"],"description":"Set tablet into or out of landscape mode."}}, + {"TabletProxy#getLandscape":{"prefix":"TabletProxy#getLandscape","body":["TabletProxy#getLandscape"]}}, + {"TabletProxy#isPathLoaded":{"prefix":"TabletProxy#isPathLoaded","body":["TabletProxy#isPathLoaded(${1:path: string})"]}}, + {"TabletProxy#webEventReceived":{"prefix":"TabletProxy#webEventReceived","body":["TabletProxy#webEventReceived(${1:message: object})"],"description":"Signaled when this tablet receives an event from the html/js embedded in the tablet."}}, + {"TabletProxy#fromQml":{"prefix":"TabletProxy#fromQml","body":["TabletProxy#fromQml(${1:message: object})"],"description":"Signaled when this tablet receives an event from the qml embedded in the tablet."}}, + {"TabletProxy#screenChanged":{"prefix":"TabletProxy#screenChanged","body":["TabletProxy#screenChanged(${1:type: string},${2:url: string})"],"description":"Signaled when this tablet screen changes."}}, + {"TabletProxy#isTabletShownChanged":{"prefix":"TabletProxy#isTabletShownChanged","body":["TabletProxy#isTabletShownChanged"],"description":"Signaled when the tablet becomes visible or becomes invisible."}}, + {"TabletProxy#toolbarModeChanged":{"prefix":"TabletProxy#toolbarModeChanged","body":["TabletProxy#toolbarModeChanged"]}}, + {"TabletButtonProxy":{"prefix":"TabletButtonProxy","body":["TabletButtonProxy"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"TabletButtonProxy#getProperties":{"prefix":"TabletButtonProxy#getProperties","body":["TabletButtonProxy#getProperties"],"description":"Returns the current value of this button's properties."}}, + {"TabletButtonProxy#editProperties":{"prefix":"TabletButtonProxy#editProperties","body":["TabletButtonProxy#editProperties(${1:properties: TabletButtonProxy.ButtonProperties})"],"description":"Replace the values of some of this button's properties."}}, + {"TabletButtonProxy#clicked":{"prefix":"TabletButtonProxy#clicked","body":["TabletButtonProxy#clicked"],"description":"Triggered when this button has been clicked on by the user."}}, + {"TabletButtonProxy#propertiesChanged":{"prefix":"TabletButtonProxy#propertiesChanged","body":["TabletButtonProxy#propertiesChanged"]}}, + {"TabletButtonProxy.ButtonProperties":{"prefix":"TabletButtonProxy.ButtonProperties","body":["TabletButtonProxy.ButtonProperties"]}}, + {"ToolbarButtonProxy":{"prefix":"ToolbarButtonProxy","body":["ToolbarButtonProxy"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"ToolbarButtonProxy#editProperties":{"prefix":"ToolbarButtonProxy#editProperties","body":["ToolbarButtonProxy#editProperties(${1:properties: object})"]}}, + {"ToolbarButtonProxy#writeProperty":{"prefix":"ToolbarButtonProxy#writeProperty","body":["ToolbarButtonProxy#writeProperty(${1:propertyValue: object})"]}}, + {"ToolbarButtonProxy#writeProperties":{"prefix":"ToolbarButtonProxy#writeProperties","body":["ToolbarButtonProxy#writeProperties(${1:properties: object})"]}}, + {"ToolbarButtonProxy#readProperty":{"prefix":"ToolbarButtonProxy#readProperty","body":["ToolbarButtonProxy#readProperty(${1:propertyName: string})"]}}, + {"ToolbarButtonProxy#readProperties":{"prefix":"ToolbarButtonProxy#readProperties","body":["ToolbarButtonProxy#readProperties(${1:propertyList: Array.})"]}}, + {"ToolbarButtonProxy#clicked":{"prefix":"ToolbarButtonProxy#clicked","body":["ToolbarButtonProxy#clicked"]}}, + {"ToolbarProxy":{"prefix":"ToolbarProxy","body":["ToolbarProxy"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"ToolbarProxy#addButton":{"prefix":"ToolbarProxy#addButton","body":["ToolbarProxy#addButton(${1:properties: object})"]}}, + {"ToolbarProxy#removeButton":{"prefix":"ToolbarProxy#removeButton","body":["ToolbarProxy#removeButton(${1:name: string})"]}}, + {"ToolbarProxy#writeProperty":{"prefix":"ToolbarProxy#writeProperty","body":["ToolbarProxy#writeProperty(${1:propertyValue: object})"]}}, + {"ToolbarProxy#writeProperties":{"prefix":"ToolbarProxy#writeProperties","body":["ToolbarProxy#writeProperties(${1:properties: object})"]}}, + {"ToolbarProxy#readProperty":{"prefix":"ToolbarProxy#readProperty","body":["ToolbarProxy#readProperty(${1:propertyName: string})"]}}, + {"ToolbarProxy#readProperties":{"prefix":"ToolbarProxy#readProperties","body":["ToolbarProxy#readProperties(${1:propertyList: Array.})"]}}, + {"Toolbars":{"prefix":"Toolbars","body":["Toolbars"],"description":"
Available in:Interface ScriptsClient Entity Scripts

"}}, + {"Toolbars.getToolbar":{"prefix":"Toolbars.getToolbar","body":["Toolbars.getToolbar(${1:toolbarID: string})"]}}, + {"Controller.Hardware-OculusTouch":{"prefix":"Controller.Hardware-OculusTouch","body":["Controller.Hardware-OculusTouch"],"description":"

The Controller.Hardware.OculusTouch object has properties representing Oculus Rift. The property values are \rinteger IDs, uniquely identifying each output. Read-only. These can be mapped to actions or functions or \rController.Standard items in a {@link RouteObject} mapping.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
Buttons
Anumbernumber\"A\" button pressed.
Bnumbernumber\"B\" button pressed.
Xnumbernumber\"X\" button pressed.
Ynumbernumber\"Y\" button pressed.
LeftApplicationMenunumbernumberLeft application menu button pressed.\r
RightApplicationMenunumbernumberRight application menu button pressed.\r
Sticks
LXnumbernumberLeft stick x-axis scale.
LYnumbernumberLeft stick y-axis scale.
RXnumbernumberRight stick x-axis scale.
RYnumbernumberRight stick y-axis scale.
LSnumbernumberLeft stick button pressed.
RSnumbernumberRight stick button pressed.
LSTouchnumbernumberLeft stick is touched.
RSTouchnumbernumberRight stick is touched.
Triggers
LTnumbernumberLeft trigger scale.
RTnumbernumberRight trigger scale.
LeftGripnumbernumberLeft grip scale.
RightGripnumbernumberRight grip scale.
Finger Abstractions
LeftPrimaryThumbTouchnumbernumberLeft thumb touching primary thumb \r button.
LeftSecondaryThumbTouchnumbernumberLeft thumb touching secondary thumb \r button.
LeftThumbUpnumbernumberLeft thumb not touching primary or secondary \r thumb buttons.
RightPrimaryThumbTouchnumbernumberRight thumb touching primary thumb \r button.
RightSecondaryThumbTouchnumbernumberRight thumb touching secondary thumb \r button.
RightThumbUpnumbernumberRight thumb not touching primary or secondary \r thumb buttons.
LeftPrimaryIndexTouchnumbernumberLeft index finger is touching primary \r index finger control.
LeftIndexPointnumbernumberLeft index finger is pointing, not touching \r primary or secondary index finger controls.
RightPrimaryIndexTouchnumbernumberRight index finger is touching primary \r index finger control.
RightIndexPointnumbernumberRight index finger is pointing, not touching \r primary or secondary index finger controls.
Avatar Skeleton
Headnumber{@link Pose}Head pose.
LeftHandnumber{@link Pose}Left hand pose.
RightHandnumber{@link Pose}right hand pose.
"}}, + {"Controller.Hardware-Vive":{"prefix":"Controller.Hardware-Vive","body":["Controller.Hardware-Vive"],"description":"

The Controller.Hardware.Vive object has properties representing Vive. The property values are integer IDs,\runiquely identifying each output. Read-only. These can be mapped to actions or functions or \rController.Standard items in a {@link RouteObject} mapping.

\r\r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r \r
PropertyTypeDataDescription
Touch Pad (Sticks)
LXnumbernumberLeft touch pad x-axis scale.
LYnumbernumberLeft touch pad y-axis scale.
RXnumbernumberRight stick x-axis scale.
RYnumbernumberRight stick y-axis scale.
LSnumbernumberLeft touch pad pressed.
LS_CENTERnumbernumberLeft touch pad center pressed.
LS_XnumbernumberLeft touch pad pressed x-coordinate.
LS_YnumbernumberLeft touch pad pressed y-coordinate.
RSnumbernumberRight touch pad pressed.
RS_CENTERnumbernumberRight touch pad center pressed.
RS_XnumbernumberRight touch pad pressed x-coordinate.
RS_YnumbernumberRight touch pad pressed y-coordinate.
LSTouchnumbernumberLeft touch pad is touched.
RSTouchnumbernumberRight touch pad is touched.
Triggers
LTnumbernumberLeft trigger scale.
RTnumbernumberRight trigger scale.
LTClicknumbernumberLeft trigger click.
RTClicknumbernumberRight trigger click.
LeftGripnumbernumberLeft grip scale.
RightGripnumbernumberRight grip scale.
Avatar Skeleton
Hipsnumber{@link Pose}Hips pose.
Spine2number{@link Pose}Spine2 pose.
Headnumber{@link Pose}Head pose.
LeftArmnumber{@link Pose}Left arm pose.
RightArmnumber{@link Pose}Right arm pose
LeftHandnumber{@link Pose}Left hand pose.
RightHandnumber{@link Pose}Right hand pose.
Trackers
TrackedObject00number{@link Pose}Tracker 0 pose.
TrackedObject01number{@link Pose}Tracker 1 pose.
TrackedObject02number{@link Pose}Tracker 2 pose.
TrackedObject03number{@link Pose}Tracker 3 pose.
TrackedObject04number{@link Pose}Tracker 4 pose.
TrackedObject05number{@link Pose}Tracker 5 pose.
TrackedObject06number{@link Pose}Tracker 6 pose.
TrackedObject07number{@link Pose}Tracker 7 pose.
TrackedObject08number{@link Pose}Tracker 8 pose.
TrackedObject09number{@link Pose}Tracker 9 pose.
TrackedObject10number{@link Pose}Tracker 10 pose.
TrackedObject11number{@link Pose}Tracker 11 pose.
TrackedObject12number{@link Pose}Tracker 12 pose.
TrackedObject13number{@link Pose}Tracker 13 pose.
TrackedObject14number{@link Pose}Tracker 14 pose.
TrackedObject15number{@link Pose}Tracker 15 pose.
"}}, + {"package:undefined":{"prefix":"package:undefined","body":["package:undefined"]}}, + {"Avatar.getDomainMinScale":{"prefix":"Avatar.getDomainMinScale","body":["Avatar.getDomainMinScale"],"description":"Returns the minimum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains."}}, + {"Avatar.getDomainMaxScale":{"prefix":"Avatar.getDomainMaxScale","body":["Avatar.getDomainMaxScale"],"description":"Returns the maximum scale allowed for this avatar in the current domain.\rThis value can change as the user changes avatars or when changing domains."}}, + {"Avatar.getEyeHeight":{"prefix":"Avatar.getEyeHeight","body":["Avatar.getEyeHeight"],"description":"Provides read only access to the current eye height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints."}}, + {"Avatar.getHeight":{"prefix":"Avatar.getHeight","body":["Avatar.getHeight"],"description":"Provides read only access to the current height of the avatar.\rThis height is only an estimate and might be incorrect for avatars that are missing standard joints."}}, + {"Avatar.setHandState":{"prefix":"Avatar.setHandState","body":["Avatar.setHandState(${1:state: string})"]}}, + {"Avatar.getHandState":{"prefix":"Avatar.getHandState","body":["Avatar.getHandState"]}}, + {"Avatar.setRawJointData":{"prefix":"Avatar.setRawJointData","body":["Avatar.setRawJointData(${1:data: Array.})"]}}, + {"Avatar.setJointData":{"prefix":"Avatar.setJointData","body":["Avatar.setJointData(${1:index: number},${2:rotation: Quat},${3:translation: Vec3})"],"description":"Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointData":{"prefix":"Avatar.setJointData","body":["Avatar.setJointData(${1:name: string},${2:rotation: Quat},${3:translation: Vec3})"],"description":"Set a specific joint's rotation and position relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointRotation":{"prefix":"Avatar.setJointRotation","body":["Avatar.setJointRotation(${1:index: number},${2:rotation: Quat})"],"description":"Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointRotation":{"prefix":"Avatar.setJointRotation","body":["Avatar.setJointRotation(${1:name: string},${2:rotation: Quat})"],"description":"Set a specific joint's rotation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointTranslation":{"prefix":"Avatar.setJointTranslation","body":["Avatar.setJointTranslation(${1:index: number},${2:translation: Vec3})"],"description":"Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointTranslation":{"prefix":"Avatar.setJointTranslation","body":["Avatar.setJointTranslation(${1:name: string},${2:translation: Vec3})"],"description":"Set a specific joint's translation relative to its parent.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse \rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, \rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate \rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set \rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.clearJointData":{"prefix":"Avatar.clearJointData","body":["Avatar.clearJointData(${1:index: number})"],"description":"Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly faster than the function variation that specifies the joint name.

"}}, + {"Avatar.clearJointData":{"prefix":"Avatar.clearJointData","body":["Avatar.clearJointData(${1:name: string})"],"description":"Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default \ranimation system including inverse kinematics for that joint.\r

Note: This is slightly slower than the function variation that specifies the joint index.

"}}, + {"Avatar.isJointDataValid":{"prefix":"Avatar.isJointDataValid","body":["Avatar.isJointDataValid(${1:index: number})"]}}, + {"Avatar.isJointDataValid":{"prefix":"Avatar.isJointDataValid","body":["Avatar.isJointDataValid(${1:name: string})"]}}, + {"Avatar.getJointRotation":{"prefix":"Avatar.getJointRotation","body":["Avatar.getJointRotation(${1:index: number})"],"description":"Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"Avatar.getJointRotation":{"prefix":"Avatar.getJointRotation","body":["Avatar.getJointRotation(${1:name: string})"],"description":"Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"Avatar.getJointTranslation":{"prefix":"Avatar.getJointTranslation","body":["Avatar.getJointTranslation(${1:index: number})"],"description":"Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"Avatar.getJointTranslation":{"prefix":"Avatar.getJointTranslation","body":["Avatar.getJointTranslation(${1:name: number})"],"description":"Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see \rAvatar Standards."}}, + {"Avatar.getJointRotations":{"prefix":"Avatar.getJointRotations","body":["Avatar.getJointRotations"],"description":"Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint."}}, + {"Avatar.getJointTranslations":{"prefix":"Avatar.getJointTranslations","body":["Avatar.getJointTranslations"]}}, + {"Avatar.setJointRotations":{"prefix":"Avatar.setJointRotations","body":["Avatar.setJointRotations(${1:jointRotations: Array.})"],"description":"Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint.\r

Setting joint data completely overrides/replaces all motion from the default animation system including inverse\rkinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints,\rthe avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate\rjoints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set\rthe rotation of the elbow, the hand inverse kinematics position won't end up in the right place.

"}}, + {"Avatar.setJointTranslations":{"prefix":"Avatar.setJointTranslations","body":["Avatar.setJointTranslations(${1:translations: Array.})"]}}, + {"Avatar.clearJointsData":{"prefix":"Avatar.clearJointsData","body":["Avatar.clearJointsData"],"description":"Clear all joint translations and rotations that have been set by script. This restores all motion from the default \ranimation system including inverse kinematics for all joints."}}, + {"Avatar.getJointIndex":{"prefix":"Avatar.getJointIndex","body":["Avatar.getJointIndex(${1:name: string})"],"description":"Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by \r{@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}."}}, + {"Avatar.getJointNames":{"prefix":"Avatar.getJointNames","body":["Avatar.getJointNames"],"description":"Get the names of all the joints in the current avatar."}}, + {"Avatar.setBlendshape":{"prefix":"Avatar.setBlendshape","body":["Avatar.setBlendshape(${1:name: string},${2:value: number})"]}}, + {"Avatar.getAttachmentsVariant":{"prefix":"Avatar.getAttachmentsVariant","body":["Avatar.getAttachmentsVariant"]}}, + {"Avatar.setAttachmentsVariant":{"prefix":"Avatar.setAttachmentsVariant","body":["Avatar.setAttachmentsVariant(${1:variant: object})"]}}, + {"Avatar.updateAvatarEntity":{"prefix":"Avatar.updateAvatarEntity","body":["Avatar.updateAvatarEntity(${1:entityID: Uuid},${2:entityData: string})"]}}, + {"Avatar.clearAvatarEntity":{"prefix":"Avatar.clearAvatarEntity","body":["Avatar.clearAvatarEntity(${1:entityID: Uuid})"]}}, + {"Avatar.setForceFaceTrackerConnected":{"prefix":"Avatar.setForceFaceTrackerConnected","body":["Avatar.setForceFaceTrackerConnected(${1:connected: boolean})"]}}, + {"Avatar.getAttachmentData":{"prefix":"Avatar.getAttachmentData","body":["Avatar.getAttachmentData"],"description":"Get information about all models currently attached to your avatar."}}, + {"Avatar.setAttachmentData":{"prefix":"Avatar.setAttachmentData","body":["Avatar.setAttachmentData(${1:attachmentData: Array.})"],"description":"Set all models currently attached to your avatar. For example, if you retrieve attachment data using \r{@link MyAvatar.getAttachmentData} or {@link Avatar.getAttachmentData}, make changes to it, and then want to update your avatar's attachments per the \rchanged data. You can also remove all attachments by using setting attachmentData to null."}}, + {"Avatar.attach":{"prefix":"Avatar.attach","body":["Avatar.attach(${1:modelURL: string},${2:jointName: string},${3:translation: Vec3},${4:rotation: Quat},${5:scale: number},${6:isSoft: boolean},${7:allowDuplicates: boolean},${8:useSaved: boolean})"],"description":"Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to \rstand on.\r

Note: Attached models are models only; they are not entities and can not be manipulated using the {@link Entities} API. \rNor can you use this function to attach an entity (such as a sphere or a box) to your avatar.

"}}, + {"Avatar.detachOne":{"prefix":"Avatar.detachOne","body":["Avatar.detachOne(${1:modelURL: string},${2:jointName: string})"],"description":"Detach the most recently attached instance of a particular model from either a specific joint or any joint."}}, + {"Avatar.detachAll":{"prefix":"Avatar.detachAll","body":["Avatar.detachAll(${1:modelURL: string},${2:jointName: string})"],"description":"Detach all instances of a particular model from either a specific joint or all joints."}}, + {"Avatar.getAvatarEntityData":{"prefix":"Avatar.getAvatarEntityData","body":["Avatar.getAvatarEntityData"]}}, + {"Avatar.setAvatarEntityData":{"prefix":"Avatar.setAvatarEntityData","body":["Avatar.setAvatarEntityData(${1:avatarEntityData: object})"]}}, + {"Avatar.getSensorToWorldMatrix":{"prefix":"Avatar.getSensorToWorldMatrix","body":["Avatar.getSensorToWorldMatrix"]}}, + {"Avatar.getSensorToWorldScale":{"prefix":"Avatar.getSensorToWorldScale","body":["Avatar.getSensorToWorldScale"]}}, + {"Avatar.getControllerLeftHandMatrix":{"prefix":"Avatar.getControllerLeftHandMatrix","body":["Avatar.getControllerLeftHandMatrix"]}}, + {"Avatar.getControllerRightHandMatrix":{"prefix":"Avatar.getControllerRightHandMatrix","body":["Avatar.getControllerRightHandMatrix"]}}, + {"Avatar.getDataRate":{"prefix":"Avatar.getDataRate","body":["Avatar.getDataRate(${1:rateName: string})"]}}, + {"Avatar.getUpdateRate":{"prefix":"Avatar.getUpdateRate","body":["Avatar.getUpdateRate(${1:rateName: string})"]}}, + {"Avatar.displayNameChanged":{"prefix":"Avatar.displayNameChanged","body":["Avatar.displayNameChanged"]}}, + {"Avatar.sessionDisplayNameChanged":{"prefix":"Avatar.sessionDisplayNameChanged","body":["Avatar.sessionDisplayNameChanged"]}}, + {"Avatar.skeletonModelURLChanged":{"prefix":"Avatar.skeletonModelURLChanged","body":["Avatar.skeletonModelURLChanged"]}}, + {"Avatar.lookAtSnappingChanged":{"prefix":"Avatar.lookAtSnappingChanged","body":["Avatar.lookAtSnappingChanged(${1:enabled: boolean})"]}}, + {"Avatar.sessionUUIDChanged":{"prefix":"Avatar.sessionUUIDChanged","body":["Avatar.sessionUUIDChanged"]}}, + {"Avatar.sendAvatarDataPacket":{"prefix":"Avatar.sendAvatarDataPacket","body":["Avatar.sendAvatarDataPacket(${1:sendAll: boolean})"]}}, + {"Avatar.sendIdentityPacket":{"prefix":"Avatar.sendIdentityPacket","body":["Avatar.sendIdentityPacket"]}}, + {"Avatar.setJointMappingsFromNetworkReply":{"prefix":"Avatar.setJointMappingsFromNetworkReply","body":["Avatar.setJointMappingsFromNetworkReply"]}}, + {"Avatar.setSessionUUID":{"prefix":"Avatar.setSessionUUID","body":["Avatar.setSessionUUID(${1:sessionUUID: Uuid})"]}}, + {"Avatar.getAbsoluteJointRotationInObjectFrame":{"prefix":"Avatar.getAbsoluteJointRotationInObjectFrame","body":["Avatar.getAbsoluteJointRotationInObjectFrame(${1:index: number})"]}}, + {"Avatar.getAbsoluteJointTranslationInObjectFrame":{"prefix":"Avatar.getAbsoluteJointTranslationInObjectFrame","body":["Avatar.getAbsoluteJointTranslationInObjectFrame(${1:index: number})"]}}, + {"Avatar.setAbsoluteJointRotationInObjectFrame":{"prefix":"Avatar.setAbsoluteJointRotationInObjectFrame","body":["Avatar.setAbsoluteJointRotationInObjectFrame(${1:index: number},${2:rotation: Quat})"]}}, + {"Avatar.setAbsoluteJointTranslationInObjectFrame":{"prefix":"Avatar.setAbsoluteJointTranslationInObjectFrame","body":["Avatar.setAbsoluteJointTranslationInObjectFrame(${1:index: number},${2:translation: Vec3})"]}}, + {"Avatar.getTargetScale":{"prefix":"Avatar.getTargetScale","body":["Avatar.getTargetScale"]}}, + {"Avatar.resetLastSent":{"prefix":"Avatar.resetLastSent","body":["Avatar.resetLastSent"]}}, + {"AvatarManager.getAvatarIdentifiers":{"prefix":"AvatarManager.getAvatarIdentifiers","body":["AvatarManager.getAvatarIdentifiers"]}}, + {"AvatarManager.getAvatarsInRange":{"prefix":"AvatarManager.getAvatarsInRange","body":["AvatarManager.getAvatarsInRange(${1:position: Vec3},${2:range: number})"]}}, + {"AvatarManager.avatarAddedEvent":{"prefix":"AvatarManager.avatarAddedEvent","body":["AvatarManager.avatarAddedEvent(${1:sessionUUID: Uuid})"]}}, + {"AvatarManager.avatarRemovedEvent":{"prefix":"AvatarManager.avatarRemovedEvent","body":["AvatarManager.avatarRemovedEvent(${1:sessionUUID: Uuid})"]}}, + {"AvatarManager.avatarSessionChangedEvent":{"prefix":"AvatarManager.avatarSessionChangedEvent","body":["AvatarManager.avatarSessionChangedEvent(${1:sessionUUID: Uuid},${2:oldSessionUUID: Uuid})"]}}, + {"AvatarManager.isAvatarInRange":{"prefix":"AvatarManager.isAvatarInRange","body":["AvatarManager.isAvatarInRange(${1:position: string},${2:range: string})"]}}, + {"AvatarManager.sessionUUIDChanged":{"prefix":"AvatarManager.sessionUUIDChanged","body":["AvatarManager.sessionUUIDChanged(${1:sessionUUID: Uuid},${2:oldSessionUUID: Uuid})"]}}, + {"AvatarManager.processAvatarDataPacket":{"prefix":"AvatarManager.processAvatarDataPacket","body":["AvatarManager.processAvatarDataPacket(${1:message},${2:sendingNode})"]}}, + {"AvatarManager.processAvatarIdentityPacket":{"prefix":"AvatarManager.processAvatarIdentityPacket","body":["AvatarManager.processAvatarIdentityPacket(${1:message},${2:sendingNode})"]}}, + {"AvatarManager.processKillAvatar":{"prefix":"AvatarManager.processKillAvatar","body":["AvatarManager.processKillAvatar(${1:message},${2:sendingNode})"]}}, + {"AnimationCache.getResourceList":{"prefix":"AnimationCache.getResourceList","body":["AnimationCache.getResourceList"],"description":"Get the list of all resource URLs."}}, + {"AnimationCache.updateTotalSize":{"prefix":"AnimationCache.updateTotalSize","body":["AnimationCache.updateTotalSize(${1:deltaSize: number})"]}}, + {"AnimationCache.prefetch":{"prefix":"AnimationCache.prefetch","body":["AnimationCache.prefetch(${1:url: string},${2:extra: object})"],"description":"Prefetches a resource."}}, + {"AnimationCache.dirty":{"prefix":"AnimationCache.dirty","body":["AnimationCache.dirty"]}}, + {"SoundCache.getResourceList":{"prefix":"SoundCache.getResourceList","body":["SoundCache.getResourceList"],"description":"Get the list of all resource URLs."}}, + {"SoundCache.updateTotalSize":{"prefix":"SoundCache.updateTotalSize","body":["SoundCache.updateTotalSize(${1:deltaSize: number})"]}}, + {"SoundCache.prefetch":{"prefix":"SoundCache.prefetch","body":["SoundCache.prefetch(${1:url: string},${2:extra: object})"],"description":"Prefetches a resource."}}, + {"SoundCache.dirty":{"prefix":"SoundCache.dirty","body":["SoundCache.dirty"]}}, + {"ModelCache.getResourceList":{"prefix":"ModelCache.getResourceList","body":["ModelCache.getResourceList"],"description":"Get the list of all resource URLs."}}, + {"ModelCache.updateTotalSize":{"prefix":"ModelCache.updateTotalSize","body":["ModelCache.updateTotalSize(${1:deltaSize: number})"]}}, + {"ModelCache.prefetch":{"prefix":"ModelCache.prefetch","body":["ModelCache.prefetch(${1:url: string},${2:extra: object})"],"description":"Prefetches a resource."}}, + {"ModelCache.dirty":{"prefix":"ModelCache.dirty","body":["ModelCache.dirty"]}}, + {"TextureCache.getResourceList":{"prefix":"TextureCache.getResourceList","body":["TextureCache.getResourceList"],"description":"Get the list of all resource URLs."}}, + {"TextureCache.updateTotalSize":{"prefix":"TextureCache.updateTotalSize","body":["TextureCache.updateTotalSize(${1:deltaSize: number})"]}}, + {"TextureCache.prefetch":{"prefix":"TextureCache.prefetch","body":["TextureCache.prefetch(${1:url: string},${2:extra: object})"],"description":"Prefetches a resource."}}, + {"TextureCache.dirty":{"prefix":"TextureCache.dirty","body":["TextureCache.dirty"]}}, + {"OverlayWebWindow.initQml":{"prefix":"OverlayWebWindow.initQml","body":["OverlayWebWindow.initQml(${1:properties: OverlayWindow.Properties})"]}}, + {"OverlayWebWindow.isVisible":{"prefix":"OverlayWebWindow.isVisible","body":["OverlayWebWindow.isVisible"]}}, + {"OverlayWebWindow.setVisible":{"prefix":"OverlayWebWindow.setVisible","body":["OverlayWebWindow.setVisible(${1:visible: boolean})"]}}, + {"OverlayWebWindow.getPosition":{"prefix":"OverlayWebWindow.getPosition","body":["OverlayWebWindow.getPosition"]}}, + {"OverlayWebWindow.setPosition":{"prefix":"OverlayWebWindow.setPosition","body":["OverlayWebWindow.setPosition(${1:position: Vec2})"]}}, + {"OverlayWebWindow.setPosition":{"prefix":"OverlayWebWindow.setPosition","body":["OverlayWebWindow.setPosition(${1:x: number},${2:y: number})"]}}, + {"OverlayWebWindow.getSize":{"prefix":"OverlayWebWindow.getSize","body":["OverlayWebWindow.getSize"]}}, + {"OverlayWebWindow.setSize":{"prefix":"OverlayWebWindow.setSize","body":["OverlayWebWindow.setSize(${1:size: Vec2})"]}}, + {"OverlayWebWindow.setSize":{"prefix":"OverlayWebWindow.setSize","body":["OverlayWebWindow.setSize(${1:width: number},${2:height: number})"]}}, + {"OverlayWebWindow.setTitle":{"prefix":"OverlayWebWindow.setTitle","body":["OverlayWebWindow.setTitle(${1:title: string})"]}}, + {"OverlayWebWindow.raise":{"prefix":"OverlayWebWindow.raise","body":["OverlayWebWindow.raise"]}}, + {"OverlayWebWindow.close":{"prefix":"OverlayWebWindow.close","body":["OverlayWebWindow.close"]}}, + {"OverlayWebWindow.getEventBridge":{"prefix":"OverlayWebWindow.getEventBridge","body":["OverlayWebWindow.getEventBridge"]}}, + {"OverlayWebWindow.sendToQml":{"prefix":"OverlayWebWindow.sendToQml","body":["OverlayWebWindow.sendToQml(${1:message: object})"]}}, + {"OverlayWebWindow.clearDebugWindow":{"prefix":"OverlayWebWindow.clearDebugWindow","body":["OverlayWebWindow.clearDebugWindow"]}}, + {"OverlayWebWindow.emitScriptEvent":{"prefix":"OverlayWebWindow.emitScriptEvent","body":["OverlayWebWindow.emitScriptEvent(${1:message: object})"]}}, + {"OverlayWebWindow.emitWebEvent":{"prefix":"OverlayWebWindow.emitWebEvent","body":["OverlayWebWindow.emitWebEvent(${1:message: object})"]}}, + {"OverlayWebWindow.visibleChanged":{"prefix":"OverlayWebWindow.visibleChanged","body":["OverlayWebWindow.visibleChanged"]}}, + {"OverlayWebWindow.positionChanged":{"prefix":"OverlayWebWindow.positionChanged","body":["OverlayWebWindow.positionChanged"]}}, + {"OverlayWebWindow.sizeChanged":{"prefix":"OverlayWebWindow.sizeChanged","body":["OverlayWebWindow.sizeChanged"]}}, + {"OverlayWebWindow.moved":{"prefix":"OverlayWebWindow.moved","body":["OverlayWebWindow.moved(${1:position: Vec2})"]}}, + {"OverlayWebWindow.resized":{"prefix":"OverlayWebWindow.resized","body":["OverlayWebWindow.resized(${1:size: Size})"]}}, + {"OverlayWebWindow.closed":{"prefix":"OverlayWebWindow.closed","body":["OverlayWebWindow.closed"]}}, + {"OverlayWebWindow.fromQml":{"prefix":"OverlayWebWindow.fromQml","body":["OverlayWebWindow.fromQml(${1:message: object})"]}}, + {"OverlayWebWindow.scriptEventReceived":{"prefix":"OverlayWebWindow.scriptEventReceived","body":["OverlayWebWindow.scriptEventReceived(${1:message: object})"]}}, + {"OverlayWebWindow.webEventReceived":{"prefix":"OverlayWebWindow.webEventReceived","body":["OverlayWebWindow.webEventReceived(${1:message: object})"]}}, + {"OverlayWebWindow.hasMoved":{"prefix":"OverlayWebWindow.hasMoved","body":["OverlayWebWindow.hasMoved(${1:position: Vec2})"]}}, + {"OverlayWebWindow.hasClosed":{"prefix":"OverlayWebWindow.hasClosed","body":["OverlayWebWindow.hasClosed"]}}, + {"OverlayWebWindow.qmlToScript":{"prefix":"OverlayWebWindow.qmlToScript","body":["OverlayWebWindow.qmlToScript(${1:message: object})"]}} + ] + \ No newline at end of file diff --git a/hifistubs.d.ts b/hifistubs.d.ts index 46b1b68c5..05b5a31d8 100644 --- a/hifistubs.d.ts +++ b/hifistubs.d.ts @@ -2,13919 +2,14618 @@ * Available in:Assignment Client Scripts */ declare namespace Agent { - function run(): void; - /** - * @param avatarSound {object} - */ - function playAvatarSound(avatarSound: object): void; - /** - * @param isAvatar {boolean} - */ - function setIsAvatar(isAvatar: boolean): void; - /** - * @returns {boolean} - */ - function isAvatar(): boolean; - function stop(): void; - function sendStatsPacket(): void; - function clearQueuedCheckIns(): void; - /** - * @returns {Signal} - */ - function finished(): Signal; - function domainSettingsRequestFailed(): void; - let isAvatar: boolean; - /** - * Read-only. - */ - let isPlayingAvatarSound: boolean; - let isListeningToAudioStream: boolean; - let isNoiseGateEnabled: boolean; - /** - * Read-only. - */ - let lastReceivedAudioLoudness: number; - /** - * Read-only. - */ - let sessionUUID: Uuid; + /** + * @param isAvatar {boolean} + */ + function setIsAvatar(isAvatar: boolean): void; + /** + * @returns {boolean} + */ + function isAvatar(): boolean; + /** + * @param avatarSound {object} + */ + function playAvatarSound(avatarSound: object): void; + let isAvatar: boolean; + /** + * Read-only. + */ + let isPlayingAvatarSound: boolean; + let isListeningToAudioStream: boolean; + let isNoiseGateEnabled: boolean; + /** + * Read-only. + */ + let lastReceivedAudioLoudness: number; + /** + * Read-only. + */ + let sessionUUID: Uuid; } /** -* Available in:Assignment Client ScriptsThe Avatar API is used to manipulate scriptable avatars on the domain. This API is a subset of the -* MyAvatar API. - -Note: In the examples, use "Avatar" instead of "MyAvatar". -*/ + * Available in:Assignment Client ScriptsThe Avatar API is used to manipulate scriptable avatars on the domain. This API is a subset of the + * MyAvatar API. Note: In the examples, use "Avatar" instead of "MyAvatar". + */ declare namespace Avatar { - /** - * @param url {string} - * @param fps {number} [fps=30] - * @param priority {number} [priority=1] - * @param loop {boolean} [loop=false] - * @param hold {boolean} [hold=false] - * @param firstFrame {number} [firstFrame=0] - * @param lastFrame {number} [lastFrame=3.403e+38] - * @param maskedJoints {Array.} [maskedJoints=[]] - */ - function startAnimation(url: string, fps: number, priority: number, loop: boolean, hold: boolean, firstFrame: number, lastFrame: number, maskedJoints: Array.): void; - function stopAnimation(): void; - /** - * @returns {Avatar.AnimationDetails} - */ - function getAnimationDetails(): Avatar.AnimationDetails; - interface AnimationDetails { - role: string; - url: string; - fps: number; - priority: number; - loop: boolean; - hold: boolean; - startAutomatically: boolean; - firstFrame: number; - lastFrame: number; - running: boolean; - currentFrame: number; - allowTranslation: boolean; - } - - /** - * Returns the minimum scale allowed for this avatar in the current domain. - * This value can change as the user changes avatars or when changing domains. - * @returns {number} - */ - function getDomainMinScale(): number; - /** - * Returns the maximum scale allowed for this avatar in the current domain. - * This value can change as the user changes avatars or when changing domains. - * @returns {number} - */ - function getDomainMaxScale(): number; - /** - * Provides read only access to the current eye height of the avatar. - * This height is only an estimate and might be incorrect for avatars that are missing standard joints. - * @returns {number} - */ - function getEyeHeight(): number; - /** - * Provides read only access to the current height of the avatar. - * This height is only an estimate and might be incorrect for avatars that are missing standard joints. - * @returns {number} - */ - function getHeight(): number; - /** - * @param state {string} - */ - function setHandState(state: string): void; - /** - * @returns {string} - */ - function getHandState(): string; - /** - * @param data {Array.} - */ - function setRawJointData(data: Array.): void; - /** - * Set a specific joint's rotation and position relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param index {number} The index of the joint. - * @param rotation {Quat} The rotation of the joint relative to its parent. - * @param translation {Vec3} The translation of the joint relative to its parent. - */ - function setJointData(index: number, rotation: Quat, translation: Vec3): void; - /** - * Set a specific joint's rotation and position relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param name {string} The name of the joint. - * @param rotation {Quat} The rotation of the joint relative to its parent. - * @param translation {Vec3} The translation of the joint relative to its parent. - */ - function setJointData(name: string, rotation: Quat, translation: Vec3): void; - /** - * Set a specific joint's rotation relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param index {number} The index of the joint. - * @param rotation {Quat} The rotation of the joint relative to its parent. - */ - function setJointRotation(index: number, rotation: Quat): void; - /** - * Set a specific joint's rotation relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param name {string} The name of the joint. - * @param rotation {Quat} The rotation of the joint relative to its parent. - */ - function setJointRotation(name: string, rotation: Quat): void; - /** - * Set a specific joint's translation relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param index {number} The index of the joint. - * @param translation {Vec3} The translation of the joint relative to its parent. - */ - function setJointTranslation(index: number, translation: Vec3): void; - /** - * Set a specific joint's translation relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param name {string} The name of the joint. - * @param translation {Vec3} The translation of the joint relative to its parent. - */ - function setJointTranslation(name: string, translation: Vec3): void; - /** - * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default - * animation system including inverse kinematics for that joint. -Note: This is slightly faster than the function variation that specifies the joint name. - * @param index {number} The index of the joint. - */ - function clearJointData(index: number): void; - /** - * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default - * animation system including inverse kinematics for that joint. -Note: This is slightly slower than the function variation that specifies the joint index. - * @param name {string} The name of the joint. - */ - function clearJointData(name: string): void; - /** - * @param index {number} - * @returns {boolean} - */ - function isJointDataValid(index: number): boolean; - /** - * @param name {string} - * @returns {boolean} - */ - function isJointDataValid(name: string): boolean; - /** - * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see - * Avatar Standards. - * @param index {number} The index of the joint. - * @returns {Quat} - */ - function getJointRotation(index: number): Quat; - /** - * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see - * Avatar Standards. - * @param name {string} The name of the joint. - * @returns {Quat} - */ - function getJointRotation(name: string): Quat; - /** - * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see - * Avatar Standards. - * @param index {number} The index of the joint. - * @returns {Vec3} - */ - function getJointTranslation(index: number): Vec3; - /** - * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see - * Avatar Standards. - * @param name {number} The name of the joint. - * @returns {Vec3} - */ - function getJointTranslation(name: number): Vec3; - /** - * Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. - * @returns {Array.} - */ - function getJointRotations(): Array.; - /** - * @returns {Array.} - */ - function getJointTranslations(): Array.; - /** - * Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param jointRotations {Array.} The rotations for all joints in the avatar. The values are in the same order as the - * array returned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}. - */ - function setJointRotations(jointRotations: Array.): void; - /** - * @param translations {Array.} - */ - function setJointTranslations(translations: Array.): void; - /** - * Clear all joint translations and rotations that have been set by script. This restores all motion from the default - * animation system including inverse kinematics for all joints. - */ - function clearJointsData(): void; - /** - * Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by - * MyAvatar.getJointNames or Avatar.getJointNames. - * @param name {string} The name of the joint. - * @returns {number} - */ - function getJointIndex(name: string): number; - /** - * Get the names of all the joints in the current avatar. - * @returns {Array.} - */ - function getJointNames(): Array.; - /** - * @param name {string} - * @param value {number} - */ - function setBlendshape(name: string, value: number): void; - /** - * @returns {object} - */ - function getAttachmentsVariant(): object; - /** - * @param variant {object} - */ - function setAttachmentsVariant(variant: object): void; - /** - * @param entityID {Uuid} - * @param entityData {string} - */ - function updateAvatarEntity(entityID: Uuid, entityData: string): void; - /** - * @param entityID {Uuid} - */ - function clearAvatarEntity(entityID: Uuid): void; - /** - * @param connected {boolean} - */ - function setForceFaceTrackerConnected(connected: boolean): void; - /** - * Get information about all models currently attached to your avatar. - * @returns {Array.} - */ - function getAttachmentData(): Array.; - /** - * Set all models currently attached to your avatar. For example, if you retrieve attachment data using - * MyAvatar.getAttachmentData or Avatar.getAttachmentData, make changes to it, and then want to update your avatar's attachments per the -changed data. You can also remove all attachments by using setting attachmentData to null. - * @param attachmentData {Array.} The attachment data defining the models to have attached to your avatar. Use - * null to remove all attachments. - */ - function setAttachmentData(attachmentData: Array.): void; - /** - * Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to - * stand on. -Note: Attached models are models only; they are not entities and can not be manipulated using the Entities API. -Nor can you use this function to attach an entity (such as a sphere or a box) to your avatar. - * @param modelURL {string} The URL of the model to attach. Models can be .FBX or .OBJ format. - * @param jointName {string} [jointName=""] The name of the avatar joint (see {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}) to attach the model - * to. - * @param translation {Vec3} [translation=Vec3.ZERO] The offset to apply to the model relative to the joint position. - * @param rotation {Quat} [rotation=Quat.IDENTITY] The rotation to apply to the model relative to the joint orientation. - * @param scale {number} [scale=1.0] The scale to apply to the model. - * @param isSoft {boolean} [isSoft=false] If the model has a skeleton, set this to true so that the bones of the - * attached model's skeleton are be rotated to fit the avatar's current pose. isSoft is used, for example, - to have clothing that moves with the avatar.
- If true, the translation, rotation, and scale parameters are - ignored. - * @param allowDuplicates {boolean} [allowDuplicates=false] - * @param useSaved {boolean} [useSaved=true] - */ - function attach(modelURL: string, jointName: string, translation: Vec3, rotation: Quat, scale: number, isSoft: boolean, allowDuplicates: boolean, useSaved: boolean): void; - /** - * Detach the most recently attached instance of a particular model from either a specific joint or any joint. - * @param modelURL {string} The URL of the model to detach. - * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the most - * recently attached model is removed from which ever joint it was attached to. - */ - function detachOne(modelURL: string, jointName: string): void; - /** - * Detach all instances of a particular model from either a specific joint or all joints. - * @param modelURL {string} The URL of the model to detach. - * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the model is - * detached from all joints. - */ - function detachAll(modelURL: string, jointName: string): void; - /** - * @returns {object} - */ - function getAvatarEntityData(): object; - /** - * @param avatarEntityData {object} - */ - function setAvatarEntityData(avatarEntityData: object): void; - /** - * @returns {Mat4} - */ - function getSensorToWorldMatrix(): Mat4; - /** - * @returns {number} - */ - function getSensorToWorldScale(): number; - /** - * @returns {Mat4} - */ - function getControllerLeftHandMatrix(): Mat4; - /** - * @returns {Mat4} - */ - function getControllerRightHandMatrix(): Mat4; - /** - * @param rateName {string} [rateName=""] - * @returns {number} - */ - function getDataRate(rateName: string): number; - /** - * @param rateName {string} [rateName=""] - * @returns {number} - */ - function getUpdateRate(rateName: string): number; - /** - * @returns {Signal} - */ - function displayNameChanged(): Signal; - /** - * @returns {Signal} - */ - function sessionDisplayNameChanged(): Signal; - /** - * @returns {Signal} - */ - function skeletonModelURLChanged(): Signal; - /** - * @param enabled {boolean} - * @returns {Signal} - */ - function lookAtSnappingChanged(enabled: boolean): Signal; - /** - * @returns {Signal} - */ - function sessionUUIDChanged(): Signal; - /** - * @param sendAll {boolean} [sendAll=false] - */ - function sendAvatarDataPacket(sendAll: boolean): void; - function sendIdentityPacket(): void; - function setJointMappingsFromNetworkReply(): void; - /** - * @param sessionUUID {Uuid} - */ - function setSessionUUID(sessionUUID: Uuid): void; - /** - * @param index {number} - * @returns {Quat} - */ - function getAbsoluteJointRotationInObjectFrame(index: number): Quat; - /** - * @param index {number} - * @returns {Vec3} - */ - function getAbsoluteJointTranslationInObjectFrame(index: number): Vec3; - /** - * @param index {number} - * @param rotation {Quat} - * @returns {boolean} - */ - function setAbsoluteJointRotationInObjectFrame(index: number, rotation: Quat): boolean; - /** - * @param index {number} - * @param translation {Vec3} - * @returns {boolean} - */ - function setAbsoluteJointTranslationInObjectFrame(index: number, translation: Vec3): boolean; - /** - * @returns {number} - */ - function getTargetScale(): number; - function resetLastSent(): void; - let position: Vec3; - let scale: number; - /** - * Read-only. - */ - let density: number; - let handPosition: Vec3; - /** - * The rotation left or right about an axis running from the head to the feet of the avatar. - * Yaw is sometimes called "heading". - */ - let bodyYaw: number; - /** - * The rotation about an axis running from shoulder to shoulder of the avatar. Pitch is - * sometimes called "elevation". - */ - let bodyPitch: number; - /** - * The rotation about an axis running from the chest to the back of the avatar. Roll is - * sometimes called "bank". - */ - let bodyRoll: number; - let orientation: Quat; - /** - * The orientation of the avatar's head. - */ - let headOrientation: Quat; - /** - * The rotation about an axis running from ear to ear of the avatar's head. Pitch is - * sometimes called "elevation". - */ - let headPitch: number; - /** - * The rotation left or right about an axis running from the base to the crown of the avatar's - * head. Yaw is sometimes called "heading". - */ - let headYaw: number; - /** - * The rotation about an axis running from the nose to the back of the avatar's head. Roll is - * sometimes called "bank". - */ - let headRoll: number; - let velocity: Vec3; - let angularVelocity: Vec3; - let audioLoudness: number; - let audioAverageLoudness: number; - let displayName: string; - /** - * Sanitized, defaulted version displayName that is defined by the AvatarMixer - * rather than by Interface clients. The result is unique among all avatars present at the time. - */ - let sessionDisplayName: string; - let lookAtSnappingEnabled: boolean; - let skeletonModelURL: string; - let attachmentData: Array.; - /** - * The list of joints in the current avatar model. Read-only. - */ - let jointNames: Array.; - /** - * Read-only. - */ - let sessionUUID: Uuid; - /** - * Read-only. - */ - let sensorToWorldMatrix: Mat4; - /** - * Read-only. - */ - let controllerLeftHandMatrix: Mat4; - /** - * Read-only. - */ - let controllerRightHandMatrix: Mat4; - /** - * Read-only. - */ - let sensorToWorldScale: number; + /** + * @param url {string} + * @param fps {number} [fps=30] + * @param priority {number} [priority=1] + * @param loop {boolean} [loop=false] + * @param hold {boolean} [hold=false] + * @param firstFrame {number} [firstFrame=0] + * @param lastFrame {number} [lastFrame=3.403e+38] + * @param maskedJoints {Array.} [maskedJoints=[]] + */ + function startAnimation(url: string, fps: number, priority: number, loop: boolean, hold: boolean, firstFrame: number, lastFrame: number, maskedJoints: Array.): void; + function stopAnimation(): void; + /** + * @returns {Avatar.AnimationDetails} + */ + function getAnimationDetails(): Avatar.AnimationDetails; + interface AnimationDetails { + role: string; + url: string; + fps: number; + priority: number; + loop: boolean; + hold: boolean; + startAutomatically: boolean; + firstFrame: number; + lastFrame: number; + running: boolean; + currentFrame: number; + allowTranslation: boolean; + } + + /** + * Returns the minimum scale allowed for this avatar in the current domain. + * This value can change as the user changes avatars or when changing domains. + * @returns {number} + */ + function getDomainMinScale(): number; + /** + * Returns the maximum scale allowed for this avatar in the current domain. + * This value can change as the user changes avatars or when changing domains. + * @returns {number} + */ + function getDomainMaxScale(): number; + /** + * Provides read only access to the current eye height of the avatar. + * This height is only an estimate and might be incorrect for avatars that are missing standard joints. + * @returns {number} + */ + function getEyeHeight(): number; + /** + * Provides read only access to the current height of the avatar. + * This height is only an estimate and might be incorrect for avatars that are missing standard joints. + * @returns {number} + */ + function getHeight(): number; + /** + * @param state {string} + */ + function setHandState(state: string): void; + /** + * @returns {string} + */ + function getHandState(): string; + /** + * @param data {Array.} + */ + function setRawJointData(data: Array.): void; + /** + * Set a specific joint's rotation and position relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointData(index: number, rotation: Quat, translation: Vec3): void; + /** + * Set a specific joint's rotation and position relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointData(name: string, rotation: Quat, translation: Vec3): void; + /** + * Set a specific joint's rotation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + */ + function setJointRotation(index: number, rotation: Quat): void; + /** + * Set a specific joint's rotation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + */ + function setJointRotation(name: string, rotation: Quat): void; + /** + * Set a specific joint's translation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointTranslation(index: number, translation: Vec3): void; + /** + * Set a specific joint's translation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointTranslation(name: string, translation: Vec3): void; + /** + * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default + * animation system including inverse kinematics for that joint. Note: This is slightly faster than the function variation that specifies the joint name. + * @param index {number} The index of the joint. + */ + function clearJointData(index: number): void; + /** + * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default + * animation system including inverse kinematics for that joint. Note: This is slightly slower than the function variation that specifies the joint index. + * @param name {string} The name of the joint. + */ + function clearJointData(name: string): void; + /** + * @param index {number} + * @returns {boolean} + */ + function isJointDataValid(index: number): boolean; + /** + * @param name {string} + * @returns {boolean} + */ + function isJointDataValid(name: string): boolean; + /** + * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param index {number} The index of the joint. + * @returns {Quat} + */ + function getJointRotation(index: number): Quat; + /** + * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param name {string} The name of the joint. + * @returns {Quat} + */ + function getJointRotation(name: string): Quat; + /** + * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param index {number} The index of the joint. + * @returns {Vec3} + */ + function getJointTranslation(index: number): Vec3; + /** + * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param name {number} The name of the joint. + * @returns {Vec3} + */ + function getJointTranslation(name: number): Vec3; + /** + * Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. + * @returns {Array.} + */ + function getJointRotations(): Array.; + /** + * @returns {Array.} + */ + function getJointTranslations(): Array.; + /** + * Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param jointRotations {Array.} The rotations for all joints in the avatar. The values are in the same order as the + * array returned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}. + */ + function setJointRotations(jointRotations: Array.): void; + /** + * @param translations {Array.} + */ + function setJointTranslations(translations: Array.): void; + /** + * Clear all joint translations and rotations that have been set by script. This restores all motion from the default + * animation system including inverse kinematics for all joints. + */ + function clearJointsData(): void; + /** + * Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by + * MyAvatar.getJointNames or Avatar.getJointNames. + * @param name {string} The name of the joint. + * @returns {number} + */ + function getJointIndex(name: string): number; + /** + * Get the names of all the joints in the current avatar. + * @returns {Array.} + */ + function getJointNames(): Array.; + /** + * @param name {string} + * @param value {number} + */ + function setBlendshape(name: string, value: number): void; + /** + * @returns {object} + */ + function getAttachmentsVariant(): object; + /** + * @param variant {object} + */ + function setAttachmentsVariant(variant: object): void; + /** + * @param entityID {Uuid} + * @param entityData {string} + */ + function updateAvatarEntity(entityID: Uuid, entityData: string): void; + /** + * @param entityID {Uuid} + */ + function clearAvatarEntity(entityID: Uuid): void; + /** + * @param connected {boolean} + */ + function setForceFaceTrackerConnected(connected: boolean): void; + /** + * Get information about all models currently attached to your avatar. + * @returns {Array.} + */ + function getAttachmentData(): Array.; + /** + * Set all models currently attached to your avatar. For example, if you retrieve attachment data using + * MyAvatar.getAttachmentData or Avatar.getAttachmentData, make changes to it, and then want to update your avatar's attachments per the changed data. You can also remove all attachments by using setting attachmentData to null. + * @param attachmentData {Array.} The attachment data defining the models to have attached to your avatar. Use + * null to remove all attachments. + */ + function setAttachmentData(attachmentData: Array.): void; + /** + * Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to + * stand on. Note: Attached models are models only; they are not entities and can not be manipulated using the Entities API. Nor can you use this function to attach an entity (such as a sphere or a box) to your avatar. + * @param modelURL {string} The URL of the model to attach. Models can be .FBX or .OBJ format. + * @param jointName {string} [jointName=""] The name of the avatar joint (see {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}) to attach the model + * to. + * @param translation {Vec3} [translation=Vec3.ZERO] The offset to apply to the model relative to the joint position. + * @param rotation {Quat} [rotation=Quat.IDENTITY] The rotation to apply to the model relative to the joint orientation. + * @param scale {number} [scale=1.0] The scale to apply to the model. + * @param isSoft {boolean} [isSoft=false] If the model has a skeleton, set this to true so that the bones of the + * attached model's skeleton are be rotated to fit the avatar's current pose. isSoft is used, for example, to have clothing that moves with the avatar.
If true, the translation, rotation, and scale parameters are ignored. + * @param allowDuplicates {boolean} [allowDuplicates=false] + * @param useSaved {boolean} [useSaved=true] + */ + function attach(modelURL: string, jointName: string, translation: Vec3, rotation: Quat, scale: number, isSoft: boolean, allowDuplicates: boolean, useSaved: boolean): void; + /** + * Detach the most recently attached instance of a particular model from either a specific joint or any joint. + * @param modelURL {string} The URL of the model to detach. + * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the most + * recently attached model is removed from which ever joint it was attached to. + */ + function detachOne(modelURL: string, jointName: string): void; + /** + * Detach all instances of a particular model from either a specific joint or all joints. + * @param modelURL {string} The URL of the model to detach. + * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the model is + * detached from all joints. + */ + function detachAll(modelURL: string, jointName: string): void; + /** + * @returns {object} + */ + function getAvatarEntityData(): object; + /** + * @param avatarEntityData {object} + */ + function setAvatarEntityData(avatarEntityData: object): void; + /** + * @returns {Mat4} + */ + function getSensorToWorldMatrix(): Mat4; + /** + * @returns {number} + */ + function getSensorToWorldScale(): number; + /** + * @returns {Mat4} + */ + function getControllerLeftHandMatrix(): Mat4; + /** + * @returns {Mat4} + */ + function getControllerRightHandMatrix(): Mat4; + /** + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getDataRate(rateName: string): number; + /** + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getUpdateRate(rateName: string): number; + /** + * @returns {Signal} + */ + function displayNameChanged(): Signal; + /** + * @returns {Signal} + */ + function sessionDisplayNameChanged(): Signal; + /** + * @returns {Signal} + */ + function skeletonModelURLChanged(): Signal; + /** + * @param enabled {boolean} + * @returns {Signal} + */ + function lookAtSnappingChanged(enabled: boolean): Signal; + /** + * @returns {Signal} + */ + function sessionUUIDChanged(): Signal; + /** + * @param sendAll {boolean} [sendAll=false] + */ + function sendAvatarDataPacket(sendAll: boolean): void; + function sendIdentityPacket(): void; + function setJointMappingsFromNetworkReply(): void; + /** + * @param sessionUUID {Uuid} + */ + function setSessionUUID(sessionUUID: Uuid): void; + /** + * @param index {number} + * @returns {Quat} + */ + function getAbsoluteJointRotationInObjectFrame(index: number): Quat; + /** + * @param index {number} + * @returns {Vec3} + */ + function getAbsoluteJointTranslationInObjectFrame(index: number): Vec3; + /** + * @param index {number} + * @param rotation {Quat} + * @returns {boolean} + */ + function setAbsoluteJointRotationInObjectFrame(index: number, rotation: Quat): boolean; + /** + * @param index {number} + * @param translation {Vec3} + * @returns {boolean} + */ + function setAbsoluteJointTranslationInObjectFrame(index: number, translation: Vec3): boolean; + /** + * @returns {number} + */ + function getTargetScale(): number; + function resetLastSent(): void; + let position: Vec3; + let scale: number; + /** + * Read-only. + */ + let density: number; + let handPosition: Vec3; + /** + * The rotation left or right about an axis running from the head to the feet of the avatar. + * Yaw is sometimes called "heading". + */ + let bodyYaw: number; + /** + * The rotation about an axis running from shoulder to shoulder of the avatar. Pitch is + * sometimes called "elevation". + */ + let bodyPitch: number; + /** + * The rotation about an axis running from the chest to the back of the avatar. Roll is + * sometimes called "bank". + */ + let bodyRoll: number; + let orientation: Quat; + /** + * The orientation of the avatar's head. + */ + let headOrientation: Quat; + /** + * The rotation about an axis running from ear to ear of the avatar's head. Pitch is + * sometimes called "elevation". + */ + let headPitch: number; + /** + * The rotation left or right about an axis running from the base to the crown of the avatar's + * head. Yaw is sometimes called "heading". + */ + let headYaw: number; + /** + * The rotation about an axis running from the nose to the back of the avatar's head. Roll is + * sometimes called "bank". + */ + let headRoll: number; + let velocity: Vec3; + let angularVelocity: Vec3; + let audioLoudness: number; + let audioAverageLoudness: number; + let displayName: string; + /** + * Sanitized, defaulted version displayName that is defined by the AvatarMixer + * rather than by Interface clients. The result is unique among all avatars present at the time. + */ + let sessionDisplayName: string; + let lookAtSnappingEnabled: boolean; + let skeletonModelURL: string; + let attachmentData: Array.; + /** + * The list of joints in the current avatar model. Read-only. + */ + let jointNames: Array.; + /** + * Read-only. + */ + let sessionUUID: Uuid; + /** + * Read-only. + */ + let sensorToWorldMatrix: Mat4; + /** + * Read-only. + */ + let controllerLeftHandMatrix: Mat4; + /** + * Read-only. + */ + let controllerRightHandMatrix: Mat4; + /** + * Read-only. + */ + let sensorToWorldScale: number; } /** -* Available in:Assignment Client Scripts -*/ + * Available in:Assignment Client Scripts + */ declare namespace EntityViewer { - function queryOctree(): void; - /** - * @param position {Vec3} - */ - function setPosition(position: Vec3): void; - /** - * @param orientation {Quat} - */ - function setOrientation(orientation: Quat): void; - /** - * @param radius {number} - */ - function setCenterRadius(radius: number): void; - /** - * @param radius {number} - */ - function setKeyholeRadius(radius: number): void; - /** - * @param sizeScale {number} - */ - function setVoxelSizeScale(sizeScale: number): void; - /** - * @param boundaryLevelAdjust {number} - */ - function setBoundaryLevelAdjust(boundaryLevelAdjust: number): void; - /** - * @param maxPacketsPerSecond {number} - */ - function setMaxPacketsPerSecond(maxPacketsPerSecond: number): void; - /** - * @returns {Vec3} - */ - function getPosition(): Vec3; - /** - * @returns {Quat} - */ - function getOrientation(): Quat; - /** - * @returns {number} - */ - function getVoxelSizeScale(): number; - /** - * @returns {number} - */ - function getBoundaryLevelAdjust(): number; - /** - * @returns {number} - */ - function getMaxPacketsPerSecond(): number; - /** - * @returns {number} - */ - function getOctreeElementsCount(): number; + function queryOctree(): void; + /** + * @param position {Vec3} + */ + function setPosition(position: Vec3): void; + /** + * @param orientation {Quat} + */ + function setOrientation(orientation: Quat): void; + /** + * @param radius {number} + */ + function setCenterRadius(radius: number): void; + /** + * @param radius {number} + */ + function setKeyholeRadius(radius: number): void; + /** + * @param sizeScale {number} + */ + function setVoxelSizeScale(sizeScale: number): void; + /** + * @param boundaryLevelAdjust {number} + */ + function setBoundaryLevelAdjust(boundaryLevelAdjust: number): void; + /** + * @param maxPacketsPerSecond {number} + */ + function setMaxPacketsPerSecond(maxPacketsPerSecond: number): void; + /** + * @returns {Vec3} + */ + function getPosition(): Vec3; + /** + * @returns {Quat} + */ + function getOrientation(): Quat; + /** + * @returns {number} + */ + function getVoxelSizeScale(): number; + /** + * @returns {number} + */ + function getBoundaryLevelAdjust(): number; + /** + * @returns {number} + */ + function getMaxPacketsPerSecond(): number; + /** + * @returns {number} + */ + function getOctreeElementsCount(): number; } /** -* Available in:Interface ScriptsClient Entity ScriptsThis API helps manage adding and deleting avatar bookmarks. -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace HifiAbout { + /** + * @param url {string} + */ + function openUrl(url: string): void; + let buildDate: string; + let buildVersion: string; + let qtVersion: string; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThis API helps manage adding and deleting avatar bookmarks. + */ declare namespace AvatarBookmarks { - /** - * Add the current Avatar to your avatar bookmarks. - */ - function addBookMark(): void; - function deleteBookmark(): void; + /** + * Add the current Avatar to your avatar bookmarks. + */ + function addBookMark(): void; + /** + * This function gets triggered after avatar loaded from bookmark + * @param bookmarkName {string} + * @returns {Signal} + */ + function bookmarkLoaded(bookmarkName: string): Signal; + /** + * This function gets triggered after avatar bookmark deleted + * @param bookmarkName {string} + * @returns {Signal} + */ + function bookmarkDeleted(bookmarkName: string): Signal; + /** + * This function gets triggered after avatar bookmark added + * @param bookmarkName {string} + * @returns {Signal} + */ + function bookmarkAdded(bookmarkName: string): Signal; + function deleteBookmark(): void; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace LocationBookmarks { - function deleteBookmark(): void; - function addBookmark(): void; - /** - * @param address {string} - */ - function setHomeLocationToAddress(address: string): void; + function deleteBookmark(): void; + function addBookmark(): void; + /** + * @param address {string} + */ + function setHomeLocationToAddress(address: string): void; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe LOD class manages your Level of Detail functions within Interface. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe LOD class manages your Level of Detail functions within Interface. + */ declare namespace LODManager { - /** - * @param value {boolean} - */ - function setAutomaticLODAdjust(value: boolean): void; - /** - * @returns {boolean} - */ - function getAutomaticLODAdjust(): boolean; - /** - * @param value {number} - */ - function setDesktopLODDecreaseFPS(value: number): void; - /** - * @returns {number} - */ - function getDesktopLODDecreaseFPS(): number; - /** - * @returns {number} - */ - function getDesktopLODIncreaseFPS(): number; - /** - * @param value {number} - */ - function setHMDLODDecreaseFPS(value: number): void; - /** - * @returns {number} - */ - function getHMDLODDecreaseFPS(): number; - /** - * @returns {number} - */ - function getHMDLODIncreaseFPS(): number; - /** - * @returns {string} - */ - function getLODFeedbackText(): string; - /** - * @param sizeScale {number} - */ - function setOctreeSizeScale(sizeScale: number): void; - /** - * @returns {number} - */ - function getOctreeSizeScale(): number; - /** - * @param boundaryLevelAdjust {number} - */ - function setBoundaryLevelAdjust(boundaryLevelAdjust: number): void; - /** - * @returns {number} - */ - function getBoundaryLevelAdjust(): number; - /** - * @returns {number} - */ - function getLODDecreaseFPS(): number; - /** - * @returns {number} - */ - function getLODIncreaseFPS(): number; - /** - * @returns {Signal} - */ - function LODIncreased(): Signal; - /** - * @returns {Signal} - */ - function LODDecreased(): Signal; - /** - * Read-only. - */ - let presentTime: number; - /** - * Read-only. - */ - let engineRunTime: number; - /** - * Read-only. - */ - let gpuTime: number; - /** - * Read-only. - */ - let avgRenderTime: number; - /** - * Read-only. - */ - let fps: number; - /** - * Read-only. - */ - let lodLevel: number; - /** - * Read-only. - */ - let lodDecreaseFPS: number; - /** - * Read-only. - */ - let lodIncreaseFPS: number; + /** + * @param value {boolean} + */ + function setAutomaticLODAdjust(value: boolean): void; + /** + * @returns {boolean} + */ + function getAutomaticLODAdjust(): boolean; + /** + * @param value {number} + */ + function setDesktopLODTargetFPS(value: number): void; + /** + * @returns {number} + */ + function getDesktopLODTargetFPS(): number; + /** + * @param value {number} + */ + function setHMDLODTargetFPS(value: number): void; + /** + * @returns {number} + */ + function getHMDLODTargetFPS(): number; + /** + * @returns {string} + */ + function getLODFeedbackText(): string; + /** + * @param sizeScale {number} + */ + function setOctreeSizeScale(sizeScale: number): void; + /** + * @returns {number} + */ + function getOctreeSizeScale(): number; + /** + * @param boundaryLevelAdjust {number} + */ + function setBoundaryLevelAdjust(boundaryLevelAdjust: number): void; + /** + * @returns {number} + */ + function getBoundaryLevelAdjust(): number; + /** + * @returns {number} + */ + function getLODTargetFPS(): number; + /** + * @returns {Signal} + */ + function LODIncreased(): Signal; + /** + * @returns {Signal} + */ + function LODDecreased(): Signal; + /** + * Read-only. + */ + let presentTime: number; + /** + * Read-only. + */ + let engineRunTime: number; + /** + * Read-only. + */ + let gpuTime: number; + /** + * Read-only. + */ + let avgRenderTime: number; + /** + * Read-only. + */ + let fps: number; + /** + * Read-only. + */ + let lodLevel: number; + /** + * Read-only. + */ + let lodDecreaseFPS: number; + /** + * Read-only. + */ + let lodIncreaseFPS: number; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace SpeechRecognizer { - /** - * @param enabled {boolean} - */ - function setEnabled(enabled: boolean): void; - /** - * @param command {string} - */ - function addCommand(command: string): void; - /** - * @param command {string} - */ - function removeCommand(command: string): void; - /** - * @param command {string} - * @returns {Signal} - */ - function commandRecognized(command: string): Signal; - /** - * @param enabled {boolean} - * @returns {Signal} - */ - function enabledUpdated(enabled: boolean): Signal; + /** + * @param enabled {boolean} + */ + function setEnabled(enabled: boolean): void; + /** + * @param command {string} + */ + function addCommand(command: string): void; + /** + * @param command {string} + */ + function removeCommand(command: string): void; + /** + * @param command {string} + * @returns {Signal} + */ + function commandRecognized(command: string): Signal; + /** + * @param enabled {boolean} + * @returns {Signal} + */ + function enabledUpdated(enabled: boolean): Signal; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe AudioScope API helps control the Audio Scope features in Interface -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe AudioScope API helps control the Audio Scope features in Interface + */ declare namespace AudioScope { - function toggle(): void; - /** - * @param visible {boolean} - */ - function setVisible(visible: boolean): void; - /** - * @returns {boolean} - */ - function getVisible(): boolean; - function togglePause(): void; - /** - * @param paused {boolean} - */ - function setPause(paused: boolean): void; - /** - * @returns {boolean} - */ - function getPause(): boolean; - function toggleTrigger(): void; - /** - * @returns {boolean} - */ - function getAutoTrigger(): boolean; - /** - * @param autoTrigger {boolean} - */ - function setAutoTrigger(autoTrigger: boolean): void; - /** - * @param x {number} - * @param y {number} - */ - function setTriggerValues(x: number, y: number): void; - /** - * @param triggered {boolean} - */ - function setTriggered(triggered: boolean): void; - /** - * @returns {boolean} - */ - function getTriggered(): boolean; - /** - * @returns {number} - */ - function getFramesPerSecond(): number; - /** - * @returns {number} - */ - function getFramesPerScope(): number; - function selectAudioScopeFiveFrames(): void; - function selectAudioScopeTwentyFrames(): void; - function selectAudioScopeFiftyFrames(): void; - /** - * @returns {Array.} - */ - function getScopeInput(): Array.; - /** - * @returns {Array.} - */ - function getScopeOutputLeft(): Array.; - /** - * @returns {Array.} - */ - function getScopeOutputRight(): Array.; - /** - * @returns {Array.} - */ - function getTriggerInput(): Array.; - /** - * @returns {Array.} - */ - function getTriggerOutputLeft(): Array.; - /** - * @returns {Array.} - */ - function getTriggerOutputRight(): Array.; - function setLocalEcho(): void; - function setServerEcho(): void; - /** - * @returns {Signal} - */ - function pauseChanged(): Signal; - /** - * @returns {Signal} - */ - function triggered(): Signal; - /** - * Read-only. - */ - let scopeInput: number; - /** - * Read-only. - */ - let scopeOutputLeft: number; - /** - * Read-only. - */ - let scopeOutputRight: number; - /** - * Read-only. - */ - let triggerInput: number; - /** - * Read-only. - */ - let triggerOutputLeft: number; - /** - * Read-only. - */ - let triggerOutputRight: number; + function toggle(): void; + /** + * @param visible {boolean} + */ + function setVisible(visible: boolean): void; + /** + * @returns {boolean} + */ + function getVisible(): boolean; + function togglePause(): void; + /** + * @param paused {boolean} + */ + function setPause(paused: boolean): void; + /** + * @returns {boolean} + */ + function getPause(): boolean; + function toggleTrigger(): void; + /** + * @returns {boolean} + */ + function getAutoTrigger(): boolean; + /** + * @param autoTrigger {boolean} + */ + function setAutoTrigger(autoTrigger: boolean): void; + /** + * @param x {number} + * @param y {number} + */ + function setTriggerValues(x: number, y: number): void; + /** + * @param triggered {boolean} + */ + function setTriggered(triggered: boolean): void; + /** + * @returns {boolean} + */ + function getTriggered(): boolean; + /** + * @returns {number} + */ + function getFramesPerSecond(): number; + /** + * @returns {number} + */ + function getFramesPerScope(): number; + function selectAudioScopeFiveFrames(): void; + function selectAudioScopeTwentyFrames(): void; + function selectAudioScopeFiftyFrames(): void; + /** + * @returns {Array.} + */ + function getScopeInput(): Array.; + /** + * @returns {Array.} + */ + function getScopeOutputLeft(): Array.; + /** + * @returns {Array.} + */ + function getScopeOutputRight(): Array.; + /** + * @returns {Array.} + */ + function getTriggerInput(): Array.; + /** + * @returns {Array.} + */ + function getTriggerOutputLeft(): Array.; + /** + * @returns {Array.} + */ + function getTriggerOutputRight(): Array.; + function setLocalEcho(): void; + function setServerEcho(): void; + /** + * @returns {Signal} + */ + function pauseChanged(): Signal; + /** + * @returns {Signal} + */ + function triggered(): Signal; + /** + * Read-only. + */ + let scopeInput: number; + /** + * Read-only. + */ + let scopeOutputLeft: number; + /** + * Read-only. + */ + let scopeOutputRight: number; + /** + * Read-only. + */ + let triggerInput: number; + /** + * Read-only. + */ + let triggerOutputLeft: number; + /** + * Read-only. + */ + let triggerOutputRight: number; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe AvatarManager API has properties and methods which manage Avatars within the same domain. -* -Note: This API is also provided to Interface and client entity scripts as the synonym, -AvatarList. For assignment client scripts, see the separate AvatarList API. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe AvatarManager API has properties and methods which manage Avatars within the same domain. + * Note: This API is also provided to Interface and client entity scripts as the synonym, AvatarList. For assignment client scripts, see the separate AvatarList API. + */ declare namespace AvatarManager { - /** - * @param avatarID {Uuid} - * @returns {AvatarData} - */ - function getAvatar(avatarID: Uuid): AvatarData; - /** - * @param sessionID {Uuid} - * @param rateName {string} [rateName=""] - * @returns {number} - */ - function getAvatarDataRate(sessionID: Uuid, rateName: string): number; - /** - * @param sessionID {Uuid} - * @param rateName {string} [rateName=""] - * @returns {number} - */ - function getAvatarUpdateRate(sessionID: Uuid, rateName: string): number; - /** - * @param sessionID {Uuid} - * @param rateName {string} [rateName=""] - * @returns {number} - */ - function getAvatarSimulationRate(sessionID: Uuid, rateName: string): number; - /** - * @param ray {PickRay} - * @param avatarsToInclude {Array.} [avatarsToInclude=[]] - * @param avatarsToDiscard {Array.} [avatarsToDiscard=[]] - * @returns {RayToAvatarIntersectionResult} - */ - function findRayIntersection(ray: PickRay, avatarsToInclude: Array., avatarsToDiscard: Array.): RayToAvatarIntersectionResult; - /** - * @param ray {PickRay} - * @param avatarsToInclude {Array.} - * @param avatarsToDiscard {Array.} - * @returns {RayToAvatarIntersectionResult} - */ - function findRayIntersectionVector(ray: PickRay, avatarsToInclude: Array., avatarsToDiscard: Array.): RayToAvatarIntersectionResult; - /** - * @param name {string} - * @returns {number} - */ - function getAvatarSortCoefficient(name: string): number; - /** - * @param name {string} - * @param value {number} - */ - function setAvatarSortCoefficient(name: string, value: number): void; - /** - * @param shouldRenderAvatars {boolean} - */ - function updateAvatarRenderStatus(shouldRenderAvatars: boolean): void; - /** - * @returns {Array.} - */ - function getAvatarIdentifiers(): Array.; - /** - * @param position {Vec3} - * @param range {number} - * @returns {Array.} - */ - function getAvatarsInRange(position: Vec3, range: number): Array.; - /** - * @param sessionUUID {Uuid} - * @returns {Signal} - */ - function avatarAddedEvent(sessionUUID: Uuid): Signal; - /** - * @param sessionUUID {Uuid} - * @returns {Signal} - */ - function avatarRemovedEvent(sessionUUID: Uuid): Signal; - /** - * @param sessionUUID {Uuid} - * @param oldSessionUUID {Uuid} - * @returns {Signal} - */ - function avatarSessionChangedEvent(sessionUUID: Uuid, oldSessionUUID: Uuid): Signal; - /** - * @param position {string} - * @param range {string} - * @returns {boolean} - */ - function isAvatarInRange(position: string, range: string): boolean; - /** - * @param sessionUUID {Uuid} - * @param oldSessionUUID {Uuid} - */ - function sessionUUIDChanged(sessionUUID: Uuid, oldSessionUUID: Uuid): void; - /** - * @param message {} - * @param sendingNode {} - */ - function processAvatarDataPacket(message, sendingNode): void; - /** - * @param message {} - * @param sendingNode {} - */ - function processAvatarIdentityPacket(message, sendingNode): void; - /** - * @param message {} - * @param sendingNode {} - */ - function processKillAvatar(message, sendingNode): void; + /** + * @param avatarID {Uuid} + * @returns {AvatarData} + */ + function getAvatar(avatarID: Uuid): AvatarData; + /** + * @param sessionID {Uuid} + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getAvatarDataRate(sessionID: Uuid, rateName: string): number; + /** + * @param sessionID {Uuid} + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getAvatarUpdateRate(sessionID: Uuid, rateName: string): number; + /** + * @param sessionID {Uuid} + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getAvatarSimulationRate(sessionID: Uuid, rateName: string): number; + /** + * @param ray {PickRay} + * @param avatarsToInclude {Array.} [avatarsToInclude=[]] + * @param avatarsToDiscard {Array.} [avatarsToDiscard=[]] + * @returns {RayToAvatarIntersectionResult} + */ + function findRayIntersection(ray: PickRay, avatarsToInclude: Array., avatarsToDiscard: Array.): RayToAvatarIntersectionResult; + /** + * @param ray {PickRay} + * @param avatarsToInclude {Array.} + * @param avatarsToDiscard {Array.} + * @returns {RayToAvatarIntersectionResult} + */ + function findRayIntersectionVector(ray: PickRay, avatarsToInclude: Array., avatarsToDiscard: Array.): RayToAvatarIntersectionResult; + /** + * @param name {string} + * @returns {number} + */ + function getAvatarSortCoefficient(name: string): number; + /** + * @param name {string} + * @param value {number} + */ + function setAvatarSortCoefficient(name: string, value: number): void; + /** + * Used in the PAL for getting PAL-related data about avatars nearby. Using this method is faster + * than iterating over each avatar and obtaining data about them in JavaScript, as that method locks and unlocks each avatar's data structure potentially hundreds of times per update tick. + * @param specificAvatarIdentifiers {Array.} A list of specific Avatar Identifiers about + * which you want to get PAL data + * @returns {object} + */ + function getPalData(specificAvatarIdentifiers: Array.): object; + /** + * @param shouldRenderAvatars {boolean} + */ + function updateAvatarRenderStatus(shouldRenderAvatars: boolean): void; + /** + * @returns {Array.} + */ + function getAvatarIdentifiers(): Array.; + /** + * @param position {Vec3} + * @param range {number} + * @returns {Array.} + */ + function getAvatarsInRange(position: Vec3, range: number): Array.; + /** + * @param sessionUUID {Uuid} + * @returns {Signal} + */ + function avatarAddedEvent(sessionUUID: Uuid): Signal; + /** + * @param sessionUUID {Uuid} + * @returns {Signal} + */ + function avatarRemovedEvent(sessionUUID: Uuid): Signal; + /** + * @param sessionUUID {Uuid} + * @param oldSessionUUID {Uuid} + * @returns {Signal} + */ + function avatarSessionChangedEvent(sessionUUID: Uuid, oldSessionUUID: Uuid): Signal; + /** + * @param position {string} + * @param range {string} + * @returns {boolean} + */ + function isAvatarInRange(position: string, range: string): boolean; + /** + * @param sessionUUID {Uuid} + * @param oldSessionUUID {Uuid} + */ + function sessionUUIDChanged(sessionUUID: Uuid, oldSessionUUID: Uuid): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processAvatarDataPacket(message, sendingNode): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processAvatarIdentityPacket(message, sendingNode): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processKillAvatar(message, sendingNode): void; } /** -* Available in:Interface ScriptsClient Entity ScriptsYour avatar is your in-world representation of you. The MyAvatar API is used to manipulate the avatar. -* For example, you can customize the avatar's appearance, run custom avatar animations, -change the avatar's position within the domain, or manage the avatar's collisions with other objects. -*/ + * Available in:Interface ScriptsClient Entity ScriptsYour avatar is your in-world representation of you. The MyAvatar API is used to manipulate the avatar. + * For example, you can customize the avatar's appearance, run custom avatar animations, change the avatar's position within the domain, or manage the avatar's collisions with other objects. + */ declare namespace MyAvatar { - function resetSensorsAndBody(): void; - /** - * Moves and orients the avatar, such that it is directly underneath the HMD, with toes pointed forward. - */ - function centerBody(): void; - /** - * The internal inverse-kinematics system maintains a record of which joints are "locked". Sometimes it is useful to forget this history, to prevent - * contorted joints. - */ - function clearIKJointLimitHistory(): void; - /** - * @param newOrientationVar {object} - */ - function setOrientationVar(newOrientationVar: object): void; - /** - * @returns {object} - */ - function getOrientationVar(): object; - /** - * Get the position in world coordinates of the point directly between your avatar's eyes assuming your avatar was in its - * default pose. This is a reference position; it does not change as your avatar's head moves relative to the avatar -position. - * @returns {Vec3} - */ - function getDefaultEyePosition(): Vec3; - /** - * The avatar animation system includes a set of default animations along with rules for how those animations are blended - * together with procedural data (such as look at vectors, hand sensors etc.). overrideAnimation() is used to completely -override all motion from the default animation system (including inverse kinematics for hand and head controllers) and -play a set of specified animations. To end these animations and restore the default animations, use -MyAvatar.restoreAnimation. -Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target -rig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, -the avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see -Avatar Standards. - * @param url {string} The URL to the animation file. Animation files need to be .FBX format, but only need to contain the - * avatar skeleton and animation data. - * @param fps {number} The frames per second (FPS) rate for the animation playback. 30 FPS is normal speed. - * @param loop {boolean} Set to true if the animation should loop. - * @param firstFrame {number} The frame the animation should start at. - * @param lastFrame {number} The frame the animation should end at. - */ - function overrideAnimation(url: string, fps: number, loop: boolean, firstFrame: number, lastFrame: number): void; - /** - * The avatar animation system includes a set of default animations along with rules for how those animations are blended together with - * procedural data (such as look at vectors, hand sensors etc.). Playing your own custom animations will override the default animations. -restoreAnimation() is used to restore all motion from the default animation system including inverse kinematics for hand and head -controllers. If you aren't currently playing an override animation, this function will have no effect. - */ - function restoreAnimation(): void; - /** - * Each avatar has an avatar-animation.json file that defines which animations are used and how they are blended together with procedural data - * (such as look at vectors, hand sensors etc.). Each animation specified in the avatar-animation.json file is known as an animation role. -Animation roles map to easily understandable actions that the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd." -getAnimationRoles() is used get the list of animation roles defined in the avatar-animation.json. - * @returns {Array.} - */ - function getAnimationRoles(): Array.; - /** - * Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions - * that the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd". To get the full list of roles, use getAnimationRoles(). -For each role, the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended -together with procedural data (such as look at vectors, hand sensors etc.). -overrideRoleAnimation() is used to change the animation clip (.FBX) associated with a specified animation role. To end -the animations and restore the default animations, use MyAvatar.restoreRoleAnimation. -Note: Hand roles only affect the hand. Other 'main' roles, like 'idleStand', 'idleTalk', 'takeoffStand' are full body. -Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target -rig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, -the avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see -Avatar Standards. - * @param role {string} The animation role to override - * @param url {string} The URL to the animation file. Animation files need to be .FBX format, but only need to contain the avatar skeleton and animation data. - * @param fps {number} The frames per second (FPS) rate for the animation playback. 30 FPS is normal speed. - * @param loop {boolean} Set to true if the animation should loop - * @param firstFrame {number} The frame the animation should start at - * @param lastFrame {number} The frame the animation should end at - */ - function overrideRoleAnimation(role: string, url: string, fps: number, loop: boolean, firstFrame: number, lastFrame: number): void; - /** - * Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions that - * the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd". To get the full list of roles, use getAnimationRoles(). For each role, -the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended together with -procedural data (such as look at vectors, hand sensors etc.). You can change the animation clip (.FBX) associated with a specified animation -role using overrideRoleAnimation(). -restoreRoleAnimation() is used to restore a specified animation role's default animation clip. If you have not specified an override animation -for the specified role, this function will have no effect. - * @param role {string} The animation role clip to restore. - */ - function restoreRoleAnimation(role: string): void; - /** - * @param handler {number} - */ - function removeAnimationStateHandler(handler: number): void; - /** - * @returns {boolean} - */ - function getSnapTurn(): boolean; - /** - * @param on {boolean} - */ - function setSnapTurn(on: boolean): void; - /** - * @returns {boolean} - */ - function getClearOverlayWhenMoving(): boolean; - /** - * @returns {boolean} - */ - function setClearOverlayWhenMoving(): boolean; - /** - * @param hand {string} - */ - function setDominantHand(hand: string): void; - /** - * @returns {string} - */ - function getDominantHand(): string; - /** - * @param enabled {boolean} - */ - function setHMDLeanRecenterEnabled(enabled: boolean): void; - /** - * @returns {boolean} - */ - function getHMDLeanRecenterEnabled(): boolean; - /** - * @param key {DriveKeys} - * @returns {number} - */ - function getRawDriveKey(key: DriveKeys): number; - /** - * @param key {DriveKeys} - */ - function disableDriveKey(key: DriveKeys): void; - /** - * @param key {DriveKeys} - */ - function enableDriveKey(key: DriveKeys): void; - /** - * @param key {DriveKeys} - * @returns {boolean} - */ - function isDriveKeyDisabled(key: DriveKeys): boolean; - /** - * Recenter the avatar in the vertical direction, if MyAvatar is - * false. - */ - function triggerVerticalRecenter(): void; - /** - * Recenter the avatar's rotation, if MyAvatar is false. - */ - function triggerRotationRecenter(): void; - /** - * Get the current position of the avatar's "Head" joint. - * @returns {Vec3} - */ - function getHeadPosition(): Vec3; - /** - * @returns {number} - */ - function getHeadFinalYaw(): number; - /** - * @returns {number} - */ - function getHeadFinalRoll(): number; - /** - * @returns {number} - */ - function getHeadFinalPitch(): number; - /** - * @returns {number} - */ - function getHeadDeltaPitch(): number; - /** - * Get the current position of the point directly between the avatar's eyes. - * @returns {Vec3} - */ - function getEyePosition(): Vec3; - /** - * @returns {Vec3} - */ - function getTargetAvatarPosition(): Vec3; - /** - * @returns {AvatarData} - */ - function getTargetAvatar(): AvatarData; - /** - * Get the position of the avatar's left hand as positioned by a hand controller (e.g., Oculus Touch or Vive). - * Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints -for hand animation.) - * @returns {Vec3} - */ - function getLeftHandPosition(): Vec3; - /** - * Get the position of the avatar's right hand as positioned by a hand controller (e.g., Oculus Touch or Vive). - * Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints -for hand animation.) - * @returns {Vec3} - */ - function getRightHandPosition(): Vec3; - /** - * @returns {Vec3} - */ - function getLeftHandTipPosition(): Vec3; - /** - * @returns {Vec3} - */ - function getRightHandTipPosition(): Vec3; - /** - * Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a - * hand controller (e.g., Oculus Touch or Vive). -Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints -for hand animation.) If you are using the Leap Motion, the return value's valid property will be -false and any pose values returned will not be meaningful. - * @returns {Pose} - */ - function getLeftHandPose(): Pose; - /** - * Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a - * hand controller (e.g., Oculus Touch or Vive). -Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints -for hand animation.) If you are using the Leap Motion, the return value's valid property will be -false and any pose values returned will not be meaningful. - * @returns {Pose} - */ - function getRightHandPose(): Pose; - /** - * @returns {Pose} - */ - function getLeftHandTipPose(): Pose; - /** - * @returns {Pose} - */ - function getRightHandTipPose(): Pose; - /** - * @param position {Vec3} - * @param jointIndex {number} [jointIndex=-1] - * @returns {Vec3} - */ - function worldToJointPoint(position: Vec3, jointIndex: number): Vec3; - /** - * @param direction {Vec3} - * @param jointIndex {number} [jointIndex=-1] - * @returns {Vec3} - */ - function worldToJointDirection(direction: Vec3, jointIndex: number): Vec3; - /** - * @param rotation {Quat} - * @param jointIndex {number} [jointIndex=-1] - * @returns {Quat} - */ - function worldToJointRotation(rotation: Quat, jointIndex: number): Quat; - /** - * @param position {vec3} - * @param jointIndex {number} [jointIndex=-1] - * @returns {Vec3} - */ - function jointToWorldPoint(position: vec3, jointIndex: number): Vec3; - /** - * @param direction {Vec3} - * @param jointIndex {number} [jointIndex=-1] - * @returns {Vec3} - */ - function jointToWorldDirection(direction: Vec3, jointIndex: number): Vec3; - /** - * @param rotation {Quat} - * @param jointIndex {number} [jointIndex=-1] - * @returns {Quat} - */ - function jointToWorldRotation(rotation: Quat, jointIndex: number): Quat; - /** - * @param index {number} - * @param position {Vec3} - * @param orientation {Quat} - * @returns {boolean} - */ - function pinJoint(index: number, position: Vec3, orientation: Quat): boolean; - /** - * @param index {number} - * @returns {boolean} - */ - function clearPinOnJoint(index: number): boolean; - /** - * @returns {number} - */ - function getIKErrorOnLastSolve(): number; - /** - * @param fullAvatarURL {string} - * @param modelName {string} [modelName=""] - */ - function useFullAvatarURL(fullAvatarURL: string, modelName: string): void; - /** - * Get the complete URL for the current avatar. - * @returns {string} - */ - function getFullAvatarURLFromPreferences(): string; - /** - * Get the full avatar model name for the current avatar. - * @returns {string} - */ - function getFullAvatarModelName(): string; - /** - * @returns {boolean} - */ - function isFlying(): boolean; - /** - * @returns {boolean} - */ - function isInAir(): boolean; - /** - * @param enabled {boolean} - */ - function setFlyingEnabled(enabled: boolean): void; - /** - * @returns {boolean} - */ - function getFlyingEnabled(): boolean; - /** - * @returns {number} - */ - function getAvatarScale(): number; - /** - * @param scale {number} - */ - function setAvatarScale(scale: number): void; - /** - * @param enabled {boolean} - */ - function setCollisionsEnabled(enabled: boolean): void; - /** - * @returns {boolean} - */ - function getCollisionsEnabled(): boolean; - /** - * @param enabled {boolean} - */ - function setCharacterControllerEnabled(enabled: boolean): void; - /** - * @returns {boolean} - */ - function getCharacterControllerEnabled(): boolean; - /** - * @param direction {Vec3} - * @returns {boolean} - */ - function isUp(direction: Vec3): boolean; - /** - * @param direction {Vec3} - * @returns {boolean} - */ - function isDown(direction: Vec3): boolean; - /** - * Increase the avatar's scale by five percent, up to a minimum scale of 1000. - */ - function increaseSize(): void; - /** - * Decrease the avatar's scale by five percent, down to a minimum scale of 0.25. - */ - function decreaseSize(): void; - /** - * Reset the avatar's scale back to the default scale of 1.0. - */ - function resetSize(): void; - function animGraphLoaded(): void; - /** - * @param gravity {number} - */ - function setGravity(gravity: number): void; - /** - * @returns {number} - */ - function getGravity(): number; - /** - * Move the avatar to a new position and/or orientation in the domain. - * @param position {Vec3} The new position for the avatar, in world coordinates. - * @param hasOrientation {boolean} [hasOrientation=false] Set to true to set the orientation of the avatar. - * @param orientation {Quat} [orientation=Quat.IDENTITY] The new orientation for the avatar. - * @param shouldFaceLocation {boolean} [shouldFaceLocation=false] Set to true to position the avatar a short distance away from - * the new position and orientate the avatar to face the position. - */ - function goToLocation(position: Vec3, hasOrientation: boolean, orientation: Quat, shouldFaceLocation: boolean): void; - /** - * @param properties {object} - */ - function goToLocation(properties: object): void; - /** - * @param position {Vec3} - */ - function goToLocationAndEnableCollisions(position: Vec3): void; - /** - * @param position {Vec3} - * @returns {boolean} - */ - function safeLanding(position: Vec3): boolean; - /** - * @param domainSettingsObject {objecct} - */ - function restrictScaleFromDomainSettings(domainSettingsObject: objecct): void; - function clearScaleRestriction(): void; - /** - * @param thrust {Vec3} - */ - function addThrust(thrust: Vec3): void; - /** - * @returns {vec3} - */ - function getThrust(): vec3; - /** - * @param thrust {Vec3} - */ - function setThrust(thrust: Vec3): void; - function updateMotionBehaviorFromMenu(): void; - /** - * @param enabled {boolean} - */ - function setEnableDebugDrawDefaultPose(enabled: boolean): void; - /** - * @param enabled {boolean} - */ - function setEnableDebugDrawAnimPose(enabled: boolean): void; - /** - * @param enabled {boolean} - */ - function setEnableDebugDrawPosition(enabled: boolean): void; - /** - * @param enabled {boolean} - */ - function setEnableDebugDrawHandControllers(enabled: boolean): void; - /** - * @param enabled {boolean} - */ - function setEnableDebugDrawSensorToWorldMatrix(enabled: boolean): void; - /** - * @param enabled {boolean} - */ - function setEnableDebugDrawIKTargets(enabled: boolean): void; - /** - * @param enabled {boolean} - */ - function setEnableDebugDrawIKConstraints(enabled: boolean): void; - /** - * @param enabled {boolean} - */ - function setEnableDebugDrawIKChains(enabled: boolean): void; - /** - * @param enabled {boolean} - */ - function setEnableDebugDrawDetailedCollision(enabled: boolean): void; - /** - * Get whether or not your avatar mesh is visible. - * @returns {boolean} - */ - function getEnableMeshVisible(): boolean; - /** - * Set whether or not your avatar mesh is visible. - * @param visible {boolean} true to set your avatar mesh visible; false to set it invisible. - */ - function setEnableMeshVisible(visible: boolean): void; - /** - * @param enabled {boolean} - */ - function setEnableInverseKinematics(enabled: boolean): void; - /** - * @returns {string} - */ - function getAnimGraphOverrideUrl(): string; - /** - * @param url {string} - */ - function setAnimGraphOverrideUrl(url: string): void; - /** - * @returns {string} - */ - function getAnimGraphUrl(): string; - /** - * @param url {string} - */ - function setAnimGraphUrl(url: string): void; - /** - * @returns {Vec3} - */ - function getPositionForAudio(): Vec3; - /** - * @returns {Quat} - */ - function getOrientationForAudio(): Quat; - /** - * @param scale {number} - */ - function setModelScale(scale: number): void; - /** - * @returns {Signal} - */ - function audioListenerModeChanged(): Signal; - /** - * @returns {Signal} - */ - function transformChanged(): Signal; - /** - * @param url {string} - * @returns {Signal} - */ - function newCollisionSoundURL(url: string): Signal; - /** - * Triggered when the avatar collides with an entity. - * @param collision {Collision} - * @returns {Signal} - */ - function collisionWithEntity(collision: Collision): Signal; - /** - * @param energy {number} - * @returns {Signal} - */ - function energyChanged(energy: number): Signal; - /** - * @returns {Signal} - */ - function positionGoneTo(): Signal; - /** - * @returns {Signal} - */ - function onLoadComplete(): Signal; - /** - * @returns {Signal} - */ - function wentAway(): Signal; - /** - * @returns {Signal} - */ - function wentActive(): Signal; - /** - * @returns {Signal} - */ - function skeletonChanged(): Signal; - /** - * @param hand {string} - * @returns {Signal} - */ - function dominantHandChanged(hand: string): Signal; - /** - * @param scale {number} - * @returns {Signal} - */ - function sensorToWorldScaleChanged(scale: number): Signal; - /** - * @returns {Signal} - */ - function attachmentsChanged(): Signal; - /** - * @returns {Signal} - */ - function scaleChanged(): Signal; - /** - * Returns the minimum scale allowed for this avatar in the current domain. - * This value can change as the user changes avatars or when changing domains. - * @returns {number} - */ - function getDomainMinScale(): number; - /** - * Returns the maximum scale allowed for this avatar in the current domain. - * This value can change as the user changes avatars or when changing domains. - * @returns {number} - */ - function getDomainMaxScale(): number; - /** - * Provides read only access to the current eye height of the avatar. - * This height is only an estimate and might be incorrect for avatars that are missing standard joints. - * @returns {number} - */ - function getEyeHeight(): number; - /** - * Provides read only access to the current height of the avatar. - * This height is only an estimate and might be incorrect for avatars that are missing standard joints. - * @returns {number} - */ - function getHeight(): number; - /** - * @param state {string} - */ - function setHandState(state: string): void; - /** - * @returns {string} - */ - function getHandState(): string; - /** - * @param data {Array.} - */ - function setRawJointData(data: Array.): void; - /** - * Set a specific joint's rotation and position relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param index {number} The index of the joint. - * @param rotation {Quat} The rotation of the joint relative to its parent. - * @param translation {Vec3} The translation of the joint relative to its parent. - */ - function setJointData(index: number, rotation: Quat, translation: Vec3): void; - /** - * Set a specific joint's rotation relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param index {number} The index of the joint. - * @param rotation {Quat} The rotation of the joint relative to its parent. - */ - function setJointRotation(index: number, rotation: Quat): void; - /** - * Set a specific joint's translation relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param index {number} The index of the joint. - * @param translation {Vec3} The translation of the joint relative to its parent. - */ - function setJointTranslation(index: number, translation: Vec3): void; - /** - * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default - * animation system including inverse kinematics for that joint. -Note: This is slightly faster than the function variation that specifies the joint name. - * @param index {number} The index of the joint. - */ - function clearJointData(index: number): void; - /** - * @param index {number} - * @returns {boolean} - */ - function isJointDataValid(index: number): boolean; - /** - * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see - * Avatar Standards. - * @param index {number} The index of the joint. - * @returns {Quat} - */ - function getJointRotation(index: number): Quat; - /** - * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see - * Avatar Standards. - * @param index {number} The index of the joint. - * @returns {Vec3} - */ - function getJointTranslation(index: number): Vec3; - /** - * Set a specific joint's rotation and position relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param name {string} The name of the joint. - * @param rotation {Quat} The rotation of the joint relative to its parent. - * @param translation {Vec3} The translation of the joint relative to its parent. - */ - function setJointData(name: string, rotation: Quat, translation: Vec3): void; - /** - * Set a specific joint's rotation relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param name {string} The name of the joint. - * @param rotation {Quat} The rotation of the joint relative to its parent. - */ - function setJointRotation(name: string, rotation: Quat): void; - /** - * Set a specific joint's translation relative to its parent. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param name {string} The name of the joint. - * @param translation {Vec3} The translation of the joint relative to its parent. - */ - function setJointTranslation(name: string, translation: Vec3): void; - /** - * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default - * animation system including inverse kinematics for that joint. -Note: This is slightly slower than the function variation that specifies the joint index. - * @param name {string} The name of the joint. - */ - function clearJointData(name: string): void; - /** - * @param name {string} - * @returns {boolean} - */ - function isJointDataValid(name: string): boolean; - /** - * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see - * Avatar Standards. - * @param name {string} The name of the joint. - * @returns {Quat} - */ - function getJointRotation(name: string): Quat; - /** - * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see - * Avatar Standards. - * @param name {number} The name of the joint. - * @returns {Vec3} - */ - function getJointTranslation(name: number): Vec3; - /** - * Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. - * @returns {Array.} - */ - function getJointRotations(): Array.; - /** - * @returns {Array.} - */ - function getJointTranslations(): Array.; - /** - * Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. - * Setting joint data completely overrides/replaces all motion from the default animation system including inverse -kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, -the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate -joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set -the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. - * @param jointRotations {Array.} The rotations for all joints in the avatar. The values are in the same order as the - * array returned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}. - */ - function setJointRotations(jointRotations: Array.): void; - /** - * @param translations {Array.} - */ - function setJointTranslations(translations: Array.): void; - /** - * Clear all joint translations and rotations that have been set by script. This restores all motion from the default - * animation system including inverse kinematics for all joints. - */ - function clearJointsData(): void; - /** - * Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by - * MyAvatar.getJointNames or Avatar.getJointNames. - * @param name {string} The name of the joint. - * @returns {number} - */ - function getJointIndex(name: string): number; - /** - * Get the names of all the joints in the current avatar. - * @returns {Array.} - */ - function getJointNames(): Array.; - /** - * @param name {string} - * @param value {number} - */ - function setBlendshape(name: string, value: number): void; - /** - * @returns {object} - */ - function getAttachmentsVariant(): object; - /** - * @param variant {object} - */ - function setAttachmentsVariant(variant: object): void; - /** - * @param entityID {Uuid} - * @param entityData {string} - */ - function updateAvatarEntity(entityID: Uuid, entityData: string): void; - /** - * @param entityID {Uuid} - */ - function clearAvatarEntity(entityID: Uuid): void; - /** - * @param connected {boolean} - */ - function setForceFaceTrackerConnected(connected: boolean): void; - /** - * Get information about all models currently attached to your avatar. - * @returns {Array.} - */ - function getAttachmentData(): Array.; - /** - * Set all models currently attached to your avatar. For example, if you retrieve attachment data using - * MyAvatar.getAttachmentData or Avatar.getAttachmentData, make changes to it, and then want to update your avatar's attachments per the -changed data. You can also remove all attachments by using setting attachmentData to null. - * @param attachmentData {Array.} The attachment data defining the models to have attached to your avatar. Use - * null to remove all attachments. - */ - function setAttachmentData(attachmentData: Array.): void; - /** - * Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to - * stand on. -Note: Attached models are models only; they are not entities and can not be manipulated using the Entities API. -Nor can you use this function to attach an entity (such as a sphere or a box) to your avatar. - * @param modelURL {string} The URL of the model to attach. Models can be .FBX or .OBJ format. - * @param jointName {string} [jointName=""] The name of the avatar joint (see {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}) to attach the model - * to. - * @param translation {Vec3} [translation=Vec3.ZERO] The offset to apply to the model relative to the joint position. - * @param rotation {Quat} [rotation=Quat.IDENTITY] The rotation to apply to the model relative to the joint orientation. - * @param scale {number} [scale=1.0] The scale to apply to the model. - * @param isSoft {boolean} [isSoft=false] If the model has a skeleton, set this to true so that the bones of the - * attached model's skeleton are be rotated to fit the avatar's current pose. isSoft is used, for example, - to have clothing that moves with the avatar.
- If true, the translation, rotation, and scale parameters are - ignored. - * @param allowDuplicates {boolean} [allowDuplicates=false] - * @param useSaved {boolean} [useSaved=true] - */ - function attach(modelURL: string, jointName: string, translation: Vec3, rotation: Quat, scale: number, isSoft: boolean, allowDuplicates: boolean, useSaved: boolean): void; - /** - * Detach the most recently attached instance of a particular model from either a specific joint or any joint. - * @param modelURL {string} The URL of the model to detach. - * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the most - * recently attached model is removed from which ever joint it was attached to. - */ - function detachOne(modelURL: string, jointName: string): void; - /** - * Detach all instances of a particular model from either a specific joint or all joints. - * @param modelURL {string} The URL of the model to detach. - * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the model is - * detached from all joints. - */ - function detachAll(modelURL: string, jointName: string): void; - /** - * @returns {object} - */ - function getAvatarEntityData(): object; - /** - * @param avatarEntityData {object} - */ - function setAvatarEntityData(avatarEntityData: object): void; - /** - * @returns {Mat4} - */ - function getSensorToWorldMatrix(): Mat4; - /** - * @returns {number} - */ - function getSensorToWorldScale(): number; - /** - * @returns {Mat4} - */ - function getControllerLeftHandMatrix(): Mat4; - /** - * @returns {Mat4} - */ - function getControllerRightHandMatrix(): Mat4; - /** - * @param rateName {string} [rateName=""] - * @returns {number} - */ - function getDataRate(rateName: string): number; - /** - * @param rateName {string} [rateName=""] - * @returns {number} - */ - function getUpdateRate(rateName: string): number; - /** - * @returns {Signal} - */ - function displayNameChanged(): Signal; - /** - * @returns {Signal} - */ - function sessionDisplayNameChanged(): Signal; - /** - * @returns {Signal} - */ - function skeletonModelURLChanged(): Signal; - /** - * @param enabled {boolean} - * @returns {Signal} - */ - function lookAtSnappingChanged(enabled: boolean): Signal; - /** - * @returns {Signal} - */ - function sessionUUIDChanged(): Signal; - /** - * @param sendAll {boolean} [sendAll=false] - */ - function sendAvatarDataPacket(sendAll: boolean): void; - function sendIdentityPacket(): void; - function setJointMappingsFromNetworkReply(): void; - /** - * @param sessionUUID {Uuid} - */ - function setSessionUUID(sessionUUID: Uuid): void; - /** - * @param index {number} - * @returns {Quat} - */ - function getAbsoluteJointRotationInObjectFrame(index: number): Quat; - /** - * @param index {number} - * @returns {Vec3} - */ - function getAbsoluteJointTranslationInObjectFrame(index: number): Vec3; - /** - * @param index {number} - * @param rotation {Quat} - * @returns {boolean} - */ - function setAbsoluteJointRotationInObjectFrame(index: number, rotation: Quat): boolean; - /** - * @param index {number} - * @param translation {Vec3} - * @returns {boolean} - */ - function setAbsoluteJointTranslationInObjectFrame(index: number, translation: Vec3): boolean; - /** - * @returns {number} - */ - function getTargetScale(): number; - function resetLastSent(): void; - /** - * @param index {number} - * @returns {Quat} - */ - function getDefaultJointRotation(index: number): Quat; - /** - * @param index {number} - * @returns {Vec3} - */ - function getDefaultJointTranslation(index: number): Vec3; - /** - * Provides read only access to the default joint rotations in avatar coordinates. - * The default pose of the avatar is defined by the position and orientation of all bones -in the avatar's model file. Typically this is a T-pose. - * @param index {number} index number - * @returns {Quat} - */ - function getAbsoluteDefaultJointRotationInObjectFrame(index: number): Quat; - /** - * Provides read only access to the default joint translations in avatar coordinates. - * The default pose of the avatar is defined by the position and orientation of all bones -in the avatar's model file. Typically this is a T-pose. - * @param index {number} index number - * @returns {Vec3} - */ - function getAbsoluteDefaultJointTranslationInObjectFrame(index: number): Vec3; - /** - * Set the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, - * with an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly. - * @param offset {Vec3} The skeleton offset to set. - */ - function setSkeletonOffset(offset: Vec3): void; - /** - * Get the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, - * with an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly. - * @returns {Vec3} - */ - function getSkeletonOffset(): Vec3; - /** - * Get the position of a joint in the current avatar. - * @param index {number} The index of the joint. - * @returns {Vec3} - */ - function getJointPosition(index: number): Vec3; - /** - * Get the position of a joint in the current avatar. - * @param name {string} The name of the joint. - * @returns {Vec3} - */ - function getJointPosition(name: string): Vec3; - /** - * Get the position of the current avatar's neck in world coordinates. - * @returns {Vec3} - */ - function getNeckPosition(): Vec3; - /** - * @returns {Vec3} - */ - function getAcceleration(): Vec3; - /** - * @returns {Uuid} - */ - function getParentID(): Uuid; - /** - * @param parentID {Uuid} - */ - function setParentID(parentID: Uuid): void; - /** - * @returns {number} - */ - function getParentJointIndex(): number; - /** - * @param parentJointIndex {number} - */ - function setParentJointIndex(parentJointIndex: number): void; - /** - * Returns an array of joints, where each joint is an object containing name, index, and parentIndex fields. - * @returns {Array.} - */ - function getSkeleton(): Array.; - /** - * @param rateName {string} [rateName=""] - * @returns {number} - */ - function getSimulationRate(rateName: string): number; - /** - * Get the position of the left palm in world coordinates. - * @returns {Vec3} - */ - function getLeftPalmPosition(): Vec3; - /** - * Get the rotation of the left palm in world coordinates. - * @returns {Vec3} - */ - function getLeftPalmRotation(): Vec3; - /** - * Get the position of the right palm in world coordinates. - * @returns {Vec3} - */ - function getRightPalmPosition(): Vec3; - /** - * Get the rotation of the right palm in world coordinates. - * @returns {Vec3} - */ - function getRightPalmRotation(): Vec3; - /** - * @returns {Signal} - */ - function rigReady(): Signal; - /** - * @returns {Signal} - */ - function rigReset(): Signal; - /** - * A synonym for position for use by QML. - */ - let qmlPosition: Vec3; - /** - * If true then your avatar is rendered for you in Interface, - * otherwise it is not rendered for you (but it is still rendered for other users). - */ - let shouldRenderLocally: boolean; - /** - * The target velocity of your avatar to be achieved by a scripted motor. - */ - let motorVelocity: Vec3; - /** - * The timescale for the scripted motor to achieve the target - * motorVelocity avatar velocity. Smaller values result in higher acceleration. - */ - let motorTimescale: number; - /** - * Reference frame of the motorVelocity. Must be one of the - * following: "camera", "avatar", and "world". - */ - let motorReferenceFrame: string; - /** - * The Type of scripted motor behavior: "simple" to use the - * motorTimescale time scale; "dynamic" to use character controller timescales. - */ - let motorMode: string; - /** - * The sound that's played when the avatar experiences a - * collision. It can be a mono or stereo 16-bit WAV file running at either 24kHz or 48kHz. The latter is down-sampled - by the audio mixer, so all audio effectively plays back at a 24khz. 48kHz RAW files are also supported. - */ - let collisionSoundURL: string; - /** - * Specifies the listening position when hearing spatialized audio. Must be one - * of the following property values: - audioListenerModeHead - audioListenerModeCamera - audioListenerModeCustom - */ - let audioListenerMode: number; - /** - * The audio listening position is at the avatar's head. Read-only. - */ - let audioListenerModeHead: number; - /** - * The audio listening position is at the camera. Read-only. - */ - let audioListenerModeCamera: number; - /** - * The audio listening position is at a the position specified by set by the - * customListenPosition and customListenOrientation property values. Read-only. - */ - let audioListenerModeCustom: number; - /** - * The listening position used when the audioListenerMode - * property value is audioListenerModeCustom. - */ - let customListenPosition: Vec3; - /** - * The listening orientation used when the - * audioListenerMode property value is audioListenerModeCustom. - */ - let customListenOrientation: Quat; - /** - * The position of the left hand in avatar coordinates if it's being positioned by - * controllers, otherwise Vec3. Read-only. - */ - let leftHandPosition: Vec3; - /** - * The position of the right hand in avatar coordinates if it's being positioned by - * controllers, otherwise Vec3. Read-only. - */ - let rightHandPosition: Vec3; - /** - * The position 30cm offset from the left hand in avatar coordinates if it's being - * positioned by controllers, otherwise Vec3. Read-only. - */ - let leftHandTipPosition: Vec3; - /** - * The position 30cm offset from the right hand in avatar coordinates if it's being - * positioned by controllers, otherwise Vec3. Read-only. - */ - let rightHandTipPosition: Vec3; - /** - * The pose of the left hand as determined by the hand controllers. Read-only. - */ - let leftHandPose: Pose; - /** - * The pose right hand position as determined by the hand controllers. Read-only. - */ - let rightHandPose: Pose; - /** - * The pose of the left hand as determined by the hand controllers, with the position - * by 30cm. Read-only. - */ - let leftHandTipPose: Pose; - /** - * The pose of the right hand as determined by the hand controllers, with the position - * by 30cm. Read-only. - */ - let rightHandTipPose: Pose; - /** - * If true then the avatar is re-centered to be under the - * head's position. In room-scale VR, this behavior is what causes your avatar to follow your HMD as you walk around - the room. Setting the value false is useful if you want to pin the avatar to a fixed position. - */ - let hmdLeanRecenterEnabled: boolean; - /** - * Set to true to enable collisions for the avatar, false - * to disable collisions. May return true even though the value was set false because the - zone may disallow collisionless avatars. - */ - let collisionsEnabled: boolean; - /** - * Synonym of collisionsEnabled. - * Deprecated: Use collisionsEnabled instead. - */ - let characterControllerEnabled: boolean; - /** - * Returns the value of the Interface setting, Settings > Advanced - * Movement for Hand Controller. Note: Setting the value has no effect unless Interface is restarted. - */ - let useAdvancedMovementControls: boolean; - let yawSpeed: number; - let pitchSpeed: number; - /** - * If true, the roll angle of your HMD turns your avatar - * while flying. - */ - let hmdRollControlEnabled: boolean; - /** - * The amount of HMD roll, in degrees, required before your avatar turns if - * hmdRollControlEnabled is enabled. - */ - let hmdRollControlDeadZone: number; - /** - * If hmdRollControlEnabled is true, this value determines the maximum turn rate of - * your avatar when rolling your HMD in degrees per second. - */ - let hmdRollControlRate: number; - /** - * The height of the user in sensor space. - */ - let userHeight: number; - /** - * The estimated height of the user's eyes in sensor space. Read-only. - */ - let userEyeHeight: number; - /** - * UUID representing "my avatar". Only use for local-only entities and overlays in situations - * where MyAvatar.sessionUUID is not available (e.g., if not connected to a domain). Note: Likely to be deprecated. - Read-only. - */ - const SELF_ID: Uuid; - let walkSpeed: number; - /** - * Can be used to apply a translation offset between the avatar's position and the - * registration point of the 3D model. - */ - let skeletonOffset: Vec3; - let position: Vec3; - let scale: number; - /** - * Read-only. - */ - let density: number; - let handPosition: Vec3; - /** - * The rotation left or right about an axis running from the head to the feet of the avatar. - * Yaw is sometimes called "heading". - */ - let bodyYaw: number; - /** - * The rotation about an axis running from shoulder to shoulder of the avatar. Pitch is - * sometimes called "elevation". - */ - let bodyPitch: number; - /** - * The rotation about an axis running from the chest to the back of the avatar. Roll is - * sometimes called "bank". - */ - let bodyRoll: number; - let orientation: Quat; - /** - * The orientation of the avatar's head. - */ - let headOrientation: Quat; - /** - * The rotation about an axis running from ear to ear of the avatar's head. Pitch is - * sometimes called "elevation". - */ - let headPitch: number; - /** - * The rotation left or right about an axis running from the base to the crown of the avatar's - * head. Yaw is sometimes called "heading". - */ - let headYaw: number; - /** - * The rotation about an axis running from the nose to the back of the avatar's head. Roll is - * sometimes called "bank". - */ - let headRoll: number; - let velocity: Vec3; - let angularVelocity: Vec3; - let audioLoudness: number; - let audioAverageLoudness: number; - let displayName: string; - /** - * Sanitized, defaulted version displayName that is defined by the AvatarMixer - * rather than by Interface clients. The result is unique among all avatars present at the time. - */ - let sessionDisplayName: string; - let lookAtSnappingEnabled: boolean; - let skeletonModelURL: string; - let attachmentData: Array.; - /** - * The list of joints in the current avatar model. Read-only. - */ - let jointNames: Array.; - /** - * Read-only. - */ - let sessionUUID: Uuid; - /** - * Read-only. - */ - let sensorToWorldMatrix: Mat4; - /** - * Read-only. - */ - let controllerLeftHandMatrix: Mat4; - /** - * Read-only. - */ - let controllerRightHandMatrix: Mat4; - /** - * Read-only. - */ - let sensorToWorldScale: number; + function resetSensorsAndBody(): void; + /** + * Moves and orients the avatar, such that it is directly underneath the HMD, with toes pointed forward. + */ + function centerBody(): void; + /** + * The internal inverse-kinematics system maintains a record of which joints are "locked". Sometimes it is useful to forget this history, to prevent + * contorted joints. + */ + function clearIKJointLimitHistory(): void; + /** + * @param newOrientationVar {object} + */ + function setOrientationVar(newOrientationVar: object): void; + /** + * @returns {object} + */ + function getOrientationVar(): object; + /** + * Get the position in world coordinates of the point directly between your avatar's eyes assuming your avatar was in its + * default pose. This is a reference position; it does not change as your avatar's head moves relative to the avatar position. + * @returns {Vec3} + */ + function getDefaultEyePosition(): Vec3; + /** + * The avatar animation system includes a set of default animations along with rules for how those animations are blended + * together with procedural data (such as look at vectors, hand sensors etc.). overrideAnimation() is used to completely override all motion from the default animation system (including inverse kinematics for hand and head controllers) and play a set of specified animations. To end these animations and restore the default animations, use MyAvatar.restoreAnimation. Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target rig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, the avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see Avatar Standards. + * @param url {string} The URL to the animation file. Animation files need to be .FBX format, but only need to contain the + * avatar skeleton and animation data. + * @param fps {number} The frames per second (FPS) rate for the animation playback. 30 FPS is normal speed. + * @param loop {boolean} Set to true if the animation should loop. + * @param firstFrame {number} The frame the animation should start at. + * @param lastFrame {number} The frame the animation should end at. + */ + function overrideAnimation(url: string, fps: number, loop: boolean, firstFrame: number, lastFrame: number): void; + /** + * The avatar animation system includes a set of default animations along with rules for how those animations are blended together with + * procedural data (such as look at vectors, hand sensors etc.). Playing your own custom animations will override the default animations. restoreAnimation() is used to restore all motion from the default animation system including inverse kinematics for hand and head controllers. If you aren't currently playing an override animation, this function will have no effect. + */ + function restoreAnimation(): void; + /** + * Each avatar has an avatar-animation.json file that defines which animations are used and how they are blended together with procedural data + * (such as look at vectors, hand sensors etc.). Each animation specified in the avatar-animation.json file is known as an animation role. Animation roles map to easily understandable actions that the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd." getAnimationRoles() is used get the list of animation roles defined in the avatar-animation.json. + * @returns {Array.} + */ + function getAnimationRoles(): Array.; + /** + * Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions + * that the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd". To get the full list of roles, use getAnimationRoles(). For each role, the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended together with procedural data (such as look at vectors, hand sensors etc.). overrideRoleAnimation() is used to change the animation clip (.FBX) associated with a specified animation role. To end the animations and restore the default animations, use MyAvatar.restoreRoleAnimation. Note: Hand roles only affect the hand. Other 'main' roles, like 'idleStand', 'idleTalk', 'takeoffStand' are full body. Note: When using pre-built animation data, it's critical that the joint orientation of the source animation and target rig are equivalent, since the animation data applies absolute values onto the joints. If the orientations are different, the avatar will move in unpredictable ways. For more information about avatar joint orientation standards, see Avatar Standards. + * @param role {string} The animation role to override + * @param url {string} The URL to the animation file. Animation files need to be .FBX format, but only need to contain the avatar skeleton and animation data. + * @param fps {number} The frames per second (FPS) rate for the animation playback. 30 FPS is normal speed. + * @param loop {boolean} Set to true if the animation should loop + * @param firstFrame {number} The frame the animation should start at + * @param lastFrame {number} The frame the animation should end at + */ + function overrideRoleAnimation(role: string, url: string, fps: number, loop: boolean, firstFrame: number, lastFrame: number): void; + /** + * Each avatar has an avatar-animation.json file that defines a set of animation roles. Animation roles map to easily understandable actions that + * the avatar can perform, such as "idleStand", "idleTalk", or "walkFwd". To get the full list of roles, use getAnimationRoles(). For each role, the avatar-animation.json defines when the animation is used, the animation clip (.FBX) used, and how animations are blended together with procedural data (such as look at vectors, hand sensors etc.). You can change the animation clip (.FBX) associated with a specified animation role using overrideRoleAnimation(). restoreRoleAnimation() is used to restore a specified animation role's default animation clip. If you have not specified an override animation for the specified role, this function will have no effect. + * @param role {string} The animation role clip to restore. + */ + function restoreRoleAnimation(role: string): void; + /** + * @param handler {number} + */ + function removeAnimationStateHandler(handler: number): void; + /** + * @returns {boolean} + */ + function getSnapTurn(): boolean; + /** + * @param on {boolean} + */ + function setSnapTurn(on: boolean): void; + /** + * @param hand {string} + */ + function setDominantHand(hand: string): void; + /** + * @returns {string} + */ + function getDominantHand(): string; + /** + * @param enabled {boolean} + */ + function setCenterOfGravityModelEnabled(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getCenterOfGravityModelEnabled(): boolean; + /** + * @param enabled {boolean} + */ + function setHMDLeanRecenterEnabled(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getHMDLeanRecenterEnabled(): boolean; + /** + * Request to enable hand touch effect globally + */ + function requestEnableHandTouch(): void; + /** + * Request to disable hand touch effect globally + */ + function requestDisableHandTouch(): void; + /** + * Disables hand touch effect on a specific entity + * @param entityID {Uuid} ID of the entity that will disable hand touch effect + */ + function disableHandTouchForID(entityID: Uuid): void; + /** + * Enables hand touch effect on a specific entity + * @param entityID {Uuid} ID of the entity that will enable hand touch effect + */ + function enableHandTouchForID(entityID: Uuid): void; + /** + * @param key {DriveKeys} + * @returns {number} + */ + function getRawDriveKey(key: DriveKeys): number; + /** + * @param key {DriveKeys} + */ + function disableDriveKey(key: DriveKeys): void; + /** + * @param key {DriveKeys} + */ + function enableDriveKey(key: DriveKeys): void; + /** + * @param key {DriveKeys} + * @returns {boolean} + */ + function isDriveKeyDisabled(key: DriveKeys): boolean; + /** + * Recenter the avatar in the vertical direction, if MyAvatar is + * false. + */ + function triggerVerticalRecenter(): void; + /** + * Recenter the avatar's rotation, if MyAvatar is false. + */ + function triggerRotationRecenter(): void; + /** + * The isRecenteringHorizontally function returns true if MyAvatar + * is translating the root of the Avatar to keep the center of gravity under the head. isActive(Horizontal) is returned. + */ + function isRecenteringHorizontally(): void; + /** + * Get the current position of the avatar's "Head" joint. + * @returns {Vec3} + */ + function getHeadPosition(): Vec3; + /** + * @returns {number} + */ + function getHeadFinalYaw(): number; + /** + * @returns {number} + */ + function getHeadFinalRoll(): number; + /** + * @returns {number} + */ + function getHeadFinalPitch(): number; + /** + * @returns {number} + */ + function getHeadDeltaPitch(): number; + /** + * Get the current position of the point directly between the avatar's eyes. + * @returns {Vec3} + */ + function getEyePosition(): Vec3; + /** + * @returns {Vec3} + */ + function getTargetAvatarPosition(): Vec3; + /** + * @returns {AvatarData} + */ + function getTargetAvatar(): AvatarData; + /** + * Get the position of the avatar's left hand as positioned by a hand controller (e.g., Oculus Touch or Vive). + * Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.) + * @returns {Vec3} + */ + function getLeftHandPosition(): Vec3; + /** + * Get the position of the avatar's right hand as positioned by a hand controller (e.g., Oculus Touch or Vive). + * Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.) + * @returns {Vec3} + */ + function getRightHandPosition(): Vec3; + /** + * @returns {Vec3} + */ + function getLeftHandTipPosition(): Vec3; + /** + * @returns {Vec3} + */ + function getRightHandTipPosition(): Vec3; + /** + * Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a + * hand controller (e.g., Oculus Touch or Vive). Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.) If you are using the Leap Motion, the return value's valid property will be false and any pose values returned will not be meaningful. + * @returns {Pose} + */ + function getLeftHandPose(): Pose; + /** + * Get the pose (position, rotation, velocity, and angular velocity) of the avatar's left hand as positioned by a + * hand controller (e.g., Oculus Touch or Vive). Note: The Leap Motion isn't part of the hand controller input system. (Instead, it manipulates the avatar's joints for hand animation.) If you are using the Leap Motion, the return value's valid property will be false and any pose values returned will not be meaningful. + * @returns {Pose} + */ + function getRightHandPose(): Pose; + /** + * @returns {Pose} + */ + function getLeftHandTipPose(): Pose; + /** + * @returns {Pose} + */ + function getRightHandTipPose(): Pose; + /** + * @param position {Vec3} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Vec3} + */ + function worldToJointPoint(position: Vec3, jointIndex: number): Vec3; + /** + * @param direction {Vec3} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Vec3} + */ + function worldToJointDirection(direction: Vec3, jointIndex: number): Vec3; + /** + * @param rotation {Quat} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Quat} + */ + function worldToJointRotation(rotation: Quat, jointIndex: number): Quat; + /** + * @param position {vec3} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Vec3} + */ + function jointToWorldPoint(position: vec3, jointIndex: number): Vec3; + /** + * @param direction {Vec3} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Vec3} + */ + function jointToWorldDirection(direction: Vec3, jointIndex: number): Vec3; + /** + * @param rotation {Quat} + * @param jointIndex {number} [jointIndex=-1] + * @returns {Quat} + */ + function jointToWorldRotation(rotation: Quat, jointIndex: number): Quat; + /** + * @param index {number} + * @param position {Vec3} + * @param orientation {Quat} + * @returns {boolean} + */ + function pinJoint(index: number, position: Vec3, orientation: Quat): boolean; + /** + * @param index {number} + * @returns {boolean} + */ + function clearPinOnJoint(index: number): boolean; + /** + * @returns {number} + */ + function getIKErrorOnLastSolve(): number; + /** + * @param fullAvatarURL {string} + * @param modelName {string} [modelName=""] + */ + function useFullAvatarURL(fullAvatarURL: string, modelName: string): void; + /** + * Get the complete URL for the current avatar. + * @returns {string} + */ + function getFullAvatarURLFromPreferences(): string; + /** + * Get the full avatar model name for the current avatar. + * @returns {string} + */ + function getFullAvatarModelName(): string; + /** + * Function returns list of avatar entities + * @returns {Array.} + */ + function getAvatarEntitiesVariant()(): Array.; + /** + * @returns {boolean} + */ + function isFlying(): boolean; + /** + * @returns {boolean} + */ + function isInAir(): boolean; + /** + * @param enabled {boolean} + */ + function setFlyingEnabled(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getFlyingEnabled(): boolean; + /** + * @param enabled {boolean} + */ + function setFlyingDesktopPref(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getFlyingDesktopPref(): boolean; + /** + * @param enabled {boolean} + */ + function setFlyingDesktopPref(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getFlyingDesktopPref(): boolean; + /** + * @returns {number} + */ + function getAvatarScale(): number; + /** + * @param scale {number} + */ + function setAvatarScale(scale: number): void; + /** + * @param enabled {boolean} + */ + function setCollisionsEnabled(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getCollisionsEnabled(): boolean; + /** + * @returns {object} + */ + function getCollisionCapsule(): object; + /** + * @param enabled {boolean} + */ + function setCharacterControllerEnabled(enabled: boolean): void; + /** + * @returns {boolean} + */ + function getCharacterControllerEnabled(): boolean; + /** + * @param direction {Vec3} + * @returns {boolean} + */ + function isUp(direction: Vec3): boolean; + /** + * @param direction {Vec3} + * @returns {boolean} + */ + function isDown(direction: Vec3): boolean; + /** + * Increase the avatar's scale by five percent, up to a minimum scale of 1000. + */ + function increaseSize(): void; + /** + * Decrease the avatar's scale by five percent, down to a minimum scale of 0.25. + */ + function decreaseSize(): void; + /** + * Reset the avatar's scale back to the default scale of 1.0. + */ + function resetSize(): void; + function animGraphLoaded(): void; + /** + * @param gravity {number} + */ + function setGravity(gravity: number): void; + /** + * @returns {number} + */ + function getGravity(): number; + /** + * Move the avatar to a new position and/or orientation in the domain, while taking into account Avatar leg-length. + * @param position {Vec3} The new position for the avatar, in world coordinates. + * @param hasOrientation {boolean} [hasOrientation=false] Set to true to set the orientation of the avatar. + * @param orientation {Quat} [orientation=Quat.IDENTITY] The new orientation for the avatar. + * @param shouldFaceLocation {boolean} [shouldFaceLocation=false] Set to true to position the avatar a short distance away from + * the new position and orientate the avatar to face the position. + */ + function goToFeetLocation(position: Vec3, hasOrientation: boolean, orientation: Quat, shouldFaceLocation: boolean): void; + /** + * Move the avatar to a new position and/or orientation in the domain. + * @param position {Vec3} The new position for the avatar, in world coordinates. + * @param hasOrientation {boolean} [hasOrientation=false] Set to true to set the orientation of the avatar. + * @param orientation {Quat} [orientation=Quat.IDENTITY] The new orientation for the avatar. + * @param shouldFaceLocation {boolean} [shouldFaceLocation=false] Set to true to position the avatar a short distance away from + * @param withSafeLanding {boolean} [withSafeLanding=true] Set to false MyAvatar::safeLanding will not be called (used when teleporting). + * the new position and orientate the avatar to face the position. + */ + function goToLocation(position: Vec3, hasOrientation: boolean, orientation: Quat, shouldFaceLocation: boolean, withSafeLanding: boolean): void; + /** + * @param properties {object} + */ + function goToLocation(properties: object): void; + /** + * @param position {Vec3} + */ + function goToLocationAndEnableCollisions(position: Vec3): void; + /** + * @param position {Vec3} + * @returns {boolean} + */ + function safeLanding(position: Vec3): boolean; + /** + * @param domainSettingsObject {objecct} + */ + function restrictScaleFromDomainSettings(domainSettingsObject: objecct): void; + function clearScaleRestriction(): void; + /** + * @param thrust {Vec3} + */ + function addThrust(thrust: Vec3): void; + /** + * @returns {vec3} + */ + function getThrust(): vec3; + /** + * @param thrust {Vec3} + */ + function setThrust(thrust: Vec3): void; + function updateMotionBehaviorFromMenu(): void; + /** + * @param enabled {boolean} + */ + function setToggleHips(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawBaseOfSupport(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawDefaultPose(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawAnimPose(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawPosition(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawHandControllers(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawSensorToWorldMatrix(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawIKTargets(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawIKConstraints(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawIKChains(enabled: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableDebugDrawDetailedCollision(enabled: boolean): void; + /** + * Get whether or not your avatar mesh is visible. + * @returns {boolean} + */ + function getEnableMeshVisible(): boolean; + /** + * Set whether or not your avatar mesh is visible. + * @param visible {boolean} true to set your avatar mesh visible; false to set it invisible. + */ + function setEnableMeshVisible(visible: boolean): void; + /** + * @param enabled {boolean} + */ + function setEnableInverseKinematics(enabled: boolean): void; + /** + * @returns {string} + */ + function getAnimGraphOverrideUrl(): string; + /** + * @param url {string} + */ + function setAnimGraphOverrideUrl(url: string): void; + /** + * @returns {string} + */ + function getAnimGraphUrl(): string; + /** + * @param url {string} + */ + function setAnimGraphUrl(url: string): void; + /** + * @returns {Vec3} + */ + function getPositionForAudio(): Vec3; + /** + * @returns {Quat} + */ + function getOrientationForAudio(): Quat; + /** + * @param scale {number} + */ + function setModelScale(scale: number): void; + /** + * @returns {Signal} + */ + function audioListenerModeChanged(): Signal; + /** + * @returns {Signal} + */ + function transformChanged(): Signal; + /** + * @param url {string} + * @returns {Signal} + */ + function newCollisionSoundURL(url: string): Signal; + /** + * Triggered when the avatar collides with an entity. + * @param collision {Collision} + * @returns {Signal} + */ + function collisionWithEntity(collision: Collision): Signal; + /** + * Triggered when collisions with avatar enabled or disabled + * @param enabled {boolean} + * @returns {Signal} + */ + function collisionsEnabledChanged(enabled: boolean): Signal; + /** + * Triggered when avatar's animation url changes + * @param url {url} + * @returns {Signal} + */ + function animGraphUrlChanged(url: url): Signal; + /** + * @param energy {number} + * @returns {Signal} + */ + function energyChanged(energy: number): Signal; + /** + * @returns {Signal} + */ + function positionGoneTo(): Signal; + /** + * @returns {Signal} + */ + function onLoadComplete(): Signal; + /** + * @returns {Signal} + */ + function wentAway(): Signal; + /** + * @returns {Signal} + */ + function wentActive(): Signal; + /** + * @returns {Signal} + */ + function skeletonChanged(): Signal; + /** + * @param hand {string} + * @returns {Signal} + */ + function dominantHandChanged(hand: string): Signal; + /** + * @param scale {number} + * @returns {Signal} + */ + function sensorToWorldScaleChanged(scale: number): Signal; + /** + * @returns {Signal} + */ + function attachmentsChanged(): Signal; + /** + * @returns {Signal} + */ + function scaleChanged(): Signal; + /** + * Triggered when hand touch is globally enabled or disabled + * @param shouldDisable {boolean} + * @returns {Signal} + */ + function shouldDisableHandTouchChanged(shouldDisable: boolean): Signal; + /** + * Triggered when hand touch is enabled or disabled for an specific entity + * @param entityID {Uuid} ID of the entity that will enable hand touch effect + * @param disable {boolean} + * @returns {Signal} + */ + function disableHandTouchForIDChanged(entityID: Uuid, disable: boolean): Signal; + /** + * Returns the minimum scale allowed for this avatar in the current domain. + * This value can change as the user changes avatars or when changing domains. + * @returns {number} + */ + function getDomainMinScale(): number; + /** + * Returns the maximum scale allowed for this avatar in the current domain. + * This value can change as the user changes avatars or when changing domains. + * @returns {number} + */ + function getDomainMaxScale(): number; + /** + * Provides read only access to the current eye height of the avatar. + * This height is only an estimate and might be incorrect for avatars that are missing standard joints. + * @returns {number} + */ + function getEyeHeight(): number; + /** + * Provides read only access to the current height of the avatar. + * This height is only an estimate and might be incorrect for avatars that are missing standard joints. + * @returns {number} + */ + function getHeight(): number; + /** + * @param state {string} + */ + function setHandState(state: string): void; + /** + * @returns {string} + */ + function getHandState(): string; + /** + * @param data {Array.} + */ + function setRawJointData(data: Array.): void; + /** + * Set a specific joint's rotation and position relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointData(index: number, rotation: Quat, translation: Vec3): void; + /** + * Set a specific joint's rotation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + */ + function setJointRotation(index: number, rotation: Quat): void; + /** + * Set a specific joint's translation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param index {number} The index of the joint. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointTranslation(index: number, translation: Vec3): void; + /** + * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default + * animation system including inverse kinematics for that joint. Note: This is slightly faster than the function variation that specifies the joint name. + * @param index {number} The index of the joint. + */ + function clearJointData(index: number): void; + /** + * @param index {number} + * @returns {boolean} + */ + function isJointDataValid(index: number): boolean; + /** + * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param index {number} The index of the joint. + * @returns {Quat} + */ + function getJointRotation(index: number): Quat; + /** + * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param index {number} The index of the joint. + * @returns {Vec3} + */ + function getJointTranslation(index: number): Vec3; + /** + * Set a specific joint's rotation and position relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointData(name: string, rotation: Quat, translation: Vec3): void; + /** + * Set a specific joint's rotation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param rotation {Quat} The rotation of the joint relative to its parent. + */ + function setJointRotation(name: string, rotation: Quat): void; + /** + * Set a specific joint's translation relative to its parent. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param name {string} The name of the joint. + * @param translation {Vec3} The translation of the joint relative to its parent. + */ + function setJointTranslation(name: string, translation: Vec3): void; + /** + * Clear joint translations and rotations set by script for a specific joint. This restores all motion from the default + * animation system including inverse kinematics for that joint. Note: This is slightly slower than the function variation that specifies the joint index. + * @param name {string} The name of the joint. + */ + function clearJointData(name: string): void; + /** + * @param name {string} + * @returns {boolean} + */ + function isJointDataValid(name: string): boolean; + /** + * Get the rotation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param name {string} The name of the joint. + * @returns {Quat} + */ + function getJointRotation(name: string): Quat; + /** + * Get the translation of a joint relative to its parent. For information on the joint hierarchy used, see + * Avatar Standards. + * @param name {number} The name of the joint. + * @returns {Vec3} + */ + function getJointTranslation(name: number): Vec3; + /** + * Get the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. + * @returns {Array.} + */ + function getJointRotations(): Array.; + /** + * @returns {Array.} + */ + function getJointTranslations(): Array.; + /** + * Set the rotations of all joints in the current avatar. Each joint's rotation is relative to its parent joint. + * Setting joint data completely overrides/replaces all motion from the default animation system including inverse kinematics, but just for the specified joint. So for example, if you were to procedurally manipulate the finger joints, the avatar's hand and head would still do inverse kinematics properly. However, as soon as you start to manipulate joints in the inverse kinematics chain, the inverse kinematics might not function as you expect. For example, if you set the rotation of the elbow, the hand inverse kinematics position won't end up in the right place. + * @param jointRotations {Array.} The rotations for all joints in the avatar. The values are in the same order as the + * array returned by {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}. + */ + function setJointRotations(jointRotations: Array.): void; + /** + * @param translations {Array.} + */ + function setJointTranslations(translations: Array.): void; + /** + * Clear all joint translations and rotations that have been set by script. This restores all motion from the default + * animation system including inverse kinematics for all joints. + */ + function clearJointsData(): void; + /** + * Get the joint index for a named joint. The joint index value is the position of the joint in the array returned by + * MyAvatar.getJointNames or Avatar.getJointNames. + * @param name {string} The name of the joint. + * @returns {number} + */ + function getJointIndex(name: string): number; + /** + * Get the names of all the joints in the current avatar. + * @returns {Array.} + */ + function getJointNames(): Array.; + /** + * @param name {string} + * @param value {number} + */ + function setBlendshape(name: string, value: number): void; + /** + * @returns {object} + */ + function getAttachmentsVariant(): object; + /** + * @param variant {object} + */ + function setAttachmentsVariant(variant: object): void; + /** + * @param entityID {Uuid} + * @param entityData {string} + */ + function updateAvatarEntity(entityID: Uuid, entityData: string): void; + /** + * @param entityID {Uuid} + */ + function clearAvatarEntity(entityID: Uuid): void; + /** + * @param connected {boolean} + */ + function setForceFaceTrackerConnected(connected: boolean): void; + /** + * Get information about all models currently attached to your avatar. + * @returns {Array.} + */ + function getAttachmentData(): Array.; + /** + * Set all models currently attached to your avatar. For example, if you retrieve attachment data using + * MyAvatar.getAttachmentData or Avatar.getAttachmentData, make changes to it, and then want to update your avatar's attachments per the changed data. You can also remove all attachments by using setting attachmentData to null. + * @param attachmentData {Array.} The attachment data defining the models to have attached to your avatar. Use + * null to remove all attachments. + */ + function setAttachmentData(attachmentData: Array.): void; + /** + * Attach a model to your avatar. For example, you can give your avatar a hat to wear, a guitar to hold, or a surfboard to + * stand on. Note: Attached models are models only; they are not entities and can not be manipulated using the Entities API. Nor can you use this function to attach an entity (such as a sphere or a box) to your avatar. + * @param modelURL {string} The URL of the model to attach. Models can be .FBX or .OBJ format. + * @param jointName {string} [jointName=""] The name of the avatar joint (see {@link MyAvatar.getJointNames} or {@link Avatar.getJointNames}) to attach the model + * to. + * @param translation {Vec3} [translation=Vec3.ZERO] The offset to apply to the model relative to the joint position. + * @param rotation {Quat} [rotation=Quat.IDENTITY] The rotation to apply to the model relative to the joint orientation. + * @param scale {number} [scale=1.0] The scale to apply to the model. + * @param isSoft {boolean} [isSoft=false] If the model has a skeleton, set this to true so that the bones of the + * attached model's skeleton are be rotated to fit the avatar's current pose. isSoft is used, for example, to have clothing that moves with the avatar.
If true, the translation, rotation, and scale parameters are ignored. + * @param allowDuplicates {boolean} [allowDuplicates=false] + * @param useSaved {boolean} [useSaved=true] + */ + function attach(modelURL: string, jointName: string, translation: Vec3, rotation: Quat, scale: number, isSoft: boolean, allowDuplicates: boolean, useSaved: boolean): void; + /** + * Detach the most recently attached instance of a particular model from either a specific joint or any joint. + * @param modelURL {string} The URL of the model to detach. + * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the most + * recently attached model is removed from which ever joint it was attached to. + */ + function detachOne(modelURL: string, jointName: string): void; + /** + * Detach all instances of a particular model from either a specific joint or all joints. + * @param modelURL {string} The URL of the model to detach. + * @param jointName {string} [jointName=""] The name of the joint to detach the model from. If "", then the model is + * detached from all joints. + */ + function detachAll(modelURL: string, jointName: string): void; + /** + * @returns {object} + */ + function getAvatarEntityData(): object; + /** + * @param avatarEntityData {object} + */ + function setAvatarEntityData(avatarEntityData: object): void; + /** + * @returns {Mat4} + */ + function getSensorToWorldMatrix(): Mat4; + /** + * @returns {number} + */ + function getSensorToWorldScale(): number; + /** + * @returns {Mat4} + */ + function getControllerLeftHandMatrix(): Mat4; + /** + * @returns {Mat4} + */ + function getControllerRightHandMatrix(): Mat4; + /** + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getDataRate(rateName: string): number; + /** + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getUpdateRate(rateName: string): number; + /** + * @returns {Signal} + */ + function displayNameChanged(): Signal; + /** + * @returns {Signal} + */ + function sessionDisplayNameChanged(): Signal; + /** + * @returns {Signal} + */ + function skeletonModelURLChanged(): Signal; + /** + * @param enabled {boolean} + * @returns {Signal} + */ + function lookAtSnappingChanged(enabled: boolean): Signal; + /** + * @returns {Signal} + */ + function sessionUUIDChanged(): Signal; + /** + * @param sendAll {boolean} [sendAll=false] + */ + function sendAvatarDataPacket(sendAll: boolean): void; + function sendIdentityPacket(): void; + function setJointMappingsFromNetworkReply(): void; + /** + * @param sessionUUID {Uuid} + */ + function setSessionUUID(sessionUUID: Uuid): void; + /** + * @param index {number} + * @returns {Quat} + */ + function getAbsoluteJointRotationInObjectFrame(index: number): Quat; + /** + * @param index {number} + * @returns {Vec3} + */ + function getAbsoluteJointTranslationInObjectFrame(index: number): Vec3; + /** + * @param index {number} + * @param rotation {Quat} + * @returns {boolean} + */ + function setAbsoluteJointRotationInObjectFrame(index: number, rotation: Quat): boolean; + /** + * @param index {number} + * @param translation {Vec3} + * @returns {boolean} + */ + function setAbsoluteJointTranslationInObjectFrame(index: number, translation: Vec3): boolean; + /** + * @returns {number} + */ + function getTargetScale(): number; + function resetLastSent(): void; + /** + * @param index {number} + * @returns {Quat} + */ + function getDefaultJointRotation(index: number): Quat; + /** + * @param index {number} + * @returns {Vec3} + */ + function getDefaultJointTranslation(index: number): Vec3; + /** + * Provides read only access to the default joint rotations in avatar coordinates. + * The default pose of the avatar is defined by the position and orientation of all bones in the avatar's model file. Typically this is a T-pose. + * @param index {number} index number + * @returns {Quat} + */ + function getAbsoluteDefaultJointRotationInObjectFrame(index: number): Quat; + /** + * Provides read only access to the default joint translations in avatar coordinates. + * The default pose of the avatar is defined by the position and orientation of all bones in the avatar's model file. Typically this is a T-pose. + * @param index {number} index number + * @returns {Vec3} + */ + function getAbsoluteDefaultJointTranslationInObjectFrame(index: number): Vec3; + /** + * Set the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, + * with an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly. + * @param offset {Vec3} The skeleton offset to set. + */ + function setSkeletonOffset(offset: Vec3): void; + /** + * Get the offset applied to the current avatar. The offset adjusts the position that the avatar is rendered. For example, + * with an offset of { x: 0, y: 0.1, z: 0 }, your avatar will appear to be raised off the ground slightly. + * @returns {Vec3} + */ + function getSkeletonOffset(): Vec3; + /** + * Get the position of a joint in the current avatar. + * @param index {number} The index of the joint. + * @returns {Vec3} + */ + function getJointPosition(index: number): Vec3; + /** + * Get the position of a joint in the current avatar. + * @param name {string} The name of the joint. + * @returns {Vec3} + */ + function getJointPosition(name: string): Vec3; + /** + * Get the position of the current avatar's neck in world coordinates. + * @returns {Vec3} + */ + function getNeckPosition(): Vec3; + /** + * @returns {Vec3} + */ + function getAcceleration(): Vec3; + /** + * Get the position of the current avatar's feet (or rather, bottom of its collision capsule) in world coordinates. + * @returns {Vec3} + */ + function getWorldFeetPosition(): Vec3; + /** + * @returns {Uuid} + */ + function getParentID(): Uuid; + /** + * @param parentID {Uuid} + */ + function setParentID(parentID: Uuid): void; + /** + * @returns {number} + */ + function getParentJointIndex(): number; + /** + * @param parentJointIndex {number} + */ + function setParentJointIndex(parentJointIndex: number): void; + /** + * Returns an array of joints, where each joint is an object containing name, index, and parentIndex fields. + * @returns {Array.} + */ + function getSkeleton(): Array.; + interface SkeletonJoint { + /** + * Joint name. + */ + name: string; + /** + * Joint index. + */ + index: number; + /** + * Index of this joint's parent (-1 if no parent). + */ + parentIndex: number; + } + + /** + * @param rateName {string} [rateName=""] + * @returns {number} + */ + function getSimulationRate(rateName: string): number; + /** + * Get the position of the left palm in world coordinates. + * @returns {Vec3} + */ + function getLeftPalmPosition(): Vec3; + /** + * Get the rotation of the left palm in world coordinates. + * @returns {Quat} + */ + function getLeftPalmRotation(): Quat; + /** + * Get the position of the right palm in world coordinates. + * @returns {Vec3} + */ + function getRightPalmPosition(): Vec3; + /** + * Get the rotation of the right palm in world coordinates. + * @returns {Quat} + */ + function getRightPalmRotation(): Quat; + /** + * @returns {Signal} + */ + function rigReady(): Signal; + /** + * @returns {Signal} + */ + function rigReset(): Signal; + /** + * A synonym for position for use by QML. + */ + let qmlPosition: Vec3; + /** + * If true then your avatar is rendered for you in Interface, + * otherwise it is not rendered for you (but it is still rendered for other users). + */ + let shouldRenderLocally: boolean; + /** + * The target velocity of your avatar to be achieved by a scripted motor. + */ + let motorVelocity: Vec3; + /** + * The timescale for the scripted motor to achieve the target + * motorVelocity avatar velocity. Smaller values result in higher acceleration. + */ + let motorTimescale: number; + /** + * Reference frame of the motorVelocity. Must be one of the + * following: "camera", "avatar", and "world". + */ + let motorReferenceFrame: string; + /** + * The Type of scripted motor behavior: "simple" to use the + * motorTimescale time scale; "dynamic" to use character controller timescales. + */ + let motorMode: string; + /** + * The sound that's played when the avatar experiences a + * collision. It can be a mono or stereo 16-bit WAV file running at either 24kHz or 48kHz. The latter is down-sampled by the audio mixer, so all audio effectively plays back at a 24khz. 48kHz RAW files are also supported. + */ + let collisionSoundURL: string; + /** + * Specifies the listening position when hearing spatialized audio. Must be one + * of the following property values: audioListenerModeHead audioListenerModeCamera audioListenerModeCustom + */ + let audioListenerMode: number; + /** + * The audio listening position is at the avatar's head. Read-only. + */ + let audioListenerModeHead: number; + /** + * The audio listening position is at the camera. Read-only. + */ + let audioListenerModeCamera: number; + /** + * The audio listening position is at a the position specified by set by the + * customListenPosition and customListenOrientation property values. Read-only. + */ + let audioListenerModeCustom: number; + /** + * Blendshapes will be transmitted over the network if set to true. + */ + let hasScriptedBlendshapes: boolean; + /** + * procedural blinking will be turned on if set to true. + */ + let hasProceduralBlinkFaceMovement: boolean; + /** + * procedural eye movement will be turned on if set to true. + */ + let hasProceduralEyeFaceMovement: boolean; + /** + * If set to true, voice audio will move the mouth Blendshapes while MyAvatar.hasScriptedBlendshapes is enabled. + */ + let hasAudioEnabledFaceMovement: boolean; + /** + * The listening position used when the audioListenerMode + * property value is audioListenerModeCustom. + */ + let customListenPosition: Vec3; + /** + * The listening orientation used when the + * audioListenerMode property value is audioListenerModeCustom. + */ + let customListenOrientation: Quat; + /** + * The position of the left hand in avatar coordinates if it's being positioned by + * controllers, otherwise Vec3. Read-only. + */ + let leftHandPosition: Vec3; + /** + * The position of the right hand in avatar coordinates if it's being positioned by + * controllers, otherwise Vec3. Read-only. + */ + let rightHandPosition: Vec3; + /** + * The position 30cm offset from the left hand in avatar coordinates if it's being + * positioned by controllers, otherwise Vec3. Read-only. + */ + let leftHandTipPosition: Vec3; + /** + * The position 30cm offset from the right hand in avatar coordinates if it's being + * positioned by controllers, otherwise Vec3. Read-only. + */ + let rightHandTipPosition: Vec3; + /** + * The pose of the left hand as determined by the hand controllers. Read-only. + */ + let leftHandPose: Pose; + /** + * The pose right hand position as determined by the hand controllers. Read-only. + */ + let rightHandPose: Pose; + /** + * The pose of the left hand as determined by the hand controllers, with the position + * by 30cm. Read-only. + */ + let leftHandTipPose: Pose; + /** + * The pose of the right hand as determined by the hand controllers, with the position + * by 30cm. Read-only. + */ + let rightHandTipPose: Pose; + /** + * If true then the avatar hips are placed according to the center of + * gravity model that balance the center of gravity over the base of support of the feet. Setting the value false will result in the default behaviour where the hips are placed under the head. + */ + let centerOfGravityModelEnabled: boolean; + /** + * If true then the avatar is re-centered to be under the + * head's position. In room-scale VR, this behavior is what causes your avatar to follow your HMD as you walk around the room. Setting the value false is useful if you want to pin the avatar to a fixed position. + */ + let hmdLeanRecenterEnabled: boolean; + /** + * Set to true to enable collisions for the avatar, false + * to disable collisions. May return true even though the value was set false because the zone may disallow collisionless avatars. + */ + let collisionsEnabled: boolean; + /** + * Synonym of collisionsEnabled. + * Deprecated: Use collisionsEnabled instead. + */ + let characterControllerEnabled: boolean; + /** + * Returns and sets the value of the Interface setting, Settings > + * Walking and teleporting. Note: Setting the value has no effect unless Interface is restarted. + */ + let useAdvancedMovementControls: boolean; + /** + * Returns and sets the value of the Interface setting, Settings > Show room boundaries + * while teleporting. Note: Setting the value has no effect unless Interface is restarted. + */ + let showPlayArea: boolean; + let yawSpeed: number; + let pitchSpeed: number; + /** + * If true, the roll angle of your HMD turns your avatar + * while flying. + */ + let hmdRollControlEnabled: boolean; + /** + * The amount of HMD roll, in degrees, required before your avatar turns if + * hmdRollControlEnabled is enabled. + */ + let hmdRollControlDeadZone: number; + /** + * If hmdRollControlEnabled is true, this value determines the maximum turn rate of + * your avatar when rolling your HMD in degrees per second. + */ + let hmdRollControlRate: number; + /** + * The height of the user in sensor space. + */ + let userHeight: number; + /** + * The estimated height of the user's eyes in sensor space. Read-only. + */ + let userEyeHeight: number; + /** + * UUID representing "my avatar". Only use for local-only entities and overlays in situations + * where MyAvatar.sessionUUID is not available (e.g., if not connected to a domain). Note: Likely to be deprecated. Read-only. + */ + const SELF_ID: Uuid; + let walkSpeed: number; + let walkBackwardSpeed: number; + let sprintSpeed: number; + /** + * Can be used to apply a translation offset between the avatar's position and the + * registration point of the 3D model. + */ + let skeletonOffset: Vec3; + let position: Vec3; + /** + * Returns the clamped scale of the avatar. + */ + let scale: number; + /** + * Read-only. + */ + let density: number; + let handPosition: Vec3; + /** + * The rotation left or right about an axis running from the head to the feet of the avatar. + * Yaw is sometimes called "heading". + */ + let bodyYaw: number; + /** + * The rotation about an axis running from shoulder to shoulder of the avatar. Pitch is + * sometimes called "elevation". + */ + let bodyPitch: number; + /** + * The rotation about an axis running from the chest to the back of the avatar. Roll is + * sometimes called "bank". + */ + let bodyRoll: number; + let orientation: Quat; + /** + * The orientation of the avatar's head. + */ + let headOrientation: Quat; + /** + * The rotation about an axis running from ear to ear of the avatar's head. Pitch is + * sometimes called "elevation". + */ + let headPitch: number; + /** + * The rotation left or right about an axis running from the base to the crown of the avatar's + * head. Yaw is sometimes called "heading". + */ + let headYaw: number; + /** + * The rotation about an axis running from the nose to the back of the avatar's head. Roll is + * sometimes called "bank". + */ + let headRoll: number; + let velocity: Vec3; + let angularVelocity: Vec3; + let audioLoudness: number; + let audioAverageLoudness: number; + let displayName: string; + /** + * Sanitized, defaulted version displayName that is defined by the AvatarMixer + * rather than by Interface clients. The result is unique among all avatars present at the time. + */ + let sessionDisplayName: string; + let lookAtSnappingEnabled: boolean; + let skeletonModelURL: string; + let attachmentData: Array.; + /** + * The list of joints in the current avatar model. Read-only. + */ + let jointNames: Array.; + /** + * Read-only. + */ + let sessionUUID: Uuid; + /** + * Read-only. + */ + let sensorToWorldMatrix: Mat4; + /** + * Read-only. + */ + let controllerLeftHandMatrix: Mat4; + /** + * Read-only. + */ + let controllerRightHandMatrix: Mat4; + /** + * Read-only. + */ + let sensorToWorldScale: number; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe FaceTracker API helps manage facial tracking hardware. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe FaceTracker API helps manage facial tracking hardware. + */ declare namespace FaceTracker { - /** - * @param enabled {boolean} - */ - function setEnabled(enabled: boolean): void; - function calibrate(): void; - /** - * @returns {Signal} - */ - function muteToggled(): Signal; - function toggleMute(): void; - /** - * @returns {boolean} - */ - function getMuted(): boolean; + /** + * @param enabled {boolean} + */ + function setEnabled(enabled: boolean): void; + function calibrate(): void; + /** + * @returns {Signal} + */ + function muteToggled(): Signal; + function toggleMute(): void; + /** + * @returns {boolean} + */ + function getMuted(): boolean; } /** -* Available in:Interface ScriptsClient Entity ScriptsSynonym for Pointers as used for laser pointers. -*/ + * Available in:Interface ScriptsClient Entity ScriptsSynonym for Pointers as used for laser pointers. + */ declare namespace LaserPointers { - /** - * @param properties {Pointers.LaserPointerProperties} - * @returns {number} - */ - function createLaserPointer(properties: Pointers.LaserPointerProperties): number; - /** - * @param id {number} - */ - function enableLaserPointer(id: number): void; - /** - * @param id {number} - */ - function disableLaserPointer(id: number): void; - /** - * @param id {number} - */ - function removeLaserPointer(id: number): void; - /** - * @param id {number} - * @param renderState {string} - * @param properties {Pointers.RayPointerRenderState} - */ - function editRenderState(id: number, renderState: string, properties: Pointers.RayPointerRenderState): void; - /** - * @param renderState {string} - * @param id {number} - */ - function setRenderState(renderState: string, id: number): void; - /** - * @param id {number} - * @returns {RayPickResult} - */ - function getPrevRayPickResult(id: number): RayPickResult; - /** - * @param id {number} - * @param precisionPicking {boolean} - */ - function setPrecisionPicking(id: number, precisionPicking: boolean): void; - /** - * @param id {number} - * @param laserLength {number} - */ - function setLaserLength(id: number, laserLength: number): void; - /** - * @param id {number} - * @param ignoreItems {Array.} - */ - function setIgnoreItems(id: number, ignoreItems: Array.): void; - /** - * @param id {number} - * @param includeItems {Array.} - */ - function setIncludeItems(id: number, includeItems: Array.): void; - /** - * @param id {number} - * @param itemID {Uuid} - * @param isOverlay {boolean} - * @param offsetMat {Mat4} [offsetMat=undefined] - */ - function setLockEndUUID(id: number, itemID: Uuid, isOverlay: boolean, offsetMat: Mat4): void; - /** - * @param id {number} - * @returns {boolean} - */ - function isLeftHand(id: number): boolean; - /** - * @param id {number} - * @returns {boolean} - */ - function isRightHand(id: number): boolean; - /** - * @param id {number} - * @returns {boolean} - */ - function isMouse(id: number): boolean; + /** + * @param properties {Pointers.LaserPointerProperties} + * @returns {number} + */ + function createLaserPointer(properties: Pointers.LaserPointerProperties): number; + /** + * @param id {number} + */ + function enableLaserPointer(id: number): void; + /** + * @param id {number} + */ + function disableLaserPointer(id: number): void; + /** + * @param id {number} + */ + function removeLaserPointer(id: number): void; + /** + * @param id {number} + * @param renderState {string} + * @param properties {Pointers.RayPointerRenderState} + */ + function editRenderState(id: number, renderState: string, properties: Pointers.RayPointerRenderState): void; + /** + * @param renderState {string} + * @param id {number} + */ + function setRenderState(renderState: string, id: number): void; + /** + * @param id {number} + * @returns {RayPickResult} + */ + function getPrevRayPickResult(id: number): RayPickResult; + /** + * @param id {number} + * @param precisionPicking {boolean} + */ + function setPrecisionPicking(id: number, precisionPicking: boolean): void; + /** + * @param id {number} + * @param laserLength {number} + */ + function setLaserLength(id: number, laserLength: number): void; + /** + * @param id {number} + * @param ignoreItems {Array.} + */ + function setIgnoreItems(id: number, ignoreItems: Array.): void; + /** + * @param id {number} + * @param includeItems {Array.} + */ + function setIncludeItems(id: number, includeItems: Array.): void; + /** + * @param id {number} + * @param itemID {Uuid} + * @param isOverlay {boolean} + * @param offsetMat {Mat4} [offsetMat=undefined] + */ + function setLockEndUUID(id: number, itemID: Uuid, isOverlay: boolean, offsetMat: Mat4): void; + /** + * @param id {number} + * @returns {boolean} + */ + function isLeftHand(id: number): boolean; + /** + * @param id {number} + * @returns {boolean} + */ + function isRightHand(id: number): boolean; + /** + * @param id {number} + * @returns {boolean} + */ + function isMouse(id: number): boolean; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Picks API lets you create and manage objects for repeatedly calculating intersections in different ways. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Picks API lets you create and manage objects for repeatedly calculating intersections in different ways. + */ declare namespace Picks { - interface RayPickProperties { - /** - * If this Pick should start enabled or not. Disabled Picks do not updated their pick results. - */ - enabled: boolean; - /** - * The filter for this Pick to use, constructed using filter flags combined using bitwise OR. - */ - filter: number; - /** - * The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. - */ - maxDistance: float; - /** - * Only for Joint or Mouse Ray Picks. If "Mouse", it will create a Ray Pick that follows the system mouse, in desktop or HMD. - * If "Avatar", it will create a Joint Ray Pick that follows your avatar's head. Otherwise, it will create a Joint Ray Pick that follows the given joint, if it -exists on your current avatar. - */ - joint: string; - /** - * Only for Joint Ray Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral - */ - posOffset: Vec3; - /** - * Only for Joint Ray Picks. A local joint direction offset. x = upward, y = forward, z = lateral - */ - dirOffset: Vec3; - /** - * Only for Static Ray Picks. The world-space origin of the ray. - */ - position: Vec3; - /** - * Only for Static Ray Picks. The world-space direction of the ray. - */ - direction: Vec3; - } - - interface StylusPickProperties { - /** - * An integer. 0 == left, 1 == right. Invalid otherwise. - */ - hand: number; - /** - * If this Pick should start enabled or not. Disabled Picks do not updated their pick results. - */ - enabled: boolean; - /** - * The filter for this Pick to use, constructed using filter flags combined using bitwise OR. - */ - filter: number; - /** - * The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. - */ - maxDistance: float; - } - - /** - * Adds a new Pick. - * Different PickTypes use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example, -with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pick, a Mouse Ray Pick, or a Joint Ray Pick. - * @param type {PickType} A PickType that specifies the method of picking to use - * @param properties {Picks.RayPickProperties} A PickProperties object, containing all the properties for initializing this Pick - * @returns {number} - */ - function createPick(type: PickType, properties: Picks.RayPickProperties): number; - /** - * Enables a Pick. - * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. - */ - function enablePick(uid: number): void; - /** - * Disables a Pick. - * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. - */ - function disablePick(uid: number): void; - /** - * Removes a Pick. - * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. - */ - function removePick(uid: number): void; - /** - * Get the most recent pick result from this Pick. This will be updated as long as the Pick is enabled. - * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. - * @returns {RayPickResult} - */ - function getPrevPickResult(uid: number): RayPickResult; - /** - * Sets whether or not to use precision picking. - * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. - * @param precisionPicking {boolean} Whether or not to use precision picking - */ - function setPrecisionPicking(uid: number, precisionPicking: boolean): void; - /** - * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Picks. - * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. - * @param ignoreItems {Array.} A list of IDs to ignore. - */ - function setIgnoreItems(uid: number, ignoreItems: Array.): void; - /** - * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus - * Picks only intersect with objects in their include list. - * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. - * @param includeItems {Array.} A list of IDs to include. - */ - function setIncludeItems(uid: number, includeItems: Array.): void; - /** - * Check if a Pick is associated with the left hand. - * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. - * @returns {boolean} - */ - function isLeftHand(uid: number): boolean; - /** - * Check if a Pick is associated with the right hand. - * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. - * @returns {boolean} - */ - function isRightHand(uid: number): boolean; - /** - * Check if a Pick is associated with the system mouse. - * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. - * @returns {boolean} - */ - function isMouse(uid: number): boolean; - /** - * @returns {number} - */ - function PICK_NOTHING(): number; - /** - * @returns {number} - */ - function PICK_ENTITIES(): number; - /** - * @returns {number} - */ - function PICK_OVERLAYS(): number; - /** - * @returns {number} - */ - function PICK_AVATARS(): number; - /** - * @returns {number} - */ - function PICK_HUD(): number; - /** - * @returns {number} - */ - function PICK_COARSE(): number; - /** - * @returns {number} - */ - function PICK_INCLUDE_INVISIBLE(): number; - /** - * @returns {number} - */ - function PICK_INCLUDE_NONCOLLIDABLE(): number; - /** - * @returns {number} - */ - function PICK_ALL_INTERSECTIONS(): number; - /** - * @returns {number} - */ - function INTERSECTED_NONE(): number; - /** - * @returns {number} - */ - function INTERSECTED_ENTITY(): number; - /** - * @returns {number} - */ - function INTERSECTED_OVERLAY(): number; - /** - * @returns {number} - */ - function INTERSECTED_AVATAR(): number; - /** - * @returns {number} - */ - function INTERSECTED_HUD(): number; - /** - * A filter flag. Don't intersect with anything. Read-only. - */ - const PICK_NOTHING: number; - /** - * A filter flag. Include entities when intersecting. Read-only. - */ - const PICK_ENTITIES: number; - /** - * A filter flag. Include overlays when intersecting. Read-only. - */ - const PICK_OVERLAYS: number; - /** - * A filter flag. Include avatars when intersecting. Read-only. - */ - const PICK_AVATARS: number; - /** - * A filter flag. Include the HUD sphere when intersecting in HMD mode. Read-only. - */ - const PICK_HUD: number; - /** - * A filter flag. Pick against coarse meshes, instead of exact meshes. Read-only. - */ - const PICK_COARSE: number; - /** - * A filter flag. Include invisible objects when intersecting. Read-only. - */ - const PICK_INCLUDE_INVISIBLE: number; - /** - * A filter flag. Include non-collidable objects when intersecting. - * Read-only. - */ - const PICK_INCLUDE_NONCOLLIDABLE: number; - /** - * Read-only. - */ - const PICK_ALL_INTERSECTIONS: number; - /** - * An intersection type. Intersected nothing with the given filter flags. Read-only. - */ - const INTERSECTED_NONE: number; - /** - * An intersection type. Intersected an entity. Read-only. - */ - const INTERSECTED_ENTITY: number; - /** - * An intersection type. Intersected an overlay. Read-only. - */ - const INTERSECTED_OVERLAY: number; - /** - * An intersection type. Intersected an avatar. Read-only. - */ - const INTERSECTED_AVATAR: number; - /** - * An intersection type. Intersected the HUD sphere. Read-only. - */ - const INTERSECTED_HUD: number; - /** - * The max number of usec to spend per frame updating Pick results. Read-only. - */ - let perFrameTimeBudget: number; + interface RayPickProperties { + /** + * If this Pick should start enabled or not. Disabled Picks do not updated their pick results. + */ + enabled: boolean; + /** + * The filter for this Pick to use, constructed using filter flags combined using bitwise OR. + */ + filter: number; + /** + * The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. + */ + maxDistance: number; + /** + * The ID of the parent, either an avatar, an entity, an overlay, or a pick. + */ + parentID: Uuid; + /** + * The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint) + */ + parentJointIndex: number; + /** + * If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar. + */ + joint: string; + /** + * Only for Joint Ray Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral + */ + posOffset: Vec3; + /** + * Only for Joint Ray Picks. A local joint direction offset. x = upward, y = forward, z = lateral + */ + dirOffset: Vec3; + /** + * Only for Static Ray Picks. The world-space origin of the ray. + */ + position: Vec3; + /** + * Only for Static Ray Picks. The world-space direction of the ray. + */ + direction: Vec3; + } + + interface StylusPickProperties { + /** + * An integer. 0 == left, 1 == right. Invalid otherwise. + */ + hand: number; + /** + * If this Pick should start enabled or not. Disabled Picks do not updated their pick results. + */ + enabled: boolean; + /** + * The filter for this Pick to use, constructed using filter flags combined using bitwise OR. + */ + filter: number; + /** + * The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. + */ + maxDistance: number; + } + + interface ParabolaPickProperties { + /** + * If this Pick should start enabled or not. Disabled Picks do not updated their pick results. + */ + enabled: boolean; + /** + * The filter for this Pick to use, constructed using filter flags combined using bitwise OR. + */ + filter: number; + /** + * The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid. + */ + maxDistance: number; + /** + * The ID of the parent, either an avatar, an entity, an overlay, or a pick. + */ + parentID: Uuid; + /** + * The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint) + */ + parentJointIndex: number; + /** + * If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar. + */ + joint: string; + /** + * Only for Joint Parabola Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral + */ + posOffset: Vec3; + /** + * Only for Joint Parabola Picks. A local joint direction offset. x = upward, y = forward, z = lateral + */ + dirOffset: Vec3; + /** + * Only for Static Parabola Picks. The world-space origin of the parabola segment. + */ + position: Vec3; + /** + * Only for Static Parabola Picks. The world-space direction of the parabola segment. + */ + direction: Vec3; + /** + * The initial speed of the parabola, i.e. the initial speed of the projectile whose trajectory defines the parabola. + */ + speed: number; + /** + * The acceleration of the parabola, i.e. the acceleration of the projectile whose trajectory defines the parabola, both magnitude and direction. + */ + accelerationAxis: Vec3; + /** + * Whether or not the acceleration axis should rotate with the avatar's local Y axis. + */ + rotateAccelerationWithAvatar: boolean; + /** + * Whether or not the acceleration axis should rotate with the parent's local Y axis, if available. + */ + rotateAccelerationWithParent: boolean; + /** + * If true, the velocity and acceleration of the Pick will scale linearly with the parent, if available. scaleWithAvatar is an alias but is deprecated. + */ + scaleWithParent: boolean; + } + + interface CollisionPickProperties { + /** + * If this Pick should start enabled or not. Disabled Picks do not updated their pick results. + */ + enabled: boolean; + /** + * The filter for this Pick to use, constructed using filter flags combined using bitwise OR. + */ + filter: number; + /** + * The information about the collision region's size and shape. Dimensions are in world space, but will scale with the parent if defined. + */ + shape: Shape; + /** + * The position of the collision region, relative to a parent if defined. + */ + position: Vec3; + /** + * The orientation of the collision region, relative to a parent if defined. + */ + orientation: Quat; + /** + * The approximate minimum penetration depth for a test object to be considered in contact with the collision region. + * The depth is measured in world space, but will scale with the parent if defined. + */ + threshold: float; + /** + * The type of object this collision pick collides as. Objects whose collision masks overlap with the pick's collision group + * will be considered colliding with the pick. + */ + collisionGroup: CollisionMask; + /** + * The ID of the parent, either an avatar, an entity, an overlay, or a pick. + */ + parentID: Uuid; + /** + * The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint) + */ + parentJointIndex: number; + /** + * If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar. + */ + joint: string; + /** + * If true, the collision pick's dimensions and threshold will adjust according to the scale of the parent. + */ + scaleWithParent: boolean; + } + + /** + * Adds a new Pick. + * Different PickTypes use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example, with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pick, a Mouse Ray Pick, or a Joint Ray Pick. + * @param type {PickType} A PickType that specifies the method of picking to use + * @param properties {Picks.RayPickProperties} A PickProperties object, containing all the properties for initializing this Pick + * @returns {number} + */ + function createPick(type: PickType, properties: Picks.RayPickProperties): number; + /** + * Enables a Pick. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + */ + function enablePick(uid: number): void; + /** + * Disables a Pick. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + */ + function disablePick(uid: number): void; + /** + * Removes a Pick. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + */ + function removePick(uid: number): void; + /** + * Get the most recent pick result from this Pick. This will be updated as long as the Pick is enabled. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @returns {RayPickResult} + */ + function getPrevPickResult(uid: number): RayPickResult; + /** + * Sets whether or not to use precision picking. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @param precisionPicking {boolean} Whether or not to use precision picking + */ + function setPrecisionPicking(uid: number, precisionPicking: boolean): void; + /** + * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Picks. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @param ignoreItems {Array.} A list of IDs to ignore. + */ + function setIgnoreItems(uid: number, ignoreItems: Array.): void; + /** + * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus + * Picks only intersect with objects in their include list. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @param includeItems {Array.} A list of IDs to include. + */ + function setIncludeItems(uid: number, includeItems: Array.): void; + /** + * Check if a Pick is associated with the left hand. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @returns {boolean} + */ + function isLeftHand(uid: number): boolean; + /** + * Check if a Pick is associated with the right hand. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @returns {boolean} + */ + function isRightHand(uid: number): boolean; + /** + * Check if a Pick is associated with the system mouse. + * @param uid {number} The ID of the Pick, as returned by {@link Picks.createPick}. + * @returns {boolean} + */ + function isMouse(uid: number): boolean; + /** + * @returns {number} + */ + function PICK_NOTHING(): number; + /** + * @returns {number} + */ + function PICK_ENTITIES(): number; + /** + * @returns {number} + */ + function PICK_OVERLAYS(): number; + /** + * @returns {number} + */ + function PICK_AVATARS(): number; + /** + * @returns {number} + */ + function PICK_HUD(): number; + /** + * @returns {number} + */ + function PICK_COARSE(): number; + /** + * @returns {number} + */ + function PICK_INCLUDE_INVISIBLE(): number; + /** + * @returns {number} + */ + function PICK_INCLUDE_NONCOLLIDABLE(): number; + /** + * @returns {number} + */ + function PICK_ALL_INTERSECTIONS(): number; + /** + * @returns {number} + */ + function INTERSECTED_NONE(): number; + /** + * @returns {number} + */ + function INTERSECTED_ENTITY(): number; + /** + * @returns {number} + */ + function INTERSECTED_OVERLAY(): number; + /** + * @returns {number} + */ + function INTERSECTED_AVATAR(): number; + /** + * @returns {number} + */ + function INTERSECTED_HUD(): number; + /** + * A filter flag. Don't intersect with anything. Read-only. + */ + const PICK_NOTHING: number; + /** + * A filter flag. Include entities when intersecting. Read-only. + */ + const PICK_ENTITIES: number; + /** + * A filter flag. Include overlays when intersecting. Read-only. + */ + const PICK_OVERLAYS: number; + /** + * A filter flag. Include avatars when intersecting. Read-only. + */ + const PICK_AVATARS: number; + /** + * A filter flag. Include the HUD sphere when intersecting in HMD mode. Read-only. + */ + const PICK_HUD: number; + /** + * A filter flag. Pick against coarse meshes, instead of exact meshes. Read-only. + */ + const PICK_COARSE: number; + /** + * A filter flag. Include invisible objects when intersecting. Read-only. + */ + const PICK_INCLUDE_INVISIBLE: number; + /** + * A filter flag. Include non-collidable objects when intersecting. + * Read-only. + */ + const PICK_INCLUDE_NONCOLLIDABLE: number; + /** + * Read-only. + */ + const PICK_ALL_INTERSECTIONS: number; + /** + * An intersection type. Intersected nothing with the given filter flags. + * Read-only. + */ + const INTERSECTED_NONE: number; + /** + * An intersection type. Intersected an entity. Read-only. + */ + const INTERSECTED_ENTITY: number; + /** + * An intersection type. Intersected an overlay. Read-only. + */ + const INTERSECTED_OVERLAY: number; + /** + * An intersection type. Intersected an avatar. Read-only. + */ + const INTERSECTED_AVATAR: number; + /** + * An intersection type. Intersected the HUD sphere. Read-only. + */ + const INTERSECTED_HUD: number; + /** + * The max number of usec to spend per frame updating Pick results. Read-only. + */ + let perFrameTimeBudget: number; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Pointers API lets you create and manage objects for repeatedly calculating intersections in different ways, as well as the visual representation of those objects. -* Pointers can also be configured to automatically generate PointerEvents on Entities and Overlays. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Pointers API lets you create and manage objects for repeatedly calculating intersections in different ways, as well as the visual representation of those objects. + * Pointers can also be configured to automatically generate PointerEvents on Entities and Overlays. + */ declare namespace Pointers { - interface StylusPointerProperties { - /** - * If this pointer should generate hover events. - */ - hover: boolean; - enabled: boolean; - } - - interface LaserPointerProperties { - /** - * Ray Pointers only. If true, the end of the Pointer will always rotate to face the avatar. - */ - faceAvatar: boolean; - /** - * Ray Pointers only. If false, the end of the Pointer will be moved up by half of its height. - */ - centerEndY: boolean; - /** - * Ray Pointers only. If true, the end of the Pointer will lock on to the center of the object at which the laser is pointing. - */ - lockEnd: boolean; - /** - * Ray Pointers only. If true, the dimensions of the end of the Pointer will scale linearly with distance. - */ - distanceScaleEnd: boolean; - /** - * Ray Pointers only. If true, the width of the Pointer's path will scale linearly with your avatar's scale. - */ - scaleWithAvatar: boolean; - enabled: boolean; - /** - * Ray Pointers only. A list of different visual states to switch between. - */ - renderStates: Array.; - /** - * Ray Pointers only. A list of different visual states to use if there is no intersection. - */ - defaultRenderStates: Array.; - /** - * If this Pointer should generate hover events. - */ - hover: boolean; - /** - * Ray Pointers only. A list of different triggers mechanisms that control this Pointer's click event generation. - */ - triggers: Array.; - } - - /** - * Adds a new Pointer - * Different PickTypes use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example, -with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pointer, a Mouse Ray Pointer, or a Joint Ray Pointer. - * @param type {PickType} A PickType that specifies the method of picking to use - * @param properties {Pointers.LaserPointerProperties} A PointerProperties object, containing all the properties for initializing this Pointer and the {@link Picks.PickProperties} for the Pick that - * this Pointer will use to do its picking. - * @returns {number} - */ - function createPointer(type: PickType, properties: Pointers.LaserPointerProperties): number; - /** - * Enables a Pointer. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - */ - function enablePointer(uid: number): void; - /** - * Disables a Pointer. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - */ - function disablePointer(uid: number): void; - /** - * Removes a Pointer. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - */ - function removePointer(uid: number): void; - /** - * Edit some visual aspect of a Pointer. Currently only supported for Ray Pointers. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @param renderState {string} The name of the render state you want to edit. - * @param properties {Pointers.RayPointerRenderState} The new properties for renderStates item. - */ - function editRenderState(uid: number, renderState: string, properties: Pointers.RayPointerRenderState): void; - /** - * Set the render state of a Pointer. For Ray Pointers, this means switching between their Pointers.RayPointerRenderStates, or "" to turn off rendering and hover/trigger events. - * For Stylus Pointers, there are three built-in options: "events on" (render and send events, the default), "events off" (render but don't send events), and "disabled" (don't render, don't send events). - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @param renderState {string} The name of the render state to which you want to switch. - */ - function setRenderState(uid: number, renderState: string): void; - /** - * Get the most recent pick result from this Pointer. This will be updated as long as the Pointer is enabled, regardless of the render state. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @returns {RayPickResult} - */ - function getPrevPickResult(uid: number): RayPickResult; - /** - * Sets whether or not to use precision picking. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @param precisionPicking {boolean} Whether or not to use precision picking - */ - function setPrecisionPicking(uid: number, precisionPicking: boolean): void; - /** - * Sets the length of this Pointer. No effect on Stylus Pointers. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @param length {float} The desired length of the Pointer. - */ - function setLength(uid: number, length: float): void; - /** - * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Pointers. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @param ignoreItems {Array.} A list of IDs to ignore. - */ - function setIgnoreItems(uid: number, ignoreItems: Array.): void; - /** - * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus - * Pointers only intersect with objects in their include list. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @param includeItems {Array.} A list of IDs to include. - */ - function setIncludeItems(uid: number, includeItems: Array.): void; - /** - * Lock a Pointer onto a specific object (overlay, entity, or avatar). Optionally, provide an offset in object-space, otherwise the Pointer will lock on to the center of the object. - * Not used by Stylus Pointers. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @param objectID {Uuid} The ID of the object to which to lock on. - * @param isOverlay {boolean} False for entities or avatars, true for overlays - * @param offsetMat {Mat4} [offsetMat=undefined] The offset matrix to use if you do not want to lock on to the center of the object. - */ - function setLockEndUUID(uid: number, objectID: Uuid, isOverlay: boolean, offsetMat: Mat4): void; - /** - * Check if a Pointer is associated with the left hand. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @returns {boolean} - */ - function isLeftHand(uid: number): boolean; - /** - * Check if a Pointer is associated with the right hand. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @returns {boolean} - */ - function isRightHand(uid: number): boolean; - /** - * Check if a Pointer is associated with the system mouse. - * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. - * @returns {boolean} - */ - function isMouse(uid: number): boolean; + interface StylusPointerProperties { + /** + * If this pointer should generate hover events. + */ + hover: boolean; + enabled: boolean; + } + + interface DefaultRayPointerRenderState { + /** + * The distance at which to render the end of this Ray Pointer, if one is defined. + */ + distance: number; + } + + interface RayPointerRenderState { + /** + * When using Pointers.createPointer, the name of this render state, used by Pointers.setRenderState and Pointers.editRenderState + */ + name: string; + /** + * When using Pointers.createPointer, an optionally defined overlay to represent the beginning of the Ray Pointer, + * using the properties you would normally pass to Overlays.addOverlay, plus the type (as a type field). When returned from Pointers.getPointerProperties, the ID of the created overlay if it exists, or a null ID otherwise. + */ + start: Overlays.OverlayProperties; + /** + * When using Pointers.createPointer, an optionally defined overlay to represent the path of the Ray Pointer, + * using the properties you would normally pass to Overlays.addOverlay, plus the type (as a type field), which must be "line3d". When returned from Pointers.getPointerProperties, the ID of the created overlay if it exists, or a null ID otherwise. + */ + path: Overlays.OverlayProperties; + /** + * When using Pointers.createPointer, an optionally defined overlay to represent the end of the Ray Pointer, + * using the properties you would normally pass to Overlays.addOverlay, plus the type (as a type field). When returned from Pointers.getPointerProperties, the ID of the created overlay if it exists, or a null ID otherwise. + */ + end: Overlays.OverlayProperties; + } + + interface LaserPointerProperties { + /** + * If true, the end of the Pointer will always rotate to face the avatar. + */ + faceAvatar: boolean; + /** + * If false, the end of the Pointer will be moved up by half of its height. + */ + centerEndY: boolean; + /** + * If true, the end of the Pointer will lock on to the center of the object at which the pointer is pointing. + */ + lockEnd: boolean; + /** + * If true, the dimensions of the end of the Pointer will scale linearly with distance. + */ + distanceScaleEnd: boolean; + /** + * If true, the width of the Pointer's path will scale linearly with the pick parent's scale. scaleWithAvatar is an alias but is deprecated. + */ + scaleWithParent: boolean; + /** + * If true, the end of the Pointer will rotate to follow the normal of the intersected surface. + */ + followNormal: boolean; + /** + * The strength of the interpolation between the real normal and the visual normal if followNormal is true. 0-1. If 0 or 1, + * the normal will follow exactly. + */ + followNormalStrength: number; + enabled: boolean; + /** + * A collection of different visual states to switch between. + * When using Pointers.createPointer, a list of RayPointerRenderStates. When returned from Pointers.getPointerProperties, a map between render state names and RayPointRenderStates. + */ + renderStates: Array.; + /** + * A collection of different visual states to use if there is no intersection. + * When using Pointers.createPointer, a list of DefaultRayPointerRenderStates. When returned from Pointers.getPointerProperties, a map between render state names and DefaultRayPointRenderStates. + */ + defaultRenderStates: Array.; + /** + * If this Pointer should generate hover events. + */ + hover: boolean; + /** + * A list of different triggers mechanisms that control this Pointer's click event generation. + */ + triggers: Array.; + } + + interface ParabolaProperties { + /** + * The color of the parabola. + */ + color: Color; + /** + * The alpha of the parabola. + */ + alpha: number; + /** + * The width of the parabola, in meters. + */ + width: number; + /** + * The width of the parabola, in meters. + */ + isVisibleInSecondaryCamera: boolean; + /** + * If true, the parabola is rendered in front of other items in the scene. + */ + drawInFront: boolean; + } + + interface DefaultParabolaPointerRenderState { + /** + * The distance along the parabola at which to render the end of this Parabola Pointer, if one is defined. + */ + distance: number; + } + + interface ParabolaPointerRenderState { + /** + * When using Pointers.createPointer, the name of this render state, used by Pointers.setRenderState and Pointers.editRenderState + */ + name: string; + /** + * When using Pointers.createPointer, an optionally defined overlay to represent the beginning of the Parabola Pointer, + * using the properties you would normally pass to Overlays.addOverlay, plus the type (as a type field). When returned from Pointers.getPointerProperties, the ID of the created overlay if it exists, or a null ID otherwise. + */ + start: Overlays.OverlayProperties; + /** + * When using Pointers.createPointer, the optionally defined rendering properties of the parabolic path defined by the Parabola Pointer. + * Not defined in Pointers.getPointerProperties. + */ + path: Pointers.ParabolaProperties; + /** + * When using Pointers.createPointer, an optionally defined overlay to represent the end of the Parabola Pointer, + * using the properties you would normally pass to Overlays.addOverlay, plus the type (as a type field). When returned from Pointers.getPointerProperties, the ID of the created overlay if it exists, or a null ID otherwise. + */ + end: Overlays.OverlayProperties; + } + + interface ParabolaPointerProperties { + /** + * If true, the end of the Pointer will always rotate to face the avatar. + */ + faceAvatar: boolean; + /** + * If false, the end of the Pointer will be moved up by half of its height. + */ + centerEndY: boolean; + /** + * If true, the end of the Pointer will lock on to the center of the object at which the pointer is pointing. + */ + lockEnd: boolean; + /** + * If true, the dimensions of the end of the Pointer will scale linearly with distance. + */ + distanceScaleEnd: boolean; + /** + * If true, the width of the Pointer's path will scale linearly with the pick parent's scale. scaleWithAvatar is an alias but is deprecated. + */ + scaleWithParent: boolean; + /** + * If true, the end of the Pointer will rotate to follow the normal of the intersected surface. + */ + followNormal: boolean; + /** + * The strength of the interpolation between the real normal and the visual normal if followNormal is true. 0-1. If 0 or 1, + * the normal will follow exactly. + */ + followNormalStrength: number; + enabled: boolean; + /** + * A collection of different visual states to switch between. + * When using Pointers.createPointer, a list of ParabolaPointerRenderStates. When returned from Pointers.getPointerProperties, a map between render state names and ParabolaPointerRenderStates. + */ + renderStates: Array.; + /** + * A collection of different visual states to use if there is no intersection. + * When using Pointers.createPointer, a list of DefaultParabolaPointerRenderStates. When returned from Pointers.getPointerProperties, a map between render state names and DefaultParabolaPointerRenderStates. + */ + defaultRenderStates: Array.; + /** + * If this Pointer should generate hover events. + */ + hover: boolean; + /** + * A list of different triggers mechanisms that control this Pointer's click event generation. + */ + triggers: Array.; + } + + interface Trigger { + /** + * This can be a built-in Controller action, like Controller.Standard.LTClick, or a function that evaluates to >= 1.0 when you want to trigger button. + */ + action: Controller.Standard; + /** + * Which button to trigger. "Primary", "Secondary", "Tertiary", and "Focus" are currently supported. Only "Primary" will trigger clicks on web surfaces. If "Focus" is triggered, + * it will try to set the entity or overlay focus to the object at which the Pointer is aimed. Buttons besides the first three will still trigger events, but event.button will be "None". + */ + button: string; + } + + /** + * Adds a new Pointer + * Different PickTypes use different properties, and within one PickType, the properties you choose can lead to a wide range of behaviors. For example, with PickType.Ray, depending on which optional parameters you pass, you could create a Static Ray Pointer, a Mouse Ray Pointer, or a Joint Ray Pointer. + * @param type {PickType} A PickType that specifies the method of picking to use + * @param properties {Pointers.LaserPointerProperties} A PointerProperties object, containing all the properties for initializing this Pointer and the {@link Picks.PickProperties} for the Pick that + * this Pointer will use to do its picking. + * @returns {number} + */ + function createPointer(type: PickType, properties: Pointers.LaserPointerProperties): number; + /** + * Enables a Pointer. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + */ + function enablePointer(uid: number): void; + /** + * Disables a Pointer. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + */ + function disablePointer(uid: number): void; + /** + * Removes a Pointer. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + */ + function removePointer(uid: number): void; + /** + * Edit some visual aspect of a Pointer. Currently only supported for Ray Pointers. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param renderState {string} The name of the render state you want to edit. + * @param properties {Pointers.RayPointerRenderState} The new properties for renderStates item. + */ + function editRenderState(uid: number, renderState: string, properties: Pointers.RayPointerRenderState): void; + /** + * Set the render state of a Pointer. For Ray Pointers, this means switching between their Pointers.RayPointerRenderStates, or "" to turn off rendering and hover/trigger events. + * For Stylus Pointers, there are three built-in options: "events on" (render and send events, the default), "events off" (render but don't send events), and "disabled" (don't render, don't send events). + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param renderState {string} The name of the render state to which you want to switch. + */ + function setRenderState(uid: number, renderState: string): void; + /** + * Get the most recent pick result from this Pointer. This will be updated as long as the Pointer is enabled, regardless of the render state. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @returns {RayPickResult} + */ + function getPrevPickResult(uid: number): RayPickResult; + /** + * Sets whether or not to use precision picking. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param precisionPicking {boolean} Whether or not to use precision picking + */ + function setPrecisionPicking(uid: number, precisionPicking: boolean): void; + /** + * Sets the length of this Pointer. No effect on Stylus Pointers. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param length {number} The desired length of the Pointer. + */ + function setLength(uid: number, length: number): void; + /** + * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to ignore during intersection. Not used by Stylus Pointers. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param ignoreItems {Array.} A list of IDs to ignore. + */ + function setIgnoreItems(uid: number, ignoreItems: Array.): void; + /** + * Sets a list of Entity IDs, Overlay IDs, and/or Avatar IDs to include during intersection, instead of intersecting with everything. Stylus + * Pointers only intersect with objects in their include list. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param includeItems {Array.} A list of IDs to include. + */ + function setIncludeItems(uid: number, includeItems: Array.): void; + /** + * Lock a Pointer onto a specific object (overlay, entity, or avatar). Optionally, provide an offset in object-space, otherwise the Pointer will lock on to the center of the object. + * Not used by Stylus Pointers. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @param objectID {Uuid} The ID of the object to which to lock on. + * @param isOverlay {boolean} False for entities or avatars, true for overlays + * @param offsetMat {Mat4} [offsetMat=undefined] The offset matrix to use if you do not want to lock on to the center of the object. + */ + function setLockEndUUID(uid: number, objectID: Uuid, isOverlay: boolean, offsetMat: Mat4): void; + /** + * Check if a Pointer is associated with the left hand. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @returns {boolean} + */ + function isLeftHand(uid: number): boolean; + /** + * Check if a Pointer is associated with the right hand. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @returns {boolean} + */ + function isRightHand(uid: number): boolean; + /** + * Check if a Pointer is associated with the system mouse. + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @returns {boolean} + */ + function isMouse(uid: number): boolean; + /** + * Returns information about an existing Pointer + * @param uid {number} The ID of the Pointer, as returned by {@link Pointers.createPointer}. + * @returns {Pointers.LaserPointerProperties} + */ + function getPointerProperties(uid: number): Pointers.LaserPointerProperties; } /** -* Available in:Interface ScriptsClient Entity ScriptsSynonym for Picks as used for ray picks. -*/ + * Available in:Interface ScriptsClient Entity ScriptsSynonym for Picks as used for ray picks. + */ declare namespace RayPick { - /** - * @param undefined {Picks.RayPickProperties} - * @returns {number} - */ - function createRayPick(undefined: Picks.RayPickProperties): number; - /** - * @param id {number} - */ - function enableRayPick(id: number): void; - /** - * @param id {number} - */ - function disableRayPick(id: number): void; - /** - * @param id {number} - */ - function removeRayPick(id: number): void; - /** - * @param id {number} - * @returns {RayPickResult} - */ - function getPrevRayPickResult(id: number): RayPickResult; - /** - * @param id {number} - * @param precisionPicking {boolean} - */ - function setPrecisionPicking(id: number, precisionPicking: boolean): void; - /** - * @param id {number} - * @param {Uuid[]) {} ignoreEntities - */ - function setIgnoreItems(id: number, {Uuid[])): void; - /** - * @param id {number} - * @param {Uuid[]) {} includeEntities - */ - function setIncludeItems(id: number, {Uuid[])): void; - /** - * @param id {number} - * @returns {boolean} - */ - function isLeftHand(id: number): boolean; - /** - * @param id {number} - * @returns {boolean} - */ - function isRightHand(id: number): boolean; - /** - * @param id {number} - * @returns {boolean} - */ - function isMouse(id: number): boolean; - /** - * @returns {number} - */ - function PICK_NOTHING(): number; - /** - * @returns {number} - */ - function PICK_ENTITIES(): number; - /** - * @returns {number} - */ - function PICK_OVERLAYS(): number; - /** - * @returns {number} - */ - function PICK_AVATARS(): number; - /** - * @returns {number} - */ - function PICK_HUD(): number; - /** - * @returns {number} - */ - function PICK_COARSE(): number; - /** - * @returns {number} - */ - function PICK_INCLUDE_INVISIBLE(): number; - /** - * @returns {number} - */ - function PICK_INCLUDE_NONCOLLIDABLE(): number; - /** - * @returns {number} - */ - function PICK_ALL_INTERSECTIONS(): number; - /** - * @returns {number} - */ - function INTERSECTED_NONE(): number; - /** - * @returns {number} - */ - function INTERSECTED_ENTITY(): number; - /** - * @returns {number} - */ - function INTERSECTED_OVERLAY(): number; - /** - * @returns {number} - */ - function INTERSECTED_AVATAR(): number; - /** - * @returns {number} - */ - function INTERSECTED_HUD(): number; - /** - * Read-only. - */ - const PICK_NOTHING: number; - /** - * Read-only. - */ - const PICK_ENTITIES: number; - /** - * Read-only. - */ - const PICK_OVERLAYS: number; - /** - * Read-only. - */ - const PICK_AVATARS: number; - /** - * Read-only. - */ - const PICK_HUD: number; - /** - * Read-only. - */ - const PICK_COARSE: number; - /** - * Read-only. - */ - const PICK_INCLUDE_INVISIBLE: number; - /** - * Read-only. - */ - const PICK_INCLUDE_NONCOLLIDABLE: number; - /** - * Read-only. - */ - const PICK_ALL_INTERSECTIONS: number; - /** - * Read-only. - */ - const INTERSECTED_NONE: number; - /** - * Read-only. - */ - const INTERSECTED_ENTITY: number; - /** - * Read-only. - */ - const INTERSECTED_OVERLAY: number; - /** - * Read-only. - */ - const INTERSECTED_AVATAR: number; - /** - * Read-only. - */ - const INTERSECTED_HUD: number; + /** + * @param undefined {Picks.RayPickProperties} + * @returns {number} + */ + function createRayPick(undefined: Picks.RayPickProperties): number; + /** + * @param id {number} + */ + function enableRayPick(id: number): void; + /** + * @param id {number} + */ + function disableRayPick(id: number): void; + /** + * @param id {number} + */ + function removeRayPick(id: number): void; + /** + * @param id {number} + * @returns {RayPickResult} + */ + function getPrevRayPickResult(id: number): RayPickResult; + /** + * @param id {number} + * @param precisionPicking {boolean} + */ + function setPrecisionPicking(id: number, precisionPicking: boolean): void; + /** + * @param id {number} + * @param {Uuid[]) {} ignoreEntities + */ + function setIgnoreItems(id: number, {Uuid[])): void; + /** + * @param id {number} + * @param {Uuid[]) {} includeEntities + */ + function setIncludeItems(id: number, {Uuid[])): void; + /** + * @param id {number} + * @returns {boolean} + */ + function isLeftHand(id: number): boolean; + /** + * @param id {number} + * @returns {boolean} + */ + function isRightHand(id: number): boolean; + /** + * @param id {number} + * @returns {boolean} + */ + function isMouse(id: number): boolean; + /** + * @returns {number} + */ + function PICK_NOTHING(): number; + /** + * @returns {number} + */ + function PICK_ENTITIES(): number; + /** + * @returns {number} + */ + function PICK_OVERLAYS(): number; + /** + * @returns {number} + */ + function PICK_AVATARS(): number; + /** + * @returns {number} + */ + function PICK_HUD(): number; + /** + * @returns {number} + */ + function PICK_COARSE(): number; + /** + * @returns {number} + */ + function PICK_INCLUDE_INVISIBLE(): number; + /** + * @returns {number} + */ + function PICK_INCLUDE_NONCOLLIDABLE(): number; + /** + * @returns {number} + */ + function PICK_ALL_INTERSECTIONS(): number; + /** + * @returns {number} + */ + function INTERSECTED_NONE(): number; + /** + * @returns {number} + */ + function INTERSECTED_ENTITY(): number; + /** + * @returns {number} + */ + function INTERSECTED_OVERLAY(): number; + /** + * @returns {number} + */ + function INTERSECTED_AVATAR(): number; + /** + * @returns {number} + */ + function INTERSECTED_HUD(): number; + /** + * Read-only. + */ + const PICK_NOTHING: number; + /** + * Read-only. + */ + const PICK_ENTITIES: number; + /** + * Read-only. + */ + const PICK_OVERLAYS: number; + /** + * Read-only. + */ + const PICK_AVATARS: number; + /** + * Read-only. + */ + const PICK_HUD: number; + /** + * Read-only. + */ + const PICK_COARSE: number; + /** + * Read-only. + */ + const PICK_INCLUDE_INVISIBLE: number; + /** + * Read-only. + */ + const PICK_INCLUDE_NONCOLLIDABLE: number; + /** + * Read-only. + */ + const PICK_ALL_INTERSECTIONS: number; + /** + * Read-only. + */ + const INTERSECTED_NONE: number; + /** + * Read-only. + */ + const INTERSECTED_ENTITY: number; + /** + * Read-only. + */ + const INTERSECTED_OVERLAY: number; + /** + * Read-only. + */ + const INTERSECTED_AVATAR: number; + /** + * Read-only. + */ + const INTERSECTED_HUD: number; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe AccountServices API contains helper functions related to user connectivity -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe AccountServices API contains helper functions related to user connectivity + */ declare namespace AccountServices { - /** - * @returns {DownloadInfoResult} - */ - function getDownloadInfo(): DownloadInfoResult; - function updateDownloadInfo(): void; - /** - * @returns {boolean} - */ - function isLoggedIn(): boolean; - /** - * @returns {boolean} - */ - function checkAndSignalForAccessToken(): boolean; - function logOut(): void; - /** - * @returns {Signal} - */ - function connected(): Signal; - /** - * @param reason {string} - * @returns {Signal} - */ - function disconnected(reason: string): Signal; - /** - * @param username {string} - * @returns {Signal} - */ - function myUsernameChanged(username: string): Signal; - /** - * @param info {} - * @returns {Signal} - */ - function downloadInfoChanged(info): Signal; - /** - * @param discoverabilityMode {string} - * @returns {Signal} - */ - function findableByChanged(discoverabilityMode: string): Signal; - /** - * @param loggedIn {boolean} - * @returns {Signal} - */ - function loggedInChanged(loggedIn: boolean): Signal; - /** - * Read-only. - */ - let username: string; - /** - * Read-only. - */ - let loggedIn: boolean; - let findableBy: string; - /** - * Read-only. - */ - let metaverseServerURL: string; + /** + * @returns {DownloadInfoResult} + */ + function getDownloadInfo(): DownloadInfoResult; + function updateDownloadInfo(): void; + /** + * @returns {boolean} + */ + function isLoggedIn(): boolean; + /** + * @returns {boolean} + */ + function checkAndSignalForAccessToken(): boolean; + function logOut(): void; + /** + * @returns {Signal} + */ + function connected(): Signal; + /** + * @param reason {string} + * @returns {Signal} + */ + function disconnected(reason: string): Signal; + /** + * @param username {string} + * @returns {Signal} + */ + function myUsernameChanged(username: string): Signal; + /** + * @param info {} + * @returns {Signal} + */ + function downloadInfoChanged(info): Signal; + /** + * @param discoverabilityMode {string} + * @returns {Signal} + */ + function findableByChanged(discoverabilityMode: string): Signal; + /** + * @param loggedIn {boolean} + * @returns {Signal} + */ + function loggedInChanged(loggedIn: boolean): Signal; + /** + * Read-only. + */ + let username: string; + /** + * Read-only. + */ + let loggedIn: boolean; + let findableBy: string; + /** + * Read-only. + */ + let metaverseServerURL: string; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Audio API features tools to help control audio contexts and settings. -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Audio API provides facilities to interact with audio inputs and outputs and to play sounds. + */ declare namespace Audio { - /** - * @param device {} - * @param isHMD {boolean} - */ - function setInputDevice(device, isHMD: boolean): void; - /** - * @param device {} - * @param isHMD {boolean} - */ - function setOutputDevice(device, isHMD: boolean): void; - /** - * @param enable {boolean} - */ - function setReverb(enable: boolean): void; - /** - * @param options {AudioEffectOptions} - */ - function setReverbOptions(options: AudioEffectOptions): void; - /** - * @param filename {string} - * @returns {boolean} - */ - function startRecording(filename: string): boolean; - function stopRecording(): void; - /** - * @returns {boolean} - */ - function getRecording(): boolean; - /** - * @returns {Signal} - */ - function nop(): Signal; - /** - * @param isMuted {boolean} - * @returns {Signal} - */ - function mutedChanged(isMuted: boolean): Signal; - /** - * @param isEnabled {boolean} - * @returns {Signal} - */ - function noiseReductionChanged(isEnabled: boolean): Signal; - /** - * @param volume {number} - * @returns {Signal} - */ - function inputVolumeChanged(volume: number): Signal; - /** - * @param level {number} - * @returns {Signal} - */ - function inputLevelChanged(level: number): Signal; - /** - * @param context {string} - * @returns {Signal} - */ - function contextChanged(context: string): Signal; - /** - * @returns {Signal} - */ - function onContextChanged(): Signal; - /** - * @param sound {} - * @param injectorOptions {} [injectorOptions=null] - * @returns {object} - */ - function playSound(sound, injectorOptions): object; - /** - * @param sound {} - * @param position {} - * @returns {object} - */ - function playSystemSound(sound, position): object; - /** - * @param stereo {boolean} - * @returns {boolean} - */ - function setStereoInput(stereo: boolean): boolean; - /** - * @returns {boolean} - */ - function isStereoInput(): boolean; - /** - * The client has been muted by the mixer. - * @returns {Signal} - */ - function mutedByMixer(): Signal; - /** - * The entire environment has been muted by the mixer. - * @returns {Signal} - */ - function environmentMuted(): Signal; - /** - * The client has received its first packet from the audio mixer. - * @returns {Signal} - */ - function receivedFirstPacket(): Signal; - /** - * The client has been disconnected from the audio mixer. - * @returns {Signal} - */ - function disconnected(): Signal; - /** - * The noise gate has opened. - * @returns {Signal} - */ - function noiseGateOpened(): Signal; - /** - * The noise gate has closed. - * @returns {Signal} - */ - function noiseGateClosed(): Signal; - /** - * A frame of mic input audio has been received and processed. - * @param inputSamples {} - * @returns {Signal} - */ - function inputReceived(inputSamples): Signal; - let muted: boolean; - let noiseReduction: boolean; - let inputVolume: number; - /** - * Read-only. - */ - let inputLevel: number; - /** - * Read-only. - */ - let context: string; - /** - * Read-only. - */ - let devices; + /** + * @param device {object} + * @param isHMD {boolean} + */ + function setInputDevice(device: object, isHMD: boolean): void; + /** + * @param device {object} + * @param isHMD {boolean} + */ + function setOutputDevice(device: object, isHMD: boolean): void; + /** + * Enable or disable reverberation. Reverberation is done by the client, on the post-mix audio. The reverberation options + * come from either the domain's audio zone if used — configured on the server — or as scripted by Audio.setReverbOptions. + * @param enable {boolean} true to enable reverberation, false to disable. + */ + function setReverb(enable: boolean): void; + /** + * Configure reverberation options. Use Audio.setReverb to enable or disable reverberation. + * @param options {AudioEffectOptions} The reverberation options. + */ + function setReverbOptions(options: AudioEffectOptions): void; + /** + * Starts making an audio recording of the audio being played in-world (i.e., not local-only audio) to a file in WAV format. + * @param filename {string} The path and name of the file to make the recording in. Should have a .wav + * extension. The file is overwritten if it already exists. + * @returns {boolean} + */ + function startRecording(filename: string): boolean; + /** + * Finish making an audio recording started with Audio.startRecording. + */ + function stopRecording(): void; + /** + * Check whether an audio recording is currently being made. + * @returns {boolean} + */ + function getRecording(): boolean; + /** + * @returns {Signal} + */ + function nop(): Signal; + /** + * Triggered when the audio input is muted or unmuted. + * @param isMuted {boolean} true if the audio input is muted, otherwise false. + * @returns {Signal} + */ + function mutedChanged(isMuted: boolean): Signal; + /** + * Triggered when the audio input noise reduction is enabled or disabled. + * @param isEnabled {boolean} true if audio input noise reduction is enabled, otherwise false. + * @returns {Signal} + */ + function noiseReductionChanged(isEnabled: boolean): Signal; + /** + * Triggered when the input audio volume changes. + * @param volume {number} The requested volume to be applied to the audio input, range 0.0 – + * 1.0. The resulting value of Audio.inputVolume depends on the capabilities of the device: for example, the volume can't be changed on some devices, and others might only support values of 0.0 and 1.0. + * @returns {Signal} + */ + function inputVolumeChanged(volume: number): Signal; + /** + * Triggered when the input audio level changes. + * @param level {number} The loudness of the input audio, range 0.0 (no sound) – 1.0 (the + * onset of clipping). + * @returns {Signal} + */ + function inputLevelChanged(level: number): Signal; + /** + * Triggered when the current context of the audio changes. + * @param context {string} The current context of the audio: either "Desktop" or "HMD". + * @returns {Signal} + */ + function contextChanged(context: string): Signal; + function onContextChanged(): void; + /** + * Starts playing — "injecting" — the content of an audio file. The sound is played globally (sent to the audio + * mixer) so that everyone hears it, unless the injectorOptions has localOnly set to true in which case only the client hears the sound played. No sound is played if sent to the audio mixer but the client is not connected to an audio mixer. The AudioInjector object returned by the function can be used to control the playback and get information about its current state. + * @param sound {SoundObject} The content of an audio file, loaded using {@link SoundCache.getSound}. See + * {@link SoundObject} for supported formats. + * @param injectorOptions {AudioInjector.AudioInjectorOptions} [injectorOptions={}] Audio injector configuration. + * @returns {AudioInjector} + */ + function playSound(sound: SoundObject, injectorOptions: AudioInjector.AudioInjectorOptions): AudioInjector; + /** + * Start playing the content of an audio file, locally (isn't sent to the audio mixer). This is the same as calling + * Audio.playSound with AudioInjector.AudioInjectorOptions localOnly set true and the specified position. + * @param sound {SoundObject} The content of an audio file, loaded using {@link SoundCache.getSound}. See + * {@link SoundObject} for supported formats. + * @param position {Vec3} The position in the domain to play the sound. + * @returns {AudioInjector} + */ + function playSystemSound(sound: SoundObject, position: Vec3): AudioInjector; + /** + * Set whether or not the audio input should be used in stereo. If the audio input does not support stereo then setting a + * value of true has no effect. + * @param stereo {boolean} true if the audio input should be used in stereo, otherwise false. + */ + function setStereoInput(stereo: boolean): void; + /** + * Get whether or not the audio input is used in stereo. + * @returns {boolean} + */ + function isStereoInput(): boolean; + /** + * Triggered when the client is muted by the mixer because their loudness value for the noise background has reached the + * threshold set for the domain in the server settings. + * @returns {Signal} + */ + function mutedByMixer(): Signal; + /** + * Triggered when the client is muted by the mixer because they're within a certain radius (50m) of someone who requested + * the mute through Developer > Audio > Mute Environment. + * @returns {Signal} + */ + function environmentMuted(): Signal; + /** + * Triggered when the client receives its first packet from the audio mixer. + * @returns {Signal} + */ + function receivedFirstPacket(): Signal; + /** + * Triggered when the client is disconnected from the audio mixer. + * @returns {Signal} + */ + function disconnected(): Signal; + /** + * Triggered when the noise gate is opened: the input audio signal is no longer blocked (fully attenuated) because it has + * risen above an adaptive threshold set just above the noise floor. Only occurs if Audio.noiseReduction is true. + * @returns {Signal} + */ + function noiseGateOpened(): Signal; + /** + * Triggered when the noise gate is closed: the input audio signal is blocked (fully attenuated) because it has fallen + * below an adaptive threshold set just above the noise floor. Only occurs if Audio.noiseReduction is true. + * @returns {Signal} + */ + function noiseGateClosed(): Signal; + /** + * Triggered when a frame of audio input is processed. + * @param inputSamples {Int16Array} The audio input processed. + * @returns {Signal} + */ + function inputReceived(inputSamples: Int16Array): Signal; + /** + * Triggered when the input audio use changes between mono and stereo. + * @param isStereo {boolean} true if the input audio is stereo, otherwise false. + * @returns {Signal} + */ + function isStereoInputChanged(isStereo: boolean): Signal; + /** + * true if the audio input is muted, otherwise false. + */ + let muted: boolean; + /** + * true if noise reduction is enabled, otherwise false. When + * enabled, the input audio signal is blocked (fully attenuated) when it falls below an adaptive threshold set just above the noise floor. + */ + let noiseReduction: boolean; + /** + * The loudness of the audio input, range 0.0 (no sound) – + * 1.0 (the onset of clipping). Read-only. + */ + let inputLevel: number; + /** + * Adjusts the volume of the input audio; range 0.0 – 1.0. + * If set to a value, the resulting value depends on the input device: for example, the volume can't be changed on some devices, and others might only support values of 0.0 and 1.0. + */ + let inputVolume: number; + /** + * true if the input audio is being used in stereo, otherwise + * false. Some devices do not support stereo, in which case the value is always false. + */ + let isStereoInput: boolean; + /** + * The current context of the audio: either "Desktop" or "HMD". + * Read-only. + */ + let context: string; + /** + * Read-only. Deprecated: This property is deprecated and will be + * removed. + */ + let devices: object; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Clipboard API enables you to export and import entities to and from JSON files. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Clipboard API enables you to export and import entities to and from JSON files. + */ declare namespace Clipboard { - /** - * Compute the extents of the contents held in the clipboard. - * @returns {Vec3} - */ - function getContentsDimensions(): Vec3; - /** - * Compute the largest dimension of the extents of the contents held in the clipboard. - * @returns {number} - */ - function getClipboardContentsLargestDimension(): number; - /** - * Import entities from a JSON file containing entity data into the clipboard. - * You can generate a JSON file using Clipboard.exportEntities. - * @param filename {string} Path and name of file to import. - * @returns {boolean} - */ - function importEntities(filename: string): boolean; - /** - * Export the entities specified to a JSON file. - * @param filename {string} Path and name of the file to export the entities to. Should have the extension ".json". - * @param entityIDs {Array.} Array of IDs of the entities to export. - * @returns {boolean} - */ - function exportEntities(filename: string, entityIDs: Array.): boolean; - /** - * Export the entities with centers within a cube to a JSON file. - * @param filename {string} Path and name of the file to export the entities to. Should have the extension ".json". - * @param x {number} X-coordinate of the cube center. - * @param y {number} Y-coordinate of the cube center. - * @param z {number} Z-coordinate of the cube center. - * @param scale {number} Half dimension of the cube. - * @returns {boolean} - */ - function exportEntities(filename: string, x: number, y: number, z: number, scale: number): boolean; - /** - * Paste the contents of the clipboard into the world. - * @param position {Vec3} Position to paste the clipboard contents at. - * @returns {Array.} - */ - function pasteEntities(position: Vec3): Array.; + /** + * Compute the extents of the contents held in the clipboard. + * @returns {Vec3} + */ + function getContentsDimensions(): Vec3; + /** + * Compute the largest dimension of the extents of the contents held in the clipboard. + * @returns {number} + */ + function getClipboardContentsLargestDimension(): number; + /** + * Import entities from a JSON file containing entity data into the clipboard. + * You can generate a JSON file using Clipboard.exportEntities. + * @param filename {string} Path and name of file to import. + * @returns {boolean} + */ + function importEntities(filename: string): boolean; + /** + * Export the entities specified to a JSON file. + * @param filename {string} Path and name of the file to export the entities to. Should have the extension ".json". + * @param entityIDs {Array.} Array of IDs of the entities to export. + * @returns {boolean} + */ + function exportEntities(filename: string, entityIDs: Array.): boolean; + /** + * Export the entities with centers within a cube to a JSON file. + * @param filename {string} Path and name of the file to export the entities to. Should have the extension ".json". + * @param x {number} X-coordinate of the cube center. + * @param y {number} Y-coordinate of the cube center. + * @param z {number} Z-coordinate of the cube center. + * @param scale {number} Half dimension of the cube. + * @returns {boolean} + */ + function exportEntities(filename: string, x: number, y: number, z: number, scale: number): boolean; + /** + * Paste the contents of the clipboard into the world. + * @param position {Vec3} Position to paste the clipboard contents at. + * @returns {Array.} + */ + function pasteEntities(position: Vec3): Array.; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Controller API provides facilities to interact with computer and controller hardware. -* -Functions - -Properties - - Controller.getActions - Controller.getHardware - Controller.getStandard - - -Mappings - - Controller.disableMapping - Controller.enableMapping - Controller.loadMapping - Controller.newMapping - Controller.parseMapping - - -Input, Hardware, and Action Reflection - - Controller.findAction - Controller.findDevice - Controller.getActionNames - Controller.getAllActions - Controller.getAvailableInputs - Controller.getDeviceName - Controller.getDeviceNames - - -Input, Hardware, and Action Events - - Controller.actionEvent - Controller.hardwareChanged - Controller.inputEvent - - -Mouse, Keyboard, and Touch Events - - Controller.keyPressEvent - Controller.keyReleaseEvent - Controller.mouseDoublePressEvent - Controller.mouseMoveEvent - Controller.mousePressEvent - Controller.mouseReleaseEvent - Controller.touchBeginEvent - Controller.touchEndEvent - Controller.touchUpdateEvent - Controller.wheelEvent - - -Control Capturing - - Controller.captureMouseEvents - Controller.captureTouchEvents - Controller.captureWheelEvents - Controller.releaseMouseEvents - Controller.releaseTouchEvents - Controller.releaseWheelEvents - - -Action Capturing - - Controller.captureActionEvents - Controller.captureEntityClickEvents - Controller.captureJoystick - Controller.captureKeyEvents - Controller.releaseActionEvents - Controller.releaseEntityClickEvents - Controller.releaseJoystick - Controller.releaseKeyEvents - - -Controller and Action Values - - Controller.getValue - Controller.getAxisValue - Controller.getPoseValue - Controller.getButtonValue for a particular device - Controller.getAxisValue(0) for a particular device - Controller.getPoseValue(0) for a particular device - Controller.getActionValue - - -Haptics - - Controller.triggerHapticPulse - Controller.triggerHapticPulseOnDevice - Controller.triggerShortHapticPulse - Controller.triggerShortHapticPulseOnDevice - - -Display Information - - Controller.getViewportDimensions - Controller.getRecommendedHUDRect - - -Virtual Game Pad - - Controller.setVPadEnabled - Controller.setVPadHidden - Controller.setVPadExtraBottomMargin - - -Input Recordings - - Controller.startInputRecording - Controller.stopInputRecording - Controller.saveInputRecording - Controller.getInputRecorderSaveDirectory - Controller.loadInputRecording - Controller.startInputPlayback - Controller.stopInputPlayback - - -Entity Methods: - -The default scripts implement hand controller actions that use Entities.callEntityMethod to call entity script -methods, if present in the entity being interacted with. - - - - Method NameDescriptionExample - - - - startFarTriggercontinueFarTriggerstopFarTrigger - These methods are called when a user is more than 0.3m away from the entity, the entity is triggerable, and the - user starts, continues, or stops squeezing the trigger. - - A light switch that can be toggled on and off from a distance. - - - startNearTriggercontinueNearTriggerstopNearTrigger - These methods are called when a user is less than 0.3m away from the entity, the entity is triggerable, and the - user starts, continues, or stops squeezing the trigger. - A doorbell that can be rung when a user is near. - - - startDistanceGrabcontinueDistanceGrab - These methods are called when a user is more than 0.3m away from the entity, the entity is either cloneable, or - grabbable and not locked, and the user starts or continues to squeeze the trigger. - A comet that emits icy particle trails when a user is dragging it through the sky. - - - startNearGrabcontinueNearGrab - These methods are called when a user is less than 0.3m away from the entity, the entity is either cloneable, or - grabbable and not locked, and the user starts or continues to squeeze the trigger. - A ball that glows when it's being held close. - - - releaseGrab - This method is called when a user releases the trigger when having been either distance or near grabbing an - entity. - Turn off the ball glow or comet trail with the user finishes grabbing it. - - - startEquipcontinueEquipreleaseEquip - These methods are called when a user starts, continues, or stops equipping an entity. - A glass that stays in the user's hand after the trigger is clicked. - - - -All the entity methods are called with the following two arguments: - -The entity ID. -A string, "hand,userID" — where "hand" is "left" or "right", and "userID" - is the user's MyAvatar. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Controller API provides facilities to interact with computer and controller hardware. + * Functions Properties Controller.getActions Controller.getHardware Controller.getStandard Mappings Controller.disableMapping Controller.enableMapping Controller.loadMapping Controller.newMapping Controller.parseMapping Input, Hardware, and Action Reflection Controller.findAction Controller.findDevice Controller.getActionNames Controller.getAllActions Controller.getAvailableInputs Controller.getDeviceName Controller.getDeviceNames Input, Hardware, and Action Events Controller.actionEvent Controller.hardwareChanged Controller.inputEvent Mouse, Keyboard, and Touch Events Controller.keyPressEvent Controller.keyReleaseEvent Controller.mouseDoublePressEvent Controller.mouseMoveEvent Controller.mousePressEvent Controller.mouseReleaseEvent Controller.touchBeginEvent Controller.touchEndEvent Controller.touchUpdateEvent Controller.wheelEvent Control Capturing Controller.captureMouseEvents Controller.captureTouchEvents Controller.captureWheelEvents Controller.releaseMouseEvents Controller.releaseTouchEvents Controller.releaseWheelEvents Action Capturing Controller.captureActionEvents Controller.captureEntityClickEvents Controller.captureJoystick Controller.captureKeyEvents Controller.releaseActionEvents Controller.releaseEntityClickEvents Controller.releaseJoystick Controller.releaseKeyEvents Controller and Action Values Controller.getValue Controller.getAxisValue Controller.getPoseValue Controller.getActionValue Haptics Controller.triggerHapticPulse Controller.triggerHapticPulseOnDevice Controller.triggerShortHapticPulse Controller.triggerShortHapticPulseOnDevice Display Information Controller.getViewportDimensions Controller.getRecommendedHUDRect Virtual Game Pad Controller.setVPadEnabled Controller.setVPadHidden Controller.setVPadExtraBottomMargin Input Recordings Controller.startInputRecording Controller.stopInputRecording Controller.saveInputRecording Controller.getInputRecorderSaveDirectory Controller.loadInputRecording Controller.startInputPlayback Controller.stopInputPlayback Entity Methods: The default scripts implement hand controller actions that use Entities.callEntityMethod to call entity script methods, if present in the entity being interacted with. Method NameDescriptionExample startFarTriggercontinueFarTriggerstopFarTrigger These methods are called when a user is more than 0.3m away from the entity, the entity is triggerable, and the user starts, continues, or stops squeezing the trigger. A light switch that can be toggled on and off from a distance. startNearTriggercontinueNearTriggerstopNearTrigger These methods are called when a user is less than 0.3m away from the entity, the entity is triggerable, and the user starts, continues, or stops squeezing the trigger. A doorbell that can be rung when a user is near. startDistanceGrabcontinueDistanceGrab These methods are called when a user is more than 0.3m away from the entity, the entity is either cloneable, or grabbable and not locked, and the user starts or continues to squeeze the trigger. A comet that emits icy particle trails when a user is dragging it through the sky. startNearGrabcontinueNearGrab These methods are called when a user is less than 0.3m away from the entity, the entity is either cloneable, or grabbable and not locked, and the user starts or continues to squeeze the trigger. A ball that glows when it's being held close. releaseGrab This method is called when a user releases the trigger when having been either distance or near grabbing an entity. Turn off the ball glow or comet trail with the user finishes grabbing it. startEquipcontinueEquipreleaseEquip These methods are called when a user starts, continues, or stops equipping an entity. A glass that stays in the user's hand after the trigger is clicked. All the entity methods are called with the following two arguments: The entity ID. A string, "hand,userID" — where "hand" is "left" or "right", and "userID" is the user's MyAvatar. + */ declare namespace Controller { - /** - * Disable default Interface actions for a particular key event. - * @param event {KeyEvent} Details of the key event to be captured. The key property must be specified. The - * text property is ignored. The other properties default to false. - */ - function captureKeyEvents(event: KeyEvent): void; - /** - * Re-enable default Interface actions for a particular key event that has been disabled using - * Controller.captureKeyEvents. - * @param event {KeyEvent} Details of the key event to release from capture. The key property must be - * specified. The text property is ignored. The other properties default to false. - */ - function releaseKeyEvents(event: KeyEvent): void; - /** - * Disable default Interface actions for a joystick. - * @param joystickID {number} The integer ID of the joystick. - */ - function captureJoystick(joystickID: number): void; - /** - * Re-enable default Interface actions for a joystick that has been disabled using - * Controller.captureJoystick. - * @param joystickID {number} The integer ID of the joystick. - */ - function releaseJoystick(joystickID: number): void; - /** - * Disable Entities.mousePressOnEntity and Entities.mouseDoublePressOnEntity events on entities. - */ - function captureEntityClickEvents(): void; - /** - * Re-enable Entities.mousePressOnEntity and Entities.mouseDoublePressOnEntity events on entities that were - * disabled using Controller.captureEntityClickEvents. - */ - function releaseEntityClickEvents(): void; - /** - * Get the dimensions of the Interface window's interior if in desktop mode or the HUD surface if in HMD mode. - * @returns {Vec2} - */ - function getViewportDimensions(): Vec2; - /** - * Get the recommended area to position UI on the HUD surface if in HMD mode or Interface's window interior if in desktop - * mode. - * @returns {Rect} - */ - function getRecommendedHUDRect(): Rect; - /** - * Enables or disables the virtual game pad that is displayed on certain devices (e.g., Android). - * @param enable {boolean} If true then the virtual game pad doesn't work, otherwise it does work provided - * that it is not hidden by {@link Controller.setVPadHidden|setVPadHidden}. - */ - function setVPadEnabled(enable: boolean): void; - /** - * Shows or hides the virtual game pad that is displayed on certain devices (e.g., Android). - * @param hidden {boolean} If true then the virtual game pad is hidden, otherwise it is shown. - */ - function setVPadHidden(hidden: boolean): void; - /** - * Sets the amount of extra margin between the virtual game pad that is displayed on certain devices (e.g., Android) and - * the bottom of the display. - * @param margin {number} Integer number of pixels in the extra margin. - */ - function setVPadExtraBottomMargin(margin: number): void; - /** - * Triggered when a keyboard key is pressed. - * @param event {KeyEvent} Details of the key press. - * @returns {Signal} - */ - function keyPressEvent(event: KeyEvent): Signal; - /** - * Triggered when a keyboard key is released from being pressed. - * @param event {KeyEvent} Details of the key release. - * @returns {Signal} - */ - function keyReleaseEvent(event: KeyEvent): Signal; - /** - * Triggered when the mouse moves. - * @param event {MouseEvent} Details of the mouse movement. - * @returns {Signal} - */ - function mouseMoveEvent(event: MouseEvent): Signal; - /** - * Triggered when a mouse button is pressed. - * @param event {MouseEvent} Details of the button press. - * @returns {Signal} - */ - function mousePressEvent(event: MouseEvent): Signal; - /** - * Triggered when a mouse button is double-pressed. - * @param event {MouseEvent} Details of the button double-press. - * @returns {Signal} - */ - function mouseDoublePressEvent(event: MouseEvent): Signal; - /** - * Triggered when a mouse button is released from being pressed. - * @param event {MouseEvent} Details of the button release. - * @returns {Signal} - */ - function mouseReleaseEvent(event: MouseEvent): Signal; - /** - * Triggered when a touch event starts in the Interface window on a touch-enabled display or device. - * @param event {TouchEvent} Details of the touch begin. - * @returns {Signal} - */ - function touchBeginEvent(event: TouchEvent): Signal; - /** - * Triggered when a touch event ends in the Interface window on a touch-enabled display or device. - * @param event {TouchEvent} Details of the touch end. - * @returns {Signal} - */ - function touchEndEvent(event: TouchEvent): Signal; - /** - * Triggered when a touch event update occurs in the Interface window on a touch-enabled display or device. - * @param event {TouchEvent} Details of the touch update. - * @returns {Signal} - */ - function touchUpdateEvent(event: TouchEvent): Signal; - /** - * Triggered when the mouse wheel is rotated. - * @param event {WheelEvent} Details of the wheel movement. - * @returns {Signal} - */ - function wheelEvent(event: WheelEvent): Signal; - /** - * Get a list of all available actions. - * @returns {Array.} - */ - function getAllActions(): Array.; - /** - * Get a list of all available inputs for a hardware device. - * @param deviceID {number} Integer ID of the hardware device. - * @returns {Array.} - */ - function getAvailableInputs(deviceID: number): Array.; - /** - * Find the name of a particular controller from its device ID. - * @param deviceID {number} The integer ID of the device. - * @returns {string} - */ - function getDeviceName(deviceID: number): string; - /** - * Get the current value of an action. - * @param actionID {number} The integer ID of the action. - * @returns {number} - */ - function getActionValue(actionID: number): number; - /** - * Find the ID of a specific controller from its device name. - * @param deviceName {string} The name of the device to find. - * @returns {number} - */ - function findDevice(deviceName: string): number; - /** - * Get the names of all currently available controller devices plus "Actions", "Application", and "Standard". - * @returns {Array.} - */ - function getDeviceNames(): Array.; - /** - * Find the ID of an action from its name. - * @param actionName {string} The name of the action: one of the {@link Controller.Actions} property names. - * @returns {number} - */ - function findAction(actionName: string): number; - /** - * Get the names of all actions available as properties of Controller.Actions. - * @returns {Array.} - */ - function getActionNames(): Array.; - /** - * Get the value of a controller button or axis output. Note: Also gets the value of a controller axis output. - * @param source {number} The {@link Controller.Standard} or {@link Controller.Hardware} item. - * @returns {number} - */ - function getValue(source: number): number; - /** - * Get the value of a controller axis output. Note: Also gets the value of a controller button output. - * @param source {number} The {@link Controller.Standard} or {@link Controller.Hardware} item. - * @returns {number} - */ - function getAxisValue(source: number): number; - /** - * Get the value of a controller pose output. - * @param source {number} The {@link Controller.Standard} or {@link Controller.Hardware} pose output. - * @returns {Pose} - */ - function getPoseValue(source: number): Pose; - /** - * Get the value of a button on a particular device. - * @param source {StandardButtonChannel} The button to get the value of. - * @param device {number} [device=0] The ID of the hardware device to get the value from. The default value of - * 0 corresponds to Standard. - * @returns {number} - */ - function getButtonValue(source: StandardButtonChannel, device: number): number; - /** - * Get the value of an axis control on a particular device. - * @param source {StandardAxisChannel} The axis to get the value of. - * @param device {number} [device=0] The ID of the hardware device to get the value from. The default value of - * 0 corresponds to Standard. - * @returns {number} - */ - function getAxisValue(source: StandardAxisChannel, device: number): number; - /** - * Get the value of an pose control on a particular device. - * @param source {StandardPoseChannel} The pose to get the value of. - * @param device {number} [device=0] The ID of the hardware device to get the value from. The default value of - * 0 corresponds to Standard. - * @returns {Pose} - */ - function getPoseValue(source: StandardPoseChannel, device: number): Pose; - /** - * Triggers a haptic pulse on connected and enabled devices that have the capability. - * @param strength {number} The strength of the haptic pulse, 0.01.0. - * @param duration {number} The duration of the haptic pulse, in milliseconds. - * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. - */ - function triggerHapticPulse(strength: number, duration: number, hand: Controller.Hand): void; - /** - * Triggers a 250ms haptic pulse on connected and enabled devices that have the capability. - * @param strength {number} The strength of the haptic pulse, 0.01.0. - * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. - */ - function triggerShortHapticPulse(strength: number, hand: Controller.Hand): void; - /** - * Triggers a haptic pulse on a particular device if connected and enabled and it has the capability. - * @param deviceID {number} The ID of the device to trigger the haptic pulse on. - * @param strength {number} The strength of the haptic pulse, 0.01.0. - * @param duration {number} The duration of the haptic pulse, in milliseconds. - * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. - */ - function triggerHapticPulseOnDevice(deviceID: number, strength: number, duration: number, hand: Controller.Hand): void; - /** - * Triggers a 250ms haptic pulse on a particular device if connected and enabled and it has the capability. - * @param deviceID {number} The ID of the device to trigger the haptic pulse on. - * @param strength {number} The strength of the haptic pulse, 0.01.0. - * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. - */ - function triggerShortHapticPulseOnDevice(deviceID: number, strength: number, hand: Controller.Hand): void; - /** - * Create a new controller mapping. Routes can then be added to the mapping using MappingObject methods and - * routed to Standard controls, Actions, or script functions using RouteObject -methods. The mapping can then be enabled using Controller.enableMapping for it to take effect. - * @param mappingName {string} A unique name for the mapping. If not specified a new UUID generated - * by {@link Uuid.generate} is used. - * @returns {MappingObject} - */ - function newMapping(mappingName: string): MappingObject; - /** - * Enable or disable a controller mapping. When enabled, the routes in the mapping have effect. - * @param mappingName {string} The name of the mapping. - * @param enable {boolean} If true then the mapping is enabled, otherwise it is disabled. - */ - function enableMapping(mappingName: string, enable: boolean): void; - /** - * Disable a controller mapping. When disabled, the routes in the mapping have no effect. - * @param mappingName {string} The name of the mapping. - */ - function disableMapping(mappingName: string): void; - /** - * Create a new controller mapping from a Controller.MappingJSON string. Use - * Controller.enableMapping to enable the mapping for it to take effect. - * @param jsonString {string} A JSON string of the {@link Controller.MappingJSON|MappingJSON}. - * @returns {MappingObject} - */ - function parseMapping(jsonString: string): MappingObject; - /** - * Create a new controller mapping from a Controller.MappingJSON JSON file at a URL. Use - * Controller.enableMapping to enable the mapping for it to take effect. - * @param jsonURL {string} The URL the {@link Controller.MappingJSON|MappingJSON} JSON file. - * @returns {MappingObject} - */ - function loadMapping(jsonURL: string): MappingObject; - /** - * Get the Controller.Hardware property tree. Calling this function is the same as using the Controller - * property, Controller.Hardware. - * @returns {Controller.Hardware} - */ - function getHardware(): Controller.Hardware; - /** - * Get the Controller.Actions property tree. Calling this function is the same as using the Controller - * property, Controller.Actions. - * @returns {Controller.Actions} - */ - function getActions(): Controller.Actions; - /** - * Get the Controller.Standard property tree. Calling this function is the same as using the Controller - * property, Controller.Standard. - * @returns {Controller.Standard} - */ - function getStandard(): Controller.Standard; - /** - * Start making a recording of currently active controllers. - */ - function startInputRecording(): void; - /** - * Stop making a recording started by Controller.startInputRecording. - */ - function stopInputRecording(): void; - /** - * Play back the current recording from the beginning. The current recording may have been recorded by - * Controller.startInputRecording and -Controller.stopInputRecording, or loaded by -Controller.loadInputRecording. Playback repeats in a loop until -Controller.stopInputPlayback is called. - */ - function startInputPlayback(): void; - /** - * Stop play back of a recording started by Controller.startInputPlayback. - */ - function stopInputPlayback(): void; - /** - * Save the current recording to a file. The current recording may have been recorded by - * Controller.startInputRecording and -Controller.stopInputRecording, or loaded by -Controller.loadInputRecording. It is saved in the directory returned by -Controller.getInputRecorderSaveDirectory. - */ - function saveInputRecording(): void; - /** - * Load an input recording, ready for play back. - * @param file {string} The path to the recording file, prefixed by "file:///". - */ - function loadInputRecording(file: string): void; - /** - * Get the directory in which input recordings are saved. - * @returns {string} - */ - function getInputRecorderSaveDirectory(): string; - /** - * Disable processing of mouse "move", "press", "double-press", and "release" events into - * Controller.Hardware outputs. - */ - function captureMouseEvents(): void; - /** - * Enable processing of mouse "move", "press", "double-press", and "release" events into - * Controller.Hardware-Keyboard outputs that were disabled using -Controller.captureMouseEvents. - */ - function releaseMouseEvents(): void; - /** - * Disable processing of touch "begin", "update", and "end" events into - * Controller.Hardware, -Controller.Hardware, and -Controller.Hardware outputs. - */ - function captureTouchEvents(): void; - /** - * Enable processing of touch "begin", "update", and "end" events into - * Controller.Hardware, -Controller.Hardware, and -Controller.Hardware outputs that were disabled using -Controller.captureTouchEvents. - */ - function releaseTouchEvents(): void; - /** - * Disable processing of mouse wheel rotation events into Controller.Hardware - * outputs. - */ - function captureWheelEvents(): void; - /** - * Enable processing of mouse wheel rotation events into Controller.Hardware - * outputs that wer disabled using Controller.captureWheelEvents. - */ - function releaseWheelEvents(): void; - /** - * Disable translating and rotating the user's avatar in response to keyboard and controller controls. - */ - function captureActionEvents(): void; - /** - * Enable translating and rotating the user's avatar in response to keyboard and controller controls that were disabled - * using Controller.captureActionEvents. - */ - function releaseActionEvents(): void; - /** - * Triggered when an action occurs. - * @param actionID {number} The ID of the action, per {@link Controller.findAction|findAction}. - * @param value {number} The value associated with the action. - * @returns {Signal} - */ - function actionEvent(actionID: number, value: number): Signal; - /** - * Triggered when there is a new controller input event. - * @param action {number} The input action, per {@link Controller.Standard}. - * @param value {number} The value associated with the input action. - * @returns {Signal} - */ - function inputEvent(action: number, value: number): Signal; - /** - * Triggered when a device is registered or unregistered by a plugin. Not all plugins generate - * hardwareChanged events: for example connecting or disconnecting a mouse will not generate an event but -connecting or disconnecting an Xbox controller will. - * @returns {Signal} - */ - function hardwareChanged(): Signal; - interface MappingJSON { - /** - * The name of the mapping. - */ - name: string; - /** - * An array of routes. - */ - channels: Array.; - } - - interface MappingJSONRoute { - /** - * The name of a Controller.Hardware property name or an axis - * made from them. If a property name, the leading "Controller.Hardware." can be omitted. - */ - from: string; - /** - * If true then peeking is enabled per RouteObject#peek. - */ - peek: boolean; - /** - * If true then debug is enabled per RouteObject#debug. - */ - debug: boolean; - /** - * One or more numeric Controller.Hardware property names which are evaluated - * as booleans and ANDed together. Prepend with a ! to use the logical NOT of the property value. The leading - "Controller.Hardware." can be omitted from the property names. - */ - when: string; - /** - * One or more filters in the route. - */ - filters: Controller.MappingJSONFilter; - /** - * The name of a Controller.Actions or Controller.Standard property. The leading - * "Controller." can be omitted. - */ - to: string; - } - - interface MappingJSONAxis { - /** - * A two-member array of single-member arrays of Controller.Hardware property names. - * The leading "Controller.Hardware." can be omitted from the property names. - */ - makeAxis: Array.>; - } - - interface MappingJSONFilter { - /** - * The name of the filter, being the name of the one of the RouteObject's filter methods. - */ - type: string; - /** - * If the filter method has a first parameter, the property name is the name of that parameter and the - * property value is the value to use. - */ - ?: string; - /** - * If the filter method has a second parameter, the property name is the name of that parameter and - * the property value is the value to use. - */ - ?: string; - } - - /** - * Predefined actions on Interface and the user's avatar. These can be used as end - * points in a RouteObject mapping. A synonym for Controller.Hardware.Actions. - Read-only. - Default mappings are provided from the Controller.Hardware.Keyboard and Controller.Standard to - actions in - - keyboardMouse.json and - - standard.json, respectively. - */ - let Actions: Controller.Actions; - /** - * Standard and hardware-specific controller and computer outputs, plus predefined - * actions on Interface and the user's avatar. The outputs can be mapped to Actions or functions in a - RouteObject mapping. Additionally, hardware-specific controller outputs can be mapped to Standard - controller outputs. Read-only. - */ - let Hardware: Controller.Hardware; - /** - * Standard controller outputs that can be mapped to Actions or - * functions in a RouteObject mapping. Read-only. - Each hardware device has a mapping from its outputs to Controller.Standard items, specified in a JSON file. - For example, - leapmotion.json and - vive.json. - */ - let Standard: Controller.Standard; + interface Hardware-Application { + } + + /** + * Disable default Interface actions for a particular key event. + * @param event {KeyEvent} Details of the key event to be captured. The key property must be specified. The + * text property is ignored. The other properties default to false. + */ + function captureKeyEvents(event: KeyEvent): void; + /** + * Re-enable default Interface actions for a particular key event that has been disabled using + * Controller.captureKeyEvents. + * @param event {KeyEvent} Details of the key event to release from capture. The key property must be + * specified. The text property is ignored. The other properties default to false. + */ + function releaseKeyEvents(event: KeyEvent): void; + /** + * Disable default Interface actions for a joystick. + * @param joystickID {number} The integer ID of the joystick. + */ + function captureJoystick(joystickID: number): void; + /** + * Re-enable default Interface actions for a joystick that has been disabled using + * Controller.captureJoystick. + * @param joystickID {number} The integer ID of the joystick. + */ + function releaseJoystick(joystickID: number): void; + /** + * Disable Entities.mousePressOnEntity and Entities.mouseDoublePressOnEntity events on entities. + */ + function captureEntityClickEvents(): void; + /** + * Re-enable Entities.mousePressOnEntity and Entities.mouseDoublePressOnEntity events on entities that were + * disabled using Controller.captureEntityClickEvents. + */ + function releaseEntityClickEvents(): void; + /** + * Get the dimensions of the Interface window's interior if in desktop mode or the HUD surface if in HMD mode. + * @returns {Vec2} + */ + function getViewportDimensions(): Vec2; + /** + * Get the recommended area to position UI on the HUD surface if in HMD mode or Interface's window interior if in desktop + * mode. + * @returns {Rect} + */ + function getRecommendedHUDRect(): Rect; + /** + * Enables or disables the virtual game pad that is displayed on certain devices (e.g., Android). + * @param enable {boolean} If true then the virtual game pad doesn't work, otherwise it does work provided + * that it is not hidden by {@link Controller.setVPadHidden|setVPadHidden}. + */ + function setVPadEnabled(enable: boolean): void; + /** + * Shows or hides the virtual game pad that is displayed on certain devices (e.g., Android). + * @param hidden {boolean} If true then the virtual game pad is hidden, otherwise it is shown. + */ + function setVPadHidden(hidden: boolean): void; + /** + * Sets the amount of extra margin between the virtual game pad that is displayed on certain devices (e.g., Android) and + * the bottom of the display. + * @param margin {number} Integer number of pixels in the extra margin. + */ + function setVPadExtraBottomMargin(margin: number): void; + /** + * Triggered when a keyboard key is pressed. + * @param event {KeyEvent} Details of the key press. + * @returns {Signal} + */ + function keyPressEvent(event: KeyEvent): Signal; + /** + * Triggered when a keyboard key is released from being pressed. + * @param event {KeyEvent} Details of the key release. + * @returns {Signal} + */ + function keyReleaseEvent(event: KeyEvent): Signal; + /** + * Triggered when the mouse moves. + * @param event {MouseEvent} Details of the mouse movement. + * @returns {Signal} + */ + function mouseMoveEvent(event: MouseEvent): Signal; + /** + * Triggered when a mouse button is pressed. + * @param event {MouseEvent} Details of the button press. + * @returns {Signal} + */ + function mousePressEvent(event: MouseEvent): Signal; + /** + * Triggered when a mouse button is double-pressed. + * @param event {MouseEvent} Details of the button double-press. + * @returns {Signal} + */ + function mouseDoublePressEvent(event: MouseEvent): Signal; + /** + * Triggered when a mouse button is released from being pressed. + * @param event {MouseEvent} Details of the button release. + * @returns {Signal} + */ + function mouseReleaseEvent(event: MouseEvent): Signal; + /** + * Triggered when a touch event starts in the Interface window on a touch-enabled display or device. + * @param event {TouchEvent} Details of the touch begin. + * @returns {Signal} + */ + function touchBeginEvent(event: TouchEvent): Signal; + /** + * Triggered when a touch event ends in the Interface window on a touch-enabled display or device. + * @param event {TouchEvent} Details of the touch end. + * @returns {Signal} + */ + function touchEndEvent(event: TouchEvent): Signal; + /** + * Triggered when a touch event update occurs in the Interface window on a touch-enabled display or device. + * @param event {TouchEvent} Details of the touch update. + * @returns {Signal} + */ + function touchUpdateEvent(event: TouchEvent): Signal; + /** + * Triggered when the mouse wheel is rotated. + * @param event {WheelEvent} Details of the wheel movement. + * @returns {Signal} + */ + function wheelEvent(event: WheelEvent): Signal; + interface Actions { + } + + interface Hardware { + } + + /** + * Get a list of all available actions. + * @returns {Array.} + */ + function getAllActions(): Array.; + /** + * Get a list of all available inputs for a hardware device. + * @param deviceID {number} Integer ID of the hardware device. + * @returns {Array.} + */ + function getAvailableInputs(deviceID: number): Array.; + /** + * Find the name of a particular controller from its device ID. + * @param deviceID {number} The integer ID of the device. + * @returns {string} + */ + function getDeviceName(deviceID: number): string; + /** + * Get the current value of an action. + * @param actionID {number} The integer ID of the action. + * @returns {number} + */ + function getActionValue(actionID: number): number; + /** + * Find the ID of a specific controller from its device name. + * @param deviceName {string} The name of the device to find. + * @returns {number} + */ + function findDevice(deviceName: string): number; + /** + * Get the names of all currently available controller devices plus "Actions", "Application", and "Standard". + * @returns {Array.} + */ + function getDeviceNames(): Array.; + /** + * Find the ID of an action from its name. + * @param actionName {string} The name of the action: one of the {@link Controller.Actions} property names. + * @returns {number} + */ + function findAction(actionName: string): number; + /** + * Get the names of all actions available as properties of Controller.Actions. + * @returns {Array.} + */ + function getActionNames(): Array.; + /** + * Get the value of a controller button or axis output. Note: Also gets the value of a controller axis output. + * @param source {number} The {@link Controller.Standard} or {@link Controller.Hardware} item. + * @returns {number} + */ + function getValue(source: number): number; + /** + * Get the value of a controller axis output. Note: Also gets the value of a controller button output. + * @param source {number} The {@link Controller.Standard} or {@link Controller.Hardware} item. + * @returns {number} + */ + function getAxisValue(source: number): number; + /** + * Get the value of a controller pose output. + * @param source {number} The {@link Controller.Standard} or {@link Controller.Hardware} pose output. + * @returns {Pose} + */ + function getPoseValue(source: number): Pose; + /** + * Triggers a haptic pulse on connected and enabled devices that have the capability. + * @param strength {number} The strength of the haptic pulse, 0.01.0. + * @param duration {number} The duration of the haptic pulse, in milliseconds. + * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. + */ + function triggerHapticPulse(strength: number, duration: number, hand: Controller.Hand): void; + /** + * Triggers a 250ms haptic pulse on connected and enabled devices that have the capability. + * @param strength {number} The strength of the haptic pulse, 0.01.0. + * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. + */ + function triggerShortHapticPulse(strength: number, hand: Controller.Hand): void; + /** + * Triggers a haptic pulse on a particular device if connected and enabled and it has the capability. + * @param deviceID {number} The ID of the device to trigger the haptic pulse on. + * @param strength {number} The strength of the haptic pulse, 0.01.0. + * @param duration {number} The duration of the haptic pulse, in milliseconds. + * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. + */ + function triggerHapticPulseOnDevice(deviceID: number, strength: number, duration: number, hand: Controller.Hand): void; + /** + * Triggers a 250ms haptic pulse on a particular device if connected and enabled and it has the capability. + * @param deviceID {number} The ID of the device to trigger the haptic pulse on. + * @param strength {number} The strength of the haptic pulse, 0.01.0. + * @param hand {Controller.Hand} The hand or hands to trigger the haptic pulse on. + */ + function triggerShortHapticPulseOnDevice(deviceID: number, strength: number, hand: Controller.Hand): void; + /** + * Create a new controller mapping. Routes can then be added to the mapping using MappingObject methods and + * routed to Standard controls, Actions, or script functions using RouteObject methods. The mapping can then be enabled using Controller.enableMapping for it to take effect. + * @param mappingName {string} A unique name for the mapping. If not specified a new UUID generated + * by {@link Uuid.generate} is used. + * @returns {MappingObject} + */ + function newMapping(mappingName: string): MappingObject; + /** + * Enable or disable a controller mapping. When enabled, the routes in the mapping have effect. + * @param mappingName {string} The name of the mapping. + * @param enable {boolean} If true then the mapping is enabled, otherwise it is disabled. + */ + function enableMapping(mappingName: string, enable: boolean): void; + /** + * Disable a controller mapping. When disabled, the routes in the mapping have no effect. + * @param mappingName {string} The name of the mapping. + */ + function disableMapping(mappingName: string): void; + /** + * Create a new controller mapping from a Controller.MappingJSON string. Use + * Controller.enableMapping to enable the mapping for it to take effect. + * @param jsonString {string} A JSON string of the {@link Controller.MappingJSON|MappingJSON}. + * @returns {MappingObject} + */ + function parseMapping(jsonString: string): MappingObject; + /** + * Create a new controller mapping from a Controller.MappingJSON JSON file at a URL. Use + * Controller.enableMapping to enable the mapping for it to take effect. + * @param jsonURL {string} The URL the {@link Controller.MappingJSON|MappingJSON} JSON file. + * @returns {MappingObject} + */ + function loadMapping(jsonURL: string): MappingObject; + /** + * Get the Controller.Hardware property tree. Calling this function is the same as using the Controller + * property, Controller.Hardware. + * @returns {Controller.Hardware} + */ + function getHardware(): Controller.Hardware; + /** + * Get the Controller.Actions property tree. Calling this function is the same as using the Controller + * property, Controller.Actions. + * @returns {Controller.Actions} + */ + function getActions(): Controller.Actions; + /** + * Get the Controller.Standard property tree. Calling this function is the same as using the Controller + * property, Controller.Standard. + * @returns {Controller.Standard} + */ + function getStandard(): Controller.Standard; + /** + * Start making a recording of currently active controllers. + */ + function startInputRecording(): void; + /** + * Stop making a recording started by Controller.startInputRecording. + */ + function stopInputRecording(): void; + /** + * Play back the current recording from the beginning. The current recording may have been recorded by + * Controller.startInputRecording and Controller.stopInputRecording, or loaded by Controller.loadInputRecording. Playback repeats in a loop until Controller.stopInputPlayback is called. + */ + function startInputPlayback(): void; + /** + * Stop play back of a recording started by Controller.startInputPlayback. + */ + function stopInputPlayback(): void; + /** + * Save the current recording to a file. The current recording may have been recorded by + * Controller.startInputRecording and Controller.stopInputRecording, or loaded by Controller.loadInputRecording. It is saved in the directory returned by Controller.getInputRecorderSaveDirectory. + */ + function saveInputRecording(): void; + /** + * Load an input recording, ready for play back. + * @param file {string} The path to the recording file, prefixed by "file:///". + */ + function loadInputRecording(file: string): void; + /** + * Get the directory in which input recordings are saved. + * @returns {string} + */ + function getInputRecorderSaveDirectory(): string; + /** + * Get all the active and enabled (running) input devices + * @returns {Array.} + */ + function getRunningInputDevices(): Array.; + /** + * Disable processing of mouse "move", "press", "double-press", and "release" events into + * Controller.Hardware outputs. + */ + function captureMouseEvents(): void; + /** + * Enable processing of mouse "move", "press", "double-press", and "release" events into + * Controller.Hardware-Keyboard outputs that were disabled using Controller.captureMouseEvents. + */ + function releaseMouseEvents(): void; + /** + * Disable processing of touch "begin", "update", and "end" events into + * Controller.Hardware, Controller.Hardware, and Controller.Hardware outputs. + */ + function captureTouchEvents(): void; + /** + * Enable processing of touch "begin", "update", and "end" events into + * Controller.Hardware, Controller.Hardware, and Controller.Hardware outputs that were disabled using Controller.captureTouchEvents. + */ + function releaseTouchEvents(): void; + /** + * Disable processing of mouse wheel rotation events into Controller.Hardware + * outputs. + */ + function captureWheelEvents(): void; + /** + * Enable processing of mouse wheel rotation events into Controller.Hardware + * outputs that wer disabled using Controller.captureWheelEvents. + */ + function releaseWheelEvents(): void; + /** + * Disable translating and rotating the user's avatar in response to keyboard and controller controls. + */ + function captureActionEvents(): void; + /** + * Enable translating and rotating the user's avatar in response to keyboard and controller controls that were disabled + * using Controller.captureActionEvents. + */ + function releaseActionEvents(): void; + /** + * Triggered when an action occurs. + * @param actionID {number} The ID of the action, per {@link Controller.findAction|findAction}. + * @param value {number} The value associated with the action. + * @returns {Signal} + */ + function actionEvent(actionID: number, value: number): Signal; + /** + * Triggered when there is a new controller input event. + * @param action {number} The input action, per {@link Controller.Standard}. + * @param value {number} The value associated with the input action. + * @returns {Signal} + */ + function inputEvent(action: number, value: number): Signal; + /** + * Triggered when a device is registered or unregistered by a plugin. Not all plugins generate + * hardwareChanged events: for example connecting or disconnecting a mouse will not generate an event but connecting or disconnecting an Xbox controller will. + * @returns {Signal} + */ + function hardwareChanged(): Signal; + /** + * Triggered when a device is enabled/disabled + * Enabling/Disabling Leapmotion on settings/controls will trigger this signal. + * @param deviceName {string} The name of the device that is getting enabled/disabled + * @param isEnabled {boolean} Return if the device is enabled. + * @returns {Signal} + */ + function deviceRunningChanged(deviceName: string, isEnabled: boolean): Signal; + interface Standard { + } + + interface MappingJSON { + /** + * The name of the mapping. + */ + name: string; + /** + * An array of routes. + */ + channels: Array.; + } + + interface MappingJSONRoute { + /** + * The name of a Controller.Hardware property name or an axis + * made from them. If a property name, the leading "Controller.Hardware." can be omitted. + */ + from: string; + /** + * If true then peeking is enabled per RouteObject#peek. + */ + peek: boolean; + /** + * If true then debug is enabled per RouteObject#debug. + */ + debug: boolean; + /** + * One or more numeric Controller.Hardware property names which are evaluated + * as booleans and ANDed together. Prepend with a ! to use the logical NOT of the property value. The leading "Controller.Hardware." can be omitted from the property names. + */ + when: string; + /** + * One or more filters in the route. + */ + filters: Controller.MappingJSONFilter; + /** + * The name of a Controller.Actions or Controller.Standard property. The leading + * "Controller." can be omitted. + */ + to: string; + } + + interface MappingJSONAxis { + /** + * A two-member array of single-member arrays of Controller.Hardware property names. + * The leading "Controller.Hardware." can be omitted from the property names. + */ + makeAxis: Array.>; + } + + interface MappingJSONFilter { + /** + * The name of the filter, being the name of the one of the RouteObject's filter methods. + */ + type: string; + /** + * If the filter method has a first parameter, the property name is the name of that parameter and the + * property value is the value to use. + */ + ?: string; + /** + * If the filter method has a second parameter, the property name is the name of that parameter and + * the property value is the value to use. + */ + ?: string; + } + + interface Hardware-Keyboard { + } + + interface Hardware-OculusTouch { + } + + interface Hardware-Vive { + } + + /** + * Predefined actions on Interface and the user's avatar. These can be used as end + * points in a RouteObject mapping. A synonym for Controller.Hardware.Actions. Read-only. Default mappings are provided from the Controller.Hardware.Keyboard and Controller.Standard to actions in keyboardMouse.json and standard.json, respectively. + */ + let Actions: Controller.Actions; + /** + * Standard and hardware-specific controller and computer outputs, plus predefined + * actions on Interface and the user's avatar. The outputs can be mapped to Actions or functions in a RouteObject mapping. Additionally, hardware-specific controller outputs can be mapped to Standard controller outputs. Read-only. + */ + let Hardware: Controller.Hardware; + /** + * Standard controller outputs that can be mapped to Actions or + * functions in a RouteObject mapping. Read-only. Each hardware device has a mapping from its outputs to Controller.Standard items, specified in a JSON file. For example, leapmotion.json and vive.json. + */ + let Standard: Controller.Standard; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe GooglePoly API allows you to interact with Google Poly models direct from inside High Fidelity. -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ +declare namespace Desktop { + let width: number; + let height: number; + /** + * InteractiveWindow flag for always showing a window on top + */ + const ALWAYS_ON_TOP: number; + /** + * InteractiveWindow flag for hiding the window instead of closing on window close by user + */ + const CLOSE_BUTTON_HIDES: number; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsThe GooglePoly API allows you to interact with Google Poly models direct from inside High Fidelity. + */ declare namespace GooglePoly { - /** - * @param key {string} - */ - function setAPIKey(key: string): void; - /** - * @param keyword {string} - * @param category {string} - * @param format {string} - * @returns {string} - */ - function getAssetList(keyword: string, category: string, format: string): string; - /** - * @param keyword {string} - * @param category {string} - * @returns {string} - */ - function getFBX(keyword: string, category: string): string; - /** - * @param keyword {string} - * @param category {string} - * @returns {string} - */ - function getOBJ(keyword: string, category: string): string; - /** - * @param keyword {string} - * @param category {string} - * @returns {string} - */ - function getBlocks(keyword: string, category: string): string; - /** - * @param keyword {string} - * @param category {string} - * @returns {string} - */ - function getGLTF(keyword: string, category: string): string; - /** - * @param keyword {string} - * @param category {string} - * @returns {string} - */ - function getGLTF2(keyword: string, category: string): string; - /** - * @param keyword {string} - * @param category {string} - * @returns {string} - */ - function getTilt(keyword: string, category: string): string; - /** - * @param input {string} - * @returns {string} - */ - function getModelInfo(input: string): string; + /** + * @param key {string} + */ + function setAPIKey(key: string): void; + /** + * @param keyword {string} + * @param category {string} + * @param format {string} + * @returns {string} + */ + function getAssetList(keyword: string, category: string, format: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getFBX(keyword: string, category: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getOBJ(keyword: string, category: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getBlocks(keyword: string, category: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getGLTF(keyword: string, category: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getGLTF2(keyword: string, category: string): string; + /** + * @param keyword {string} + * @param category {string} + * @returns {string} + */ + function getTilt(keyword: string, category: string): string; + /** + * @param input {string} + * @returns {string} + */ + function getModelInfo(input: string): string; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe HMD API provides access to the HMD used in VR display mode. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe HMD API provides access to the HMD used in VR display mode. + */ declare namespace HMD { - /** - * Calculate the intersection of a ray with the HUD overlay. - * @param position {Vec3} The origin of the ray. - * @param direction {Vec3} The direction of the ray. - * @returns {Vec3} - */ - function calculateRayUICollisionPoint(position: Vec3, direction: Vec3): Vec3; - /** - * Get the 2D HUD overlay coordinates of a 3D point on the HUD overlay. - * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. - * @param position {Vec3} The point on the HUD overlay in world coordinates. - * @returns {Vec2} - */ - function overlayFromWorldPoint(position: Vec3): Vec2; - /** - * Get the 3D world coordinates of a 2D point on the HUD overlay. - * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. - * @param coordinates {Vec2} The point on the HUD overlay in HUD coordinates. - * @returns {Vec3} - */ - function worldPointFromOverlay(coordinates: Vec2): Vec3; - /** - * Get the 2D point on the HUD overlay represented by given spherical coordinates. - * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. -Spherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD -overlay. - * @param sphericalPos {Vec2} The point on the HUD overlay in spherical coordinates. - * @returns {Vec2} - */ - function sphericalToOverlay(sphericalPos: Vec2): Vec2; - /** - * Get the spherical coordinates of a 2D point on the HUD overlay. - * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. -Spherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD -overlay. - * @param overlayPos {Vec2} The point on the HUD overlay in HUD coordinates. - * @returns {Vec2} - */ - function overlayToSpherical(overlayPos: Vec2): Vec2; - /** - * Recenter the HMD HUD to the current HMD position and orientation. - */ - function centerUI(): void; - /** - * Get the name of the HMD audio input device. - * @returns {string} - */ - function preferredAudioInput(): string; - /** - * Get the name of the HMD audio output device. - * @returns {string} - */ - function preferredAudioOutput(): string; - /** - * Check whether there is an HMD available. - * @param name {string} [name=""] The name of the HMD to check for, e.g., "Oculus Rift". The name is the same as - * may be displayed in Interface's "Display" menu. If no name is specified then any HMD matches. - * @returns {boolean} - */ - function isHMDAvailable(name: string): boolean; - /** - * Check whether there is an HMD head controller available. - * @param name {string} [name=""] The name of the HMD head controller to check for, e.g., "Oculus". If no name is - * specified then any HMD head controller matches. - * @returns {boolean} - */ - function isHeadControllerAvailable(name: string): boolean; - /** - * Check whether there are HMD hand controllers available. - * @param name {string} [name=""] The name of the HMD hand controller to check for, e.g., "Oculus". If no name is - * specified then any HMD hand controller matches. - * @returns {boolean} - */ - function isHandControllerAvailable(name: string): boolean; - /** - * Check whether there are specific HMD controllers available. - * @param name {string} The name of the HMD controller to check for, e.g., "OculusTouch". - * @returns {boolean} - */ - function isSubdeviceContainingNameAvailable(name: string): boolean; - /** - * Signal that models of the HMD hand controllers being used should be displayed. The models are displayed at their actual, - * real-world locations. - */ - function requestShowHandControllers(): void; - /** - * Signal that it is no longer necessary to display models of the HMD hand controllers being used. If no other scripts - * want the models displayed then they are no longer displayed. - */ - function requestHideHandControllers(): void; - /** - * Check whether any script wants models of the HMD hand controllers displayed. Requests are made and canceled using - * HMD.requestShowHandControllers and -HMD.requestHideHandControllers. - * @returns {boolean} - */ - function shouldShowHandControllers(): boolean; - /** - * Causes the borders in HUD windows to be enlarged when the laser intersects them in HMD mode. By default, borders are not - * enlarged. - */ - function activateHMDHandMouse(): void; - /** - * Causes the border in HUD windows to no longer be enlarged when the laser intersects them in HMD mode. By default, - * borders are not enlarged. - */ - function deactivateHMDHandMouse(): void; - /** - * Suppress the activation of the HMD-provided keyboard, if any. Successful calls should be balanced with a call to - * HMD.unspressKeyboard within a reasonable amount of time. - * @returns {boolean} - */ - function suppressKeyboard(): boolean; - /** - * Unsuppress the activation of the HMD-provided keyboard, if any. - */ - function unsuppressKeyboard(): void; - /** - * Check whether the HMD-provided keyboard, if any, is visible. - * @returns {boolean} - */ - function isKeyboardVisible(): boolean; - /** - * Closes the tablet if it is open. - */ - function closeTablet(): void; - /** - * Opens the tablet if the tablet is used in the current display mode and it isn't already showing, and sets the tablet to - * contextual mode if requested. In contextual mode, the page displayed on the tablet is wholly controlled by script (i.e., -the user cannot navigate to another). - * @param contextualMode {boolean} [contextualMode=false] If true then the tablet is opened at a specific position and - * orientation already set by the script, otherwise it opens at a position and orientation relative to the user. For - contextual mode, set the world or local position and orientation of the HMD.tabletID overlay. - */ - function openTablet(contextualMode: boolean): void; - /** - * Triggered when a request to show or hide models of the HMD hand controllers is made using - * HMD.requestShowHandControllers or -HMD.requestHideHandControllers. - * @returns {Signal} - */ - function shouldShowHandControllersChanged(): Signal; - /** - * Triggered when the HMD.mounted property value changes. - * @returns {Signal} - */ - function mountedChanged(): Signal; - /** - * Triggered when the HMD.ipdScale property value changes. - * @returns {Signal} - */ - function IPDScaleChanged(): Signal; - /** - * Triggered when Interface's display mode changes and when the user puts on or takes off their HMD. - * @param isHMDMode {boolean} true if the display mode is HMD, otherwise false. This is the - * same value as provided by HMD.active. - * @returns {Signal} - */ - function displayModeChanged(isHMDMode: boolean): Signal; - /** - * The position of the HMD if currently in VR display mode, otherwise - * Vec3. Read-only. - */ - let position: Vec3; - /** - * The orientation of the HMD if currently in VR display mode, otherwise - * Quat. Read-only. - */ - let orientation: Quat; - /** - * true if the display mode is HMD, otherwise false. Read-only. - */ - let active: boolean; - /** - * true if currently in VR display mode and the HMD is being worn, otherwise - * false. Read-only. - */ - let mounted: boolean; - /** - * The real-world height of the user. Read-only. Currently always returns a - * value of 1.755. - */ - let playerHeight: number; - /** - * The real-world height of the user's eyes. Read-only. Currently always returns a - * value of 1.655. - */ - let eyeHeight: number; - /** - * The inter-pupillary distance (distance between eyes) of the user, used for rendering. Defaults to - * the human average of 0.064 unless set by the HMD. Read-only. - */ - let ipd: number; - /** - * A scale factor applied to the ipd property value. - */ - let ipdScale: number; - /** - * true if the tablet is being displayed, false otherwise. - * Read-only. - */ - let showTablet: boolean; - /** - * true if the tablet has been opened in contextual mode, otherwise - * false. In contextual mode, the tablet has been opened at a specific world position and orientation rather - than at a position and orientation relative to the user. Read-only. - */ - let tabletContextualMode: boolean; - /** - * The UUID of the tablet body model overlay. - */ - let tabletID: Uuid; - /** - * The UUID of the tablet's screen overlay. - */ - let tabletScreenID: Uuid; - /** - * The UUID of the tablet's "home" button overlay. - */ - let homeButtonID: Uuid; - /** - * The UUID of the tablet's "home" button highlight overlay. - */ - let homeButtonHighlightID: Uuid; + /** + * Calculate the intersection of a ray with the HUD overlay. + * @param position {Vec3} The origin of the ray. + * @param direction {Vec3} The direction of the ray. + * @returns {Vec3} + */ + function calculateRayUICollisionPoint(position: Vec3, direction: Vec3): Vec3; + /** + * Get the 2D HUD overlay coordinates of a 3D point on the HUD overlay. + * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. + * @param position {Vec3} The point on the HUD overlay in world coordinates. + * @returns {Vec2} + */ + function overlayFromWorldPoint(position: Vec3): Vec2; + /** + * Get the 3D world coordinates of a 2D point on the HUD overlay. + * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. + * @param coordinates {Vec2} The point on the HUD overlay in HUD coordinates. + * @returns {Vec3} + */ + function worldPointFromOverlay(coordinates: Vec2): Vec3; + /** + * Get the 2D point on the HUD overlay represented by given spherical coordinates. + * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. Spherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD overlay. + * @param sphericalPos {Vec2} The point on the HUD overlay in spherical coordinates. + * @returns {Vec2} + */ + function sphericalToOverlay(sphericalPos: Vec2): Vec2; + /** + * Get the spherical coordinates of a 2D point on the HUD overlay. + * 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay. Spherical coordinates are polar coordinates in radians with { x: 0, y: 0 } being the center of the HUD overlay. + * @param overlayPos {Vec2} The point on the HUD overlay in HUD coordinates. + * @returns {Vec2} + */ + function overlayToSpherical(overlayPos: Vec2): Vec2; + /** + * Recenter the HMD HUD to the current HMD position and orientation. + */ + function centerUI(): void; + /** + * Get the name of the HMD audio input device. + * @returns {string} + */ + function preferredAudioInput(): string; + /** + * Get the name of the HMD audio output device. + * @returns {string} + */ + function preferredAudioOutput(): string; + /** + * Check whether there is an HMD available. + * @param name {string} [name=""] The name of the HMD to check for, e.g., "Oculus Rift". The name is the same as + * may be displayed in Interface's "Display" menu. If no name is specified then any HMD matches. + * @returns {boolean} + */ + function isHMDAvailable(name: string): boolean; + /** + * Check whether there is an HMD head controller available. + * @param name {string} [name=""] The name of the HMD head controller to check for, e.g., "Oculus". If no name is + * specified then any HMD head controller matches. + * @returns {boolean} + */ + function isHeadControllerAvailable(name: string): boolean; + /** + * Check whether there are HMD hand controllers available. + * @param name {string} [name=""] The name of the HMD hand controller to check for, e.g., "Oculus". If no name is + * specified then any HMD hand controller matches. + * @returns {boolean} + */ + function isHandControllerAvailable(name: string): boolean; + /** + * Check whether there are specific HMD controllers available. + * @param name {string} The name of the HMD controller to check for, e.g., "OculusTouch". + * @returns {boolean} + */ + function isSubdeviceContainingNameAvailable(name: string): boolean; + /** + * Signal that models of the HMD hand controllers being used should be displayed. The models are displayed at their actual, + * real-world locations. + */ + function requestShowHandControllers(): void; + /** + * Signal that it is no longer necessary to display models of the HMD hand controllers being used. If no other scripts + * want the models displayed then they are no longer displayed. + */ + function requestHideHandControllers(): void; + /** + * Check whether any script wants models of the HMD hand controllers displayed. Requests are made and canceled using + * HMD.requestShowHandControllers and HMD.requestHideHandControllers. + * @returns {boolean} + */ + function shouldShowHandControllers(): boolean; + /** + * Causes the borders in HUD windows to be enlarged when the laser intersects them in HMD mode. By default, borders are not + * enlarged. + */ + function activateHMDHandMouse(): void; + /** + * Causes the border in HUD windows to no longer be enlarged when the laser intersects them in HMD mode. By default, + * borders are not enlarged. + */ + function deactivateHMDHandMouse(): void; + /** + * Suppress the activation of the HMD-provided keyboard, if any. Successful calls should be balanced with a call to + * HMD.unspressKeyboard within a reasonable amount of time. + * @returns {boolean} + */ + function suppressKeyboard(): boolean; + /** + * Unsuppress the activation of the HMD-provided keyboard, if any. + */ + function unsuppressKeyboard(): void; + /** + * Check whether the HMD-provided keyboard, if any, is visible. + * @returns {boolean} + */ + function isKeyboardVisible(): boolean; + /** + * Closes the tablet if it is open. + */ + function closeTablet(): void; + /** + * Opens the tablet if the tablet is used in the current display mode and it isn't already showing, and sets the tablet to + * contextual mode if requested. In contextual mode, the page displayed on the tablet is wholly controlled by script (i.e., the user cannot navigate to another). + * @param contextualMode {boolean} [contextualMode=false] If true then the tablet is opened at a specific position and + * orientation already set by the script, otherwise it opens at a position and orientation relative to the user. For contextual mode, set the world or local position and orientation of the HMD.tabletID overlay. + */ + function openTablet(contextualMode: boolean): void; + /** + * Triggered when a request to show or hide models of the HMD hand controllers is made using + * HMD.requestShowHandControllers or HMD.requestHideHandControllers. + * @returns {Signal} + */ + function shouldShowHandControllersChanged(): Signal; + /** + * Triggered when the HMD.ipdScale property value changes. + * @returns {Signal} + */ + function IPDScaleChanged(): Signal; + /** + * Triggered when Interface's display mode changes and when the user puts on or takes off their HMD. + * @param isHMDMode {boolean} true if the display mode is HMD, otherwise false. This is the + * same value as provided by HMD.active. + * @returns {Signal} + */ + function displayModeChanged(isHMDMode: boolean): Signal; + /** + * Triggered when the HMD.mounted property value changes. + * @returns {Signal} + */ + function mountedChanged(): Signal; + /** + * The position of the HMD if currently in VR display mode, otherwise + * Vec3. Read-only. + */ + let position: Vec3; + /** + * The orientation of the HMD if currently in VR display mode, otherwise + * Quat. Read-only. + */ + let orientation: Quat; + /** + * true if the display mode is HMD, otherwise false. Read-only. + */ + let active: boolean; + /** + * true if currently in VR display mode and the HMD is being worn, otherwise + * false. Read-only. + */ + let mounted: boolean; + /** + * The real-world height of the user. Read-only. Currently always returns a + * value of 1.755. + */ + let playerHeight: number; + /** + * The real-world height of the user's eyes. Read-only. Currently always returns a + * value of 1.655. + */ + let eyeHeight: number; + /** + * The inter-pupillary distance (distance between eyes) of the user, used for rendering. Defaults to + * the human average of 0.064 unless set by the HMD. Read-only. + */ + let ipd: number; + /** + * A scale factor applied to the ipd property value. + */ + let ipdScale: number; + /** + * true if the tablet is being displayed, false otherwise. + * Read-only. + */ + let showTablet: boolean; + /** + * true if the tablet has been opened in contextual mode, otherwise + * false. In contextual mode, the tablet has been opened at a specific world position and orientation rather than at a position and orientation relative to the user. Read-only. + */ + let tabletContextualMode: boolean; + /** + * The UUID of the tablet body model overlay. + */ + let tabletID: Uuid; + /** + * The UUID of the tablet's screen overlay. + */ + let tabletScreenID: Uuid; + /** + * The UUID of the tablet's "home" button overlay. + */ + let homeButtonID: Uuid; + /** + * The UUID of the tablet's "home" button highlight overlay. + */ + let homeButtonHighlightID: Uuid; + /** + * The UUID of the mini tablet's body model overlay. null if not in HMD mode. + */ + let miniTabletID: Uuid; + /** + * The UUID of the mini tablet's screen overlay. null if not in HMD mode. + */ + let miniTabletScreenID: Uuid; + /** + * The hand that the mini tablet is displayed on: 0 for left hand, + * 1 for right hand, -1 if not in HMD mode. + */ + let miniTabletHand: number; + /** + * The size and position of the HMD play area in sensor coordinates. Read-only. + */ + let playArea: Rect; + /** + * The positions of the VR system sensors in sensor coordinates. Read-only. + */ + let sensorPositions: Array.; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Menu API provides access to the menu that is displayed at the top of the window -* on a user's desktop and in the tablet when the "MENU" button is pressed. - - - -Groupings - -A "grouping" provides a way to group a set of menus or menu items together so -that they can all be set visible or invisible as a group. -There are two available groups: "Advanced" and "Developer". -These groupings can be toggled in the "Settings" menu. -If a menu item doesn't belong to a group it is always displayed. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Menu API provides access to the menu that is displayed at the top of the window + * on a user's desktop and in the tablet when the "MENU" button is pressed. Groupings A "grouping" provides a way to group a set of menus or menu items together so that they can all be set visible or invisible as a group. There are two available groups: "Advanced" and "Developer". These groupings can be toggled in the "Settings" menu. If a menu item doesn't belong to a group it is always displayed. + */ declare namespace Menu { - /** - * Add a new top-level menu. - * @param menuName {string} Name that will be displayed for the menu. Nested menus can be described using the ">" symbol. - * @param grouping {string} [grouping=undefined] Name of the grouping, if any, to add this menu to. - */ - function addMenu(menuName: string, grouping: string): void; - /** - * Remove a top-level menu. - * @param menuName {string} Name of the menu to remove. - */ - function removeMenu(menuName: string): void; - /** - * Check whether a top-level menu exists. - * @param menuName {string} Name of the menu to check for existence. - * @returns {boolean} - */ - function menuExists(menuName: string): boolean; - /** - * Add a separator with an unclickable label below it. The separator will be placed at the bottom of the menu. - * If you want to add a separator at a specific point in the menu, use Menu.addMenuItem with -Menu.MenuItemProperties instead. - * @param menuName {string} Name of the menu to add a separator to. - * @param separatorName {string} Name of the separator that will be displayed as the label below the separator line. - */ - function addSeparator(menuName: string, separatorName: string): void; - /** - * Remove a separator from a menu. - * @param menuName {string} Name of the menu to remove the separator from. - * @param separatorName {string} Name of the separator to remove. - */ - function removeSeparator(menuName: string, separatorName: string): void; - /** - * Add a new menu item to a menu. - * @param properties {Menu.MenuItemProperties} Properties of the menu item to create. - */ - function addMenuItem(properties: Menu.MenuItemProperties): void; - /** - * Add a new menu item to a menu. The new item is added at the end of the menu. - * @param menuName {string} Name of the menu to add a menu item to. - * @param menuItem {string} Name of the menu item. This is what will be displayed in the menu. - * @param shortcutKey {string} [shortcutKey=undefined] A shortcut key that can be used to trigger the menu item. - */ - function addMenuItem(menuName: string, menuItem: string, shortcutKey: string): void; - /** - * Remove a menu item from a menu. - * @param menuName {string} Name of the menu to remove a menu item from. - * @param menuItem {string} Name of the menu item to remove. - * Menu.removeMenuItem("Developer", "Test"); - */ - function removeMenuItem(menuName: string, menuItem: string): void; - /** - * Check if a menu item exists. - * @param menuName {string} Name of the menu that the menu item is in. - * @param menuItem {string} Name of the menu item to check for existence of. - * @returns {boolean} - */ - function menuItemExists(menuName: string, menuItem: string): boolean; - /** - * Check whether a checkable menu item is checked. - * @param menuOption {string} The name of the menu item. - * @returns {boolean} - */ - function isOptionChecked(menuOption: string): boolean; - /** - * Set a checkable menu item as checked or unchecked. - * @param menuOption {string} The name of the menu item to modify. - * @param isChecked {boolean} If true, the menu item will be checked, otherwise it will not be checked. - */ - function setIsOptionChecked(menuOption: string, isChecked: boolean): void; - /** - * Trigger the menu item as if the user clicked on it. - * @param menuOption {string} The name of the menu item to trigger. - */ - function triggerOption(menuOption: string): void; - /** - * Check whether a menu or menu item is enabled. If disabled, the item is grayed out and unusable. - * Menus are enabled by default. - * @param menuName {string} The name of the menu or menu item to check. - * @returns {boolean} - */ - function isMenuEnabled(menuName: string): boolean; - /** - * Set a menu or menu item to be enabled or disabled. If disabled, the item is grayed out and unusable. - * @param menuName {string} The name of the menu or menu item to modify. - * @param isEnabled {boolean} If true, the menu will be enabled, otherwise it will be disabled. - */ - function setMenuEnabled(menuName: string, isEnabled: boolean): void; - /** - * Triggered when a menu item is clicked (or triggered by Menu.triggerOption). - * @param menuItem {string} Name of the menu item that was clicked. - * @returns {Signal} - */ - function menuItemEvent(menuItem: string): Signal; - interface MenuItemProperties { - /** - * Name of the menu. Nested menus can be described using the ">" symbol. - */ - menuName: string; - /** - * Name of the menu item. - */ - menuItemName: string; - /** - * Whether or not the menu item is checkable. - */ - isCheckable: boolean; - /** - * Whether or not the menu item is checked. - */ - isChecked: boolean; - /** - * Whether or not the menu item is a separator. - */ - isSeparator: boolean; - /** - * A shortcut key that triggers the menu item. - */ - shortcutKey: string; - /** - * A KeyEvent that specifies a key that triggers the menu item. - */ - shortcutKeyEvent: KeyEvent; - /** - * The position to place the new menu item. An integer number with 0 being the first - * menu item. - */ - position: number; - /** - * The name of the menu item to place this menu item before. - */ - beforeItem: string; - /** - * The name of the menu item to place this menu item after. - */ - afterItem: string; - /** - * The name of grouping to add this menu item to. - */ - grouping: string; - } + /** + * Add a new top-level menu. + * @param menuName {string} Name that will be displayed for the menu. Nested menus can be described using the ">" symbol. + * @param grouping {string} [grouping=undefined] Name of the grouping, if any, to add this menu to. + */ + function addMenu(menuName: string, grouping: string): void; + /** + * Remove a top-level menu. + * @param menuName {string} Name of the menu to remove. + */ + function removeMenu(menuName: string): void; + /** + * Check whether a top-level menu exists. + * @param menuName {string} Name of the menu to check for existence. + * @returns {boolean} + */ + function menuExists(menuName: string): boolean; + /** + * Add a separator with an unclickable label below it. The separator will be placed at the bottom of the menu. + * If you want to add a separator at a specific point in the menu, use Menu.addMenuItem with Menu.MenuItemProperties instead. + * @param menuName {string} Name of the menu to add a separator to. + * @param separatorName {string} Name of the separator that will be displayed as the label below the separator line. + */ + function addSeparator(menuName: string, separatorName: string): void; + /** + * Remove a separator from a menu. + * @param menuName {string} Name of the menu to remove the separator from. + * @param separatorName {string} Name of the separator to remove. + */ + function removeSeparator(menuName: string, separatorName: string): void; + /** + * Add a new menu item to a menu. + * @param properties {Menu.MenuItemProperties} Properties of the menu item to create. + */ + function addMenuItem(properties: Menu.MenuItemProperties): void; + /** + * Add a new menu item to a menu. The new item is added at the end of the menu. + * @param menuName {string} Name of the menu to add a menu item to. + * @param menuItem {string} Name of the menu item. This is what will be displayed in the menu. + * @param shortcutKey {string} [shortcutKey=undefined] A shortcut key that can be used to trigger the menu item. + */ + function addMenuItem(menuName: string, menuItem: string, shortcutKey: string): void; + /** + * Remove a menu item from a menu. + * @param menuName {string} Name of the menu to remove a menu item from. + * @param menuItem {string} Name of the menu item to remove. + * Menu.removeMenuItem("Developer", "Test"); + */ + function removeMenuItem(menuName: string, menuItem: string): void; + /** + * Check if a menu item exists. + * @param menuName {string} Name of the menu that the menu item is in. + * @param menuItem {string} Name of the menu item to check for existence of. + * @returns {boolean} + */ + function menuItemExists(menuName: string, menuItem: string): boolean; + /** + * Check whether a checkable menu item is checked. + * @param menuOption {string} The name of the menu item. + * @returns {boolean} + */ + function isOptionChecked(menuOption: string): boolean; + /** + * Set a checkable menu item as checked or unchecked. + * @param menuOption {string} The name of the menu item to modify. + * @param isChecked {boolean} If true, the menu item will be checked, otherwise it will not be checked. + */ + function setIsOptionChecked(menuOption: string, isChecked: boolean): void; + /** + * Trigger the menu item as if the user clicked on it. + * @param menuOption {string} The name of the menu item to trigger. + */ + function triggerOption(menuOption: string): void; + /** + * Check whether a menu or menu item is enabled. If disabled, the item is grayed out and unusable. + * Menus are enabled by default. + * @param menuName {string} The name of the menu or menu item to check. + * @returns {boolean} + */ + function isMenuEnabled(menuName: string): boolean; + /** + * Set a menu or menu item to be enabled or disabled. If disabled, the item is grayed out and unusable. + * @param menuName {string} The name of the menu or menu item to modify. + * @param isEnabled {boolean} If true, the menu will be enabled, otherwise it will be disabled. + */ + function setMenuEnabled(menuName: string, isEnabled: boolean): void; + /** + * Triggered when a menu item is clicked (or triggered by Menu.triggerOption). + * @param menuItem {string} Name of the menu item that was clicked. + * @returns {Signal} + */ + function menuItemEvent(menuItem: string): Signal; + interface MenuItemProperties { + /** + * Name of the menu. Nested menus can be described using the ">" symbol. + */ + menuName: string; + /** + * Name of the menu item. + */ + menuItemName: string; + /** + * Whether or not the menu item is checkable. + */ + isCheckable: boolean; + /** + * Whether or not the menu item is checked. + */ + isChecked: boolean; + /** + * Whether or not the menu item is a separator. + */ + isSeparator: boolean; + /** + * A shortcut key that triggers the menu item. + */ + shortcutKey: string; + /** + * A KeyEvent that specifies a key that triggers the menu item. + */ + shortcutKeyEvent: KeyEvent; + /** + * The position to place the new menu item. An integer number with 0 being the first + * menu item. + */ + position: number; + /** + * The name of the menu item to place this menu item before. + */ + beforeItem: string; + /** + * The name of the menu item to place this menu item after. + */ + afterItem: string; + /** + * The name of grouping to add this menu item to. + */ + grouping: string; + } } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Selection API provides a means of grouping together avatars, entities, and overlays in named lists. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Selection API provides a means of grouping together avatars, entities, and overlays in named lists. + */ declare namespace Selection { - interface SelectedItemsList { - /** - * The IDs of the avatars in the selection. - */ - avatars: Array.; - /** - * The IDs of the entities in the selection. - */ - entities: Array.; - /** - * The IDs of the overlays in the selection. - */ - overlays: Array.; - } - - interface HighlightStyle { - /** - * Color of the specified highlight region. - */ - outlineUnoccludedColor: Color; - /** - * "" - */ - outlineOccludedColor: Color; - /** - * "" - */ - fillUnoccludedColor-: Color; - /** - * "" - */ - fillOccludedColor-: Color; - /** - * Alpha value ranging from 0.0 (not visible) to 1.0 - * (fully opaque) for the specified highlight region. - */ - outlineUnoccludedAlpha: number; - /** - * "" - */ - outlineOccludedAlpha: number; - /** - * "" - */ - fillUnoccludedAlpha: number; - /** - * "" - */ - fillOccludedAlpha: number; - /** - * Width of the outline, in pixels. - */ - outlineWidth: number; - /** - * true to enable outline smooth fall-off. - */ - isOutlineSmooth: boolean; - } - - /** - * Get the names of all the selection lists. - * @returns {Array.} - */ - function getListNames(): Array.; - /** - * Delete a named selection list. - * @param listName {string} The name of the selection list. - * @returns {boolean} - */ - function removeListFromMap(listName: string): boolean; - /** - * Add an item to a selection list. - * @param listName {string} The name of the selection list to add the item to. - * @param itemType {Selection.ItemType} The type of the item being added. - * @param id {Uuid} The ID of the item to add to the selection. - * @returns {boolean} - */ - function addToSelectedItemsList(listName: string, itemType: Selection.ItemType, id: Uuid): boolean; - /** - * Remove an item from a selection list. - * @param listName {string} The name of the selection list to remove the item from. - * @param itemType {Selection.ItemType} The type of the item being removed. - * @param id {Uuid} The ID of the item to remove. - * @returns {boolean} - */ - function removeFromSelectedItemsList(listName: string, itemType: Selection.ItemType, id: Uuid): boolean; - /** - * Remove all items from a selection. - * @param listName {string} The name of the selection list. - * @returns {boolean} - */ - function clearSelectedItemsList(listName: string): boolean; - /** - * Print out the list of avatars, entities, and overlays in a selection to the debug log (not the script log). - * @param listName {string} The name of the selection list. - */ - function printList(listName: string): void; - /** - * Get the list of avatars, entities, and overlays stored in a selection list. - * @param listName {string} The name of the selection list. - * @returns {Selection.SelectedItemsList} - */ - function getSelectedItemsList(listName: string): Selection.SelectedItemsList; - /** - * Get the names of the highlighted selection lists. - * @returns {Array.} - */ - function getHighlightedListNames(): Array.; - /** - * Enable highlighting for a selection list. - * If the selection list doesn't exist, it will be created. -All objects in the list will be displayed with the highlight effect specified. -The function can be called several times with different values in the style to modify it. -Note: This function implicitly calls Selection.enableListToScene. - * @param listName {string} The name of the selection list. - * @param highlightStyle {Selection.HighlightStyle} The highlight style. - * @returns {boolean} - */ - function enableListHighlight(listName: string, highlightStyle: Selection.HighlightStyle): boolean; - /** - * Disable highlighting for the selection list. - * If the selection list doesn't exist or wasn't enabled for highlighting then nothing happens and false is -returned. -Note: This function implicitly calls Selection.disableListToScene. - * @param listName {string} The name of the selection list. - * @returns {boolean} - */ - function disableListHighlight(listName: string): boolean; - /** - * Enable scene selection for the selection list. - * If the Selection doesn't exist, it will be created. -All objects in the list will be sent to a scene selection. - * @param listName {string} The name of the selection list. - * @returns {boolean} - */ - function enableListToScene(listName: string): boolean; - /** - * Disable scene selection for the named selection. - * If the selection list doesn't exist or wasn't enabled on the scene then nothing happens and false is -returned. - * @param listName {string} The name of the selection list. - * @returns {boolean} - */ - function disableListToScene(listName: string): boolean; - /** - * Get the highlight style values for the a selection list. - * If the selection doesn't exist or hasn't been highlight enabled yet, an empty object is returned. - * @param listName {string} The name of the selection list. - * @returns {Selection.HighlightStyle} - */ - function getListHighlightStyle(listName: string): Selection.HighlightStyle; - /** - * Triggered when a list's content changes. - * @param listName {string} The name of the selection list that changed. - * @returns {Signal} - */ - function selectedItemsListChanged(listName: string): Signal; + interface SelectedItemsList { + /** + * The IDs of the avatars in the selection. + */ + avatars: Array.; + /** + * The IDs of the entities in the selection. + */ + entities: Array.; + /** + * The IDs of the overlays in the selection. + */ + overlays: Array.; + } + + interface HighlightStyle { + /** + * Color of the specified highlight region. + */ + outlineUnoccludedColor: Color; + /** + * "" + */ + outlineOccludedColor: Color; + /** + * "" + */ + fillUnoccludedColor-: Color; + /** + * "" + */ + fillOccludedColor-: Color; + /** + * Alpha value ranging from 0.0 (not visible) to 1.0 + * (fully opaque) for the specified highlight region. + */ + outlineUnoccludedAlpha: number; + /** + * "" + */ + outlineOccludedAlpha: number; + /** + * "" + */ + fillUnoccludedAlpha: number; + /** + * "" + */ + fillOccludedAlpha: number; + /** + * Width of the outline, in pixels. + */ + outlineWidth: number; + /** + * true to enable outline smooth fall-off. + */ + isOutlineSmooth: boolean; + } + + /** + * Get the names of all the selection lists. + * @returns {Array.} + */ + function getListNames(): Array.; + /** + * Delete a named selection list. + * @param listName {string} The name of the selection list. + * @returns {boolean} + */ + function removeListFromMap(listName: string): boolean; + /** + * Add an item to a selection list. + * @param listName {string} The name of the selection list to add the item to. + * @param itemType {Selection.ItemType} The type of the item being added. + * @param id {Uuid} The ID of the item to add to the selection. + * @returns {boolean} + */ + function addToSelectedItemsList(listName: string, itemType: Selection.ItemType, id: Uuid): boolean; + /** + * Remove an item from a selection list. + * @param listName {string} The name of the selection list to remove the item from. + * @param itemType {Selection.ItemType} The type of the item being removed. + * @param id {Uuid} The ID of the item to remove. + * @returns {boolean} + */ + function removeFromSelectedItemsList(listName: string, itemType: Selection.ItemType, id: Uuid): boolean; + /** + * Remove all items from a selection. + * @param listName {string} The name of the selection list. + * @returns {boolean} + */ + function clearSelectedItemsList(listName: string): boolean; + /** + * Print out the list of avatars, entities, and overlays in a selection to the debug log (not the script log). + * @param listName {string} The name of the selection list. + */ + function printList(listName: string): void; + /** + * Get the list of avatars, entities, and overlays stored in a selection list. + * @param listName {string} The name of the selection list. + * @returns {Selection.SelectedItemsList} + */ + function getSelectedItemsList(listName: string): Selection.SelectedItemsList; + /** + * Get the names of the highlighted selection lists. + * @returns {Array.} + */ + function getHighlightedListNames(): Array.; + /** + * Enable highlighting for a selection list. + * If the selection list doesn't exist, it will be created. All objects in the list will be displayed with the highlight effect specified. The function can be called several times with different values in the style to modify it. Note: This function implicitly calls Selection.enableListToScene. + * @param listName {string} The name of the selection list. + * @param highlightStyle {Selection.HighlightStyle} The highlight style. + * @returns {boolean} + */ + function enableListHighlight(listName: string, highlightStyle: Selection.HighlightStyle): boolean; + /** + * Disable highlighting for the selection list. + * If the selection list doesn't exist or wasn't enabled for highlighting then nothing happens and false is returned. Note: This function implicitly calls Selection.disableListToScene. + * @param listName {string} The name of the selection list. + * @returns {boolean} + */ + function disableListHighlight(listName: string): boolean; + /** + * Enable scene selection for the selection list. + * If the Selection doesn't exist, it will be created. All objects in the list will be sent to a scene selection. + * @param listName {string} The name of the selection list. + * @returns {boolean} + */ + function enableListToScene(listName: string): boolean; + /** + * Disable scene selection for the named selection. + * If the selection list doesn't exist or wasn't enabled on the scene then nothing happens and false is returned. + * @param listName {string} The name of the selection list. + * @returns {boolean} + */ + function disableListToScene(listName: string): boolean; + /** + * Get the highlight style values for the a selection list. + * If the selection doesn't exist or hasn't been highlight enabled yet, an empty object is returned. + * @param listName {string} The name of the selection list. + * @returns {Selection.HighlightStyle} + */ + function getListHighlightStyle(listName: string): Selection.HighlightStyle; + /** + * Triggered when a list's content changes. + * @param listName {string} The name of the selection list that changed. + * @returns {Signal} + */ + function selectedItemsListChanged(listName: string): Signal; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Settings API provides a facility to store and retrieve values that persist between Interface runs. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Settings API provides a facility to store and retrieve values that persist between Interface runs. + */ declare namespace Settings { - /** - * Retrieve the value from a named setting. - * @param key {string} The name of the setting. - * @param defaultValue {string} [defaultValue=""] The value to return if the setting doesn't exist. - * @returns {string} - */ - function getValue(key: string, defaultValue: string): string; - /** - * Store a value in a named setting. If the setting already exists its value is overwritten, otherwise a new setting is - * created. If the value is set to null or undefined, the setting is deleted. - * @param key {string} The name of the setting. Be sure to use a unique name if creating a new setting. - * @param value {string} The value to store in the setting. If null or - * undefined is specified, the setting is deleted. - */ - function setValue(key: string, value: string): void; + /** + * Retrieve the value from a named setting. + * @param key {string} The name of the setting. + * @param defaultValue {string} [defaultValue=""] The value to return if the setting doesn't exist. + * @returns {string} + */ + function getValue(key: string, defaultValue: string): string; + /** + * Store a value in a named setting. If the setting already exists its value is overwritten, otherwise a new setting is + * created. If the value is set to null or undefined, the setting is deleted. + * @param key {string} The name of the setting. Be sure to use a unique name if creating a new setting. + * @param value {string} The value to store in the setting. If null or + * undefined is specified, the setting is deleted. + */ + function setValue(key: string, value: string): void; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace Wallet { - function refreshWalletStatus(): void; - /** - * @returns {number} - */ - function getWalletStatus(): number; - /** - * @param entityID {Uuid} - */ - function proveAvatarEntityOwnershipVerification(entityID: Uuid): void; - /** - * @returns {Signal} - */ - function walletStatusChanged(): Signal; - /** - * @returns {Signal} - */ - function walletNotSetup(): Signal; - /** - * @param entityID {Uuid} - * @returns {Signal} - */ - function ownershipVerificationSuccess(entityID: Uuid): Signal; - /** - * @param entityID {Uuid} - * @returns {Signal} - */ - function ownershipVerificationFailed(entityID: Uuid): Signal; - let walletStatus: number; + function refreshWalletStatus(): void; + /** + * @returns {number} + */ + function getWalletStatus(): number; + /** + * @param entityID {Uuid} + */ + function proveAvatarEntityOwnershipVerification(entityID: Uuid): void; + /** + * @returns {Signal} + */ + function walletStatusChanged(): Signal; + /** + * @returns {Signal} + */ + function walletNotSetup(): Signal; + /** + * @param entityID {Uuid} + * @returns {Signal} + */ + function ownershipVerificationSuccess(entityID: Uuid): Signal; + /** + * @param entityID {Uuid} + * @returns {Signal} + */ + function ownershipVerificationFailed(entityID: Uuid): Signal; + let walletStatus: number; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Window API provides various facilities not covered elsewhere: window dimensions, window focus, normal or entity camera -* view, clipboard, announcements, user connections, common dialog boxes, snapshots, file import, domain changes, domain -physics. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Window API provides various facilities not covered elsewhere: window dimensions, window focus, normal or entity camera + * view, clipboard, announcements, user connections, common dialog boxes, snapshots, file import, domain changes, domain physics. + */ declare namespace Window { - /** - * Check if the Interface window has focus. - * @returns {boolean} - */ - function hasFocus(): boolean; - /** - * Make the Interface window have focus. On Windows, if Interface doesn't already have focus, the task bar icon flashes to - * indicate that Interface wants attention but focus isn't taken away from the application that the user is using. - */ - function setFocus(): void; - /** - * Raise the Interface window if it is minimized. If raised, the window gains focus. - */ - function raise(): void; - /** - * Raise the Interface window if it is minimized. If raised, the window gains focus. - */ - function raiseMainWindow(): void; - /** - * Display a dialog with the specified message and an "OK" button. The dialog is non-modal; the script continues without - * waiting for a user response. - * @param message {string} [message=""] The message to display. - */ - function alert(message: string): void; - /** - * Prompt the user to confirm something. Displays a modal dialog with a message plus "Yes" and "No" buttons. - * responds. - * @param message {string} [message=""] The question to display. - * @returns {boolean} - */ - function confirm(message: string): boolean; - /** - * Prompt the user to enter some text. Displays a modal dialog with a message and a text box, plus "OK" and "Cancel" - * buttons. - * @param message {string} The question to display. - * @param defaultText {string} The default answer text. - * @returns {string} - */ - function prompt(message: string, defaultText: string): string; - /** - * Prompt the user to enter some text. Displays a non-modal dialog with a message and a text box, plus "OK" and "Cancel" - * buttons. A Window.promptTextChanged signal is emitted when the user OKs the dialog; no signal -is emitted if the user cancels the dialog. - * @param message {string} [message=""] The question to display. - * @param defaultText {string} [defaultText=""] The default answer text. - */ - function promptAsync(message: string, defaultText: string): void; - /** - * Prompt the user to choose a directory. Displays a modal dialog that navigates the directory tree. - * @param title {string} [title=""] The title to display at the top of the dialog. - * @param directory {string} [directory=""] The initial directory to start browsing at. - * @returns {string} - */ - function browseDir(title: string, directory: string): string; - /** - * Prompt the user to choose a directory. Displays a non-modal dialog that navigates the directory tree. A - * Window.browseDirChanged signal is emitted when a directory is chosen; no signal is emitted if -the user cancels the dialog. - * @param title {string} [title=""] The title to display at the top of the dialog. - * @param directory {string} [directory=""] The initial directory to start browsing at. - */ - function browseDirAsync(title: string, directory: string): void; - /** - * Prompt the user to choose a file. Displays a modal dialog that navigates the directory tree. - * @param title {string} [title=""] The title to display at the top of the dialog. - * @param directory {string} [directory=""] The initial directory to start browsing at. - * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and - * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. - * @returns {string} - */ - function browse(title: string, directory: string, nameFilter: string): string; - /** - * Prompt the user to choose a file. Displays a non-modal dialog that navigates the directory tree. A - * Window.browseChanged signal is emitted when a file is chosen; no signal is emitted if the user -cancels the dialog. - * @param title {string} [title=""] The title to display at the top of the dialog. - * @param directory {string} [directory=""] The initial directory to start browsing at. - * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and - * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. - */ - function browseAsync(title: string, directory: string, nameFilter: string): void; - /** - * Prompt the user to specify the path and name of a file to save to. Displays a model dialog that navigates the directory - * tree and allows the user to type in a file name. - * @param title {string} [title=""] The title to display at the top of the dialog. - * @param directory {string} [directory=""] The initial directory to start browsing at. - * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and - * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. - * @returns {string} - */ - function save(title: string, directory: string, nameFilter: string): string; - /** - * Prompt the user to specify the path and name of a file to save to. Displays a non-model dialog that navigates the - * directory tree and allows the user to type in a file name. A Window.saveFileChanged signal is -emitted when a file is specified; no signal is emitted if the user cancels the dialog. - * @param title {string} [title=""] The title to display at the top of the dialog. - * @param directory {string} [directory=""] The initial directory to start browsing at. - * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and - * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. - */ - function saveAsync(title: string, directory: string, nameFilter: string): void; - /** - * Prompt the user to choose an Asset Server item. Displays a modal dialog that navigates the tree of assets on the Asset - * Server. - * @param title {string} [title=""] The title to display at the top of the dialog. - * @param directory {string} [directory=""] The initial directory to start browsing at. - * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and - * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. - * @returns {string} - */ - function browseAssets(title: string, directory: string, nameFilter: string): string; - /** - * Prompt the user to choose an Asset Server item. Displays a non-modal dialog that navigates the tree of assets on the - * Asset Server. A Window.assetsDirChanged signal is emitted when an asset is chosen; no signal is -emitted if the user cancels the dialog. - * @param title {string} [title=""] The title to display at the top of the dialog. - * @param directory {string} [directory=""] The initial directory to start browsing at. - * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and - * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. - */ - function browseAssetsAsync(title: string, directory: string, nameFilter: string): void; - /** - * Open the Asset Browser dialog. If a file to upload is specified, the user is prompted to enter the folder and name to - * map the file to on the asset server. - * @param uploadFile {string} [uploadFile=""] The path and name of a file to upload to the asset server. - */ - function showAssetServer(uploadFile: string): void; - /** - * Get Interface's build number. - * @returns {string} - */ - function checkVersion(): string; - /** - * Get the signature for Interface's protocol version. - * @returns {string} - */ - function protocolSignature(): string; - /** - * Copies text to the operating system's clipboard. - * @param text {string} The text to copy to the operating system's clipboard. - */ - function copyToClipboard(text: string): void; - /** - * Takes a snapshot of the current Interface view from the primary camera. When a still image only is captured, - * Window.stillSnapshotTaken is emitted; when a still image plus moving images are captured, -Window.processingGifStarted and Window.processingGifCompleted -are emitted. The path to store the snapshots and the length of the animated GIF to capture are specified in Settings > -NOTE: to provide a non-default value - all previous parameters must be provided. -General > Snapshots. - * @param notify {boolean} [notify=true] This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} - * signal. - * @param includeAnimated {boolean} [includeAnimated=false] If true, a moving image is captured as an animated GIF in addition - * to a still image. - * @param aspectRatio {number} [aspectRatio=0] The width/height ratio of the snapshot required. If the value is 0 the - * full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the - dimensions is adjusted in order to match the aspect ratio. - * @param filename {string} [filename=""] If this parameter is not given, the image will be saved as 'hifi-snap-by--YYYY-MM-DD_HH-MM-SS'. - * If this parameter is "" then the image will be saved as ".jpg". - Otherwise, the image will be saved to this filename, with an appended ".jpg". - */ - function takeSnapshot(notify: boolean, includeAnimated: boolean, aspectRatio: number, filename: string): void; - /** - * Takes a still snapshot of the current view from the secondary camera that can be set up through the Render API. - * NOTE: to provide a non-default value - all previous parameters must be provided. - * @param filename {string} [filename=""] If this parameter is not given, the image will be saved as 'hifi-snap-by--YYYY-MM-DD_HH-MM-SS'. - * If this parameter is "" then the image will be saved as ".jpg". - Otherwise, the image will be saved to this filename, with an appended ".jpg". - -var filename = QString(); - */ - function takeSecondaryCameraSnapshot(filename: string): void; - /** - * Emit a Window.connectionAdded or a Window.connectionError signal that - * indicates whether or not a user connection was successfully made using the Web API. - * @param success {boolean} If true then {@link Window.connectionAdded|connectionAdded} is emitted, otherwise - * {@link Window.connectionError|connectionError} is emitted. - * @param description {string} Descriptive text about the connection success or error. This is sent in the signal emitted. - */ - function makeConnection(success: boolean, description: string): void; - /** - * Display a notification message. Notifications are displayed in panels by the default script, nofications.js. An - * Window.announcement signal is emitted when this function is called. - * @param message {string} The announcement message. - */ - function displayAnnouncement(message: string): void; - /** - * Prepare a snapshot ready for sharing. A Window.snapshotShared signal is emitted when the snapshot - * has been prepared. - * @param path {string} The path and name of the image file to share. - * @param href {string} [href=""] The metaverse location where the snapshot was taken. - */ - function shareSnapshot(path: string, href: string): void; - /** - * Check to see if physics is active for you in the domain you're visiting - there is a delay between your arrival at a - * domain and physics becoming active for you in that domain. - * @returns {boolean} - */ - function isPhysicsEnabled(): boolean; - /** - * Set what to show on the PC display: normal view or entity camera view. The entity camera is configured using - * Camera.setCameraEntity and Camera. - * @param texture {Window.DisplayTexture} The view to display. - * @returns {boolean} - */ - function setDisplayTexture(texture: Window.DisplayTexture): boolean; - /** - * Check if a 2D point is within the desktop window if in desktop mode, or the drawable area of the HUD overlay if in HMD - * mode. - * @param point {Vec2} The point to check. - * @returns {boolean} - */ - function isPointOnDesktopWindow(point: Vec2): boolean; - /** - * Get the size of the drawable area of the Interface window if in desktop mode or the HMD rendering surface if in HMD mode. - * @returns {Vec2} - */ - function getDeviceSize(): Vec2; - /** - * Open a non-modal message box that can have a variety of button combinations. See also, - * Window.updateMessageBox and Window.closeMessageBox. - * @param title {string} The title to display for the message box. - * @param text {string} Text to display in the message box. - * @param buttons {Window.MessageBoxButton} The buttons to display on the message box; one or more button values added - * together. - * @param defaultButton {Window.MessageBoxButton} The button that has focus when the message box is opened. - * @returns {number} - */ - function openMessageBox(title: string, text: string, buttons: Window.MessageBoxButton, defaultButton: Window.MessageBoxButton): number; - /** - * Update the content of a message box that was opened with Window.openMessageBox. - * @param id {number} The ID of the message box. - * @param title {string} The title to display for the message box. - * @param text {string} Text to display in the message box. - * @param buttons {Window.MessageBoxButton} The buttons to display on the message box; one or more button values added - * together. - * @param defaultButton {Window.MessageBoxButton} The button that has focus when the message box is opened. - */ - function updateMessageBox(id: number, title: string, text: string, buttons: Window.MessageBoxButton, defaultButton: Window.MessageBoxButton): void; - /** - * Close a message box that was opened with Window.openMessageBox. - * @param id {number} The ID of the message box. - */ - function closeMessageBox(id: number): void; - /** - * Triggered when you change the domain you're visiting. Warning: Is not emitted if you go to a domain - * that isn't running. - * @param domainURL {string} The domain's URL. - * @returns {Signal} - */ - function domainChanged(domainURL: string): Signal; - /** - * Triggered when you try to navigate to a *.json, *.svo, or *.svo.json URL in a Web browser within Interface. - * @param url {string} The URL of the file to import. - * @returns {Signal} - */ - function svoImportRequested(url: string): Signal; - /** - * Triggered when you try to visit a domain but are refused connection. - * @param reasonMessage {string} A description of the refusal. - * @param reasonCode {Window.ConnectionRefusedReason} Integer number that enumerates the reason for the refusal. - * @param extraInfo {string} Extra information about the refusal. - * @returns {Signal} - */ - function domainConnectionRefused(reasonMessage: string, reasonCode: Window.ConnectionRefusedReason, extraInfo: string): Signal; - /** - * Triggered when a still snapshot has been taken by calling Window.takeSnapshot with - * includeAnimated = false or Window.takeSecondaryCameraSnapshot. - * @param pathStillSnapshot {string} The path and name of the snapshot image file. - * @param notify {boolean} The value of the notify parameter that {@link Window.takeSnapshot|takeSnapshot} - * was called with. - * @returns {Signal} - */ - function stillSnapshotTaken(pathStillSnapshot: string, notify: boolean): Signal; - /** - * Triggered when a snapshot submitted via Window.shareSnapshot is ready for sharing. The snapshot - * may then be shared via the Account.metaverseServerURL Web API. - * @param isError {boolean} true if an error was encountered preparing the snapshot for sharing, otherwise - * false. - * @param reply {string} JSON-formatted information about the snapshot. - * @returns {Signal} - */ - function snapshotShared(isError: boolean, reply: string): Signal; - /** - * Triggered when the snapshot images have been captured by Window.takeSnapshot and the GIF is - * starting to be processed. - * @param pathStillSnapshot {string} The path and name of the still snapshot image file. - * @returns {Signal} - */ - function processingGifStarted(pathStillSnapshot: string): Signal; - /** - * Triggered when a GIF has been prepared of the snapshot images captured by Window.takeSnapshot. - * @param pathAnimatedSnapshot {string} The path and name of the moving snapshot GIF file. - * @returns {Signal} - */ - function processingGifCompleted(pathAnimatedSnapshot: string): Signal; - /** - * Triggered when you've successfully made a user connection. - * @param message {string} A description of the success. - * @returns {Signal} - */ - function connectionAdded(message: string): Signal; - /** - * Triggered when you failed to make a user connection. - * @param message {string} A description of the error. - * @returns {Signal} - */ - function connectionError(message: string): Signal; - /** - * Triggered when a message is announced by Window.displayAnnouncement. - * @param message {string} The message text. - * @returns {Signal} - */ - function announcement(message: string): Signal; - /** - * Triggered when the user closes a message box that was opened with Window.openMessageBox. - * @param id {number} The ID of the message box that was closed. - * @param button {number} The button that the user clicked. If the user presses Esc, the Cancel button value is returned, - * whether or not the Cancel button is displayed in the message box. - * @returns {Signal} - */ - function messageBoxClosed(id: number, button: number): Signal; - /** - * Triggered when the user chooses a directory in a Window.browseDirAsync dialog. - * @param directory {string} The directory the user chose in the dialog. - * @returns {Signal} - */ - function browseDirChanged(directory: string): Signal; - /** - * Triggered when the user chooses an asset in a Window.browseAssetsAsync dialog. - * @param asset {string} The path and name of the asset the user chose in the dialog. - * @returns {Signal} - */ - function assetsDirChanged(asset: string): Signal; - /** - * Triggered when the user specifies a file in a Window.saveAsync dialog. - * @param filename {string} The path and name of the file that the user specified in the dialog. - * @returns {Signal} - */ - function saveFileChanged(filename: string): Signal; - /** - * Triggered when the user chooses a file in a Window.browseAsync dialog. - * @param filename {string} The path and name of the file the user chose in the dialog. - * @returns {Signal} - */ - function browseChanged(filename: string): Signal; - /** - * Triggered when the user OKs a Window.promptAsync dialog. - * @param text {string} The text the user entered in the dialog. - * @returns {Signal} - */ - function promptTextChanged(text: string): Signal; - /** - * Triggered when the position or size of the Interface window changes. - * @param geometry {Rect} The position and size of the drawable area of the Interface window. - * @returns {Signal} - */ - function geometryChanged(geometry: Rect): Signal; - /** - * The width of the drawable area of the Interface window (i.e., without borders or other - * chrome), in pixels. Read-only. - */ - let innerWidth: number; - /** - * The height of the drawable area of the Interface window (i.e., without borders or other - * chrome), in pixels. Read-only. - */ - let innerHeight: number; - /** - * Provides facilities for working with your current metaverse location. See location. - */ - let location: object; - /** - * The x display coordinate of the top left corner of the drawable area of the Interface window. - * Read-only. - */ - let x: number; - /** - * The y display coordinate of the top left corner of the drawable area of the Interface window. - * Read-only. - */ - let y: number; + /** + * Check if the Interface window has focus. + * @returns {boolean} + */ + function hasFocus(): boolean; + /** + * Make the Interface window have focus. On Windows, if Interface doesn't already have focus, the task bar icon flashes to + * indicate that Interface wants attention but focus isn't taken away from the application that the user is using. + */ + function setFocus(): void; + /** + * Raise the Interface window if it is minimized. If raised, the window gains focus. + */ + function raise(): void; + /** + * Display a dialog with the specified message and an "OK" button. The dialog is non-modal; the script continues without + * waiting for a user response. + * @param message {string} [message=""] The message to display. + */ + function alert(message: string): void; + /** + * Prompt the user to confirm something. Displays a modal dialog with a message plus "Yes" and "No" buttons. + * responds. + * @param message {string} [message=""] The question to display. + * @returns {boolean} + */ + function confirm(message: string): boolean; + /** + * Prompt the user to enter some text. Displays a modal dialog with a message and a text box, plus "OK" and "Cancel" + * buttons. + * @param message {string} The question to display. + * @param defaultText {string} The default answer text. + * @returns {string} + */ + function prompt(message: string, defaultText: string): string; + /** + * Prompt the user to enter some text. Displays a non-modal dialog with a message and a text box, plus "OK" and "Cancel" + * buttons. A Window.promptTextChanged signal is emitted when the user OKs the dialog; no signal is emitted if the user cancels the dialog. + * @param message {string} [message=""] The question to display. + * @param defaultText {string} [defaultText=""] The default answer text. + */ + function promptAsync(message: string, defaultText: string): void; + /** + * Prompt the user to choose a directory. Displays a modal dialog that navigates the directory tree. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @returns {string} + */ + function browseDir(title: string, directory: string): string; + /** + * Prompt the user to choose a directory. Displays a non-modal dialog that navigates the directory tree. A + * Window.browseDirChanged signal is emitted when a directory is chosen; no signal is emitted if the user cancels the dialog. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + */ + function browseDirAsync(title: string, directory: string): void; + /** + * Prompt the user to choose a file. Displays a modal dialog that navigates the directory tree. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + * @returns {string} + */ + function browse(title: string, directory: string, nameFilter: string): string; + /** + * Prompt the user to choose a file. Displays a non-modal dialog that navigates the directory tree. A + * Window.browseChanged signal is emitted when a file is chosen; no signal is emitted if the user cancels the dialog. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + */ + function browseAsync(title: string, directory: string, nameFilter: string): void; + /** + * Prompt the user to specify the path and name of a file to save to. Displays a model dialog that navigates the directory + * tree and allows the user to type in a file name. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + * @returns {string} + */ + function save(title: string, directory: string, nameFilter: string): string; + /** + * Prompt the user to specify the path and name of a file to save to. Displays a non-model dialog that navigates the + * directory tree and allows the user to type in a file name. A Window.saveFileChanged signal is emitted when a file is specified; no signal is emitted if the user cancels the dialog. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + */ + function saveAsync(title: string, directory: string, nameFilter: string): void; + /** + * Prompt the user to choose an Asset Server item. Displays a modal dialog that navigates the tree of assets on the Asset + * Server. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + * @returns {string} + */ + function browseAssets(title: string, directory: string, nameFilter: string): string; + /** + * Prompt the user to choose an Asset Server item. Displays a non-modal dialog that navigates the tree of assets on the + * Asset Server. A Window.assetsDirChanged signal is emitted when an asset is chosen; no signal is emitted if the user cancels the dialog. + * @param title {string} [title=""] The title to display at the top of the dialog. + * @param directory {string} [directory=""] The initial directory to start browsing at. + * @param nameFilter {string} [nameFilter=""] The types of files to display. Examples: "*.json" and + * "Images (*.png *.jpg *.svg)". All files are displayed if a filter isn't specified. + */ + function browseAssetsAsync(title: string, directory: string, nameFilter: string): void; + /** + * Open the Asset Browser dialog. If a file to upload is specified, the user is prompted to enter the folder and name to + * map the file to on the asset server. + * @param uploadFile {string} [uploadFile=""] The path and name of a file to upload to the asset server. + */ + function showAssetServer(uploadFile: string): void; + /** + * Get Interface's build number. + * @returns {string} + */ + function checkVersion(): string; + /** + * Get the signature for Interface's protocol version. + * @returns {string} + */ + function protocolSignature(): string; + /** + * Copies text to the operating system's clipboard. + * @param text {string} The text to copy to the operating system's clipboard. + */ + function copyToClipboard(text: string): void; + /** + * Takes a snapshot of the current Interface view from the primary camera. When a still image only is captured, + * Window.stillSnapshotTaken is emitted; when a still image plus moving images are captured, Window.processingGifStarted and Window.processingGifCompleted are emitted. The path to store the snapshots and the length of the animated GIF to capture are specified in Settings > General > Snapshots. If user has supplied a specific filename for the snapshot: If the user's requested filename has a suffix that's contained within SUPPORTED_IMAGE_FORMATS, DON'T append ".jpg" to the filename. QT will save the image in the format associated with the filename's suffix. If you want lossless Snapshots, supply a `.png` filename. Otherwise, use `.jpeg` or `.jpg`. Otherwise, ".jpg" is appended to the user's requested filename so that the image is saved in JPG format. If the user hasn't supplied a specific filename for the snapshot: Save the snapshot in JPG format according to FILENAME_PATH_FORMAT + * @param notify {boolean} [notify=true] This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} + * signal. + * @param includeAnimated {boolean} [includeAnimated=false] If true, a moving image is captured as an animated GIF in addition + * to a still image. + * @param aspectRatio {number} [aspectRatio=0] The width/height ratio of the snapshot required. If the value is 0 the + * full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the dimensions is adjusted in order to match the aspect ratio. + * @param filename {string} [filename=""] If this parameter is not given, the image will be saved as "hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS". + * If this parameter is "" then the image will be saved as ".jpg". Otherwise, the image will be saved to this filename, with an appended ".jpg". + */ + function takeSnapshot(notify: boolean, includeAnimated: boolean, aspectRatio: number, filename: string): void; + /** + * Takes a still snapshot of the current view from the secondary camera that can be set up through the Render API. + * @param notify {boolean} [notify=true] This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} + * signal. + * @param filename {string} [filename=""] If this parameter is not given, the image will be saved as "hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS". + * If this parameter is "" then the image will be saved as ".jpg". Otherwise, the image will be saved to this filename, with an appended ".jpg". + */ + function takeSecondaryCameraSnapshot(notify: boolean, filename: string): void; + /** + * Takes a 360° snapshot at a given position for the secondary camera. The secondary camera does not need to have been + * set up. + * @param cameraPosition {Vec3} The position of the camera for the snapshot. + * @param cubemapOutputFormat {boolean} [cubemapOutputFormat=false] If true then the snapshot is saved as a cube map image, + * otherwise is saved as an equirectangular image. + * @param notify {boolean} [notify=true] This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} + * signal. + * @param filename {string} [filename=""] If this parameter is not supplied, the image will be saved as "hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS". + * If this parameter is "" then the image will be saved as ".jpg". Otherwise, the image will be saved to this filename, with an appended ".jpg". + */ + function takeSecondaryCamera360Snapshot(cameraPosition: Vec3, cubemapOutputFormat: boolean, notify: boolean, filename: string): void; + /** + * Emit a Window.connectionAdded or a Window.connectionError signal that + * indicates whether or not a user connection was successfully made using the Web API. + * @param success {boolean} If true then {@link Window.connectionAdded|connectionAdded} is emitted, otherwise + * {@link Window.connectionError|connectionError} is emitted. + * @param description {string} Descriptive text about the connection success or error. This is sent in the signal emitted. + */ + function makeConnection(success: boolean, description: string): void; + /** + * Display a notification message. Notifications are displayed in panels by the default script, nofications.js. An + * Window.announcement signal is emitted when this function is called. + * @param message {string} The announcement message. + */ + function displayAnnouncement(message: string): void; + /** + * Prepare a snapshot ready for sharing. A Window.snapshotShared signal is emitted when the snapshot + * has been prepared. + * @param path {string} The path and name of the image file to share. + * @param href {string} [href=""] The metaverse location where the snapshot was taken. + */ + function shareSnapshot(path: string, href: string): void; + /** + * Check to see if physics is active for you in the domain you're visiting - there is a delay between your arrival at a + * domain and physics becoming active for you in that domain. + * @returns {boolean} + */ + function isPhysicsEnabled(): boolean; + /** + * Set what to show on the PC display: normal view or entity camera view. The entity camera is configured using + * Camera.setCameraEntity and Camera. + * @param texture {Window.DisplayTexture} The view to display. + * @returns {boolean} + */ + function setDisplayTexture(texture: Window.DisplayTexture): boolean; + /** + * Check if a 2D point is within the desktop window if in desktop mode, or the drawable area of the HUD overlay if in HMD + * mode. + * @param point {Vec2} The point to check. + * @returns {boolean} + */ + function isPointOnDesktopWindow(point: Vec2): boolean; + /** + * Get the size of the drawable area of the Interface window if in desktop mode or the HMD rendering surface if in HMD mode. + * @returns {Vec2} + */ + function getDeviceSize(): Vec2; + /** + * Gets the last domain connection error when a connection is refused. + * @returns {Window.ConnectionRefusedReason} + */ + function getLastDomainConnectionError(): Window.ConnectionRefusedReason; + /** + * Open a non-modal message box that can have a variety of button combinations. See also, + * Window.updateMessageBox and Window.closeMessageBox. + * @param title {string} The title to display for the message box. + * @param text {string} Text to display in the message box. + * @param buttons {Window.MessageBoxButton} The buttons to display on the message box; one or more button values added + * together. + * @param defaultButton {Window.MessageBoxButton} The button that has focus when the message box is opened. + * @returns {number} + */ + function openMessageBox(title: string, text: string, buttons: Window.MessageBoxButton, defaultButton: Window.MessageBoxButton): number; + /** + * Open a URL in the Interface window or other application, depending on the URL's scheme. If the URL starts with + * hifi:// then that URL is navigated to in Interface, otherwise the URL is opened in the application the OS associates with the URL's scheme (e.g., a Web browser for http://). + * @param url {string} The URL to open. + */ + function openUrl(url: string): void; + /** + * Open an Android activity and optionally return back to the scene when the activity is completed. Android only. + * @param activityName {string} The name of the activity to open: one of "Home", "Login", or + * "Privacy Policy". + * @param backToScene {boolean} If true, the user is automatically returned back to the scene when the + * activity is completed. + */ + function openAndroidActivity(activityName: string, backToScene: boolean): void; + /** + * Update the content of a message box that was opened with Window.openMessageBox. + * @param id {number} The ID of the message box. + * @param title {string} The title to display for the message box. + * @param text {string} Text to display in the message box. + * @param buttons {Window.MessageBoxButton} The buttons to display on the message box; one or more button values added + * together. + * @param defaultButton {Window.MessageBoxButton} The button that has focus when the message box is opened. + */ + function updateMessageBox(id: number, title: string, text: string, buttons: Window.MessageBoxButton, defaultButton: Window.MessageBoxButton): void; + /** + * Close a message box that was opened with Window.openMessageBox. + * @param id {number} The ID of the message box. + */ + function closeMessageBox(id: number): void; + /** + * Triggered when you change the domain you're visiting. Warning: Is not emitted if you go to a domain + * that isn't running. + * @param domainURL {string} The domain's URL. + * @returns {Signal} + */ + function domainChanged(domainURL: string): Signal; + /** + * Triggered when you try to navigate to a *.json, *.svo, or *.svo.json URL in a Web browser within Interface. + * @param url {string} The URL of the file to import. + * @returns {Signal} + */ + function svoImportRequested(url: string): Signal; + /** + * Triggered when you try to visit a domain but are refused connection. + * @param reasonMessage {string} A description of the refusal. + * @param reasonCode {Window.ConnectionRefusedReason} Integer number that enumerates the reason for the refusal. + * @param extraInfo {string} Extra information about the refusal. + * @returns {Signal} + */ + function domainConnectionRefused(reasonMessage: string, reasonCode: Window.ConnectionRefusedReason, extraInfo: string): Signal; + /** + * Triggered when you try to visit a domain but are redirected into the error state. + * @param isInErrorState {boolean} If true, the user has been redirected to the error URL. + * @returns {Signal} + */ + function redirectErrorStateChanged(isInErrorState: boolean): Signal; + /** + * Triggered when a still snapshot has been taken by calling Window.takeSnapshot with + * includeAnimated = false or Window.takeSecondaryCameraSnapshot. + * @param pathStillSnapshot {string} The path and name of the snapshot image file. + * @param notify {boolean} The value of the notify parameter that {@link Window.takeSnapshot|takeSnapshot} + * was called with. + * @returns {Signal} + */ + function stillSnapshotTaken(pathStillSnapshot: string, notify: boolean): Signal; + /** + * Triggered when a still 360° snapshot has been taken by calling + * Window.takeSecondaryCamera360Snapshot. + * @param pathStillSnapshot {string} The path and name of the snapshot image file. + * @param notify {boolean} The value of the notify parameter that {@link Window.takeSecondaryCamera360Snapshot|takeSecondaryCamera360Snapshot} + * was called with. + * @returns {Signal} + */ + function snapshot360Taken(pathStillSnapshot: string, notify: boolean): Signal; + /** + * Triggered when a snapshot submitted via Window.shareSnapshot is ready for sharing. The snapshot + * may then be shared via the Account.metaverseServerURL Web API. + * @param isError {boolean} true if an error was encountered preparing the snapshot for sharing, otherwise + * false. + * @param reply {string} JSON-formatted information about the snapshot. + * @returns {Signal} + */ + function snapshotShared(isError: boolean, reply: string): Signal; + /** + * Triggered when the snapshot images have been captured by Window.takeSnapshot and the GIF is + * starting to be processed. + * @param pathStillSnapshot {string} The path and name of the still snapshot image file. + * @returns {Signal} + */ + function processingGifStarted(pathStillSnapshot: string): Signal; + /** + * Triggered when a GIF has been prepared of the snapshot images captured by Window.takeSnapshot. + * @param pathAnimatedSnapshot {string} The path and name of the moving snapshot GIF file. + * @returns {Signal} + */ + function processingGifCompleted(pathAnimatedSnapshot: string): Signal; + /** + * Triggered when you've successfully made a user connection. + * @param message {string} A description of the success. + * @returns {Signal} + */ + function connectionAdded(message: string): Signal; + /** + * Triggered when you failed to make a user connection. + * @param message {string} A description of the error. + * @returns {Signal} + */ + function connectionError(message: string): Signal; + /** + * Triggered when a message is announced by Window.displayAnnouncement. + * @param message {string} The message text. + * @returns {Signal} + */ + function announcement(message: string): Signal; + /** + * Triggered when the user closes a message box that was opened with Window.openMessageBox. + * @param id {number} The ID of the message box that was closed. + * @param button {number} The button that the user clicked. If the user presses Esc, the Cancel button value is returned, + * whether or not the Cancel button is displayed in the message box. + * @returns {Signal} + */ + function messageBoxClosed(id: number, button: number): Signal; + /** + * Triggered when the user chooses a directory in a Window.browseDirAsync dialog. + * @param directory {string} The directory the user chose in the dialog. + * @returns {Signal} + */ + function browseDirChanged(directory: string): Signal; + /** + * Triggered when the user chooses an asset in a Window.browseAssetsAsync dialog. + * @param asset {string} The path and name of the asset the user chose in the dialog. + * @returns {Signal} + */ + function assetsDirChanged(asset: string): Signal; + /** + * Triggered when the user specifies a file in a Window.saveAsync dialog. + * @param filename {string} The path and name of the file that the user specified in the dialog. + * @returns {Signal} + */ + function saveFileChanged(filename: string): Signal; + /** + * Triggered when the user chooses a file in a Window.browseAsync dialog. + * @param filename {string} The path and name of the file the user chose in the dialog. + * @returns {Signal} + */ + function browseChanged(filename: string): Signal; + /** + * Triggered when the user OKs a Window.promptAsync dialog. + * @param text {string} The text the user entered in the dialog. + * @returns {Signal} + */ + function promptTextChanged(text: string): Signal; + /** + * Triggered when the position or size of the Interface window changes. + * @param geometry {Rect} The position and size of the drawable area of the Interface window. + * @returns {Signal} + */ + function geometryChanged(geometry: Rect): Signal; + /** + * The width of the drawable area of the Interface window (i.e., without borders or other + * chrome), in pixels. Read-only. + */ + let innerWidth: number; + /** + * The height of the drawable area of the Interface window (i.e., without borders or other + * chrome), in pixels. Read-only. + */ + let innerHeight: number; + /** + * Provides facilities for working with your current metaverse location. See location. + */ + let location: object; + /** + * The x display coordinate of the top left corner of the drawable area of the Interface window. + * Read-only. + */ + let x: number; + /** + * The y display coordinate of the top left corner of the drawable area of the Interface window. + * Read-only. + */ + let y: number; } /** -* Available in:Interface ScriptsClient Entity ScriptsAPI to help manage your Avatar's input -*/ + * Available in:Interface ScriptsClient Entity ScriptsAPI to help manage your Avatar's input + */ declare namespace AvatarInputs { - /** - * @param loudness {number} - * @returns {number} - */ - function loudnessToAudioLevel(loudness: number): number; - /** - * @param showAudioTools {boolean} - */ - function setShowAudioTools(showAudioTools: boolean): void; - /** - * @returns {Signal} - */ - function cameraEnabledChanged(): Signal; - /** - * @returns {Signal} - */ - function cameraMutedChanged(): Signal; - /** - * @returns {Signal} - */ - function isHMDChanged(): Signal; - /** - * @param show {boolean} - * @returns {Signal} - */ - function showAudioToolsChanged(show: boolean): Signal; - function resetSensors(): void; - function toggleCameraMute(): void; - /** - * Read-only. - */ - let cameraEnabled: boolean; - /** - * Read-only. - */ - let cameraMuted: boolean; - /** - * Read-only. - */ - let isHMD: boolean; - let showAudioTools: boolean; + /** + * @param loudness {number} + * @returns {number} + */ + function loudnessToAudioLevel(loudness: number): number; + /** + * @param showAudioTools {boolean} + */ + function setShowAudioTools(showAudioTools: boolean): void; + /** + * @returns {Signal} + */ + function cameraEnabledChanged(): Signal; + /** + * @returns {Signal} + */ + function cameraMutedChanged(): Signal; + /** + * @returns {Signal} + */ + function isHMDChanged(): Signal; + /** + * @param show {boolean} + * @returns {Signal} + */ + function showAudioToolsChanged(show: boolean): Signal; + function resetSensors(): void; + function toggleCameraMute(): void; + /** + * Read-only. + */ + let cameraEnabled: boolean; + /** + * Read-only. + */ + let cameraMuted: boolean; + /** + * Read-only. + */ + let isHMD: boolean; + let showAudioTools: boolean; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace Snapshot { - /** - * @param location {string} - * @returns {Signal} - */ - function snapshotLocationSet(location: string): Signal; - /** - * @returns {string} - */ - function getSnapshotsLocation(): string; - /** - * @param location {String} - */ - function setSnapshotsLocation(location: String): void; + /** + * @param location {string} + * @returns {Signal} + */ + function snapshotLocationSet(location: string): Signal; + /** + * @returns {string} + */ + function getSnapshotsLocation(): string; + /** + * @param location {String} + */ + function setSnapshotsLocation(location: String): void; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ declare namespace Stats { - /** - * Triggered when the value of the longsubmits property changes. - * @returns {Signal} - */ - function longsubmitsChanged(): Signal; - /** - * Triggered when the value of the longrenders property changes. - * @returns {Signal} - */ - function longrendersChanged(): Signal; - /** - * Triggered when the value of the longframes property changes. - * @returns {Signal} - */ - function longframesChanged(): Signal; - /** - * Triggered when the value of the appdropped property changes. - * @returns {Signal} - */ - function appdroppedChanged(): Signal; - /** - * Triggered when the value of the expanded property changes. - * @returns {Signal} - */ - function expandedChanged(): Signal; - /** - * Triggered when the value of the timingExpanded property changes. - * @returns {Signal} - */ - function timingExpandedChanged(): Signal; - /** - * Triggered when the value of the serverCount property changes. - * @returns {Signal} - */ - function serverCountChanged(): Signal; - /** - * Triggered when the value of the renderrate property changes. - * @returns {Signal} - */ - function renderrateChanged(): Signal; - /** - * Triggered when the value of the presentrate property changes. - * @returns {Signal} - */ - function presentrateChanged(): Signal; - /** - * Triggered when the value of the presentnewrate property changes. - * @returns {Signal} - */ - function presentnewrateChanged(): Signal; - /** - * Triggered when the value of the presentdroprate property changes. - * @returns {Signal} - */ - function presentdroprateChanged(): Signal; - /** - * Triggered when the value of the stutterrate property changes. - * @returns {Signal} - */ - function stutterrateChanged(): Signal; - /** - * Triggered when the value of the gameLoopRate property changes. - * @returns {Signal} - */ - function gameLoopRateChanged(): Signal; - /** - * Triggered when the value of the avatarCount property changes. - * @returns {Signal} - */ - function avatarCountChanged(): Signal; - /** - * Triggered when the value of the updatedAvatarCount property changes. - * @returns {Signal} - */ - function updatedAvatarCountChanged(): Signal; - /** - * Triggered when the value of the notUpdatedAvatarCount property changes. - * @returns {Signal} - */ - function notUpdatedAvatarCountChanged(): Signal; - /** - * Triggered when the value of the packetInCount property changes. - * @returns {Signal} - */ - function packetInCountChanged(): Signal; - /** - * Triggered when the value of the packetOutCount property changes. - * @returns {Signal} - */ - function packetOutCountChanged(): Signal; - /** - * Triggered when the value of the mbpsIn property changes. - * @returns {Signal} - */ - function mbpsInChanged(): Signal; - /** - * Triggered when the value of the mbpsOut property changes. - * @returns {Signal} - */ - function mbpsOutChanged(): Signal; - /** - * Triggered when the value of the assetMbpsIn property changes. - * @returns {Signal} - */ - function assetMbpsInChanged(): Signal; - /** - * Triggered when the value of the assetMbpsOut property changes. - * @returns {Signal} - */ - function assetMbpsOutChanged(): Signal; - /** - * Triggered when the value of the audioPing property changes. - * @returns {Signal} - */ - function audioPingChanged(): Signal; - /** - * Triggered when the value of the avatarPing property changes. - * @returns {Signal} - */ - function avatarPingChanged(): Signal; - /** - * Triggered when the value of the entitiesPing property changes. - * @returns {Signal} - */ - function entitiesPingChanged(): Signal; - /** - * Triggered when the value of the assetPing property changes. - * @returns {Signal} - */ - function assetPingChanged(): Signal; - /** - * Triggered when the value of the messagePing property changes. - * @returns {Signal} - */ - function messagePingChanged(): Signal; - /** - * Triggered when the value of the position property changes. - * @returns {Signal} - */ - function positionChanged(): Signal; - /** - * Triggered when the value of the speed property changes. - * @returns {Signal} - */ - function speedChanged(): Signal; - /** - * Triggered when the value of the yaw property changes. - * @returns {Signal} - */ - function yawChanged(): Signal; - /** - * Triggered when the value of the avatarMixerInKbps property changes. - * @returns {Signal} - */ - function avatarMixerInKbpsChanged(): Signal; - /** - * Triggered when the value of the avatarMixerInPps property changes. - * @returns {Signal} - */ - function avatarMixerInPpsChanged(): Signal; - /** - * Triggered when the value of the avatarMixerOutKbps property changes. - * @returns {Signal} - */ - function avatarMixerOutKbpsChanged(): Signal; - /** - * Triggered when the value of the avatarMixerOutPps property changes. - * @returns {Signal} - */ - function avatarMixerOutPpsChanged(): Signal; - /** - * Triggered when the value of the myAvatarSendRate property changes. - * @returns {Signal} - */ - function myAvatarSendRateChanged(): Signal; - /** - * Triggered when the value of the audioMixerInKbps property changes. - * @returns {Signal} - */ - function audioMixerInKbpsChanged(): Signal; - /** - * Triggered when the value of the audioMixerInPps property changes. - * @returns {Signal} - */ - function audioMixerInPpsChanged(): Signal; - /** - * Triggered when the value of the audioMixerOutKbps property changes. - * @returns {Signal} - */ - function audioMixerOutKbpsChanged(): Signal; - /** - * Triggered when the value of the audioMixerOutPps property changes. - * @returns {Signal} - */ - function audioMixerOutPpsChanged(): Signal; - /** - * Triggered when the value of the audioMixerKbps property changes. - * @returns {Signal} - */ - function audioMixerKbpsChanged(): Signal; - /** - * Triggered when the value of the audioMixerPps property changes. - * @returns {Signal} - */ - function audioMixerPpsChanged(): Signal; - /** - * Triggered when the value of the audioOutboundPPS property changes. - * @returns {Signal} - */ - function audioOutboundPPSChanged(): Signal; - /** - * Triggered when the value of the audioSilentOutboundPPS property changes. - * @returns {Signal} - */ - function audioSilentOutboundPPSChanged(): Signal; - /** - * Triggered when the value of the audioAudioInboundPPS property changes. - * @returns {Signal} - */ - function audioAudioInboundPPSChanged(): Signal; - /** - * Triggered when the value of the audioSilentInboundPPS property changes. - * @returns {Signal} - */ - function audioSilentInboundPPSChanged(): Signal; - /** - * Triggered when the value of the audioPacketLoss property changes. - * @returns {Signal} - */ - function audioPacketLossChanged(): Signal; - /** - * Triggered when the value of the audioCodec property changes. - * @returns {Signal} - */ - function audioCodecChanged(): Signal; - /** - * Triggered when the value of the audioNoiseGate property changes. - * @returns {Signal} - */ - function audioNoiseGateChanged(): Signal; - /** - * Triggered when the value of the entityPacketsInKbps property changes. - * @returns {Signal} - */ - function entityPacketsInKbpsChanged(): Signal; - /** - * Triggered when the value of the downloads property changes. - * @returns {Signal} - */ - function downloadsChanged(): Signal; - /** - * Triggered when the value of the downloadLimit property changes. - * @returns {Signal} - */ - function downloadLimitChanged(): Signal; - /** - * Triggered when the value of the downloadsPending property changes. - * @returns {Signal} - */ - function downloadsPendingChanged(): Signal; - /** - * Triggered when the value of the downloadUrls property changes. - * @returns {Signal} - */ - function downloadUrlsChanged(): Signal; - /** - * Triggered when the value of the processing property changes. - * @returns {Signal} - */ - function processingChanged(): Signal; - /** - * Triggered when the value of the processingPending property changes. - * @returns {Signal} - */ - function processingPendingChanged(): Signal; - /** - * Triggered when the value of the triangles property changes. - * @returns {Signal} - */ - function trianglesChanged(): Signal; - /** - * Triggered when the value of the quads property changes. - * @returns {Signal} - */ - function quadsChanged(): Signal; - /** - * Triggered when the value of the materialSwitches property changes. - * @returns {Signal} - */ - function materialSwitchesChanged(): Signal; - /** - * Triggered when the value of the itemConsidered property changes. - * @returns {Signal} - */ - function itemConsideredChanged(): Signal; - /** - * Triggered when the value of the itemOutOfView property changes. - * @returns {Signal} - */ - function itemOutOfViewChanged(): Signal; - /** - * Triggered when the value of the itemTooSmall property changes. - * @returns {Signal} - */ - function itemTooSmallChanged(): Signal; - /** - * Triggered when the value of the itemRendered property changes. - * @returns {Signal} - */ - function itemRenderedChanged(): Signal; - /** - * Triggered when the value of the shadowConsidered property changes. - * @returns {Signal} - */ - function shadowConsideredChanged(): Signal; - /** - * Triggered when the value of the shadowOutOfView property changes. - * @returns {Signal} - */ - function shadowOutOfViewChanged(): Signal; - /** - * Triggered when the value of the shadowTooSmall property changes. - * @returns {Signal} - */ - function shadowTooSmallChanged(): Signal; - /** - * Triggered when the value of the shadowRendered property changes. - * @returns {Signal} - */ - function shadowRenderedChanged(): Signal; - /** - * Triggered when the value of the sendingMode property changes. - * @returns {Signal} - */ - function sendingModeChanged(): Signal; - /** - * Triggered when the value of the packetStats property changes. - * @returns {Signal} - */ - function packetStatsChanged(): Signal; - /** - * Triggered when the value of the lodStatus property changes. - * @returns {Signal} - */ - function lodStatusChanged(): Signal; - /** - * Triggered when the value of the serverElements property changes. - * @returns {Signal} - */ - function serverElementsChanged(): Signal; - /** - * Triggered when the value of the serverInternal property changes. - * @returns {Signal} - */ - function serverInternalChanged(): Signal; - /** - * Triggered when the value of the serverLeaves property changes. - * @returns {Signal} - */ - function serverLeavesChanged(): Signal; - /** - * Triggered when the value of the localElements property changes. - * @returns {Signal} - */ - function localElementsChanged(): Signal; - /** - * Triggered when the value of the localInternal property changes. - * @returns {Signal} - */ - function localInternalChanged(): Signal; - /** - * Triggered when the value of the localLeaves property changes. - * @returns {Signal} - */ - function localLeavesChanged(): Signal; - /** - * Triggered when the value of the timingStats property changes. - * @returns {Signal} - */ - function timingStatsChanged(): Signal; - /** - * Triggered when the value of the gameUpdateStats property changes. - * @returns {Signal} - */ - function gameUpdateStatsChanged(): Signal; - /** - * Triggered when the value of the glContextSwapchainMemory property changes. - * @returns {Signal} - */ - function glContextSwapchainMemoryChanged(): Signal; - /** - * Triggered when the value of the qmlTextureMemory property changes. - * @returns {Signal} - */ - function qmlTextureMemoryChanged(): Signal; - /** - * Triggered when the value of the texturePendingTransfers property changes. - * @returns {Signal} - */ - function texturePendingTransfersChanged(): Signal; - /** - * Triggered when the value of the gpuBuffers property changes. - * @returns {Signal} - */ - function gpuBuffersChanged(): Signal; - /** - * Triggered when the value of the gpuBufferMemory property changes. - * @returns {Signal} - */ - function gpuBufferMemoryChanged(): Signal; - /** - * Triggered when the value of the gpuTextures property changes. - * @returns {Signal} - */ - function gpuTexturesChanged(): Signal; - /** - * Triggered when the value of the gpuTextureMemory property changes. - * @returns {Signal} - */ - function gpuTextureMemoryChanged(): Signal; - /** - * Triggered when the value of the gpuTextureResidentMemory property changes. - * @returns {Signal} - */ - function gpuTextureResidentMemoryChanged(): Signal; - /** - * Triggered when the value of the gpuTextureFramebufferMemory property changes. - * @returns {Signal} - */ - function gpuTextureFramebufferMemoryChanged(): Signal; - /** - * Triggered when the value of the gpuTextureResourceMemory property changes. - * @returns {Signal} - */ - function gpuTextureResourceMemoryChanged(): Signal; - /** - * Triggered when the value of the gpuTextureResourcePopulatedMemory property changes. - * @returns {Signal} - */ - function gpuTextureResourcePopulatedMemoryChanged(): Signal; - /** - * Triggered when the value of the gpuTextureExternalMemory property changes. - * @returns {Signal} - */ - function gpuTextureExternalMemoryChanged(): Signal; - /** - * Triggered when the value of the gpuTextureMemoryPressureState property changes. - * @returns {Signal} - */ - function gpuTextureMemoryPressureStateChanged(): Signal; - /** - * Triggered when the value of the gpuFreeMemory property changes. - * @returns {Signal} - */ - function gpuFreeMemoryChanged(): Signal; - /** - * Triggered when the value of the gpuFrameTime property changes. - * @returns {Signal} - */ - function gpuFrameTimeChanged(): Signal; - /** - * Triggered when the value of the batchFrameTime property changes. - * @returns {Signal} - */ - function batchFrameTimeChanged(): Signal; - /** - * Triggered when the value of the engineFrameTime property changes. - * @returns {Signal} - */ - function engineFrameTimeChanged(): Signal; - /** - * Triggered when the value of the avatarSimulationTime property changes. - * @returns {Signal} - */ - function avatarSimulationTimeChanged(): Signal; - /** - * Triggered when the value of the rectifiedTextureCount property changes. - * @returns {Signal} - */ - function rectifiedTextureCountChanged(): Signal; - /** - * Triggered when the value of the decimatedTextureCount property changes. - * @returns {Signal} - */ - function decimatedTextureCountChanged(): Signal; - /** - * Triggered when the parent item changes. - * @param parent {object} - * @returns {Signal} - */ - function parentChanged(parent: object): Signal; - /** - * Triggered when the value of the x property changes. - * @returns {Signal} - */ - function xChanged(): Signal; - /** - * Triggered when the value of the y property changes. - * @returns {Signal} - */ - function yChanged(): Signal; - /** - * Triggered when the value of the z property changes. - * @returns {Signal} - */ - function zChanged(): Signal; - /** - * Triggered when the value of the width property changes. - * @returns {Signal} - */ - function widthChanged(): Signal; - /** - * Triggered when the value of the height property changes. - * @returns {Signal} - */ - function heightChanged(): Signal; - /** - * Triggered when the value of the opacity property changes. - * @returns {Signal} - */ - function opacityChanged(): Signal; - /** - * Triggered when the value of the enabled property changes. - * @returns {Signal} - */ - function enabledChanged(): Signal; - /** - * Triggered when the value of the visibleChanged property changes. - * @returns {Signal} - */ - function visibleChanged(): Signal; - /** - * Triggered when the list of visible children changes. - * @returns {Signal} - */ - function visibleChildrenChanged(): Signal; - /** - * Triggered when the value of the state property changes. - * @returns {Signal} - */ - function stateChanged(): Signal; - /** - * Triggered when the position and size of the rectangle containing the children changes. - * @param childrenRect {Rect} - * @returns {Signal} - */ - function childrenRectChanged(childrenRect: Rect): Signal; - /** - * Triggered when the value of the baselineOffset property changes. - * @param baselineOffset {number} - * @returns {Signal} - */ - function baselineOffsetChanged(baselineOffset: number): Signal; - /** - * Triggered when the value of the clip property changes. - * @param clip {boolean} - * @returns {Signal} - */ - function clipChanged(clip: boolean): Signal; - /** - * Triggered when the value of the focus property changes. - * @param focus {boolean} - * @returns {Signal} - */ - function focusChanged(focus: boolean): Signal; - /** - * Triggered when the value of the activeFocus property changes. - * @param activeFocus {boolean} - * @returns {Signal} - */ - function activeFocusChanged(activeFocus: boolean): Signal; - /** - * Triggered when the value of the activeFocusOnTab property changes. - * @param activeFocusOnTab {boolean} - * @returns {Signal} - */ - function activeFocusOnTabChanged(activeFocusOnTab: boolean): Signal; - /** - * Triggered when the value of the rotation property changes. - * @returns {Signal} - */ - function rotationChanged(): Signal; - /** - * Triggered when the value of the scaleChanged property changes. - * @returns {Signal} - */ - function scaleChanged(): Signal; - /** - * Triggered when the value of the transformOrigin property changes. - * @param transformOrigin {number} - * @returns {Signal} - */ - function transformOriginChanged(transformOrigin: number): Signal; - /** - * Triggered when the value of the smooth property changes. - * @param smooth {boolean} - * @returns {Signal} - */ - function smoothChanged(smooth: boolean): Signal; - /** - * Triggered when the value of the antialiasing property changes. - * @param antialiasing {boolean} - * @returns {Signal} - */ - function antialiasingChanged(antialiasing: boolean): Signal; - /** - * Triggered when the value of the implicitWidth property changes. - * @returns {Signal} - */ - function implicitWidthChanged(): Signal; - /** - * Triggered when the value of the implicitHeight property changes. - * @returns {Signal} - */ - function implicitHeightChanged(): Signal; - /** - * @param window {object} - * @returns {Signal} - */ - function windowChanged(window: object): Signal; - /** - * @param callback {object} - * @param targetSize {Size} [targetSize=0,0] - * @returns {boolean} - */ - function grabToImage(callback: object, targetSize: Size): boolean; - /** - * @param point {Vec2} - * @returns {boolean} - */ - function contains(point: Vec2): boolean; - /** - * @param item {object} - */ - function mapFromItem(item: object): void; - /** - * @param item {object} - */ - function mapToItem(item: object): void; - /** - * @param global {object} - */ - function mapFromGlobal(global: object): void; - /** - * @param global {object} - */ - function mapToGlobal(global: object): void; - /** - * @param reason {number} [reason=7] - */ - function forceActiveFocus(reason: number): void; - /** - * @param forward {boolean} [forward=true] - * @returns {object} - */ - function nextItemInFocusChain(forward: boolean): object; - /** - * @param x {number} - * @param y {number} - * @returns {object} - */ - function childAt(x: number, y: number): object; - function update(): void; - let expanded: boolean; - /** - * Read-only. - */ - let timingExpanded: boolean; - /** - * Read-only. - */ - let monospaceFont: string; - /** - * Read-only. - */ - let serverCount: number; - /** - * How often the app is creating new gpu::Frames. Read-only. - */ - let renderrate: number; - /** - * How often the display plugin is presenting to the device. Read-only. - */ - let presentrate: number; - /** - * How often the display device is reprojecting old frames. Read-only. - */ - let stutterrate: number; - /** - * Read-only. - */ - let appdropped: number; - /** - * Read-only. - */ - let longsubmits: number; - /** - * Read-only. - */ - let longrenders: number; - /** - * Read-only. - */ - let longframes: number; - /** - * Read-only. - */ - let presentnewrate: number; - /** - * Read-only. - */ - let presentdroprate: number; - /** - * Read-only. - */ - let gameLoopRate: number; - /** - * Read-only. - */ - let avatarCount: number; - /** - * Read-only. - */ - let updatedAvatarCount: number; - /** - * Read-only. - */ - let notUpdatedAvatarCount: number; - /** - * Read-only. - */ - let packetInCount: number; - /** - * Read-only. - */ - let packetOutCount: number; - /** - * Read-only. - */ - let mbpsIn: number; - /** - * Read-only. - */ - let mbpsOut: number; - /** - * Read-only. - */ - let assetMbpsIn: number; - /** - * Read-only. - */ - let assetMbpsOut: number; - /** - * Read-only. - */ - let audioPing: number; - /** - * Read-only. - */ - let avatarPing: number; - /** - * Read-only. - */ - let entitiesPing: number; - /** - * Read-only. - */ - let assetPing: number; - /** - * Read-only. - */ - let messagePing: number; - /** - * Read-only. - */ - let position: Vec3; - /** - * Read-only. - */ - let speed: number; - /** - * Read-only. - */ - let yaw: number; - /** - * Read-only. - */ - let avatarMixerInKbps: number; - /** - * Read-only. - */ - let avatarMixerInPps: number; - /** - * Read-only. - */ - let avatarMixerOutKbps: number; - /** - * Read-only. - */ - let avatarMixerOutPps: number; - /** - * Read-only. - */ - let myAvatarSendRate: number; - /** - * Read-only. - */ - let audioMixerInKbps: number; - /** - * Read-only. - */ - let audioMixerInPps: number; - /** - * Read-only. - */ - let audioMixerOutKbps: number; - /** - * Read-only. - */ - let audioMixerOutPps: number; - /** - * Read-only. - */ - let audioMixerKbps: number; - /** - * Read-only. - */ - let audioMixerPps: number; - /** - * Read-only. - */ - let audioOutboundPPS: number; - /** - * Read-only. - */ - let audioSilentOutboundPPS: number; - /** - * Read-only. - */ - let audioAudioInboundPPS: number; - /** - * Read-only. - */ - let audioSilentInboundPPS: number; - /** - * Read-only. - */ - let audioPacketLoss: number; - /** - * Read-only. - */ - let audioCodec: string; - /** - * Read-only. - */ - let audioNoiseGate: string; - /** - * Read-only. - */ - let entityPacketsInKbps: number; - /** - * Read-only. - */ - let downloads: number; - /** - * Read-only. - */ - let downloadLimit: number; - /** - * Read-only. - */ - let downloadsPending: number; - /** - * Read-only. - */ - let downloadUrls: Array.; - /** - * Read-only. - */ - let processing: number; - /** - * Read-only. - */ - let processingPending: number; - /** - * Read-only. - */ - let triangles: number; - /** - * Read-only. - */ - let quads: number; - /** - * Read-only. - */ - let materialSwitches: number; - /** - * Read-only. - */ - let itemConsidered: number; - /** - * Read-only. - */ - let itemOutOfView: number; - /** - * Read-only. - */ - let itemTooSmall: number; - /** - * Read-only. - */ - let itemRendered: number; - /** - * Read-only. - */ - let shadowConsidered: number; - /** - * Read-only. - */ - let shadowOutOfView: number; - /** - * Read-only. - */ - let shadowTooSmall: number; - /** - * Read-only. - */ - let shadowRendered: number; - /** - * Read-only. - */ - let sendingMode: string; - /** - * Read-only. - */ - let packetStats: string; - /** - * Read-only. - */ - let lodStatus: string; - /** - * Read-only. - */ - let timingStats: string; - /** - * Read-only. - */ - let gameUpdateStats: string; - /** - * Read-only. - */ - let serverElements: number; - /** - * Read-only. - */ - let serverInternal: number; - /** - * Read-only. - */ - let serverLeaves: number; - /** - * Read-only. - */ - let localElements: number; - /** - * Read-only. - */ - let localInternal: number; - /** - * Read-only. - */ - let localLeaves: number; - /** - * Read-only. - */ - let rectifiedTextureCount: number; - /** - * Read-only. - */ - let decimatedTextureCount: number; - /** - * Read-only. - */ - let gpuBuffers: number; - /** - * Read-only. - */ - let gpuBufferMemory: number; - /** - * Read-only. - */ - let gpuTextures: number; - /** - * Read-only. - */ - let glContextSwapchainMemory: number; - /** - * Read-only. - */ - let qmlTextureMemory: number; - /** - * Read-only. - */ - let texturePendingTransfers: number; - /** - * Read-only. - */ - let gpuTextureMemory: number; - /** - * Read-only. - */ - let gpuTextureResidentMemory: number; - /** - * Read-only. - */ - let gpuTextureFramebufferMemory: number; - /** - * Read-only. - */ - let gpuTextureResourceMemory: number; - /** - * Read-only. - */ - let gpuTextureResourcePopulatedMemory: number; - /** - * Read-only. - */ - let gpuTextureExternalMemory: number; - /** - * Read-only. - */ - let gpuTextureMemoryPressureState: string; - /** - * Read-only. - */ - let gpuFreeMemory: number; - /** - * Read-only. - */ - let gpuFrameTime: number; - /** - * Read-only. - */ - let batchFrameTime: number; - /** - * Read-only. - */ - let engineFrameTime: number; - /** - * Read-only. - */ - let avatarSimulationTime: number; - let x: number; - let y: number; - let z: number; - let width: number; - let height: number; - let opacity: number; - let enabled: boolean; - let visible: boolean; - let state: string; - /** - * Read-only. - */ - let anchors: object; - let baselineOffset: number; - let clip: boolean; - let focus: boolean; - /** - * Read-only. - */ - let activeFocus: boolean; - let activeFocusOnTab: boolean; - let rotation: number; - let scale: number; - let transformOrigin: number; - let smooth: boolean; - let antialiasing: boolean; - let implicitWidth: number; - let implicitHeight: number; - /** - * Read-only. - */ - let layer: object; + /** + * Triggered when the value of the longsubmits property changes. + * @returns {Signal} + */ + function longsubmitsChanged(): Signal; + /** + * Triggered when the value of the longrenders property changes. + * @returns {Signal} + */ + function longrendersChanged(): Signal; + /** + * Triggered when the value of the longframes property changes. + * @returns {Signal} + */ + function longframesChanged(): Signal; + /** + * Triggered when the value of the appdropped property changes. + * @returns {Signal} + */ + function appdroppedChanged(): Signal; + /** + * Triggered when the value of the expanded property changes. + * @returns {Signal} + */ + function expandedChanged(): Signal; + /** + * Triggered when the value of the timingExpanded property changes. + * @returns {Signal} + */ + function timingExpandedChanged(): Signal; + /** + * Triggered when the value of the serverCount property changes. + * @returns {Signal} + */ + function serverCountChanged(): Signal; + /** + * Triggered when the value of the renderrate property changes. + * @returns {Signal} + */ + function renderrateChanged(): Signal; + /** + * Triggered when the value of the presentrate property changes. + * @returns {Signal} + */ + function presentrateChanged(): Signal; + /** + * Triggered when the value of the presentnewrate property changes. + * @returns {Signal} + */ + function presentnewrateChanged(): Signal; + /** + * Triggered when the value of the presentdroprate property changes. + * @returns {Signal} + */ + function presentdroprateChanged(): Signal; + /** + * Triggered when the value of the stutterrate property changes. + * @returns {Signal} + */ + function stutterrateChanged(): Signal; + /** + * Triggered when the value of the gameLoopRate property changes. + * @returns {Signal} + */ + function gameLoopRateChanged(): Signal; + /** + * Trigered when + * @returns {Signal} + */ + function numPhysicsBodiesChanged(): Signal; + /** + * Triggered when the value of the avatarCount property changes. + * @returns {Signal} + */ + function avatarCountChanged(): Signal; + /** + * Triggered when the value of the updatedAvatarCount property changes. + * @returns {Signal} + */ + function updatedAvatarCountChanged(): Signal; + /** + * Triggered when the value of the notUpdatedAvatarCount property changes. + * @returns {Signal} + */ + function notUpdatedAvatarCountChanged(): Signal; + /** + * Triggered when the value of the packetInCount property changes. + * @returns {Signal} + */ + function packetInCountChanged(): Signal; + /** + * Triggered when the value of the packetOutCount property changes. + * @returns {Signal} + */ + function packetOutCountChanged(): Signal; + /** + * Triggered when the value of the mbpsIn property changes. + * @returns {Signal} + */ + function mbpsInChanged(): Signal; + /** + * Triggered when the value of the mbpsOut property changes. + * @returns {Signal} + */ + function mbpsOutChanged(): Signal; + /** + * Triggered when the value of the assetMbpsIn property changes. + * @returns {Signal} + */ + function assetMbpsInChanged(): Signal; + /** + * Triggered when the value of the assetMbpsOut property changes. + * @returns {Signal} + */ + function assetMbpsOutChanged(): Signal; + /** + * Triggered when the value of the audioPing property changes. + * @returns {Signal} + */ + function audioPingChanged(): Signal; + /** + * Triggered when the value of the avatarPing property changes. + * @returns {Signal} + */ + function avatarPingChanged(): Signal; + /** + * Triggered when the value of the entitiesPing property changes. + * @returns {Signal} + */ + function entitiesPingChanged(): Signal; + /** + * Triggered when the value of the assetPing property changes. + * @returns {Signal} + */ + function assetPingChanged(): Signal; + /** + * Triggered when the value of the messagePing property changes. + * @returns {Signal} + */ + function messagePingChanged(): Signal; + /** + * Triggered when the value of the position property changes. + * @returns {Signal} + */ + function positionChanged(): Signal; + /** + * Triggered when the value of the speed property changes. + * @returns {Signal} + */ + function speedChanged(): Signal; + /** + * Triggered when the value of the yaw property changes. + * @returns {Signal} + */ + function yawChanged(): Signal; + /** + * Triggered when the value of the avatarMixerInKbps property changes. + * @returns {Signal} + */ + function avatarMixerInKbpsChanged(): Signal; + /** + * Triggered when the value of the avatarMixerInPps property changes. + * @returns {Signal} + */ + function avatarMixerInPpsChanged(): Signal; + /** + * Triggered when the value of the avatarMixerOutKbps property changes. + * @returns {Signal} + */ + function avatarMixerOutKbpsChanged(): Signal; + /** + * Triggered when the value of the avatarMixerOutPps property changes. + * @returns {Signal} + */ + function avatarMixerOutPpsChanged(): Signal; + /** + * Triggered when the value of the myAvatarSendRate property changes. + * @returns {Signal} + */ + function myAvatarSendRateChanged(): Signal; + /** + * Triggered when the value of the audioMixerInKbps property changes. + * @returns {Signal} + */ + function audioMixerInKbpsChanged(): Signal; + /** + * Triggered when the value of the audioMixerInPps property changes. + * @returns {Signal} + */ + function audioMixerInPpsChanged(): Signal; + /** + * Triggered when the value of the audioMixerOutKbps property changes. + * @returns {Signal} + */ + function audioMixerOutKbpsChanged(): Signal; + /** + * Triggered when the value of the audioMixerOutPps property changes. + * @returns {Signal} + */ + function audioMixerOutPpsChanged(): Signal; + /** + * Triggered when the value of the audioMixerKbps property changes. + * @returns {Signal} + */ + function audioMixerKbpsChanged(): Signal; + /** + * Triggered when the value of the audioMixerPps property changes. + * @returns {Signal} + */ + function audioMixerPpsChanged(): Signal; + /** + * Triggered when the value of the audioOutboundPPS property changes. + * @returns {Signal} + */ + function audioOutboundPPSChanged(): Signal; + /** + * Triggered when the value of the audioSilentOutboundPPS property changes. + * @returns {Signal} + */ + function audioSilentOutboundPPSChanged(): Signal; + /** + * Triggered when the value of the audioAudioInboundPPS property changes. + * @returns {Signal} + */ + function audioAudioInboundPPSChanged(): Signal; + /** + * Triggered when the value of the audioSilentInboundPPS property changes. + * @returns {Signal} + */ + function audioSilentInboundPPSChanged(): Signal; + /** + * Triggered when the value of the audioPacketLoss property changes. + * @returns {Signal} + */ + function audioPacketLossChanged(): Signal; + /** + * Triggered when the value of the audioCodec property changes. + * @returns {Signal} + */ + function audioCodecChanged(): Signal; + /** + * Triggered when the value of the audioNoiseGate property changes. + * @returns {Signal} + */ + function audioNoiseGateChanged(): Signal; + /** + * Triggered when the value of the entityPacketsInKbps property changes. + * @returns {Signal} + */ + function entityPacketsInKbpsChanged(): Signal; + /** + * Triggered when the value of the downloads property changes. + * @returns {Signal} + */ + function downloadsChanged(): Signal; + /** + * Triggered when the value of the downloadLimit property changes. + * @returns {Signal} + */ + function downloadLimitChanged(): Signal; + /** + * Triggered when the value of the downloadsPending property changes. + * @returns {Signal} + */ + function downloadsPendingChanged(): Signal; + /** + * Triggered when the value of the downloadUrls property changes. + * @returns {Signal} + */ + function downloadUrlsChanged(): Signal; + /** + * Triggered when the value of the processing property changes. + * @returns {Signal} + */ + function processingChanged(): Signal; + /** + * Triggered when the value of the processingPending property changes. + * @returns {Signal} + */ + function processingPendingChanged(): Signal; + /** + * Triggered when the value of the triangles property changes. + * @returns {Signal} + */ + function trianglesChanged(): Signal; + /** + * Triggered when the value of the drawcalls property changes. + * This + * @returns {Signal} + */ + function drawcallsChanged(): Signal; + /** + * Triggered when the value of the materialSwitches property changes. + * @returns {Signal} + */ + function materialSwitchesChanged(): Signal; + /** + * Triggered when the value of the itemConsidered property changes. + * @returns {Signal} + */ + function itemConsideredChanged(): Signal; + /** + * Triggered when the value of the itemOutOfView property changes. + * @returns {Signal} + */ + function itemOutOfViewChanged(): Signal; + /** + * Triggered when the value of the itemTooSmall property changes. + * @returns {Signal} + */ + function itemTooSmallChanged(): Signal; + /** + * Triggered when the value of the itemRendered property changes. + * @returns {Signal} + */ + function itemRenderedChanged(): Signal; + /** + * Triggered when the value of the shadowConsidered property changes. + * @returns {Signal} + */ + function shadowConsideredChanged(): Signal; + /** + * Triggered when the value of the shadowOutOfView property changes. + * @returns {Signal} + */ + function shadowOutOfViewChanged(): Signal; + /** + * Triggered when the value of the shadowTooSmall property changes. + * @returns {Signal} + */ + function shadowTooSmallChanged(): Signal; + /** + * Triggered when the value of the shadowRendered property changes. + * @returns {Signal} + */ + function shadowRenderedChanged(): Signal; + /** + * Triggered when the value of the sendingMode property changes. + * @returns {Signal} + */ + function sendingModeChanged(): Signal; + /** + * Triggered when the value of the packetStats property changes. + * @returns {Signal} + */ + function packetStatsChanged(): Signal; + /** + * Triggered when the value of the lodStatus property changes. + * @returns {Signal} + */ + function lodStatusChanged(): Signal; + /** + * Triggered when the value of the serverElements property changes. + * @returns {Signal} + */ + function serverElementsChanged(): Signal; + /** + * Triggered when the value of the serverInternal property changes. + * @returns {Signal} + */ + function serverInternalChanged(): Signal; + /** + * Triggered when the value of the serverLeaves property changes. + * @returns {Signal} + */ + function serverLeavesChanged(): Signal; + /** + * Triggered when the value of the localElements property changes. + * @returns {Signal} + */ + function localElementsChanged(): Signal; + /** + * Triggered when the value of the localInternal property changes. + * @returns {Signal} + */ + function localInternalChanged(): Signal; + /** + * Triggered when the value of the localLeaves property changes. + * @returns {Signal} + */ + function localLeavesChanged(): Signal; + /** + * Triggered when the value of the timingStats property changes. + * @returns {Signal} + */ + function timingStatsChanged(): Signal; + /** + * Triggered when the value of the gameUpdateStats property changes. + * @returns {Signal} + */ + function gameUpdateStatsChanged(): Signal; + /** + * Triggered when the value of the glContextSwapchainMemory property changes. + * @returns {Signal} + */ + function glContextSwapchainMemoryChanged(): Signal; + /** + * Triggered when the value of the qmlTextureMemory property changes. + * @returns {Signal} + */ + function qmlTextureMemoryChanged(): Signal; + /** + * Triggered when the value of the texturePendingTransfers property changes. + * @returns {Signal} + */ + function texturePendingTransfersChanged(): Signal; + /** + * Triggered when the value of the gpuBuffers property changes. + * @returns {Signal} + */ + function gpuBuffersChanged(): Signal; + /** + * Triggered when the value of the gpuBufferMemory property changes. + * @returns {Signal} + */ + function gpuBufferMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextures property changes. + * @returns {Signal} + */ + function gpuTexturesChanged(): Signal; + /** + * Triggered when the value of the gpuTextureMemory property changes. + * @returns {Signal} + */ + function gpuTextureMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureResidentMemory property changes. + * @returns {Signal} + */ + function gpuTextureResidentMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureFramebufferMemory property changes. + * @returns {Signal} + */ + function gpuTextureFramebufferMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureResourceMemory property changes. + * @returns {Signal} + */ + function gpuTextureResourceMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureResourceIdealMemory property changes. + * @returns {Signal} + */ + function gpuTextureResourceIdealMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureResourcePopulatedMemory property changes. + * @returns {Signal} + */ + function gpuTextureResourcePopulatedMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureExternalMemory property changes. + * @returns {Signal} + */ + function gpuTextureExternalMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuTextureMemoryPressureState property changes. + * @returns {Signal} + */ + function gpuTextureMemoryPressureStateChanged(): Signal; + /** + * Triggered when the value of the gpuFreeMemory property changes. + * @returns {Signal} + */ + function gpuFreeMemoryChanged(): Signal; + /** + * Triggered when the value of the gpuFrameTime property changes. + * @returns {Signal} + */ + function gpuFrameTimeChanged(): Signal; + /** + * Triggered when the value of the gpuFrameTime property changes. + * @returns {Signal} + */ + function gpuFrameTimeChanged(): Signal; + /** + * Triggered when the value of the gpuFrameTime property changes. + * @returns {Signal} + */ + function gpuFrameTimeChanged(): Signal; + /** + * Triggered when the value of the batchFrameTime property changes. + * @returns {Signal} + */ + function batchFrameTimeChanged(): Signal; + /** + * Triggered when the value of the engineFrameTime property changes. + * @returns {Signal} + */ + function engineFrameTimeChanged(): Signal; + /** + * Triggered when the value of the avatarSimulationTime property changes. + * @returns {Signal} + */ + function avatarSimulationTimeChanged(): Signal; + /** + * Triggered when the value of the rectifiedTextureCount property changes. + * @returns {Signal} + */ + function rectifiedTextureCountChanged(): Signal; + /** + * Triggered when the value of the decimatedTextureCount property changes. + * @returns {Signal} + */ + function decimatedTextureCountChanged(): Signal; + /** + * Triggered when the parent item changes. + * @param parent {object} + * @returns {Signal} + */ + function parentChanged(parent: object): Signal; + /** + * Triggered when the value of the x property changes. + * @returns {Signal} + */ + function xChanged(): Signal; + /** + * Triggered when the value of the y property changes. + * @returns {Signal} + */ + function yChanged(): Signal; + /** + * Triggered when the value of the z property changes. + * @returns {Signal} + */ + function zChanged(): Signal; + /** + * Triggered when the value of the width property changes. + * @returns {Signal} + */ + function widthChanged(): Signal; + /** + * Triggered when the value of the height property changes. + * @returns {Signal} + */ + function heightChanged(): Signal; + /** + * Triggered when the value of the opacity property changes. + * @returns {Signal} + */ + function opacityChanged(): Signal; + /** + * Triggered when the value of the enabled property changes. + * @returns {Signal} + */ + function enabledChanged(): Signal; + /** + * Triggered when the value of the visibleChanged property changes. + * @returns {Signal} + */ + function visibleChanged(): Signal; + /** + * Triggered when the list of visible children changes. + * @returns {Signal} + */ + function visibleChildrenChanged(): Signal; + /** + * Triggered when the value of the state property changes. + * @returns {Signal} + */ + function stateChanged(): Signal; + /** + * Triggered when the position and size of the rectangle containing the children changes. + * @param childrenRect {Rect} + * @returns {Signal} + */ + function childrenRectChanged(childrenRect: Rect): Signal; + /** + * Triggered when the value of the baselineOffset property changes. + * @param baselineOffset {number} + * @returns {Signal} + */ + function baselineOffsetChanged(baselineOffset: number): Signal; + /** + * Triggered when the value of the clip property changes. + * @param clip {boolean} + * @returns {Signal} + */ + function clipChanged(clip: boolean): Signal; + /** + * Triggered when the value of the focus property changes. + * @param focus {boolean} + * @returns {Signal} + */ + function focusChanged(focus: boolean): Signal; + /** + * Triggered when the value of the activeFocus property changes. + * @param activeFocus {boolean} + * @returns {Signal} + */ + function activeFocusChanged(activeFocus: boolean): Signal; + /** + * Triggered when the value of the activeFocusOnTab property changes. + * @param activeFocusOnTab {boolean} + * @returns {Signal} + */ + function activeFocusOnTabChanged(activeFocusOnTab: boolean): Signal; + /** + * Triggered when the value of the rotation property changes. + * @returns {Signal} + */ + function rotationChanged(): Signal; + /** + * Triggered when the value of the scaleChanged property changes. + * @returns {Signal} + */ + function scaleChanged(): Signal; + /** + * Triggered when the value of the transformOrigin property changes. + * @param transformOrigin {number} + * @returns {Signal} + */ + function transformOriginChanged(transformOrigin: number): Signal; + /** + * Triggered when the value of the smooth property changes. + * @param smooth {boolean} + * @returns {Signal} + */ + function smoothChanged(smooth: boolean): Signal; + /** + * Triggered when the value of the antialiasing property changes. + * @param antialiasing {boolean} + * @returns {Signal} + */ + function antialiasingChanged(antialiasing: boolean): Signal; + /** + * Triggered when the value of the implicitWidth property changes. + * @returns {Signal} + */ + function implicitWidthChanged(): Signal; + /** + * Triggered when the value of the implicitHeight property changes. + * @returns {Signal} + */ + function implicitHeightChanged(): Signal; + /** + * @param window {object} + * @returns {Signal} + */ + function windowChanged(window: object): Signal; + /** + * @param callback {object} + * @param targetSize {Size} [targetSize=0,0] + * @returns {boolean} + */ + function grabToImage(callback: object, targetSize: Size): boolean; + /** + * @param point {Vec2} + * @returns {boolean} + */ + function contains(point: Vec2): boolean; + /** + * @param item {object} + */ + function mapFromItem(item: object): void; + /** + * @param item {object} + */ + function mapToItem(item: object): void; + /** + * @param global {object} + */ + function mapFromGlobal(global: object): void; + /** + * @param global {object} + */ + function mapToGlobal(global: object): void; + /** + * @param reason {number} [reason=7] + */ + function forceActiveFocus(reason: number): void; + /** + * @param forward {boolean} [forward=true] + * @returns {object} + */ + function nextItemInFocusChain(forward: boolean): object; + /** + * @param x {number} + * @param y {number} + * @returns {object} + */ + function childAt(x: number, y: number): object; + function update(): void; + /** + * Triggered when the value of the stylusPicksCount property changes. + * @returns {Signal} + */ + function stylusPicksCountChanged(): Signal; + /** + * Triggered when the value of the rayPicksCount property changes. + * @returns {Signal} + */ + function rayPicksCountChanged(): Signal; + /** + * Triggered when the value of the parabolaPicksCount property changes. + * @returns {Signal} + */ + function parabolaPicksCountChanged(): Signal; + /** + * Triggered when the value of the collisionPicksCount property changes. + * @returns {Signal} + */ + function collisionPicksCountChanged(): Signal; + /** + * Triggered when the value of the stylusPicksUpdated property changes. + * @returns {Signal} + */ + function stylusPicksUpdatedChanged(): Signal; + /** + * Triggered when the value of the rayPicksUpdated property changes. + * @returns {Signal} + */ + function rayPicksUpdatedChanged(): Signal; + /** + * Triggered when the value of the parabolaPicksUpdated property changes. + * @returns {Signal} + */ + function parabolaPicksUpdatedChanged(): Signal; + /** + * Triggered when the value of the collisionPicksUpdated property changes. + * @returns {Signal} + */ + function collisionPicksUpdatedChanged(): Signal; + let expanded: boolean; + /** + * Read-only. + */ + let timingExpanded: boolean; + /** + * Read-only. + */ + let monospaceFont: string; + /** + * Read-only. + */ + let serverCount: number; + /** + * How often the app is creating new gpu::Frames. Read-only. + */ + let renderrate: number; + /** + * How often the display plugin is presenting to the device. Read-only. + */ + let presentrate: number; + /** + * How often the display device is reprojecting old frames. Read-only. + */ + let stutterrate: number; + /** + * Read-only. + */ + let appdropped: number; + /** + * Read-only. + */ + let longsubmits: number; + /** + * Read-only. + */ + let longrenders: number; + /** + * Read-only. + */ + let longframes: number; + /** + * Read-only. + */ + let presentnewrate: number; + /** + * Read-only. + */ + let presentdroprate: number; + /** + * Read-only. + */ + let gameLoopRate: number; + /** + * Read-only. + */ + let avatarCount: number; + /** + * Read-only. + */ + let physicsObjectCount: number; + /** + * Read-only. + */ + let updatedAvatarCount: number; + /** + * Read-only. + */ + let notUpdatedAvatarCount: number; + /** + * Read-only. + */ + let packetInCount: number; + /** + * Read-only. + */ + let packetOutCount: number; + /** + * Read-only. + */ + let mbpsIn: number; + /** + * Read-only. + */ + let mbpsOut: number; + /** + * Read-only. + */ + let assetMbpsIn: number; + /** + * Read-only. + */ + let assetMbpsOut: number; + /** + * Read-only. + */ + let audioPing: number; + /** + * Read-only. + */ + let avatarPing: number; + /** + * Read-only. + */ + let entitiesPing: number; + /** + * Read-only. + */ + let assetPing: number; + /** + * Read-only. + */ + let messagePing: number; + /** + * Read-only. + */ + let position: Vec3; + /** + * Read-only. + */ + let speed: number; + /** + * Read-only. + */ + let yaw: number; + /** + * Read-only. + */ + let avatarMixerInKbps: number; + /** + * Read-only. + */ + let avatarMixerInPps: number; + /** + * Read-only. + */ + let avatarMixerOutKbps: number; + /** + * Read-only. + */ + let avatarMixerOutPps: number; + /** + * Read-only. + */ + let myAvatarSendRate: number; + /** + * Read-only. + */ + let audioMixerInKbps: number; + /** + * Read-only. + */ + let audioMixerInPps: number; + /** + * Read-only. + */ + let audioMixerOutKbps: number; + /** + * Read-only. + */ + let audioMixerOutPps: number; + /** + * Read-only. + */ + let audioMixerKbps: number; + /** + * Read-only. + */ + let audioMixerPps: number; + /** + * Read-only. + */ + let audioOutboundPPS: number; + /** + * Read-only. + */ + let audioSilentOutboundPPS: number; + /** + * Read-only. + */ + let audioAudioInboundPPS: number; + /** + * Read-only. + */ + let audioSilentInboundPPS: number; + /** + * Read-only. + */ + let audioPacketLoss: number; + /** + * Read-only. + */ + let audioCodec: string; + /** + * Read-only. + */ + let audioNoiseGate: string; + /** + * Read-only. + */ + let entityPacketsInKbps: number; + /** + * Read-only. + */ + let downloads: number; + /** + * Read-only. + */ + let downloadLimit: number; + /** + * Read-only. + */ + let downloadsPending: number; + /** + * Read-only. + */ + let downloadUrls: Array.; + /** + * Read-only. + */ + let processing: number; + /** + * Read-only. + */ + let processingPending: number; + /** + * Read-only. + */ + let triangles: number; + /** + * Read-only. + */ + let materialSwitches: number; + /** + * Read-only. + */ + let itemConsidered: number; + /** + * Read-only. + */ + let itemOutOfView: number; + /** + * Read-only. + */ + let itemTooSmall: number; + /** + * Read-only. + */ + let itemRendered: number; + /** + * Read-only. + */ + let shadowConsidered: number; + /** + * Read-only. + */ + let shadowOutOfView: number; + /** + * Read-only. + */ + let shadowTooSmall: number; + /** + * Read-only. + */ + let shadowRendered: number; + /** + * Read-only. + */ + let sendingMode: string; + /** + * Read-only. + */ + let packetStats: string; + /** + * Read-only. + */ + let lodStatus: string; + /** + * Read-only. + */ + let timingStats: string; + /** + * Read-only. + */ + let gameUpdateStats: string; + /** + * Read-only. + */ + let serverElements: number; + /** + * Read-only. + */ + let serverInternal: number; + /** + * Read-only. + */ + let serverLeaves: number; + /** + * Read-only. + */ + let localElements: number; + /** + * Read-only. + */ + let localInternal: number; + /** + * Read-only. + */ + let localLeaves: number; + /** + * Read-only. + */ + let rectifiedTextureCount: number; + /** + * Read-only. + */ + let decimatedTextureCount: number; + /** + * Read-only. + */ + let gpuBuffers: number; + /** + * Read-only. + */ + let gpuBufferMemory: number; + /** + * Read-only. + */ + let gpuTextures: number; + /** + * Read-only. + */ + let glContextSwapchainMemory: number; + /** + * Read-only. + */ + let qmlTextureMemory: number; + /** + * Read-only. + */ + let texturePendingTransfers: number; + /** + * Read-only. + */ + let gpuTextureMemory: number; + /** + * Read-only. + */ + let gpuTextureResidentMemory: number; + /** + * Read-only. + */ + let gpuTextureFramebufferMemory: number; + /** + * Read-only. + */ + let gpuTextureResourceMemory: number; + /** + * Read-only. + */ + let gpuTextureResourceIdealMemory: number; + /** + * Read-only. + */ + let gpuTextureResourcePopulatedMemory: number; + /** + * Read-only. + */ + let gpuTextureExternalMemory: number; + /** + * Read-only. + */ + let gpuTextureMemoryPressureState: string; + /** + * Read-only. + */ + let gpuFreeMemory: number; + /** + * Read-only. + */ + let gpuFrameTime: number; + /** + * Read-only. + */ + let batchFrameTime: number; + /** + * Read-only. + */ + let engineFrameTime: number; + /** + * Read-only. + */ + let avatarSimulationTime: number; + let x: number; + let y: number; + let z: number; + let width: number; + let height: number; + let opacity: number; + let enabled: boolean; + let visible: boolean; + let state: string; + /** + * Read-only. + */ + let anchors: object; + let baselineOffset: number; + let clip: boolean; + let focus: boolean; + /** + * Read-only. + */ + let activeFocus: boolean; + let activeFocusOnTab: boolean; + let rotation: number; + let scale: number; + let transformOrigin: number; + let smooth: boolean; + let antialiasing: boolean; + let implicitWidth: number; + let implicitHeight: number; + /** + * Read-only. + */ + let layer: object; + /** + * Read-only. + */ + let stylusPicksCount: number; + /** + * Read-only. + */ + let rayPicksCount: number; + /** + * Read-only. + */ + let parabolaPicksCount: number; + /** + * Read-only. + */ + let collisionPicksCount: number; + /** + * Read-only. + */ + let stylusPicksUpdated: Vec4; + /** + * Read-only. + */ + let rayPicksUpdated: Vec4; + /** + * Read-only. + */ + let parabolaPicksUpdated: Vec4; + /** + * Read-only. + */ + let collisionPicksUpdated: Vec4; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Overlays API provides facilities to create and interact with overlays. Overlays are 2D and 3D objects visible only to -* yourself and that aren't persisted to the domain. They are used for UI. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Overlays API provides facilities to create and interact with overlays. Overlays are 2D and 3D objects visible only to + * yourself and that aren't persisted to the domain. They are used for UI. + */ declare namespace Overlays { - interface Circle3DProperties { - /** - * Has the value "circle3d". Read-only. - */ - type: string; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * The dimensions of the overlay. Synonyms: scale, size. - * Not used. - */ - dimensions: Vec2; - /** - * The counter-clockwise angle from the overlay's x-axis that drawing starts at, in degrees. - */ - startAt: number; - /** - * The counter-clockwise angle from the overlay's x-axis that drawing ends at, in degrees. - */ - endAt: number; - /** - * The outer radius of the overlay, in meters. Synonym: radius. - */ - outerRadius: number; - /** - * The inner radius of the overlay, in meters. - */ - innerRadius: number; - /** - * The color of the overlay. Setting this value also sets the values of - * innerStartColor, innerEndColor, outerStartColor, and outerEndColor. - */ - color: Color; - /** - * Sets the values of innerStartColor and outerStartColor. - * Write-only. - */ - startColor: Color; - /** - * Sets the values of innerEndColor and outerEndColor. - * Write-only. - */ - endColor: Color; - /** - * Sets the values of innerStartColor and innerEndColor. - * Write-only. - */ - innerColor: Color; - /** - * Sets the values of outerStartColor and outerEndColor. - * Write-only. - */ - outerColor: Color; - /** - * The color at the inner start point of the overlay. - */ - innerStartcolor: Color; - /** - * The color at the inner end point of the overlay. - */ - innerEndColor: Color; - /** - * The color at the outer start point of the overlay. - */ - outerStartColor: Color; - /** - * The color at the outer end point of the overlay. - */ - outerEndColor: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. Setting this value also sets - * the values of innerStartAlpha, innerEndAlpha, outerStartAlpha, and - outerEndAlpha. Synonym: Alpha; write-only. - */ - alpha: number; - /** - * Sets the values of innerStartAlpha and outerStartAlpha. - * Write-only. - */ - startAlpha: number; - /** - * Sets the values of innerEndAlpha and outerEndAlpha. - * Write-only. - */ - endAlpha: number; - /** - * Sets the values of innerStartAlpha and innerEndAlpha. - * Write-only. - */ - innerAlpha: number; - /** - * Sets the values of outerStartAlpha and outerEndAlpha. - * Write-only. - */ - outerAlpha: number; - /** - * The alpha at the inner start point of the overlay. - */ - innerStartAlpha: number; - /** - * The alpha at the inner end point of the overlay. - */ - innerEndAlpha: number; - /** - * The alpha at the outer start point of the overlay. - */ - outerStartAlpha: number; - /** - * The alpha at the outer end point of the overlay. - */ - outerEndAlpha: number; - /** - * If true, tick marks are drawn. - */ - hasTickMarks: boolean; - /** - * The angle between major tick marks, in degrees. - */ - majorTickMarksAngle: number; - /** - * The angle between minor tick marks, in degrees. - */ - minorTickMarksAngle: number; - /** - * The length of the major tick marks, in meters. A positive value draws tick marks - * outwards from the inner radius; a negative value draws tick marks inwards from the outer radius. - */ - majorTickMarksLength: number; - /** - * The length of the minor tick marks, in meters. A positive value draws tick marks - * outwards from the inner radius; a negative value draws tick marks inwards from the outer radius. - */ - minorTickMarksLength: number; - /** - * The color of the major tick marks. - */ - majorTickMarksColor: Color; - /** - * The color of the minor tick marks. - */ - minorTickMarksColor: Color; - } - - interface CubeProperties { - /** - * Has the value "cube". Read-only. - */ - type: string; - /** - * The color of the overlay. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. - */ - alpha: number; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled. - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * The dimensions of the overlay. Synonyms: scale, size. - */ - dimensions: Vec3; - } - - interface GridProperties { - /** - * Has the value "grid". Read-only. - */ - type: string; - /** - * The color of the overlay. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. - */ - alpha: number; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled. - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * The dimensions of the overlay. Synonyms: scale, size. - */ - dimensions: Vec2; - /** - * If true, the grid is always visible even as the camera moves to another - * position. - */ - followCamera: boolean; - /** - * Integer number of minorGridEvery intervals at which to draw a thick grid - * line. Minimum value = 1. - */ - majorGridEvery: number; - /** - * Real number of meters at which to draw thin grid lines. Minimum value = - * 0.001. - */ - minorGridEvery: number; - } - - interface Image3DProperties { - /** - * Has the value "image3d". Read-only. - */ - type: string; - /** - * The color of the overlay. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. - */ - alpha: number; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled. - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * The dimensions of the overlay. Synonyms: scale, size. - */ - dimensions: Vec2; - /** - * If true, the overlay is rotated to face the user's camera about an axis - * parallel to the user's avatar's "up" direction. - */ - isFacingAvatar: boolean; - /** - * The URL of the PNG or JPG image to display. - */ - url: string; - /** - * The portion of the image to display. Defaults to the full image. - */ - subImage: Rect; - /** - * If true, the overlay is displayed at full brightness, otherwise it is rendered - * with scene lighting. - */ - emissive: boolean; - } - - interface ImageProperties { - /** - * The position and size of the image display area, in pixels. Write-only. - */ - bounds: Rect; - /** - * Integer left, x-coordinate value of the image display area = bounds.x. - * Write-only. - */ - x: number; - /** - * Integer top, y-coordinate value of the image display area = bounds.y. - * Write-only. - */ - y: number; - /** - * Integer width of the image display area = bounds.width. Write-only. - */ - width: number; - /** - * Integer height of the image display area = bounds.height. Write-only. - */ - height: number; - /** - * The URL of the image file to display. The image is scaled to fit to the bounds. - * Write-only. - */ - imageURL: string; - /** - * Integer coordinates of the top left pixel to start using image content from. - * Write-only. - */ - subImage: Vec2; - /** - * The color to apply over the top of the image to colorize it. Write-only. - */ - color: Color; - /** - * The opacity of the color applied over the top of the image, 0.0 - - * 1.0. Write-only. - */ - alpha: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - * Write-only. - */ - visible: boolean; - } - - interface Line3DProperties { - /** - * Has the value "line3d". Read-only. - */ - type: string; - /** - * The color of the overlay. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. - */ - alpha: number; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled. - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * The avatar, entity, or overlay that the end point of the line is parented to. - */ - endParentID: Uuid; - /** - * Integer value specifying the skeleton joint that the end point of the line is - * attached to if parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - endParentJointIndex: number; - /** - * The start point of the line. Synonyms: startPoint, p1, and - * position. - */ - start: Vec3; - /** - * The end point of the line. Synonyms: endPoint and p2. - */ - end: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as start. Synonym: localPosition. - */ - localStart: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * endParentID set, otherwise the same value as end. - */ - localEnd: Vec3; - /** - * The length of the line, in meters. This can be set after creating a line with start and end - * points. - */ - length: number; - /** - * If glow > 0, the line is rendered with a glow. - */ - glow: number; - /** - * If glow > 0, this is the width of the glow, in meters. - */ - lineWidth: number; - } - - interface ModelProperties { - /** - * Has the value "model". Read-only. - */ - type: string; - /** - * The color of the overlay. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. - */ - alpha: number; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled. - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * The URL of the FBX or OBJ model used for the overlay. - */ - url: string; - /** - * The priority for loading and displaying the overlay. Overlays with higher values load - * first. - */ - loadPriority: number; - /** - * The dimensions of the overlay. Synonym: size. - */ - dimensions: Vec3; - /** - * The scale factor applied to the model's dimensions. - */ - scale: Vec3; - /** - * Maps the named textures in the model to the JPG or PNG images in the urls. - */ - textures: object.; - /** - * The names of the joints - if any - in the model. Read-only. - */ - jointNames: Array.; - /** - * The relative rotations of the model's joints. Not copied if overlay is - * cloned. - */ - jointRotations: Array.; - /** - * The relative translations of the model's joints. Not copied if overlay is - * cloned. - */ - jointTranslations: Array.; - /** - * The absolute orientations of the model's joints, in world coordinates. - * Read-only. - */ - jointOrientations: Array.; - /** - * The absolute positions of the model's joints, in world coordinates. - * Read-only. - */ - jointPositions: Array.; - /** - * The URL of an FBX file containing an animation to play. - */ - animationSettings.url: string; - /** - * The frame rate (frames/sec) to play the animation at. - */ - animationSettings.fps: number; - /** - * The frame to start playing at. - */ - animationSettings.firstFrame: number; - /** - * The frame to finish playing at. - */ - animationSettings.lastFrame: number; - /** - * The current frame being played. - */ - animationSettings.currentFrame: number; - /** - * Whether or not the animation is playing. - */ - animationSettings.running: boolean; - /** - * Whether or not the animation should repeat in a loop. - */ - animationSettings.loop: boolean; - /** - * Whether or not when the animation finishes, the rotations and - * translations of the last frame played should be maintained. - */ - animationSettings.hold: boolean; - /** - * Whether or not translations contained in the animation should - * be played. - */ - animationSettings.allowTranslation: boolean; - } - - interface OverlayProperties { - } - - interface RayToOverlayIntersectionResult { - /** - * true if the PickRay intersected with a 3D overlay, otherwise - * false. - */ - intersects: boolean; - /** - * The UUID of the overlay that was intersected. - */ - overlayID: Uuid; - /** - * The distance from the PickRay origin to the intersection point. - */ - distance: number; - /** - * The normal of the overlay surface at the intersection point. - */ - surfaceNormal: Vec3; - /** - * The position of the intersection point. - */ - intersection: Vec3; - /** - * Additional intersection details, if available. - */ - extraInfo: Object; - } - - /** - * Add an overlay to the scene. - * @param type {Overlays.OverlayType} The type of the overlay to add. - * @param properties {Overlays.OverlayProperties} The properties of the overlay to add. - * @returns {Uuid} - */ - function addOverlay(type: Overlays.OverlayType, properties: Overlays.OverlayProperties): Uuid; - /** - * Create a clone of an existing overlay. - * @param overlayID {Uuid} The ID of the overlay to clone. - * @returns {Uuid} - */ - function cloneOverlay(overlayID: Uuid): Uuid; - /** - * Edit an overlay's properties. - * @param overlayID {Uuid} The ID of the overlay to edit. - * @param properties {Overlays.OverlayProperties} The properties changes to make. - * @returns {boolean} - */ - function editOverlay(overlayID: Uuid, properties: Overlays.OverlayProperties): boolean; - /** - * Edit multiple overlays' properties. - * @param propertiesById {object.} An object with overlay IDs as keys and - * {@link Overlays.OverlayProperties|OverlayProperties} edits to make as values. - * @returns {boolean} - */ - function editOverlays(propertiesById: object.): boolean; - /** - * Delete an overlay. - * @param overlayID {Uuid} The ID of the overlay to delete. - */ - function deleteOverlay(overlayID: Uuid): void; - /** - * Get the type of an overlay. - * @param overlayID {Uuid} The ID of the overlay to get the type of. - * @returns {Overlays.OverlayType} - */ - function getOverlayType(overlayID: Uuid): Overlays.OverlayType; - /** - * Get the overlay script object. In particular, this is useful for accessing the event bridge for a web3d - * overlay. - * @param overlayID {Uuid} The ID of the overlay to get the script object of. - * @returns {object} - */ - function getOverlayObject(overlayID: Uuid): object; - /** - * Get the ID of the 2D overlay at a particular point on the screen or HUD. - * @param point {Vec2} The point to check for an overlay. - * @returns {Uuid} - */ - function getOverlayAtPoint(point: Vec2): Uuid; - /** - * Get the value of a 3D overlay's property. - * @param overlayID {Uuid} The ID of the overlay. Must be for a 3D {@link Overlays.OverlayType|OverlayType}. - * @param property {string} The name of the property value to get. - * @returns {object} - */ - function getProperty(overlayID: Uuid, property: string): object; - /** - * Get the values of an overlay's properties. - * @param overlayID {Uuid} The ID of the overlay. - * @param properties {Array.} An array of names of properties to get the values of. - * @returns {Overlays.OverlayProperties} - */ - function getProperties(overlayID: Uuid, properties: Array.): Overlays.OverlayProperties; - /** - * Get the values of multiple overlays' properties. - * @param propertiesById {object.>} An object with overlay IDs as keys and arrays of the names of - * properties to get for each as values. - * @returns {object.} - */ - function getOverlaysProperties(propertiesById: object.>): object.; - /** - * Find the closest 3D overlay intersected by a PickRay. - * @param pickRay {PickRay} The PickRay to use for finding overlays. - * @param precisionPicking {boolean} [precisionPicking=false] Unused; exists to match Entity API. - * @param overlayIDsToInclude {Array.} [overlayIDsToInclude=[]] If not empty then the search is restricted to these overlays. - * @param overlayIDsToExclude {Array.} [overlayIDsToExclude=[]] Overlays to ignore during the search. - * @param visibleOnly {boolean} [visibleOnly=false] Unused; exists to match Entity API. - * @param collidableOnly {boolean} [collidableOnly=false] Unused; exists to match Entity API. - * @returns {Overlays.RayToOverlayIntersectionResult} - */ - function findRayIntersection(pickRay: PickRay, precisionPicking: boolean, overlayIDsToInclude: Array., overlayIDsToExclude: Array., visibleOnly: boolean, collidableOnly: boolean): Overlays.RayToOverlayIntersectionResult; - /** - * Return a list of 3D overlays with bounding boxes that touch a search sphere. - * @param center {Vec3} The center of the search sphere. - * @param radius {number} The radius of the search sphere. - * @returns {Array.} - */ - function findOverlays(center: Vec3, radius: number): Array.; - /** - * Check whether an overlay's assets have been loaded. For example, for an image overlay the result indicates - * whether its image has been loaded. - * @param overlayID {Uuid} The ID of the overlay to check. - * @returns {boolean} - */ - function isLoaded(overlayID: Uuid): boolean; - /** - * Calculates the size of the given text in the specified overlay if it is a text overlay. - * @param overlayID {Uuid} The ID of the overlay to use for calculation. - * @param text {string} The string to calculate the size of. - * @returns {Size} - */ - function textSize(overlayID: Uuid, text: string): Size; - /** - * Get the width of the window or HUD. - * @returns {number} - */ - function width(): number; - /** - * Get the height of the window or HUD. - * @returns {number} - */ - function height(): number; - /** - * Check if there is an overlay of a given ID. - * @param overlayID {Uuid} The ID to check. - * @returns {boolean} - */ - function isAddedOverly(overlayID: Uuid): boolean; - /** - * Generate a mouse press event on an overlay. - * @param overlayID {Uuid} The ID of the overlay to generate a mouse press event on. - * @param event {PointerEvent} The mouse press event details. - */ - function sendMousePressOnOverlay(overlayID: Uuid, event: PointerEvent): void; - /** - * Generate a mouse release event on an overlay. - * @param overlayID {Uuid} The ID of the overlay to generate a mouse release event on. - * @param event {PointerEvent} The mouse release event details. - */ - function sendMouseReleaseOnOverlay(overlayID: Uuid, event: PointerEvent): void; - /** - * Generate a mouse move event on an overlay. - * @param overlayID {Uuid} The ID of the overlay to generate a mouse move event on. - * @param event {PointerEvent} The mouse move event details. - */ - function sendMouseMoveOnOverlay(overlayID: Uuid, event: PointerEvent): void; - /** - * Generate a hover enter event on an overlay. - * @param id {Uuid} The ID of the overlay to generate a hover enter event on. - * @param event {PointerEvent} The hover enter event details. - */ - function sendHoverEnterOverlay(id: Uuid, event: PointerEvent): void; - /** - * Generate a hover over event on an overlay. - * @param overlayID {Uuid} The ID of the overlay to generate a hover over event on. - * @param event {PointerEvent} The hover over event details. - */ - function sendHoverOverOverlay(overlayID: Uuid, event: PointerEvent): void; - /** - * Generate a hover leave event on an overlay. - * @param overlayID {Uuid} The ID of the overlay to generate a hover leave event on. - * @param event {PointerEvent} The hover leave event details. - */ - function sendHoverLeaveOverlay(overlayID: Uuid, event: PointerEvent): void; - /** - * Get the ID of the Web3D overlay that has keyboard focus. - * @returns {Uuid} - */ - function getKeyboardFocusOverlay(): Uuid; - /** - * Set the Web3D overlay that has keyboard focus. - * @param overlayID {Uuid} The ID of the {@link Overlays.OverlayType|web3d} overlay to set keyboard focus to. Use - * null or {@link Uuid|Uuid.NULL} to unset keyboard focus from an overlay. - */ - function setKeyboardFocusOverlay(overlayID: Uuid): void; - /** - * Triggered when an overlay is deleted. - * @param overlayID {Uuid} The ID of the overlay that was deleted. - * @returns {Signal} - */ - function overlayDeleted(overlayID: Uuid): Signal; - /** - * Triggered when a mouse press event occurs on an overlay. Only occurs for 3D overlays (unless you use - * Overlays.sendMousePressOnOverlay for a 2D overlay). - * @param overlayID {Uuid} The ID of the overlay the mouse press event occurred on. - * @param event {PointerEvent} The mouse press event details. - * @returns {Signal} - */ - function mousePressOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when a mouse double press event occurs on an overlay. Only occurs for 3D overlays. - * @param overlayID {Uuid} The ID of the overlay the mouse double press event occurred on. - * @param event {PointerEvent} The mouse double press event details. - * @returns {Signal} - */ - function mouseDoublePressOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when a mouse release event occurs on an overlay. Only occurs for 3D overlays (unless you use - * Overlays.sendMouseReleaseOnOverlay for a 2D overlay). - * @param overlayID {Uuid} The ID of the overlay the mouse release event occurred on. - * @param event {PointerEvent} The mouse release event details. - * @returns {Signal} - */ - function mouseReleaseOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when a mouse move event occurs on an overlay. Only occurs for 3D overlays (unless you use - * Overlays.sendMouseMoveOnOverlay for a 2D overlay). - * @param overlayID {Uuid} The ID of the overlay the mouse moved event occurred on. - * @param event {PointerEvent} The mouse move event details. - * @returns {Signal} - */ - function mouseMoveOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when a mouse press event occurs on something other than a 3D overlay. - * @returns {Signal} - */ - function mousePressOffOverlay(): Signal; - /** - * Triggered when a mouse double press event occurs on something other than a 3D overlay. - * @returns {Signal} - */ - function mouseDoublePressOffOverlay(): Signal; - /** - * Triggered when a mouse cursor starts hovering over an overlay. Only occurs for 3D overlays (unless you use - * Overlays.sendHoverEnterOverlay for a 2D overlay). - * @param overlayID {Uuid} The ID of the overlay the mouse moved event occurred on. - * @param event {PointerEvent} The mouse move event details. - * @returns {Signal} - */ - function hoverEnterOverlay(overlayID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when a mouse cursor continues hovering over an overlay. Only occurs for 3D overlays (unless you use - * Overlays.sendHoverOverOverlay for a 2D overlay). - * @param overlayID {Uuid} The ID of the overlay the hover over event occurred on. - * @param event {PointerEvent} The hover over event details. - * @returns {Signal} - */ - function hoverOverOverlay(overlayID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when a mouse cursor finishes hovering over an overlay. Only occurs for 3D overlays (unless you use - * Overlays.sendHoverLeaveOverlay for a 2D overlay). - * @param overlayID {Uuid} The ID of the overlay the hover leave event occurred on. - * @param event {PointerEvent} The hover leave event details. - * @returns {Signal} - */ - function hoverLeaveOverlay(overlayID: Uuid, event: PointerEvent): Signal; - interface Rectangle3DProperties { - /** - * Has the value "rectangle3d". Read-only. - */ - type: string; - /** - * The color of the overlay. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. - */ - alpha: number; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled. - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * The dimensions of the overlay. Synonyms: scale, size. - */ - dimensions: Vec2; - } - - interface RectangleProperties { - /** - * The position and size of the rectangle, in pixels. Write-only. - */ - bounds: Rect; - /** - * Integer left, x-coordinate value = bounds.x. Write-only. - */ - x: number; - /** - * Integer top, y-coordinate value = bounds.y. Write-only. - */ - y: number; - /** - * Integer width of the rectangle = bounds.width. Write-only. - */ - width: number; - /** - * Integer height of the rectangle = bounds.height. Write-only. - */ - height: number; - /** - * The color of the overlay. Write-only. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. Write-only. - */ - alpha: number; - /** - * Integer width of the border, in pixels. The border is drawn within the rectangle's bounds. - * It is not drawn unless either borderColor or borderAlpha are specified. Write-only. - */ - borderWidth: number; - /** - * Integer corner radius, in pixels. Write-only. - */ - radius: number; - /** - * The color of the border. Write-only. - */ - borderColor: Color; - /** - * The opacity of the border, 0.0 - 1.0. - * Write-only. - */ - borderAlpha: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - * Write-only. - */ - visible: boolean; - } - - interface ShapeProperties { - /** - * Has the value "shape". Read-only. - */ - type: string; - /** - * The color of the overlay. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. - */ - alpha: number; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled. - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * The dimensions of the overlay. Synonyms: scale, size. - */ - dimensions: Vec3; - /** - * The geometrical shape of the overlay. - */ - shape: Overlays.Shape; - } - - interface SphereProperties { - /** - * Has the value "sphere". Read-only. - */ - type: string; - /** - * The color of the overlay. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. - */ - alpha: number; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled. - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * The dimensions of the overlay. Synonyms: scale, size. - */ - dimensions: Vec3; - } - - interface Text3DProperties { - /** - * Has the value "text3d". Read-only. - */ - type: string; - /** - * The color of the overlay. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. - */ - alpha: number; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled. - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * The dimensions of the overlay. Synonyms: scale, size. - */ - dimensions: Vec2; - /** - * If true, the overlay is rotated to face the user's camera about an axis - * parallel to the user's avatar's "up" direction. - */ - isFacingAvatar: boolean; - /** - * The text to display. Text does not automatically wrap; use \n for a line break. - */ - text: string; - /** - * The text alpha value. - */ - textAlpha: number; - /** - * The background color. - */ - backgroundColor: Color; - /** - * The background alpha value. - */ - backgroundAlpha: number; - /** - * The height of a line of text in meters. - */ - lineHeight: number; - /** - * The left margin, in meters. - */ - leftMargin: number; - /** - * The top margin, in meters. - */ - topMargin: number; - /** - * The right margin, in meters. - */ - rightMargin: number; - /** - * The bottom margin, in meters. - */ - bottomMargin: number; - } - - interface TextProperties { - /** - * The position and size of the rectangle, in pixels. Write-only. - */ - bounds: Rect; - /** - * Integer left, x-coordinate value = bounds.x. Write-only. - */ - x: number; - /** - * Integer top, y-coordinate value = bounds.y. Write-only. - */ - y: number; - /** - * Integer width of the rectangle = bounds.width. Write-only. - */ - width: number; - /** - * Integer height of the rectangle = bounds.height. Write-only. - */ - height: number; - /** - * Sets the leftMargin and topMargin values, in pixels. - * Write-only. - */ - margin: number; - /** - * The left margin's size, in pixels. This value is also used for the right margin. - * Write-only. - */ - leftMargin: number; - /** - * The top margin's size, in pixels. This value is also used for the bottom margin. - * Write-only. - */ - topMargin: number; - /** - * The text to display. Text does not automatically wrap; use \n for a line break. Text - * is clipped to the bounds. Write-only. - */ - text: string; - /** - * The size of the text, in pixels. Write-only. - */ - font.size: number; - /** - * The height of a line of text, in pixels. Write-only. - */ - lineHeight: number; - /** - * The color of the text. Synonym: textColor. Write-only. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. Write-only. - */ - alpha: number; - /** - * The color of the background rectangle. Write-only. - */ - backgroundColor: Color; - /** - * The opacity of the background rectangle. Write-only. - */ - backgroundAlpha: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - * Write-only. - */ - visible: boolean; - } - - interface Web3DProperties { - /** - * Has the value "web3d". Read-only. - */ - type: string; - /** - * The color of the overlay. - */ - color: Color; - /** - * The opacity of the overlay, 0.0 - 1.0. - */ - alpha: number; - /** - * The maximum value of the pulse multiplier. - */ - pulseMax: number; - /** - * The minimum value of the pulse multiplier. - */ - pulseMin: number; - /** - * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from - * pulseMin to pulseMax, then pulseMax to pulseMin in one period. - */ - pulsePeriod: number; - /** - * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - alphaPulse: number; - /** - * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the - * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 - the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise - used.) - */ - colorPulse: number; - /** - * If true, the overlay is rendered, otherwise it is not rendered. - */ - visible: boolean; - /** - * A friendly name for the overlay. - */ - name: string; - /** - * The position of the overlay center. Synonyms: p1, point, and - * start. - */ - position: Vec3; - /** - * The local position of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as position. - */ - localPosition: Vec3; - /** - * The orientation of the overlay. Synonym: orientation. - */ - rotation: Quat; - /** - * The orientation of the overlay relative to its parent if the overlay has a - * parentID set, otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * Synonyms: solid, isFilled, and filled. - * Antonyms: isWire and wire. - */ - isSolid: boolean; - /** - * If true, a dashed line is drawn on the overlay's edges. Synonym: - * dashed. - */ - isDashedLine: boolean; - /** - * If true, - * Overlays.findRayIntersection ignores the overlay. - */ - ignoreRayIntersection: boolean; - /** - * If true, the overlay is rendered in front of other overlays that don't - * have drawInFront set to true, and in front of entities. - */ - drawInFront: boolean; - /** - * Signal to grabbing scripts whether or not this overlay can be grabbed. - */ - grabbable: boolean; - /** - * The avatar, entity, or overlay that the overlay is parented to. - */ - parentID: Uuid; - /** - * Integer value specifying the skeleton joint that the overlay is attached to if - * parentID is an avatar skeleton. A value of 65535 means "no joint". - */ - parentJointIndex: number; - /** - * If true, the overlay is rotated to face the user's camera about an axis - * parallel to the user's avatar's "up" direction. - */ - isFacingAvatar: boolean; - /** - * The URL of the Web page to display. - */ - url: string; - /** - * The URL of a JavaScript file to inject into the Web page. - */ - scriptURL: string; - /** - * The dots per inch to display the Web page at, on the overlay. - */ - dpi: number; - /** - * The size of the overlay to display the Web page on, in meters. Synonyms: - * scale, size. - */ - dimensions: Vec2; - /** - * The maximum update rate for the Web overlay content, in frames/second. - */ - maxFPS: number; - /** - * If true, the Web overlay is highlighted when it has - * keyboard focus. - */ - showKeyboardFocusHighlight: boolean; - /** - * The user input mode to use - either "Touch" or "Mouse". - */ - inputMode: string; - } - - /** - * Get or set the Overlays.OverlayType overlay that has keyboard focus. - * If no overlay has keyboard focus, get returns null; set to null or Uuid to - clear keyboard focus. - */ - let keyboardFocusOverlay: Uuid; + interface Circle3DProperties { + /** + * Has the value "circle3d". Read-only. + */ + type: string; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + * Not used. + */ + dimensions: Vec2; + /** + * The counter-clockwise angle from the overlay's x-axis that drawing starts at, in degrees. + */ + startAt: number; + /** + * The counter-clockwise angle from the overlay's x-axis that drawing ends at, in degrees. + */ + endAt: number; + /** + * The outer radius of the overlay, in meters. Synonym: radius. + */ + outerRadius: number; + /** + * The inner radius of the overlay, in meters. + */ + innerRadius: number; + /** + * The color of the overlay. Setting this value also sets the values of + * innerStartColor, innerEndColor, outerStartColor, and outerEndColor. + */ + color: Color; + /** + * Sets the values of innerStartColor and outerStartColor. + * Write-only. + */ + startColor: Color; + /** + * Sets the values of innerEndColor and outerEndColor. + * Write-only. + */ + endColor: Color; + /** + * Sets the values of innerStartColor and innerEndColor. + * Write-only. + */ + innerColor: Color; + /** + * Sets the values of outerStartColor and outerEndColor. + * Write-only. + */ + outerColor: Color; + /** + * The color at the inner start point of the overlay. + */ + innerStartcolor: Color; + /** + * The color at the inner end point of the overlay. + */ + innerEndColor: Color; + /** + * The color at the outer start point of the overlay. + */ + outerStartColor: Color; + /** + * The color at the outer end point of the overlay. + */ + outerEndColor: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. Setting this value also sets + * the values of innerStartAlpha, innerEndAlpha, outerStartAlpha, and outerEndAlpha. Synonym: Alpha; write-only. + */ + alpha: number; + /** + * Sets the values of innerStartAlpha and outerStartAlpha. + * Write-only. + */ + startAlpha: number; + /** + * Sets the values of innerEndAlpha and outerEndAlpha. + * Write-only. + */ + endAlpha: number; + /** + * Sets the values of innerStartAlpha and innerEndAlpha. + * Write-only. + */ + innerAlpha: number; + /** + * Sets the values of outerStartAlpha and outerEndAlpha. + * Write-only. + */ + outerAlpha: number; + /** + * The alpha at the inner start point of the overlay. + */ + innerStartAlpha: number; + /** + * The alpha at the inner end point of the overlay. + */ + innerEndAlpha: number; + /** + * The alpha at the outer start point of the overlay. + */ + outerStartAlpha: number; + /** + * The alpha at the outer end point of the overlay. + */ + outerEndAlpha: number; + /** + * If true, tick marks are drawn. + */ + hasTickMarks: boolean; + /** + * The angle between major tick marks, in degrees. + */ + majorTickMarksAngle: number; + /** + * The angle between minor tick marks, in degrees. + */ + minorTickMarksAngle: number; + /** + * The length of the major tick marks, in meters. A positive value draws tick marks + * outwards from the inner radius; a negative value draws tick marks inwards from the outer radius. + */ + majorTickMarksLength: number; + /** + * The length of the minor tick marks, in meters. A positive value draws tick marks + * outwards from the inner radius; a negative value draws tick marks inwards from the outer radius. + */ + minorTickMarksLength: number; + /** + * The color of the major tick marks. + */ + majorTickMarksColor: Color; + /** + * The color of the minor tick marks. + */ + minorTickMarksColor: Color; + } + + interface CubeProperties { + /** + * Has the value "cube". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec3; + } + + interface GridProperties { + /** + * Has the value "grid". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec2; + /** + * If true, the grid is always visible even as the camera moves to another + * position. + */ + followCamera: boolean; + /** + * Integer number of minorGridEvery intervals at which to draw a thick grid + * line. Minimum value = 1. + */ + majorGridEvery: number; + /** + * Real number of meters at which to draw thin grid lines. Minimum value = + * 0.001. + */ + minorGridEvery: number; + } + + interface Image3DProperties { + /** + * Has the value "image3d". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec2; + /** + * If true, the overlay is rotated to face the user's camera about an axis + * parallel to the user's avatar's "up" direction. + */ + isFacingAvatar: boolean; + /** + * The URL of the PNG or JPG image to display. + */ + url: string; + /** + * The portion of the image to display. Defaults to the full image. + */ + subImage: Rect; + /** + * If true, the overlay is displayed at full brightness, otherwise it is rendered + * with scene lighting. + */ + emissive: boolean; + } + + interface ImageProperties { + /** + * The position and size of the image display area, in pixels. Write-only. + */ + bounds: Rect; + /** + * Integer left, x-coordinate value of the image display area = bounds.x. + * Write-only. + */ + x: number; + /** + * Integer top, y-coordinate value of the image display area = bounds.y. + * Write-only. + */ + y: number; + /** + * Integer width of the image display area = bounds.width. Write-only. + */ + width: number; + /** + * Integer height of the image display area = bounds.height. Write-only. + */ + height: number; + /** + * The URL of the image file to display. The image is scaled to fit to the bounds. + * Write-only. + */ + imageURL: string; + /** + * Integer coordinates of the top left pixel to start using image content from. + * Write-only. + */ + subImage: Vec2; + /** + * The color to apply over the top of the image to colorize it. Write-only. + */ + color: Color; + /** + * The opacity of the color applied over the top of the image, 0.0 - + * 1.0. Write-only. + */ + alpha: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + * Write-only. + */ + visible: boolean; + } + + interface Line3DProperties { + /** + * Has the value "line3d". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The avatar, entity, or overlay that the end point of the line is parented to. + */ + endParentID: Uuid; + /** + * Integer value specifying the skeleton joint that the end point of the line is + * attached to if parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + endParentJointIndex: number; + /** + * The start point of the line. Synonyms: startPoint, p1, and + * position. + */ + start: Vec3; + /** + * The end point of the line. Synonyms: endPoint and p2. + */ + end: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as start. Synonym: localPosition. + */ + localStart: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * endParentID set, otherwise the same value as end. + */ + localEnd: Vec3; + /** + * The length of the line, in meters. This can be set after creating a line with start and end + * points. + */ + length: number; + /** + * If glow > 0, the line is rendered with a glow. + */ + glow: number; + /** + * If glow > 0, this is the width of the glow, in meters. + */ + lineWidth: number; + } + + interface ModelProperties { + /** + * Has the value "model". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * If true, the mesh parts of the model are LOD culled as a group. + * If false, separate mesh parts will be LOD culled individually. + */ + isGroupCulled: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The URL of the FBX or OBJ model used for the overlay. + */ + url: string; + /** + * The priority for loading and displaying the overlay. Overlays with higher values load + * first. + */ + loadPriority: number; + /** + * The dimensions of the overlay. Synonym: size. + */ + dimensions: Vec3; + /** + * The scale factor applied to the model's dimensions. + */ + scale: Vec3; + /** + * Maps the named textures in the model to the JPG or PNG images in the urls. + */ + textures: object.; + /** + * The names of the joints - if any - in the model. Read-only. + */ + jointNames: Array.; + /** + * The relative rotations of the model's joints. Not copied if overlay is + * cloned. + */ + jointRotations: Array.; + /** + * The relative translations of the model's joints. Not copied if overlay is + * cloned. + */ + jointTranslations: Array.; + /** + * The absolute orientations of the model's joints, in world coordinates. + * Read-only. + */ + jointOrientations: Array.; + /** + * The absolute positions of the model's joints, in world coordinates. + * Read-only. + */ + jointPositions: Array.; + /** + * The URL of an FBX file containing an animation to play. + */ + animationSettings.url: string; + /** + * The frame rate (frames/sec) to play the animation at. + */ + animationSettings.fps: number; + /** + * The frame to start playing at. + */ + animationSettings.firstFrame: number; + /** + * The frame to finish playing at. + */ + animationSettings.lastFrame: number; + /** + * The current frame being played. + */ + animationSettings.currentFrame: number; + /** + * Whether or not the animation is playing. + */ + animationSettings.running: boolean; + /** + * Whether or not the animation should repeat in a loop. + */ + animationSettings.loop: boolean; + /** + * Whether or not when the animation finishes, the rotations and + * translations of the last frame played should be maintained. + */ + animationSettings.hold: boolean; + /** + * Whether or not translations contained in the animation should + * be played. + */ + animationSettings.allowTranslation: boolean; + } + + interface OverlayProperties { + } + + interface RayToOverlayIntersectionResult { + /** + * true if the PickRay intersected with a 3D overlay, otherwise + * false. + */ + intersects: boolean; + /** + * The UUID of the overlay that was intersected. + */ + overlayID: Uuid; + /** + * The distance from the PickRay origin to the intersection point. + */ + distance: number; + /** + * The normal of the overlay surface at the intersection point. + */ + surfaceNormal: Vec3; + /** + * The position of the intersection point. + */ + intersection: Vec3; + /** + * Additional intersection details, if available. + */ + extraInfo: object; + } + + /** + * Add an overlay to the scene. + * @param type {Overlays.OverlayType} The type of the overlay to add. + * @param properties {Overlays.OverlayProperties} The properties of the overlay to add. + * @returns {Uuid} + */ + function addOverlay(type: Overlays.OverlayType, properties: Overlays.OverlayProperties): Uuid; + /** + * Create a clone of an existing overlay. + * @param overlayID {Uuid} The ID of the overlay to clone. + * @returns {Uuid} + */ + function cloneOverlay(overlayID: Uuid): Uuid; + /** + * Edit an overlay's properties. + * @param overlayID {Uuid} The ID of the overlay to edit. + * @param properties {Overlays.OverlayProperties} The properties changes to make. + * @returns {boolean} + */ + function editOverlay(overlayID: Uuid, properties: Overlays.OverlayProperties): boolean; + /** + * Edit multiple overlays' properties. + * @param propertiesById {object.} An object with overlay IDs as keys and + * {@link Overlays.OverlayProperties|OverlayProperties} edits to make as values. + * @returns {boolean} + */ + function editOverlays(propertiesById: object.): boolean; + /** + * Delete an overlay. + * @param overlayID {Uuid} The ID of the overlay to delete. + */ + function deleteOverlay(overlayID: Uuid): void; + /** + * Get the type of an overlay. + * @param overlayID {Uuid} The ID of the overlay to get the type of. + * @returns {Overlays.OverlayType} + */ + function getOverlayType(overlayID: Uuid): Overlays.OverlayType; + /** + * Get the overlay script object. In particular, this is useful for accessing the event bridge for a web3d + * overlay. + * @param overlayID {Uuid} The ID of the overlay to get the script object of. + * @returns {object} + */ + function getOverlayObject(overlayID: Uuid): object; + /** + * Get the ID of the 2D overlay at a particular point on the screen or HUD. + * @param point {Vec2} The point to check for an overlay. + * @returns {Uuid} + */ + function getOverlayAtPoint(point: Vec2): Uuid; + /** + * Get the value of a 3D overlay's property. + * @param overlayID {Uuid} The ID of the overlay. Must be for a 3D {@link Overlays.OverlayType|OverlayType}. + * @param property {string} The name of the property value to get. + * @returns {object} + */ + function getProperty(overlayID: Uuid, property: string): object; + /** + * Get the values of an overlay's properties. + * @param overlayID {Uuid} The ID of the overlay. + * @param properties {Array.} An array of names of properties to get the values of. + * @returns {Overlays.OverlayProperties} + */ + function getProperties(overlayID: Uuid, properties: Array.): Overlays.OverlayProperties; + /** + * Get the values of multiple overlays' properties. + * @param propertiesById {object.>} An object with overlay IDs as keys and arrays of the names of + * properties to get for each as values. + * @returns {object.} + */ + function getOverlaysProperties(propertiesById: object.>): object.; + /** + * Find the closest 3D overlay intersected by a PickRay. + * @param pickRay {PickRay} The PickRay to use for finding overlays. + * @param precisionPicking {boolean} [precisionPicking=false] Unused; exists to match Entity API. + * @param overlayIDsToInclude {Array.} [overlayIDsToInclude=[]] If not empty then the search is restricted to these overlays. + * @param overlayIDsToExclude {Array.} [overlayIDsToExclude=[]] Overlays to ignore during the search. + * @param visibleOnly {boolean} [visibleOnly=false] Unused; exists to match Entity API. + * @param collidableOnly {boolean} [collidableOnly=false] Unused; exists to match Entity API. + * @returns {Overlays.RayToOverlayIntersectionResult} + */ + function findRayIntersection(pickRay: PickRay, precisionPicking: boolean, overlayIDsToInclude: Array., overlayIDsToExclude: Array., visibleOnly: boolean, collidableOnly: boolean): Overlays.RayToOverlayIntersectionResult; + /** + * Return a list of 3D overlays with bounding boxes that touch a search sphere. + * @param center {Vec3} The center of the search sphere. + * @param radius {number} The radius of the search sphere. + * @returns {Array.} + */ + function findOverlays(center: Vec3, radius: number): Array.; + /** + * Check whether an overlay's assets have been loaded. For example, for an image overlay the result indicates + * whether its image has been loaded. + * @param overlayID {Uuid} The ID of the overlay to check. + * @returns {boolean} + */ + function isLoaded(overlayID: Uuid): boolean; + /** + * Calculates the size of the given text in the specified overlay if it is a text overlay. + * @param overlayID {Uuid} The ID of the overlay to use for calculation. + * @param text {string} The string to calculate the size of. + * @returns {Size} + */ + function textSize(overlayID: Uuid, text: string): Size; + /** + * Get the width of the window or HUD. + * @returns {number} + */ + function width(): number; + /** + * Get the height of the window or HUD. + * @returns {number} + */ + function height(): number; + /** + * Check if there is an overlay of a given ID. + * @param overlayID {Uuid} The ID to check. + * @returns {boolean} + */ + function isAddedOverlay(overlayID: Uuid): boolean; + /** + * Generate a mouse press event on an overlay. + * @param overlayID {Uuid} The ID of the overlay to generate a mouse press event on. + * @param event {PointerEvent} The mouse press event details. + */ + function sendMousePressOnOverlay(overlayID: Uuid, event: PointerEvent): void; + /** + * Generate a mouse release event on an overlay. + * @param overlayID {Uuid} The ID of the overlay to generate a mouse release event on. + * @param event {PointerEvent} The mouse release event details. + */ + function sendMouseReleaseOnOverlay(overlayID: Uuid, event: PointerEvent): void; + /** + * Generate a mouse move event on an overlay. + * @param overlayID {Uuid} The ID of the overlay to generate a mouse move event on. + * @param event {PointerEvent} The mouse move event details. + */ + function sendMouseMoveOnOverlay(overlayID: Uuid, event: PointerEvent): void; + /** + * Generate a hover enter event on an overlay. + * @param id {Uuid} The ID of the overlay to generate a hover enter event on. + * @param event {PointerEvent} The hover enter event details. + */ + function sendHoverEnterOverlay(id: Uuid, event: PointerEvent): void; + /** + * Generate a hover over event on an overlay. + * @param overlayID {Uuid} The ID of the overlay to generate a hover over event on. + * @param event {PointerEvent} The hover over event details. + */ + function sendHoverOverOverlay(overlayID: Uuid, event: PointerEvent): void; + /** + * Generate a hover leave event on an overlay. + * @param overlayID {Uuid} The ID of the overlay to generate a hover leave event on. + * @param event {PointerEvent} The hover leave event details. + */ + function sendHoverLeaveOverlay(overlayID: Uuid, event: PointerEvent): void; + /** + * Get the ID of the Web3D overlay that has keyboard focus. + * @returns {Uuid} + */ + function getKeyboardFocusOverlay(): Uuid; + /** + * Set the Web3D overlay that has keyboard focus. + * @param overlayID {Uuid} The ID of the {@link Overlays.OverlayType|web3d} overlay to set keyboard focus to. Use + * null or {@link Uuid|Uuid.NULL} to unset keyboard focus from an overlay. + */ + function setKeyboardFocusOverlay(overlayID: Uuid): void; + /** + * Triggered when an overlay is deleted. + * @param overlayID {Uuid} The ID of the overlay that was deleted. + * @returns {Signal} + */ + function overlayDeleted(overlayID: Uuid): Signal; + /** + * Triggered when a mouse press event occurs on an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendMousePressOnOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the mouse press event occurred on. + * @param event {PointerEvent} The mouse press event details. + * @returns {Signal} + */ + function mousePressOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse double press event occurs on an overlay. Only occurs for 3D overlays. + * @param overlayID {Uuid} The ID of the overlay the mouse double press event occurred on. + * @param event {PointerEvent} The mouse double press event details. + * @returns {Signal} + */ + function mouseDoublePressOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse release event occurs on an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendMouseReleaseOnOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the mouse release event occurred on. + * @param event {PointerEvent} The mouse release event details. + * @returns {Signal} + */ + function mouseReleaseOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse move event occurs on an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendMouseMoveOnOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the mouse moved event occurred on. + * @param event {PointerEvent} The mouse move event details. + * @returns {Signal} + */ + function mouseMoveOnOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse press event occurs on something other than a 3D overlay. + * @returns {Signal} + */ + function mousePressOffOverlay(): Signal; + /** + * Triggered when a mouse double press event occurs on something other than a 3D overlay. + * @returns {Signal} + */ + function mouseDoublePressOffOverlay(): Signal; + /** + * Triggered when a mouse cursor starts hovering over an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendHoverEnterOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the mouse moved event occurred on. + * @param event {PointerEvent} The mouse move event details. + * @returns {Signal} + */ + function hoverEnterOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse cursor continues hovering over an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendHoverOverOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the hover over event occurred on. + * @param event {PointerEvent} The hover over event details. + * @returns {Signal} + */ + function hoverOverOverlay(overlayID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse cursor finishes hovering over an overlay. Only occurs for 3D overlays (unless you use + * Overlays.sendHoverLeaveOverlay for a 2D overlay). + * @param overlayID {Uuid} The ID of the overlay the hover leave event occurred on. + * @param event {PointerEvent} The hover leave event details. + * @returns {Signal} + */ + function hoverLeaveOverlay(overlayID: Uuid, event: PointerEvent): Signal; + interface Rectangle3DProperties { + /** + * Has the value "rectangle3d". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec2; + } + + interface RectangleProperties { + /** + * The position and size of the rectangle, in pixels. Write-only. + */ + bounds: Rect; + /** + * Integer left, x-coordinate value = bounds.x. Write-only. + */ + x: number; + /** + * Integer top, y-coordinate value = bounds.y. Write-only. + */ + y: number; + /** + * Integer width of the rectangle = bounds.width. Write-only. + */ + width: number; + /** + * Integer height of the rectangle = bounds.height. Write-only. + */ + height: number; + /** + * The color of the overlay. Write-only. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. Write-only. + */ + alpha: number; + /** + * Integer width of the border, in pixels. The border is drawn within the rectangle's bounds. + * It is not drawn unless either borderColor or borderAlpha are specified. Write-only. + */ + borderWidth: number; + /** + * Integer corner radius, in pixels. Write-only. + */ + radius: number; + /** + * The color of the border. Write-only. + */ + borderColor: Color; + /** + * The opacity of the border, 0.0 - 1.0. + * Write-only. + */ + borderAlpha: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + * Write-only. + */ + visible: boolean; + } + + interface ShapeProperties { + /** + * Has the value "shape". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec3; + /** + * The geometrical shape of the overlay. + */ + shape: Overlays.Shape; + } + + interface SphereProperties { + /** + * Has the value "sphere". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec3; + } + + interface Text3DProperties { + /** + * Has the value "text3d". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * The dimensions of the overlay. Synonyms: scale, size. + */ + dimensions: Vec2; + /** + * If true, the overlay is rotated to face the user's camera about an axis + * parallel to the user's avatar's "up" direction. + */ + isFacingAvatar: boolean; + /** + * The text to display. Text does not automatically wrap; use \n for a line break. + */ + text: string; + /** + * The text alpha value. + */ + textAlpha: number; + /** + * The background color. + */ + backgroundColor: Color; + /** + * The background alpha value. + */ + backgroundAlpha: number; + /** + * The height of a line of text in meters. + */ + lineHeight: number; + /** + * The left margin, in meters. + */ + leftMargin: number; + /** + * The top margin, in meters. + */ + topMargin: number; + /** + * The right margin, in meters. + */ + rightMargin: number; + /** + * The bottom margin, in meters. + */ + bottomMargin: number; + } + + interface TextProperties { + /** + * The position and size of the rectangle, in pixels. Write-only. + */ + bounds: Rect; + /** + * Integer left, x-coordinate value = bounds.x. Write-only. + */ + x: number; + /** + * Integer top, y-coordinate value = bounds.y. Write-only. + */ + y: number; + /** + * Integer width of the rectangle = bounds.width. Write-only. + */ + width: number; + /** + * Integer height of the rectangle = bounds.height. Write-only. + */ + height: number; + /** + * Sets the leftMargin and topMargin values, in pixels. + * Write-only. + */ + margin: number; + /** + * The left margin's size, in pixels. This value is also used for the right margin. + * Write-only. + */ + leftMargin: number; + /** + * The top margin's size, in pixels. This value is also used for the bottom margin. + * Write-only. + */ + topMargin: number; + /** + * The text to display. Text does not automatically wrap; use \n for a line break. Text + * is clipped to the bounds. Write-only. + */ + text: string; + /** + * The size of the text, in pixels. Write-only. + */ + font.size: number; + /** + * The height of a line of text, in pixels. Write-only. + */ + lineHeight: number; + /** + * The color of the text. Synonym: textColor. Write-only. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. Write-only. + */ + alpha: number; + /** + * The color of the background rectangle. Write-only. + */ + backgroundColor: Color; + /** + * The opacity of the background rectangle. Write-only. + */ + backgroundAlpha: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + * Write-only. + */ + visible: boolean; + } + + interface Web3DProperties { + /** + * Has the value "web3d". Read-only. + */ + type: string; + /** + * The color of the overlay. + */ + color: Color; + /** + * The opacity of the overlay, 0.0 - 1.0. + */ + alpha: number; + /** + * The maximum value of the pulse multiplier. + */ + pulseMax: number; + /** + * The minimum value of the pulse multiplier. + */ + pulseMin: number; + /** + * The duration of the color and alpha pulse, in seconds. A pulse multiplier value goes from + * pulseMin to pulseMax, then pulseMax to pulseMin in one period. + */ + pulsePeriod: number; + /** + * If non-zero, the alpha of the overlay is pulsed: the alpha value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + alphaPulse: number; + /** + * If non-zero, the color of the overlay is pulsed: the color value is multiplied by the + * current pulse multiplier value each frame. If > 0 the pulse multiplier is applied in phase with the pulse period; if < 0 the pulse multiplier is applied out of phase with the pulse period. (The magnitude of the property isn't otherwise used.) + */ + colorPulse: number; + /** + * If true, the overlay is rendered, otherwise it is not rendered. + */ + visible: boolean; + /** + * A friendly name for the overlay. + */ + name: string; + /** + * The position of the overlay center. Synonyms: p1, point, and + * start. + */ + position: Vec3; + /** + * The local position of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as position. + */ + localPosition: Vec3; + /** + * The orientation of the overlay. Synonym: orientation. + */ + rotation: Quat; + /** + * The orientation of the overlay relative to its parent if the overlay has a + * parentID set, otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * Synonyms: solid, isFilled, and filled. + * Antonyms: isWire and wire. + */ + isSolid: boolean; + /** + * If true, a dashed line is drawn on the overlay's edges. Synonym: + * dashed. + */ + isDashedLine: boolean; + /** + * If true, picks ignore the overlay. ignoreRayIntersection is a synonym. + */ + ignorePickIntersection: boolean; + /** + * If true, the overlay is rendered in front of other overlays that don't + * have drawInFront set to true, and in front of entities. + */ + drawInFront: boolean; + /** + * Signal to grabbing scripts whether or not this overlay can be grabbed. + */ + grabbable: boolean; + /** + * The avatar, entity, or overlay that the overlay is parented to. + */ + parentID: Uuid; + /** + * Integer value specifying the skeleton joint that the overlay is attached to if + * parentID is an avatar skeleton. A value of 65535 means "no joint". + */ + parentJointIndex: number; + /** + * If true, the overlay is rotated to face the user's camera about an axis + * parallel to the user's avatar's "up" direction. + */ + isFacingAvatar: boolean; + /** + * The URL of the Web page to display. + */ + url: string; + /** + * The URL of a JavaScript file to inject into the Web page. + */ + scriptURL: string; + /** + * The dots per inch to display the Web page at, on the overlay. + */ + dpi: number; + /** + * The size of the overlay to display the Web page on, in meters. Synonyms: + * scale, size. + */ + dimensions: Vec2; + /** + * The maximum update rate for the Web overlay content, in frames/second. + */ + maxFPS: number; + /** + * If true, the Web overlay is highlighted when it has + * keyboard focus. + */ + showKeyboardFocusHighlight: boolean; + /** + * The user input mode to use - either "Touch" or "Mouse". + */ + inputMode: string; + } + + /** + * Get or set the Overlays.OverlayType overlay that has keyboard focus. + * If no overlay has keyboard focus, get returns null; set to null or Uuid to clear keyboard focus. + */ + let keyboardFocusOverlay: Uuid; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare class AnimationObject { + /** + * @returns {Array.} + */ + getJointNames(): Array.; + /** + * @returns {Array.} + */ + getFrames(): Array.; } /** -* Available in:Interface ScriptsClient Entity ScriptsAssignment Client ScriptsAPI to manage animation cache resources. -*/ + * Available in:Interface ScriptsClient Entity ScriptsAssignment Client ScriptsAPI to manage animation cache resources. + */ declare namespace AnimationCache { - /** - * Get the list of all resource URLs. - * @returns {Array.} - */ - function getResourceList(): Array.; - /** - * @returns {Signal} - */ - function dirty(): Signal; - /** - * @param deltaSize {number} - */ - function updateTotalSize(deltaSize: number): void; - /** - * Prefetches a resource. - * @param url {string} URL of the resource to prefetch. - * @param extra {object} [extra=null] - * @returns {Resource} - */ - function prefetch(url: string, extra: object): Resource; - /** - * Asynchronously loads a resource from the specified URL and returns it. - * @param url {string} URL of the resource to load. - * @param fallback {string} [fallback=""] Fallback URL if load of the desired URL fails. - * @param extra {} [extra=null] - * @returns {Resource} - */ - function getResource(url: string, fallback: string, extra): Resource; - /** - * Returns animation resource for particular animation. - * @param url {string} URL to load. - * @returns {Resource} - */ - function getAnimation(url: string): Resource; - /** - * Total number of total resources. Read-only. - */ - let numTotal: number; - /** - * Total number of cached resource. Read-only. - */ - let numCached: number; - /** - * Size in bytes of all resources. Read-only. - */ - let sizeTotal: number; - /** - * Size in bytes of all cached resources. Read-only. - */ - let sizeCached: number; + /** + * Returns animation resource for particular animation. + * @param url {string} URL to load. + * @returns {AnimationObject} + */ + function getAnimation(url: string): AnimationObject; + /** + * Get the list of all resource URLs. + * @returns {Array.} + */ + function getResourceList(): Array.; + /** + * @param deltaSize {number} + */ + function updateTotalSize(deltaSize: number): void; + /** + * Prefetches a resource. + * @param url {string} URL of the resource to prefetch. + * @param extra {object} [extra=null] + * @returns {ResourceObject} + */ + function prefetch(url: string, extra: object): ResourceObject; + /** + * @returns {Signal} + */ + function dirty(): Signal; + /** + * Total number of total resources. Read-only. + */ + let numTotal: number; + /** + * Total number of cached resource. Read-only. + */ + let numCached: number; + /** + * Size in bytes of all resources. Read-only. + */ + let sizeTotal: number; + /** + * Size in bytes of all cached resources. Read-only. + */ + let sizeCached: number; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare class AudioStreamStats { } /** -* Available in:Interface ScriptsClient Entity ScriptsAudio stats from the client. -*/ + * Available in:Interface ScriptsClient Entity ScriptsAudio stats from the client. + */ declare namespace AudioStats { - /** - * @param pingMs {number} - * @returns {Signal} - */ - function pingMsChanged(pingMs: number): Signal; - /** - * @param inputReadMsMax {number} - * @returns {Signal} - */ - function inputReadMsMaxChanged(inputReadMsMax: number): Signal; - /** - * @param inputUnplayedMsMax {number} - * @returns {Signal} - */ - function inputUnplayedMsMaxChanged(inputUnplayedMsMax: number): Signal; - /** - * @param outputUnplayedMsMax {number} - * @returns {Signal} - */ - function outputUnplayedMsMaxChanged(outputUnplayedMsMax: number): Signal; - /** - * @param sentTimegapMsMax {number} - * @returns {Signal} - */ - function sentTimegapMsMaxChanged(sentTimegapMsMax: number): Signal; - /** - * @param sentTimegapMsAvg {number} - * @returns {Signal} - */ - function sentTimegapMsAvgChanged(sentTimegapMsAvg: number): Signal; - /** - * @param sentTimegapMsMaxWindow {number} - * @returns {Signal} - */ - function sentTimegapMsMaxWindowChanged(sentTimegapMsMaxWindow: number): Signal; - /** - * @param sentTimegapMsAvgWindow {number} - * @returns {Signal} - */ - function sentTimegapMsAvgWindowChanged(sentTimegapMsAvgWindow: number): Signal; - /** - * @returns {Signal} - */ - function mixerStreamChanged(): Signal; - /** - * @returns {Signal} - */ - function clientStreamChanged(): Signal; - /** - * @returns {Signal} - */ - function injectorStreamsChanged(): Signal; - /** - * Read-only. - */ - let pingMs: number; - /** - * Read-only. - */ - let inputReadMsMax: number; - /** - * Read-only. - */ - let inputUnplayedMsMax: number; - /** - * Read-only. - */ - let outputUnplayedMsMax: number; - /** - * Read-only. - */ - let sentTimegapMsMax: number; - /** - * Read-only. - */ - let sentTimegapMsAvg: number; - /** - * Read-only. - */ - let sentTimegapMsMaxWindow: number; - /** - * Read-only. - */ - let sentTimegapMsAvgWindow: number; - /** - * Read-only. - */ - let clientStream: AudioStats.AudioStreamStats; - /** - * Read-only. - */ - let mixerStream: AudioStats.AudioStreamStats; + /** + * @param pingMs {number} + * @returns {Signal} + */ + function pingMsChanged(pingMs: number): Signal; + /** + * @param inputReadMsMax {number} + * @returns {Signal} + */ + function inputReadMsMaxChanged(inputReadMsMax: number): Signal; + /** + * @param inputUnplayedMsMax {number} + * @returns {Signal} + */ + function inputUnplayedMsMaxChanged(inputUnplayedMsMax: number): Signal; + /** + * @param outputUnplayedMsMax {number} + * @returns {Signal} + */ + function outputUnplayedMsMaxChanged(outputUnplayedMsMax: number): Signal; + /** + * @param sentTimegapMsMax {number} + * @returns {Signal} + */ + function sentTimegapMsMaxChanged(sentTimegapMsMax: number): Signal; + /** + * @param sentTimegapMsAvg {number} + * @returns {Signal} + */ + function sentTimegapMsAvgChanged(sentTimegapMsAvg: number): Signal; + /** + * @param sentTimegapMsMaxWindow {number} + * @returns {Signal} + */ + function sentTimegapMsMaxWindowChanged(sentTimegapMsMaxWindow: number): Signal; + /** + * @param sentTimegapMsAvgWindow {number} + * @returns {Signal} + */ + function sentTimegapMsAvgWindowChanged(sentTimegapMsAvgWindow: number): Signal; + /** + * @returns {Signal} + */ + function mixerStreamChanged(): Signal; + /** + * @returns {Signal} + */ + function clientStreamChanged(): Signal; + /** + * @returns {Signal} + */ + function injectorStreamsChanged(): Signal; + /** + * Read-only. + */ + let pingMs: number; + /** + * Read-only. + */ + let inputReadMsMax: number; + /** + * Read-only. + */ + let inputUnplayedMsMax: number; + /** + * Read-only. + */ + let outputUnplayedMsMax: number; + /** + * Read-only. + */ + let sentTimegapMsMax: number; + /** + * Read-only. + */ + let sentTimegapMsAvg: number; + /** + * Read-only. + */ + let sentTimegapMsMaxWindow: number; + /** + * Read-only. + */ + let sentTimegapMsAvgWindow: number; + /** + * Read-only. + */ + let clientStream: AudioStats.AudioStreamStats; + /** + * Read-only. + */ + let mixerStream: AudioStats.AudioStreamStats; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts -* @param reverbOptions {AudioEffectOptions.ReverbOptions} [reverbOptions=null] -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsAudio effect options used by the Audio API. + * Create using new AudioEffectOptions(reverbOptions). + * @param reverbOptions {AudioEffectOptions.ReverbOptions} [reverbOptions=null] Reverberation options. + */ declare class AudioEffectOptions { - interface ReverbOptions { - bandwidth: number; - preDelay: number; - lateDelay: number; - reverbTime: number; - earlyDiffusion: number; - lateDiffusion: number; - roomSize: number; - density: number; - bassMult: number; - bassFreq: number; - highGain: number; - highFreq: number; - modRate: number; - modDepth: number; - earlyGain: number; - lateGain: number; - earlyMixLeft: number; - earlyMixRight: number; - lateMixLeft: number; - lateMixRight: number; - wetDryMix: number; - } + interface ReverbOptions { + /** + * The corner frequency (Hz) of the low-pass filter at reverb input. + */ + bandwidth: number; + /** + * The delay (milliseconds) between dry signal and the onset of early reflections. + */ + preDelay: number; + /** + * The delay (milliseconds) between early reflections and the onset of reverb tail. + */ + lateDelay: number; + /** + * The time (seconds) for the reverb tail to decay by 60dB, also known as RT60. + */ + reverbTime: number; + /** + * Adjusts the buildup of echo density in the early reflections, normally 100%. + */ + earlyDiffusion: number; + /** + * Adjusts the buildup of echo density in the reverb tail, normally 100%. + */ + lateDiffusion: number; + /** + * The apparent room size, from small (0%) to large (100%). + */ + roomSize: number; + /** + * Adjusts the echo density in the reverb tail, normally 100%. + */ + density: number; + /** + * Adjusts the bass-frequency reverb time, as multiple of reverbTime. + */ + bassMult: number; + /** + * The crossover frequency (Hz) for the onset of bassMult. + */ + bassFreq: number; + /** + * Reduces the high-frequency reverb time, as attenuation (dB). + */ + highGain: number; + /** + * The crossover frequency (Hz) for the onset of highGain. + */ + highFreq: number; + /** + * The rate of modulation (Hz) of the LFO-modulated delay lines. + */ + modRate: number; + /** + * The depth of modulation (percent) of the LFO-modulated delay lines. + */ + modDepth: number; + /** + * Adjusts the relative level (dB) of the early reflections. + */ + earlyGain: number; + /** + * Adjusts the relative level (dB) of the reverb tail. + */ + lateGain: number; + /** + * The apparent distance of the source (percent) in the early reflections. + */ + earlyMixLeft: number; + /** + * The apparent distance of the source (percent) in the early reflections. + */ + earlyMixRight: number; + /** + * The apparent distance of the source (percent) in the reverb tail. + */ + lateMixLeft: number; + /** + * The apparent distance of the source (percent) in the reverb tail. + */ + lateMixRight: number; + /** + * Adjusts the wet/dry ratio, from completely dry (0%) to completely wet (100%). + */ + wetDryMix: number; + } + +} +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsAn audio resource, created by SoundCache.getSound, to be played back using Audio.playSound. + * Supported formats: WAV: 16-bit uncompressed WAV at any sample rate, with 1 (mono), 2(stereo), or 4 (ambisonic) channels. MP3: Mono or stereo, at any sample rate. RAW: 48khz 16-bit mono or stereo. Filename must include ".stereo" to be interpreted as stereo. + */ +declare class SoundObject { + /** + * Triggered when the sound has been downloaded and is ready to be played. + * @returns {Signal} + */ + ready(): Signal; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsAPI to manage sound cache resources. -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsAPI to manage sound cache resources. + */ declare namespace SoundCache { - /** - * Get the list of all resource URLs. - * @returns {Array.} - */ - function getResourceList(): Array.; - /** - * @returns {Signal} - */ - function dirty(): Signal; - /** - * @param deltaSize {number} - */ - function updateTotalSize(deltaSize: number): void; - /** - * Prefetches a resource. - * @param url {string} URL of the resource to prefetch. - * @param extra {object} [extra=null] - * @returns {Resource} - */ - function prefetch(url: string, extra: object): Resource; - /** - * Asynchronously loads a resource from the specified URL and returns it. - * @param url {string} URL of the resource to load. - * @param fallback {string} [fallback=""] Fallback URL if load of the desired URL fails. - * @param extra {} [extra=null] - * @returns {Resource} - */ - function getResource(url: string, fallback: string, extra): Resource; - /** - * @param url {string} - * @returns {object} - */ - function getSound(url: string): object; - /** - * Total number of total resources. Read-only. - */ - let numTotal: number; - /** - * Total number of cached resource. Read-only. - */ - let numCached: number; - /** - * Size in bytes of all resources. Read-only. - */ - let sizeTotal: number; - /** - * Size in bytes of all cached resources. Read-only. - */ - let sizeCached: number; + /** + * Loads the content of an audio file into a SoundObject, ready for playback by Audio.playSound. + * @param url {string} The URL of the audio file to load — Web, ATP, or file. See {@link SoundObject} for supported + * formats. + * @returns {SoundObject} + */ + function getSound(url: string): SoundObject; + /** + * Get the list of all resource URLs. + * @returns {Array.} + */ + function getResourceList(): Array.; + /** + * @param deltaSize {number} + */ + function updateTotalSize(deltaSize: number): void; + /** + * Prefetches a resource. + * @param url {string} URL of the resource to prefetch. + * @param extra {object} [extra=null] + * @returns {ResourceObject} + */ + function prefetch(url: string, extra: object): ResourceObject; + /** + * @returns {Signal} + */ + function dirty(): Signal; + /** + * Total number of total resources. Read-only. + */ + let numTotal: number; + /** + * Total number of cached resource. Read-only. + */ + let numCached: number; + /** + * Size in bytes of all resources. Read-only. + */ + let sizeTotal: number; + /** + * Size in bytes of all cached resources. Read-only. + */ + let sizeCached: number; } /** -* Available in:Assignment Client ScriptsNote: An AvatarList API is also provided for Interface and client entity scripts: it is a -* synonym for the AvatarManager API. -*/ + * Available in:Assignment Client ScriptsNote: An AvatarList API is also provided for Interface and client entity scripts: it is a + * synonym for the AvatarManager API. + */ declare namespace AvatarList { - /** - * @returns {Array.} - */ - function getAvatarIdentifiers(): Array.; - /** - * @param position {Vec3} - * @param range {number} - * @returns {Array.} - */ - function getAvatarsInRange(position: Vec3, range: number): Array.; - /** - * @param avatarID {Uuid} - * @returns {AvatarData} - */ - function getAvatar(avatarID: Uuid): AvatarData; - /** - * @param sessionUUID {Uuid} - * @returns {Signal} - */ - function avatarAddedEvent(sessionUUID: Uuid): Signal; - /** - * @param sessionUUID {Uuid} - * @returns {Signal} - */ - function avatarRemovedEvent(sessionUUID: Uuid): Signal; - /** - * @param sessionUUID {Uuid} - * @param oldSessionUUID {Uuid} - * @returns {Signal} - */ - function avatarSessionChangedEvent(sessionUUID: Uuid, oldSessionUUID: Uuid): Signal; - /** - * @param position {string} - * @param range {string} - * @returns {boolean} - */ - function isAvatarInRange(position: string, range: string): boolean; - /** - * @param sessionUUID {Uuid} - * @param oldSessionUUID {Uuid} - */ - function sessionUUIDChanged(sessionUUID: Uuid, oldSessionUUID: Uuid): void; - /** - * @param message {} - * @param sendingNode {} - */ - function processAvatarDataPacket(message, sendingNode): void; - /** - * @param message {} - * @param sendingNode {} - */ - function processAvatarIdentityPacket(message, sendingNode): void; - /** - * @param message {} - * @param sendingNode {} - */ - function processKillAvatar(message, sendingNode): void; + /** + * @returns {Array.} + */ + function getAvatarIdentifiers(): Array.; + /** + * @param position {Vec3} + * @param range {number} + * @returns {Array.} + */ + function getAvatarsInRange(position: Vec3, range: number): Array.; + /** + * @param avatarID {Uuid} + * @returns {AvatarData} + */ + function getAvatar(avatarID: Uuid): AvatarData; + /** + * @param sessionUUID {Uuid} + * @returns {Signal} + */ + function avatarAddedEvent(sessionUUID: Uuid): Signal; + /** + * @param sessionUUID {Uuid} + * @returns {Signal} + */ + function avatarRemovedEvent(sessionUUID: Uuid): Signal; + /** + * @param sessionUUID {Uuid} + * @param oldSessionUUID {Uuid} + * @returns {Signal} + */ + function avatarSessionChangedEvent(sessionUUID: Uuid, oldSessionUUID: Uuid): Signal; + /** + * @param position {string} + * @param range {string} + * @returns {boolean} + */ + function isAvatarInRange(position: string, range: string): boolean; + /** + * @param sessionUUID {Uuid} + * @param oldSessionUUID {Uuid} + */ + function sessionUUIDChanged(sessionUUID: Uuid, oldSessionUUID: Uuid): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processAvatarDataPacket(message, sendingNode): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processAvatarIdentityPacket(message, sendingNode): void; + /** + * @param message {} + * @param sendingNode {} + */ + function processKillAvatar(message, sendingNode): void; } /** -* Available in:Interface ScriptsClient Entity ScriptsA Controller mapping object that can contain a set of routes that map: -* - Controller.Standard outputs to Controller.Actions actions or script functions. - Controller.Hardware outputs to Controller.Standard outputs, Controller.Actions actions, or - script functions. - - -Create by one of the following methods: - - Use Controller.newMapping to create the mapping object, add routes using MappingObject#from or - MappingObject#makeAxis, and map the routes to actions or functions using RouteObject - methods. - Use Controller.parseMapping or Controller.loadMapping to load a Controller.MappingJSON. - - -Enable the mapping using MappingObject#enable or Controller.enableMapping for it to take -effect. - -Mappings and their routes are applied according to the following rules: - - One read per output: after a controller output has been read, it can't be read again. Exception: You can use - RouteObject#peek to read a value without marking that output as having been read. - Existing mapping routes take precedence over new mapping routes: within a mapping, if a route is added for a control - output that already has a route the new route is ignored. - New mappings override previous mappings: each output is processed using the route in the most recently enabled - mapping that contains that output. -*/ + * Available in:Interface ScriptsClient Entity ScriptsA Controller mapping object that can contain a set of routes that map: + * Controller.Standard outputs to Controller.Actions actions or script functions. Controller.Hardware outputs to Controller.Standard outputs, Controller.Actions actions, or script functions. Create by one of the following methods: Use Controller.newMapping to create the mapping object, add routes using MappingObject#from or MappingObject#makeAxis, and map the routes to actions or functions using RouteObject methods. Use Controller.parseMapping or Controller.loadMapping to load a Controller.MappingJSON. Enable the mapping using MappingObject#enable or Controller.enableMapping for it to take effect. Mappings and their routes are applied according to the following rules: One read per output: after a controller output has been read, it can't be read again. Exception: You can use RouteObject#peek to read a value without marking that output as having been read. Existing mapping routes take precedence over new mapping routes: within a mapping, if a route is added for a control output that already has a route the new route is ignored. New mappings override previous mappings: each output is processed using the route in the most recently enabled mapping that contains that output. + */ declare class MappingObject { - /** - * Create a new RouteObject from a controller output, ready to be mapped to a standard control, action, or - * function. -This is a QML-specific version of MappingObject#from: use this version in QML files. - * @param source {Controller.Standard} The controller output or function that is the source - * of the route data. If a function, it must return a number or a {@link Pose} value as the route data. - * @returns {RouteObject} - */ - fromQml(source: Controller.Standard): RouteObject; - /** - * Create a new RouteObject from two numeric Controller.Hardware outputs, one applied in the negative - * direction and the other in the positive direction, ready to be mapped to a standard control, action, or function. -This is a QML-specific version of MappingObject#makeAxis: use this version in QML files. - * @param source1 {Controller.Hardware} The first, negative-direction controller output. - * @param source2 {Controller.Hardware} The second, positive-direction controller output. - * @returns {RouteObject} - */ - makeAxisQml(source1: Controller.Hardware, source2: Controller.Hardware): RouteObject; - /** - * Create a new RouteObject from a controller output, ready to be mapped to a standard control, action, or - * function. - * @param source {Controller.Standard} The controller output or function that is the source - * of the route data. If a function, it must return a number or a {@link Pose} value as the route data. - * @returns {RouteObject} - */ - from(source: Controller.Standard): RouteObject; - /** - * Create a new RouteObject from two numeric Controller.Hardware outputs, one applied in the negative - * direction and the other in the positive direction, ready to be mapped to a standard control, action, or function. - * @param source1 {Controller.Hardware} The first, negative-direction controller output. - * @param source2 {Controller.Hardware} The second, positive-direction controller output. - * @returns {RouteObject} - */ - makeAxis(source1: Controller.Hardware, source2: Controller.Hardware): RouteObject; - /** - * Enable or disable the mapping. When enabled, the routes in the mapping take effect. - * Synonymous with Controller.enableMapping. - * @param enable {boolean} If true then the mapping is enabled, otherwise it is disabled. - * @returns {MappingObject} - */ - enable(enable: boolean): MappingObject; - /** - * Disable the mapping. When disabled, the routes in the mapping have no effect. - * Synonymous with Controller.disableMapping. - * @returns {MappingObject} - */ - disable(): MappingObject; + /** + * Create a new RouteObject from a controller output, ready to be mapped to a standard control, action, or + * function. This is a QML-specific version of MappingObject#from: use this version in QML files. + * @param source {Controller.Standard} The controller output or function that is the source + * of the route data. If a function, it must return a number or a {@link Pose} value as the route data. + * @returns {RouteObject} + */ + fromQml(source: Controller.Standard): RouteObject; + /** + * Create a new RouteObject from two numeric Controller.Hardware outputs, one applied in the negative + * direction and the other in the positive direction, ready to be mapped to a standard control, action, or function. This is a QML-specific version of MappingObject#makeAxis: use this version in QML files. + * @param source1 {Controller.Hardware} The first, negative-direction controller output. + * @param source2 {Controller.Hardware} The second, positive-direction controller output. + * @returns {RouteObject} + */ + makeAxisQml(source1: Controller.Hardware, source2: Controller.Hardware): RouteObject; + /** + * Create a new RouteObject from a controller output, ready to be mapped to a standard control, action, or + * function. + * @param source {Controller.Standard} The controller output or function that is the source + * of the route data. If a function, it must return a number or a {@link Pose} value as the route data. + * @returns {RouteObject} + */ + from(source: Controller.Standard): RouteObject; + /** + * Create a new RouteObject from two numeric Controller.Hardware outputs, one applied in the negative + * direction and the other in the positive direction, ready to be mapped to a standard control, action, or function. + * @param source1 {Controller.Hardware} The first, negative-direction controller output. + * @param source2 {Controller.Hardware} The second, positive-direction controller output. + * @returns {RouteObject} + */ + makeAxis(source1: Controller.Hardware, source2: Controller.Hardware): RouteObject; + /** + * Enable or disable the mapping. When enabled, the routes in the mapping take effect. + * Synonymous with Controller.enableMapping. + * @param enable {boolean} If true then the mapping is enabled, otherwise it is disabled. + * @returns {MappingObject} + */ + enable(enable: boolean): MappingObject; + /** + * Disable the mapping. When disabled, the routes in the mapping have no effect. + * Synonymous with Controller.disableMapping. + * @returns {MappingObject} + */ + disable(): MappingObject; } /** -* Available in:Interface ScriptsClient Entity ScriptsA route in a MappingObject used by the Controller API. -* -Create a route using MappingObject methods and apply this object's methods to process it, terminating with -RouteObject#to to apply it to a Standard control, action, or script function. Note: Loops are not -permitted. - -Some methods apply to routes with number data, some apply routes with Pose data, and some apply to both route -types. -*/ + * Available in:Interface ScriptsClient Entity ScriptsA route in a MappingObject used by the Controller API. + * Create a route using MappingObject methods and apply this object's methods to process it, terminating with RouteObject#to to apply it to a Standard control, action, or script function. Note: Loops are not permitted. Some methods apply to routes with number data, some apply routes with Pose data, and some apply to both route types. + */ declare class RouteObject { - /** - * Terminate the route with a standard control, an action, or a script function. The output value from the route is - * sent to the specified destination. -This is a QML-specific version of MappingObject#to: use this version in QML files. - * @param destination {Controller.Standard} The standard control, action, or JavaScript - * function that the route output is mapped to. For a function, the parameter can be either the name of the function or -an in-line function definition. - */ - toQml(destination: Controller.Standard): void; - /** - * Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and - * the input is read only if the condition is true. Thus, if the condition is not met then subsequent -routes using the same input are processed. -This is a QML-specific version of MappingObject#to: use this version in QML files. - * @param expression {condition}

A condition may be a:

- *
    -
  • A boolean or numeric {@link Controller.Hardware} property, which is evaluated as a boolean.
  • -
  • ! followed by a {@link Controller.Hardware} property, indicating the logical NOT should be - used.
  • -
  • A script function returning a boolean value. This can be either the name of the function or an in-line - definition.
  • -
-

If an array of conditions is provided, their values are ANDed together.

- * @returns {RouteObject} - */ - whenQml(expression: condition): RouteObject; - /** - * Terminate the route with a standard control, an action, or a script function. The output value from the route is - * sent to the specified destination. - * @param destination {Controller.Standard} The standard control, action, or JavaScript - * function that the route output is mapped to. For a function, the parameter can be either the name of the function or -an in-line function definition. - */ - to(destination: Controller.Standard): void; - /** - * Enable and disabling writing debug information for a route to the program log. - * @param enable {boolean} [enable=true] If true then writing debug information is enabled for the route, - * otherwise it is disabled. - * @returns {RouteObject} - */ - debug(enable: boolean): RouteObject; - /** - * Process the route without marking the controller output as having been read, so that other routes from the same - * controller output can also process. - * @param enable {boolean} [enable=true] If true then the route is processed without marking the route's - * controller source as having been read. - * @returns {RouteObject} - */ - peek(enable: boolean): RouteObject; - /** - * Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and - * the input is read only if the condition is true. Thus, if the condition is not met then subsequent -routes using the same input are processed. - * @param expression {condition}

A condition may be a:

- *
    -
  • A numeric {@link Controller.Hardware} property, which is evaluated as a boolean.
  • -
  • ! followed by a {@link Controller.Hardware} property to use the logical NOT of the property - value.
  • -
  • A script function returning a boolean value. This can be either the name of the function or an in-line - definition.
  • -
-

If an array of conditions is provided, their values are ANDed together.

- * @returns {RouteObject} - */ - when(expression: condition): RouteObject; - /** - * Filter numeric route values to lie between two values; values outside this range are not passed on through the - * route. - * @param min {number} The minimum value to pass through. - * @param max {number} The maximum value to pass through. - * @returns {RouteObject} - */ - clamp(min: number, max: number): RouteObject; - /** - * Filter numeric route values such that they are rounded to 0 or 1 without output values - * flickering when the input value hovers around 0.5. For example, this enables you to use an analog input -as if it were a toggle. - * @param min {number} When the input value drops below this value the output value changes to 0. - * @param max {number} When the input value rises above this value the output value changes to 1. - * @returns {RouteObject} - */ - hysteresis(min: number, max: number): RouteObject; - /** - * Filter numeric route values to send at a specified interval. - * @param interval {number} The interval between sending values, in seconds. - * @returns {RouteObject} - */ - pulse(interval: number): RouteObject; - /** - * Filter numeric and Pose route values to be scaled by a constant amount. - * @param multiplier {number} The scale to multiply the value by. - * @returns {RouteObject} - */ - scale(multiplier: number): RouteObject; - /** - * Filter numeric and Pose route values to have the opposite sign, e.g., 0.5 is changed to - * -0.5. - * @returns {RouteObject} - */ - invert(): RouteObject; - /** - * Filter numeric route values such that they're sent only when the input value is outside a dead-zone. When the input - * passes the dead-zone value, output is sent starting at 0.0 and catching up with the input value. As the -input returns toward the dead-zone value, output values reduce to 0.0 at the dead-zone value. - * @param min {number} The minimum input value at which to start sending output. For negative input values, the - * negative of this value is used. - * @returns {RouteObject} - */ - deadZone(min: number): RouteObject; - /** - * Filter numeric route values such that they are rounded to -1, 0, or 1. - * For example, this enables you to use an analog input as if it were a toggle or, in the case of a bidirectional axis, -a tri-state switch. - * @returns {RouteObject} - */ - constrainToInteger(): RouteObject; - /** - * Filter numeric route values such that they are rounded to 0 or 1. For example, this - * enables you to use an analog input as if it were a toggle. - * @returns {RouteObject} - */ - constrainToPositiveInteger(): RouteObject; - /** - * Filter Pose route values to have a pre-translation applied. - * @param translate {Vec3} The pre-translation to add to the pose. - * @returns {RouteObject} - */ - translate(translate: Vec3): RouteObject; - /** - * Filter Pose route values to have a pre-transform applied. - * @param transform {Mat4} The pre-transform to apply. - * @returns {RouteObject} - */ - transform(transform: Mat4): RouteObject; - /** - * Filter Pose route values to have a post-transform applied. - * @param transform {Mat4} The post-transform to apply. - * @returns {RouteObject} - */ - postTransform(transform: Mat4): RouteObject; - /** - * Filter Pose route values to have a pre-rotation applied. - * @param rotation {Quat} The pre-rotation to add to the pose. - * @returns {RouteObject} - */ - rotate(rotation: Quat): RouteObject; - /** - * Filter Pose route values to be smoothed by a low velocity filter. The filter's rotation and translation - * values are calculated as: (1 - f) * currentValue + f * previousValue where -f = currentVelocity / filterConstant. At low velocities, the filter value is largely the previous -value; at high velocities the value is wholly the current controller value. - * @param rotationConstant {number} The rotational velocity, in rad/s, at which the filter value is wholly the latest - * controller value. - * @param translationConstant {number} The linear velocity, in m/s, at which the filter value is wholly the latest - * controller value. - * @returns {RouteObject} - */ - lowVelocity(rotationConstant: number, translationConstant: number): RouteObject; - /** - * Filter Pose route values to be smoothed by an exponential decay filter. The filter's rotation and - * translation values are calculated as: filterConstant * currentValue + (1 - filterConstant) * -previousValue. Values near 1 are less smooth with lower latency; values near 0 are more smooth with higher -latency. - * @param rotationConstant {number} Rotation filter constant, 0.0–1.0. - * @param translationConstant {number} Translation filter constant, 0.0–1.0. - * @returns {RouteObject} - */ - exponentialSmoothing(rotationConstant: number, translationConstant: number): RouteObject; - /** - * Filter numeric route values such that a value of 0.0 is changed to 1.0, and other values - * are changed to 0.0. - * @returns {RouteObject} - */ - logicalNot(): RouteObject; + /** + * Terminate the route with a standard control, an action, or a script function. The output value from the route is + * sent to the specified destination. This is a QML-specific version of MappingObject#to: use this version in QML files. + * @param destination {Controller.Standard} The standard control, action, or JavaScript + * function that the route output is mapped to. For a function, the parameter can be either the name of the function or an in-line function definition. + */ + toQml(destination: Controller.Standard): void; + /** + * Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and + * the input is read only if the condition is true. Thus, if the condition is not met then subsequent routes using the same input are processed. This is a QML-specific version of MappingObject#to: use this version in QML files. + * @param expression {condition}

A condition may be a:

+ *
  • A boolean or numeric {@link Controller.Hardware} property, which is evaluated as a boolean.
  • ! followed by a {@link Controller.Hardware} property, indicating the logical NOT should be used.
  • A script function returning a boolean value. This can be either the name of the function or an in-line definition.

If an array of conditions is provided, their values are ANDed together.

+ * @returns {RouteObject} + */ + whenQml(expression: condition): RouteObject; + /** + * Terminate the route with a standard control, an action, or a script function. The output value from the route is + * sent to the specified destination. + * @param destination {Controller.Standard} The standard control, action, or JavaScript + * function that the route output is mapped to. For a function, the parameter can be either the name of the function or an in-line function definition. + */ + to(destination: Controller.Standard): void; + /** + * Enable and disabling writing debug information for a route to the program log. + * @param enable {boolean} [enable=true] If true then writing debug information is enabled for the route, + * otherwise it is disabled. + * @returns {RouteObject} + */ + debug(enable: boolean): RouteObject; + /** + * Process the route without marking the controller output as having been read, so that other routes from the same + * controller output can also process. + * @param enable {boolean} [enable=true] If true then the route is processed without marking the route's + * controller source as having been read. + * @returns {RouteObject} + */ + peek(enable: boolean): RouteObject; + /** + * Process the route only if a condition is satisfied. The condition is evaluated before the route input is read, and + * the input is read only if the condition is true. Thus, if the condition is not met then subsequent routes using the same input are processed. + * @param expression {condition}

A condition may be a:

+ *
  • A numeric {@link Controller.Hardware} property, which is evaluated as a boolean.
  • ! followed by a {@link Controller.Hardware} property to use the logical NOT of the property value.
  • A script function returning a boolean value. This can be either the name of the function or an in-line definition.

If an array of conditions is provided, their values are ANDed together.

+ * @returns {RouteObject} + */ + when(expression: condition): RouteObject; + /** + * Filter numeric route values to lie between two values; values outside this range are not passed on through the + * route. + * @param min {number} The minimum value to pass through. + * @param max {number} The maximum value to pass through. + * @returns {RouteObject} + */ + clamp(min: number, max: number): RouteObject; + /** + * Filter numeric route values such that they are rounded to 0 or 1 without output values + * flickering when the input value hovers around 0.5. For example, this enables you to use an analog input as if it were a toggle. + * @param min {number} When the input value drops below this value the output value changes to 0. + * @param max {number} When the input value rises above this value the output value changes to 1. + * @returns {RouteObject} + */ + hysteresis(min: number, max: number): RouteObject; + /** + * Filter numeric route values to send at a specified interval. + * @param interval {number} The interval between sending values, in seconds. + * @returns {RouteObject} + */ + pulse(interval: number): RouteObject; + /** + * Filter numeric and Pose route values to be scaled by a constant amount. + * @param multiplier {number} The scale to multiply the value by. + * @returns {RouteObject} + */ + scale(multiplier: number): RouteObject; + /** + * Filter numeric and Pose route values to have the opposite sign, e.g., 0.5 is changed to + * -0.5. + * @returns {RouteObject} + */ + invert(): RouteObject; + /** + * Filter numeric route values such that they're sent only when the input value is outside a dead-zone. When the input + * passes the dead-zone value, output is sent starting at 0.0 and catching up with the input value. As the input returns toward the dead-zone value, output values reduce to 0.0 at the dead-zone value. + * @param min {number} The minimum input value at which to start sending output. For negative input values, the + * negative of this value is used. + * @returns {RouteObject} + */ + deadZone(min: number): RouteObject; + /** + * Filter numeric route values such that they are rounded to -1, 0, or 1. + * For example, this enables you to use an analog input as if it were a toggle or, in the case of a bidirectional axis, a tri-state switch. + * @returns {RouteObject} + */ + constrainToInteger(): RouteObject; + /** + * Filter numeric route values such that they are rounded to 0 or 1. For example, this + * enables you to use an analog input as if it were a toggle. + * @returns {RouteObject} + */ + constrainToPositiveInteger(): RouteObject; + /** + * Filter Pose route values to have a pre-translation applied. + * @param translate {Vec3} The pre-translation to add to the pose. + * @returns {RouteObject} + */ + translate(translate: Vec3): RouteObject; + /** + * Filter Pose route values to have a pre-transform applied. + * @param transform {Mat4} The pre-transform to apply. + * @returns {RouteObject} + */ + transform(transform: Mat4): RouteObject; + /** + * Filter Pose route values to have a post-transform applied. + * @param transform {Mat4} The post-transform to apply. + * @returns {RouteObject} + */ + postTransform(transform: Mat4): RouteObject; + /** + * Filter Pose route values to have a pre-rotation applied. + * @param rotation {Quat} The pre-rotation to add to the pose. + * @returns {RouteObject} + */ + rotate(rotation: Quat): RouteObject; + /** + * Filter Pose route values to be smoothed by a low velocity filter. The filter's rotation and translation + * values are calculated as: (1 - f) * currentValue + f * previousValue where f = currentVelocity / filterConstant. At low velocities, the filter value is largely the previous value; at high velocities the value is wholly the current controller value. + * @param rotationConstant {number} The rotational velocity, in rad/s, at which the filter value is wholly the latest + * controller value. + * @param translationConstant {number} The linear velocity, in m/s, at which the filter value is wholly the latest + * controller value. + * @returns {RouteObject} + */ + lowVelocity(rotationConstant: number, translationConstant: number): RouteObject; + /** + * Filter Pose route values to be smoothed by an exponential decay filter. The filter's rotation and + * translation values are calculated as: filterConstant * currentValue + (1 - filterConstant) * previousValue. Values near 1 are less smooth with lower latency; values near 0 are more smooth with higher latency. + * @param rotationConstant {number} Rotation filter constant, 0.0–1.0. + * @param translationConstant {number} Translation filter constant, 0.0–1.0. + * @returns {RouteObject} + */ + exponentialSmoothing(rotationConstant: number, translationConstant: number): RouteObject; + /** + * Filter numeric route values such that a value of 0.0 is changed to 1.0, and other values + * are changed to 0.0. + * @returns {RouteObject} + */ + logicalNot(): RouteObject; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace Reticle { - /** - * @returns {boolean} - */ - function isMouseCaptured(): boolean; - /** - * @returns {boolean} - */ - function getAllowMouseCapture(): boolean; - /** - * @param allowMouseCaptured {boolean} - */ - function setAllowMouseCapture(allowMouseCaptured: boolean): void; - /** - * @returns {boolean} - */ - function isPointingAtSystemOverlay(): boolean; - /** - * @returns {boolean} - */ - function getVisible(): boolean; - /** - * @param visible {boolean} - */ - function setVisible(visible: boolean): void; - /** - * @returns {number} - */ - function getDepth(): number; - /** - * @param depth {number} - */ - function setDepth(depth: number): void; - /** - * @returns {number} - */ - function getScale(): number; - /** - * @param scale {number} - */ - function setScale(scale: number): void; - /** - * @returns {Vec2} - */ - function getPosition(): Vec2; - /** - * @param position {Vec2} - */ - function setPosition(position: Vec2): void; - /** - * @returns {Vec2} - */ - function getMaximumPosition(): Vec2; - let allowMouseCapture: boolean; - let depth: number; - let maximumPosition: Vec2; - let mouseCaptured: boolean; - let pointingAtSystemOverlay: boolean; - let position: Vec2; - let scale: number; - let visible: boolean; + /** + * @returns {boolean} + */ + function isMouseCaptured(): boolean; + /** + * @returns {boolean} + */ + function getAllowMouseCapture(): boolean; + /** + * @param allowMouseCaptured {boolean} + */ + function setAllowMouseCapture(allowMouseCaptured: boolean): void; + /** + * @returns {boolean} + */ + function isPointingAtSystemOverlay(): boolean; + /** + * @returns {boolean} + */ + function getVisible(): boolean; + /** + * @param visible {boolean} + */ + function setVisible(visible: boolean): void; + /** + * @returns {number} + */ + function getDepth(): number; + /** + * @param depth {number} + */ + function setDepth(depth: number): void; + /** + * @returns {number} + */ + function getScale(): number; + /** + * @param scale {number} + */ + function setScale(scale: number): void; + /** + * @returns {Vec2} + */ + function getPosition(): Vec2; + /** + * @param position {Vec2} + */ + function setPosition(position: Vec2): void; + /** + * @returns {Vec2} + */ + function getMaximumPosition(): Vec2; + let allowMouseCapture: boolean; + let depth: number; + let maximumPosition: Vec2; + let mouseCaptured: boolean; + let pointingAtSystemOverlay: boolean; + let position: Vec2; + let scale: number; + let visible: boolean; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Entities API provides facilities to create and interact with entities. Entities are 2D and 3D objects that are visible -* to everyone and typically are persisted to the domain. For Interface scripts, the entities available are those that -Interface has displayed and so knows about. -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Entities API provides facilities to create and interact with entities. Entities are 2D and 3D objects that are visible + * to everyone and typically are persisted to the domain. For Interface scripts, the entities available are those that Interface has displayed and so knows about. + */ declare namespace Entities { - interface ActionArguments-FarGrab { - /** - * The target position. - */ - targetPosition: Vec3; - /** - * The target rotation. - */ - targetRotation: Quat; - /** - * If an entity ID, the targetPosition and targetRotation are - * relative to this entity's position and rotation. - */ - otherID: Uuid; - /** - * Controls how long it takes for the entity's position to catch up with the - * target position. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action - is applied using an exponential decay. - */ - linearTimeScale: number; - /** - * Controls how long it takes for the entity's orientation to catch up with the - * target orientation. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the - action is applied using an exponential decay. - */ - angularTimeScale: number; - } - - interface ActionArguments-Hold { - /** - * The ID of the avatar holding the entity. - */ - holderID: Uuid; - /** - * The target position relative to the avatar's hand. - */ - relativePosition: Vec3; - /** - * The target rotation relative to the avatar's hand. - */ - relativeRotation: Vec3; - /** - * Controls how long it takes for the entity's position and rotation to catch up with - * the target. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is - applied using an exponential decay. - */ - timeScale: number; - /** - * The hand holding the entity: "left" or "right". - */ - hand: string; - /** - * If true, the entity is made kinematic during the action; the entity won't - * lag behind the hand but constraint actions such as "hinge" won't act properly. - */ - kinematic: boolean; - /** - * If true and kinematic is true, the - * entity's velocity property will be set during the action, e.g., so that other scripts may use the value. - */ - kinematicSetVelocity: boolean; - /** - * If true, the entity follows the HMD controller rather than the avatar's - * hand. - */ - ignoreIK: boolean; - } - - interface AmbientLight { - /** - * The intensity of the light. - */ - ambientIntensity: number; - /** - * A cube map image that defines the color of the light coming from each direction. If - * "" then the entity's Entities.Skybox url property value is used, unless that also is "" in which - case the entity's ambientLightMode property is set to "inherit". - */ - ambientURL: string; - } - - interface EntityProperties { - /** - * The ID of the entity. Read-only. - */ - id: Uuid; - /** - * A name for the entity. Need not be unique. - */ - name: string; - /** - * The entity type. You cannot change the type of an entity after it's created. (Though - * its value may switch among "Box", "Shape", and "Sphere" depending on changes to - the shape property set for entities of these types.) Read-only. - */ - type: Entities.EntityType; - /** - * If true then the entity is an avatar entity; otherwise it is a server - * entity. An avatar entity follows you to each domain you visit, rendering at the same world coordinates unless it's - parented to your avatar. Value cannot be changed after the entity is created. - The value can also be set at entity creation by using the clientOnly parameter in - Entities.addEntity. - */ - clientOnly: boolean; - /** - * The session ID of the owning avatar if clientOnly is - * true, otherwise Uuid. Read-only. - */ - owningAvatarID: Uuid; - /** - * The UTC date and time that the entity was created, in ISO 8601 format as - * yyyy-MM-ddTHH:mm:ssZ. Read-only. - */ - created: string; - /** - * The age of the entity in seconds since it was created. Read-only. - */ - age: number; - /** - * The age of the entity since it was created, formatted as h hours m minutes s - * seconds. - */ - ageAsText: string; - /** - * How long an entity lives for, in seconds, before being automatically deleted. A value of - * -1 means that the entity lives for ever. - */ - lifetime: number; - /** - * When the entity was last edited, expressed as the number of microseconds since - * 1970-01-01T00:00:00 UTC. Read-only. - */ - lastEdited: number; - /** - * The session ID of the avatar or agent that most recently created or edited the entity. - * Read-only. - */ - lastEditedBy: Uuid; - /** - * Whether or not the entity can be edited or deleted. If true then the - * entity's properties other than locked cannot be changed, and the entity cannot be deleted. - */ - locked: boolean; - /** - * Whether or not the entity is rendered. If true then the entity is rendered. - */ - visible: boolean; - /** - * Whether or not the entity casts shadows. Currently applicable only to - * Entities.EntityType and Entities.EntityType entities. Shadows are cast if inside a - Entities.EntityType entity with castShadows enabled in its - Entities.EntityProperties-Zone property. - */ - canCastShadows: boolean; - /** - * The position of the entity. - */ - position: Vec3; - /** - * The orientation of the entity with respect to world coordinates. - */ - rotation: Quat; - /** - * The point in the entity that is set to the entity's position and is rotated - * about, Vec3 – Vec3. A value of Vec3 is the entity's - minimum x, y, z corner; a value of Vec3 is the entity's maximum x, y, z corner. - */ - registrationPoint: Vec3; - /** - * The center of the entity's unscaled mesh model if it has one, otherwise - * Vec3. Read-only. - */ - naturalPosition: Vec3; - /** - * The dimensions of the entity's unscaled mesh model if it has one, otherwise - * Vec3. Read-only. - */ - naturalDimensions: Vec3; - /** - * The linear velocity of the entity in m/s with respect to world coordinates. - */ - velocity: Vec3; - /** - * How much to slow down the linear velocity of an entity over time, 0.0 - * – 1.0. A higher damping value slows down the entity more quickly. The default value is for an - exponential decay timescale of 2.0s, where it takes 2.0s for the movement to slow to 1/e = 0.368 of its - initial value. - */ - damping: number; - /** - * The angular velocity of the entity in rad/s with respect to its axes, about its - * registration point. - */ - angularVelocity: Vec3; - /** - * How much to slow down the angular velocity of an entity over time, - * 0.0 – 1.0. A higher damping value slows down the entity more quickly. The default value - is for an exponential decay timescale of 2.0s, where it takes 2.0s for the movement to slow to 1/e = 0.368 - of its initial value. - */ - angularDamping: number; - /** - * The acceleration due to gravity in m/s2 that the entity should move with, in - * world coordinates. Set to { x: 0, y: -9.8, z: 0 } to simulate Earth's gravity. Gravity is applied to an - entity's motion only if its dynamic property is true. If changing an entity's - gravity from Vec3, you need to give it a small velocity in order to kick - off physics simulation. - The gravity value is applied in addition to the acceleration value. - */ - gravity: Vec3; - /** - * A general acceleration in m/s2 that the entity should move with, in world - * coordinates. The acceleration is applied to an entity's motion only if its dynamic property is - true. If changing an entity's acceleration from Vec3, you need to give it - a small velocity in order to kick off physics simulation. - The acceleration value is applied in addition to the gravity value. - */ - acceleration: Vec3; - /** - * The "bounciness" of an entity when it collides, 0.0 – - * 0.99. The higher the value, the more bouncy. - */ - restitution: number; - /** - * How much to slow down an entity when it's moving against another, 0.0 – - * 10.0. The higher the value, the more quickly it slows down. Examples: 0.1 for ice, - 0.9 for sandpaper. - */ - friction: number; - /** - * The density of the entity in kg/m3, 100 for balsa wood – - * 10000 for silver. The density is used in conjunction with the entity's bounding box volume to work out its - mass in the application of physics. - */ - density: number; - /** - * Whether or not the entity should collide with items per its - * collisionMask property. If true then the entity does not collide. - */ - collisionless: boolean; - /** - * Synonym for collisionless. - */ - ignoreForCollisions: boolean; - /** - * What types of items the entity should collide with. - */ - collisionMask: Entities.CollisionMask; - /** - * Synonym for collisionMask, - * in text format. - */ - collidesWith: string; - /** - * The sound to play when the entity experiences a collision. Valid file formats are - * as per the SoundCache object. - */ - collisionSoundURL: string; - /** - * Whether or not the entity should be affected by collisions. If true then - * the entity's movement is affected by collisions. - */ - dynamic: boolean; - /** - * Synonym for dynamic. - */ - collisionsWillMove: boolean; - /** - * A "hifi://" metaverse address that a user is taken to when they click on the entity. - */ - href: string; - /** - * A description of the href property value. - */ - description: string; - /** - * Used to store extra data about the entity in JSON format. WARNING: Other apps such as the - * Create app can also use this property, so make sure you handle data stored by other apps — edit only your bit and - leave the rest of the data intact. You can use JSON.parse() to parse the string into a JavaScript object - which you can manipulate the properties of, and use JSON.stringify() to convert the object into a string to - put in the property. - */ - userData: string; - /** - * The URL of the client entity script, if any, that is attached to the entity. - */ - script: string; - /** - * Intended to be used to indicate when the client entity script was loaded. Should be - * an integer number of milliseconds since midnight GMT on January 1, 1970 (e.g., as supplied by Date.now(). - If you update the property's value, the script is re-downloaded and reloaded. This is how the "reload" - button beside the "script URL" field in properties tab of the Create app works. - */ - scriptTimestamp: number; - /** - * The URL of the server entity script, if any, that is attached to the entity. - */ - serverScripts: string; - /** - * The ID of the entity or avatar that this entity is parented to. Uuid - * if the entity is not parented. - */ - parentID: Uuid; - /** - * The joint of the entity or avatar that this entity is parented to. Use - * 65535 or -1 to parent to the entity or avatar's position and orientation rather than a joint. - */ - parentJointIndex: number; - /** - * The position of the entity relative to its parent if the entity is parented, - * otherwise the same value as position. If the entity is parented to an avatar and is clientOnly - so that it scales with the avatar, this value remains the original local position value while the avatar scale changes. - */ - localPosition: Vec3; - /** - * The rotation of the entity relative to its parent if the entity is parented, - * otherwise the same value as rotation. - */ - localRotation: Quat; - /** - * The velocity of the entity relative to its parent if the entity is parented, - * otherwise the same value as velocity. - */ - localVelocity: Vec3; - /** - * The angular velocity of the entity relative to its parent if the entity is - * parented, otherwise the same value as position. - */ - localAngularVelocity: Vec3; - /** - * The dimensions of the entity. If the entity is parented to an avatar and is - * clientOnly so that it scales with the avatar, this value remains the original dimensions value while the - avatar scale changes. - */ - localDimensions: Vec3; - /** - * The axis-aligned bounding box that tightly encloses the entity. - * Read-only. - */ - boundingBox: Entities.BoundingBox; - /** - * The axis-aligned cube that determines where the entity lives in the entity server's octree. - * The cube may be considerably larger than the entity in some situations, e.g., when the entity is grabbed by an avatar: - the position of the entity is determined through avatar mixer updates and so the AA cube is expanded in order to reduce - unnecessary entity server updates. Scripts should not change this property's value. - */ - queryAACube: AACube; - /** - * Base-64 encoded compressed dump of the actions associated with the entity. This property - * is typically not used in scripts directly; rather, functions that manipulate an entity's actions update it. - The size of this property increases with the number of actions. Because this property value has to fit within a High - Fidelity datagram packet there is a limit to the number of actions that an entity can have, and edits which would result - in overflow are rejected. - Read-only. - */ - actionData: string; - /** - * Information on the cost of rendering the entity. Currently information is only - * provided for Model entities. Read-only. - */ - renderInfo: Entities.RenderInfo; - /** - * Certifiable name of the Marketplace item. - */ - itemName: string; - /** - * Certifiable description of the Marketplace item. - */ - itemDescription: string; - /** - * Certifiable category of the Marketplace item. - */ - itemCategories: string; - /** - * Certifiable artist that created the Marketplace item. - */ - itemArtist: string; - /** - * Certifiable license URL for the Marketplace item. - */ - itemLicense: string; - /** - * Certifiable maximum integer number of editions (copies) of the Marketplace item - * allowed to be sold. - */ - limitedRun: number; - /** - * Certifiable integer edition (copy) number or the Marketplace item. Each copy sold in - * the Marketplace is numbered sequentially, starting at 1. - */ - editionNumber: number; - /** - * Certifiable integer instance number for identical entities in a Marketplace - * item. A Marketplace item may have identical parts. If so, then each is numbered sequentially with an instance number. - */ - entityInstanceNumber: number; - /** - * Certifiable UUID for the Marketplace item, as used in the URL of the item's download - * and its Marketplace Web page. - */ - marketplaceID: string; - /** - * Hash of the entity's static certificate JSON, signed by the artist's private key. - */ - certificateID: string; - /** - * The version of the method used to generate the certificateID. - */ - staticCertificateVersion: number; - } - - interface EntityProperties-Box { - } - - interface EntityProperties-Light { - /** - * The dimensions of the entity. Entity surface outside these dimensions are not lit - * by the light. - */ - dimensions: Vec3; - /** - * The color of the light emitted. - */ - color: Color; - /** - * The brightness of the light. - */ - intensity: number; - /** - * The distance from the light's center at which intensity is reduced by 25%. - */ - falloffRadius: number; - /** - * If true then the light is directional, emitting along the entity's - * local negative z-axis; otherwise the light is a point light which emanates in all directions. - */ - isSpotlight: boolean; - /** - * Affects the softness of the spotlight beam: the higher the value the softer the beam. - */ - exponent: number; - /** - * Affects the size of the spotlight beam: the higher the value the larger the beam. - */ - cutoff: number; - } - - interface EntityProperties-Line { - /** - * The dimensions of the entity. Must be sufficient to contain all the - * linePoints. - */ - dimensions: Vec3; - /** - * The sequence of points to draw lines between. The values are relative to the entity's - * position. A maximum of 70 points can be specified. The property's value is set only if all the linePoints - lie within the entity's dimensions. - */ - linePoints: Array.; - /** - * Currently not used. - */ - lineWidth: number; - /** - * The color of the line. - */ - color: Color; - } - - interface EntityProperties-Material { - /** - * URL to a MaterialResource. If you append ?name to the URL, the - * material with that name in the MaterialResource will be applied to the entity. - Alternatively, set the property value to "materialData" to use the materialData property - for the MaterialResource values. - */ - materialURL: string; - /** - * The priority for applying the material to its parent. Only the highest priority material is - * applied, with materials of the same priority randomly assigned. Materials that come with the model have a priority of - 0. - */ - priority: number; - /** - * Selects the submesh or submeshes within the parent to apply the material - * to. If in the format "mat::string", all submeshes with material name "string" are replaced. - Otherwise the property value is parsed as an unsigned integer, specifying the mesh index to modify. Invalid values are - parsed to 0. - */ - parentMaterialName: string; - /** - * How the material is mapped to the entity. Either "uv" or - * "projected". Currently, only "uv" is supported. - */ - materialMappingMode: string; - /** - * Offset position in UV-space of the top left of the material, range - * { x: 0, y: 0 } – { x: 1, y: 1 }. - */ - materialMappingPos: Vec2; - /** - * How much to scale the material within the parent's UV-space. - */ - materialMappingScale: Vec2; - /** - * How much to rotate the material within the parent's UV-space, in degrees. - */ - materialMappingRot: number; - /** - * Used to store MaterialResource data as a JSON string. You can use - * JSON.parse() to parse the string into a JavaScript object which you can manipulate the properties of, and - use JSON.stringify() to convert the object into a string to put in the property. - */ - materialData: string; - } - - interface EntityProperties-Model { - /** - * The dimensions of the entity. When adding an entity, if no dimensions - * value is specified then the model is automatically sized to its - Entities.EntityProperties. - */ - dimensions: Vec3; - /** - * Currently not used. - */ - color: Color; - /** - * The URL of the FBX of OBJ model. Baked FBX models' URLs end in ".baked.fbx". - * Note: If the name ends with "default-image-model.fbx" then the entity is considered to be an "Image" - entity, in which case the textures property should be set per the example. - */ - modelURL: string; - /** - * A JSON string of texture name, URL pairs used when rendering the model in place of the - * model's original textures. Use a texture name from the originalTextures property to override that texture. - Only the texture names and URLs to be overridden need be specified; original textures are used where there are no - overrides. You can use JSON.stringify() to convert a JavaScript object of name, URL pairs into a JSON - string. - */ - textures: string; - /** - * A JSON string of texture name, URL pairs used in the model. The property value is - * filled in after the entity has finished rezzing (i.e., textures have loaded). You can use JSON.parse() to - parse the JSON string into a JavaScript object of name, URL pairs. Read-only. - */ - originalTextures: string; - /** - * The shape of the collision hull used if collisions are enabled. - */ - shapeType: ShapeType; - /** - * The OBJ file to use for the compound shape if shapeType is - * "compound". - */ - compoundShapeURL: string; - /** - * An animation to play on the model. - */ - animation: Entities.AnimationProperties; - /** - * Joint rotations applied to the model; [] if none are applied or the - * model hasn't loaded. The array indexes are per Entities.getJointIndex. Rotations are relative to - each joint's parent. - Joint rotations can be set by Entities.setLocalJointRotation and similar functions, or by - setting the value of this property. If you set a joint rotation using this property you also need to set the - corresponding jointRotationsSet value to true. - */ - jointRotations: Array.; - /** - * true values for joints that have had rotations applied, - * false otherwise; [] if none are applied or the model hasn't loaded. The array indexes are per - Entities.getJointIndex. - */ - jointRotationsSet: Array.; - /** - * Joint translations applied to the model; [] if none are applied or - * the model hasn't loaded. The array indexes are per Entities.getJointIndex. Rotations are relative - to each joint's parent. - Joint translations can be set by Entities.setLocalJointTranslation and similar - functions, or by setting the value of this property. If you set a joint translation using this property you also need to - set the corresponding jointTranslationsSet value to true. - */ - jointTranslations: Array.; - /** - * true values for joints that have had translations applied, - * false otherwise; [] if none are applied or the model hasn't loaded. The array indexes are per - Entities.getJointIndex. - */ - jointTranslationsSet: Array.; - /** - * If true and the entity is parented to an avatar, then the - * avatar's joint rotations are applied to the entity's joints. - */ - relayParentJoints: boolean; - } - - interface EntityProperties-ParticleEffect { - /** - * If true then particles are emitted. - */ - isEmitting: boolean; - /** - * The maximum number of particles to render at one time. Older particles are deleted if - * necessary when new ones are created. - */ - maxParticles: number; - /** - * How long, in seconds, each particle lives. - */ - lifespan: number; - /** - * The number of particles per second to emit. - */ - emitRate: number; - /** - * The speed, in m/s, that each particle is emitted at. - */ - emitSpeed: number; - /** - * The spread in speeds at which particles are emitted at. If emitSpeed == 5 - * and speedSpread == 1, particles will be emitted with speeds in the range 4m/s – 6m/s. - */ - speedSpread: number; - /** - * The acceleration that is applied to each particle during its lifetime. The - * default is Earth's gravity value. - */ - emitAcceleration: vec3; - /** - * The spread in accelerations that each particle is given. If - * emitAccelerations == {x: 0, y: -9.8, z: 0} and accelerationSpread == - {x: 0, y: 1, z: 0}, each particle will have an acceleration in the range, {x: 0, y: -10.8, z: 0} - – {x: 0, y: -8.8, z: 0}. - */ - accelerationSpread: vec3; - /** - * The dimensions of the particle effect, i.e., a bounding box containing all the particles - * during their lifetimes, assuming that emitterShouldTrail is false. Read-only. - */ - dimensions: Vec3; - /** - * If true then particles are "left behind" as the emitter moves, - * otherwise they stay with the entity's dimensions. - */ - emitterShouldTrail: boolean; - /** - * The orientation of particle emission relative to the entity's axes. By - * default, particles emit along the entity's local z-axis, and azimuthStart and azimuthFinish - are relative to the entity's local x-axis. The default value is a rotation of -90 degrees about the local x-axis, i.e., - the particles emit vertically. - */ - emitOrientation: Quat; - /** - * The dimensions of the ellipsoid from which particles are emitted. - */ - emitDimensions: vec3; - /** - * The starting radius within the ellipsoid at which particles start being emitted; - * range 0.0 – 1.0 for the ellipsoid center to the ellipsoid surface, respectively. - Particles are emitted from the portion of the ellipsoid that lies between emitRadiusStart and the - ellipsoid's surface. - */ - emitRadiusStart: number; - /** - * The angle in radians from the entity's local z-axis at which particles start being emitted - * within the ellipsoid; range 0 – Math.PI. Particles are emitted from the portion of the - ellipsoid that lies between polarStart and polarFinish. - */ - polarStart: number; - /** - * The angle in radians from the entity's local z-axis at which particles stop being emitted - * within the ellipsoid; range 0 – Math.PI. Particles are emitted from the portion of the - ellipsoid that lies between polarStart and polarFinish. - */ - polarFinish: number; - /** - * The angle in radians from the entity's local x-axis about the entity's local - * z-axis at which particles start being emitted; range -Math.PI – Math.PI. Particles are - emitted from the portion of the ellipsoid that lies between azimuthStart and azimuthFinish. - */ - azimuthStart: number; - /** - * The angle in radians from the entity's local x-axis about the entity's local - * z-axis at which particles stop being emitted; range -Math.PI – Math.PI. Particles are - emitted from the portion of the ellipsoid that lies between azimuthStart and azimuthFinish. - */ - azimuthFinish: number; - /** - * The URL of a JPG or PNG image file to display for each particle. If you want transparency, - * use PNG format. - */ - textures: string; - /** - * The radius of each particle at the middle of its life. - */ - particleRadius: number; - /** - * The radius of each particle at the start of its life. If not explicitly set, the - * particleRadius value is used. - */ - radiusStart: number; - /** - * The radius of each particle at the end of its life. If not explicitly set, the - * particleRadius value is used. - */ - radiusFinish: number; - /** - * Currently not used. - */ - radiusSpread: number; - /** - * The color of each particle at the middle of its life. - */ - color: Color; - /** - * The color of each particle at the start of its life. If not explicitly set, the - * color value is used. - */ - colorStart: Color; - /** - * The color of each particle at the end of its life. If not explicitly set, the - * color value is used. - */ - colorFinish: Color; - /** - * Currently not used. - */ - colorSpread: Color; - /** - * The alpha of each particle at the middle of its life. - */ - alpha: number; - /** - * The alpha of each particle at the start of its life. If not explicitly set, the - * alpha value is used. - */ - alphaStart: number; - /** - * The alpha of each particle at the end of its life. If not explicitly set, the - * alpha value is used. - */ - alphaFinish: number; - /** - * Currently not used. - */ - alphaSpread: number; - /** - * Currently not used. Read-only. - */ - shapeType: ShapeType; - } - - interface EntityProperties-PolyLine { - /** - * The dimensions of the entity, i.e., the size of the bounding box that contains the - * lines drawn. - */ - dimensions: Vec3; - /** - * The sequence of points to draw lines between. The values are relative to the entity's - * position. A maximum of 70 points can be specified. Must be specified in order for the entity to render. - */ - linePoints: Array.; - /** - * The normal vectors for the line's surface at the linePoints. The values are - * relative to the entity's orientation. Must be specified in order for the entity to render. - */ - normals: Array.; - /** - * The widths, in m, of the line at the linePoints. Must be specified in - * order for the entity to render. - */ - strokeWidths: Array.; - /** - * Currently not used. - */ - lineWidth: number; - /** - * Currently not used. - */ - strokeColors: Array.; - /** - * The base color of the line, which is multiplied with the color of the texture for - * rendering. - */ - color: Color; - /** - * The URL of a JPG or PNG texture to use for the lines. If you want transparency, use PNG - * format. - */ - textures: string; - /** - * If true, the texture is stretched to fill the whole line, otherwise - * the texture repeats along the line. - */ - isUVModeStretch: boolean; - } - - interface EntityProperties-PolyVox { - /** - * The dimensions of the entity. - */ - dimensions: Vec3; - /** - * Integer number of voxels along each axis of the entity, in the range - * 1,1,1 to 128,128,128. The dimensions of each voxel is - dimensions / voxelVolumesize. - */ - voxelVolumeSize: Vec3; - /** - * Base-64 encoded compressed dump of - * the PolyVox data. This property is typically not used in scripts directly; rather, functions that manipulate a PolyVox - entity update it. - The size of this property increases with the size and complexity of the PolyVox entity, with the size depending on how - the particular entity's voxels compress. Because this property value has to fit within a High Fidelity datagram packet - there is a limit to the size and complexity of a PolyVox entity, and edits which would result in an overflow are - rejected. - */ - voxelData: string; - /** - * The style of rendering the voxels' surface and how - * neighboring PolyVox entities are joined. - */ - voxelSurfaceStyle: Entities.PolyVoxSurfaceStyle; - /** - * URL of the texture to map to surfaces perpendicular to the entity's local x-axis. JPG or - * PNG format. If no texture is specified the surfaces display white. - */ - xTextureURL: string; - /** - * URL of the texture to map to surfaces perpendicular to the entity's local y-axis. JPG or - * PNG format. If no texture is specified the surfaces display white. - */ - yTextureURL: string; - /** - * URL of the texture to map to surfaces perpendicular to the entity's local z-axis. JPG or - * PNG format. If no texture is specified the surfaces display white. - */ - zTextureURL: string; - /** - * ID of the neighboring PolyVox entity in the entity's -ve local x-axis direction, - * if you want them joined. Set to Uuid if there is none or you don't want to join them. - */ - xNNeighborID: Uuid; - /** - * ID of the neighboring PolyVox entity in the entity's -ve local y-axis direction, - * if you want them joined. Set to Uuid if there is none or you don't want to join them. - */ - yNNeighborID: Uuid; - /** - * ID of the neighboring PolyVox entity in the entity's -ve local z-axis direction, - * if you want them joined. Set to Uuid if there is none or you don't want to join them. - */ - zNNeighborID: Uuid; - /** - * ID of the neighboring PolyVox entity in the entity's +ve local x-axis direction, - * if you want them joined. Set to Uuid if there is none or you don't want to join them. - */ - xPNeighborID: Uuid; - /** - * ID of the neighboring PolyVox entity in the entity's +ve local y-axis direction, - * if you want them joined. Set to Uuid if there is none or you don't want to join them. - */ - yPNeighborID: Uuid; - /** - * ID of the neighboring PolyVox entity in the entity's +ve local z-axis direction, - * if you want them joined. Set to Uuid if there is none or you don't want to join them. - */ - zPNeighborID: Uuid; - } - - interface EntityProperties-Shape { - /** - * The shape of the entity. - */ - shape: Entities.Shape; - /** - * The dimensions of the entity. - */ - dimensions: Vec3; - /** - * The color of the entity. - */ - color: Color; - } - - interface EntityProperties-Sphere { - } - - interface EntityProperties-Text { - /** - * The dimensions of the entity. - */ - dimensions: Vec3; - /** - * The text to display on the face of the entity. Text wraps if necessary to fit. New lines can be - * created using \n. Overflowing lines are not displayed. - */ - text: string; - /** - * The height of each line of text (thus determining the font size). - */ - lineHeight: number; - /** - * The color of the text. - */ - textColor: Color; - /** - * The color of the background rectangle. - */ - backgroundColor: Color; - /** - * If true, the entity is oriented to face each user's camera (i.e., it - * differs for each user present). - */ - faceCamera: boolean; - } - - interface EntityProperties-Web { - /** - * The dimensions of the entity. - */ - dimensions: Vec3; - /** - * The URL of the Web page to display. This value does not change as you or others navigate - * on the Web entity. - */ - sourceUrl: string; - /** - * The resolution to display the page at, in dots per inch. If you convert this to dots per meter - * (multiply by 1 / 0.0254 = 39.3701) then multiply dimensions.x and dimensions.y by that value - you get the resolution in pixels. - */ - dpi: number; - } - - interface EntityProperties-Zone { - /** - * The size of the volume in which the zone's lighting effects and avatar permissions - * have effect. - */ - dimensions: Vec3; - /** - * The shape of the volume in which the zone's lighting effects and avatar - * permissions have effect. Reverts to the default value if set to "none", or set to "compound" - and compoundShapeURL is "". - */ - shapeType: ShapeType; - /** - * The OBJ file to use for the compound shape if shapeType is - * "compound". - */ - compoundShapeURL: string; - /** - * Configures the key light in the zone. Possible values: - * "inherit": The key light from any enclosing zone continues into this zone. - "disabled": The key light from any enclosing zone and the key light of this zone are disabled in this - zone. - "enabled": The key light properties of this zone are enabled, overriding the key light of from any - enclosing zone. - */ - keyLightMode: string; - /** - * The key light properties of the zone. - */ - keyLight: Entities.KeyLight; - /** - * Configures the ambient light in the zone. Possible values: - * "inherit": The ambient light from any enclosing zone continues into this zone. - "disabled": The ambient light from any enclosing zone and the ambient light of this zone are disabled in - this zone. - "enabled": The ambient light properties of this zone are enabled, overriding the ambient light from any - enclosing zone. - */ - ambientLightMode: string; - /** - * The ambient light properties of the zone. - */ - ambientLight: Entities.AmbientLight; - /** - * Configures the skybox displayed in the zone. Possible values: - * "inherit": The skybox from any enclosing zone is dislayed in this zone. - "disabled": The skybox from any enclosing zone and the skybox of this zone are disabled in this zone. - "enabled": The skybox properties of this zone are enabled, overriding the skybox from any enclosing zone. - */ - skyboxMode: string; - /** - * The skybox properties of the zone. - */ - skybox: Entities.Skybox; - /** - * Configures the haze in the zone. Possible values: - * "inherit": The haze from any enclosing zone continues into this zone. - "disabled": The haze from any enclosing zone and the haze of this zone are disabled in this zone. - "enabled": The haze properties of this zone are enabled, overriding the haze from any enclosing zone. - */ - hazeMode: string; - /** - * The haze properties of the zone. - */ - haze: Entities.Haze; - /** - * If true then visitors can fly in the zone; otherwise they cannot. - */ - flyingAllowed: boolean; - /** - * If true then visitors with avatar collisions turned off will not - * collide with content in the zone; otherwise visitors will always collide with content in the zone. - */ - ghostingAllowed: boolean; - /** - * The URL of a JavaScript file that filters changes to properties of entities within the - * zone. It is periodically executed for each entity in the zone. It can, for example, be used to not allow changes to - certain properties. - -function filter(properties) { - // Test and edit properties object values, - // e.g., properties.modelURL, as required. - return properties; -} - */ - filterURL: string; - } - - interface RenderInfo { - /** - * The number of vertices in the entity. - */ - verticesCount: number; - /** - * The number of textures in the entity. - */ - texturesCount: number; - /** - * The total size of the textures in the entity, in bytes. - */ - textureSize: number; - /** - * Is true if any of the textures has transparency. - */ - hasTransparent: boolean; - /** - * The number of draw calls required to render the entity. - */ - drawCalls: number; - } - - interface RayToEntityIntersectionResult { - /** - * true if the PickRay intersected an entity, otherwise - * false. - */ - intersects: boolean; - /** - * Is always true. - */ - accurate: boolean; - /** - * The ID if the entity intersected, if any, otherwise null. - */ - entityID: Uuid; - /** - * The distance from the PickRay origin to the intersection point. - */ - distance: number; - /** - * The intersection point. - */ - intersection: Vec3; - /** - * The surface normal of the entity at the intersection point. - */ - surfaceNormal: Vec3; - /** - * The face of the entity's axis-aligned box that the ray intersects. - */ - face: BoxFace; - /** - * Extra information depending on the entity intersected. Currently, only Model - * entities provide extra information, and the information provided depends on the precisionPicking parameter - value that the search function was called with. - */ - extraInfo: object; - } - - /** - * Check whether or not you can change the locked property of entities. Locked entities have their - * locked property set to true and cannot be edited or deleted. Whether or not you can change -entities' locked properties is configured in the domain server's permissions. - * @returns {boolean} - */ - function canAdjustLocks(): boolean; - /** - * Check whether or not you can rez (create) new entities in the domain. - * @returns {boolean} - */ - function canRez(): boolean; - /** - * Check whether or not you can rez (create) new temporary entities in the domain. Temporary entities are entities with a - * finite lifetime property value set. - * @returns {boolean} - */ - function canRezTmp(): boolean; - /** - * Check whether or not you can rez (create) new certified entities in the domain. Certified entities are entities that have - * PoP certificates. - * @returns {boolean} - */ - function canRezCertified(): boolean; - /** - * Check whether or not you can rez (create) new temporary certified entities in the domain. Temporary entities are entities - * with a finite lifetime property value set. Certified entities are entities that have PoP certificates. - * @returns {boolean} - */ - function canRezTmpCertified(): boolean; - /** - * Check whether or not you can make changes to the asset server's assets. - * @returns {boolean} - */ - function canWriteAssets(): boolean; - /** - * Check whether or not you can replace the domain's content set. - * @returns {boolean} - */ - function canReplaceContent(): boolean; - /** - * Add a new entity with specified properties. - * @param properties {Entities.EntityProperties} The properties of the entity to create. - * @param clientOnly {boolean} [clientOnly=false] If true, or if clientOnly is set true in - * the properties, the entity is created as an avatar entity; otherwise it is created on the server. An avatar entity - follows you to each domain you visit, rendering at the same world coordinates unless it's parented to your avatar. - * @returns {Uuid} - */ - function addEntity(properties: Entities.EntityProperties, clientOnly: boolean): Uuid; - /** - * Get the properties of an entity. - * @param entityID {Uuid} The ID of the entity to get the properties of. - * @param desiredProperties {Array.} [desiredProperties=[]] Array of the names of the properties to get. If the array is empty, - * all properties are returned. - * @returns {Entities.EntityProperties} - */ - function getEntityProperties(entityID: Uuid, desiredProperties: Array.): Entities.EntityProperties; - /** - * Update an entity with specified properties. - * @param entityID {Uuid} The ID of the entity to edit. - * @param properties {Entities.EntityProperties} The properties to update the entity with. - * @returns {Uuid} - */ - function editEntity(entityID: Uuid, properties: Entities.EntityProperties): Uuid; - /** - * Delete an entity. - * @param entityID {Uuid} The ID of the entity to delete. - */ - function deleteEntity(entityID: Uuid): void; - /** - * Call a method in a client entity script from a client script or client entity script, or call a method in a server - * entity script from a server entity script. The entity script method must be exposed as a property in the target client -entity script. Additionally, if calling a server entity script, the server entity script must include the method's name -in an exposed property called remotelyCallable that is an array of method names that can be called. - * @param entityID {Uuid} The ID of the entity to call the method in. - * @param method {string} The name of the method to call. - * @param parameters {Array.} [parameters=[]] The parameters to call the specified method with. - */ - function callEntityMethod(entityID: Uuid, method: string, parameters: Array.): void; - /** - * Call a method in a server entity script from a client script or client entity script. The entity script method must be - * exposed as a property in the target server entity script. Additionally, the target server entity script must include the -method's name in an exposed property called remotelyCallable that is an array of method names that can be -called. - * @param entityID {Uuid} The ID of the entity to call the method in. - * @param method {string} The name of the method to call. - * @param parameters {Array.} [parameters=[]] The parameters to call the specified method with. - */ - function callEntityServerMethod(entityID: Uuid, method: string, parameters: Array.): void; - /** - * Call a method in a specific user's client entity script from a server entity script. The entity script method must be - * exposed as a property in the target client entity script. - * @param clientSessionID {Uuid} The session ID of the user to call the method in. - * @param entityID {Uuid} The ID of the entity to call the method in. - * @param method {string} The name of the method to call. - * @param parameters {Array.} [parameters=[]] The parameters to call the specified method with. - */ - function callEntityClientMethod(clientSessionID: Uuid, entityID: Uuid, method: string, parameters: Array.): void; - /** - * Find the entity with a position closest to a specified point and within a specified radius. - * @param center {Vec3} The point about which to search. - * @param radius {number} The radius within which to search. - * @returns {Uuid} - */ - function findClosestEntity(center: Vec3, radius: number): Uuid; - /** - * Find all entities that intersect a sphere defined by a center point and radius. - * @param center {Vec3} The point about which to search. - * @param radius {number} The radius within which to search. - * @returns {Array.} - */ - function findEntities(center: Vec3, radius: number): Array.; - /** - * Find all entities whose axis-aligned boxes intersect a search axis-aligned box defined by its minimum coordinates corner - * and dimensions. - * @param corner {Vec3} The corner of the search AA box with minimum co-ordinate values. - * @param dimensions {Vec3} The dimensions of the search AA box. - * @returns {Array.} - */ - function findEntitiesInBox(corner: Vec3, dimensions: Vec3): Array.; - /** - * Find all entities whose axis-aligned boxes intersect a search frustum. - * @param frustum {ViewFrustum} The frustum to search in. The position, orientation, - * projection, and centerRadius properties must be specified. - * @returns {Array.} - */ - function findEntitiesInFrustum(frustum: ViewFrustum): Array.; - /** - * Find all entities of a particular type that intersect a sphere defined by a center point and radius. - * @param entityType {Entities.EntityType} The type of entity to search for. - * @param center {Vec3} The point about which to search. - * @param radius {number} The radius within which to search. - * @returns {Array.} - */ - function findEntitiesByType(entityType: Entities.EntityType, center: Vec3, radius: number): Array.; - /** - * Find all entities of a particular name that intersect a sphere defined by a center point and radius. - * @param entityName {string} The name of the entity to search for. - * @param center {Vec3} The point about which to search. - * @param radius {number} The radius within which to search. - * @param caseSensitive {boolean} [caseSensitive=false] If true then the search is case-sensitive. - * @returns {Array.} - */ - function findEntitiesByName(entityName: string, center: Vec3, radius: number, caseSensitive: boolean): Array.; - /** - * Find the first entity intersected by a PickRay. Light and Zone entities are not - * intersected unless they've been configured as pickable using Entities.setLightsArePickable -and Entities.setZonesArePickable, respectively. - * @param pickRay {PickRay} The PickRay to use for finding entities. - * @param precisionPicking {boolean} [precisionPicking=false] If true and the intersected entity is a Model - * entity, the result's extraInfo property includes more information than it otherwise would. - * @param entitiesToInclude {Array.} [entitiesToInclude=[]] If not empty then the search is restricted to these entities. - * @param entitiesToDiscard {Array.} [entitiesToDiscard=[]] Entities to ignore during the search. - * @param visibleOnly {boolean} [visibleOnly=false] If true then only entities that are - * {@link Entities.EntityProperties|visible} are searched. - * @param collideableOnly {boolean} [collideableOnly=false] If true then only entities that are not - * {@link Entities.EntityProperties|collisionless} are searched. - * @returns {Entities.RayToEntityIntersectionResult} - */ - function findRayIntersection(pickRay: PickRay, precisionPicking: boolean, entitiesToInclude: Array., entitiesToDiscard: Array., visibleOnly: boolean, collideableOnly: boolean): Entities.RayToEntityIntersectionResult; - /** - * Find the first entity intersected by a PickRay. Light and Zone entities are not - * intersected unless they've been configured as pickable using Entities.setLightsArePickable -and Entities.setZonesArePickable, respectively. -This is a synonym for Entities.findRayIntersection. - * @param pickRay {PickRay} The PickRay to use for finding entities. - * @param precisionPicking {boolean} [precisionPicking=false] If true and the intersected entity is a Model - * entity, the result's extraInfo property includes more information than it otherwise would. - * @param entitiesToInclude {Array.} [entitiesToInclude=[]] If not empty then the search is restricted to these entities. - * @param entitiesToDiscard {Array.} [entitiesToDiscard=[]] Entities to ignore during the search. - */ - function findRayIntersectionBlocking(pickRay: PickRay, precisionPicking: boolean, entitiesToInclude: Array., entitiesToDiscard: Array.): void; - /** - * Reloads an entity's server entity script such that the latest version re-downloaded. - * @param entityID {Uuid} The ID of the entity to reload the server entity script of. - * @returns {boolean} - */ - function reloadServerScripts(entityID: Uuid): boolean; - /** - * Gets the status of server entity script attached to an entity - * @param entityID {Uuid} The ID of the entity to get the server entity script status for. - * @param callback {Entities~getServerScriptStatusCallback} The function to call upon completion. - * @returns {boolean} - */ - function getServerScriptStatus(entityID: Uuid, callback: Entities~getServerScriptStatusCallback): boolean; - /** - * Get metadata for certain entity properties such as script and serverScripts. - * @param entityID {Uuid} The ID of the entity to get the metadata for. - * @param property {string} The property name to get the metadata for. - * @param callback {Entities~queryPropertyMetadataCallback} The function to call upon completion. - * @returns {boolean} - */ - function queryPropertyMetadata(entityID: Uuid, property: string, callback: Entities~queryPropertyMetadataCallback): boolean; - /** - * Get metadata for certain entity properties such as script and serverScripts. - * @param entityID {Uuid} The ID of the entity to get the metadata for. - * @param property {string} The property name to get the metadata for. - * @param scope {object} The "this" context that the callback will be executed within. - * @param callback {Entities~queryPropertyMetadataCallback} The function to call upon completion. - * @returns {boolean} - */ - function queryPropertyMetadata(entityID: Uuid, property: string, scope: object, callback: Entities~queryPropertyMetadataCallback): boolean; - /** - * Set whether or not ray picks intersect the bounding box of Entities.EntityType entities. By default, Light - * entities are not intersected. The setting lasts for the Interface session. Ray picks are done using - Entities.findRayIntersection or - Entities.findRayIntersectionBlocking, or the Picks and RayPick - APIs. - * @param value {boolean} Set true to make ray picks intersect the bounding box of - * {@link Entities.EntityType|Light} entities, otherwise false. - */ - function setLightsArePickable(value: boolean): void; - /** - * Get whether or not ray picks intersect the bounding box of Entities.EntityType entities. Ray picks are - * done using Entities.findRayIntersection or - Entities.findRayIntersectionBlocking, or the Picks and RayPick - APIs. - * @returns {boolean} - */ - function getLightsArePickable(): boolean; - /** - * Set whether or not ray picks intersect the bounding box of Entities.EntityType entities. By default, Light - * entities are not intersected. The setting lasts for the Interface session. Ray picks are done using - Entities.findRayIntersection or - Entities.findRayIntersectionBlocking, or the Picks and RayPick - APIs. - * @param value {boolean} Set true to make ray picks intersect the bounding box of - * {@link Entities.EntityType|Zone} entities, otherwise false. - */ - function setZonesArePickable(value: boolean): void; - /** - * Get whether or not ray picks intersect the bounding box of Entities.EntityType entities. Ray picks are - * done using Entities.findRayIntersection or - Entities.findRayIntersectionBlocking, or the Picks and RayPick - APIs. - * @returns {boolean} - */ - function getZonesArePickable(): boolean; - /** - * Set whether or not Entities.EntityType entities' boundaries should be drawn. Currently not used. - * @param value {boolean} Set to true if {@link Entities.EntityType|Zone} entities' boundaries should be - * drawn, otherwise false. - */ - function setDrawZoneBoundaries(value: boolean): void; - /** - * Get whether or not Entities.EntityType entities' boundaries should be drawn. Currently not used. - * @returns {boolean} - */ - function getDrawZoneBoundaries(): boolean; - /** - * Set the values of all voxels in a spherical portion of a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. - * @param center {Vec3} The center of the sphere of voxels to set, in world coordinates. - * @param radius {number} The radius of the sphere of voxels to set, in world coordinates. - * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. - */ - function setVoxelSphere(entityID: Uuid, center: Vec3, radius: number, value: number): void; - /** - * Set the values of all voxels in a capsule-shaped portion of a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. - * @param start {Vec3} The center of the sphere of voxels to set, in world coordinates. - * @param end {Vec3} The center of the sphere of voxels to set, in world coordinates. - * @param radius {number} The radius of the capsule cylinder and spherical ends, in world coordinates. - * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. - */ - function setVoxelCapsule(entityID: Uuid, start: Vec3, end: Vec3, radius: number, value: number): void; - /** - * Set the value of a particular voxels in a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. - * @param position {Vec3} The position relative to the minimum axes values corner of the entity. The - * position coordinates are rounded to the nearest integer to get the voxel coordinate. The minimum axes - corner voxel is { x: 0, y: 0, z: 0 }. - * @param value {number} If value % 256 == 0 then voxel is cleared, otherwise the voxel is set. - */ - function setVoxel(entityID: Uuid, position: Vec3, value: number): void; - /** - * Set the values of all voxels in a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. - * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. - */ - function setAllVoxels(entityID: Uuid, value: number): void; - /** - * Set the values of all voxels in a cubic portion of a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. - * @param lowPosition {Vec3} The position of the minimum axes value corner of the cube of voxels to set, in voxel - * coordinates. - * @param cuboidSize {Vec3} The size of the cube of voxels to set, in voxel coordinates. - * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. - */ - function setVoxelsInCuboid(entityID: Uuid, lowPosition: Vec3, cuboidSize: Vec3, value: number): void; - /** - * Convert voxel coordinates in a Entities.EntityType entity to world coordinates. Voxel coordinates are - * relative to the minimum axes values corner of the entity with a scale of Vec3.ONE being the dimensions of -each voxel. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. - * @param voxelCoords {Vec3} The voxel coordinates. May be fractional and outside the entity's bounding box. - * @returns {Vec3} - */ - function voxelCoordsToWorldCoords(entityID: Uuid, voxelCoords: Vec3): Vec3; - /** - * Convert world coordinates to voxel coordinates in a Entities.EntityType entity. Voxel coordinates are - * relative to the minimum axes values corner of the entity, with a scale of Vec3.ONE being the dimensions of -each voxel. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. - * @param worldCoords {Vec3} The world coordinates. May be outside the entity's bounding box. - * @returns {Vec3} - */ - function worldCoordsToVoxelCoords(entityID: Uuid, worldCoords: Vec3): Vec3; - /** - * Convert voxel coordinates in a Entities.EntityType entity to local coordinates relative to the minimum - * axes value corner of the entity, with the scale being the same as world coordinates. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. - * @param voxelCoords {Vec3} The voxel coordinates. May be fractional and outside the entity's bounding box. - * @returns {Vec3} - */ - function voxelCoordsToLocalCoords(entityID: Uuid, voxelCoords: Vec3): Vec3; - /** - * Convert local coordinates to voxel coordinates in a Entities.EntityType entity. Local coordinates are - * relative to the minimum axes value corner of the entity, with the scale being the same as world coordinates. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. - * @param localCoords {Vec3} The local coordinates. May be outside the entity's bounding box. - * @returns {Vec3} - */ - function localCoordsToVoxelCoords(entityID: Uuid, localCoords: Vec3): Vec3; - /** - * Set the linePoints property of a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Line} entity. - * @param points {Array.} The array of points to set the entity's linePoints property to. - * @returns {boolean} - */ - function setAllPoints(entityID: Uuid, points: Array.): boolean; - /** - * Append a point to a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Line} entity. - * @param point {Vec3} The point to add to the line. The coordinates are relative to the entity's position. - * @returns {boolean} - */ - function appendPoint(entityID: Uuid, point: Vec3): boolean; - /** - * Dumps debug information about all entities in Interface's local in-memory tree of entities it knows about — domain - * and client-only — to the program log. - */ - function dumpTree(): void; - /** - * Add an action to an entity. An action is registered with the physics engine and is applied every physics simulation - * step. Any entity may have more than one action associated with it, but only as many as will fit in an entity's -actionData property. - * @param actionType {Entities.ActionType} The type of action. - * @param entityID {Uuid} The ID of the entity to add the action to. - * @param arguments {Entities.ActionArguments} Configure the action. - * @returns {Uuid} - */ - function addAction(actionType: Entities.ActionType, entityID: Uuid, arguments: Entities.ActionArguments): Uuid; - /** - * Update an entity action. - * @param entityID {Uuid} The ID of the entity with the action to update. - * @param actionID {Uuid} The ID of the action to update. - * @param arguments {Entities.ActionArguments} The arguments to update. - * @returns {boolean} - */ - function updateAction(entityID: Uuid, actionID: Uuid, arguments: Entities.ActionArguments): boolean; - /** - * Delete an action from an entity. - * @param entityID {Uuid} The ID of entity to delete the action from. - * @param actionID {Uuid} The ID of the action to delete. - * @returns {boolean} - */ - function deleteAction(entityID: Uuid, actionID: Uuid): boolean; - /** - * Get the IDs of the actions that are associated with an entity. - * @param entityID {Uuid} The entity to get the action IDs for. - * @returns {Array.} - */ - function getActionIDs(entityID: Uuid): Array.; - /** - * Get the arguments of an action. - * @param entityID {Uuid} The ID of the entity with the action. - * @param actionID {Uuid} The ID of the action to get the arguments of. - * @returns {Entities.ActionArguments} - */ - function getActionArguments(entityID: Uuid, actionID: Uuid): Entities.ActionArguments; - /** - * Get the translation of a joint in a Entities.EntityType entity relative to the entity's position and - * orientation. - * @param entityID {Uuid} The ID of the entity. - * @param jointIndex {number} The integer index of the joint. - * @returns {Vec3} - */ - function getAbsoluteJointTranslationInObjectFrame(entityID: Uuid, jointIndex: number): Vec3; - /** - * Get the translation of a joint in a Entities.EntityType entity relative to the entity's position and - * orientation. - * @param entityID {Uuid} The ID of the entity. - * @param jointIndex {number} The integer index of the joint. - * @returns {Quat} - */ - function getAbsoluteJointRotationInObjectFrame(entityID: Uuid, jointIndex: number): Quat; - /** - * Set the translation of a joint in a Entities.EntityType entity relative to the entity's position and - * orientation. - * @param entityID {Uuid} The ID of the entity. - * @param jointIndex {number} The integer index of the joint. - * @param translation {Vec3} The translation to set the joint to relative to the entity's position and orientation. - * @returns {boolean} - */ - function setAbsoluteJointTranslationInObjectFrame(entityID: Uuid, jointIndex: number, translation: Vec3): boolean; - /** - * Set the rotation of a joint in a Entities.EntityType entity relative to the entity's position and - * orientation. - * @param entityID {Uuid} The ID of the entity. - * @param jointIndex {number} The integer index of the joint. - * @param rotation {Quat} The rotation to set the joint to relative to the entity's orientation. - * @returns {boolean} - */ - function setAbsoluteJointRotationInObjectFrame(entityID: Uuid, jointIndex: number, rotation: Quat): boolean; - /** - * Get the local translation of a joint in a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the entity. - * @param jointIndex {number} The integer index of the joint. - * @returns {Vec3} - */ - function getLocalJointTranslation(entityID: Uuid, jointIndex: number): Vec3; - /** - * Get the local rotation of a joint in a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the entity. - * @param jointIndex {number} The integer index of the joint. - * @returns {Quat} - */ - function getLocalJointRotation(entityID: Uuid, jointIndex: number): Quat; - /** - * Set the local translation of a joint in a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the entity. - * @param jointIndex {number} The integer index of the joint. - * @param translation {Vec3} The local translation to set the joint to. - * @returns {boolean} - */ - function setLocalJointTranslation(entityID: Uuid, jointIndex: number, translation: Vec3): boolean; - /** - * Set the local rotation of a joint in a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the entity. - * @param jointIndex {number} The integer index of the joint. - * @param rotation {Quat} The local rotation to set the joint to. - * @returns {boolean} - */ - function setLocalJointRotation(entityID: Uuid, jointIndex: number, rotation: Quat): boolean; - /** - * Set the local translations of joints in a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the entity. - * @param translations {Array.} The local translations to set the joints to. - * @returns {boolean} - */ - function setLocalJointTranslations(entityID: Uuid, translations: Array.): boolean; - /** - * Set the local rotations of joints in a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the entity. - * @param rotations {Array.} The local rotations to set the joints to. - * @returns {boolean} - */ - function setLocalJointRotations(entityID: Uuid, rotations: Array.): boolean; - /** - * Set the local rotations and translations of joints in a Entities.EntityType entity. This is the same as - * calling both Entities.setLocalJointRotations and -Entities.setLocalJointTranslations at the same time. - * @param entityID {Uuid} The ID of the entity. - * @param rotations {Array.} The local rotations to set the joints to. - * @param translations {Array.} The local translations to set the joints to. - * @returns {boolean} - */ - function setLocalJointsData(entityID: Uuid, rotations: Array., translations: Array.): boolean; - /** - * Get the index of a named joint in a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the entity. - * @param name {string} The name of the joint. - * @returns {number} - */ - function getJointIndex(entityID: Uuid, name: string): number; - /** - * Get the names of all the joints in a Entities.EntityType entity. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Model} entity. - * @returns {Array.} - */ - function getJointNames(entityID: Uuid): Array.; - /** - * Get the IDs of entities, overlays, and avatars that are directly parented to an entity. To get all descendants of an - * entity, recurse on the IDs returned by the function. - * @param parentID {Uuid} The ID of the entity to get the children IDs of. - * @returns {Array.} - */ - function getChildrenIDs(parentID: Uuid): Array.; - /** - * Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model's joint. - * @param parentID {Uuid} The ID of the entity, overlay, or avatar to get the children IDs of. - * @param jointIndex {number} Integer number of the model joint to get the children IDs of. - * @returns {Array.} - */ - function getChildrenIDsOfJoint(parentID: Uuid, jointIndex: number): Array.; - /** - * Check whether an entity or overlay has an entity as an ancestor (parent, parent's parent, etc.). - * @param childID {Uuid} The ID of the child entity or overlay to test for being a child, grandchild, etc. - * @param parentID {Uuid} The ID of the parent entity to test for being a parent, grandparent, etc. - * @returns {boolean} - */ - function isChildOfParent(childID: Uuid, parentID: Uuid): boolean; - /** - * Get the type — entity, overlay, or avatar — of an in-world item. - * @param entityID {Uuid} The ID of the item to get the type of. - * @returns {string} - */ - function getNestableType(entityID: Uuid): string; - /** - * Get the ID of the Entities.EntityType entity that has keyboard focus. - * @returns {Uuid} - */ - function getKeyboardFocusEntity(): Uuid; - /** - * Set the Entities.EntityType entity that has keyboard focus. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Web} entity to set keyboard focus to. Use - * null or {@link Uuid|Uuid.NULL} to unset keyboard focus from an entity. - */ - function setKeyboardFocusEntity(entityID: Uuid): void; - /** - * Emit a Entities.mousePressOnEntity event. - * @param entityID {Uuid} The ID of the entity to emit the event for. - * @param event {PointerEvent} The event details. - */ - function sendMousePressOnEntity(entityID: Uuid, event: PointerEvent): void; - /** - * Emit a Entities.mouseMoveOnEntity event. - * @param entityID {Uuid} The ID of the entity to emit the event for. - * @param event {PointerEvent} The event details. - */ - function sendMouseMoveOnEntity(entityID: Uuid, event: PointerEvent): void; - /** - * Emit a Entities.mouseReleaseOnEntity event. - * @param entityID {Uuid} The ID of the entity to emit the event for. - * @param event {PointerEvent} The event details. - */ - function sendMouseReleaseOnEntity(entityID: Uuid, event: PointerEvent): void; - /** - * Emit a Entities.clickDownOnEntity event. - * @param entityID {Uuid} The ID of the entity to emit the event for. - * @param event {PointerEvent} The event details. - */ - function sendClickDownOnEntity(entityID: Uuid, event: PointerEvent): void; - /** - * Emit a Entities.holdingClickOnEntity event. - * @param entityID {Uuid} The ID of the entity to emit the event for. - * @param event {PointerEvent} The event details. - */ - function sendHoldingClickOnEntity(entityID: Uuid, event: PointerEvent): void; - /** - * Emit a Entities.clickReleaseOnEntity event. - * @param entityID {Uuid} The ID of the entity to emit the event for. - * @param event {PointerEvent} The event details. - */ - function sendClickReleaseOnEntity(entityID: Uuid, event: PointerEvent): void; - /** - * Emit a Entities.hoverEnterEntity event. - * @param entityID {Uuid} The ID of the entity to emit the event for. - * @param event {PointerEvent} The event details. - */ - function sendHoverEnterEntity(entityID: Uuid, event: PointerEvent): void; - /** - * Emit a Entities.hoverOverEntity event. - * @param entityID {Uuid} The ID of the entity to emit the event for. - * @param event {PointerEvent} The event details. - */ - function sendHoverOverEntity(entityID: Uuid, event: PointerEvent): void; - /** - * Emit a Entities.hoverLeaveEntity event. - * @param entityID {Uuid} The ID of the entity to emit the event for. - * @param event {PointerEvent} The event details. - */ - function sendHoverLeaveEntity(entityID: Uuid, event: PointerEvent): void; - /** - * Check whether an entity wants hand controller pointer events. For example, a Entities.EntityType entity does - * but a Entities.EntityType entity doesn't. - * @param entityID {Uuid} The ID of the entity. - * @returns {boolean} - */ - function wantsHandControllerPointerEvents(entityID: Uuid): boolean; - /** - * Send a script event over a Entities.EntityType entity's EventBridge to the Web page's scripts. - * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Web} entity. - * @param message {string} The message to send. - */ - function emitScriptEvent(entityID: Uuid, message: string): void; - /** - * Check whether an axis-aligned box and a capsule intersect. - * @param brn {Vec3} The bottom right near (minimum axes values) corner of the AA box. - * @param dimensions {Vec3} The dimensions of the AA box. - * @param start {Vec3} One end of the capsule. - * @param end {Vec3} The other end of the capsule. - * @param radius {number} The radiues of the capsule. - * @returns {boolean} - */ - function AABoxIntersectsCapsule(brn: Vec3, dimensions: Vec3, start: Vec3, end: Vec3, radius: number): boolean; - /** - * Get the meshes in a Entities.EntityType or Entities.EntityType entity. - * @param entityID {Uuid} The ID of the Model or PolyVox entity to get the meshes of. - * @param callback {Entities~getMeshesCallback} The function to call upon completion. - */ - function getMeshes(entityID: Uuid, callback: Entities~getMeshesCallback): void; - /** - * Get the object to world transform, excluding scale, of an entity. - * @param entityID {Uuid} The ID of the entity. - * @returns {Mat4} - */ - function getEntityTransform(entityID: Uuid): Mat4; - /** - * Get the object to parent transform, excluding scale, of an entity. - * @param entityID {Uuid} The ID of the entity. - * @returns {Mat4} - */ - function getEntityLocalTransform(entityID: Uuid): Mat4; - /** - * Get the static certificate for an entity. The static certificate contains static properties of the item which cannot - * be altered. - * @param entityID {Uuid} The ID of the entity to get the static certificate for. - * @returns {string} - */ - function getStaticCertificateJSON(entityID: Uuid): string; - /** - * Verify the entity's proof of provenance, i.e., that the entity's certificateID property was produced by - * High Fidelity signing the entity's static certificate JSON. - * @param entityID {Uuid} The ID of the entity to verify. - * @returns {boolean} - */ - function verifyStaticCertificateProperties(entityID: Uuid): boolean; - /** - * Triggered on the client that is the physics simulation owner during the collision of two entities. Note: Isn't triggered - * for a collision with an avatar. - * @param idA {Uuid} The ID of one entity in the collision. For an entity script, this is the ID of the entity containing - * the script. - * @param idB {Uuid} The ID of the other entity in the collision. - * @param collision {Collision} The details of the collision. - * @returns {Signal} - */ - function collisionWithEntity(idA: Uuid, idB: Uuid, collision: Collision): Signal; - /** - * Triggered when your ability to change the locked property of entities changes. - * @param canAdjustLocks {boolean} true if the script can change the locked property of an - * entity, otherwise false. - * @returns {Signal} - */ - function canAdjustLocksChanged(canAdjustLocks: boolean): Signal; - /** - * Triggered when your ability to rez (create) entities changes. - * @param canRez {boolean} true if the script can rez (create) entities, otherwise false. - * @returns {Signal} - */ - function canRezChanged(canRez: boolean): Signal; - /** - * Triggered when your ability to rez (create) temporary entities changes. Temporary entities are entities with a finite - * lifetime property value set. - * @param canRezTmp {boolean} true if the script can rez (create) temporary entities, otherwise - * false. - * @returns {Signal} - */ - function canRezTmpChanged(canRezTmp: boolean): Signal; - /** - * Triggered when your ability to rez (create) certified entities changes. Certified entities are entities that have PoP - * certificates. - * @param canRezCertified {boolean} true if the script can rez (create) certified entities, otherwise - * false. - * @returns {Signal} - */ - function canRezCertifiedChanged(canRezCertified: boolean): Signal; - /** - * Triggered when your ability to rez (create) temporary certified entities changes. Temporary entities are entities with a - * finite lifetime property value set. Certified entities are entities that have PoP certificates. - * @param canRezTmpCertified {boolean} true if the script can rez (create) temporary certified entities, - * otherwise false. - * @returns {Signal} - */ - function canRezTmpCertifiedChanged(canRezTmpCertified: boolean): Signal; - /** - * Triggered when your ability to make changes to the asset server's assets changes. - * @param canWriteAssets {boolean} true if the script can change the ? property of an entity, - * otherwise false. - * @returns {Signal} - */ - function canWriteAssetsChanged(canWriteAssets: boolean): Signal; - /** - * Triggered when a mouse button is clicked while the mouse cursor is on an entity, or a controller trigger is fully - * pressed while its laser is on an entity. - * @param entityID {Uuid} The ID of the entity that was pressed. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function mousePressOnEntity(entityID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when a mouse button is double-clicked while the mouse cursor is on an entity. - * @param entityID {Uuid} The ID of the entity that was double-pressed. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function mouseDoublePressOnEntity(entityID: Uuid, event: PointerEvent): Signal; - /** - * Repeatedly triggered while the mouse cursor or controller laser moves on an entity. - * @param entityID {Uuid} The ID of the entity that was moved on. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function mouseMoveOnEntity(entityID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when a mouse button is released after clicking on an entity or the controller trigger is partly or fully - * released after pressing on an entity, even if the mouse pointer or controller laser has moved off the entity. - * @param entityID {Uuid} The ID of the entity that was originally pressed. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function mouseReleaseOnEntity(entityID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when a mouse button is clicked while the mouse cursor is not on an entity. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function mousePressOffEntity(event: PointerEvent): Signal; - /** - * Triggered when a mouse button is double-clicked while the mouse cursor is not on an entity. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function mouseDoublePressOffEntity(event: PointerEvent): Signal; - /** - * Triggered when a mouse button is clicked while the mouse cursor is on an entity. Note: Not triggered by controller. - * @param entityID {Uuid} The ID of the entity that was clicked. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function clickDownOnEntity(entityID: Uuid, event: PointerEvent): Signal; - /** - * Repeatedly triggered while a mouse button continues to be held after clicking an entity, even if the mouse cursor has - * moved off the entity. Note: Not triggered by controller. - * @param entityID {Uuid} The ID of the entity that was originally clicked. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function holdingClickOnEntity(entityID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when a mouse button is released after clicking on an entity, even if the mouse cursor has moved off the - * entity. Note: Not triggered by controller. - * @param entityID {Uuid} The ID of the entity that was originally clicked. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function clickReleaseOnEntity(entityID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when the mouse cursor or controller laser starts hovering on an entity. - * @param entityID {Uuid} The ID of the entity that is being hovered. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function hoverEnterEntity(entityID: Uuid, event: PointerEvent): Signal; - /** - * Repeatedly triggered when the mouse cursor or controller laser moves while hovering over an entity. - * @param entityID {Uuid} The ID of the entity that is being hovered. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function hoverOverEntity(entityID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when the mouse cursor or controller laser stops hovering over an entity. - * @param entityID {Uuid} The ID of the entity that was being hovered. - * @param event {PointerEvent} Details of the event. - * @returns {Signal} - */ - function hoverLeaveEntity(entityID: Uuid, event: PointerEvent): Signal; - /** - * Triggered when an avatar enters an entity. - * @param entityID {Uuid} The ID of the entity that the avatar entered. - * @returns {Signal} - */ - function enterEntity(entityID: Uuid): Signal; - /** - * Triggered when an avatar leaves an entity. - * @param entityID {Uuid} The ID of the entity that the avatar left. - * @returns {Signal} - */ - function leaveEntity(entityID: Uuid): Signal; - /** - * Triggered when an entity is deleted. - * @param entityID {Uuid} The ID of the entity deleted. - * @returns {Signal} - */ - function deletingEntity(entityID: Uuid): Signal; - /** - * Triggered when an entity is added to Interface's local in-memory tree of entities it knows about. This may occur when - * entities are loaded upon visiting a domain, when the user rotates their view so that more entities become visible, and -when a domain or client-only entity is added (e.g., by Entities.addEntity). - * @param entityID {Uuid} The ID of the entity added. - * @returns {Signal} - */ - function addingEntity(entityID: Uuid): Signal; - /** - * Triggered when you disconnect from a domain, at which time Interface's local in-memory tree of entities it knows about - * is cleared. - * @returns {Signal} - */ - function clearingEntities(): Signal; - /** - * Triggered in when a script in a Entities.EntityType entity's Web page script sends an event over the - * script's EventBridge. - * @param entityID {Uuid} The ID of the entity that event was received from. - * @param message {string} The message received. - * @returns {Signal} - */ - function webEventReceived(entityID: Uuid, message: string): Signal; - interface Haze { - /** - * The horizontal distance at which visibility is reduced to 95%; i.e., 95% of each pixel's - * color is haze. - */ - hazeRange: number; - /** - * The color of the haze when looking away from the key light. - */ - hazeColor: Color; - /** - * If true then the haze is colored with glare from the key light; - * hazeGlareColor and hazeGlareAngle are used. - */ - hazeEnableGlare: boolean; - /** - * The color of the haze when looking towards the key light. - */ - hazeGlareColor: Color; - /** - * The angle in degrees across the circle around the key light that the glare color and - * haze color are blended 50/50. - */ - hazeGlareAngle: number; - /** - * If true then haze decreases with altitude as defined by the - * entity's local coordinate system; hazeBaseRef and hazeCeiling are used. - */ - hazeAltitudeEffect: boolean; - /** - * The y-axis value in the entity's local coordinate system at which the haze density starts - * reducing with altitude. - */ - hazeBaseRef: number; - /** - * The y-axis value in the entity's local coordinate system at which the haze density has - * reduced to 5%. - */ - hazeCeiling: number; - /** - * The proportion of the skybox image to show through the haze: 0.0 - * displays no skybox image; 1.0 displays no haze. - */ - hazeBackgroundBlend: number; - /** - * Currently not supported. - */ - hazeAttenuateKeyLight: boolean; - /** - * Currently not supported. - */ - hazeKeyLightRange: number; - /** - * Currently not supported. - */ - hazeKeyLightAltitude: number; - } - - interface KeyLight { - /** - * The color of the light. - */ - color: Color; - /** - * The intensity of the light. - */ - intensity: number; - /** - * The direction the light is shining. - */ - direction: Vec3; - /** - * If true then shadows are cast. Shadows are cast by avatars, plus - * Entities.EntityType and Entities.EntityType entities that have their - Entities.EntityProperties property set to true. - */ - castShadows: boolean; - } - - interface Skybox { - /** - * Sets the color of the sky if url is "", otherwise modifies the - * color of the cube map image. - */ - color: Color; - /** - * A cube map image that is used to render the sky. - */ - url: string; - } - - /** - * Set the maximum number of entity packets that the client can send per second. - * @param packetsPerSecond {number} Integer maximum number of entity packets that the client can send per second. - */ - function setPacketsPerSecond(packetsPerSecond: number): void; - /** - * Get the maximum number of entity packets that the client can send per second. - * @returns {number} - */ - function getPacketsPerSecond(): number; - /** - * Check whether servers exist for the client to send entity packets to, i.e., whether you are connected to a domain and - * its entity server is working. - * @returns {boolean} - */ - function serversExist(): boolean; - /** - * Check whether the client has entity packets waiting to be sent. - * @returns {boolean} - */ - function hasPacketsToSend(): boolean; - /** - * Get the number of entity packets the client has waiting to be sent. - * @returns {number} - */ - function packetsToSendCount(): number; - /** - * Get the entity packets per second send rate of the client over its lifetime. - * @returns {number} - */ - function getLifetimePPS(): number; - /** - * Get the entity bytes per second send rate of the client over its lifetime. - * @returns {number} - */ - function getLifetimeBPS(): number; - /** - * Get the entity packets per second queued rate of the client over its lifetime. - * @returns {number} - */ - function getLifetimePPSQueued(): number; - /** - * Get the entity bytes per second queued rate of the client over its lifetime. - * @returns {number} - */ - function getLifetimeBPSQueued(): number; - /** - * Get the lifetime of the client from the first entity packet sent until now, in microseconds. - * @returns {number} - */ - function getLifetimeInUsecs(): number; - /** - * Get the lifetime of the client from the first entity packet sent until now, in seconds. - * @returns {number} - */ - function getLifetimeInSeconds(): number; - /** - * Get the total number of entity packets sent by the client over its lifetime. - * @returns {number} - */ - function getLifetimePacketsSent(): number; - /** - * Get the total bytes of entity packets sent by the client over its lifetime. - * @returns {number} - */ - function getLifetimeBytesSent(): number; - /** - * Get the total number of entity packets queued by the client over its lifetime. - * @returns {number} - */ - function getLifetimePacketsQueued(): number; - /** - * Get the total bytes of entity packets queued by the client over its lifetime. - * @returns {number} - */ - function getLifetimeBytesQueued(): number; - interface ActionArguments-Offset { - /** - * The target point to offset the entity from. - */ - pointToOffsetFrom: Vec3; - /** - * The distance away from the target point to position the entity. - */ - linearDistance: number; - /** - * Controls how long it takes for the entity's position to catch up with the - * target offset. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action - is applied using an exponential decay. - */ - linearTimeScale: number; - } - - interface ActionArguments-Tractor { - /** - * The target position. - */ - targetPosition: Vec3; - /** - * The target rotation. - */ - targetRotation: Quat; - /** - * If an entity ID, the targetPosition and targetRotation are - * relative to this entity's position and rotation. - */ - otherID: Uuid; - /** - * Controls how long it takes for the entity's position to catch up with the - * target position. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action - is applied using an exponential decay. - */ - linearTimeScale: number; - /** - * Controls how long it takes for the entity's orientation to catch up with the - * target orientation. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the - action is applied using an exponential decay. - */ - angularTimeScale: number; - } - - interface ActionArguments-TravelOriented { - /** - * The axis of the entity to align with the entity's direction of travel. - */ - forward: Vec3; - /** - * Controls how long it takes for the entity's orientation to catch up with the - * direction of travel. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the - action is applied using an exponential decay. - */ - angularTimeScale: number; - } - - interface ActionArguments-BallSocket { - /** - * The local offset of the joint relative to the entity's position. - */ - pivot: Vec3; - /** - * The ID of the other entity that is connected to the joint. - */ - otherEntityID: Uuid; - /** - * The local offset of the joint relative to the other entity's position. - */ - otherPivot: Vec3; - } - - interface ActionArguments-ConeTwist { - /** - * The local offset of the joint relative to the entity's position. - */ - pivot: Vec3; - /** - * The axis of the entity that moves through the cone. Must be a non-zero vector. - */ - axis: Vec3; - /** - * The ID of the other entity that is connected to the joint. - */ - otherEntityID: Uuid; - /** - * The local offset of the joint relative to the other entity's position. - */ - otherPivot: Vec3; - /** - * The axis of the other entity that moves through the cone. Must be a non-zero vector. - */ - otherAxis: Vec3; - /** - * The angle through which the joint can move in one axis of the cone, in radians. - */ - swingSpan1: number; - /** - * The angle through which the joint can move in the other axis of the cone, in radians. - */ - swingSpan2: number; - /** - * The angle through with the joint can twist, in radians. - */ - twistSpan: number; - } - - interface ActionArguments-Hinge { - /** - * The local offset of the joint relative to the entity's position. - */ - pivot: Vec3; - /** - * The axis of the entity that it pivots about. Must be a non-zero vector. - */ - axis: Vec3; - /** - * The ID of the other entity that is connected to the joint, if any. If none is - * specified then the first entity simply pivots about its specified axis. - */ - otherEntityID: Uuid; - /** - * The local offset of the joint relative to the other entity's position. - */ - otherPivot: Vec3; - /** - * The axis of the other entity that it pivots about. Must be a non-zero vector. - */ - otherAxis: Vec3; - /** - * The most negative angle that the hinge can take, in radians. - */ - low: number; - /** - * The most positive angle that the hinge can take, in radians. - */ - high: number; - /** - * The current angle of the hinge. Read-only. - */ - angle: number; - } - - interface ActionArguments-Slider { - /** - * The local position of a point in the entity that slides along the axis. - */ - point: Vec3; - /** - * The axis of the entity that slides along the joint. Must be a non-zero vector. - */ - axis: Vec3; - /** - * The ID of the other entity that is connected to the joint, if any. If non is - * specified then the first entity simply slides and rotates about its specified axis. - */ - otherEntityID: Uuid; - /** - * The local position of a point in the other entity that slides along the axis. - */ - otherPoint: Vec3; - /** - * The axis of the other entity that slides along the joint. Must be a non-zero vector. - */ - axis: Vec3; - /** - * The most negative linear offset from the entity's initial point that the entity can - * have along the slider. - */ - linearLow: number; - /** - * The most positive linear offset from the entity's initial point that the entity can - * have along the slider. - */ - linearHigh: number; - /** - * The most negative angle that the entity can rotate about the axis if the action - * involves only one entity, otherwise the most negative angle the rotation can be between the two entities. In radians. - */ - angularLow: number; - /** - * The most positive angle that the entity can rotate about the axis if the action - * involves only one entity, otherwise the most positive angle the rotation can be between the two entities. In radians. - */ - angularHigh: number; - /** - * The current linear offset the entity is from its initial point if the action involves - * only one entity, otherwise the linear offset between the two entities' action points. Read-only. - */ - linearPosition: number; - /** - * The current angular offset of the entity from its initial rotation if the action - * involves only one entity, otherwise the angular offset between the two entities. Read-only. - */ - angularPosition: number; - } - - interface ActionArguments { - /** - * The type of action. - */ - type: Entities.ActionType; - /** - * A string that a script can use for its own purposes. - */ - tag: string; - /** - * How long the action should exist, in seconds, before it is automatically deleted. A value of - * 0 means that the action should not be deleted. - */ - ttl: number; - /** - * Is true if you created the action during your current Interface session, - * false otherwise. Read-only. - */ - isMine: boolean; - /** - * Is present when the entity hasn't been registered with the physics engine yet (e.g., - * if the action hasn't been properly configured), otherwise undefined. Read-only. - */ - ::no-motion-state: boolean; - /** - * Is true when the action is modifying the entity's motion, false - * otherwise. Is present once the entity has been registered with the physics engine, otherwise undefined. - Read-only. - */ - ::active: boolean; - /** - * How the entity moves with the action. Is present once the entity has - * been registered with the physics engine, otherwise undefined. Read-only. - */ - ::motion-type: Entities.PhysicsMotionType; - } - - /** - * Triggered when the script starts for a user. - * Note: Can only be connected to via this.preload = function (...) { ... } in the entity script. -Available in:Client Entity ScriptsServer Entity Scripts - * @param entityID {Uuid} The ID of the entity that the script is running in. - * @returns {Signal} - */ - function preload(entityID: Uuid): Signal; - /** - * Triggered when the script terminates for a user. - * Note: Can only be connected to via this.unoad = function () { ... } in the entity script. -Available in:Client Entity ScriptsServer Entity Scripts - * @returns {Signal} - */ - function unload(): Signal; - /** - * Get or set the Entities.EntityType entity that has keyboard focus. - * If no entity has keyboard focus, get returns null; set to null or Uuid to - clear keyboard focus. - */ - let keyboardFocusEntity: Uuid; + interface ActionArguments-FarGrab { + /** + * The target position. + */ + targetPosition: Vec3; + /** + * The target rotation. + */ + targetRotation: Quat; + /** + * If an entity ID, the targetPosition and targetRotation are + * relative to this entity's position and rotation. + */ + otherID: Uuid; + /** + * Controls how long it takes for the entity's position to catch up with the + * target position. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + linearTimeScale: number; + /** + * Controls how long it takes for the entity's orientation to catch up with the + * target orientation. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + angularTimeScale: number; + } + + interface ActionArguments-Hold { + /** + * The ID of the avatar holding the entity. + */ + holderID: Uuid; + /** + * The target position relative to the avatar's hand. + */ + relativePosition: Vec3; + /** + * The target rotation relative to the avatar's hand. + */ + relativeRotation: Vec3; + /** + * Controls how long it takes for the entity's position and rotation to catch up with + * the target. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + timeScale: number; + /** + * The hand holding the entity: "left" or "right". + */ + hand: string; + /** + * If true, the entity is made kinematic during the action; the entity won't + * lag behind the hand but constraint actions such as "hinge" won't act properly. + */ + kinematic: boolean; + /** + * If true and kinematic is true, the + * entity's velocity property will be set during the action, e.g., so that other scripts may use the value. + */ + kinematicSetVelocity: boolean; + /** + * If true, the entity follows the HMD controller rather than the avatar's + * hand. + */ + ignoreIK: boolean; + } + + interface AmbientLight { + /** + * The intensity of the light. + */ + ambientIntensity: number; + /** + * A cube map image that defines the color of the light coming from each direction. If + * "" then the entity's Entities.Skybox url property value is used, unless that also is "" in which case the entity's ambientLightMode property is set to "inherit". + */ + ambientURL: string; + } + + interface AnimationProperties { + /** + * The URL of the FBX file that has the animation. + */ + url: string; + /** + * The speed in frames/s that the animation is played at. + */ + fps: number; + /** + * The first frame to play in the animation. + */ + firstFrame: number; + /** + * The last frame to play in the animation. + */ + lastFrame: number; + /** + * The current frame being played in the animation. + */ + currentFrame: number; + /** + * If true then the animation should play. + */ + running: boolean; + /** + * If true then the animation should be continuously repeated in a loop. + */ + loop: boolean; + /** + * If true then the rotations and translations of the last frame played should be + * maintained when the animation stops playing. + */ + hold: boolean; + } + + interface Bloom { + /** + * The intensity of the bloom effect. + */ + bloomIntensity: number; + /** + * The threshold for the bloom effect. + */ + bloomThreshold: number; + /** + * The size of the bloom effect. + */ + bloomSize: number; + } + + interface EntityProperties { + /** + * The ID of the entity. Read-only. + */ + id: Uuid; + /** + * A name for the entity. Need not be unique. + */ + name: string; + /** + * The entity type. You cannot change the type of an entity after it's created. (Though + * its value may switch among "Box", "Shape", and "Sphere" depending on changes to the shape property set for entities of these types.) Read-only. + */ + type: Entities.EntityType; + /** + * If true then the entity is an avatar entity; otherwise it is a server + * entity. An avatar entity follows you to each domain you visit, rendering at the same world coordinates unless it's parented to your avatar. Value cannot be changed after the entity is created. The value can also be set at entity creation by using the clientOnly parameter in Entities.addEntity. + */ + clientOnly: boolean; + /** + * The session ID of the owning avatar if clientOnly is + * true, otherwise Uuid. Read-only. + */ + owningAvatarID: Uuid; + /** + * The UTC date and time that the entity was created, in ISO 8601 format as + * yyyy-MM-ddTHH:mm:ssZ. Read-only. + */ + created: string; + /** + * The age of the entity in seconds since it was created. Read-only. + */ + age: number; + /** + * The age of the entity since it was created, formatted as h hours m minutes s + * seconds. + */ + ageAsText: string; + /** + * How long an entity lives for, in seconds, before being automatically deleted. A value of + * -1 means that the entity lives for ever. + */ + lifetime: number; + /** + * When the entity was last edited, expressed as the number of microseconds since + * 1970-01-01T00:00:00 UTC. Read-only. + */ + lastEdited: number; + /** + * The session ID of the avatar or agent that most recently created or edited the entity. + * Read-only. + */ + lastEditedBy: Uuid; + /** + * Whether or not the entity can be edited or deleted. If true then the + * entity's properties other than locked cannot be changed, and the entity cannot be deleted. + */ + locked: boolean; + /** + * Whether or not the entity is rendered. If true then the entity is rendered. + */ + visible: boolean; + /** + * Whether or not the entity can cast a shadow. Currently applicable only to + * Entities.EntityType and Entities.EntityType entities. Shadows are cast if inside a Entities.EntityType entity with castShadows enabled in its Entities.EntityProperties-Zone property. + */ + canCastShadow: boolean; + /** + * Whether or not the entity is rendered in the secondary camera. If true then the entity is rendered. + */ + isVisibleInSecondaryCamera: boolean; + /** + * The position of the entity. + */ + position: Vec3; + /** + * The orientation of the entity with respect to world coordinates. + */ + rotation: Quat; + /** + * The point in the entity that is set to the entity's position and is rotated + * about, Vec3 – Vec3. A value of Vec3 is the entity's minimum x, y, z corner; a value of Vec3 is the entity's maximum x, y, z corner. + */ + registrationPoint: Vec3; + /** + * The center of the entity's unscaled mesh model if it has one, otherwise + * Vec3. Read-only. + */ + naturalPosition: Vec3; + /** + * The dimensions of the entity's unscaled mesh model if it has one, otherwise + * Vec3. Read-only. + */ + naturalDimensions: Vec3; + /** + * The linear velocity of the entity in m/s with respect to world coordinates. + */ + velocity: Vec3; + /** + * How much to slow down the linear velocity of an entity over time, 0.0 + * – 1.0. A higher damping value slows down the entity more quickly. The default value is for an exponential decay timescale of 2.0s, where it takes 2.0s for the movement to slow to 1/e = 0.368 of its initial value. + */ + damping: number; + /** + * The angular velocity of the entity in rad/s with respect to its axes, about its + * registration point. + */ + angularVelocity: Vec3; + /** + * How much to slow down the angular velocity of an entity over time, + * 0.0 – 1.0. A higher damping value slows down the entity more quickly. The default value is for an exponential decay timescale of 2.0s, where it takes 2.0s for the movement to slow to 1/e = 0.368 of its initial value. + */ + angularDamping: number; + /** + * The acceleration due to gravity in m/s2 that the entity should move with, in + * world coordinates. Set to { x: 0, y: -9.8, z: 0 } to simulate Earth's gravity. Gravity is applied to an entity's motion only if its dynamic property is true. If changing an entity's gravity from Vec3, you need to give it a small velocity in order to kick off physics simulation. The gravity value is applied in addition to the acceleration value. + */ + gravity: Vec3; + /** + * A general acceleration in m/s2 that the entity should move with, in world + * coordinates. The acceleration is applied to an entity's motion only if its dynamic property is true. If changing an entity's acceleration from Vec3, you need to give it a small velocity in order to kick off physics simulation. The acceleration value is applied in addition to the gravity value. + */ + acceleration: Vec3; + /** + * The "bounciness" of an entity when it collides, 0.0 – + * 0.99. The higher the value, the more bouncy. + */ + restitution: number; + /** + * How much to slow down an entity when it's moving against another, 0.0 – + * 10.0. The higher the value, the more quickly it slows down. Examples: 0.1 for ice, 0.9 for sandpaper. + */ + friction: number; + /** + * The density of the entity in kg/m3, 100 for balsa wood – + * 10000 for silver. The density is used in conjunction with the entity's bounding box volume to work out its mass in the application of physics. + */ + density: number; + /** + * Whether or not the entity should collide with items per its + * collisionMask property. If true then the entity does not collide. + */ + collisionless: boolean; + /** + * Synonym for collisionless. + */ + ignoreForCollisions: boolean; + /** + * What types of items the entity should collide with. + */ + collisionMask: Entities.CollisionMask; + /** + * Synonym for collisionMask, + * in text format. + */ + collidesWith: string; + /** + * The sound to play when the entity experiences a collision. Valid file formats are + * as per the SoundCache object. + */ + collisionSoundURL: string; + /** + * Whether or not the entity should be affected by collisions. If true then + * the entity's movement is affected by collisions. + */ + dynamic: boolean; + /** + * Synonym for dynamic. + */ + collisionsWillMove: boolean; + /** + * A "hifi://" metaverse address that a user is taken to when they click on the entity. + */ + href: string; + /** + * A description of the href property value. + */ + description: string; + /** + * Used to store extra data about the entity in JSON format. WARNING: Other apps such as the + * Create app can also use this property, so make sure you handle data stored by other apps — edit only your bit and leave the rest of the data intact. You can use JSON.parse() to parse the string into a JavaScript object which you can manipulate the properties of, and use JSON.stringify() to convert the object into a string to put in the property. + */ + userData: string; + /** + * The URL of the client entity script, if any, that is attached to the entity. + */ + script: string; + /** + * Intended to be used to indicate when the client entity script was loaded. Should be + * an integer number of milliseconds since midnight GMT on January 1, 1970 (e.g., as supplied by Date.now(). If you update the property's value, the script is re-downloaded and reloaded. This is how the "reload" button beside the "script URL" field in properties tab of the Create app works. + */ + scriptTimestamp: number; + /** + * The URL of the server entity script, if any, that is attached to the entity. + */ + serverScripts: string; + /** + * The ID of the entity or avatar that this entity is parented to. Uuid + * if the entity is not parented. + */ + parentID: Uuid; + /** + * The joint of the entity or avatar that this entity is parented to. Use + * 65535 or -1 to parent to the entity or avatar's position and orientation rather than a joint. + */ + parentJointIndex: number; + /** + * The position of the entity relative to its parent if the entity is parented, + * otherwise the same value as position. If the entity is parented to an avatar and is clientOnly so that it scales with the avatar, this value remains the original local position value while the avatar scale changes. + */ + localPosition: Vec3; + /** + * The rotation of the entity relative to its parent if the entity is parented, + * otherwise the same value as rotation. + */ + localRotation: Quat; + /** + * The velocity of the entity relative to its parent if the entity is parented, + * otherwise the same value as velocity. + */ + localVelocity: Vec3; + /** + * The angular velocity of the entity relative to its parent if the entity is + * parented, otherwise the same value as position. + */ + localAngularVelocity: Vec3; + /** + * The dimensions of the entity. If the entity is parented to an avatar and is + * clientOnly so that it scales with the avatar, this value remains the original dimensions value while the avatar scale changes. + */ + localDimensions: Vec3; + /** + * The axis-aligned bounding box that tightly encloses the entity. + * Read-only. + */ + boundingBox: Entities.BoundingBox; + /** + * The axis-aligned cube that determines where the entity lives in the entity server's octree. + * The cube may be considerably larger than the entity in some situations, e.g., when the entity is grabbed by an avatar: the position of the entity is determined through avatar mixer updates and so the AA cube is expanded in order to reduce unnecessary entity server updates. Scripts should not change this property's value. + */ + queryAACube: AACube; + /** + * Base-64 encoded compressed dump of the actions associated with the entity. This property + * is typically not used in scripts directly; rather, functions that manipulate an entity's actions update it. The size of this property increases with the number of actions. Because this property value has to fit within a High Fidelity datagram packet there is a limit to the number of actions that an entity can have, and edits which would result in overflow are rejected. Read-only. + */ + actionData: string; + /** + * Information on the cost of rendering the entity. Currently information is only + * provided for Model entities. Read-only. + */ + renderInfo: Entities.RenderInfo; + /** + * If true then the entity can be cloned via Entities.cloneEntity. + */ + cloneable: boolean; + /** + * The entity lifetime for clones created from this entity. + */ + cloneLifetime: number; + /** + * The total number of clones of this entity that can exist in the domain at any given time. + */ + cloneLimit: number; + /** + * If true then clones created from this entity will have their + * dynamic property set to true. + */ + cloneDynamic: boolean; + /** + * If true then clones created from this entity will be created as + * avatar entities: their clientOnly property will be set to true. + */ + cloneAvatarEntity: boolean; + /** + * The ID of the entity that this entity was cloned from. + */ + cloneOriginID: Uuid; + /** + * Certifiable name of the Marketplace item. + */ + itemName: string; + /** + * Certifiable description of the Marketplace item. + */ + itemDescription: string; + /** + * Certifiable category of the Marketplace item. + */ + itemCategories: string; + /** + * Certifiable artist that created the Marketplace item. + */ + itemArtist: string; + /** + * Certifiable license URL for the Marketplace item. + */ + itemLicense: string; + /** + * Certifiable maximum integer number of editions (copies) of the Marketplace item + * allowed to be sold. + */ + limitedRun: number; + /** + * Certifiable integer edition (copy) number or the Marketplace item. Each copy sold in + * the Marketplace is numbered sequentially, starting at 1. + */ + editionNumber: number; + /** + * Certifiable integer instance number for identical entities in a Marketplace + * item. A Marketplace item may have identical parts. If so, then each is numbered sequentially with an instance number. + */ + entityInstanceNumber: number; + /** + * Certifiable UUID for the Marketplace item, as used in the URL of the item's download + * and its Marketplace Web page. + */ + marketplaceID: string; + /** + * Hash of the entity's static certificate JSON, signed by the artist's private key. + */ + certificateID: string; + /** + * The version of the method used to generate the certificateID. + */ + staticCertificateVersion: number; + } + + interface EntityProperties-Box { + } + + interface EntityProperties-Light { + /** + * The dimensions of the entity. Entity surface outside these dimensions are not lit + * by the light. + */ + dimensions: Vec3; + /** + * The color of the light emitted. + */ + color: Color; + /** + * The brightness of the light. + */ + intensity: number; + /** + * The distance from the light's center at which intensity is reduced by 25%. + */ + falloffRadius: number; + /** + * If true then the light is directional, emitting along the entity's + * local negative z-axis; otherwise the light is a point light which emanates in all directions. + */ + isSpotlight: boolean; + /** + * Affects the softness of the spotlight beam: the higher the value the softer the beam. + */ + exponent: number; + /** + * Affects the size of the spotlight beam: the higher the value the larger the beam. + */ + cutoff: number; + } + + interface EntityProperties-Line { + /** + * The dimensions of the entity. Must be sufficient to contain all the + * linePoints. + */ + dimensions: Vec3; + /** + * The sequence of points to draw lines between. The values are relative to the entity's + * position. A maximum of 70 points can be specified. The property's value is set only if all the linePoints lie within the entity's dimensions. + */ + linePoints: Array.; + /** + * Currently not used. + */ + lineWidth: number; + /** + * The color of the line. + */ + color: Color; + } + + interface EntityProperties-Material { + /** + * URL to a MaterialResource. If you append ?name to the URL, the + * material with that name in the MaterialResource will be applied to the entity. Alternatively, set the property value to "materialData" to use the materialData property for the MaterialResource values. + */ + materialURL: string; + /** + * The priority for applying the material to its parent. Only the highest priority material is + * applied, with materials of the same priority randomly assigned. Materials that come with the model have a priority of 0. + */ + priority: number; + /** + * Selects the submesh or submeshes within the parent to apply the material + * to. If in the format "mat::string", all submeshes with material name "string" are replaced. Otherwise the property value is parsed as an unsigned integer, specifying the mesh index to modify. Invalid values are parsed to 0. + */ + parentMaterialName: string; + /** + * How the material is mapped to the entity. Either "uv" or + * "projected". Currently, only "uv" is supported. + */ + materialMappingMode: string; + /** + * Offset position in UV-space of the top left of the material, range + * { x: 0, y: 0 } – { x: 1, y: 1 }. + */ + materialMappingPos: Vec2; + /** + * How much to scale the material within the parent's UV-space. + */ + materialMappingScale: Vec2; + /** + * How much to rotate the material within the parent's UV-space, in degrees. + */ + materialMappingRot: number; + /** + * Used to store MaterialResource data as a JSON string. You can use + * JSON.parse() to parse the string into a JavaScript object which you can manipulate the properties of, and use JSON.stringify() to convert the object into a string to put in the property. + */ + materialData: string; + } + + interface EntityProperties-Model { + /** + * The dimensions of the entity. When adding an entity, if no dimensions + * value is specified then the model is automatically sized to its Entities.EntityProperties. + */ + dimensions: Vec3; + /** + * Currently not used. + */ + color: Color; + /** + * The URL of the FBX of OBJ model. Baked FBX models' URLs end in ".baked.fbx". + * Note: If the name ends with "default-image-model.fbx" then the entity is considered to be an "Image" entity, in which case the textures property should be set per the example. + */ + modelURL: string; + /** + * A JSON string of texture name, URL pairs used when rendering the model in place of the + * model's original textures. Use a texture name from the originalTextures property to override that texture. Only the texture names and URLs to be overridden need be specified; original textures are used where there are no overrides. You can use JSON.stringify() to convert a JavaScript object of name, URL pairs into a JSON string. + */ + textures: string; + /** + * A JSON string of texture name, URL pairs used in the model. The property value is + * filled in after the entity has finished rezzing (i.e., textures have loaded). You can use JSON.parse() to parse the JSON string into a JavaScript object of name, URL pairs. Read-only. + */ + originalTextures: string; + /** + * The shape of the collision hull used if collisions are enabled. + */ + shapeType: ShapeType; + /** + * The OBJ file to use for the compound shape if shapeType is + * "compound". + */ + compoundShapeURL: string; + /** + * An animation to play on the model. + */ + animation: Entities.AnimationProperties; + /** + * Joint rotations applied to the model; [] if none are applied or the + * model hasn't loaded. The array indexes are per Entities.getJointIndex. Rotations are relative to each joint's parent. Joint rotations can be set by Entities.setLocalJointRotation and similar functions, or by setting the value of this property. If you set a joint rotation using this property you also need to set the corresponding jointRotationsSet value to true. + */ + jointRotations: Array.; + /** + * true values for joints that have had rotations applied, + * false otherwise; [] if none are applied or the model hasn't loaded. The array indexes are per Entities.getJointIndex. + */ + jointRotationsSet: Array.; + /** + * Joint translations applied to the model; [] if none are applied or + * the model hasn't loaded. The array indexes are per Entities.getJointIndex. Rotations are relative to each joint's parent. Joint translations can be set by Entities.setLocalJointTranslation and similar functions, or by setting the value of this property. If you set a joint translation using this property you also need to set the corresponding jointTranslationsSet value to true. + */ + jointTranslations: Array.; + /** + * true values for joints that have had translations applied, + * false otherwise; [] if none are applied or the model hasn't loaded. The array indexes are per Entities.getJointIndex. + */ + jointTranslationsSet: Array.; + /** + * If true and the entity is parented to an avatar, then the + * avatar's joint rotations are applied to the entity's joints. + */ + relayParentJoints: boolean; + } + + interface EntityProperties-ParticleEffect { + /** + * If true then particles are emitted. + */ + isEmitting: boolean; + /** + * The maximum number of particles to render at one time. Older particles are deleted if + * necessary when new ones are created. + */ + maxParticles: number; + /** + * How long, in seconds, each particle lives. + */ + lifespan: number; + /** + * The number of particles per second to emit. + */ + emitRate: number; + /** + * The speed, in m/s, that each particle is emitted at. + */ + emitSpeed: number; + /** + * The spread in speeds at which particles are emitted at. If emitSpeed == 5 + * and speedSpread == 1, particles will be emitted with speeds in the range 4m/s – 6m/s. + */ + speedSpread: number; + /** + * The acceleration that is applied to each particle during its lifetime. The + * default is Earth's gravity value. + */ + emitAcceleration: vec3; + /** + * The spread in accelerations that each particle is given. If + * emitAccelerations == {x: 0, y: -9.8, z: 0} and accelerationSpread == {x: 0, y: 1, z: 0}, each particle will have an acceleration in the range {x: 0, y: -10.8, z: 0} – {x: 0, y: -8.8, z: 0}. + */ + accelerationSpread: vec3; + /** + * The dimensions of the particle effect, i.e., a bounding box containing all the particles + * during their lifetimes, assuming that emitterShouldTrail is false. Read-only. + */ + dimensions: Vec3; + /** + * If true then particles are "left behind" as the emitter moves, + * otherwise they stay with the entity's dimensions. + */ + emitterShouldTrail: boolean; + /** + * The orientation of particle emission relative to the entity's axes. By + * default, particles emit along the entity's local z-axis, and azimuthStart and azimuthFinish are relative to the entity's local x-axis. The default value is a rotation of -90 degrees about the local x-axis, i.e., the particles emit vertically. + */ + emitOrientation: Quat; + /** + * The dimensions of the ellipsoid from which particles are emitted. + */ + emitDimensions: vec3; + /** + * The starting radius within the ellipsoid at which particles start being emitted; + * range 0.0 – 1.0 for the ellipsoid center to the ellipsoid surface, respectively. Particles are emitted from the portion of the ellipsoid that lies between emitRadiusStart and the ellipsoid's surface. + */ + emitRadiusStart: number; + /** + * The angle in radians from the entity's local z-axis at which particles start being emitted + * within the ellipsoid; range 0 – Math.PI. Particles are emitted from the portion of the ellipsoid that lies between polarStart and polarFinish. + */ + polarStart: number; + /** + * The angle in radians from the entity's local z-axis at which particles stop being emitted + * within the ellipsoid; range 0 – Math.PI. Particles are emitted from the portion of the ellipsoid that lies between polarStart and polarFinish. + */ + polarFinish: number; + /** + * The angle in radians from the entity's local x-axis about the entity's local + * z-axis at which particles start being emitted; range -Math.PI – Math.PI. Particles are emitted from the portion of the ellipsoid that lies between azimuthStart and azimuthFinish. + */ + azimuthStart: number; + /** + * The angle in radians from the entity's local x-axis about the entity's local + * z-axis at which particles stop being emitted; range -Math.PI – Math.PI. Particles are emitted from the portion of the ellipsoid that lies between azimuthStart and azimuthFinish. + */ + azimuthFinish: number; + /** + * The URL of a JPG or PNG image file to display for each particle. If you want transparency, + * use PNG format. + */ + textures: string; + /** + * The radius of each particle at the middle of its life. + */ + particleRadius: number; + /** + * The radius of each particle at the start of its life. If NaN, the + * particleRadius value is used. + */ + radiusStart: number; + /** + * The radius of each particle at the end of its life. If NaN, the + * particleRadius value is used. + */ + radiusFinish: number; + /** + * The spread in radius that each particle is given. If particleRadius == 0.5 + * and radiusSpread == 0.25, each particle will have a radius in the range 0.25 – 0.75. + */ + radiusSpread: number; + /** + * The color of each particle at the middle of its life. + */ + color: Color; + /** + * The color of each particle at the start of its life. If any of the component values are + * undefined, the color value is used. + */ + colorStart: Color; + /** + * The color of each particle at the end of its life. If any of the component values are + * undefined, the color value is used. + */ + colorFinish: Color; + /** + * The spread in color that each particle is given. If + * color == {red: 100, green: 100, blue: 100} and colorSpread == {red: 10, green: 25, blue: 50}, each particle will have a color in the range {red: 90, green: 75, blue: 50} – {red: 110, green: 125, blue: 150}. + */ + colorSpread: Color; + /** + * The alpha of each particle at the middle of its life. + */ + alpha: number; + /** + * The alpha of each particle at the start of its life. If NaN, the + * alpha value is used. + */ + alphaStart: number; + /** + * The alpha of each particle at the end of its life. If NaN, the + * alpha value is used. + */ + alphaFinish: number; + /** + * The spread in alpha that each particle is given. If alpha == 0.5 + * and alphaSpread == 0.25, each particle will have an alpha in the range 0.25 – 0.75. + */ + alphaSpread: number; + /** + * The spin of each particle at the middle of its life. In the range -2*PI – 2*PI. + */ + particleSpin: number; + /** + * The spin of each particle at the start of its life. In the range -2*PI – 2*PI. + * If NaN, the particleSpin value is used. + */ + spinStart: number; + /** + * The spin of each particle at the end of its life. In the range -2*PI – 2*PI. + * If NaN, the particleSpin value is used. + */ + spinFinish: number; + /** + * The spread in spin that each particle is given. In the range 0 – 2*PI. If particleSpin == PI + * and spinSpread == PI/2, each particle will have a spin in the range PI/2 – 3*PI/2. + */ + spinSpread: number; + /** + * Whether or not the particles' spin will rotate with the entity. If false, when particleSpin == 0, the particles will point + * up in the world. If true, they will point towards the entity's up vector, based on its orientation. + */ + rotateWithEntity: boolean; + /** + * Currently not used. Read-only. + */ + shapeType: ShapeType; + } + + interface EntityProperties-PolyLine { + /** + * The dimensions of the entity, i.e., the size of the bounding box that contains the + * lines drawn. + */ + dimensions: Vec3; + /** + * The sequence of points to draw lines between. The values are relative to the entity's + * position. A maximum of 70 points can be specified. Must be specified in order for the entity to render. + */ + linePoints: Array.; + /** + * The normal vectors for the line's surface at the linePoints. The values are + * relative to the entity's orientation. Must be specified in order for the entity to render. + */ + normals: Array.; + /** + * The widths, in m, of the line at the linePoints. Must be specified in + * order for the entity to render. + */ + strokeWidths: Array.; + /** + * Currently not used. + */ + lineWidth: number; + /** + * Currently not used. + */ + strokeColors: Array.; + /** + * The base color of the line, which is multiplied with the color of the texture for + * rendering. + */ + color: Color; + /** + * The URL of a JPG or PNG texture to use for the lines. If you want transparency, use PNG + * format. + */ + textures: string; + /** + * If true, the texture is stretched to fill the whole line, otherwise + * the texture repeats along the line. + */ + isUVModeStretch: boolean; + } + + interface EntityProperties-PolyVox { + /** + * The dimensions of the entity. + */ + dimensions: Vec3; + /** + * Integer number of voxels along each axis of the entity, in the range + * 1,1,1 to 128,128,128. The dimensions of each voxel is dimensions / voxelVolumesize. + */ + voxelVolumeSize: Vec3; + /** + * Base-64 encoded compressed dump of + * the PolyVox data. This property is typically not used in scripts directly; rather, functions that manipulate a PolyVox entity update it. The size of this property increases with the size and complexity of the PolyVox entity, with the size depending on how the particular entity's voxels compress. Because this property value has to fit within a High Fidelity datagram packet there is a limit to the size and complexity of a PolyVox entity, and edits which would result in an overflow are rejected. + */ + voxelData: string; + /** + * The style of rendering the voxels' surface and how + * neighboring PolyVox entities are joined. + */ + voxelSurfaceStyle: Entities.PolyVoxSurfaceStyle; + /** + * URL of the texture to map to surfaces perpendicular to the entity's local x-axis. JPG or + * PNG format. If no texture is specified the surfaces display white. + */ + xTextureURL: string; + /** + * URL of the texture to map to surfaces perpendicular to the entity's local y-axis. JPG or + * PNG format. If no texture is specified the surfaces display white. + */ + yTextureURL: string; + /** + * URL of the texture to map to surfaces perpendicular to the entity's local z-axis. JPG or + * PNG format. If no texture is specified the surfaces display white. + */ + zTextureURL: string; + /** + * ID of the neighboring PolyVox entity in the entity's -ve local x-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + xNNeighborID: Uuid; + /** + * ID of the neighboring PolyVox entity in the entity's -ve local y-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + yNNeighborID: Uuid; + /** + * ID of the neighboring PolyVox entity in the entity's -ve local z-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + zNNeighborID: Uuid; + /** + * ID of the neighboring PolyVox entity in the entity's +ve local x-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + xPNeighborID: Uuid; + /** + * ID of the neighboring PolyVox entity in the entity's +ve local y-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + yPNeighborID: Uuid; + /** + * ID of the neighboring PolyVox entity in the entity's +ve local z-axis direction, + * if you want them joined. Set to Uuid if there is none or you don't want to join them. + */ + zPNeighborID: Uuid; + } + + interface EntityProperties-Shape { + /** + * The shape of the entity. + */ + shape: Entities.Shape; + /** + * The dimensions of the entity. + */ + dimensions: Vec3; + /** + * The color of the entity. + */ + color: Color; + } + + interface EntityProperties-Sphere { + } + + interface EntityProperties-Text { + /** + * The dimensions of the entity. + */ + dimensions: Vec3; + /** + * The text to display on the face of the entity. Text wraps if necessary to fit. New lines can be + * created using \n. Overflowing lines are not displayed. + */ + text: string; + /** + * The height of each line of text (thus determining the font size). + */ + lineHeight: number; + /** + * The color of the text. + */ + textColor: Color; + /** + * The color of the background rectangle. + */ + backgroundColor: Color; + /** + * If true, the entity is oriented to face each user's camera (i.e., it + * differs for each user present). + */ + faceCamera: boolean; + } + + interface EntityProperties-Web { + /** + * The dimensions of the entity. + */ + dimensions: Vec3; + /** + * The URL of the Web page to display. This value does not change as you or others navigate + * on the Web entity. + */ + sourceUrl: string; + /** + * The resolution to display the page at, in dots per inch. If you convert this to dots per meter + * (multiply by 1 / 0.0254 = 39.3701) then multiply dimensions.x and dimensions.y by that value you get the resolution in pixels. + */ + dpi: number; + } + + interface EntityProperties-Zone { + /** + * The size of the volume in which the zone's lighting effects and avatar permissions + * have effect. + */ + dimensions: Vec3; + /** + * The shape of the volume in which the zone's lighting effects and avatar + * permissions have effect. Reverts to the default value if set to "none", or set to "compound" and compoundShapeURL is "". + */ + shapeType: ShapeType; + /** + * The OBJ file to use for the compound shape if shapeType is + * "compound". + */ + compoundShapeURL: string; + /** + * Configures the key light in the zone. Possible values: + * "inherit": The key light from any enclosing zone continues into this zone. "disabled": The key light from any enclosing zone and the key light of this zone are disabled in this zone. "enabled": The key light properties of this zone are enabled, overriding the key light of from any enclosing zone. + */ + keyLightMode: string; + /** + * The key light properties of the zone. + */ + keyLight: Entities.KeyLight; + /** + * Configures the ambient light in the zone. Possible values: + * "inherit": The ambient light from any enclosing zone continues into this zone. "disabled": The ambient light from any enclosing zone and the ambient light of this zone are disabled in this zone. "enabled": The ambient light properties of this zone are enabled, overriding the ambient light from any enclosing zone. + */ + ambientLightMode: string; + /** + * The ambient light properties of the zone. + */ + ambientLight: Entities.AmbientLight; + /** + * Configures the skybox displayed in the zone. Possible values: + * "inherit": The skybox from any enclosing zone is dislayed in this zone. "disabled": The skybox from any enclosing zone and the skybox of this zone are disabled in this zone. "enabled": The skybox properties of this zone are enabled, overriding the skybox from any enclosing zone. + */ + skyboxMode: string; + /** + * The skybox properties of the zone. + */ + skybox: Entities.Skybox; + /** + * Configures the haze in the zone. Possible values: + * "inherit": The haze from any enclosing zone continues into this zone. "disabled": The haze from any enclosing zone and the haze of this zone are disabled in this zone. "enabled": The haze properties of this zone are enabled, overriding the haze from any enclosing zone. + */ + hazeMode: string; + /** + * The haze properties of the zone. + */ + haze: Entities.Haze; + /** + * Configures the bloom in the zone. Possible values: + * "inherit": The bloom from any enclosing zone continues into this zone. "disabled": The bloom from any enclosing zone and the bloom of this zone are disabled in this zone. "enabled": The bloom properties of this zone are enabled, overriding the bloom from any enclosing zone. + */ + bloomMode: string; + /** + * The bloom properties of the zone. + */ + bloom: Entities.Bloom; + /** + * If true then visitors can fly in the zone; otherwise they cannot. + */ + flyingAllowed: boolean; + /** + * If true then visitors with avatar collisions turned off will not + * collide with content in the zone; otherwise visitors will always collide with content in the zone. + */ + ghostingAllowed: boolean; + /** + * The URL of a JavaScript file that filters changes to properties of entities within the + * zone. It is periodically executed for each entity in the zone. It can, for example, be used to not allow changes to certain properties. function filter(properties) { // Test and edit properties object values, // e.g., properties.modelURL, as required. return properties; } + */ + filterURL: string; + } + + interface BoundingBox { + /** + * The bottom right near (minimum axes values) corner of the AA box. + */ + brn: Vec3; + /** + * The top far left (maximum axes values) corner of the AA box. + */ + tfl: Vec3; + /** + * The center of the AA box. + */ + center: Vec3; + /** + * The dimensions of the AA box. + */ + dimensions: Vec3; + } + + interface RenderInfo { + /** + * The number of vertices in the entity. + */ + verticesCount: number; + /** + * The number of textures in the entity. + */ + texturesCount: number; + /** + * The total size of the textures in the entity, in bytes. + */ + textureSize: number; + /** + * Is true if any of the textures has transparency. + */ + hasTransparent: boolean; + /** + * The number of draw calls required to render the entity. + */ + drawCalls: number; + } + + interface RayToEntityIntersectionResult { + /** + * true if the PickRay intersected an entity, otherwise + * false. + */ + intersects: boolean; + /** + * Is always true. + */ + accurate: boolean; + /** + * The ID if the entity intersected, if any, otherwise null. + */ + entityID: Uuid; + /** + * The distance from the PickRay origin to the intersection point. + */ + distance: number; + /** + * The intersection point. + */ + intersection: Vec3; + /** + * The surface normal of the entity at the intersection point. + */ + surfaceNormal: Vec3; + /** + * The face of the entity's axis-aligned box that the ray intersects. + */ + face: BoxFace; + /** + * Extra information depending on the entity intersected. Currently, only Model + * entities provide extra information, and the information provided depends on the precisionPicking parameter value that the search function was called with. + */ + extraInfo: object; + } + + /** + * Get the properties of multiple entities. + * @param entityIDs {Array.} The IDs of the entities to get the properties of. + * @param desiredProperties {Array.} [desiredProperties=[]] Either string with property name or array of the names of the properties + * to get. If the array is empty, all properties are returned. + * @returns {Array.} + */ + function getMultipleEntityProperties(entityIDs: Array., desiredProperties: Array.): Array.; + /** + * Check whether or not you can change the locked property of entities. Locked entities have their + * locked property set to true and cannot be edited or deleted. Whether or not you can change entities' locked properties is configured in the domain server's permissions. + * @returns {boolean} + */ + function canAdjustLocks(): boolean; + /** + * Check whether or not you can rez (create) new entities in the domain. + * @returns {boolean} + */ + function canRez(): boolean; + /** + * Check whether or not you can rez (create) new temporary entities in the domain. Temporary entities are entities with a + * finite lifetime property value set. + * @returns {boolean} + */ + function canRezTmp(): boolean; + /** + * Check whether or not you can rez (create) new certified entities in the domain. Certified entities are entities that have + * PoP certificates. + * @returns {boolean} + */ + function canRezCertified(): boolean; + /** + * Check whether or not you can rez (create) new temporary certified entities in the domain. Temporary entities are entities + * with a finite lifetime property value set. Certified entities are entities that have PoP certificates. + * @returns {boolean} + */ + function canRezTmpCertified(): boolean; + /** + * Check whether or not you can make changes to the asset server's assets. + * @returns {boolean} + */ + function canWriteAssets(): boolean; + /** + * Check whether or not you can replace the domain's content set. + * @returns {boolean} + */ + function canReplaceContent(): boolean; + /** + * Add a new entity with specified properties. + * @param properties {Entities.EntityProperties} The properties of the entity to create. + * @param clientOnly {boolean} [clientOnly=false] If true, or if clientOnly is set true in + * the properties, the entity is created as an avatar entity; otherwise it is created on the server. An avatar entity follows you to each domain you visit, rendering at the same world coordinates unless it's parented to your avatar. + * @returns {Uuid} + */ + function addEntity(properties: Entities.EntityProperties, clientOnly: boolean): Uuid; + /** + * Create a clone of an entity. A clone can be created by a client that doesn't have rez permissions in the current domain. + * The entity must have its cloneable property set to true. The clone has a modified name, other properties set per its clone related-properties, and its clone-related properties are set to defaults. + * @param entityID {Uuid} The ID of the entity to clone. + * @returns {Uuid} + */ + function cloneEntity(entityID: Uuid): Uuid; + /** + * Get the properties of an entity. + * @param entityID {Uuid} The ID of the entity to get the properties of. + * @param desiredProperties {Array.} [desiredProperties=[]] Array of the names of the properties to get. If the array is empty, + * all properties are returned. + * @returns {Entities.EntityProperties} + */ + function getEntityProperties(entityID: Uuid, desiredProperties: Array.): Entities.EntityProperties; + /** + * Update an entity with specified properties. + * @param entityID {Uuid} The ID of the entity to edit. + * @param properties {Entities.EntityProperties} The properties to update the entity with. + * @returns {Uuid} + */ + function editEntity(entityID: Uuid, properties: Entities.EntityProperties): Uuid; + /** + * Delete an entity. + * @param entityID {Uuid} The ID of the entity to delete. + */ + function deleteEntity(entityID: Uuid): void; + /** + * Call a method in a client entity script from a client script or client entity script, or call a method in a server + * entity script from a server entity script. The entity script method must be exposed as a property in the target client entity script. Additionally, if calling a server entity script, the server entity script must include the method's name in an exposed property called remotelyCallable that is an array of method names that can be called. + * @param entityID {Uuid} The ID of the entity to call the method in. + * @param method {string} The name of the method to call. + * @param parameters {Array.} [parameters=[]] The parameters to call the specified method with. + */ + function callEntityMethod(entityID: Uuid, method: string, parameters: Array.): void; + /** + * Call a method in a server entity script from a client script or client entity script. The entity script method must be + * exposed as a property in the target server entity script. Additionally, the target server entity script must include the method's name in an exposed property called remotelyCallable that is an array of method names that can be called. + * @param entityID {Uuid} The ID of the entity to call the method in. + * @param method {string} The name of the method to call. + * @param parameters {Array.} [parameters=[]] The parameters to call the specified method with. + */ + function callEntityServerMethod(entityID: Uuid, method: string, parameters: Array.): void; + /** + * Call a method in a specific user's client entity script from a server entity script. The entity script method must be + * exposed as a property in the target client entity script. + * @param clientSessionID {Uuid} The session ID of the user to call the method in. + * @param entityID {Uuid} The ID of the entity to call the method in. + * @param method {string} The name of the method to call. + * @param parameters {Array.} [parameters=[]] The parameters to call the specified method with. + */ + function callEntityClientMethod(clientSessionID: Uuid, entityID: Uuid, method: string, parameters: Array.): void; + /** + * Find the entity with a position closest to a specified point and within a specified radius. + * @param center {Vec3} The point about which to search. + * @param radius {number} The radius within which to search. + * @returns {Uuid} + */ + function findClosestEntity(center: Vec3, radius: number): Uuid; + /** + * Find all entities that intersect a sphere defined by a center point and radius. + * @param center {Vec3} The point about which to search. + * @param radius {number} The radius within which to search. + * @returns {Array.} + */ + function findEntities(center: Vec3, radius: number): Array.; + /** + * Find all entities whose axis-aligned boxes intersect a search axis-aligned box defined by its minimum coordinates corner + * and dimensions. + * @param corner {Vec3} The corner of the search AA box with minimum co-ordinate values. + * @param dimensions {Vec3} The dimensions of the search AA box. + * @returns {Array.} + */ + function findEntitiesInBox(corner: Vec3, dimensions: Vec3): Array.; + /** + * Find all entities whose axis-aligned boxes intersect a search frustum. + * @param frustum {ViewFrustum} The frustum to search in. The position, orientation, + * projection, and centerRadius properties must be specified. + * @returns {Array.} + */ + function findEntitiesInFrustum(frustum: ViewFrustum): Array.; + /** + * Find all entities of a particular type that intersect a sphere defined by a center point and radius. + * @param entityType {Entities.EntityType} The type of entity to search for. + * @param center {Vec3} The point about which to search. + * @param radius {number} The radius within which to search. + * @returns {Array.} + */ + function findEntitiesByType(entityType: Entities.EntityType, center: Vec3, radius: number): Array.; + /** + * Find all entities of a particular name that intersect a sphere defined by a center point and radius. + * @param entityName {string} The name of the entity to search for. + * @param center {Vec3} The point about which to search. + * @param radius {number} The radius within which to search. + * @param caseSensitive {boolean} [caseSensitive=false] If true then the search is case-sensitive. + * @returns {Array.} + */ + function findEntitiesByName(entityName: string, center: Vec3, radius: number, caseSensitive: boolean): Array.; + /** + * Find the first entity intersected by a PickRay. Light and Zone entities are not + * intersected unless they've been configured as pickable using Entities.setLightsArePickable and Entities.setZonesArePickable, respectively. + * @param pickRay {PickRay} The PickRay to use for finding entities. + * @param precisionPicking {boolean} [precisionPicking=false] If true and the intersected entity is a Model + * entity, the result's extraInfo property includes more information than it otherwise would. + * @param entitiesToInclude {Array.} [entitiesToInclude=[]] If not empty then the search is restricted to these entities. + * @param entitiesToDiscard {Array.} [entitiesToDiscard=[]] Entities to ignore during the search. + * @param visibleOnly {boolean} [visibleOnly=false] If true then only entities that are + * {@link Entities.EntityProperties|visible} are searched. + * @param collideableOnly {boolean} [collideableOnly=false] If true then only entities that are not + * {@link Entities.EntityProperties|collisionless} are searched. + * @returns {Entities.RayToEntityIntersectionResult} + */ + function findRayIntersection(pickRay: PickRay, precisionPicking: boolean, entitiesToInclude: Array., entitiesToDiscard: Array., visibleOnly: boolean, collideableOnly: boolean): Entities.RayToEntityIntersectionResult; + /** + * Find the first entity intersected by a PickRay. Light and Zone entities are not + * intersected unless they've been configured as pickable using Entities.setLightsArePickable and Entities.setZonesArePickable, respectively. This is a synonym for Entities.findRayIntersection. + * @param pickRay {PickRay} The PickRay to use for finding entities. + * @param precisionPicking {boolean} [precisionPicking=false] If true and the intersected entity is a Model + * entity, the result's extraInfo property includes more information than it otherwise would. + * @param entitiesToInclude {Array.} [entitiesToInclude=[]] If not empty then the search is restricted to these entities. + * @param entitiesToDiscard {Array.} [entitiesToDiscard=[]] Entities to ignore during the search. + */ + function findRayIntersectionBlocking(pickRay: PickRay, precisionPicking: boolean, entitiesToInclude: Array., entitiesToDiscard: Array.): void; + /** + * Reloads an entity's server entity script such that the latest version re-downloaded. + * @param entityID {Uuid} The ID of the entity to reload the server entity script of. + * @returns {boolean} + */ + function reloadServerScripts(entityID: Uuid): boolean; + /** + * Gets the status of server entity script attached to an entity + * @param entityID {Uuid} The ID of the entity to get the server entity script status for. + * @param callback {Entities~getServerScriptStatusCallback} The function to call upon completion. + * @returns {boolean} + */ + function getServerScriptStatus(entityID: Uuid, callback: Entities~getServerScriptStatusCallback): boolean; + /** + * Get metadata for certain entity properties such as script and serverScripts. + * @param entityID {Uuid} The ID of the entity to get the metadata for. + * @param property {string} The property name to get the metadata for. + * @param callback {Entities~queryPropertyMetadataCallback} The function to call upon completion. + * @returns {boolean} + */ + function queryPropertyMetadata(entityID: Uuid, property: string, callback: Entities~queryPropertyMetadataCallback): boolean; + /** + * Get metadata for certain entity properties such as script and serverScripts. + * @param entityID {Uuid} The ID of the entity to get the metadata for. + * @param property {string} The property name to get the metadata for. + * @param scope {object} The "this" context that the callback will be executed within. + * @param callback {Entities~queryPropertyMetadataCallback} The function to call upon completion. + * @returns {boolean} + */ + function queryPropertyMetadata(entityID: Uuid, property: string, scope: object, callback: Entities~queryPropertyMetadataCallback): boolean; + /** + * Set whether or not ray picks intersect the bounding box of Entities.EntityType entities. By default, Light + * entities are not intersected. The setting lasts for the Interface session. Ray picks are done using Entities.findRayIntersection or Entities.findRayIntersectionBlocking, or the Picks and RayPick APIs. + * @param value {boolean} Set true to make ray picks intersect the bounding box of + * {@link Entities.EntityType|Light} entities, otherwise false. + */ + function setLightsArePickable(value: boolean): void; + /** + * Get whether or not ray picks intersect the bounding box of Entities.EntityType entities. Ray picks are + * done using Entities.findRayIntersection or Entities.findRayIntersectionBlocking, or the Picks and RayPick APIs. + * @returns {boolean} + */ + function getLightsArePickable(): boolean; + /** + * Set whether or not ray picks intersect the bounding box of Entities.EntityType entities. By default, Light + * entities are not intersected. The setting lasts for the Interface session. Ray picks are done using Entities.findRayIntersection or Entities.findRayIntersectionBlocking, or the Picks and RayPick APIs. + * @param value {boolean} Set true to make ray picks intersect the bounding box of + * {@link Entities.EntityType|Zone} entities, otherwise false. + */ + function setZonesArePickable(value: boolean): void; + /** + * Get whether or not ray picks intersect the bounding box of Entities.EntityType entities. Ray picks are + * done using Entities.findRayIntersection or Entities.findRayIntersectionBlocking, or the Picks and RayPick APIs. + * @returns {boolean} + */ + function getZonesArePickable(): boolean; + /** + * Set whether or not Entities.EntityType entities' boundaries should be drawn. Currently not used. + * @param value {boolean} Set to true if {@link Entities.EntityType|Zone} entities' boundaries should be + * drawn, otherwise false. + */ + function setDrawZoneBoundaries(value: boolean): void; + /** + * Get whether or not Entities.EntityType entities' boundaries should be drawn. Currently not used. + * @returns {boolean} + */ + function getDrawZoneBoundaries(): boolean; + /** + * Set the values of all voxels in a spherical portion of a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param center {Vec3} The center of the sphere of voxels to set, in world coordinates. + * @param radius {number} The radius of the sphere of voxels to set, in world coordinates. + * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. + */ + function setVoxelSphere(entityID: Uuid, center: Vec3, radius: number, value: number): void; + /** + * Set the values of all voxels in a capsule-shaped portion of a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param start {Vec3} The center of the sphere of voxels to set, in world coordinates. + * @param end {Vec3} The center of the sphere of voxels to set, in world coordinates. + * @param radius {number} The radius of the capsule cylinder and spherical ends, in world coordinates. + * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. + */ + function setVoxelCapsule(entityID: Uuid, start: Vec3, end: Vec3, radius: number, value: number): void; + /** + * Set the value of a particular voxels in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param position {Vec3} The position relative to the minimum axes values corner of the entity. The + * position coordinates are rounded to the nearest integer to get the voxel coordinate. The minimum axes corner voxel is { x: 0, y: 0, z: 0 }. + * @param value {number} If value % 256 == 0 then voxel is cleared, otherwise the voxel is set. + */ + function setVoxel(entityID: Uuid, position: Vec3, value: number): void; + /** + * Set the values of all voxels in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. + */ + function setAllVoxels(entityID: Uuid, value: number): void; + /** + * Set the values of all voxels in a cubic portion of a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param lowPosition {Vec3} The position of the minimum axes value corner of the cube of voxels to set, in voxel + * coordinates. + * @param cuboidSize {Vec3} The size of the cube of voxels to set, in voxel coordinates. + * @param value {number} If value % 256 == 0 then each voxel is cleared, otherwise each voxel is set. + */ + function setVoxelsInCuboid(entityID: Uuid, lowPosition: Vec3, cuboidSize: Vec3, value: number): void; + /** + * Convert voxel coordinates in a Entities.EntityType entity to world coordinates. Voxel coordinates are + * relative to the minimum axes values corner of the entity with a scale of Vec3.ONE being the dimensions of each voxel. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param voxelCoords {Vec3} The voxel coordinates. May be fractional and outside the entity's bounding box. + * @returns {Vec3} + */ + function voxelCoordsToWorldCoords(entityID: Uuid, voxelCoords: Vec3): Vec3; + /** + * Convert world coordinates to voxel coordinates in a Entities.EntityType entity. Voxel coordinates are + * relative to the minimum axes values corner of the entity, with a scale of Vec3.ONE being the dimensions of each voxel. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param worldCoords {Vec3} The world coordinates. May be outside the entity's bounding box. + * @returns {Vec3} + */ + function worldCoordsToVoxelCoords(entityID: Uuid, worldCoords: Vec3): Vec3; + /** + * Convert voxel coordinates in a Entities.EntityType entity to local coordinates relative to the minimum + * axes value corner of the entity, with the scale being the same as world coordinates. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param voxelCoords {Vec3} The voxel coordinates. May be fractional and outside the entity's bounding box. + * @returns {Vec3} + */ + function voxelCoordsToLocalCoords(entityID: Uuid, voxelCoords: Vec3): Vec3; + /** + * Convert local coordinates to voxel coordinates in a Entities.EntityType entity. Local coordinates are + * relative to the minimum axes value corner of the entity, with the scale being the same as world coordinates. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|PolyVox} entity. + * @param localCoords {Vec3} The local coordinates. May be outside the entity's bounding box. + * @returns {Vec3} + */ + function localCoordsToVoxelCoords(entityID: Uuid, localCoords: Vec3): Vec3; + /** + * Set the linePoints property of a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Line} entity. + * @param points {Array.} The array of points to set the entity's linePoints property to. + * @returns {boolean} + */ + function setAllPoints(entityID: Uuid, points: Array.): boolean; + /** + * Append a point to a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Line} entity. + * @param point {Vec3} The point to add to the line. The coordinates are relative to the entity's position. + * @returns {boolean} + */ + function appendPoint(entityID: Uuid, point: Vec3): boolean; + /** + * Dumps debug information about all entities in Interface's local in-memory tree of entities it knows about — domain + * and client-only — to the program log. + */ + function dumpTree(): void; + /** + * Add an action to an entity. An action is registered with the physics engine and is applied every physics simulation + * step. Any entity may have more than one action associated with it, but only as many as will fit in an entity's actionData property. + * @param actionType {Entities.ActionType} The type of action. + * @param entityID {Uuid} The ID of the entity to add the action to. + * @param arguments {Entities.ActionArguments} Configure the action. + * @returns {Uuid} + */ + function addAction(actionType: Entities.ActionType, entityID: Uuid, arguments: Entities.ActionArguments): Uuid; + /** + * Update an entity action. + * @param entityID {Uuid} The ID of the entity with the action to update. + * @param actionID {Uuid} The ID of the action to update. + * @param arguments {Entities.ActionArguments} The arguments to update. + * @returns {boolean} + */ + function updateAction(entityID: Uuid, actionID: Uuid, arguments: Entities.ActionArguments): boolean; + /** + * Delete an action from an entity. + * @param entityID {Uuid} The ID of entity to delete the action from. + * @param actionID {Uuid} The ID of the action to delete. + * @returns {boolean} + */ + function deleteAction(entityID: Uuid, actionID: Uuid): boolean; + /** + * Get the IDs of the actions that are associated with an entity. + * @param entityID {Uuid} The entity to get the action IDs for. + * @returns {Array.} + */ + function getActionIDs(entityID: Uuid): Array.; + /** + * Get the arguments of an action. + * @param entityID {Uuid} The ID of the entity with the action. + * @param actionID {Uuid} The ID of the action to get the arguments of. + * @returns {Entities.ActionArguments} + */ + function getActionArguments(entityID: Uuid, actionID: Uuid): Entities.ActionArguments; + /** + * Get the translation of a joint in a Entities.EntityType entity relative to the entity's position and + * orientation. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @returns {Vec3} + */ + function getAbsoluteJointTranslationInObjectFrame(entityID: Uuid, jointIndex: number): Vec3; + /** + * Get the translation of a joint in a Entities.EntityType entity relative to the entity's position and + * orientation. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @returns {Quat} + */ + function getAbsoluteJointRotationInObjectFrame(entityID: Uuid, jointIndex: number): Quat; + /** + * Set the translation of a joint in a Entities.EntityType entity relative to the entity's position and + * orientation. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @param translation {Vec3} The translation to set the joint to relative to the entity's position and orientation. + * @returns {boolean} + */ + function setAbsoluteJointTranslationInObjectFrame(entityID: Uuid, jointIndex: number, translation: Vec3): boolean; + /** + * Set the rotation of a joint in a Entities.EntityType entity relative to the entity's position and + * orientation. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @param rotation {Quat} The rotation to set the joint to relative to the entity's orientation. + * @returns {boolean} + */ + function setAbsoluteJointRotationInObjectFrame(entityID: Uuid, jointIndex: number, rotation: Quat): boolean; + /** + * Get the local translation of a joint in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @returns {Vec3} + */ + function getLocalJointTranslation(entityID: Uuid, jointIndex: number): Vec3; + /** + * Get the local rotation of a joint in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @returns {Quat} + */ + function getLocalJointRotation(entityID: Uuid, jointIndex: number): Quat; + /** + * Set the local translation of a joint in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @param translation {Vec3} The local translation to set the joint to. + * @returns {boolean} + */ + function setLocalJointTranslation(entityID: Uuid, jointIndex: number, translation: Vec3): boolean; + /** + * Set the local rotation of a joint in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param jointIndex {number} The integer index of the joint. + * @param rotation {Quat} The local rotation to set the joint to. + * @returns {boolean} + */ + function setLocalJointRotation(entityID: Uuid, jointIndex: number, rotation: Quat): boolean; + /** + * Set the local translations of joints in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param translations {Array.} The local translations to set the joints to. + * @returns {boolean} + */ + function setLocalJointTranslations(entityID: Uuid, translations: Array.): boolean; + /** + * Set the local rotations of joints in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param rotations {Array.} The local rotations to set the joints to. + * @returns {boolean} + */ + function setLocalJointRotations(entityID: Uuid, rotations: Array.): boolean; + /** + * Set the local rotations and translations of joints in a Entities.EntityType entity. This is the same as + * calling both Entities.setLocalJointRotations and Entities.setLocalJointTranslations at the same time. + * @param entityID {Uuid} The ID of the entity. + * @param rotations {Array.} The local rotations to set the joints to. + * @param translations {Array.} The local translations to set the joints to. + * @returns {boolean} + */ + function setLocalJointsData(entityID: Uuid, rotations: Array., translations: Array.): boolean; + /** + * Get the index of a named joint in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the entity. + * @param name {string} The name of the joint. + * @returns {number} + */ + function getJointIndex(entityID: Uuid, name: string): number; + /** + * Get the names of all the joints in a Entities.EntityType entity. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Model} entity. + * @returns {Array.} + */ + function getJointNames(entityID: Uuid): Array.; + /** + * Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model. Recurse on the IDs returned by the function to get all descendants of an entity, overlay, or avatar. + * @param parentID {Uuid} The ID of the entity, overlay, or avatar to get the children IDs of. + * @returns {Array.} + */ + function getChildrenIDs(parentID: Uuid): Array.; + /** + * Get the IDs of entities, overlays, and avatars that are directly parented to an entity, overlay, or avatar model's joint. + * @param parentID {Uuid} The ID of the entity, overlay, or avatar to get the children IDs of. + * @param jointIndex {number} Integer number of the model joint to get the children IDs of. + * @returns {Array.} + */ + function getChildrenIDsOfJoint(parentID: Uuid, jointIndex: number): Array.; + /** + * Check whether an entity or overlay has an entity as an ancestor (parent, parent's parent, etc.). + * @param childID {Uuid} The ID of the child entity or overlay to test for being a child, grandchild, etc. + * @param parentID {Uuid} The ID of the parent entity to test for being a parent, grandparent, etc. + * @returns {boolean} + */ + function isChildOfParent(childID: Uuid, parentID: Uuid): boolean; + /** + * Get the type — entity, overlay, or avatar — of an in-world item. + * @param entityID {Uuid} The ID of the item to get the type of. + * @returns {string} + */ + function getNestableType(entityID: Uuid): string; + /** + * Get the ID of the Entities.EntityType entity that has keyboard focus. + * @returns {Uuid} + */ + function getKeyboardFocusEntity(): Uuid; + /** + * Set the Entities.EntityType entity that has keyboard focus. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Web} entity to set keyboard focus to. Use + * null or {@link Uuid|Uuid.NULL} to unset keyboard focus from an entity. + */ + function setKeyboardFocusEntity(entityID: Uuid): void; + /** + * Emit a Entities.mousePressOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendMousePressOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.mouseMoveOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendMouseMoveOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.mouseReleaseOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendMouseReleaseOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.clickDownOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendClickDownOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.holdingClickOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendHoldingClickOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.clickReleaseOnEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendClickReleaseOnEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.hoverEnterEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendHoverEnterEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.hoverOverEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendHoverOverEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Emit a Entities.hoverLeaveEntity event. + * @param entityID {Uuid} The ID of the entity to emit the event for. + * @param event {PointerEvent} The event details. + */ + function sendHoverLeaveEntity(entityID: Uuid, event: PointerEvent): void; + /** + * Check whether an entity wants hand controller pointer events. For example, a Entities.EntityType entity does + * but a Entities.EntityType entity doesn't. + * @param entityID {Uuid} The ID of the entity. + * @returns {boolean} + */ + function wantsHandControllerPointerEvents(entityID: Uuid): boolean; + /** + * Send a script event over a Entities.EntityType entity's EventBridge to the Web page's scripts. + * @param entityID {Uuid} The ID of the {@link Entities.EntityType|Web} entity. + * @param message {string} The message to send. + */ + function emitScriptEvent(entityID: Uuid, message: string): void; + /** + * Check whether an axis-aligned box and a capsule intersect. + * @param brn {Vec3} The bottom right near (minimum axes values) corner of the AA box. + * @param dimensions {Vec3} The dimensions of the AA box. + * @param start {Vec3} One end of the capsule. + * @param end {Vec3} The other end of the capsule. + * @param radius {number} The radiues of the capsule. + * @returns {boolean} + */ + function AABoxIntersectsCapsule(brn: Vec3, dimensions: Vec3, start: Vec3, end: Vec3, radius: number): boolean; + /** + * Get the meshes in a Entities.EntityType or Entities.EntityType entity. + * @param entityID {Uuid} The ID of the Model or PolyVox entity to get the meshes of. + * @param callback {Entities~getMeshesCallback} The function to call upon completion. + */ + function getMeshes(entityID: Uuid, callback: Entities~getMeshesCallback): void; + /** + * Get the object to world transform, excluding scale, of an entity. + * @param entityID {Uuid} The ID of the entity. + * @returns {Mat4} + */ + function getEntityTransform(entityID: Uuid): Mat4; + /** + * Get the object to parent transform, excluding scale, of an entity. + * @param entityID {Uuid} The ID of the entity. + * @returns {Mat4} + */ + function getEntityLocalTransform(entityID: Uuid): Mat4; + /** + * Get the static certificate for an entity. The static certificate contains static properties of the item which cannot + * be altered. + * @param entityID {Uuid} The ID of the entity to get the static certificate for. + * @returns {string} + */ + function getStaticCertificateJSON(entityID: Uuid): string; + /** + * Verify the entity's proof of provenance, i.e., that the entity's certificateID property was produced by + * High Fidelity signing the entity's static certificate JSON. + * @param entityID {Uuid} The ID of the entity to verify. + * @returns {boolean} + */ + function verifyStaticCertificateProperties(entityID: Uuid): boolean; + /** + * Triggered on the client that is the physics simulation owner during the collision of two entities. Note: Isn't triggered + * for a collision with an avatar. + * @param idA {Uuid} The ID of one entity in the collision. For an entity script, this is the ID of the entity containing + * the script. + * @param idB {Uuid} The ID of the other entity in the collision. + * @param collision {Collision} The details of the collision. + * @returns {Signal} + */ + function collisionWithEntity(idA: Uuid, idB: Uuid, collision: Collision): Signal; + /** + * Triggered when your ability to change the locked property of entities changes. + * @param canAdjustLocks {boolean} true if the script can change the locked property of an + * entity, otherwise false. + * @returns {Signal} + */ + function canAdjustLocksChanged(canAdjustLocks: boolean): Signal; + /** + * Triggered when your ability to rez (create) entities changes. + * @param canRez {boolean} true if the script can rez (create) entities, otherwise false. + * @returns {Signal} + */ + function canRezChanged(canRez: boolean): Signal; + /** + * Triggered when your ability to rez (create) temporary entities changes. Temporary entities are entities with a finite + * lifetime property value set. + * @param canRezTmp {boolean} true if the script can rez (create) temporary entities, otherwise + * false. + * @returns {Signal} + */ + function canRezTmpChanged(canRezTmp: boolean): Signal; + /** + * Triggered when your ability to rez (create) certified entities changes. Certified entities are entities that have PoP + * certificates. + * @param canRezCertified {boolean} true if the script can rez (create) certified entities, otherwise + * false. + * @returns {Signal} + */ + function canRezCertifiedChanged(canRezCertified: boolean): Signal; + /** + * Triggered when your ability to rez (create) temporary certified entities changes. Temporary entities are entities with a + * finite lifetime property value set. Certified entities are entities that have PoP certificates. + * @param canRezTmpCertified {boolean} true if the script can rez (create) temporary certified entities, + * otherwise false. + * @returns {Signal} + */ + function canRezTmpCertifiedChanged(canRezTmpCertified: boolean): Signal; + /** + * Triggered when your ability to make changes to the asset server's assets changes. + * @param canWriteAssets {boolean} true if the script can change the ? property of an entity, + * otherwise false. + * @returns {Signal} + */ + function canWriteAssetsChanged(canWriteAssets: boolean): Signal; + /** + * Triggered when a mouse button is clicked while the mouse cursor is on an entity, or a controller trigger is fully + * pressed while its laser is on an entity. + * @param entityID {Uuid} The ID of the entity that was pressed. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mousePressOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse button is double-clicked while the mouse cursor is on an entity. + * @param entityID {Uuid} The ID of the entity that was double-pressed. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mouseDoublePressOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Repeatedly triggered while the mouse cursor or controller laser moves on an entity. + * @param entityID {Uuid} The ID of the entity that was moved on. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mouseMoveOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse button is released after clicking on an entity or the controller trigger is partly or fully + * released after pressing on an entity, even if the mouse pointer or controller laser has moved off the entity. + * @param entityID {Uuid} The ID of the entity that was originally pressed. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mouseReleaseOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse button is clicked while the mouse cursor is not on an entity. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mousePressOffEntity(event: PointerEvent): Signal; + /** + * Triggered when a mouse button is double-clicked while the mouse cursor is not on an entity. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function mouseDoublePressOffEntity(event: PointerEvent): Signal; + /** + * Triggered when a mouse button is clicked while the mouse cursor is on an entity. Note: Not triggered by controller. + * @param entityID {Uuid} The ID of the entity that was clicked. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function clickDownOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Repeatedly triggered while a mouse button continues to be held after clicking an entity, even if the mouse cursor has + * moved off the entity. Note: Not triggered by controller. + * @param entityID {Uuid} The ID of the entity that was originally clicked. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function holdingClickOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when a mouse button is released after clicking on an entity, even if the mouse cursor has moved off the + * entity. Note: Not triggered by controller. + * @param entityID {Uuid} The ID of the entity that was originally clicked. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function clickReleaseOnEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when the mouse cursor or controller laser starts hovering on an entity. + * @param entityID {Uuid} The ID of the entity that is being hovered. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function hoverEnterEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Repeatedly triggered when the mouse cursor or controller laser moves while hovering over an entity. + * @param entityID {Uuid} The ID of the entity that is being hovered. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function hoverOverEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when the mouse cursor or controller laser stops hovering over an entity. + * @param entityID {Uuid} The ID of the entity that was being hovered. + * @param event {PointerEvent} Details of the event. + * @returns {Signal} + */ + function hoverLeaveEntity(entityID: Uuid, event: PointerEvent): Signal; + /** + * Triggered when an avatar enters an entity. + * @param entityID {Uuid} The ID of the entity that the avatar entered. + * @returns {Signal} + */ + function enterEntity(entityID: Uuid): Signal; + /** + * Triggered when an avatar leaves an entity. + * @param entityID {Uuid} The ID of the entity that the avatar left. + * @returns {Signal} + */ + function leaveEntity(entityID: Uuid): Signal; + /** + * Triggered when an entity is deleted. + * @param entityID {Uuid} The ID of the entity deleted. + * @returns {Signal} + */ + function deletingEntity(entityID: Uuid): Signal; + /** + * Triggered when an entity is added to Interface's local in-memory tree of entities it knows about. This may occur when + * entities are loaded upon visiting a domain, when the user rotates their view so that more entities become visible, and when a domain or client-only entity is added (e.g., by Entities.addEntity). + * @param entityID {Uuid} The ID of the entity added. + * @returns {Signal} + */ + function addingEntity(entityID: Uuid): Signal; + /** + * Triggered when you disconnect from a domain, at which time Interface's local in-memory tree of entities it knows about + * is cleared. + * @returns {Signal} + */ + function clearingEntities(): Signal; + /** + * Triggered in when a script in a Entities.EntityType entity's Web page script sends an event over the + * script's EventBridge. + * @param entityID {Uuid} The ID of the entity that event was received from. + * @param message {string} The message received. + * @returns {Signal} + */ + function webEventReceived(entityID: Uuid, message: string): Signal; + interface Haze { + /** + * The horizontal distance at which visibility is reduced to 95%; i.e., 95% of each pixel's + * color is haze. + */ + hazeRange: number; + /** + * The color of the haze when looking away from the key light. + */ + hazeColor: Color; + /** + * If true then the haze is colored with glare from the key light; + * hazeGlareColor and hazeGlareAngle are used. + */ + hazeEnableGlare: boolean; + /** + * The color of the haze when looking towards the key light. + */ + hazeGlareColor: Color; + /** + * The angle in degrees across the circle around the key light that the glare color and + * haze color are blended 50/50. + */ + hazeGlareAngle: number; + /** + * If true then haze decreases with altitude as defined by the + * entity's local coordinate system; hazeBaseRef and hazeCeiling are used. + */ + hazeAltitudeEffect: boolean; + /** + * The y-axis value in the entity's local coordinate system at which the haze density starts + * reducing with altitude. + */ + hazeBaseRef: number; + /** + * The y-axis value in the entity's local coordinate system at which the haze density has + * reduced to 5%. + */ + hazeCeiling: number; + /** + * The proportion of the skybox image to show through the haze: 0.0 + * displays no skybox image; 1.0 displays no haze. + */ + hazeBackgroundBlend: number; + /** + * Currently not supported. + */ + hazeAttenuateKeyLight: boolean; + /** + * Currently not supported. + */ + hazeKeyLightRange: number; + /** + * Currently not supported. + */ + hazeKeyLightAltitude: number; + } + + interface KeyLight { + /** + * The color of the light. + */ + color: Color; + /** + * The intensity of the light. + */ + intensity: number; + /** + * The direction the light is shining. + */ + direction: Vec3; + /** + * If true then shadows are cast. Shadows are cast by avatars, plus + * Entities.EntityType and Entities.EntityType entities that have their Entities.EntityProperties property set to true. + */ + castShadows: boolean; + } + + interface Skybox { + /** + * Sets the color of the sky if url is "", otherwise modifies the + * color of the cube map image. + */ + color: Color; + /** + * A cube map image that is used to render the sky. + */ + url: string; + } + + /** + * Set the maximum number of entity packets that the client can send per second. + * @param packetsPerSecond {number} Integer maximum number of entity packets that the client can send per second. + */ + function setPacketsPerSecond(packetsPerSecond: number): void; + /** + * Get the maximum number of entity packets that the client can send per second. + * @returns {number} + */ + function getPacketsPerSecond(): number; + /** + * Check whether servers exist for the client to send entity packets to, i.e., whether you are connected to a domain and + * its entity server is working. + * @returns {boolean} + */ + function serversExist(): boolean; + /** + * Check whether the client has entity packets waiting to be sent. + * @returns {boolean} + */ + function hasPacketsToSend(): boolean; + /** + * Get the number of entity packets the client has waiting to be sent. + * @returns {number} + */ + function packetsToSendCount(): number; + /** + * Get the entity packets per second send rate of the client over its lifetime. + * @returns {number} + */ + function getLifetimePPS(): number; + /** + * Get the entity bytes per second send rate of the client over its lifetime. + * @returns {number} + */ + function getLifetimeBPS(): number; + /** + * Get the entity packets per second queued rate of the client over its lifetime. + * @returns {number} + */ + function getLifetimePPSQueued(): number; + /** + * Get the entity bytes per second queued rate of the client over its lifetime. + * @returns {number} + */ + function getLifetimeBPSQueued(): number; + /** + * Get the lifetime of the client from the first entity packet sent until now, in microseconds. + * @returns {number} + */ + function getLifetimeInUsecs(): number; + /** + * Get the lifetime of the client from the first entity packet sent until now, in seconds. + * @returns {number} + */ + function getLifetimeInSeconds(): number; + /** + * Get the total number of entity packets sent by the client over its lifetime. + * @returns {number} + */ + function getLifetimePacketsSent(): number; + /** + * Get the total bytes of entity packets sent by the client over its lifetime. + * @returns {number} + */ + function getLifetimeBytesSent(): number; + /** + * Get the total number of entity packets queued by the client over its lifetime. + * @returns {number} + */ + function getLifetimePacketsQueued(): number; + /** + * Get the total bytes of entity packets queued by the client over its lifetime. + * @returns {number} + */ + function getLifetimeBytesQueued(): number; + interface ActionArguments-Offset { + /** + * The target point to offset the entity from. + */ + pointToOffsetFrom: Vec3; + /** + * The distance away from the target point to position the entity. + */ + linearDistance: number; + /** + * Controls how long it takes for the entity's position to catch up with the + * target offset. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + linearTimeScale: number; + } + + interface ActionArguments-Tractor { + /** + * The target position. + */ + targetPosition: Vec3; + /** + * The target rotation. + */ + targetRotation: Quat; + /** + * If an entity ID, the targetPosition and targetRotation are + * relative to this entity's position and rotation. + */ + otherID: Uuid; + /** + * Controls how long it takes for the entity's position to catch up with the + * target position. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + linearTimeScale: number; + /** + * Controls how long it takes for the entity's orientation to catch up with the + * target orientation. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + angularTimeScale: number; + } + + interface ActionArguments-TravelOriented { + /** + * The axis of the entity to align with the entity's direction of travel. + */ + forward: Vec3; + /** + * Controls how long it takes for the entity's orientation to catch up with the + * direction of travel. The value is the time for the action to catch up to 1/e = 0.368 of the target value, where the action is applied using an exponential decay. + */ + angularTimeScale: number; + } + + interface ActionArguments-BallSocket { + /** + * The local offset of the joint relative to the entity's position. + */ + pivot: Vec3; + /** + * The ID of the other entity that is connected to the joint. + */ + otherEntityID: Uuid; + /** + * The local offset of the joint relative to the other entity's position. + */ + otherPivot: Vec3; + } + + interface ActionArguments-ConeTwist { + /** + * The local offset of the joint relative to the entity's position. + */ + pivot: Vec3; + /** + * The axis of the entity that moves through the cone. Must be a non-zero vector. + */ + axis: Vec3; + /** + * The ID of the other entity that is connected to the joint. + */ + otherEntityID: Uuid; + /** + * The local offset of the joint relative to the other entity's position. + */ + otherPivot: Vec3; + /** + * The axis of the other entity that moves through the cone. Must be a non-zero vector. + */ + otherAxis: Vec3; + /** + * The angle through which the joint can move in one axis of the cone, in radians. + */ + swingSpan1: number; + /** + * The angle through which the joint can move in the other axis of the cone, in radians. + */ + swingSpan2: number; + /** + * The angle through with the joint can twist, in radians. + */ + twistSpan: number; + } + + interface ActionArguments-Hinge { + /** + * The local offset of the joint relative to the entity's position. + */ + pivot: Vec3; + /** + * The axis of the entity that it pivots about. Must be a non-zero vector. + */ + axis: Vec3; + /** + * The ID of the other entity that is connected to the joint, if any. If none is + * specified then the first entity simply pivots about its specified axis. + */ + otherEntityID: Uuid; + /** + * The local offset of the joint relative to the other entity's position. + */ + otherPivot: Vec3; + /** + * The axis of the other entity that it pivots about. Must be a non-zero vector. + */ + otherAxis: Vec3; + /** + * The most negative angle that the hinge can take, in radians. + */ + low: number; + /** + * The most positive angle that the hinge can take, in radians. + */ + high: number; + /** + * The current angle of the hinge. Read-only. + */ + angle: number; + } + + interface ActionArguments-Slider { + /** + * The local position of a point in the entity that slides along the axis. + */ + point: Vec3; + /** + * The axis of the entity that slides along the joint. Must be a non-zero vector. + */ + axis: Vec3; + /** + * The ID of the other entity that is connected to the joint, if any. If non is + * specified then the first entity simply slides and rotates about its specified axis. + */ + otherEntityID: Uuid; + /** + * The local position of a point in the other entity that slides along the axis. + */ + otherPoint: Vec3; + /** + * The axis of the other entity that slides along the joint. Must be a non-zero vector. + */ + axis: Vec3; + /** + * The most negative linear offset from the entity's initial point that the entity can + * have along the slider. + */ + linearLow: number; + /** + * The most positive linear offset from the entity's initial point that the entity can + * have along the slider. + */ + linearHigh: number; + /** + * The most negative angle that the entity can rotate about the axis if the action + * involves only one entity, otherwise the most negative angle the rotation can be between the two entities. In radians. + */ + angularLow: number; + /** + * The most positive angle that the entity can rotate about the axis if the action + * involves only one entity, otherwise the most positive angle the rotation can be between the two entities. In radians. + */ + angularHigh: number; + /** + * The current linear offset the entity is from its initial point if the action involves + * only one entity, otherwise the linear offset between the two entities' action points. Read-only. + */ + linearPosition: number; + /** + * The current angular offset of the entity from its initial rotation if the action + * involves only one entity, otherwise the angular offset between the two entities. Read-only. + */ + angularPosition: number; + } + + interface ActionArguments { + /** + * The type of action. + */ + type: Entities.ActionType; + /** + * A string that a script can use for its own purposes. + */ + tag: string; + /** + * How long the action should exist, in seconds, before it is automatically deleted. A value of + * 0 means that the action should not be deleted. + */ + ttl: number; + /** + * Is true if you created the action during your current Interface session, + * false otherwise. Read-only. + */ + isMine: boolean; + /** + * Is present when the entity hasn't been registered with the physics engine yet (e.g., + * if the action hasn't been properly configured), otherwise undefined. Read-only. + */ + ::no-motion-state: boolean; + /** + * Is true when the action is modifying the entity's motion, false + * otherwise. Is present once the entity has been registered with the physics engine, otherwise undefined. Read-only. + */ + ::active: boolean; + /** + * How the entity moves with the action. Is present once the entity has + * been registered with the physics engine, otherwise undefined. Read-only. + */ + ::motion-type: Entities.PhysicsMotionType; + } + + /** + * Triggered when the script starts for a user. + * Note: Can only be connected to via this.preload = function (...) { ... } in the entity script. Available in:Client Entity ScriptsServer Entity Scripts + * @param entityID {Uuid} The ID of the entity that the script is running in. + * @returns {Signal} + */ + function preload(entityID: Uuid): Signal; + /** + * Triggered when the script terminates for a user. + * Note: Can only be connected to via this.unoad = function () { ... } in the entity script. Available in:Client Entity ScriptsServer Entity Scripts + * @returns {Signal} + */ + function unload(): Signal; + /** + * Get or set the Entities.EntityType entity that has keyboard focus. + * If no entity has keyboard focus, get returns null; set to null or Uuid to clear keyboard focus. + */ + let keyboardFocusEntity: Uuid; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe experimental Graphics API (experimental) lets you query and manage certain graphics-related structures (like underlying meshes and textures) from scripting. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe experimental Graphics API (experimental) lets you query and manage certain graphics-related structures (like underlying meshes and textures) from scripting. + */ declare namespace Graphics { - interface Material { - name: string; - model: string; - opacity: number; - roughness: number; - metallic: number; - scattering: number; - unlit: boolean; - emissiveMap: string; - albedoMap: string; - opacityMap: string; - metallicMap: string; - specularMap: string; - roughnessMap: string; - glossMap: string; - normalMap: string; - bumpMap: string; - occlusionMap: string; - lightmapMap: string; - scatteringMap: string; - } - - interface MaterialLayer { - /** - * This layer's material. - */ - material: Graphics.Material; - /** - * The priority of this layer. If multiple materials are applied to a mesh part, only the highest priority layer is used. - */ - priority: number; - } - - interface IFSData { - /** - * mesh name (useful for debugging / debug prints). - */ - name: string; - topology: string; - /** - * vertex indices to use for the mesh faces. - */ - indices: Array.; - /** - * vertex positions (model space) - */ - vertices: Array.; - /** - * vertex normals (normalized) - */ - normals: Array.; - /** - * vertex colors (normalized) - */ - colors: Array.; - /** - * vertex texture coordinates (normalized) - */ - texCoords0: Array.; - } - - /** - * Returns a model reference object associated with the specified UUID ( EntityID, OverlayID, or AvatarID). - * @param entityID {UUID} The objectID of the model whose meshes are to be retrieved. - * @returns {Graphics.Model} - */ - function getModel(entityID: UUID): Graphics.Model; - /** - * @param id {Uuid} - * @param model {Graphics.Model} - * @returns {boolean} - */ - function updateModel(id: Uuid, model: Graphics.Model): boolean; - /** - * @param id {Uuid} - * @param meshIndex {number} [meshIndex=-1] - * @param partNumber {number} [partNumber=-1] - * @returns {boolean} - */ - function canUpdateModel(id: Uuid, meshIndex: number, partNumber: number): boolean; - /** - * @param meshes {Array.} - * @returns {Graphics.Model} - */ - function newModel(meshes: Array.): Graphics.Model; - /** - * Create a new Mesh / Mesh Part with the specified data buffers. - * @param ifsMeshData {Graphics.IFSData} Index-Faced Set (IFS) arrays used to create the new mesh. - * @returns {Graphics.Mesh} - */ - function newMesh(ifsMeshData: Graphics.IFSData): Graphics.Mesh; - /** - * @param model {Graphics.Model} - * @returns {string} - */ - function exportModelToOBJ(model: Graphics.Model): string; - interface Mesh { - /** - * Array of submesh part references. - */ - parts: Array.; - /** - * Vertex attribute names (color, normal, etc.) - */ - attributeNames: Array.; - /** - * The number of parts contained in the mesh. - */ - numParts: number; - /** - * Total number of vertex indices in the mesh. - */ - numIndices: number; - /** - * Total number of vertices in the Mesh. - */ - numVertices: number; - /** - * Number of currently defined vertex attributes. - */ - numAttributes: number; - valid: boolean; - strong: boolean; - extents: object; - bufferFormats: object; - } - - interface MeshPart { - valid: boolean; - /** - * The part index (within the containing Mesh). - */ - partIndex: number; - firstVertexIndex: number; - baseVertexIndex: number; - lastVertexIndex: number; - /** - * element interpretation (currently only 'triangles' is supported). - */ - topology: Graphics.Topology; - /** - * Vertex attribute names (color, normal, etc.) - */ - attributeNames: Array.; - /** - * Number of vertex indices that this mesh part refers to. - */ - numIndices: number; - /** - * Number of vertices per face (eg: 3 when topology is 'triangles'). - */ - numVerticesPerFace: number; - /** - * Number of faces represented by the mesh part (numIndices / numVerticesPerFace). - */ - numFaces: number; - /** - * Total number of vertices in the containing Mesh. - */ - numVertices: number; - /** - * Number of currently defined vertex attributes. - */ - numAttributes: number; - extents: object; - bufferFormats: object; - } - - interface Model { - /** - * UUID of corresponding inworld object (if model is associated) - */ - objectID: Uuid; - /** - * The number of submeshes contained in the model. - */ - numMeshes: number; - /** - * Array of submesh references. - */ - meshes: Array.; - /** - * Map of materials layer lists. You can look up a material layer list by mesh part number or by material name. - */ - materialLayers: Object.>; - /** - * Array of all the material names used by the mesh parts of this model, in order (e.g. materialNames[0] is the name of the first mesh part's material). - */ - materialNames: Array.; - } + interface Material { + name: string; + model: string; + opacity: number; + roughness: number; + metallic: number; + scattering: number; + unlit: boolean; + emissiveMap: string; + albedoMap: string; + opacityMap: string; + metallicMap: string; + specularMap: string; + roughnessMap: string; + glossMap: string; + normalMap: string; + bumpMap: string; + occlusionMap: string; + lightmapMap: string; + scatteringMap: string; + } + + interface MaterialLayer { + /** + * This layer's material. + */ + material: Graphics.Material; + /** + * The priority of this layer. If multiple materials are applied to a mesh part, only the highest priority layer is used. + */ + priority: number; + } + + interface IFSData { + /** + * mesh name (useful for debugging / debug prints). + */ + name: string; + topology: string; + /** + * vertex indices to use for the mesh faces. + */ + indices: Array.; + /** + * vertex positions (model space) + */ + vertices: Array.; + /** + * vertex normals (normalized) + */ + normals: Array.; + /** + * vertex colors (normalized) + */ + colors: Array.; + /** + * vertex texture coordinates (normalized) + */ + texCoords0: Array.; + } + + /** + * Returns a model reference object associated with the specified UUID ( EntityID, OverlayID, or AvatarID). + * @param entityID {UUID} The objectID of the model whose meshes are to be retrieved. + * @returns {Graphics.Model} + */ + function getModel(entityID: UUID): Graphics.Model; + /** + * @param id {Uuid} + * @param model {Graphics.Model} + * @returns {boolean} + */ + function updateModel(id: Uuid, model: Graphics.Model): boolean; + /** + * @param id {Uuid} + * @param meshIndex {number} [meshIndex=-1] + * @param partNumber {number} [partNumber=-1] + * @returns {boolean} + */ + function canUpdateModel(id: Uuid, meshIndex: number, partNumber: number): boolean; + /** + * @param meshes {Array.} + * @returns {Graphics.Model} + */ + function newModel(meshes: Array.): Graphics.Model; + /** + * Create a new Mesh / Mesh Part with the specified data buffers. + * @param ifsMeshData {Graphics.IFSData} Index-Faced Set (IFS) arrays used to create the new mesh. + * @returns {Graphics.Mesh} + */ + function newMesh(ifsMeshData: Graphics.IFSData): Graphics.Mesh; + /** + * @param model {Graphics.Model} + * @returns {string} + */ + function exportModelToOBJ(model: Graphics.Model): string; + interface Mesh { + /** + * Array of submesh part references. + */ + parts: Array.; + /** + * Vertex attribute names (color, normal, etc.) + */ + attributeNames: Array.; + /** + * The number of parts contained in the mesh. + */ + numParts: number; + /** + * Total number of vertex indices in the mesh. + */ + numIndices: number; + /** + * Total number of vertices in the Mesh. + */ + numVertices: number; + /** + * Number of currently defined vertex attributes. + */ + numAttributes: number; + valid: boolean; + strong: boolean; + extents: object; + bufferFormats: object; + } + + interface MeshPart { + valid: boolean; + /** + * The part index (within the containing Mesh). + */ + partIndex: number; + firstVertexIndex: number; + baseVertexIndex: number; + lastVertexIndex: number; + /** + * element interpretation (currently only 'triangles' is supported). + */ + topology: Graphics.Topology; + /** + * Vertex attribute names (color, normal, etc.) + */ + attributeNames: Array.; + /** + * Number of vertex indices that this mesh part refers to. + */ + numIndices: number; + /** + * Number of vertices per face (eg: 3 when topology is 'triangles'). + */ + numVerticesPerFace: number; + /** + * Number of faces represented by the mesh part (numIndices / numVerticesPerFace). + */ + numFaces: number; + /** + * Total number of vertices in the containing Mesh. + */ + numVertices: number; + /** + * Number of currently defined vertex attributes. + */ + numAttributes: number; + extents: object; + bufferFormats: object; + } + + interface Model { + /** + * UUID of corresponding inworld object (if model is associated) + */ + objectID: Uuid; + /** + * The number of submeshes contained in the model. + */ + numMeshes: number; + /** + * Array of submesh references. + */ + meshes: Array.; + /** + * Map of materials layer lists. You can look up a material layer list by mesh part number or by material name. + */ + materialLayers: Object.>; + /** + * Array of all the material names used by the mesh parts of this model, in order (e.g. materialNames[0] is the name of the first mesh part's material). + */ + materialNames: Array.; + } } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace Midi { - /** - * Send Raw MIDI packet to a particular device. - * @param device {number} Integer device number. - * @param raw {number} Integer (DWORD) raw MIDI message. - */ - function sendRawDword(device: number, raw: number): void; - /** - * Send MIDI message to a particular device. - * @param device {number} Integer device number. - * @param channel {number} Integer channel number. - * @param type {number} 0x8 is note off, 0x9 is note on (if velocity=0, note off), etc. - * @param note {number} MIDI note number. - * @param velocity {number} Note velocity (0 means note off). - */ - function sendMidiMessage(device: number, channel: number, type: number, note: number, velocity: number): void; - /** - * Play a note on all connected devices. - * @param status {number} 0x80 is note off, 0x90 is note on (if velocity=0, note off), etc. - * @param note {number} MIDI note number. - * @param velocity {number} Note velocity (0 means note off). - */ - function playMidiNote(status: number, note: number, velocity: number): void; - /** - * Turn off all notes on all connected devices. - */ - function allNotesOff(): void; - /** - * Clean up and re-discover attached devices. - */ - function resetDevices(): void; - /** - * Get a list of inputs/outputs. - * @param output {boolean} - * @returns {Array.} - */ - function listMidiDevices(output: boolean): Array.; - /** - * Block an input/output by name. - * @param name {string} - * @param output {boolean} - */ - function blockMidiDevice(name: string, output: boolean): void; - /** - * Unblock an input/output by name. - * @param name {string} - * @param output {boolean} - */ - function unblockMidiDevice(name: string, output: boolean): void; - /** - * Repeat all incoming notes to all outputs (default disabled). - * @param enable {boolean} - */ - function thruModeEnable(enable: boolean): void; - /** - * Broadcast on all unblocked devices. - * @param enable {boolean} - */ - function broadcastEnable(enable: boolean): void; - /** - * @param enable {boolean} - */ - function typeNoteOffEnable(enable: boolean): void; - /** - * @param enable {boolean} - */ - function typeNoteOnEnable(enable: boolean): void; - /** - * @param enable {boolean} - */ - function typePolyKeyPressureEnable(enable: boolean): void; - /** - * @param enable {boolean} - */ - function typeControlChangeEnable(enable: boolean): void; - /** - * @param enable {boolean} - */ - function typeProgramChangeEnable(enable: boolean): void; - /** - * @param enable {boolean} - */ - function typeChanPressureEnable(enable: boolean): void; - /** - * @param enable {boolean} - */ - function typePitchBendEnable(enable: boolean): void; - /** - * @param enable {boolean} - */ - function typeSystemMessageEnable(enable: boolean): void; + /** + * Send Raw MIDI packet to a particular device. + * @param device {number} Integer device number. + * @param raw {number} Integer (DWORD) raw MIDI message. + */ + function sendRawDword(device: number, raw: number): void; + /** + * Send MIDI message to a particular device. + * @param device {number} Integer device number. + * @param channel {number} Integer channel number. + * @param type {number} 0x8 is note off, 0x9 is note on (if velocity=0, note off), etc. + * @param note {number} MIDI note number. + * @param velocity {number} Note velocity (0 means note off). + */ + function sendMidiMessage(device: number, channel: number, type: number, note: number, velocity: number): void; + /** + * Play a note on all connected devices. + * @param status {number} 0x80 is note off, 0x90 is note on (if velocity=0, note off), etc. + * @param note {number} MIDI note number. + * @param velocity {number} Note velocity (0 means note off). + */ + function playMidiNote(status: number, note: number, velocity: number): void; + /** + * Turn off all notes on all connected devices. + */ + function allNotesOff(): void; + /** + * Clean up and re-discover attached devices. + */ + function resetDevices(): void; + /** + * Get a list of inputs/outputs. + * @param output {boolean} + * @returns {Array.} + */ + function listMidiDevices(output: boolean): Array.; + /** + * Block an input/output by name. + * @param name {string} + * @param output {boolean} + */ + function blockMidiDevice(name: string, output: boolean): void; + /** + * Unblock an input/output by name. + * @param name {string} + * @param output {boolean} + */ + function unblockMidiDevice(name: string, output: boolean): void; + /** + * Repeat all incoming notes to all outputs (default disabled). + * @param enable {boolean} + */ + function thruModeEnable(enable: boolean): void; + /** + * Broadcast on all unblocked devices. + * @param enable {boolean} + */ + function broadcastEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeNoteOffEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeNoteOnEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typePolyKeyPressureEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeControlChangeEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeProgramChangeEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeChanPressureEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typePitchBendEnable(enable: boolean): void; + /** + * @param enable {boolean} + */ + function typeSystemMessageEnable(enable: boolean): void; } /** -* Available in:Interface ScriptsClient Entity ScriptsAPI to manage model cache resources. -*/ + * Available in:Interface ScriptsClient Entity ScriptsAPI to manage model cache resources. + */ declare namespace ModelCache { - /** - * Get the list of all resource URLs. - * @returns {Array.} - */ - function getResourceList(): Array.; - /** - * @returns {Signal} - */ - function dirty(): Signal; - /** - * @param deltaSize {number} - */ - function updateTotalSize(deltaSize: number): void; - /** - * Prefetches a resource. - * @param url {string} URL of the resource to prefetch. - * @param extra {object} [extra=null] - * @returns {Resource} - */ - function prefetch(url: string, extra: object): Resource; - /** - * Asynchronously loads a resource from the specified URL and returns it. - * @param url {string} URL of the resource to load. - * @param fallback {string} [fallback=""] Fallback URL if load of the desired URL fails. - * @param extra {} [extra=null] - * @returns {Resource} - */ - function getResource(url: string, fallback: string, extra): Resource; - /** - * Total number of total resources. Read-only. - */ - let numTotal: number; - /** - * Total number of cached resource. Read-only. - */ - let numCached: number; - /** - * Size in bytes of all resources. Read-only. - */ - let sizeTotal: number; - /** - * Size in bytes of all cached resources. Read-only. - */ - let sizeCached: number; + /** + * Get the list of all resource URLs. + * @returns {Array.} + */ + function getResourceList(): Array.; + /** + * @param deltaSize {number} + */ + function updateTotalSize(deltaSize: number): void; + /** + * Prefetches a resource. + * @param url {string} URL of the resource to prefetch. + * @param extra {object} [extra=null] + * @returns {ResourceObject} + */ + function prefetch(url: string, extra: object): ResourceObject; + /** + * @returns {Signal} + */ + function dirty(): Signal; + /** + * Total number of total resources. Read-only. + */ + let numTotal: number; + /** + * Total number of cached resource. Read-only. + */ + let numCached: number; + /** + * Size in bytes of all resources. Read-only. + */ + let sizeTotal: number; + /** + * Size in bytes of all cached resources. Read-only. + */ + let sizeCached: number; } /** -* Available in:Interface ScriptsClient Entity ScriptsAPI to manage texture cache resources. -*/ + * Available in:Interface ScriptsClient Entity ScriptsAPI to manage texture cache resources. + */ declare namespace TextureCache { - /** - * Get the list of all resource URLs. - * @returns {Array.} - */ - function getResourceList(): Array.; - /** - * @returns {Signal} - */ - function dirty(): Signal; - /** - * @param deltaSize {number} - */ - function updateTotalSize(deltaSize: number): void; - /** - * Prefetches a resource. - * @param url {string} URL of the resource to prefetch. - * @param extra {object} [extra=null] - * @returns {Resource} - */ - function prefetch(url: string, extra: object): Resource; - /** - * Asynchronously loads a resource from the specified URL and returns it. - * @param url {string} URL of the resource to load. - * @param fallback {string} [fallback=""] Fallback URL if load of the desired URL fails. - * @param extra {} [extra=null] - * @returns {Resource} - */ - function getResource(url: string, fallback: string, extra): Resource; - /** - * @returns {Signal} - */ - function spectatorCameraFramebufferReset(): Signal; - /** - * @param url {string} - * @param type {number} - * @param maxNumPixels {number} [maxNumPixels=67108864] - * @returns {Resource} - */ - function prefetch(url: string, type: number, maxNumPixels: number): Resource; - /** - * Total number of total resources. Read-only. - */ - let numTotal: number; - /** - * Total number of cached resource. Read-only. - */ - let numCached: number; - /** - * Size in bytes of all resources. Read-only. - */ - let sizeTotal: number; - /** - * Size in bytes of all cached resources. Read-only. - */ - let sizeCached: number; + /** + * @param url {string} + * @param type {number} + * @param maxNumPixels {number} [maxNumPixels=67108864] + * @returns {ResourceObject} + */ + function prefetch(url: string, type: number, maxNumPixels: number): ResourceObject; + /** + * @returns {Signal} + */ + function spectatorCameraFramebufferReset(): Signal; + /** + * Get the list of all resource URLs. + * @returns {Array.} + */ + function getResourceList(): Array.; + /** + * @param deltaSize {number} + */ + function updateTotalSize(deltaSize: number): void; + /** + * Prefetches a resource. + * @param url {string} URL of the resource to prefetch. + * @param extra {object} [extra=null] + * @returns {ResourceObject} + */ + function prefetch(url: string, extra: object): ResourceObject; + /** + * @returns {Signal} + */ + function dirty(): Signal; + /** + * Total number of total resources. Read-only. + */ + let numTotal: number; + /** + * Total number of cached resource. Read-only. + */ + let numCached: number; + /** + * Size in bytes of all resources. Read-only. + */ + let sizeTotal: number; + /** + * Size in bytes of all cached resources. Read-only. + */ + let sizeCached: number; } /** -* Available in:Interface ScriptsClient Entity ScriptsAssignment Client ScriptsThe location API provides facilities related to your current location in the metaverse. -* -Getter/Setter -You can get and set your current metaverse address by directly reading a string value from and writing a string value to -the location object. This is an alternative to using the location.href property or this object's -functions. -*/ + * Available in:Interface ScriptsClient Entity ScriptsAssignment Client ScriptsThe location API provides facilities related to your current location in the metaverse. + * Getter/Setter You can get and set your current metaverse address by directly reading a string value from and writing a string value to the location object. This is an alternative to using the location.href property or this object's functions. + */ declare namespace location { - /** - * Go to a specified metaverse address. - * @param address {string} The address to go to: a "hifi:/" address, an IP address (e.g., - * "127.0.0.1" or "localhost"), a domain name, a named path on a domain (starts with -"/"), a position or position and orientation, or a user (starts with "@"). - * @param fromSuggestions {boolean} Set to true if the address is obtained from the "Goto" dialog. - * Helps ensure that user's location history is correctly maintained. - */ - function handleLookupString(address: string, fromSuggestions: boolean): void; - /** - * Go to a position and orientation resulting from a lookup for a named path in the domain (set in the domain server's - * settings). - * @param path {string} The position and orientation corresponding to the named path. - * @param namedPath {string} The named path that was looked up on the server. - */ - function goToViewpointForPath(path: string, namedPath: string): void; - /** - * Go back to the previous location in your navigation history, if there is one. - */ - function goBack(): void; - /** - * Go forward to the next location in your navigation history, if there is one. - */ - function goForward(): void; - /** - * Go to the local Sandbox server that's running on the same PC as Interface. - * @param path {string} The position and orientation to go to (e.g., "/0,0,0"). - * @param trigger {location.LookupTrigger} The reason for the function call. Helps ensure that user's - * location history is correctly maintained. - */ - function goToLocalSandbox(path: string, trigger: location.LookupTrigger): void; - /** - * Go to the default "welcome" metaverse address. - * @param trigger {location.LookupTrigger} The reason for the function call. Helps ensure that user's - * location history is correctly maintained. - */ - function goToEntry(trigger: location.LookupTrigger): void; - /** - * Go to the specified user's location. - * @param username {string} The user's username. - * @param matchOrientation {boolean} If true then go to a location just in front of the user and turn to face - * them, otherwise go to the user's exact location and orientation. - */ - function goToUser(username: string, matchOrientation: boolean): void; - /** - * Refresh the current address, e.g., after connecting to a domain in order to position the user to the desired location. - */ - function refreshPreviousLookup(): void; - /** - * Update your current metaverse location in Interface's Settings file as your last-known address. This can be used - * to ensure that you start up at that address if you exit Interface without a later address automatically being saved. - */ - function storeCurrentAddress(): void; - /** - * Copy your current metaverse address (i.e., location.href property value) to the OS clipboard. - */ - function copyAddress(): void; - /** - * Copy your current metaverse location and orientation (i.e., location.pathname property value) to the OS - * clipboard. - */ - function copyPath(): void; - /** - * Retrieve and remember the place name for the given domain ID if the place name is not already known. - * @param domainID {Uuid} The UUID of the domain. - */ - function lookupShareableNameForDomainID(domainID: Uuid): void; - /** - * Triggered when looking up the details of a metaverse user or location to go to has completed (successfully or - * unsuccessfully). - * @returns {Signal} - */ - function lookupResultsFinished(): Signal; - /** - * Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user is - * offline. - * @returns {Signal} - */ - function lookupResultIsOffline(): Signal; - /** - * Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user could - * not be found. - * @returns {Signal} - */ - function lookupResultIsNotFound(): Signal; - /** - * Triggered when a request is made to go to an IP address. - * @param domainURL {Url} URL for domain - * @param domainID {Uuid} The UUID of the domain to go to. - * @returns {Signal} - */ - function possibleDomainChangeRequired(domainURL: Url, domainID: Uuid): Signal; - /** - * Triggered when a request is made to go to a named domain or user. - * @param iceServerHostName {string} IP address of the ICE server. - * @param domainID {Uuid} The UUID of the domain to go to. - * @returns {Signal} - */ - function possibleDomainChangeRequiredViaICEForID(iceServerHostName: string, domainID: Uuid): Signal; - /** - * Triggered when an attempt is made to send your avatar to a specified position on the current domain. For example, when - * you change domains or enter a position to go to in the "Goto" dialog. - * @param position {Vec3} The position to go to. - * @param hasOrientationChange {boolean} If true then a new orientation has been requested. - * @param orientation {Quat} The orientation to change to. Is {@link Quat|Quat.IDENTITY} if - * hasOrientationChange is false. - * @param shouldFaceLocation {boolean} If true then the request is to go to a position near that specified - * and orient your avatar to face it. For example when you visit someone from the "People" dialog. - * @returns {Signal} - */ - function locationChangeRequired(position: Vec3, hasOrientationChange: boolean, orientation: Quat, shouldFaceLocation: boolean): Signal; - /** - * Triggered when an attempt is made to send your avatar to a new named path on the domain (set in the domain server's - * settings). For example, when you enter a "/" followed by the path's name in the "GOTO" dialog. - * @param path {string} The name of the path to go to. - * @returns {Signal} - */ - function pathChangeRequired(path: string): Signal; - /** - * Triggered when you navigate to a new domain. - * @param hostname {string} The new domain's host name. - * @returns {Signal} - */ - function hostChanged(hostname: string): Signal; - /** - * Triggered when there's a change in whether or not there's a previous location that can be navigated to using - * location.goBack. (Reflects changes in the state of the "Goto" dialog's back arrow.) - * @param isPossible {boolean} true if there's a previous location to navigate to, otherwise - * false. - * @returns {Signal} - */ - function goBackPossible(isPossible: boolean): Signal; - /** - * Triggered when there's a change in whether or not there's a forward location that can be navigated to using - * location.goForward. (Reflects changes in the state of the "Goto" dialog's forward arrow.) - * @param isPossible {boolean} true if there's a forward location to navigate to, otherwise - * false. - * @returns {Signal} - */ - function goForwardPossible(isPossible: boolean): Signal; - /** - * A UUID uniquely identifying the domain you're visiting. Is Uuid if you're not - * connected to the domain or are in a serverless domain. - Read-only. - */ - let domainID: Uuid; - /** - * The name of the domain for your current metaverse address (e.g., "AvatarIsland", - * localhost, or an IP address). Is blank if you're in a serverless domain. - Read-only. - */ - let hostname: string; - /** - * Your current metaverse address (e.g., "hifi://avatarisland/15,-10,26/0,0,0,1") - * regardless of whether or not you're connected to the domain. Starts with "file:///" if you're in a - serverless domain. - Read-only. - */ - let href: string; - /** - * true if you're connected to the domain in your current href - * metaverse address, otherwise false. - Read-only. - */ - let isConnected: boolean; - /** - * The location and orientation in your current href metaverse address - * (e.g., "/15,-10,26/0,0,0,1"). - Read-only. - */ - let pathname: string; - /** - * The place name in your current href metaverse address - * (e.g., "AvatarIsland"). Is blank if your hostname is an IP address. - Read-only. - */ - let placename: string; - /** - * The protocol of your current href metaverse address (e.g., "hifi"). - * Read-only. - */ - let protocol: string; + /** + * Go to a specified metaverse address. + * @param address {string} The address to go to: a "hifi://" address, an IP address (e.g., + * "127.0.0.1" or "localhost"), a domain name, a named path on a domain (starts with "/"), a position or position and orientation, or a user (starts with "@"). + * @param fromSuggestions {boolean} Set to true if the address is obtained from the "Goto" dialog. + * Helps ensure that user's location history is correctly maintained. + */ + function handleLookupString(address: string, fromSuggestions: boolean): void; + /** + * Go to a position and orientation resulting from a lookup for a named path in the domain (set in the domain server's + * settings). + * @param path {string} The position and orientation corresponding to the named path. + * @param namedPath {string} The named path that was looked up on the server. + */ + function goToViewpointForPath(path: string, namedPath: string): void; + /** + * Go back to the previous location in your navigation history, if there is one. + */ + function goBack(): void; + /** + * Go forward to the next location in your navigation history, if there is one. + */ + function goForward(): void; + /** + * Go to the local Sandbox server that's running on the same PC as Interface. + * @param path {string} The position and orientation to go to (e.g., "/0,0,0"). + * @param trigger {location.LookupTrigger} The reason for the function call. Helps ensure that user's + * location history is correctly maintained. + */ + function goToLocalSandbox(path: string, trigger: location.LookupTrigger): void; + /** + * Go to the default "welcome" metaverse address. + * @param trigger {location.LookupTrigger} The reason for the function call. Helps ensure that user's + * location history is correctly maintained. + */ + function goToEntry(trigger: location.LookupTrigger): void; + /** + * Go to the specified user's location. + * @param username {string} The user's username. + * @param matchOrientation {boolean} If true then go to a location just in front of the user and turn to face + * them, otherwise go to the user's exact location and orientation. + */ + function goToUser(username: string, matchOrientation: boolean): void; + /** + * Go to the last address tried. This will be the last URL tried from location.handleLookupString + */ + function goToLastAddress(): void; + /** + * Returns if going back is possible. + */ + function canGoBack(): void; + /** + * Refresh the current address, e.g., after connecting to a domain in order to position the user to the desired location. + */ + function refreshPreviousLookup(): void; + /** + * Update your current metaverse location in Interface's Settings file as your last-known address. This can be used + * to ensure that you start up at that address if you exit Interface without a later address automatically being saved. + */ + function storeCurrentAddress(): void; + /** + * Copy your current metaverse address (i.e., location.href property value) to the OS clipboard. + */ + function copyAddress(): void; + /** + * Copy your current metaverse location and orientation (i.e., location.pathname property value) to the OS + * clipboard. + */ + function copyPath(): void; + /** + * Retrieve and remember the place name for the given domain ID if the place name is not already known. + * @param domainID {Uuid} The UUID of the domain. + */ + function lookupShareableNameForDomainID(domainID: Uuid): void; + /** + * Triggered when looking up the details of a metaverse user or location to go to has completed (successfully or + * unsuccessfully). + * @returns {Signal} + */ + function lookupResultsFinished(): Signal; + /** + * Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user is + * offline. + * @returns {Signal} + */ + function lookupResultIsOffline(): Signal; + /** + * Triggered when looking up the details of a metaverse user or location to go to has completed and the domain or user could + * not be found. + * @returns {Signal} + */ + function lookupResultIsNotFound(): Signal; + /** + * Triggered when a request is made to go to an IP address. + * @param domainURL {Url} URL for domain + * @param domainID {Uuid} The UUID of the domain to go to. + * @returns {Signal} + */ + function possibleDomainChangeRequired(domainURL: Url, domainID: Uuid): Signal; + /** + * Triggered when a request is made to go to a named domain or user. + * @param iceServerHostName {string} IP address of the ICE server. + * @param domainID {Uuid} The UUID of the domain to go to. + * @returns {Signal} + */ + function possibleDomainChangeRequiredViaICEForID(iceServerHostName: string, domainID: Uuid): Signal; + /** + * Triggered when an attempt is made to send your avatar to a specified position on the current domain. For example, when + * you change domains or enter a position to go to in the "Goto" dialog. + * @param position {Vec3} The position to go to. + * @param hasOrientationChange {boolean} If true then a new orientation has been requested. + * @param orientation {Quat} The orientation to change to. Is {@link Quat|Quat.IDENTITY} if + * hasOrientationChange is false. + * @param shouldFaceLocation {boolean} If true then the request is to go to a position near that specified + * and orient your avatar to face it. For example when you visit someone from the "People" dialog. + * @returns {Signal} + */ + function locationChangeRequired(position: Vec3, hasOrientationChange: boolean, orientation: Quat, shouldFaceLocation: boolean): Signal; + /** + * Triggered when an attempt is made to send your avatar to a new named path on the domain (set in the domain server's + * settings). For example, when you enter a "/" followed by the path's name in the "GOTO" dialog. + * @param path {string} The name of the path to go to. + * @returns {Signal} + */ + function pathChangeRequired(path: string): Signal; + /** + * Triggered when you navigate to a new domain. + * @param hostname {string} The new domain's host name. + * @returns {Signal} + */ + function hostChanged(hostname: string): Signal; + /** + * Triggered when there's a change in whether or not there's a previous location that can be navigated to using + * location.goBack. (Reflects changes in the state of the "Goto" dialog's back arrow.) + * @param isPossible {boolean} true if there's a previous location to navigate to, otherwise + * false. + * @returns {Signal} + */ + function goBackPossible(isPossible: boolean): Signal; + /** + * Triggered when there's a change in whether or not there's a forward location that can be navigated to using + * location.goForward. (Reflects changes in the state of the "Goto" dialog's forward arrow.) + * @param isPossible {boolean} true if there's a forward location to navigate to, otherwise + * false. + * @returns {Signal} + */ + function goForwardPossible(isPossible: boolean): Signal; + /** + * A UUID uniquely identifying the domain you're visiting. Is Uuid if you're not + * connected to the domain or are in a serverless domain. Read-only. + */ + let domainID: Uuid; + /** + * The name of the domain for your current metaverse address (e.g., "AvatarIsland", + * localhost, or an IP address). Is blank if you're in a serverless domain. Read-only. + */ + let hostname: string; + /** + * Your current metaverse address (e.g., "hifi://avatarisland/15,-10,26/0,0,0,1") + * regardless of whether or not you're connected to the domain. Starts with "file:///" if you're in a serverless domain. Read-only. + */ + let href: string; + /** + * true if you're connected to the domain in your current href + * metaverse address, otherwise false. + */ + let isConnected: boolean; + /** + * The location and orientation in your current href metaverse address + * (e.g., "/15,-10,26/0,0,0,1"). Read-only. + */ + let pathname: string; + /** + * The place name in your current href metaverse address + * (e.g., "AvatarIsland"). Is blank if your hostname is an IP address. Read-only. + */ + let placename: string; + /** + * The protocol of your current href metaverse address (e.g., "hifi"). + * Read-only. + */ + let protocol: string; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Messages API enables text and data to be sent between scripts over named "channels". A channel can have an arbitrary -* name to help separate messaging between different sets of scripts. - -Note: If you want to call a function in another script, you should use one of the following rather than -sending a message: - - Entities.callEntityClientMethod - Entities.callEntityMethod - Entities.callEntityServerMethod - Script.callEntityScriptMethod -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Messages API enables text and data to be sent between scripts over named "channels". A channel can have an arbitrary + * name to help separate messaging between different sets of scripts. Note: If you want to call a function in another script, you should use one of the following rather than sending a message: Entities.callEntityClientMethod Entities.callEntityMethod Entities.callEntityServerMethod Script.callEntityScriptMethod + */ declare namespace Messages { - /** - * Send a text message on a channel. - * @param channel {string} The channel to send the message on. - * @param message {string} The message to send. - * @param localOnly {boolean} [localOnly=false] If false then the message is sent to all Interface, client entity, - * server entity, and assignment client scripts in the domain.
- If true then: if sent from an Interface or client entity script it is received by all Interface and - client entity scripts; if sent from a server entity script it is received by all entity server scripts; and if sent - from an assignment client script it is received only by that same assignment client script. - */ - function sendMessage(channel: string, message: string, localOnly: boolean): void; - /** - * Send a text message locally on a channel. - * This is the same as calling Messages.sendMessage with localOnly set to -true. - * @param channel {string} The channel to send the message on. - * @param message {string} The message to send. - */ - function sendLocalMessage(channel: string, message: string): void; - /** - * Send a data message on a channel. - * @param channel {string} The channel to send the data on. - * @param data {object} The data to send. The data is handled as a byte stream, for example as may be provided via a - * JavaScript Int8Array object. - * @param localOnly {boolean} [localOnly=false] If false then the message is sent to all Interface, client entity, - * server entity, and assignment client scripts in the domain.
- If true then: if sent from an Interface or client entity script it is received by all Interface and - client entity scripts; if sent from a server entity script it is received by all entity server scripts; and if sent - from an assignment client script it is received only by that same assignment client script. - */ - function sendData(channel: string, data: object, localOnly: boolean): void; - /** - * Subscribe the scripting environment — Interface, the entity script server, or assignment client instance — - * to receive messages on a specific channel. Note that, for example, if there are two Interface scripts that subscribe to -different channels, both scripts will receive messages on both channels. - * @param channel {string} The channel to subscribe to. - */ - function subscribe(channel: string): void; - /** - * Unsubscribe the scripting environment from receiving messages on a specific channel. - * @param channel {string} The channel to unsubscribe from. - */ - function unsubscribe(channel: string): void; - /** - * Triggered when the a text message is received. - * @param channel {string} The channel that the message was sent on. You can use this to filter out messages not relevant - * to your script. - * @param message {string} The message received. - * @param senderID {Uuid} The UUID of the sender: the user's session UUID if sent by an Interface or client entity - * script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client - instance if sent by an assignment client script. - * @param localOnly {boolean} true if the message was sent with localOnly = true. - * @returns {Signal} - */ - function messageReceived(channel: string, message: string, senderID: Uuid, localOnly: boolean): Signal; - /** - * Triggered when a data message is received. - * @param channel {string} The channel that the message was sent on. You can use this to filter out messages not relevant - * to your script. - * @param data {object} The data received. The data is handled as a byte stream, for example as may be used by a - * JavaScript Int8Array object. - * @param senderID {Uuid} The UUID of the sender: the user's session UUID if sent by an Interface or client entity - * script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client - script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client - instance if sent by an assignment client script. - * @param localOnly {boolean} true if the message was sent with localOnly = true. - * @returns {Signal} - */ - function dataReceived(channel: string, data: object, senderID: Uuid, localOnly: boolean): Signal; + /** + * Send a text message on a channel. + * @param channel {string} The channel to send the message on. + * @param message {string} The message to send. + * @param localOnly {boolean} [localOnly=false] If false then the message is sent to all Interface, client entity, + * server entity, and assignment client scripts in the domain.
If true then: if sent from an Interface or client entity script it is received by all Interface and client entity scripts; if sent from a server entity script it is received by all entity server scripts; and if sent from an assignment client script it is received only by that same assignment client script. + */ + function sendMessage(channel: string, message: string, localOnly: boolean): void; + /** + * Send a text message locally on a channel. + * This is the same as calling Messages.sendMessage with localOnly set to true. + * @param channel {string} The channel to send the message on. + * @param message {string} The message to send. + */ + function sendLocalMessage(channel: string, message: string): void; + /** + * Send a data message on a channel. + * @param channel {string} The channel to send the data on. + * @param data {object} The data to send. The data is handled as a byte stream, for example as may be provided via a + * JavaScript Int8Array object. + * @param localOnly {boolean} [localOnly=false] If false then the message is sent to all Interface, client entity, + * server entity, and assignment client scripts in the domain.
If true then: if sent from an Interface or client entity script it is received by all Interface and client entity scripts; if sent from a server entity script it is received by all entity server scripts; and if sent from an assignment client script it is received only by that same assignment client script. + */ + function sendData(channel: string, data: object, localOnly: boolean): void; + /** + * Subscribe the scripting environment — Interface, the entity script server, or assignment client instance — + * to receive messages on a specific channel. Note that, for example, if there are two Interface scripts that subscribe to different channels, both scripts will receive messages on both channels. + * @param channel {string} The channel to subscribe to. + */ + function subscribe(channel: string): void; + /** + * Unsubscribe the scripting environment from receiving messages on a specific channel. + * @param channel {string} The channel to unsubscribe from. + */ + function unsubscribe(channel: string): void; + /** + * Triggered when the a text message is received. + * @param channel {string} The channel that the message was sent on. You can use this to filter out messages not relevant + * to your script. + * @param message {string} The message received. + * @param senderID {Uuid} The UUID of the sender: the user's session UUID if sent by an Interface or client entity + * script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client instance if sent by an assignment client script. + * @param localOnly {boolean} true if the message was sent with localOnly = true. + * @returns {Signal} + */ + function messageReceived(channel: string, message: string, senderID: Uuid, localOnly: boolean): Signal; + /** + * Triggered when a data message is received. + * @param channel {string} The channel that the message was sent on. You can use this to filter out messages not relevant + * to your script. + * @param data {object} The data received. The data is handled as a byte stream, for example as may be used by a + * JavaScript Int8Array object. + * @param senderID {Uuid} The UUID of the sender: the user's session UUID if sent by an Interface or client entity + * script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client script, the UUID of the entity script server if sent by a server entity script, or the UUID of the assignment client instance if sent by an assignment client script. + * @param localOnly {boolean} true if the message was sent with localOnly = true. + * @returns {Signal} + */ + function dataReceived(channel: string, data: object, senderID: Uuid, localOnly: boolean): Signal; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts -*/ -declare class Resource { - /** - * Release this resource. - */ - release(): void; - /** - * Triggered when download progress for this resource has changed. - * @param bytesReceived {number} Byytes downloaded so far. - * @param bytesTotal {number} Total number of bytes in the resource. - * @returns {Signal} - */ - progressChanged(bytesReceived: number, bytesTotal: number): Signal; - /** - * Triggered when resource loading state has changed. - * @param state {Resource.State} New state. - * @returns {Signal} - */ - stateChanged(state: Resource.State): Signal; -} - -declare namespace Resource { - let State: Resource.State; + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare class ResourceObject { + /** + * Release this resource. + */ + release(): void; + /** + * Triggered when download progress for this resource has changed. + * @param bytesReceived {number} Byytes downloaded so far. + * @param bytesTotal {number} Total number of bytes in the resource. + * @returns {Signal} + */ + progressChanged(bytesReceived: number, bytesTotal: number): Signal; + /** + * Triggered when resource loading state has changed. + * @param state {Resource.State} New state. + * @returns {Signal} + */ + stateChanged(state: Resource.State): Signal; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ declare namespace Resources { - /** - * @param prefix {string} - * @param replacement {string} - */ - function overrideUrlPrefix(prefix: string, replacement: string): void; - /** - * @param prefix {string} - */ - function restoreUrlPrefix(prefix: string): void; + /** + * @param prefix {string} + * @param replacement {string} + */ + function overrideUrlPrefix(prefix: string, replacement: string): void; + /** + * @param prefix {string} + */ + function restoreUrlPrefix(prefix: string): void; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace Steam { - /** - * @returns {boolean} - */ - function isRunning(): boolean; - function openInviteOverlay(): void; - /** - * Read-only. - */ - let running: boolean; + /** + * @returns {boolean} + */ + function isRunning(): boolean; + function openInviteOverlay(): void; + /** + * Read-only. + */ + let running: boolean; } /** -* Available in:Interface ScriptsClient Entity ScriptsEnum for different types of Picks and Pointers. -*/ + * Available in:Interface ScriptsClient Entity ScriptsEnum for different types of Picks and Pointers. + */ declare namespace PickType { - /** - * Ray Picks intersect a ray with the nearest object in front of them, along a given direction. - */ - let Ray: number; - /** - * Stylus Picks provide "tapping" functionality on/into flat surfaces. - */ - let Stylus: number; + /** + * Ray Picks intersect a ray with the nearest object in front of them, along a given direction. + */ + let Ray: number; + /** + * Stylus Picks provide "tapping" functionality on/into flat surfaces. + */ + let Stylus: number; + /** + * Parabola Picks intersect a parabola with the nearest object in front of them, with a given initial velocity and acceleration. + */ + let Parabola: number; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Assets API allows you to communicate with the Asset Browser. -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Assets API allows you to communicate with the Asset Browser. + */ declare namespace Assets { - /** - * @param input {string} - * @returns {boolean} - */ - function isValidPath(input: string): boolean; - /** - * @param input {string} - * @returns {boolean} - */ - function isValidFilePath(input: string): boolean; - /** - * @param input {string} - * @returns {string} - */ - function getATPUrl(input: string): string; - /** - * @param input {string} - * @returns {string} - */ - function extractAssetHash(input: string): string; - /** - * @param input {string} - * @returns {boolean} - */ - function isValidHash(input: string): boolean; - /** - * @param data {} - * @returns {object} - */ - function hashData(data): object; - /** - * @param data {} - * @returns {string} - */ - function hashDataHex(data): string; - /** - * Upload content to the connected domain's asset server. - * @param data {string} content to upload - * @param callback {Assets~uploadDataCallback} called when upload is complete - */ - function uploadData(data: string, callback: Assets~uploadDataCallback): void; - /** - * Download data from the connected domain's asset server. - * @param url {string} URL of asset to download, must be ATP scheme URL. - * @param callback {Assets~downloadDataCallback} - */ - function downloadData(url: string, callback: Assets~downloadDataCallback): void; - /** - * Sets up a path to hash mapping within the connected domain's asset server - * @param path {string} - * @param hash {string} - * @param callback {Assets~setMappingCallback} - */ - function setMapping(path: string, hash: string, callback: Assets~setMappingCallback): void; - /** - * Look up a path to hash mapping within the connected domain's asset server - * @param path {string} - * @param callback {Assets~getMappingCallback} - */ - function getMapping(path: string, callback: Assets~getMappingCallback): void; - /** - * @param path {string} - * @param enabled {boolean} - * @param callback {} - */ - function setBakingEnabled(path: string, enabled: boolean, callback): void; - /** - * Request Asset data from the ATP Server - * @param options {URL} An atp: style URL, hash, or relative mapped path; or an {@link Assets.GetOptions} object with request parameters - * @param scope {Assets~getAssetCallback} A scope callback function to receive (error, results) values - * @param callback {function} [callback=undefined] - */ - function getAsset(options: URL, scope: Assets~getAssetCallback, callback: function): void; - /** - * Upload Asset data to the ATP Server - * @param options {Assets.PutOptions} A PutOptions object with upload parameters - * @param scope[callback {Assets~putAssetCallback} A scoped callback function invoked with (error, results) - * @param callback {function} [callback=undefined] - */ - function putAsset(options: Assets.PutOptions, scope[callback: Assets~putAssetCallback, callback: function): void; - /** - * @param options {} - * @param scope {} - * @param callback {} [callback=""] - */ - function deleteAsset(options, scope, callback): void; - /** - * @param options {} - * @param scope {} - * @param callback {} [callback=""] - */ - function resolveAsset(options, scope, callback): void; - /** - * @param options {} - * @param scope {} - * @param callback {} [callback=""] - */ - function decompressData(options, scope, callback): void; - /** - * @param options {} - * @param scope {} - * @param callback {} [callback=""] - */ - function compressData(options, scope, callback): void; - /** - * @returns {boolean} - */ - function initializeCache(): boolean; - /** - * @param url {string} - * @returns {boolean} - */ - function canWriteCacheValue(url: string): boolean; - /** - * @param scope {} - * @param callback {} [callback=undefined] - */ - function getCacheStatus(scope, callback): void; - /** - * @param options {} - * @param scope {} - * @param callback {} [callback=undefined] - */ - function queryCacheMeta(options, scope, callback): void; - /** - * @param options {} - * @param scope {} - * @param callback {} [callback=undefined] - */ - function loadFromCache(options, scope, callback): void; - /** - * @param options {} - * @param scope {} - * @param callback {} [callback=undefined] - */ - function saveToCache(options, scope, callback): void; - /** - * @param url {} - * @param data {} - * @param metadata {} - * @param scope {} - * @param callback {} [callback=undefined] - */ - function saveToCache(url, data, metadata, scope, callback): void; + /** + * @param input {string} + * @returns {boolean} + */ + function isValidPath(input: string): boolean; + /** + * @param input {string} + * @returns {boolean} + */ + function isValidFilePath(input: string): boolean; + /** + * @param input {string} + * @returns {string} + */ + function getATPUrl(input: string): string; + /** + * @param input {string} + * @returns {string} + */ + function extractAssetHash(input: string): string; + /** + * @param input {string} + * @returns {boolean} + */ + function isValidHash(input: string): boolean; + /** + * @param data {} + * @returns {object} + */ + function hashData(data): object; + /** + * @param data {} + * @returns {string} + */ + function hashDataHex(data): string; + /** + * Upload content to the connected domain's asset server. + * @param data {string} content to upload + * @param callback {Assets~uploadDataCallback} called when upload is complete + */ + function uploadData(data: string, callback: Assets~uploadDataCallback): void; + /** + * Download data from the connected domain's asset server. + * @param url {string} URL of asset to download, must be ATP scheme URL. + * @param callback {Assets~downloadDataCallback} + */ + function downloadData(url: string, callback: Assets~downloadDataCallback): void; + /** + * Sets up a path to hash mapping within the connected domain's asset server + * @param path {string} + * @param hash {string} + * @param callback {Assets~setMappingCallback} + */ + function setMapping(path: string, hash: string, callback: Assets~setMappingCallback): void; + /** + * Look up a path to hash mapping within the connected domain's asset server + * @param path {string} + * @param callback {Assets~getMappingCallback} + */ + function getMapping(path: string, callback: Assets~getMappingCallback): void; + /** + * @param path {string} + * @param enabled {boolean} + * @param callback {} + */ + function setBakingEnabled(path: string, enabled: boolean, callback): void; + /** + * Request Asset data from the ATP Server + * @param options {URL} An atp: style URL, hash, or relative mapped path; or an {@link Assets.GetOptions} object with request parameters + * @param scope {Assets~getAssetCallback} A scope callback function to receive (error, results) values + * @param callback {function} [callback=undefined] + */ + function getAsset(options: URL, scope: Assets~getAssetCallback, callback: function): void; + interface GetOptions { + /** + * an "atp:" style URL, hash, or relative mapped path to fetch + */ + url: string; + /** + * the desired reponse type (text | arraybuffer | json) + */ + responseType: string; + /** + * whether to attempt gunzip decompression on the fetched data + * See: Assets.putAsset and its .compress=true option + */ + decompress: boolean; + } + + interface getAssetResult { + /** + * the resolved "atp:" style URL for the fetched asset + */ + url: string; + /** + * the resolved hash for the fetched asset + */ + hash: string; + /** + * response data (possibly converted per .responseType value) + */ + response: string; + /** + * response type (text | arraybuffer | json) + */ + responseType: string; + /** + * detected asset mime-type (autodetected) + */ + contentType: string; + /** + * response data size in bytes + */ + byteLength: number; + /** + * flag indicating whether data was decompressed + */ + decompressed: number; + } + + /** + * Upload Asset data to the ATP Server + * @param options {Assets.PutOptions} A PutOptions object with upload parameters + * @param scope[callback {Assets~putAssetCallback} A scoped callback function invoked with (error, results) + * @param callback {function} [callback=undefined] + */ + function putAsset(options: Assets.PutOptions, scope[callback: Assets~putAssetCallback, callback: function): void; + interface PutOptions { + /** + * byte buffer or string value representing the new asset's content + */ + data: ArrayBuffer; + /** + * ATP path mapping to automatically create (upon successful upload to hash) + */ + path: string; + /** + * whether to gzip compress data before uploading + */ + compress: boolean; + } + + interface putAssetResult { + /** + * the resolved "atp:" style URL for the uploaded asset (based on .path if specified, otherwise on the resulting ATP hash) + */ + url: string; + /** + * the uploaded asset's resulting ATP path (or undefined if no path mapping was assigned) + */ + path: string; + /** + * the uploaded asset's resulting ATP hash + */ + hash: string; + /** + * flag indicating whether the data was compressed before upload + */ + compressed: boolean; + /** + * flag indicating final byte size of the data uploaded to the ATP server + */ + byteLength: number; + } + + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=""] + */ + function deleteAsset(options, scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=""] + */ + function resolveAsset(options, scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=""] + */ + function decompressData(options, scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=""] + */ + function compressData(options, scope, callback): void; + /** + * @returns {boolean} + */ + function initializeCache(): boolean; + /** + * @param url {string} + * @returns {boolean} + */ + function canWriteCacheValue(url: string): boolean; + /** + * @param scope {} + * @param callback {} [callback=undefined] + */ + function getCacheStatus(scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=undefined] + */ + function queryCacheMeta(options, scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=undefined] + */ + function loadFromCache(options, scope, callback): void; + /** + * @param options {} + * @param scope {} + * @param callback {} [callback=undefined] + */ + function saveToCache(options, scope, callback): void; + /** + * @param url {} + * @param data {} + * @param metadata {} + * @param scope {} + * @param callback {} [callback=undefined] + */ + function saveToCache(url, data, metadata, scope, callback): void; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ declare namespace File { - /** - * @param url {string} - * @returns {string} - */ - function convertUrlToPath(url: string): string; - /** - * @param path {string} - * @param url {string} - * @param autoAdd {boolean} - * @param isZip {boolean} - * @param isBlocks {boolean} - */ - function runUnzip(path: string, url: string, autoAdd: boolean, isZip: boolean, isBlocks: boolean): void; - /** - * @returns {string} - */ - function getTempDir(): string; - /** - * @param zipFile {string} - * @param unzipFile {string} - * @param autoAdd {boolean} - * @param isZip {boolean} - * @param isBlocks {boolean} - * @returns {Signal} - */ - function unzipResult(zipFile: string, unzipFile: string, autoAdd: boolean, isZip: boolean, isBlocks: boolean): Signal; + /** + * @param url {string} + * @returns {string} + */ + function convertUrlToPath(url: string): string; + /** + * @param path {string} + * @param url {string} + * @param autoAdd {boolean} + * @param isZip {boolean} + * @param isBlocks {boolean} + */ + function runUnzip(path: string, url: string, autoAdd: boolean, isZip: boolean, isBlocks: boolean): void; + /** + * @returns {string} + */ + function getTempDir(): string; + /** + * @param zipFile {string} + * @param unzipFile {string} + * @param autoAdd {boolean} + * @param isZip {boolean} + * @param isBlocks {boolean} + * @returns {Signal} + */ + function unzipResult(zipFile: string, unzipFile: string, autoAdd: boolean, isZip: boolean, isBlocks: boolean): Signal; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ declare namespace Mat4 { - /** - * @param m1 {Mat4} - * @param m2 {Mat4} - * @returns {Mat4} - */ - function multiply(m1: Mat4, m2: Mat4): Mat4; - /** - * @param rot {Quat} - * @param trans {Vec3} - * @returns {Mat4} - */ - function createFromRotAndTrans(rot: Quat, trans: Vec3): Mat4; - /** - * @param scale {Vec3} - * @param rot {Quat} - * @param trans {Vec3} - * @returns {Mat4} - */ - function createFromScaleRotAndTrans(scale: Vec3, rot: Quat, trans: Vec3): Mat4; - /** - * @param col0 {Vec4} - * @param col1 {Vec4} - * @param col2 {Vec4} - * @param col {Vec4} - * @returns {Mat4} - */ - function createFromColumns(col0: Vec4, col1: Vec4, col2: Vec4, col: Vec4): Mat4; - /** - * @param numbers {Array.} - * @returns {Mat4} - */ - function createFromArray(numbers: Array.): Mat4; - /** - * @param m {Mat4} - * @returns {Vec3} - */ - function extractTranslation(m: Mat4): Vec3; - /** - * @param m {Mat4} - * @returns {Vec3} - */ - function extractRotation(m: Mat4): Vec3; - /** - * @param m {Mat4} - * @returns {Vec3} - */ - function extractScale(m: Mat4): Vec3; - /** - * @param m {Mat4} - * @param point {Vec3} - * @returns {Vec3} - */ - function transformPoint(m: Mat4, point: Vec3): Vec3; - /** - * @param m {Mat4} - * @param vector {Vec3} - * @returns {Vec3} - */ - function transformVector(m: Mat4, vector: Vec3): Vec3; - /** - * @param m {Mat4} - * @returns {Mat4} - */ - function inverse(m: Mat4): Mat4; - /** - * @param m {Mat4} - * @returns {Vec3} - */ - function getFront(m: Mat4): Vec3; - /** - * @param m {Mat4} - * @returns {Vec3} - */ - function getForward(m: Mat4): Vec3; - /** - * @param m {Mat4} - * @returns {Vec3} - */ - function getRight(m: Mat4): Vec3; - /** - * @param m {Mat4} - * @returns {Vec3} - */ - function getUp(m: Mat4): Vec3; - /** - * @param label {string} - * @param m {Mat4} - * @param transpose {boolean} [transpose=false] - */ - function print(label: string, m: Mat4, transpose: boolean): void; + /** + * @param m1 {Mat4} + * @param m2 {Mat4} + * @returns {Mat4} + */ + function multiply(m1: Mat4, m2: Mat4): Mat4; + /** + * @param rot {Quat} + * @param trans {Vec3} + * @returns {Mat4} + */ + function createFromRotAndTrans(rot: Quat, trans: Vec3): Mat4; + /** + * @param scale {Vec3} + * @param rot {Quat} + * @param trans {Vec3} + * @returns {Mat4} + */ + function createFromScaleRotAndTrans(scale: Vec3, rot: Quat, trans: Vec3): Mat4; + /** + * @param col0 {Vec4} + * @param col1 {Vec4} + * @param col2 {Vec4} + * @param col {Vec4} + * @returns {Mat4} + */ + function createFromColumns(col0: Vec4, col1: Vec4, col2: Vec4, col: Vec4): Mat4; + /** + * @param numbers {Array.} + * @returns {Mat4} + */ + function createFromArray(numbers: Array.): Mat4; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function extractTranslation(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function extractRotation(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function extractScale(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @param point {Vec3} + * @returns {Vec3} + */ + function transformPoint(m: Mat4, point: Vec3): Vec3; + /** + * @param m {Mat4} + * @param vector {Vec3} + * @returns {Vec3} + */ + function transformVector(m: Mat4, vector: Vec3): Vec3; + /** + * @param m {Mat4} + * @returns {Mat4} + */ + function inverse(m: Mat4): Mat4; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function getFront(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function getForward(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function getRight(m: Mat4): Vec3; + /** + * @param m {Mat4} + * @returns {Vec3} + */ + function getUp(m: Mat4): Vec3; + /** + * @param label {string} + * @param m {Mat4} + * @param transpose {boolean} [transpose=false] + */ + function print(label: string, m: Mat4, transpose: boolean): void; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Quat API provides facilities for generating and manipulating quaternions. -* Quaternions should be used in preference to Euler angles wherever possible because quaternions don't suffer from the problem -of gimbal lock. -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Quat API provides facilities for generating and manipulating quaternions. + * Quaternions should be used in preference to Euler angles wherever possible because quaternions don't suffer from the problem of gimbal lock. + */ declare namespace Quat { - /** - * Multiply two quaternions. - * @param q1 {Quat} The first quaternion. - * @param q2 {Quat} The second quaternion. - * @returns {Quat} - */ - function multiply(q1: Quat, q2: Quat): Quat; - /** - * Normalizes a quaternion. - * @param q {Quat} The quaternion to normalize. - * @returns {Quat} - */ - function normalize(q: Quat): Quat; - /** - * Calculate the conjugate of a quaternion. For a unit quaternion, its conjugate is the same as its - * Quat.inverse. - * @param q {Quat} The quaternion to conjugate. - * @returns {Quat} - */ - function conjugate(q: Quat): Quat; - /** - * Calculate a camera orientation given eye position, point of interest, and "up" direction. The camera's negative z-axis is - * the forward direction. The result has zero roll about its forward direction with respect to the given "up" direction. - * @param eye {Vec3} The eye position. - * @param target {Vec3} The point to look at. - * @param up {Vec3} The "up" direction. - * @returns {Quat} - */ - function lookAt(eye: Vec3, target: Vec3, up: Vec3): Quat; - /** - * Calculate a camera orientation given eye position and point of interest. The camera's negative z-axis is the forward - * direction. The result has zero roll about its forward direction. - * @param eye {Vec3} The eye position. - * @param target {Vec3} The point to look at. - * @returns {Quat} - */ - function lookAtSimple(eye: Vec3, target: Vec3): Quat; - /** - * Calculate the shortest rotation from a first vector onto a second. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @returns {Quat} - */ - function rotationBetween(v1: Vec3, v2: Vec3): Quat; - /** - * Generate a quaternion from a Vec3 of Euler angles in degrees. - * @param vector {Vec3} A vector of three Euler angles in degrees, the angles being the rotations about the x, y, and z - * axes. - * @returns {Quat} - */ - function fromVec3Degrees(vector: Vec3): Quat; - /** - * Generate a quaternion from a Vec3 of Euler angles in radians. - * @param vector {Vec3} A vector of three Euler angles in radians, the angles being the rotations about the x, y, and z - * axes. - * @returns {Quat} - */ - function fromVec3Radians(vector: Vec3): Quat; - /** - * Generate a quaternion from pitch, yaw, and roll values in degrees. - * @param pitch {number} The pitch angle in degrees. - * @param yaw {number} The yaw angle in degrees. - * @param roll {number} The roll angle in degrees. - * @returns {Quat} - */ - function fromPitchYawRollDegrees(pitch: number, yaw: number, roll: number): Quat; - /** - * Generate a quaternion from pitch, yaw, and roll values in radians. - * @param pitch {number} The pitch angle in radians. - * @param yaw {number} The yaw angle in radians. - * @param roll {number} The roll angle in radians. - * @returns {Quat} - */ - function fromPitchYawRollRadians(pitch: number, yaw: number, roll: number): Quat; - /** - * Calculate the inverse of a quaternion. For a unit quaternion, its inverse is the same as its - * Quat.conjugate. - * @param q {Quat} The quaternion. - * @returns {Quat} - */ - function inverse(q: Quat): Quat; - /** - * Get the "front" direction that the camera would face if its orientation was set to the quaternion value. - * This is a synonym for Quat.getForward. -The High Fidelity camera has axes x = right, y = up, -z = forward. - * @param orientation {Quat} A quaternion representing an orientation. - * @returns {Vec3} - */ - function getFront(orientation: Quat): Vec3; - /** - * Get the "forward" direction that the camera would face if its orientation was set to the quaternion value. - * This is a synonym for Quat.getFront. -The High Fidelity camera has axes x = right, y = up, -z = forward. - * @param orientation {Quat} A quaternion representing an orientation. - * @returns {Vec3} - */ - function getForward(orientation: Quat): Vec3; - /** - * Get the "right" direction that the camera would have if its orientation was set to the quaternion value. - * The High Fidelity camera has axes x = right, y = up, -z = forward. - * @param orientation {Quat} A quaternion representing an orientation. - * @returns {Vec3} - */ - function getRight(orientation: Quat): Vec3; - /** - * Get the "up" direction that the camera would have if its orientation was set to the quaternion value. - * The High Fidelity camera has axes x = right, y = up, -z = forward. - * @param orientation {Quat} A quaternion representing an orientation. - * @returns {Vec3} - */ - function getUp(orientation: Quat): Vec3; - /** - * Calculate the Euler angles for the quaternion, in degrees. (The "safe" in the name signifies that the angle results will - * not be garbage even when the rotation is particularly difficult to decompose with pitches around +/-90 degrees.) - * @param orientation {Quat} A quaternion representing an orientation. - * @returns {Vec3} - */ - function safeEulerAngles(orientation: Quat): Vec3; - /** - * Generate a quaternion given an angle to rotate through and an axis to rotate about. - * @param angle {number} The angle to rotate through, in degrees. - * @param axis {Vec3} The unit axis to rotate about. - * @returns {Quat} - */ - function angleAxis(angle: number, axis: Vec3): Quat; - /** - * Get the rotation axis for a quaternion. - * @param q {Quat} The quaternion. - * @returns {Vec3} - */ - function axis(q: Quat): Vec3; - /** - * Get the rotation angle for a quaternion. - * @param q {Quat} The quaternion. - * @returns {number} - */ - function angle(q: Quat): number; - /** - * Compute a spherical linear interpolation between two rotations, safely handling two rotations that are very similar. - * See also, Quat.slerp. - * @param q1 {Quat} The beginning rotation. - * @param q2 {Quat} The ending rotation. - * @param alpha {number} The mixture coefficient between 0.0 and 1.0. Specifies the proportion - * of q2's value to return in favor of q1's value. A value of 0.0 returns - q1's value; 1.0 returns q2s's value. - * @returns {Quat} - */ - function mix(q1: Quat, q2: Quat, alpha: number): Quat; - /** - * Compute a spherical linear interpolation between two rotations, for rotations that are not very similar. - * See also, Quat.mix. - * @param q1 {Quat} The beginning rotation. - * @param q2 {Quat} The ending rotation. - * @param alpha {number} The mixture coefficient between 0.0 and 1.0. Specifies the proportion - * of q2's value to return in favor of q1's value. A value of 0.0 returns - q1's value; 1.0 returns q2s's value. - * @returns {Quat} - */ - function slerp(q1: Quat, q2: Quat, alpha: number): Quat; - /** - * Compute a spherical quadrangle interpolation between two rotations along a path oriented toward two other rotations. - * Equivalent to: Quat.slerp(Quat.slerp(q1, q2, alpha), Quat.slerp(s1, s2, alpha), 2 * alpha * (1.0 - alpha)). - * @param q1 {Quat} Initial rotation. - * @param q2 {Quat} Final rotation. - * @param s1 {Quat} First control point. - * @param s2 {Quat} Second control point. - * @param alpha {number} The mixture coefficient between 0.0 and 1.0. A value of - * 0.0 returns q1's value; 1.0 returns q2s's value. - * @returns {Quat} - */ - function squad(q1: Quat, q2: Quat, s1: Quat, s2: Quat, alpha: number): Quat; - /** - * Calculate the dot product of two quaternions. The closer the quaternions are to each other the more non-zero the value is - * (either positive or negative). Identical unit rotations have a dot product of +/- 1. - * @param q1 {Quat} The first quaternion. - * @param q2 {Quat} The second quaternion. - * @returns {number} - */ - function dot(q1: Quat, q2: Quat): number; - /** - * Print to the program log a text label followed by a quaternion's pitch, yaw, and roll Euler angles. - * @param label {string} The label to print. - * @param q {Quat} The quaternion to print. - * @param asDegrees {boolean} [asDegrees=false] If true the angle values are printed in degrees, otherwise they are - * printed in radians. - */ - function print(label: string, q: Quat, asDegrees: boolean): void; - /** - * Test whether two quaternions are equal. Note: The quaternions must be exactly equal in order for - * true to be returned; it is often better to use Quat.dot and test for closeness to +/-1. - * @param q1 {Quat} The first quaternion. - * @param q2 {Quat} The second quaternion. - * @returns {boolean} - */ - function equal(q1: Quat, q2: Quat): boolean; - /** - * Cancels out the roll and pitch component of a quaternion so that its completely horizontal with a yaw pointing in the - * given quaternion's direction. - * @param orientation {Quat} A quaternion representing an orientation. - * @returns {Quat} - */ - function cancelOutRollAndPitch(orientation: Quat): Quat; - /** - * Cancels out the roll component of a quaternion so that its horizontal axis is level. - * @param orientation {Quat} A quaternion representing an orientation. - * @returns {Quat} - */ - function cancelOutRoll(orientation: Quat): Quat; - /** - * { x: 0, y: 0, z: 0, w: 1 } : The identity rotation, i.e., no rotation. - * Read-only. - */ - const IDENTITY: Quat; + /** + * Multiply two quaternions. + * @param q1 {Quat} The first quaternion. + * @param q2 {Quat} The second quaternion. + * @returns {Quat} + */ + function multiply(q1: Quat, q2: Quat): Quat; + /** + * Normalizes a quaternion. + * @param q {Quat} The quaternion to normalize. + * @returns {Quat} + */ + function normalize(q: Quat): Quat; + /** + * Calculate the conjugate of a quaternion. For a unit quaternion, its conjugate is the same as its + * Quat.inverse. + * @param q {Quat} The quaternion to conjugate. + * @returns {Quat} + */ + function conjugate(q: Quat): Quat; + /** + * Calculate a camera orientation given eye position, point of interest, and "up" direction. The camera's negative z-axis is + * the forward direction. The result has zero roll about its forward direction with respect to the given "up" direction. + * @param eye {Vec3} The eye position. + * @param target {Vec3} The point to look at. + * @param up {Vec3} The "up" direction. + * @returns {Quat} + */ + function lookAt(eye: Vec3, target: Vec3, up: Vec3): Quat; + /** + * Calculate a camera orientation given eye position and point of interest. The camera's negative z-axis is the forward + * direction. The result has zero roll about its forward direction. + * @param eye {Vec3} The eye position. + * @param target {Vec3} The point to look at. + * @returns {Quat} + */ + function lookAtSimple(eye: Vec3, target: Vec3): Quat; + /** + * Calculate the shortest rotation from a first vector onto a second. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {Quat} + */ + function rotationBetween(v1: Vec3, v2: Vec3): Quat; + /** + * Generate a quaternion from a Vec3 of Euler angles in degrees. + * @param vector {Vec3} A vector of three Euler angles in degrees, the angles being the rotations about the x, y, and z + * axes. + * @returns {Quat} + */ + function fromVec3Degrees(vector: Vec3): Quat; + /** + * Generate a quaternion from a Vec3 of Euler angles in radians. + * @param vector {Vec3} A vector of three Euler angles in radians, the angles being the rotations about the x, y, and z + * axes. + * @returns {Quat} + */ + function fromVec3Radians(vector: Vec3): Quat; + /** + * Generate a quaternion from pitch, yaw, and roll values in degrees. + * @param pitch {number} The pitch angle in degrees. + * @param yaw {number} The yaw angle in degrees. + * @param roll {number} The roll angle in degrees. + * @returns {Quat} + */ + function fromPitchYawRollDegrees(pitch: number, yaw: number, roll: number): Quat; + /** + * Generate a quaternion from pitch, yaw, and roll values in radians. + * @param pitch {number} The pitch angle in radians. + * @param yaw {number} The yaw angle in radians. + * @param roll {number} The roll angle in radians. + * @returns {Quat} + */ + function fromPitchYawRollRadians(pitch: number, yaw: number, roll: number): Quat; + /** + * Calculate the inverse of a quaternion. For a unit quaternion, its inverse is the same as its + * Quat.conjugate. + * @param q {Quat} The quaternion. + * @returns {Quat} + */ + function inverse(q: Quat): Quat; + /** + * Get the "front" direction that the camera would face if its orientation was set to the quaternion value. + * This is a synonym for Quat.getForward. The High Fidelity camera has axes x = right, y = up, -z = forward. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Vec3} + */ + function getFront(orientation: Quat): Vec3; + /** + * Get the "forward" direction that the camera would face if its orientation was set to the quaternion value. + * This is a synonym for Quat.getFront. The High Fidelity camera has axes x = right, y = up, -z = forward. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Vec3} + */ + function getForward(orientation: Quat): Vec3; + /** + * Get the "right" direction that the camera would have if its orientation was set to the quaternion value. + * The High Fidelity camera has axes x = right, y = up, -z = forward. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Vec3} + */ + function getRight(orientation: Quat): Vec3; + /** + * Get the "up" direction that the camera would have if its orientation was set to the quaternion value. + * The High Fidelity camera has axes x = right, y = up, -z = forward. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Vec3} + */ + function getUp(orientation: Quat): Vec3; + /** + * Calculate the Euler angles for the quaternion, in degrees. (The "safe" in the name signifies that the angle results will + * not be garbage even when the rotation is particularly difficult to decompose with pitches around +/-90 degrees.) + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Vec3} + */ + function safeEulerAngles(orientation: Quat): Vec3; + /** + * Generate a quaternion given an angle to rotate through and an axis to rotate about. + * @param angle {number} The angle to rotate through, in degrees. + * @param axis {Vec3} The unit axis to rotate about. + * @returns {Quat} + */ + function angleAxis(angle: number, axis: Vec3): Quat; + /** + * Get the rotation axis for a quaternion. + * @param q {Quat} The quaternion. + * @returns {Vec3} + */ + function axis(q: Quat): Vec3; + /** + * Get the rotation angle for a quaternion. + * @param q {Quat} The quaternion. + * @returns {number} + */ + function angle(q: Quat): number; + /** + * Compute a spherical linear interpolation between two rotations, safely handling two rotations that are very similar. + * See also, Quat.slerp. + * @param q1 {Quat} The beginning rotation. + * @param q2 {Quat} The ending rotation. + * @param alpha {number} The mixture coefficient between 0.0 and 1.0. Specifies the proportion + * of q2's value to return in favor of q1's value. A value of 0.0 returns q1's value; 1.0 returns q2s's value. + * @returns {Quat} + */ + function mix(q1: Quat, q2: Quat, alpha: number): Quat; + /** + * Compute a spherical linear interpolation between two rotations, for rotations that are not very similar. + * See also, Quat.mix. + * @param q1 {Quat} The beginning rotation. + * @param q2 {Quat} The ending rotation. + * @param alpha {number} The mixture coefficient between 0.0 and 1.0. Specifies the proportion + * of q2's value to return in favor of q1's value. A value of 0.0 returns q1's value; 1.0 returns q2s's value. + * @returns {Quat} + */ + function slerp(q1: Quat, q2: Quat, alpha: number): Quat; + /** + * Compute a spherical quadrangle interpolation between two rotations along a path oriented toward two other rotations. + * Equivalent to: Quat.slerp(Quat.slerp(q1, q2, alpha), Quat.slerp(s1, s2, alpha), 2 * alpha * (1.0 - alpha)). + * @param q1 {Quat} Initial rotation. + * @param q2 {Quat} Final rotation. + * @param s1 {Quat} First control point. + * @param s2 {Quat} Second control point. + * @param alpha {number} The mixture coefficient between 0.0 and 1.0. A value of + * 0.0 returns q1's value; 1.0 returns q2s's value. + * @returns {Quat} + */ + function squad(q1: Quat, q2: Quat, s1: Quat, s2: Quat, alpha: number): Quat; + /** + * Calculate the dot product of two quaternions. The closer the quaternions are to each other the more non-zero the value is + * (either positive or negative). Identical unit rotations have a dot product of +/- 1. + * @param q1 {Quat} The first quaternion. + * @param q2 {Quat} The second quaternion. + * @returns {number} + */ + function dot(q1: Quat, q2: Quat): number; + /** + * Print to the program log a text label followed by a quaternion's pitch, yaw, and roll Euler angles. + * @param label {string} The label to print. + * @param q {Quat} The quaternion to print. + * @param asDegrees {boolean} [asDegrees=false] If true the angle values are printed in degrees, otherwise they are + * printed in radians. + */ + function print(label: string, q: Quat, asDegrees: boolean): void; + /** + * Test whether two quaternions are equal. Note: The quaternions must be exactly equal in order for + * true to be returned; it is often better to use Quat.dot and test for closeness to +/-1. + * @param q1 {Quat} The first quaternion. + * @param q2 {Quat} The second quaternion. + * @returns {boolean} + */ + function equal(q1: Quat, q2: Quat): boolean; + /** + * Cancels out the roll and pitch component of a quaternion so that its completely horizontal with a yaw pointing in the + * given quaternion's direction. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Quat} + */ + function cancelOutRollAndPitch(orientation: Quat): Quat; + /** + * Cancels out the roll component of a quaternion so that its horizontal axis is level. + * @param orientation {Quat} A quaternion representing an orientation. + * @returns {Quat} + */ + function cancelOutRoll(orientation: Quat): Quat; + /** + * { x: 0, y: 0, z: 0, w: 1 } : The identity rotation, i.e., no rotation. + * Read-only. + */ + const IDENTITY: Quat; } /** -* Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts -*/ + * Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts + */ declare namespace Recording { - /** - * @param url {string} - * @param callback {Recording~loadRecordingCallback} [callback=null] - */ - function loadRecording(url: string, callback: Recording~loadRecordingCallback): void; - function startPlaying(): void; - function pausePlayer(): void; - function stopPlaying(): void; - /** - * @returns {boolean} - */ - function isPlaying(): boolean; - /** - * @returns {boolean} - */ - function isPaused(): boolean; - /** - * @returns {number} - */ - function playerElapsed(): number; - /** - * @returns {number} - */ - function playerLength(): number; - /** - * @param volume {number} - */ - function setPlayerVolume(volume: number): void; - /** - * @param audioOffset {number} - */ - function setPlayerAudioOffset(audioOffset: number): void; - /** - * @param time {number} - */ - function setPlayerTime(time: number): void; - /** - * @param loop {boolean} - */ - function setPlayerLoop(loop: boolean): void; - /** - * @param useDisplayName {boolean} - */ - function setPlayerUseDisplayName(useDisplayName: boolean): void; - /** - * @param useAttachments {boolean} - */ - function setPlayerUseAttachments(useAttachments: boolean): void; - /** - * @param useHeadModel {boolean} - */ - function setPlayerUseHeadModel(useHeadModel: boolean): void; - /** - * @param useSkeletonModel {boolean} - */ - function setPlayerUseSkeletonModel(useSkeletonModel: boolean): void; - /** - * @param playFromCurrentLocation {boolean} - */ - function setPlayFromCurrentLocation(playFromCurrentLocation: boolean): void; - /** - * @returns {boolean} - */ - function getPlayerUseDisplayName(): boolean; - /** - * @returns {boolean} - */ - function getPlayerUseAttachments(): boolean; - /** - * @returns {boolean} - */ - function getPlayerUseHeadModel(): boolean; - /** - * @returns {boolean} - */ - function getPlayerUseSkeletonModel(): boolean; - /** - * @returns {boolean} - */ - function getPlayFromCurrentLocation(): boolean; - function startRecording(): void; - function stopRecording(): void; - /** - * @returns {boolean} - */ - function isRecording(): boolean; - /** - * @returns {number} - */ - function recorderElapsed(): number; - /** - * @returns {string} - */ - function getDefaultRecordingSaveDirectory(): string; - /** - * @param filename {string} - */ - function saveRecording(filename: string): void; - /** - * @param getClipAtpUrl {function} - */ - function saveRecordingToAsset(getClipAtpUrl: function): void; - function loadLastRecording(): void; + /** + * @param url {string} + * @param callback {Recording~loadRecordingCallback} [callback=null] + */ + function loadRecording(url: string, callback: Recording~loadRecordingCallback): void; + function startPlaying(): void; + function pausePlayer(): void; + function stopPlaying(): void; + /** + * @returns {boolean} + */ + function isPlaying(): boolean; + /** + * @returns {boolean} + */ + function isPaused(): boolean; + /** + * @returns {number} + */ + function playerElapsed(): number; + /** + * @returns {number} + */ + function playerLength(): number; + /** + * @param volume {number} + */ + function setPlayerVolume(volume: number): void; + /** + * @param audioOffset {number} + */ + function setPlayerAudioOffset(audioOffset: number): void; + /** + * @param time {number} + */ + function setPlayerTime(time: number): void; + /** + * @param loop {boolean} + */ + function setPlayerLoop(loop: boolean): void; + /** + * @param useDisplayName {boolean} + */ + function setPlayerUseDisplayName(useDisplayName: boolean): void; + /** + * @param useAttachments {boolean} + */ + function setPlayerUseAttachments(useAttachments: boolean): void; + /** + * @param useHeadModel {boolean} + */ + function setPlayerUseHeadModel(useHeadModel: boolean): void; + /** + * @param useSkeletonModel {boolean} + */ + function setPlayerUseSkeletonModel(useSkeletonModel: boolean): void; + /** + * @param playFromCurrentLocation {boolean} + */ + function setPlayFromCurrentLocation(playFromCurrentLocation: boolean): void; + /** + * @returns {boolean} + */ + function getPlayerUseDisplayName(): boolean; + /** + * @returns {boolean} + */ + function getPlayerUseAttachments(): boolean; + /** + * @returns {boolean} + */ + function getPlayerUseHeadModel(): boolean; + /** + * @returns {boolean} + */ + function getPlayerUseSkeletonModel(): boolean; + /** + * @returns {boolean} + */ + function getPlayFromCurrentLocation(): boolean; + function startRecording(): void; + function stopRecording(): void; + /** + * @returns {boolean} + */ + function isRecording(): boolean; + /** + * @returns {number} + */ + function recorderElapsed(): number; + /** + * @returns {string} + */ + function getDefaultRecordingSaveDirectory(): string; + /** + * @param filename {string} + */ + function saveRecording(filename: string): void; + /** + * @param getClipAtpUrl {function} + */ + function saveRecordingToAsset(getClipAtpUrl: function): void; + function loadLastRecording(): void; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare class Stage { } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace Scene { - /** - * @param shouldRenderAvatars {boolean} - * @returns {Signal} - */ - function shouldRenderAvatarsChanged(shouldRenderAvatars: boolean): Signal; - /** - * @param shouldRenderEntities {boolean} - * @returns {Signal} - */ - function shouldRenderEntitiesChanged(shouldRenderEntities: boolean): Signal; - let shouldRenderAvatars: boolean; - let shouldRenderEntities: boolean; - let stage: Scene.Stage; + /** + * @param shouldRenderAvatars {boolean} + * @returns {Signal} + */ + function shouldRenderAvatarsChanged(shouldRenderAvatars: boolean): Signal; + /** + * @param shouldRenderEntities {boolean} + * @returns {Signal} + */ + function shouldRenderEntitiesChanged(shouldRenderEntities: boolean): Signal; + let shouldRenderAvatars: boolean; + let shouldRenderEntities: boolean; + let stage: Scene.Stage; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsPlays — "injects" — the content of an audio file. Used in the Audio API. + */ +declare class AudioInjector { + interface AudioInjectorOptions { + /** + * The position in the domain to play the sound. + */ + position: Vec3; + /** + * The orientation in the domain to play the sound in. + */ + orientation: Quat; + /** + * Playback volume, between 0.0 and 1.0. + */ + volume: number; + /** + * Alter the pitch of the sound, within +/- 2 octaves. The value is the relative sample rate to + * resample the sound at, range 0.0625 – 16.0. A value of 0.0625 lowers the pitch by 2 octaves; 1.0 is no change in pitch; 16.0 raises the pitch by 2 octaves. + */ + pitch: number; + /** + * If true, the sound is played repeatedly until playback is stopped. + */ + loop: boolean; + /** + * Starts playback from a specified time (seconds) within the sound file, ≥ + * 0. + */ + secondOffset: number; + /** + * IF true, the sound is played back locally on the client rather than to + * others via the audio mixer. + */ + localOnly: boolean; + /** + * Deprecated: This property is deprecated and will be + * removed. + */ + ignorePenumbra: boolean; + } + + /** + * Stop current playback, if any, and start playing from the beginning. + */ + restart(): void; + /** + * Stop audio playback. + */ + stop(): void; + /** + * Get the current configuration of the audio injector. + * @returns {AudioInjector.AudioInjectorOptions} + */ + getOptions(): AudioInjector.AudioInjectorOptions; + /** + * Configure how the injector plays the audio. + * @param options {AudioInjector.AudioInjectorOptions} Configuration of how the injector plays the audio. + */ + setOptions(options: AudioInjector.AudioInjectorOptions): void; + /** + * Get the loudness of the most recent frame of audio played. + * @returns {number} + */ + getLoudness(): number; + /** + * Get whether or not the audio is currently playing. + * @returns {boolean} + */ + isPlaying(): boolean; + /** + * Triggered when the audio has finished playing. + * @returns {Signal} + */ + finished(): Signal; + /** + * Stop audio playback. (Synonym of AudioInjector.stop.) + */ + stopInjectorImmediately(): void; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ +declare namespace Resource { + interface State { + /** + * The resource is queued up, waiting to be loaded. + */ + QUEUED: number; + /** + * The resource is downloading. + */ + LOADING: number; + /** + * The resource has finished downloaded by is not complete. + */ + LOADED: number; + /** + * The resource has completely finished loading and is ready. + */ + FINISHED: number; + /** + * Downloading the resource has failed. + */ + FAILED: number; + } + + let State: Resource.State; +} + +/** + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client Scripts + */ declare namespace Script { - /** - * Stop the current script. - * @param marshal {boolean} [marshal=false] - */ - function stop(marshal: boolean): void; - /** - * @param name {string} - * @param object {object} - */ - function registerGlobalObject(name: string, object: object): void; - /** - * @param name {string} - * @param getter {object} - * @param setter {object} - * @param parent {string} [parent=""] - */ - function registerGetterSetter(name: string, getter: object, setter: object, parent: string): void; - /** - * @param name {string} - * @param function {object} - * @param numArguments {number} [numArguments=-1] - */ - function registerFunction(name: string, function: object, numArguments: number): void; - /** - * @param parent {string} - * @param name {string} - * @param function {object} - * @param numArguments {number} [numArguments=-1] - */ - function registerFunction(parent: string, name: string, function: object, numArguments: number): void; - /** - * @param name {string} - * @param value {object} - */ - function registerValue(name: string, value: object): void; - /** - * @param program {string} - * @param filename {string} - * @param lineNumber {number} [lineNumber=-1] - * @returns {object} - */ - function evaluate(program: string, filename: string, lineNumber: number): object; - /** - * @param locals {object} - * @param program {object} - * @returns {object} - */ - function evaluateInClosure(locals: object, program: object): object; - /** - * @returns {string} - */ - function getContext(): string; - /** - * @returns {boolean} - */ - function isClientScript(): boolean; - /** - * @returns {boolean} - */ - function isEntityClientScript(): boolean; - /** - * @returns {boolean} - */ - function isEntityServerScript(): boolean; - /** - * @returns {boolean} - */ - function isAgentScript(): boolean; - /** - * @param entityID {Uuid} - * @param eventName {string} - * @param handler {function} - */ - function addEventHandler(entityID: Uuid, eventName: string, handler: function): void; - /** - * @param entityID {Uuid} - * @param eventName {string} - * @param handler {function} - */ - function removeEventHandler(entityID: Uuid, eventName: string, handler: function): void; - /** - * Start a new Interface or entity script. - * @param filename {string} The URL of the script to load. Can be relative to the current script. - */ - function load(filename: string): void; - /** - * Include JavaScript from other files in the current script. If a callback is specified the files are loaded and included - * asynchronously, otherwise they are included synchronously (i.e., script execution blocks while the files are included). - * @param filenames {Array.} The URLs of the scripts to include. Each can be relative to the current script. - * @param callback {function} [callback=null] The function to call back when the scripts have been included. Can be an in-line - * function or the name of a function. - */ - function include(filenames: Array., callback: function): void; - /** - * Include JavaScript from another file in the current script. If a callback is specified the file is loaded and included - * asynchronously, otherwise it is included synchronously (i.e., script execution blocks while the file is included). - * @param filename {string} The URL of the script to include. Can be relative to the current script. - * @param callback {function} [callback=null] The function to call back when the script has been included. Can be an in-line - * function or the name of a function. - */ - function include(filename: string, callback: function): void; - /** - * @param module {string} - */ - function require(module: string): void; - /** - * @param deleteScriptCache {boolean} [deleteScriptCache=false] - */ - function resetModuleCache(deleteScriptCache: boolean): void; - /** - * Call a function at a set interval. - * @param function {function} The function to call. Can be an in-line function or the name of a function. - * @param interval {number} The interval at which to call the function, in ms. - * @returns {object} - */ - function setInterval(function: function, interval: number): object; - /** - * Call a function after a delay. - * @param function {function} The function to call. Can be an in-line function or the name of a function. - * @param timeout {number} The delay after which to call the function, in ms. - * @returns {object} - */ - function setTimeout(function: function, timeout: number): object; - /** - * Stop an interval timer set by Script.setInterval. - * @param timer {object} The interval timer to clear. - */ - function clearInterval(timer: object): void; - /** - * Clear a timeout timer set by Script.setTimeout. - * @param timer {object} The timeout timer to clear. - */ - function clearTimeout(timer: object): void; - /** - * @param message {string} - */ - function print(message: string): void; - /** - * Resolve a relative path to an absolute path. - * @param path {string} The relative path to resolve. - * @returns {string} - */ - function resolvePath(path: string): string; - /** - * @returns {string} - */ - function resourcesPath(): string; - /** - * @param label {string} - */ - function beginProfileRange(label: string): void; - /** - * @param label {string} - */ - function endProfileRange(label: string): void; - /** - * @param entityID {Uuid} - * @returns {boolean} - */ - function isEntityScriptRunning(entityID: Uuid): boolean; - /** - * @param entityID {Uuid} - * @param script {string} - * @param forceRedownload {boolean} - */ - function loadEntityScript(entityID: Uuid, script: string, forceRedownload: boolean): void; - /** - * @param entityID {Uuid} - * @param shouldRemoveFromMap {boolean} [shouldRemoveFromMap=false] - */ - function unloadEntityScript(entityID: Uuid, shouldRemoveFromMap: boolean): void; - function unloadAllEntityScripts(): void; - /** - * @param entityID {Uuid} - * @param methodName {string} - * @param parameters {Array.} - * @param remoteCallerID {Uuid} [remoteCallerID=Uuid.NULL] - */ - function callEntityScriptMethod(entityID: Uuid, methodName: string, parameters: Array., remoteCallerID: Uuid): void; - /** - * @param entityID {Uuid} - * @param methodName {string} - * @param event {PointerEvent} - */ - function callEntityScriptMethod(entityID: Uuid, methodName: string, event: PointerEvent): void; - /** - * @param entityID {Uuid} - * @param methodName {string} - * @param otherID {Uuid} - * @param collision {Collision} - */ - function callEntityScriptMethod(entityID: Uuid, methodName: string, otherID: Uuid, collision: Collision): void; - function requestGarbageCollection(): void; - /** - * @returns {Uuid} - */ - function generateUUID(): Uuid; - /** - * @param callback {function} - * @param parameters {object} - * @param names {Array.} - * @param useNames {boolean} - * @param resultHandler {object} - */ - function callAnimationStateHandler(callback: function, parameters: object, names: Array., useNames: boolean, resultHandler: object): void; - /** - * @param deltaSize {number} - */ - function updateMemoryCost(deltaSize: number): void; - /** - * @param filename {string} - * @returns {Signal} - */ - function scriptLoaded(filename: string): Signal; - /** - * @param filename {string} - * @returns {Signal} - */ - function errorLoadingScript(filename: string): Signal; - /** - * Triggered regularly at a system-determined frequency. - * @param deltaTime {number} The time since the last update, in s. - * @returns {Signal} - */ - function update(deltaTime: number): Signal; - /** - * Triggered when the script is ending. - * @returns {Signal} - */ - function scriptEnding(): Signal; - /** - * @param filename {string} - * @param engine {object} - * @returns {Signal} - */ - function finished(filename: string, engine: object): Signal; - /** - * @param menuItem {string} - * @returns {Signal} - */ - function cleanupMenuItem(menuItem: string): Signal; - /** - * @param message {string} - * @param scriptName {string} - * @returns {Signal} - */ - function printedMessage(message: string, scriptName: string): Signal; - /** - * @param message {string} - * @param scriptName {string} - * @returns {Signal} - */ - function errorMessage(message: string, scriptName: string): Signal; - /** - * @param message {string} - * @param scriptName {string} - * @returns {Signal} - */ - function warningMessage(message: string, scriptName: string): Signal; - /** - * @param message {string} - * @param scriptName {string} - * @returns {Signal} - */ - function infoMessage(message: string, scriptName: string): Signal; - /** - * @returns {Signal} - */ - function runningStateChanged(): Signal; - /** - * @returns {Signal} - */ - function clearDebugWindow(): Signal; - /** - * @param scriptName {string} - * @param isUserLoaded {boolean} - * @returns {Signal} - */ - function loadScript(scriptName: string, isUserLoaded: boolean): Signal; - /** - * @param scriptName {string} - * @param isUserLoaded {boolean} - * @returns {Signal} - */ - function reloadScript(scriptName: string, isUserLoaded: boolean): Signal; - /** - * @returns {Signal} - */ - function doneRunning(): Signal; - /** - * @returns {Signal} - */ - function entityScriptDetailsUpdated(): Signal; - /** - * @param function {object} - * @param type {ConnectionType} [type=2] - */ - function executeOnScriptThread(function: object, type: ConnectionType): void; - /** - * @param module {string} - * @param relativeTo {string} [relativeTo=""] - * @returns {string} - */ - function _requireResolve(module: string, relativeTo: string): string; - /** - * @param entityID {Uuid} - * @param scriptOrURL {string} - * @param contents {string} - * @param isURL {boolean} - * @param success {boolean} - * @param status {string} - */ - function entityScriptContentAvailable(entityID: Uuid, scriptOrURL: string, contents: string, isURL: boolean, success: boolean, status: string): void; - let context: string; + /** + * Stop the current script. + * @param marshal {boolean} [marshal=false] + */ + function stop(marshal: boolean): void; + /** + * @param name {string} + * @param object {object} + */ + function registerGlobalObject(name: string, object: object): void; + /** + * @param name {string} + * @param getter {object} + * @param setter {object} + * @param parent {string} [parent=""] + */ + function registerGetterSetter(name: string, getter: object, setter: object, parent: string): void; + /** + * @param name {string} + * @param function {object} + * @param numArguments {number} [numArguments=-1] + */ + function registerFunction(name: string, function: object, numArguments: number): void; + /** + * @param parent {string} + * @param name {string} + * @param function {object} + * @param numArguments {number} [numArguments=-1] + */ + function registerFunction(parent: string, name: string, function: object, numArguments: number): void; + /** + * @param name {string} + * @param value {object} + */ + function registerValue(name: string, value: object): void; + /** + * @param program {string} + * @param filename {string} + * @param lineNumber {number} [lineNumber=-1] + * @returns {object} + */ + function evaluate(program: string, filename: string, lineNumber: number): object; + /** + * @param locals {object} + * @param program {object} + * @returns {object} + */ + function evaluateInClosure(locals: object, program: object): object; + /** + * @returns {string} + */ + function getContext(): string; + /** + * @returns {boolean} + */ + function isClientScript(): boolean; + /** + * @returns {boolean} + */ + function isDebugMode(): boolean; + /** + * @returns {boolean} + */ + function isEntityClientScript(): boolean; + /** + * @returns {boolean} + */ + function isEntityServerScript(): boolean; + /** + * @returns {boolean} + */ + function isAgentScript(): boolean; + /** + * @param entityID {Uuid} + * @param eventName {string} + * @param handler {function} + */ + function addEventHandler(entityID: Uuid, eventName: string, handler: function): void; + /** + * @param entityID {Uuid} + * @param eventName {string} + * @param handler {function} + */ + function removeEventHandler(entityID: Uuid, eventName: string, handler: function): void; + /** + * Start a new Interface or entity script. + * @param filename {string} The URL of the script to load. Can be relative to the current script. + */ + function load(filename: string): void; + /** + * Include JavaScript from other files in the current script. If a callback is specified the files are loaded and included + * asynchronously, otherwise they are included synchronously (i.e., script execution blocks while the files are included). + * @param filenames {Array.} The URLs of the scripts to include. Each can be relative to the current script. + * @param callback {function} [callback=null] The function to call back when the scripts have been included. Can be an in-line + * function or the name of a function. + */ + function include(filenames: Array., callback: function): void; + /** + * Include JavaScript from another file in the current script. If a callback is specified the file is loaded and included + * asynchronously, otherwise it is included synchronously (i.e., script execution blocks while the file is included). + * @param filename {string} The URL of the script to include. Can be relative to the current script. + * @param callback {function} [callback=null] The function to call back when the script has been included. Can be an in-line + * function or the name of a function. + */ + function include(filename: string, callback: function): void; + /** + * @param module {string} + */ + function require(module: string): void; + /** + * @param deleteScriptCache {boolean} [deleteScriptCache=false] + */ + function resetModuleCache(deleteScriptCache: boolean): void; + /** + * Call a function at a set interval. + * @param function {function} The function to call. Can be an in-line function or the name of a function. + * @param interval {number} The interval at which to call the function, in ms. + * @returns {object} + */ + function setInterval(function: function, interval: number): object; + /** + * Call a function after a delay. + * @param function {function} The function to call. Can be an in-line function or the name of a function. + * @param timeout {number} The delay after which to call the function, in ms. + * @returns {object} + */ + function setTimeout(function: function, timeout: number): object; + /** + * Stop an interval timer set by Script.setInterval. + * @param timer {object} The interval timer to clear. + */ + function clearInterval(timer: object): void; + /** + * Clear a timeout timer set by Script.setTimeout. + * @param timer {object} The timeout timer to clear. + */ + function clearTimeout(timer: object): void; + /** + * @param message {string} + */ + function print(message: string): void; + /** + * Resolve a relative path to an absolute path. + * @param path {string} The relative path to resolve. + * @returns {string} + */ + function resolvePath(path: string): string; + /** + * @returns {string} + */ + function resourcesPath(): string; + /** + * @param label {string} + */ + function beginProfileRange(label: string): void; + /** + * @param label {string} + */ + function endProfileRange(label: string): void; + /** + * @param entityID {Uuid} + * @returns {boolean} + */ + function isEntityScriptRunning(entityID: Uuid): boolean; + /** + * @param entityID {Uuid} + * @param script {string} + * @param forceRedownload {boolean} + */ + function loadEntityScript(entityID: Uuid, script: string, forceRedownload: boolean): void; + /** + * @param entityID {Uuid} + * @param shouldRemoveFromMap {boolean} [shouldRemoveFromMap=false] + */ + function unloadEntityScript(entityID: Uuid, shouldRemoveFromMap: boolean): void; + function unloadAllEntityScripts(): void; + /** + * @param entityID {Uuid} + * @param methodName {string} + * @param parameters {Array.} + * @param remoteCallerID {Uuid} [remoteCallerID=Uuid.NULL] + */ + function callEntityScriptMethod(entityID: Uuid, methodName: string, parameters: Array., remoteCallerID: Uuid): void; + /** + * @param entityID {Uuid} + * @param methodName {string} + * @param event {PointerEvent} + */ + function callEntityScriptMethod(entityID: Uuid, methodName: string, event: PointerEvent): void; + /** + * @param entityID {Uuid} + * @param methodName {string} + * @param otherID {Uuid} + * @param collision {Collision} + */ + function callEntityScriptMethod(entityID: Uuid, methodName: string, otherID: Uuid, collision: Collision): void; + function requestGarbageCollection(): void; + /** + * @returns {Uuid} + */ + function generateUUID(): Uuid; + /** + * @param callback {function} + * @param parameters {object} + * @param names {Array.} + * @param useNames {boolean} + * @param resultHandler {object} + */ + function callAnimationStateHandler(callback: function, parameters: object, names: Array., useNames: boolean, resultHandler: object): void; + /** + * @param deltaSize {number} + */ + function updateMemoryCost(deltaSize: number): void; + /** + * @param filename {string} + * @returns {Signal} + */ + function scriptLoaded(filename: string): Signal; + /** + * @param filename {string} + * @returns {Signal} + */ + function errorLoadingScript(filename: string): Signal; + /** + * Triggered regularly at a system-determined frequency. + * @param deltaTime {number} The time since the last update, in s. + * @returns {Signal} + */ + function update(deltaTime: number): Signal; + /** + * Triggered when the script is ending. + * @returns {Signal} + */ + function scriptEnding(): Signal; + /** + * @param filename {string} + * @param engine {object} + * @returns {Signal} + */ + function finished(filename: string, engine: object): Signal; + /** + * @param menuItem {string} + * @returns {Signal} + */ + function cleanupMenuItem(menuItem: string): Signal; + /** + * @param message {string} + * @param scriptName {string} + * @returns {Signal} + */ + function printedMessage(message: string, scriptName: string): Signal; + /** + * @param message {string} + * @param scriptName {string} + * @returns {Signal} + */ + function errorMessage(message: string, scriptName: string): Signal; + /** + * @param message {string} + * @param scriptName {string} + * @returns {Signal} + */ + function warningMessage(message: string, scriptName: string): Signal; + /** + * @param message {string} + * @param scriptName {string} + * @returns {Signal} + */ + function infoMessage(message: string, scriptName: string): Signal; + /** + * @returns {Signal} + */ + function runningStateChanged(): Signal; + /** + * @returns {Signal} + */ + function clearDebugWindow(): Signal; + /** + * @param scriptName {string} + * @param isUserLoaded {boolean} + * @returns {Signal} + */ + function loadScript(scriptName: string, isUserLoaded: boolean): Signal; + /** + * @param scriptName {string} + * @param isUserLoaded {boolean} + * @returns {Signal} + */ + function reloadScript(scriptName: string, isUserLoaded: boolean): Signal; + /** + * @returns {Signal} + */ + function doneRunning(): Signal; + /** + * @returns {Signal} + */ + function entityScriptDetailsUpdated(): Signal; + /** + * @returns {Signal} + */ + function entityScriptPreloadFinished(): Signal; + /** + * @param function {object} + * @param type {ConnectionType} [type=2] + */ + function executeOnScriptThread(function: object, type: ConnectionType): void; + /** + * @param module {string} + * @param relativeTo {string} [relativeTo=""] + * @returns {string} + */ + function _requireResolve(module: string, relativeTo: string): string; + /** + * @param entityID {Uuid} + * @param scriptOrURL {string} + * @param contents {string} + * @param isURL {boolean} + * @param success {boolean} + * @param status {string} + */ + function entityScriptContentAvailable(entityID: Uuid, scriptOrURL: string, contents: string, isURL: boolean, success: boolean, status: string): void; + let context: string; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace ScriptDiscoveryService { - /** - * @param filename {string} - */ - function loadOneScript(filename: string): void; - /** - * @param filename {string} [filename=""] - * @param isUserLoaded {boolean} [isUserLoaded=true] - * @param loadScriptFromEditor {boolean} [loadScriptFromEditor=false] - * @param activateMainWindow {boolean} [activateMainWindow=false] - * @param reload {boolean} [reload=false] - * @param quitWhenFinished {boolean} [quitWhenFinished=false] - * @returns {boolean} - */ - function loadScript(filename: string, isUserLoaded: boolean, loadScriptFromEditor: boolean, activateMainWindow: boolean, reload: boolean, quitWhenFinished: boolean): boolean; - /** - * @param scriptHash {string} - * @param restart {boolean} [restart=false] - * @returns {boolean} - */ - function stopScript(scriptHash: string, restart: boolean): boolean; - function reloadAllScripts(): void; - /** - * @param restart {boolean} [restart=false] - */ - function stopAllScripts(restart: boolean): void; - /** - * @returns {Array.} - */ - function getRunning(): Array.; - /** - * @returns {Array.} - */ - function getPublic(): Array.; - /** - * @returns {Array.} - */ - function getLocal(): Array.; - /** - * @returns {Signal} - */ - function scriptCountChanged(): Signal; - /** - * @returns {Signal} - */ - function scriptsReloading(): Signal; - /** - * @param filename {string} - * @param error {string} - * @returns {Signal} - */ - function scriptLoadError(filename: string, error: string): Signal; - /** - * @param message {string} - * @param engineName {string} - * @returns {Signal} - */ - function printedMessage(message: string, engineName: string): Signal; - /** - * @param message {string} - * @param engineName {string} - * @returns {Signal} - */ - function errorMessage(message: string, engineName: string): Signal; - /** - * @param message {string} - * @param engineName {string} - * @returns {Signal} - */ - function warningMessage(message: string, engineName: string): Signal; - /** - * @param message {string} - * @param engineName {string} - * @returns {Signal} - */ - function infoMessage(message: string, engineName: string): Signal; - /** - * @param url {string} - * @returns {Signal} - */ - function errorLoadingScript(url: string): Signal; - /** - * @returns {Signal} - */ - function clearDebugWindow(): Signal; - /** - * @param message {string} - * @param scriptName {string} - */ - function onPrintedMessage(message: string, scriptName: string): void; - /** - * @param message {string} - * @param scriptName {string} - */ - function onErrorMessage(message: string, scriptName: string): void; - /** - * @param message {string} - * @param scriptName {string} - */ - function onWarningMessage(message: string, scriptName: string): void; - /** - * @param message {string} - * @param scriptName {string} - */ - function onInfoMessage(message: string, scriptName: string): void; - /** - * @param url {string} - */ - function onErrorLoadingScript(url: string): void; - function onClearDebugWindow(): void; - /** - * @param filename {string} - * @param engine {object} - */ - function onScriptFinished(filename: string, engine: object): void; - let debugScriptUrl: string; - let defaultScriptsPath: string; - let scriptsModel: ScriptsModel; - let scriptsModelFilter: ScriptsModelFilter; + /** + * @param filename {string} + */ + function loadOneScript(filename: string): void; + /** + * @param filename {string} [filename=""] + * @param isUserLoaded {boolean} [isUserLoaded=true] + * @param loadScriptFromEditor {boolean} [loadScriptFromEditor=false] + * @param activateMainWindow {boolean} [activateMainWindow=false] + * @param reload {boolean} [reload=false] + * @param quitWhenFinished {boolean} [quitWhenFinished=false] + * @returns {boolean} + */ + function loadScript(filename: string, isUserLoaded: boolean, loadScriptFromEditor: boolean, activateMainWindow: boolean, reload: boolean, quitWhenFinished: boolean): boolean; + /** + * @param scriptHash {string} + * @param restart {boolean} [restart=false] + * @returns {boolean} + */ + function stopScript(scriptHash: string, restart: boolean): boolean; + function reloadAllScripts(): void; + /** + * @param restart {boolean} [restart=false] + */ + function stopAllScripts(restart: boolean): void; + /** + * @returns {Array.} + */ + function getRunning(): Array.; + /** + * @returns {Array.} + */ + function getPublic(): Array.; + /** + * @returns {Array.} + */ + function getLocal(): Array.; + /** + * @returns {Signal} + */ + function scriptCountChanged(): Signal; + /** + * @returns {Signal} + */ + function scriptsReloading(): Signal; + /** + * @param filename {string} + * @param error {string} + * @returns {Signal} + */ + function scriptLoadError(filename: string, error: string): Signal; + /** + * @param message {string} + * @param engineName {string} + * @returns {Signal} + */ + function printedMessage(message: string, engineName: string): Signal; + /** + * @param message {string} + * @param engineName {string} + * @returns {Signal} + */ + function errorMessage(message: string, engineName: string): Signal; + /** + * @param message {string} + * @param engineName {string} + * @returns {Signal} + */ + function warningMessage(message: string, engineName: string): Signal; + /** + * @param message {string} + * @param engineName {string} + * @returns {Signal} + */ + function infoMessage(message: string, engineName: string): Signal; + /** + * @param url {string} + * @returns {Signal} + */ + function errorLoadingScript(url: string): Signal; + /** + * @returns {Signal} + */ + function clearDebugWindow(): Signal; + /** + * @param message {string} + * @param scriptName {string} + */ + function onPrintedMessage(message: string, scriptName: string): void; + /** + * @param message {string} + * @param scriptName {string} + */ + function onErrorMessage(message: string, scriptName: string): void; + /** + * @param message {string} + * @param scriptName {string} + */ + function onWarningMessage(message: string, scriptName: string): void; + /** + * @param message {string} + * @param scriptName {string} + */ + function onInfoMessage(message: string, scriptName: string): void; + /** + * @param url {string} + */ + function onErrorLoadingScript(url: string): void; + function onClearDebugWindow(): void; + /** + * @param filename {string} + * @param engine {object} + */ + function onScriptFinished(filename: string, engine: object): void; + let debugScriptUrl: string; + let defaultScriptsPath: string; + let scriptsModel: ScriptsModel; + let scriptsModelFilter: ScriptsModelFilter; } /** -* Available in:Interface ScriptsClient Entity ScriptsProvided as a property of ScriptDiscoveryService. -* Has properties and functions below in addition to those of -http://doc.qt.io/qt-5/qabstractitemmodel.html. -*/ + * Available in:Interface ScriptsClient Entity ScriptsProvided as a property of ScriptDiscoveryService. + * Has properties and functions below in addition to those of http://doc.qt.io/qt-5/qabstractitemmodel.html. + */ declare class ScriptsModel { - /** - * @param row {number} - * @param column {number} - * @param parent {QModelIndex} - * @returns {QModelIndex} - */ - index(row: number, column: number, parent: QModelIndex): QModelIndex; - /** - * @param child {QModelIndex} - * @returns {QModelIndex} - */ - parent(child: QModelIndex): QModelIndex; - /** - * @param index {QModelIndex} - * @param role {number} [role=0] returns {string} - */ - data(index: QModelIndex, role: number): void; - /** - * @param parent {QmodelIndex} [parent=null] - * @returns {number} - */ - rowCount(parent: QmodelIndex): number; - /** - * @param parent {QmodelIndex} [parent=null] - * @returns {number} - */ - columnCount(parent: QmodelIndex): number; - /** - * @param index {QmodelIndex} - * @returns {TreeNodeBase} - */ - getTreeNodeFromIndex(index: QmodelIndex): TreeNodeBase; - /** - * @param parent {TreeNodeFolder} - * @returns {Array.} - */ - getFolderNodes(parent: TreeNodeFolder): Array.; + /** + * @param row {number} + * @param column {number} + * @param parent {QModelIndex} + * @returns {QModelIndex} + */ + index(row: number, column: number, parent: QModelIndex): QModelIndex; + /** + * @param child {QModelIndex} + * @returns {QModelIndex} + */ + parent(child: QModelIndex): QModelIndex; + /** + * @param index {QModelIndex} + * @param role {number} [role=0] returns {string} + */ + data(index: QModelIndex, role: number): void; + /** + * @param parent {QmodelIndex} [parent=null] + * @returns {number} + */ + rowCount(parent: QmodelIndex): number; + /** + * @param parent {QmodelIndex} [parent=null] + * @returns {number} + */ + columnCount(parent: QmodelIndex): number; + /** + * @param index {QmodelIndex} + * @returns {TreeNodeBase} + */ + getTreeNodeFromIndex(index: QmodelIndex): TreeNodeBase; + /** + * @param parent {TreeNodeFolder} + * @returns {Array.} + */ + getFolderNodes(parent: TreeNodeFolder): Array.; } /** -* Available in:Interface ScriptsClient Entity ScriptsProvided as a property of ScriptDiscoveryService. -* Has properties and functions per -http://doc.qt.io/qt-5/qsortfilterproxymodel.html. -*/ + * Available in:Interface ScriptsClient Entity ScriptsProvided as a property of ScriptDiscoveryService. + * Has properties and functions per http://doc.qt.io/qt-5/qsortfilterproxymodel.html. + */ declare class ScriptsModelFilter { } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsA UUID (Universally Unique IDentifier) is used to uniquely identify entities, overlays, avatars, and the like. It is -* represented in JavaScript as a string in the format, {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}, where the "n"s are -hexadecimal digits. -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsA UUID (Universally Unique IDentifier) is used to uniquely identify entities, overlays, avatars, and the like. It is + * represented in JavaScript as a string in the format, {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}, where the "n"s are hexadecimal digits. + */ declare namespace Uuid { - /** - * Generates a UUID from a string representation of the UUID. - * @param string {string} A string representation of a UUID. The curly braces are optional. - * @returns {Uuid} - */ - function fromString(string: string): Uuid; - /** - * Generates a string representation of a UUID. However, because UUIDs are represented in JavaScript as strings, this is in - * effect a no-op. - * @param id {Uuid} The UUID to generate a string from. - * @returns {string} - */ - function toString(id: Uuid): string; - /** - * Generate a new UUID. - * @returns {Uuid} - */ - function generate(): Uuid; - /** - * Test whether two given UUIDs are equal. - * @param idA {Uuid} The first UUID to compare. - * @param idB {Uuid} The second UUID to compare. - * @returns {boolean} - */ - function isEqual(idA: Uuid, idB: Uuid): boolean; - /** - * Test whether a given UUID is null. - * @param id {Uuid} The UUID to test. - * @returns {boolean} - */ - function isNull(id: Uuid): boolean; - /** - * Print to the program log a text label followed by the UUID value. - * @param label {string} The label to print. - * @param id {Uuid} The UUID to print. - */ - function print(label: string, id: Uuid): void; - /** - * The null UUID, {00000000-0000-0000-0000-000000000000}. - */ - const NULL: Uuid; + /** + * Generates a UUID from a string representation of the UUID. + * @param string {string} A string representation of a UUID. The curly braces are optional. + * @returns {Uuid} + */ + function fromString(string: string): Uuid; + /** + * Generates a string representation of a UUID. However, because UUIDs are represented in JavaScript as strings, this is in + * effect a no-op. + * @param id {Uuid} The UUID to generate a string from. + * @returns {string} + */ + function toString(id: Uuid): string; + /** + * Generate a new UUID. + * @returns {Uuid} + */ + function generate(): Uuid; + /** + * Test whether two given UUIDs are equal. + * @param idA {Uuid} The first UUID to compare. + * @param idB {Uuid} The second UUID to compare. + * @returns {boolean} + */ + function isEqual(idA: Uuid, idB: Uuid): boolean; + /** + * Test whether a given UUID is null. + * @param id {Uuid} The UUID to test. + * @returns {boolean} + */ + function isNull(id: Uuid): boolean; + /** + * Print to the program log a text label followed by the UUID value. + * @param label {string} The label to print. + * @param id {Uuid} The UUID to print. + */ + function print(label: string, id: Uuid): void; + /** + * The null UUID, {00000000-0000-0000-0000-000000000000}. + */ + const NULL: Uuid; } /** -* Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts -*/ + * Available in:Interface ScriptsClient Entity ScriptsAssignment Client Scripts + */ declare namespace Users { - /** - * Personally ignore another user, making them disappear for you and you disappear for them. - * @param nodeID {Uuid} The node or session ID of the user you want to ignore. - * @param enable {boolean} True for ignored; false for un-ignored. - */ - function ignore(nodeID: Uuid, enable: boolean): void; - /** - * Get whether or not you have ignored the node with the given UUID. - * @param nodeID {Uuid} The node or session ID of the user whose ignore status you want. - * @returns {boolean} - */ - function getIgnoreStatus(nodeID: Uuid): boolean; - /** - * Mute another user for you and you only. They won't be able to hear you, and you won't be able to hear them. - * @param nodeID {Uuid} The node or session ID of the user you want to mute. - * @param muteEnabled {boolean} True for enabled; false for disabled. - */ - function personalMute(nodeID: Uuid, muteEnabled: boolean): void; - /** - * Get whether or not you have personally muted the node with the given UUID. - * @param nodeID {Uuid} The node or session ID of the user whose personal mute status you want. - * @returns {boolean} - */ - function requestPersonalMuteStatus(nodeID: Uuid): boolean; - /** - * Sets an avatar's gain for you and you only. - * Units are Decibels (dB) - * @param nodeID {Uuid} The node or session ID of the user whose gain you want to modify, or null to set the master gain. - * @param gain {number} The gain of the avatar you'd like to set. Units are dB. - */ - function setAvatarGain(nodeID: Uuid, gain: number): void; - /** - * Gets an avatar's gain for you and you only. - * @param nodeID {Uuid} The node or session ID of the user whose gain you want to get, or null to get the master gain. - * @returns {number} - */ - function getAvatarGain(nodeID: Uuid): number; - /** - * Kick/ban another user. Removes them from the server and prevents them from returning. Bans by either user name (if - * available) or machine fingerprint otherwise. This will only do anything if you're an admin of the domain you're in. - * @param nodeID {Uuid} The node or session ID of the user you want to kick. - */ - function kick(nodeID: Uuid): void; - /** - * Mutes another user's microphone for everyone. Not permanent; the silenced user can unmute themselves with the UNMUTE - * button in their HUD. This will only do anything if you're an admin of the domain you're in. - * @param nodeID {Uuid} The node or session ID of the user you want to mute. - */ - function mute(nodeID: Uuid): void; - /** - * Request the user name and machine fingerprint associated with the given UUID. The user name will be returned in a - * Users.usernameFromIDReply signal. This will only do anything if you're an admin of the domain -you're in. - * @param nodeID {Uuid} The node or session ID of the user whose user name you want. - */ - function requestUsernameFromID(nodeID: Uuid): void; - /** - * Returns `true` if the DomainServer will allow this Node/Avatar to make kick. - * @returns {boolean} - */ - function getCanKick(): boolean; - /** - * Toggle the state of the space bubble feature. - */ - function toggleIgnoreRadius(): void; - /** - * Enables the space bubble feature. - */ - function enableIgnoreRadius(): void; - /** - * Disables the space bubble feature. - */ - function disableIgnoreRadius(): void; - /** - * Returns `true` if the space bubble feature is enabled. - * @returns {boolean} - */ - function getIgnoreRadiusEnabled(): boolean; - /** - * @param canKick {boolean} - * @returns {Signal} - */ - function canKickChanged(canKick: boolean): Signal; - /** - * @param isEnabled {boolean} - * @returns {Signal} - */ - function ignoreRadiusEnabledChanged(isEnabled: boolean): Signal; - /** - * Notifies scripts that another user has entered the ignore radius. - * @returns {Signal} - */ - function enteredIgnoreRadius(): Signal; - /** - * Triggered in response to a Users.requestUsernameFromID call. Provides the user name and - * machine fingerprint associated with a UUID. -Username and machineFingerprint will be their default constructor output if the requesting user isn't an admin. - * @param nodeID {Uuid} - * @param userName {string} - * @param machineFingerprint {string} - * @param isAdmin {boolean} - * @returns {Signal} - */ - function usernameFromIDReply(nodeID: Uuid, userName: string, machineFingerprint: string, isAdmin: boolean): Signal; - /** - * Notifies scripts that a user has disconnected from the domain. - * @param nodeID {Uuid} The session ID of the avatar that has disconnected. - * @returns {Signal} - */ - function avatarDisconnected(nodeID: Uuid): Signal; - /** - * true if the domain server allows the node or avatar to kick (ban) avatars, - * otherwise false. Read-only. - */ - let canKick: boolean; - /** - * true if the avatar requests extra data from the mixers (such as - * positional data of an avatar you've ignored). Read-only. - */ - let requestsDomainListData: boolean; + /** + * Personally ignore another user, making them disappear for you and you disappear for them. + * @param nodeID {Uuid} The node or session ID of the user you want to ignore. + * @param enable {boolean} True for ignored; false for un-ignored. + */ + function ignore(nodeID: Uuid, enable: boolean): void; + /** + * Get whether or not you have ignored the node with the given UUID. + * @param nodeID {Uuid} The node or session ID of the user whose ignore status you want. + * @returns {boolean} + */ + function getIgnoreStatus(nodeID: Uuid): boolean; + /** + * Mute another user for you and you only. They won't be able to hear you, and you won't be able to hear them. + * @param nodeID {Uuid} The node or session ID of the user you want to mute. + * @param muteEnabled {boolean} True for enabled; false for disabled. + */ + function personalMute(nodeID: Uuid, muteEnabled: boolean): void; + /** + * Get whether or not you have personally muted the node with the given UUID. + * @param nodeID {Uuid} The node or session ID of the user whose personal mute status you want. + * @returns {boolean} + */ + function requestPersonalMuteStatus(nodeID: Uuid): boolean; + /** + * Sets an avatar's gain for you and you only. + * Units are Decibels (dB) + * @param nodeID {Uuid} The node or session ID of the user whose gain you want to modify, or null to set the master gain. + * @param gain {number} The gain of the avatar you'd like to set. Units are dB. + */ + function setAvatarGain(nodeID: Uuid, gain: number): void; + /** + * Gets an avatar's gain for you and you only. + * @param nodeID {Uuid} The node or session ID of the user whose gain you want to get, or null to get the master gain. + * @returns {number} + */ + function getAvatarGain(nodeID: Uuid): number; + /** + * Kick/ban another user. Removes them from the server and prevents them from returning. Bans by either user name (if + * available) or machine fingerprint otherwise. This will only do anything if you're an admin of the domain you're in. + * @param nodeID {Uuid} The node or session ID of the user you want to kick. + */ + function kick(nodeID: Uuid): void; + /** + * Mutes another user's microphone for everyone. Not permanent; the silenced user can unmute themselves with the UNMUTE + * button in their HUD. This will only do anything if you're an admin of the domain you're in. + * @param nodeID {Uuid} The node or session ID of the user you want to mute. + */ + function mute(nodeID: Uuid): void; + /** + * Request the user name and machine fingerprint associated with the given UUID. The user name will be returned in a + * Users.usernameFromIDReply signal. This will only do anything if you're an admin of the domain you're in. + * @param nodeID {Uuid} The node or session ID of the user whose user name you want. + */ + function requestUsernameFromID(nodeID: Uuid): void; + /** + * Returns `true` if the DomainServer will allow this Node/Avatar to make kick. + * @returns {boolean} + */ + function getCanKick(): boolean; + /** + * Toggle the state of the space bubble feature. + */ + function toggleIgnoreRadius(): void; + /** + * Enables the space bubble feature. + */ + function enableIgnoreRadius(): void; + /** + * Disables the space bubble feature. + */ + function disableIgnoreRadius(): void; + /** + * Returns `true` if the space bubble feature is enabled. + * @returns {boolean} + */ + function getIgnoreRadiusEnabled(): boolean; + /** + * @param canKick {boolean} + * @returns {Signal} + */ + function canKickChanged(canKick: boolean): Signal; + /** + * @param isEnabled {boolean} + * @returns {Signal} + */ + function ignoreRadiusEnabledChanged(isEnabled: boolean): Signal; + /** + * Notifies scripts that another user has entered the ignore radius. + * @returns {Signal} + */ + function enteredIgnoreRadius(): Signal; + /** + * Triggered in response to a Users.requestUsernameFromID call. Provides the user name and + * machine fingerprint associated with a UUID. Username and machineFingerprint will be their default constructor output if the requesting user isn't an admin. + * @param nodeID {Uuid} + * @param userName {string} + * @param machineFingerprint {string} + * @param isAdmin {boolean} + * @returns {Signal} + */ + function usernameFromIDReply(nodeID: Uuid, userName: string, machineFingerprint: string, isAdmin: boolean): Signal; + /** + * Notifies scripts that a user has disconnected from the domain. + * @param nodeID {Uuid} The session ID of the avatar that has disconnected. + * @returns {Signal} + */ + function avatarDisconnected(nodeID: Uuid): Signal; + /** + * true if the domain server allows the node or avatar to kick (ban) avatars, + * otherwise false. Read-only. + */ + let canKick: boolean; + /** + * true if the avatar requests extra data from the mixers (such as + * positional data of an avatar you've ignored). Read-only. + */ + let requestsDomainListData: boolean; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Vec3 API facilities for generating and manipulating 3-dimensional vectors. High Fidelity uses a right-handed -* Cartesian coordinate system where the y-axis is the "up" and the negative z-axis is the "front" direction. -High Fidelity coordinate system -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsThe Vec3 API facilities for generating and manipulating 3-dimensional vectors. High Fidelity uses a right-handed + * Cartesian coordinate system where the y-axis is the "up" and the negative z-axis is the "front" direction. + */ declare namespace Vec3 { - /** - * Calculate the reflection of a vector in a plane. - * @param v {Vec3} The vector to reflect. - * @param normal {Vec3} The normal of the plane. - * @returns {Vec3} - */ - function reflect(v: Vec3, normal: Vec3): Vec3; - /** - * Calculate the cross product of two vectors. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @returns {Vec3} - */ - function cross(v1: Vec3, v2: Vec3): Vec3; - /** - * Calculate the dot product of two vectors. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @returns {number} - */ - function dot(v1: Vec3, v2: Vec3): number; - /** - * Multiply a vector by a scale factor. - * @param v {Vec3} The vector. - * @param scale {number} The scale factor. - * @returns {Vec3} - */ - function multiply(v: Vec3, scale: number): Vec3; - /** - * Multiply a vector by a scale factor. - * @param scale {number} The scale factor. - * @param v {Vec3} The vector. - * @returns {Vec3} - */ - function multiply(scale: number, v: Vec3): Vec3; - /** - * Multiply two vectors. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @returns {Vec3} - */ - function multiplyVbyV(v1: Vec3, v2: Vec3): Vec3; - /** - * Rotate a vector. - * @param q {Quat} The rotation to apply. - * @param v {Vec3} The vector to rotate. - * @returns {Vec3} - */ - function multiplyQbyV(q: Quat, v: Vec3): Vec3; - /** - * Calculate the sum of two vectors. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @returns {Vec3} - */ - function sum(v1: Vec3, v2: Vec3): Vec3; - /** - * Calculate one vector subtracted from another. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @returns {Vec3} - */ - function subtract(v1: Vec3, v2: Vec3): Vec3; - /** - * Calculate the length of a vector - * @param v {Vec3} The vector. - * @returns {number} - */ - function length(v: Vec3): number; - /** - * Calculate the distance between two points. - * @param p1 {Vec3} The first point. - * @param p2 {Vec3} The second point. - * @returns {number} - */ - function distance(p1: Vec3, p2: Vec3): number; - /** - * Calculate the angle of rotation from one vector onto another, with the sign depending on a reference vector. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @param ref {Vec3} Reference vector. - * @returns {number} - */ - function orientedAngle(v1: Vec3, v2: Vec3, ref: Vec3): number; - /** - * Normalize a vector so that its length is 1. - * @param v {Vec3} The vector to normalize. - * @returns {Vec3} - */ - function normalize(v: Vec3): Vec3; - /** - * Calculate a linear interpolation between two vectors. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @param factor {number} The interpolation factor in the range 0.0 to 1.0. - * @returns {Vec3} - */ - function mix(v1: Vec3, v2: Vec3, factor: number): Vec3; - /** - * Print to the program log a text label followed by a vector value. - * @param label {string} The label to print. - * @param v {Vec3} The vector value to print. - */ - function print(label: string, v: Vec3): void; - /** - * Test whether two vectors are equal. Note: The vectors must be exactly equal in order for - * true to be returned; it is often better to use Vec3.withinEpsilon. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @returns {boolean} - */ - function equal(v1: Vec3, v2: Vec3): boolean; - /** - * Test whether two vectors are equal within a tolerance. Note: It is often better to use this function - * than Vec3.equal. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @param epsilon {number} The maximum distance between the two vectors. - * @returns {boolean} - */ - function withinEpsilon(v1: Vec3, v2: Vec3, epsilon: number): boolean; - /** - * Calculate polar coordinates (elevation, azimuth, radius) that transform the unit z-axis vector onto a point. - * @param p {Vec3} The point to calculate the polar coordinates for. - * @returns {Vec3} - */ - function toPolar(p: Vec3): Vec3; - /** - * Calculate the coordinates of a point from polar coordinate transformation of the unit z-axis vector. - * @param polar {Vec3} The polar coordinates of a point: x elevation rotation about the x-axis in radians, - * y azimuth rotation about the y-axis in radians, and z scale. - * @returns {Vec3} - */ - function fromPolar(polar: Vec3): Vec3; - /** - * Calculate the unit vector corresponding to polar coordinates elevation and azimuth transformation of the unit z-axis - * vector. - * @param elevation {number} Rotation about the x-axis, in radians. - * @param azimuth {number} Rotation about the y-axis, in radians. - * @returns {Vec3} - */ - function fromPolar(elevation: number, azimuth: number): Vec3; - /** - * Calculate the angle between two vectors. - * @param v1 {Vec3} The first vector. - * @param v2 {Vec3} The second vector. - * @returns {number} - */ - function getAngle(v1: Vec3, v2: Vec3): number; - /** - * { x: 1, y: 0, z: 0 } : Unit vector in the x-axis direction. Read-only. - */ - const UNIT_X: Vec3; - /** - * { x: 0, y: 1, z: 0 } : Unit vector in the y-axis direction. Read-only. - */ - const UNIT_Y: Vec3; - /** - * { x: 0, y: 0, z: 1 } : Unit vector in the z-axis direction. Read-only. - */ - const UNIT_Z: Vec3; - /** - * { x: -1, y: 0, z: 0 } : Unit vector in the negative x-axis direction. - * Read-only. - */ - const UNIT_NEG_X: Vec3; - /** - * { x: 0, y: -1, z: 0 } : Unit vector in the negative y-axis direction. - * Read-only. - */ - const UNIT_NEG_Y: Vec3; - /** - * { x: 0, y: 0, z: -1 } : Unit vector in the negative z-axis direction. - * Read-only. - */ - const UNIT_NEG_Z: Vec3; - /** - * { x: 0.707107, y: 0.707107, z: 0 } : Unit vector in the direction of the diagonal - * between the x and y axes. Read-only. - */ - const UNIT_XY: Vec3; - /** - * { x: 0.707107, y: 0, z: 0.707107 } : Unit vector in the direction of the diagonal - * between the x and z axes. Read-only. - */ - const UNIT_XZ: Vec3; - /** - * { x: 0, y: 0.707107, z: 0.707107 } : Unit vector in the direction of the diagonal - * between the y and z axes. Read-only. - */ - const UNIT_YZ: Vec3; - /** - * { x: 0.577350, y: 0.577350, z: 0.577350 } : Unit vector in the direction of the - * diagonal between the x, y, and z axes. Read-only. - */ - const UNIT_XYZ: Vec3; - /** - * { x: 3.402823e+38, y: 3.402823e+38, z: 3.402823e+38 } : Vector with all axis - * values set to the maximum floating point value. Read-only. - */ - const FLOAT_MAX: Vec3; - /** - * { x: -3.402823e+38, y: -3.402823e+38, z: -3.402823e+38 } : Vector with all axis - * values set to the negative of the maximum floating point value. Read-only. - */ - const FLOAT_MIN: Vec3; - /** - * { x: 0, y: 0, z: 0 } : Vector with all axis values set to 0. - * Read-only. - */ - const ZERO: Vec3; - /** - * { x: 1, y: 1, z: 1 } : Vector with all axis values set to 1. - * Read-only. - */ - const ONE: Vec3; - /** - * { x: 2, y: 2, z: 2 } : Vector with all axis values set to 2. - * Read-only. - */ - const TWO: Vec3; - /** - * { x: 0.5, y: 0.5, z: 0.5 } : Vector with all axis values set to 0.5. - * Read-only. - */ - const HALF: Vec3; - /** - * { x: 1, y: 0, z: 0 } : Unit vector in the "right" direction. Synonym for - * UNIT_X. Read-only. - */ - const RIGHT: Vec3; - /** - * { x: 0, y: 1, z: 0 } : Unit vector in the "up" direction. Synonym for - * UNIT_Y. Read-only. - */ - const UP: Vec3; - /** - * { x: 0, y: 0, z: -1 } : Unit vector in the "front" direction. Synonym for - * UNIT_NEG_Z. Read-only. - */ - const FRONT: Vec3; + /** + * Calculate the reflection of a vector in a plane. + * @param v {Vec3} The vector to reflect. + * @param normal {Vec3} The normal of the plane. + * @returns {Vec3} + */ + function reflect(v: Vec3, normal: Vec3): Vec3; + /** + * Calculate the cross product of two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {Vec3} + */ + function cross(v1: Vec3, v2: Vec3): Vec3; + /** + * Calculate the dot product of two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {number} + */ + function dot(v1: Vec3, v2: Vec3): number; + /** + * Multiply a vector by a scale factor. + * @param v {Vec3} The vector. + * @param scale {number} The scale factor. + * @returns {Vec3} + */ + function multiply(v: Vec3, scale: number): Vec3; + /** + * Multiply a vector by a scale factor. + * @param scale {number} The scale factor. + * @param v {Vec3} The vector. + * @returns {Vec3} + */ + function multiply(scale: number, v: Vec3): Vec3; + /** + * Multiply two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {Vec3} + */ + function multiplyVbyV(v1: Vec3, v2: Vec3): Vec3; + /** + * Rotate a vector. + * @param q {Quat} The rotation to apply. + * @param v {Vec3} The vector to rotate. + * @returns {Vec3} + */ + function multiplyQbyV(q: Quat, v: Vec3): Vec3; + /** + * Calculate the sum of two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {Vec3} + */ + function sum(v1: Vec3, v2: Vec3): Vec3; + /** + * Calculate one vector subtracted from another. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {Vec3} + */ + function subtract(v1: Vec3, v2: Vec3): Vec3; + /** + * Calculate the length of a vector + * @param v {Vec3} The vector. + * @returns {number} + */ + function length(v: Vec3): number; + /** + * Calculate the distance between two points. + * @param p1 {Vec3} The first point. + * @param p2 {Vec3} The second point. + * @returns {number} + */ + function distance(p1: Vec3, p2: Vec3): number; + /** + * Calculate the angle of rotation from one vector onto another, with the sign depending on a reference vector. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @param ref {Vec3} Reference vector. + * @returns {number} + */ + function orientedAngle(v1: Vec3, v2: Vec3, ref: Vec3): number; + /** + * Normalize a vector so that its length is 1. + * @param v {Vec3} The vector to normalize. + * @returns {Vec3} + */ + function normalize(v: Vec3): Vec3; + /** + * Calculate a linear interpolation between two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @param factor {number} The interpolation factor in the range 0.0 to 1.0. + * @returns {Vec3} + */ + function mix(v1: Vec3, v2: Vec3, factor: number): Vec3; + /** + * Print to the program log a text label followed by a vector value. + * @param label {string} The label to print. + * @param v {Vec3} The vector value to print. + */ + function print(label: string, v: Vec3): void; + /** + * Test whether two vectors are equal. Note: The vectors must be exactly equal in order for + * true to be returned; it is often better to use Vec3.withinEpsilon. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {boolean} + */ + function equal(v1: Vec3, v2: Vec3): boolean; + /** + * Test whether two vectors are equal within a tolerance. Note: It is often better to use this function + * than Vec3.equal. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @param epsilon {number} The maximum distance between the two vectors. + * @returns {boolean} + */ + function withinEpsilon(v1: Vec3, v2: Vec3, epsilon: number): boolean; + /** + * Calculate polar coordinates (elevation, azimuth, radius) that transform the unit z-axis vector onto a point. + * @param p {Vec3} The point to calculate the polar coordinates for. + * @returns {Vec3} + */ + function toPolar(p: Vec3): Vec3; + /** + * Calculate the coordinates of a point from polar coordinate transformation of the unit z-axis vector. + * @param polar {Vec3} The polar coordinates of a point: x elevation rotation about the x-axis in radians, + * y azimuth rotation about the y-axis in radians, and z scale. + * @returns {Vec3} + */ + function fromPolar(polar: Vec3): Vec3; + /** + * Calculate the unit vector corresponding to polar coordinates elevation and azimuth transformation of the unit z-axis + * vector. + * @param elevation {number} Rotation about the x-axis, in radians. + * @param azimuth {number} Rotation about the y-axis, in radians. + * @returns {Vec3} + */ + function fromPolar(elevation: number, azimuth: number): Vec3; + /** + * Calculate the angle between two vectors. + * @param v1 {Vec3} The first vector. + * @param v2 {Vec3} The second vector. + * @returns {number} + */ + function getAngle(v1: Vec3, v2: Vec3): number; + /** + * { x: 1, y: 0, z: 0 } : Unit vector in the x-axis direction. Read-only. + */ + const UNIT_X: Vec3; + /** + * { x: 0, y: 1, z: 0 } : Unit vector in the y-axis direction. Read-only. + */ + const UNIT_Y: Vec3; + /** + * { x: 0, y: 0, z: 1 } : Unit vector in the z-axis direction. Read-only. + */ + const UNIT_Z: Vec3; + /** + * { x: -1, y: 0, z: 0 } : Unit vector in the negative x-axis direction. + * Read-only. + */ + const UNIT_NEG_X: Vec3; + /** + * { x: 0, y: -1, z: 0 } : Unit vector in the negative y-axis direction. + * Read-only. + */ + const UNIT_NEG_Y: Vec3; + /** + * { x: 0, y: 0, z: -1 } : Unit vector in the negative z-axis direction. + * Read-only. + */ + const UNIT_NEG_Z: Vec3; + /** + * { x: 0.707107, y: 0.707107, z: 0 } : Unit vector in the direction of the diagonal + * between the x and y axes. Read-only. + */ + const UNIT_XY: Vec3; + /** + * { x: 0.707107, y: 0, z: 0.707107 } : Unit vector in the direction of the diagonal + * between the x and z axes. Read-only. + */ + const UNIT_XZ: Vec3; + /** + * { x: 0, y: 0.707107, z: 0.707107 } : Unit vector in the direction of the diagonal + * between the y and z axes. Read-only. + */ + const UNIT_YZ: Vec3; + /** + * { x: 0.577350, y: 0.577350, z: 0.577350 } : Unit vector in the direction of the + * diagonal between the x, y, and z axes. Read-only. + */ + const UNIT_XYZ: Vec3; + /** + * { x: 3.402823e+38, y: 3.402823e+38, z: 3.402823e+38 } : Vector with all axis + * values set to the maximum floating point value. Read-only. + */ + const FLOAT_MAX: Vec3; + /** + * { x: -3.402823e+38, y: -3.402823e+38, z: -3.402823e+38 } : Vector with all axis + * values set to the negative of the maximum floating point value. Read-only. + */ + const FLOAT_MIN: Vec3; + /** + * { x: 0, y: 0, z: 0 } : Vector with all axis values set to 0. + * Read-only. + */ + const ZERO: Vec3; + /** + * { x: 1, y: 1, z: 1 } : Vector with all axis values set to 1. + * Read-only. + */ + const ONE: Vec3; + /** + * { x: 2, y: 2, z: 2 } : Vector with all axis values set to 2. + * Read-only. + */ + const TWO: Vec3; + /** + * { x: 0.5, y: 0.5, z: 0.5 } : Vector with all axis values set to 0.5. + * Read-only. + */ + const HALF: Vec3; + /** + * { x: 1, y: 0, z: 0 } : Unit vector in the "right" direction. Synonym for + * UNIT_X. Read-only. + */ + const RIGHT: Vec3; + /** + * { x: 0, y: 1, z: 0 } : Unit vector in the "up" direction. Synonym for + * UNIT_Y. Read-only. + */ + const UP: Vec3; + /** + * { x: 0, y: 0, z: -1 } : Unit vector in the "front" direction. Synonym for + * UNIT_NEG_Z. Read-only. + */ + const FRONT: Vec3; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsHelper functions to render ephemeral debug markers and lines. -* DebugDraw markers and lines are only visible locally, they are not visible by other users. -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsHelper functions to render ephemeral debug markers and lines. + * DebugDraw markers and lines are only visible locally, they are not visible by other users. + */ declare namespace DebugDraw { - /** - * Draws a line in world space, but it will only be visible for a single frame. - * @param start {Vec3} start position of line in world space. - * @param end {Vec3} end position of line in world space. - * @param color {Vec4} color of line, each component should be in the zero to one range. x = red, y = blue, z = green, w = alpha. - */ - function drawRay(start: Vec3, end: Vec3, color: Vec4): void; - /** - * Adds a debug marker to the world. This marker will be drawn every frame until it is removed with DebugDraw.removeMarker. - * This can be called repeatedly to change the position of the marker. - * @param key {string} name to uniquely identify this marker, later used for DebugDraw.removeMarker. - * @param rotation {Quat} start position of line in world space. - * @param position {Vec3} position of the marker in world space. - * @param color {Vec4} color of the marker. - */ - function addMarker(key: string, rotation: Quat, position: Vec3, color: Vec4): void; - /** - * Removes debug marker from the world. Once a marker is removed, it will no longer be visible. - * @param key {string} name of marker to remove. - */ - function removeMarker(key: string): void; - /** - * Adds a debug marker to the world, this marker will be drawn every frame until it is removed with DebugDraw.removeMyAvatarMarker. - * This can be called repeatedly to change the position of the marker. - * @param key {string} name to uniquely identify this marker, later used for DebugDraw.removeMyAvatarMarker. - * @param rotation {Quat} start position of line in avatar space. - * @param position {Vec3} position of the marker in avatar space. - * @param color {Vec4} color of the marker. - */ - function addMyAvatarMarker(key: string, rotation: Quat, position: Vec3, color: Vec4): void; - /** - * Removes debug marker from the world. Once a marker is removed, it will no longer be visible - * @param key {string} name of marker to remove. - */ - function removeMyAvatarMarker(key: string): void; + /** + * Draws a line in world space, but it will only be visible for a single frame. + * @param start {Vec3} start position of line in world space. + * @param end {Vec3} end position of line in world space. + * @param color {Vec4} color of line, each component should be in the zero to one range. x = red, y = blue, z = green, w = alpha. + */ + function drawRay(start: Vec3, end: Vec3, color: Vec4): void; + /** + * Adds a debug marker to the world. This marker will be drawn every frame until it is removed with DebugDraw.removeMarker. + * This can be called repeatedly to change the position of the marker. + * @param key {string} name to uniquely identify this marker, later used for DebugDraw.removeMarker. + * @param rotation {Quat} start position of line in world space. + * @param position {Vec3} position of the marker in world space. + * @param color {Vec4} color of the marker. + */ + function addMarker(key: string, rotation: Quat, position: Vec3, color: Vec4): void; + /** + * Removes debug marker from the world. Once a marker is removed, it will no longer be visible. + * @param key {string} name of marker to remove. + */ + function removeMarker(key: string): void; + /** + * Adds a debug marker to the world, this marker will be drawn every frame until it is removed with DebugDraw.removeMyAvatarMarker. + * This can be called repeatedly to change the position of the marker. + * @param key {string} name to uniquely identify this marker, later used for DebugDraw.removeMyAvatarMarker. + * @param rotation {Quat} start position of line in avatar space. + * @param position {Vec3} position of the marker in avatar space. + * @param color {Vec4} color of the marker. + */ + function addMyAvatarMarker(key: string, rotation: Quat, position: Vec3, color: Vec4): void; + /** + * Removes debug marker from the world. Once a marker is removed, it will no longer be visible + * @param key {string} name of marker to remove. + */ + function removeMyAvatarMarker(key: string): void; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Paths API provides absolute paths to the scripts and resources directories. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Paths API provides absolute paths to the scripts and resources directories. + */ declare namespace Paths { - /** - * The path to the scripts directory. Read-only. - */ - let defaultScripts: string; - /** - * The path to the resources directory. Read-only. - */ - let resources: string; + /** + * The path to the scripts directory. Read-only. + */ + let defaultScripts: string; + /** + * The path to the resources directory. Read-only. + */ + let resources: string; } /** -* Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsA handle for a mesh in an entity, such as returned by Entities.getMeshes. -*/ + * Available in:Interface ScriptsClient Entity ScriptsServer Entity ScriptsAssignment Client ScriptsA handle for a mesh in an entity, such as returned by Entities.getMeshes. + */ declare class MeshProxy { - /** - * Get the number of vertices in the mesh. - * @returns {number} - */ - getNumVertices(): number; - /** - * Get the position of a vertex in the mesh. - * @param index {number} Integer index of the mesh vertex. - * @returns {Vec3} - */ - getPos(index: number): Vec3; + /** + * Get the number of vertices in the mesh. + * @returns {number} + */ + getNumVertices(): number; + /** + * Get the position of a vertex in the mesh. + * @param index {number} Integer index of the mesh vertex. + * @returns {Vec3} + */ + getPos(index: number): Vec3; } /** -* Available in:Interface ScriptsClient Entity ScriptsThe Camera API provides access to the "camera" that defines your view in desktop and HMD display modes. -*/ + * Available in:Interface ScriptsClient Entity ScriptsThe Camera API provides access to the "camera" that defines your view in desktop and HMD display modes. + */ declare namespace Camera { - /** - * Get the ID of the entity that the camera is set to use the position and orientation from when it's in entity mode. You can - * also get the entity ID using the Camera.cameraEntity property. - * @returns {Uuid} - */ - function getCameraEntity(): Uuid; - /** - * Set the entity that the camera should use the position and orientation from when it's in entity mode. You can also set the - * entity using the Camera.cameraEntity property. - * @param entityID {Uuid} The entity that the camera should follow when it's in entity mode. - */ - function setCameraEntity(entityID: Uuid): void; - /** - * Get the current camera mode. You can also get the mode using the Camera.mode property. - * @returns {Camera.Mode} - */ - function getModeString(): Camera.Mode; - /** - * Set the camera mode. You can also set the mode using the Camera.mode property. - * @param mode {Camera.Mode} The mode to set the camera to. - */ - function setModeString(mode: Camera.Mode): void; - /** - * Get the current camera position. You can also get the position using the Camera.position property. - * @returns {Vec3} - */ - function getPosition(): Vec3; - /** - * Set the camera position. You can also set the position using the Camera.position property. Only works if the - * camera is in independent mode. - * @param position {Vec3} The position to set the camera at. - */ - function setPosition(position: Vec3): void; - /** - * Get the current camera orientation. You can also get the orientation using the Camera.orientation property. - * @returns {Quat} - */ - function getOrientation(): Quat; - /** - * Set the camera orientation. You can also set the orientation using the Camera.orientation property. Only - * works if the camera is in independent mode. - * @param orientation {Quat} The orientation to set the camera to. - */ - function setOrientation(orientation: Quat): void; - /** - * Compute a PickRay based on the current camera configuration and the specified x, y position on the - * screen. The PickRay can be used in functions such as Entities.findRayIntersection and - Overlays.findRayIntersection. - * @param x {number} X-coordinate on screen. - * @param y {number} Y-coordinate on screen. - * @returns {PickRay} - */ - function computePickRay(x: number, y: number): PickRay; - /** - * Rotate the camera to look at the specified position. Only works if the camera is in independent mode. - * @param position {Vec3} Position to look at. - */ - function lookAt(position: Vec3): void; - /** - * Set the camera to continue looking at the specified position even while the camera moves. Only works if the - * camera is in independent mode. - * @param position {Vec3} Position to keep looking at. - */ - function keepLookingAt(position: Vec3): void; - /** - * Stops the camera from continually looking at the position that was set with Camera.keepLookingAt. - */ - function stopLookingAt(): void; - /** - * Triggered when the camera mode changes. - * @param newMode {Camera.Mode} The new camera mode. - * @returns {Signal} - */ - function modeUpdated(newMode: Camera.Mode): Signal; - /** - * The position of the camera. You can set this value only when the camera is in independent mode. - */ - let position: Vec3; - /** - * The orientation of the camera. You can set this value only when the camera is in independent - * mode. - */ - let orientation: Quat; - /** - * The camera mode. - */ - let mode: Camera.Mode; - /** - * The camera frustum. - */ - let frustum: ViewFrustum; - /** - * The ID of the entity that is used for the camera position and orientation when the camera - * is in entity mode. - */ - let cameraEntity: Uuid; + /** + * Get the ID of the entity that the camera is set to use the position and orientation from when it's in entity mode. You can + * also get the entity ID using the Camera.cameraEntity property. + * @returns {Uuid} + */ + function getCameraEntity(): Uuid; + /** + * Set the entity that the camera should use the position and orientation from when it's in entity mode. You can also set the + * entity using the Camera.cameraEntity property. + * @param entityID {Uuid} The entity that the camera should follow when it's in entity mode. + */ + function setCameraEntity(entityID: Uuid): void; + /** + * Get the current camera mode. You can also get the mode using the Camera.mode property. + * @returns {Camera.Mode} + */ + function getModeString(): Camera.Mode; + /** + * Set the camera mode. You can also set the mode using the Camera.mode property. + * @param mode {Camera.Mode} The mode to set the camera to. + */ + function setModeString(mode: Camera.Mode): void; + /** + * Get the current camera position. You can also get the position using the Camera.position property. + * @returns {Vec3} + */ + function getPosition(): Vec3; + /** + * Set the camera position. You can also set the position using the Camera.position property. Only works if the + * camera is in independent mode. + * @param position {Vec3} The position to set the camera at. + */ + function setPosition(position: Vec3): void; + /** + * Get the current camera orientation. You can also get the orientation using the Camera.orientation property. + * @returns {Quat} + */ + function getOrientation(): Quat; + /** + * Set the camera orientation. You can also set the orientation using the Camera.orientation property. Only + * works if the camera is in independent mode. + * @param orientation {Quat} The orientation to set the camera to. + */ + function setOrientation(orientation: Quat): void; + /** + * Compute a PickRay based on the current camera configuration and the specified x, y position on the + * screen. The PickRay can be used in functions such as Entities.findRayIntersection and Overlays.findRayIntersection. + * @param x {number} X-coordinate on screen. + * @param y {number} Y-coordinate on screen. + * @returns {PickRay} + */ + function computePickRay(x: number, y: number): PickRay; + /** + * Rotate the camera to look at the specified position. Only works if the camera is in independent mode. + * @param position {Vec3} Position to look at. + */ + function lookAt(position: Vec3): void; + /** + * Set the camera to continue looking at the specified position even while the camera moves. Only works if the + * camera is in independent mode. + * @param position {Vec3} Position to keep looking at. + */ + function keepLookingAt(position: Vec3): void; + /** + * Stops the camera from continually looking at the position that was set with Camera.keepLookingAt. + */ + function stopLookingAt(): void; + /** + * Triggered when the camera mode changes. + * @param newMode {Camera.Mode} The new camera mode. + * @returns {Signal} + */ + function modeUpdated(newMode: Camera.Mode): Signal; + /** + * The position of the camera. You can set this value only when the camera is in independent + * mode. + */ + let position: Vec3; + /** + * The orientation of the camera. You can set this value only when the camera is in + * independent mode. + */ + let orientation: Quat; + /** + * The camera mode. + */ + let mode: Camera.Mode; + /** + * The camera frustum. + */ + let frustum: ViewFrustum; + /** + * The ID of the entity that is used for the camera position and orientation when the + * camera is in entity mode. + */ + let cameraEntity: Uuid; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace Render { - /** - * @returns {string} - */ - function toJSON(): string; - /** - * @param map {object} - */ - function load(map: object): void; - /** - * @param map {object} - */ - function load(map: object): void; - /** - * @returns {Signal} - */ - function loaded(): Signal; - /** - * @returns {Signal} - */ - function newStats(): Signal; - /** - * @returns {Signal} - */ - function dirtyEnabled(): Signal; - /** - * @param name {string} - * @returns {object} - */ - function getConfig(name: string): object; - function refresh(): void; - /** - * Read-only. - */ - let cpuRunTime: number; - let enabled: boolean; + /** + * @returns {string} + */ + function toJSON(): string; + /** + * @param map {object} + */ + function load(map: object): void; + /** + * @returns {boolean} + */ + function isTask(): boolean; + /** + * @returns {Array.} + */ + function getSubConfigs(): Array.; + /** + * @returns {number} + */ + function getNumSubs(): number; + /** + * @param index {number} + * @returns {object} + */ + function getSubConfig(index: number): object; + /** + * @param map {object} + */ + function load(map: object): void; + /** + * @returns {Signal} + */ + function loaded(): Signal; + /** + * @returns {Signal} + */ + function newStats(): Signal; + /** + * @returns {Signal} + */ + function dirtyEnabled(): Signal; + /** + * @param name {string} + * @returns {object} + */ + function getConfig(name: string): object; + function refresh(): void; + /** + * Read-only. + */ + let cpuRunTime: number; + let enabled: boolean; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface Scripts + */ +declare class InteractiveWindow { + /** + * @param message {object} + */ + sendToQml(message: object): void; + /** + * @param message {object} + */ + emitScriptEvent(message: object): void; + /** + * @param message {object} + */ + emitWebEvent(message: object): void; + close(): void; + show(): void; + raise(): void; + /** + * @returns {Signal} + */ + visibleChanged(): Signal; + /** + * @returns {Signal} + */ + positionChanged(): Signal; + /** + * @returns {Signal} + */ + sizeChanged(): Signal; + /** + * @returns {Signal} + */ + presentationModeChanged(): Signal; + /** + * @returns {Signal} + */ + titleChanged(): Signal; + /** + * @returns {Signal} + */ + closed(): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + fromQml(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + scriptEventReceived(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + webEventReceived(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + qmlToScript(message: object): Signal; +} + +/** + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace OffscreenFlags { - /** - * @returns {Signal} - */ - function navigationFocusedChanged(): Signal; - /** - * @returns {Signal} - */ - function navigationFocusDisabledChanged(): Signal; - let navigationFocused: boolean; - let navigationFocusDisabled: boolean; + /** + * @returns {Signal} + */ + function navigationFocusedChanged(): Signal; + /** + * @returns {Signal} + */ + function navigationFocusDisabledChanged(): Signal; + let navigationFocused: boolean; + let navigationFocusDisabled: boolean; } /** -* Available in:Interface Scripts -* @param properties {OverlayWindow.Properties} [properties=null] -*/ + * Available in:Interface ScriptsClient Entity Scripts + * @param properties {OverlayWindow.Properties} [properties=null] + */ declare class OverlayWebWindow { - /** - * @returns {string} - */ - getURL(): string; - /** - * @param url {string} - */ - setURL(url: string): void; - /** - * @param script {string} - */ - getURL(script: string): void; - /** - * @returns {Signal} - */ - getURL(): Signal; + /** + * @returns {string} + */ + getURL(): string; + /** + * @param url {string} + */ + setURL(url: string): void; + /** + * @param script {string} + */ + setScriptURL(script: string): void; + /** + * @returns {Signal} + */ + urlChanged(): Signal; + /** + * @param properties {OverlayWindow.Properties} + */ + initQml(properties: OverlayWindow.Properties): void; + /** + * @returns {boolean} + */ + isVisible(): boolean; + /** + * @param visible {boolean} + */ + setVisible(visible: boolean): void; + /** + * @returns {Vec2} + */ + getPosition(): Vec2; + /** + * @param position {Vec2} + */ + setPosition(position: Vec2): void; + /** + * @param x {number} + * @param y {number} + */ + setPosition(x: number, y: number): void; + /** + * @returns {Vec2} + */ + getSize(): Vec2; + /** + * @param size {Vec2} + */ + setSize(size: Vec2): void; + /** + * @param width {number} + * @param height {number} + */ + setSize(width: number, height: number): void; + /** + * @param title {string} + */ + setTitle(title: string): void; + raise(): void; + close(): void; + /** + * @returns {object} + */ + getEventBridge(): object; + /** + * @param message {object} + */ + sendToQml(message: object): void; + clearDebugWindow(): void; + /** + * @param message {object} + */ + emitScriptEvent(message: object): void; + /** + * @param message {object} + */ + emitWebEvent(message: object): void; + /** + * @returns {Signal} + */ + visibleChanged(): Signal; + /** + * @returns {Signal} + */ + positionChanged(): Signal; + /** + * @returns {Signal} + */ + sizeChanged(): Signal; + /** + * @param position {Vec2} + * @returns {Signal} + */ + moved(position: Vec2): Signal; + /** + * @param size {Size} + * @returns {Signal} + */ + resized(size: Size): Signal; + /** + * @returns {Signal} + */ + closed(): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + fromQml(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + scriptEventReceived(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + webEventReceived(message: object): Signal; + /** + * @param position {Vec2} + * @returns {Signal} + */ + hasMoved(position: Vec2): Signal; + /** + * @returns {Signal} + */ + hasClosed(): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + qmlToScript(message: object): Signal; } /** -* Available in:Interface Scripts -* @param properties {OverlayWindow.Properties} [properties=null] -*/ + * Available in:Interface Scripts + * @param properties {OverlayWindow.Properties} [properties=null] + */ declare class OverlayWindow { - interface Properties { - title: string; - source: string; - width: number; - height: number; - visible: boolean; - } - - /** - * @param properties {OverlayWindow.Properties} - */ - initQml(properties: OverlayWindow.Properties): void; - /** - * @returns {boolean} - */ - isVisible(): boolean; - /** - * @param visible {boolean} - */ - setVisible(visible: boolean): void; - /** - * @returns {Vec2} - */ - getPosition(): Vec2; - /** - * @param position {Vec2} - */ - setPosition(position: Vec2): void; - /** - * @param x {number} - * @param y {number} - */ - setPosition(x: number, y: number): void; - /** - * @returns {Vec2} - */ - getSize(): Vec2; - /** - * @param size {Vec2} - */ - setSize(size: Vec2): void; - /** - * @param width {number} - * @param height {number} - */ - setSize(width: number, height: number): void; - /** - * @param title {string} - */ - setTitle(title: string): void; - raise(): void; - close(): void; - /** - * @returns {object} - */ - getEventBridge(): object; - /** - * @param message {object} - */ - sendToQml(message: object): void; - clearDebugWindow(): void; - /** - * @param message {object} - */ - emitScriptEvent(message: object): void; - /** - * @param message {object} - */ - emitWebEvent(message: object): void; - /** - * @returns {Signal} - */ - visibleChanged(): Signal; - /** - * @returns {Signal} - */ - positionChanged(): Signal; - /** - * @returns {Signal} - */ - sizeChanged(): Signal; - /** - * @param position {Vec2} - * @returns {Signal} - */ - moved(position: Vec2): Signal; - /** - * @param size {Size} - * @returns {Signal} - */ - resized(size: Size): Signal; - /** - * @returns {Signal} - */ - closed(): Signal; - /** - * @param message {object} - * @returns {Signal} - */ - fromQml(message: object): Signal; - /** - * @param message {object} - * @returns {Signal} - */ - scriptEventReceived(message: object): Signal; - /** - * @param message {object} - * @returns {Signal} - */ - webEventReceived(message: object): Signal; - /** - * @param position {Vec2} - * @returns {Signal} - */ - hasMoved(position: Vec2): Signal; - /** - * @returns {Signal} - */ - hasClosed(): Signal; - /** - * @param message {object} - * @returns {Signal} - */ - qmlToScript(message: object): Signal; + interface Properties { + title: string; + source: string; + width: number; + height: number; + visible: boolean; + } + + /** + * @param properties {OverlayWindow.Properties} + */ + initQml(properties: OverlayWindow.Properties): void; + /** + * @returns {boolean} + */ + isVisible(): boolean; + /** + * @param visible {boolean} + */ + setVisible(visible: boolean): void; + /** + * @returns {Vec2} + */ + getPosition(): Vec2; + /** + * @param position {Vec2} + */ + setPosition(position: Vec2): void; + /** + * @param x {number} + * @param y {number} + */ + setPosition(x: number, y: number): void; + /** + * @returns {Vec2} + */ + getSize(): Vec2; + /** + * @param size {Vec2} + */ + setSize(size: Vec2): void; + /** + * @param width {number} + * @param height {number} + */ + setSize(width: number, height: number): void; + /** + * @param title {string} + */ + setTitle(title: string): void; + raise(): void; + close(): void; + /** + * @returns {object} + */ + getEventBridge(): object; + /** + * @param message {object} + */ + sendToQml(message: object): void; + clearDebugWindow(): void; + /** + * @param message {object} + */ + emitScriptEvent(message: object): void; + /** + * @param message {object} + */ + emitWebEvent(message: object): void; + /** + * @returns {Signal} + */ + visibleChanged(): Signal; + /** + * @returns {Signal} + */ + positionChanged(): Signal; + /** + * @returns {Signal} + */ + sizeChanged(): Signal; + /** + * @param position {Vec2} + * @returns {Signal} + */ + moved(position: Vec2): Signal; + /** + * @param size {Size} + * @returns {Signal} + */ + resized(size: Size): Signal; + /** + * @returns {Signal} + */ + closed(): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + fromQml(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + scriptEventReceived(message: object): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + webEventReceived(message: object): Signal; + /** + * @param position {Vec2} + * @returns {Signal} + */ + hasMoved(position: Vec2): Signal; + /** + * @returns {Signal} + */ + hasClosed(): Signal; + /** + * @param message {object} + * @returns {Signal} + */ + qmlToScript(message: object): Signal; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace Tablet { - /** - * Creates or returns a new TabletProxy and returns it. - * @param name {string} Tablet name. - * @returns {TabletProxy} - */ - function getTablet(name: string): TabletProxy; - /** - * @param sound {Tablet.AudioEvents} - */ - function playSound(sound: Tablet.AudioEvents): void; - /** - * Triggered when a tablet message or dialog is created. - * @returns {Signal} - */ - function tabletNotification(): Signal; + /** + * Creates or returns a new TabletProxy and returns it. + * @param name {string} Tablet name. + * @returns {TabletProxy} + */ + function getTablet(name: string): TabletProxy; + /** + * @param sound {Tablet.AudioEvents} + */ + function playSound(sound: Tablet.AudioEvents): void; + /** + * Triggered when a tablet message or dialog is created. + * @returns {Signal} + */ + function tabletNotification(): Signal; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace tabletInterface { - /** - * Creates or returns a new TabletProxy and returns it. - * @param name {string} Tablet name. - * @returns {TabletProxy} - */ - function getTablet(name: string): TabletProxy; - /** - * @param sound {Tablet.AudioEvents} - */ - function playSound(sound: Tablet.AudioEvents): void; - /** - * Triggered when a tablet message or dialog is created. - * @returns {Signal} - */ - function tabletNotification(): Signal; + /** + * Creates or returns a new TabletProxy and returns it. + * @param name {string} Tablet name. + * @returns {TabletProxy} + */ + function getTablet(name: string): TabletProxy; + /** + * @param sound {Tablet.AudioEvents} + */ + function playSound(sound: Tablet.AudioEvents): void; + /** + * Triggered when a tablet message or dialog is created. + * @returns {Signal} + */ + function tabletNotification(): Signal; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare class TabletProxy { - interface ButtonList { - } - - /** - * @param submenu {string} [submenu=""] - */ - gotoMenuScreen(submenu: string): void; - /** - * @param url {string} - */ - initialScreen(url: string): void; - /** - * Transition to the home screen. - */ - gotoHomeScreen(): void; - /** - * Show the specified Web url on the tablet. - * @param url {string} URL of web page. - * @param injectedJavaScriptUrl {string} [injectedJavaScriptUrl=""] URL to an additional JS script to inject into the web page. - * @param loadOtherBase {boolean} [loadOtherBase=false] - */ - gotoWebScreen(url: string, injectedJavaScriptUrl: string, loadOtherBase: boolean): void; - /** - * @param path {string} - * @param resizable {boolean} [resizable=false] - */ - loadQMLSource(path: string, resizable: boolean): void; - /** - * @param path {string} - * @returns {boolean} - */ - pushOntoStack(path: string): boolean; - popFromStack(): void; - /** - * @param path {string} - */ - loadQMLOnTop(path: string): void; - /** - * @param path {string} - * @param injectedJavaScriptURL {string} [injectedJavaScriptURL=""] - */ - loadWebScreenOnTop(path: string, injectedJavaScriptURL: string): void; - returnToPreviousApp(): void; - /** - * Check if the tablet has a message dialog open. - * @returns {boolean} - */ - isMessageDialogOpen(): boolean; - /** - * Creates a new button, adds it to this and returns it. - * @param properties {object} Button properties. - * @returns {TabletButtonProxy} - */ - addButton(properties: object): TabletButtonProxy; - /** - * Removes a button from the tablet. - * @param button {TabletButtonProxy} The button to be removed - */ - removeButton(button: TabletButtonProxy): void; - /** - * Used to send an event to the HTML/JavaScript embedded in the tablet. - * @param message {object} - */ - emitScriptEvent(message: object): void; - /** - * Used to send an event to the QML embedded in the tablet. - * @param message {object} - */ - sendToQml(message: object): void; - /** - * Check if the tablet is on the home screen. - * @returns {boolean} - */ - onHomeScreen(): boolean; - /** - * Set tablet into or out of landscape mode. - * @param landscape {boolean} true for landscape, false for portrait. - */ - setLandscape(landscape: boolean): void; - /** - * @returns {boolean} - */ - getLandscape(): boolean; - /** - * @param path {string} - * @returns {boolean} - */ - isPathLoaded(path: string): boolean; - /** - * Signaled when this tablet receives an event from the html/js embedded in the tablet. - * @param message {object} - * @returns {Signal} - */ - webEventReceived(message: object): Signal; - /** - * Signaled when this tablet receives an event from the qml embedded in the tablet. - * @param message {object} - * @returns {Signal} - */ - fromQml(message: object): Signal; - /** - * Signaled when this tablet screen changes. - * @param type {string} "Home", "Web", "Menu", "QML", "Closed". - * @param url {string} Only valid for Web and QML. - */ - screenChanged(type: string, url: string): void; - /** - * Signaled when the tablet becomes visible or becomes invisible. - * @returns {Signal} - */ - isTabletShownChanged(): Signal; - toolbarModeChanged(): void; + interface ButtonList { + } + + /** + * @param submenu {string} [submenu=""] + */ + gotoMenuScreen(submenu: string): void; + /** + * @param url {string} + */ + initialScreen(url: string): void; + /** + * Transition to the home screen. + */ + gotoHomeScreen(): void; + /** + * Show the specified Web url on the tablet. + * @param url {string} URL of web page. + * @param injectedJavaScriptUrl {string} [injectedJavaScriptUrl=""] URL to an additional JS script to inject into the web page. + * @param loadOtherBase {boolean} [loadOtherBase=false] + */ + gotoWebScreen(url: string, injectedJavaScriptUrl: string, loadOtherBase: boolean): void; + /** + * @param path {string} + * @param resizable {boolean} [resizable=false] + */ + loadQMLSource(path: string, resizable: boolean): void; + /** + * @param path {string} + * @returns {boolean} + */ + pushOntoStack(path: string): boolean; + popFromStack(): void; + /** + * @param path {string} + */ + loadQMLOnTop(path: string): void; + /** + * @param path {string} + * @param injectedJavaScriptURL {string} [injectedJavaScriptURL=""] + */ + loadWebScreenOnTop(path: string, injectedJavaScriptURL: string): void; + returnToPreviousApp(): void; + /** + * Check if the tablet has a message dialog open. + * @returns {boolean} + */ + isMessageDialogOpen(): boolean; + /** + * Close any open dialogs. + */ + closeDialog(): void; + /** + * Creates a new button, adds it to this and returns it. + * @param properties {object} Button properties. + * @returns {TabletButtonProxy} + */ + addButton(properties: object): TabletButtonProxy; + /** + * Removes a button from the tablet. + * @param button {TabletButtonProxy} The button to be removed + */ + removeButton(button: TabletButtonProxy): void; + /** + * Used to send an event to the HTML/JavaScript embedded in the tablet. + * @param message {object} + */ + emitScriptEvent(message: object): void; + /** + * Used to send an event to the QML embedded in the tablet. + * @param message {object} + */ + sendToQml(message: object): void; + /** + * Check if the tablet is on the home screen. + * @returns {boolean} + */ + onHomeScreen(): boolean; + /** + * Set tablet into or out of landscape mode. + * @param landscape {boolean} true for landscape, false for portrait. + */ + setLandscape(landscape: boolean): void; + /** + * @returns {boolean} + */ + getLandscape(): boolean; + /** + * @param path {string} + * @returns {boolean} + */ + isPathLoaded(path: string): boolean; + /** + * Signaled when this tablet receives an event from the html/js embedded in the tablet. + * @param message {object} + * @returns {Signal} + */ + webEventReceived(message: object): Signal; + /** + * Signaled when this tablet receives an event from the qml embedded in the tablet. + * @param message {object} + * @returns {Signal} + */ + fromQml(message: object): Signal; + /** + * Signaled when this tablet screen changes. + * @param type {string} "Home", "Web", "Menu", "QML", "Closed". + * @param url {string} Only valid for Web and QML. + */ + screenChanged(type: string, url: string): void; + /** + * Signaled when the tablet becomes visible or becomes invisible. + * @returns {Signal} + */ + isTabletShownChanged(): Signal; + toolbarModeChanged(): void; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare class TabletButtonProxy { - /** - * Returns the current value of this button's properties. - * @returns {TabletButtonProxy.ButtonProperties} - */ - getProperties(): TabletButtonProxy.ButtonProperties; - /** - * Replace the values of some of this button's properties. - * @param properties {TabletButtonProxy.ButtonProperties} Set of properties to change. - */ - editProperties(properties: TabletButtonProxy.ButtonProperties): void; - /** - * Triggered when this button has been clicked on by the user. - * @returns {Signal} - */ - clicked(): Signal; - /** - * @returns {Signal} - */ - propertiesChanged(): Signal; + /** + * Returns the current value of this button's properties. + * @returns {TabletButtonProxy.ButtonProperties} + */ + getProperties(): TabletButtonProxy.ButtonProperties; + /** + * Replace the values of some of this button's properties. + * @param properties {TabletButtonProxy.ButtonProperties} Set of properties to change. + */ + editProperties(properties: TabletButtonProxy.ButtonProperties): void; + /** + * Triggered when this button has been clicked on by the user. + * @returns {Signal} + */ + clicked(): Signal; + /** + * @returns {Signal} + */ + propertiesChanged(): Signal; + interface ButtonProperties { + /** + * URL to button icon. (50 x 50) + */ + icon: string; + /** + * URL to button icon, displayed during mouse hover. (50 x 50) + */ + hoverIcon: string; + /** + * URL to button icon used when button is active, and during mouse hover. (50 x 50) + */ + activeHoverIcon: string; + /** + * URL to button icon used when button is active. (50 x 50) + */ + activeIcon: string; + /** + * Button caption. + */ + text: string; + /** + * Button caption when button is not-active but during mouse hover. + */ + hoverText: string; + /** + * Button caption when button is active. + */ + activeText: string; + /** + * Button caption when button is active and during mouse hover. + */ + activeHoverText: string; + /** + * true when button is active. + */ + isActive: boolean; + /** + * Determines sort order on tablet. lower numbers will appear before larger numbers. + * Default is 100. + */ + sortOrder: number; + } + } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare class ToolbarButtonProxy { - /** - * @param properties {object} - */ - editProperties(properties: object): void; - /** - * @param propertyValue {object} - */ - writeProperty(propertyValue: object): void; - /** - * @param properties {object} - */ - writeProperties(properties: object): void; - /** - * @param propertyName {string} - * @returns {object} - */ - readProperty(propertyName: string): object; - /** - * @param propertyList {Array.} - * @returns {object} - */ - readProperties(propertyList: Array.): object; - /** - * @returns {Signal} - */ - clicked(): Signal; + /** + * @param properties {object} + */ + editProperties(properties: object): void; + /** + * @param propertyValue {object} + */ + writeProperty(propertyValue: object): void; + /** + * @param properties {object} + */ + writeProperties(properties: object): void; + /** + * @param propertyName {string} + * @returns {object} + */ + readProperty(propertyName: string): object; + /** + * @param propertyList {Array.} + * @returns {object} + */ + readProperties(propertyList: Array.): object; + /** + * @returns {Signal} + */ + clicked(): Signal; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare class ToolbarProxy { - /** - * @param properties {object} - * @returns {ToolbarButtonProxy} - */ - addButton(properties: object): ToolbarButtonProxy; - /** - * @param name {string} - */ - removeButton(name: string): void; - /** - * @param propertyValue {object} - */ - writeProperty(propertyValue: object): void; - /** - * @param properties {object} - */ - writeProperties(properties: object): void; - /** - * @param propertyName {string} - * @returns {object} - */ - readProperty(propertyName: string): object; - /** - * @param propertyList {Array.} - * @returns {object} - */ - readProperties(propertyList: Array.): object; + /** + * @param properties {object} + * @returns {ToolbarButtonProxy} + */ + addButton(properties: object): ToolbarButtonProxy; + /** + * @param name {string} + */ + removeButton(name: string): void; + /** + * @param propertyValue {object} + */ + writeProperty(propertyValue: object): void; + /** + * @param properties {object} + */ + writeProperties(properties: object): void; + /** + * @param propertyName {string} + * @returns {object} + */ + readProperty(propertyName: string): object; + /** + * @param propertyList {Array.} + * @returns {object} + */ + readProperties(propertyList: Array.): object; } /** -* Available in:Interface ScriptsClient Entity Scripts -*/ + * Available in:Interface ScriptsClient Entity Scripts + */ declare namespace Toolbars { - /** - * @param toolbarID {string} - * @returns {ToolbarProxy} - */ - function getToolbar(toolbarID: string): ToolbarProxy; + /** + * @param toolbarID {string} + * @returns {ToolbarProxy} + */ + function getToolbar(toolbarID: string): ToolbarProxy; }