Merge branch 'master' into feature/domain-metadata-exporter

This commit is contained in:
Kasen IO 2020-06-15 22:51:56 -04:00
commit 7be55e19a7
88 changed files with 965 additions and 792 deletions

View file

@ -97,7 +97,7 @@ endif()
option(VCPKG_APPLOCAL_DEPS OFF) option(VCPKG_APPLOCAL_DEPS OFF)
project(athena) project(vircadia)
include("cmake/init.cmake") include("cmake/init.cmake")
include("cmake/compiler.cmake") include("cmake/compiler.cmake")
option(VCPKG_APPLOCAL_DEPS OFF) option(VCPKG_APPLOCAL_DEPS OFF)

View file

@ -976,14 +976,13 @@ while (true) {
#### [4.3.4] Source files (header and implementation) must include a boilerplate. #### [4.3.4] Source files (header and implementation) must include a boilerplate.
Boilerplates should include the filename, location, creator, copyright Vircadia contributors, and Apache 2.0 License Boilerplates should include the filename, creator, copyright Vircadia contributors, and Apache 2.0 License information.
information. This should be placed at the top of the file. If editing an existing file that is copyright High Fidelity, add a This should be placed at the top of the file. If editing an existing file that is copyright High Fidelity, add a second
second copyright line, copyright Vircadia contributors. copyright line, copyright Vircadia contributors.
```cpp ```cpp
// //
// NodeList.h // NodeList.h
// libraries/shared/src
// //
// Created by Stephen Birarda on 15 Feb 2013. // Created by Stephen Birarda on 15 Feb 2013.
// Copyright 2013 High Fidelity, Inc. // Copyright 2013 High Fidelity, Inc.

View file

@ -14,21 +14,29 @@ Vircadia is a 3D social software project seeking to incrementally bring about a
[For Windows](https://github.com/kasenvr/project-athena/blob/master/BUILD_WIN.md) [For Windows](https://github.com/kasenvr/project-athena/blob/master/BUILD_WIN.md)
[For Mac](https://github.com/kasenvr/project-athena/blob/master/BUILD_OSX.md)
[For Linux](https://github.com/kasenvr/project-athena/blob/master/BUILD_LINUX.md) [For Linux](https://github.com/kasenvr/project-athena/blob/master/BUILD_LINUX.md)
[For Linux - Athena Builder](https://github.com/kasenvr/vircadia-builder) [For Linux - Vircadia Builder](https://github.com/kasenvr/vircadia-builder)
### How to deploy a Server ### How to deploy a Server
[For Windows and Linux](https://vircadia.com/download-vircadia/#server) [For Windows and Linux](https://vircadia.com/deploy-a-server/)
### How to build a Server ### How to build a Server
[For Linux - Athena Builder](https://github.com/kasenvr/vircadia-builder) [For Linux - Vircadia Builder](https://github.com/kasenvr/vircadia-builder)
### How to generate an Installer
[For Windows](https://github.com/kasenvr/project-athena/blob/master/INSTALL.md)
[For Linux - AppImage - Vircadia Builder](https://github.com/kasenvr/vircadia-builder/blob/master/README.md#building-appimages)
### Boot to Metaverse: The Goal ### Boot to Metaverse: The Goal
Having a place to experience adventure, a place to relax with calm breath, that's a world to live in. An engine to support infinite combinations and possibilities of worlds without censorship and interruption, that's a metaverse. Finding a way to make infinite realities our reality, that's the dream. Having a place to experience adventure, a place to relax with calm breath, that's a world to live in. An engine to support infinite combinations and possibilities of worlds without censorship and interruption, that's a metaverse. Finding a way to make infinite realities our reality is the dream.
### Boot to Metaverse: The Technicals ### Boot to Metaverse: The Technicals

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View file

@ -6,9 +6,9 @@ vcpkg_from_github(
REPO REPO
xiph/opus xiph/opus
REF REF
e85ed7726db5d677c9c0677298ea0cb9c65bdd23 72a3a6c13329869000b34a12ba27d8bfdfbc22b3
SHA512 SHA512
a8c7e5bf383c06f1fdffd44d9b5f658f31eb4800cb59d12da95ddaeb5646f7a7b03025f4663362b888b1374d4cc69154f006ba07b5840ec61ddc1a1af01d6c54 590b852e966a497e33d129b58bc07d1205fe8fea9b158334cd8a3c7f539332ef9702bba4a37bd0be83eb5f04a218cef87645251899f099695d01c1eb8ea6e2fd
HEAD_REF HEAD_REF
master) master)

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 132 KiB

View file

@ -79,7 +79,7 @@
var count = 3; var count = 3;
var handControllerRefURL = "https://docs.vircadia.dev/explore/get-started/vr-controls.html#vr-controls"; var handControllerRefURL = "https://docs.vircadia.dev/explore/get-started/vr-controls.html#vr-controls";
var keyboardRefURL = "https://docs.vircadia.dev/explore/get-started/desktop.html#movement-controls"; var keyboardRefURL = "https://docs.vircadia.dev/explore/get-started/desktop.html#movement-controls";
var gamepadRefURL = "https://docs.vircadia.dev/explore/get-started/vr-controls.html#gamepad"; var gamepadRefURL = "https://docs.vircadia.dev/explore/get-started/vr-controls.html#gamepad";
function showKbm() { function showKbm() {
document.getElementById("main_image").setAttribute("src", "img/tablet-help-keyboard.jpg"); document.getElementById("main_image").setAttribute("src", "img/tablet-help-keyboard.jpg");

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="1880" height="320" viewBox="0 0 1880.00 320.00" enable-background="new 0 0 1880.00 320.00" xml:space="preserve">
<radialGradient id="SVGID_Fill1_" cx="-571.529" cy="-604.157" r="3176.39" gradientUnits="userSpaceOnUse">
<stop offset="0.451163" stop-color="#01BDFF" stop-opacity="1"/>
<stop offset="0.827907" stop-color="#8C1AFF" stop-opacity="1"/>
</radialGradient>
<path fill="url(#SVGID_Fill1_)" stroke-width="0.2" stroke-linejoin="round" d="M 28.723,5.00146L 1706.72,5.00146C 1726.61,5.00146 1750.24,21.1192 1759.51,41.0015L 1870.49,278.999C 1879.76,298.881 1871.16,314.999 1851.28,314.999L 173.277,314.999C 153.395,314.999 129.761,298.881 120.49,278.999L 9.51012,41.0015C 0.238872,21.1192 8.84079,5.00146 28.723,5.00146 Z "/>
<path fill="#36393F" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 678.939,23.013L 1697.3,23.0124C 1723.4,22.9324 1739.32,35.2514 1749.85,58.4911L 1844.51,261.508C 1860.58,289.515 1859.52,298.385 1825.06,296.987L 677.061,296.987"/>
<g>
<path fill="#FAFAFA" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 699.7,159.966C 699.7,145.281 702.032,131.093 706.698,117.404C 711.363,103.714 718.063,91.58 726.796,81.0016C 735.529,70.4231 745.996,61.9604 758.199,55.6133C 770.401,49.2663 784.039,46.0927 799.112,46.0927L 906.779,46.0927L 906.779,93.8823L 800.189,93.8823C 794.686,93.8823 789.003,95.7491 783.142,99.4827C 777.28,103.216 771.896,108.132 766.992,114.23C 762.087,120.328 758.019,127.36 754.789,135.325C 751.559,143.29 749.944,151.379 749.944,159.593C 749.944,167.807 751.499,175.896 754.61,183.861C 757.72,191.826 761.788,198.92 766.812,205.142C 771.837,211.365 777.459,216.343 783.68,220.077C 789.901,223.81 796.122,225.677 802.342,225.677L 906.779,225.677L 906.779,273.467L 798.036,273.467C 782.244,273.467 768.248,270.044 756.045,263.199C 743.843,256.354 733.555,247.456 725.181,236.504C 716.807,225.553 710.466,213.356 706.16,199.915C 701.853,186.475 699.7,173.158 699.7,159.966 Z "/>
<rect x="1464.81" y="46.0927" fill="#FAFAFA" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" width="55.9871" height="227.374"/>
</g>
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 493.02,97.6159L 493.02,139.602L 493,139.602L 493,199.602L 493.02,199.602L 493.02,273.467L 439.123,273.467L 439.123,46.0928L 566.737,46.0928C 578.327,46.0928 588.237,48.2707 596.467,52.6265C 604.696,56.9823 611.419,62.7071 616.635,69.8009C 621.851,76.8946 625.618,84.9218 627.936,93.8824C 630.254,102.843 631.413,111.928 631.413,121.137C 631.413,128.604 630.428,136.009 628.457,143.352C 626.487,150.695 623.763,157.54 620.286,163.887C 616.809,170.234 612.578,175.896 607.594,180.874C 602.61,185.852 597.104,189.71 591.077,192.448L 654.363,273.467L 588.295,273.467L 521,188.288L 521,149.512L 566.737,149.512C 568.359,149.512 569.982,148.517 571.605,146.526C 573.227,144.534 574.618,142.17 575.777,139.432C 576.937,136.694 577.922,133.894 578.733,131.031C 579.544,128.169 579.95,125.991 579.95,124.498C 579.95,122.257 579.718,119.644 579.255,116.657C 578.791,113.67 578.038,110.746 576.995,107.883C 575.951,105.021 574.56,102.594 572.822,100.603C 571.083,98.6115 569.055,97.6159 566.737,97.6159L 493.02,97.6159 Z "/>
<g>
<rect x="340.465" y="46.0927" fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" width="54.9846" height="227.374"/>
</g>
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 55.5166,46.093L 161.961,273.467L 214.479,273.467L 216.626,269.689L 115.436,46.093L 55.5166,46.093 Z "/>
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 231.92,235.709L 319.513,46.0926L 259.594,46.0926L 202.957,171.669L 231.92,235.709 Z "/>
<path fill="#FAFAFA" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 987.874,273.467L 926.863,273.467L 1034.17,46.0927L 1088,46.0927L 1195.67,273.467L 1134.66,273.467L 1106.67,212.983L 1047.45,212.983L 1044.83,212.918L 1065.94,164.447L 1087.65,164.447L 1060.73,106.576"/>
<path fill="#FAFAFA" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 1605.13,273.467L 1544.12,273.467L 1651.43,46.0927L 1705.26,46.0927L 1812.93,273.467L 1751.91,273.467L 1723.92,212.983L 1664.7,212.983L 1662,212.918L 1683.24,164.447L 1704.9,164.447L 1677.98,106.576"/>
<path fill="#FAFAFA" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 1438.98,159.966C 1438.98,173.158 1436.83,186.475 1432.52,199.915C 1428.22,213.356 1421.88,225.553 1413.5,236.504C 1405.13,247.456 1394.84,256.354 1382.64,263.199C 1370.43,270.044 1356.44,273.467 1340.65,273.467L 1217.91,273.467L 1217.91,121.9L 1272.1,121.9L 1272.1,225.677L 1335.98,225.677C 1342.2,225.677 1348.42,223.81 1354.64,220.077C 1360.86,216.343 1366.49,211.365 1371.51,205.142C 1376.54,198.92 1380.6,191.826 1383.71,183.861C 1386.82,175.896 1388.38,167.807 1388.38,159.593C 1388.38,150.632 1386.58,142.17 1383,134.205C 1379.41,126.24 1375.04,119.271 1369.9,113.297C 1364.75,107.323 1359.31,102.594 1353.57,99.1094C 1347.82,95.6247 1342.8,93.8824 1338.49,93.8824L 1272.1,93.8824L 1272.1,93.9001L 1217.91,93.9001L 1217.91,46.0927L 1332.03,46.0927C 1350.46,46.0927 1366.43,49.0796 1379.95,55.0533C 1393.46,61.0269 1404.59,69.1163 1413.32,79.3215C 1422.06,89.5265 1428.52,101.536 1432.7,115.35C 1436.89,129.165 1438.98,144.037 1438.98,159.966 Z "/>
</svg>

View file

@ -85,7 +85,9 @@ FocusScope {
Image { Image {
id: banner id: banner
anchors.centerIn: parent anchors.centerIn: parent
source: "../images/project-athena-banner-color2.svg" sourceSize.width: 500
sourceSize.height: 91
source: "../images/vircadia-logo.svg"
horizontalAlignment: Image.AlignHCenter horizontalAlignment: Image.AlignHCenter
} }
} }

View file

@ -23,7 +23,7 @@ Item {
clip: true clip: true
height: root.height height: root.height
width: root.width width: root.width
readonly property string termsContainerText: qsTr("By signing up, you agree to Project Athena's Terms of Service") readonly property string termsContainerText: qsTr("By signing up, you agree to Vircadia's Terms of Service")
property int textFieldHeight: 31 property int textFieldHeight: 31
property string fontFamily: "Raleway" property string fontFamily: "Raleway"
property int fontSize: 15 property int fontSize: 15

View file

@ -19,7 +19,7 @@ import TabletScriptingInterface 1.0
Item { Item {
id: usernameCollisionBody id: usernameCollisionBody
clip: true clip: true
readonly property string termsContainerText: qsTr("By creating this user profile, you agree to Project Athena's Terms of Service") readonly property string termsContainerText: qsTr("By creating this user profile, you agree to Vircadia's Terms of Service")
width: root.width width: root.width
height: root.height height: root.height
readonly property string fontFamily: "Raleway" readonly property string fontFamily: "Raleway"

View file

@ -81,7 +81,9 @@ FocusScope {
Image { Image {
id: banner id: banner
anchors.centerIn: parent anchors.centerIn: parent
source: "../images/high-fidelity-banner.svg" sourceSize.width: 500
sourceSize.height: 91
source: "../images/vircadia-logo.svg"
horizontalAlignment: Image.AlignHCenter horizontalAlignment: Image.AlignHCenter
} }
} }

View file

@ -109,7 +109,7 @@ SpinBox {
id: spinboxText id: spinboxText
z: 2 z: 2
color: isLightColorScheme color: isLightColorScheme
? (spinBox.activeFocus ? hifi.colors.black : hifi.colors.faintGray) ? (spinBox.activeFocus ? hifi.colors.black : hifi.colors.baseGrayHighlight)
: (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGrayText) : (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGrayText)
selectedTextColor: hifi.colors.black selectedTextColor: hifi.colors.black
selectionColor: hifi.colors.primaryHighlight selectionColor: hifi.colors.primaryHighlight
@ -130,7 +130,7 @@ SpinBox {
} }
color: isLightColorScheme color: isLightColorScheme
? (spinBox.activeFocus ? hifi.colors.black : hifi.colors.faintGray) ? (spinBox.activeFocus ? hifi.colors.black : hifi.colors.baseGrayHighlight)
: (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGrayText) : (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGrayText)
text: suffix text: suffix
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter

View file

@ -129,7 +129,9 @@ FocusScope {
Image { Image {
id: banner id: banner
anchors.centerIn: parent anchors.centerIn: parent
source: "../../images/project-athena-banner-color2.svg" sourceSize.width: 400
sourceSize.height: 73
source: "../../images/vircadia-logo.svg"
horizontalAlignment: Image.AlignHCenter horizontalAlignment: Image.AlignHCenter
} }
} }

View file

@ -403,7 +403,6 @@ Rectangle {
Vector3 { Vector3 {
id: positionVector id: positionVector
backgroundColor: "lightgray"
enabled: getCurrentWearable() !== null enabled: getCurrentWearable() !== null
function set(localPosition) { function set(localPosition) {
@ -463,7 +462,6 @@ Rectangle {
Vector3 { Vector3 {
id: rotationVector id: rotationVector
backgroundColor: "lightgray"
enabled: getCurrentWearable() !== null enabled: getCurrentWearable() !== null
function set(localRotationAngles) { function set(localRotationAngles) {
@ -550,7 +548,7 @@ Rectangle {
realFrom: 0.1 realFrom: 0.1
realTo: 3.0 realTo: 3.0
realValue: 1.0 realValue: 1.0
backgroundColor: "lightgray" backgroundColor: activeFocus ? "white" : "lightgray"
width: positionVector.spinboxWidth width: positionVector.spinboxWidth
colorScheme: hifi.colorSchemes.light colorScheme: hifi.colorSchemes.light

View file

@ -29,7 +29,7 @@ Row {
id: xspinner id: xspinner
width: parent.spinboxWidth width: parent.spinboxWidth
labelInside: "X:" labelInside: "X:"
backgroundColor: parent.backgroundColor backgroundColor: activeFocus ? "white" : "lightgray"
colorLabelInside: hifi.colors.redHighlight colorLabelInside: hifi.colors.redHighlight
colorScheme: hifi.colorSchemes.light colorScheme: hifi.colorSchemes.light
decimals: root.decimals; decimals: root.decimals;
@ -43,7 +43,7 @@ Row {
id: yspinner id: yspinner
width: parent.spinboxWidth width: parent.spinboxWidth
labelInside: "Y:" labelInside: "Y:"
backgroundColor: parent.backgroundColor backgroundColor: activeFocus ? "white" : "lightgray"
colorLabelInside: hifi.colors.greenHighlight colorLabelInside: hifi.colors.greenHighlight
colorScheme: hifi.colorSchemes.light colorScheme: hifi.colorSchemes.light
decimals: root.decimals; decimals: root.decimals;
@ -57,7 +57,7 @@ Row {
id: zspinner id: zspinner
width: parent.spinboxWidth width: parent.spinboxWidth
labelInside: "Z:" labelInside: "Z:"
backgroundColor: parent.backgroundColor backgroundColor: activeFocus ? "white" : "lightgray"
colorLabelInside: hifi.colors.primaryHighlight colorLabelInside: hifi.colors.primaryHighlight
colorScheme: hifi.colorSchemes.light colorScheme: hifi.colorSchemes.light
decimals: root.decimals; decimals: root.decimals;

View file

@ -23,9 +23,9 @@ Rectangle {
spacing: 5 spacing: 5
Image { Image {
sourceSize.width: 295 width: 400; height: 73
sourceSize.height: 75 fillMode: Image.PreserveAspectFit
source: "../../../images/about-projectathena.png" source: "../../../images/vircadia-logo.svg"
} }
Item { height: 30; width: 1 } Item { height: 30; width: 1 }
Column { Column {

View file

@ -656,8 +656,8 @@ private:
/**jsdoc /**jsdoc
* <p>The <code>Controller.Hardware.Application</code> object has properties representing Interface's state. The property * <p>The <code>Controller.Hardware.Application</code> object has properties representing Interface's state. The property
* values are integer IDs, uniquely identifying each output. <em>Read-only.</em></p> * values are integer IDs, uniquely identifying each output. <em>Read-only.</em></p>
* <p>These states can be mapped to actions or functions or <code>Controller.Standard</code> items in a {@link RouteObject} * <p>These states can be mapped to actions or functions or <code>Controller.Standard</code> items in a {@link RouteObject}
* mapping (e.g., using the {@link RouteObject#when} method). Each data value is either <code>1.0</code> for "true" or * mapping (e.g., using the {@link RouteObject#when} method). Each data value is either <code>1.0</code> for "true" or
* <code>0.0</code> for "false".</p> * <code>0.0</code> for "false".</p>
* <table> * <table>
* <thead> * <thead>
@ -679,7 +679,7 @@ private:
* <tr><td><code>CameraIndependent</code></td><td>number</td><td>number</td><td>The camera is in independent mode.</td></tr> * <tr><td><code>CameraIndependent</code></td><td>number</td><td>number</td><td>The camera is in independent mode.</td></tr>
* <tr><td><code>CameraEntity</code></td><td>number</td><td>number</td><td>The camera is in entity mode.</td></tr> * <tr><td><code>CameraEntity</code></td><td>number</td><td>number</td><td>The camera is in entity mode.</td></tr>
* <tr><td><code>InHMD</code></td><td>number</td><td>number</td><td>The user is in HMD mode.</td></tr> * <tr><td><code>InHMD</code></td><td>number</td><td>number</td><td>The user is in HMD mode.</td></tr>
* <tr><td><code>AdvancedMovement</code></td><td>number</td><td>number</td><td>Advanced movement (walking) controls are * <tr><td><code>AdvancedMovement</code></td><td>number</td><td>number</td><td>Advanced movement (walking) controls are
* enabled.</td></tr> * enabled.</td></tr>
* <tr><td><code>StrafeEnabled</code></td><td>number</td><td>number</td><td>Strafing is enabled</td></tr> * <tr><td><code>StrafeEnabled</code></td><td>number</td><td>number</td><td>Strafing is enabled</td></tr>
* <tr><td><code>LeftHandDominant</code></td><td>number</td><td>number</td><td>Dominant hand set to left.</td></tr> * <tr><td><code>LeftHandDominant</code></td><td>number</td><td>number</td><td>Dominant hand set to left.</td></tr>
@ -829,7 +829,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
audioDLLPath += "/audioWin7"; audioDLLPath += "/audioWin7";
} }
QCoreApplication::addLibraryPath(audioDLLPath); QCoreApplication::addLibraryPath(audioDLLPath);
#endif #endif
QString defaultScriptsOverrideOption = getCmdOption(argc, constArgv, "--defaultScriptsOverride"); QString defaultScriptsOverrideOption = getCmdOption(argc, constArgv, "--defaultScriptsOverride");
@ -949,7 +949,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
DependencyManager::set<AvatarPackager>(); DependencyManager::set<AvatarPackager>();
DependencyManager::set<ScreenshareScriptingInterface>(); DependencyManager::set<ScreenshareScriptingInterface>();
PlatformHelper::setup(); PlatformHelper::setup();
QObject::connect(PlatformHelper::instance(), &PlatformHelper::systemWillWake, [] { QObject::connect(PlatformHelper::instance(), &PlatformHelper::systemWillWake, [] {
QMetaObject::invokeMethod(DependencyManager::get<NodeList>().data(), "noteAwakening", Qt::QueuedConnection); QMetaObject::invokeMethod(DependencyManager::get<NodeList>().data(), "noteAwakening", Qt::QueuedConnection);
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), "noteAwakening", Qt::QueuedConnection); QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), "noteAwakening", Qt::QueuedConnection);
@ -1162,7 +1162,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
deadlockWatchdogThread->setMainThreadID(QThread::currentThreadId()); deadlockWatchdogThread->setMainThreadID(QThread::currentThreadId());
deadlockWatchdogThread->start(); deadlockWatchdogThread->start();
// Pause the deadlock watchdog when we sleep, or it might // Pause the deadlock watchdog when we sleep, or it might
// trigger a false positive when we wake back up // trigger a false positive when we wake back up
auto platformHelper = PlatformHelper::instance(); auto platformHelper = PlatformHelper::instance();
@ -3790,9 +3790,8 @@ void Application::setPreferredCursor(const QString& cursorName) {
if (_displayPlugin && _displayPlugin->isHmd()) { if (_displayPlugin && _displayPlugin->isHmd()) {
_preferredCursor.set(cursorName.isEmpty() ? DEFAULT_CURSOR_NAME : cursorName); _preferredCursor.set(cursorName.isEmpty() ? DEFAULT_CURSOR_NAME : cursorName);
} } else {
else { _preferredCursor.set(cursorName.isEmpty() ? Cursor::Manager::getIconName(Cursor::Icon::SYSTEM) : cursorName);
_preferredCursor.set(cursorName.isEmpty() ? Cursor::Manager::getIconName(Cursor::Icon::SYSTEM) : cursorName);
} }
showCursor(Cursor::Manager::lookupIcon(_preferredCursor.get())); showCursor(Cursor::Manager::lookupIcon(_preferredCursor.get()));
@ -3979,7 +3978,7 @@ void Application::handleSandboxStatus(QNetworkReply* reply) {
DependencyManager::get<AddressManager>()->loadSettings(addressLookupString); DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);
sentTo = SENT_TO_PREVIOUS_LOCATION; sentTo = SENT_TO_PREVIOUS_LOCATION;
} }
UserActivityLogger::getInstance().logAction("startup_sent_to", { UserActivityLogger::getInstance().logAction("startup_sent_to", {
{ "sent_to", sentTo }, { "sent_to", sentTo },
{ "sandbox_is_running", sandboxIsRunning }, { "sandbox_is_running", sandboxIsRunning },
@ -4214,7 +4213,7 @@ bool Application::event(QEvent* event) {
idle(); idle();
#ifdef DEBUG_EVENT_QUEUE_DEPTH #ifdef DEBUG_EVENT_QUEUE_DEPTH
// The event queue may very well grow beyond 400, so // The event queue may very well grow beyond 400, so
// this code should only be enabled on local builds // this code should only be enabled on local builds
{ {
int count = ::hifi::qt::getEventQueueSize(QThread::currentThread()); int count = ::hifi::qt::getEventQueueSize(QThread::currentThread());
@ -4253,7 +4252,7 @@ bool Application::event(QEvent* event) {
{ //testing to see if we can set focus when focus is not set to root window. { //testing to see if we can set focus when focus is not set to root window.
_glWidget->activateWindow(); _glWidget->activateWindow();
_glWidget->setFocus(); _glWidget->setFocus();
return true; return true;
} }
case QEvent::TouchBegin: case QEvent::TouchBegin:
@ -5238,7 +5237,7 @@ void Application::idle() {
} }
} }
#endif #endif
checkChangeCursor(); checkChangeCursor();
#if !defined(DISABLE_QML) #if !defined(DISABLE_QML)
@ -5491,7 +5490,7 @@ void Application::loadSettings() {
RenderScriptingInterface::getInstance()->loadSettings(); RenderScriptingInterface::getInstance()->loadSettings();
// Setup the PerformanceManager which will enforce the several settings to match the Preset // Setup the PerformanceManager which will enforce the several settings to match the Preset
// On the first run, the Preset is evaluated from the // On the first run, the Preset is evaluated from the
getPerformanceManager().setupPerformancePresetSettings(_firstRun.get()); getPerformanceManager().setupPerformancePresetSettings(_firstRun.get());
// finish initializing the camera, based on everything we checked above. Third person camera will be used if no settings // finish initializing the camera, based on everything we checked above. Third person camera will be used if no settings
@ -5537,7 +5536,7 @@ bool Application::importEntities(const QString& urlOrFilename, const bool isObse
_entityClipboard->withWriteLock([&] { _entityClipboard->withWriteLock([&] {
_entityClipboard->eraseAllOctreeElements(); _entityClipboard->eraseAllOctreeElements();
// FIXME: readFromURL() can take over the main event loop which may cause problems, especially if downloading the JSON // FIXME: readFromURL() can take over the main event loop which may cause problems, especially if downloading the JSON
// from the Web. // from the Web.
success = _entityClipboard->readFromURL(urlOrFilename, isObservable, callerId); success = _entityClipboard->readFromURL(urlOrFilename, isObservable, callerId);
if (success) { if (success) {
@ -8737,7 +8736,7 @@ bool Application::isThrottleRendering() const {
bool Application::hasFocus() const { bool Application::hasFocus() const {
bool result = (QApplication::activeWindow() != nullptr); bool result = (QApplication::activeWindow() != nullptr);
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
// On Windows, QWidget::activateWindow() - as called in setFocus() - makes the application's taskbar icon flash but doesn't // On Windows, QWidget::activateWindow() - as called in setFocus() - makes the application's taskbar icon flash but doesn't
// take user focus away from their current window. So also check whether the application is the user's current foreground // take user focus away from their current window. So also check whether the application is the user's current foreground

View file

@ -223,9 +223,9 @@ Menu::Menu() {
MenuWrapper* startupLocationMenu = navigateMenu->addMenu(MenuOption::StartUpLocation); MenuWrapper* startupLocationMenu = navigateMenu->addMenu(MenuOption::StartUpLocation);
QActionGroup* startupLocatiopnGroup = new QActionGroup(startupLocationMenu); QActionGroup* startupLocatiopnGroup = new QActionGroup(startupLocationMenu);
startupLocatiopnGroup->setExclusive(true); startupLocatiopnGroup->setExclusive(true);
startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::HomeLocation, 0, startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::HomeLocation, 0,
false)); false));
startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::LastLocation, 0, startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::LastLocation, 0,
true)); true));
// Settings menu ---------------------------------- // Settings menu ----------------------------------
@ -288,13 +288,13 @@ Menu::Menu() {
hmd->toggleShouldShowTablet(); hmd->toggleShouldShowTablet();
} }
}); });
// Settings > Entity Script / QML Whitelist // Settings > Entity Script / QML Whitelist
action = addActionToQMenuAndActionHash(settingsMenu, "Entity Script / QML Whitelist"); action = addActionToQMenuAndActionHash(settingsMenu, "Entity Script / QML Whitelist");
connect(action, &QAction::triggered, [] { connect(action, &QAction::triggered, [] {
auto tablet = DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system"); auto tablet = DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system");
auto hmd = DependencyManager::get<HMDScriptingInterface>(); auto hmd = DependencyManager::get<HMDScriptingInterface>();
tablet->pushOntoStack("hifi/dialogs/security/EntityScriptQMLWhitelist.qml"); tablet->pushOntoStack("hifi/dialogs/security/EntityScriptQMLWhitelist.qml");
if (!hmd->getShouldShowTablet()) { if (!hmd->getShouldShowTablet()) {
@ -310,10 +310,10 @@ Menu::Menu() {
// Developer menu ---------------------------------- // Developer menu ----------------------------------
MenuWrapper* developerMenu = addMenu("Developer", "Developer"); MenuWrapper* developerMenu = addMenu("Developer", "Developer");
// Developer > Scripting >>> // Developer > Scripting >>>
MenuWrapper* scriptingOptionsMenu = developerMenu->addMenu("Scripting"); MenuWrapper* scriptingOptionsMenu = developerMenu->addMenu("Scripting");
// Developer > Scripting > Console... // Developer > Scripting > Console...
addActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::Console, Qt::CTRL | Qt::ALT | Qt::Key_J, addActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::Console, Qt::CTRL | Qt::ALT | Qt::Key_J,
DependencyManager::get<StandAloneJSConsole>().data(), DependencyManager::get<StandAloneJSConsole>().data(),
@ -328,7 +328,7 @@ Menu::Menu() {
defaultScriptsLoc.setPath(defaultScriptsLoc.path() + "developer/utilities/tools/currentAPI.js"); defaultScriptsLoc.setPath(defaultScriptsLoc.path() + "developer/utilities/tools/currentAPI.js");
DependencyManager::get<ScriptEngines>()->loadScript(defaultScriptsLoc.toString()); DependencyManager::get<ScriptEngines>()->loadScript(defaultScriptsLoc.toString());
}); });
// Developer > Scripting > Entity Script Server Log // Developer > Scripting > Entity Script Server Log
auto essLogAction = addActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::EntityScriptServerLog, 0, auto essLogAction = addActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::EntityScriptServerLog, 0,
qApp, SLOT(toggleEntityScriptServerLogDialog())); qApp, SLOT(toggleEntityScriptServerLogDialog()));
@ -348,7 +348,7 @@ Menu::Menu() {
// Developer > Scripting > Verbose Logging // Developer > Scripting > Verbose Logging
addCheckableActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::VerboseLogging, 0, false, addCheckableActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::VerboseLogging, 0, false,
qApp, SLOT(updateVerboseLogging())); qApp, SLOT(updateVerboseLogging()));
// Developer > Scripting > Enable Speech Control API // Developer > Scripting > Enable Speech Control API
#if defined(Q_OS_MAC) || defined(Q_OS_WIN) #if defined(Q_OS_MAC) || defined(Q_OS_WIN)
auto speechRecognizer = DependencyManager::get<SpeechRecognizer>(); auto speechRecognizer = DependencyManager::get<SpeechRecognizer>();
@ -360,20 +360,20 @@ Menu::Menu() {
UNSPECIFIED_POSITION); UNSPECIFIED_POSITION);
connect(speechRecognizer.data(), SIGNAL(enabledUpdated(bool)), speechRecognizerAction, SLOT(setChecked(bool))); connect(speechRecognizer.data(), SIGNAL(enabledUpdated(bool)), speechRecognizerAction, SLOT(setChecked(bool)));
#endif #endif
// Developer > UI >>> // Developer > UI >>>
MenuWrapper* uiOptionsMenu = developerMenu->addMenu("UI"); MenuWrapper* uiOptionsMenu = developerMenu->addMenu("UI");
action = addCheckableActionToQMenuAndActionHash(uiOptionsMenu, MenuOption::DesktopTabletToToolbar, 0, action = addCheckableActionToQMenuAndActionHash(uiOptionsMenu, MenuOption::DesktopTabletToToolbar, 0,
qApp->getDesktopTabletBecomesToolbarSetting()); qApp->getDesktopTabletBecomesToolbarSetting());
// Developer > UI > Show Overlays // Developer > UI > Show Overlays
addCheckableActionToQMenuAndActionHash(uiOptionsMenu, MenuOption::Overlays, 0, true); addCheckableActionToQMenuAndActionHash(uiOptionsMenu, MenuOption::Overlays, 0, true);
// Developer > UI > Desktop Tablet Becomes Toolbar // Developer > UI > Desktop Tablet Becomes Toolbar
connect(action, &QAction::triggered, [action] { connect(action, &QAction::triggered, [action] {
qApp->setDesktopTabletBecomesToolbarSetting(action->isChecked()); qApp->setDesktopTabletBecomesToolbarSetting(action->isChecked());
}); });
// Developer > UI > HMD Tablet Becomes Toolbar // Developer > UI > HMD Tablet Becomes Toolbar
action = addCheckableActionToQMenuAndActionHash(uiOptionsMenu, MenuOption::HMDTabletToToolbar, 0, action = addCheckableActionToQMenuAndActionHash(uiOptionsMenu, MenuOption::HMDTabletToToolbar, 0,
qApp->getHmdTabletBecomesToolbarSetting()); qApp->getHmdTabletBecomesToolbarSetting());
@ -614,13 +614,13 @@ Menu::Menu() {
addCheckableActionToQMenuAndActionHash(networkMenu, addCheckableActionToQMenuAndActionHash(networkMenu,
MenuOption::DisableActivityLogger, MenuOption::DisableActivityLogger,
0, 0,
false, true,
&UserActivityLogger::getInstance(), &UserActivityLogger::getInstance(),
SLOT(disable(bool))); SLOT(disable(bool)));
addCheckableActionToQMenuAndActionHash(networkMenu, addCheckableActionToQMenuAndActionHash(networkMenu,
MenuOption::DisableCrashLogger, MenuOption::DisableCrashLogger,
0, 0,
false, true,
&UserActivityLogger::getInstance(), &UserActivityLogger::getInstance(),
SLOT(crashMonitorDisable(bool))); SLOT(crashMonitorDisable(bool)));
addActionToQMenuAndActionHash(networkMenu, MenuOption::ShowDSConnectTable, 0, addActionToQMenuAndActionHash(networkMenu, MenuOption::ShowDSConnectTable, 0,
@ -708,7 +708,7 @@ Menu::Menu() {
result = QProcessEnvironment::systemEnvironment().contains(HIFI_SHOW_DEVELOPER_CRASH_MENU); result = QProcessEnvironment::systemEnvironment().contains(HIFI_SHOW_DEVELOPER_CRASH_MENU);
if (result) { if (result) {
MenuWrapper* crashMenu = developerMenu->addMenu("Crash"); MenuWrapper* crashMenu = developerMenu->addMenu("Crash");
// Developer > Crash > Display Crash Options // Developer > Crash > Display Crash Options
addCheckableActionToQMenuAndActionHash(crashMenu, MenuOption::DisplayCrashOptions, 0, true); addCheckableActionToQMenuAndActionHash(crashMenu, MenuOption::DisplayCrashOptions, 0, true);
@ -747,7 +747,7 @@ Menu::Menu() {
addActionToQMenuAndActionHash(crashMenu, MenuOption::CrashOnShutdown, 0, qApp, SLOT(crashOnShutdown())); addActionToQMenuAndActionHash(crashMenu, MenuOption::CrashOnShutdown, 0, qApp, SLOT(crashOnShutdown()));
} }
// Developer > Show Statistics // Developer > Show Statistics
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Stats, 0, true); addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Stats, 0, true);
@ -796,13 +796,13 @@ Menu::Menu() {
}); });
helpMenu->addSeparator(); helpMenu->addSeparator();
// Help > Athena Docs // Help > Vircadia Docs
action = addActionToQMenuAndActionHash(helpMenu, "Online Documentation"); action = addActionToQMenuAndActionHash(helpMenu, "Online Documentation");
connect(action, &QAction::triggered, qApp, [] { connect(action, &QAction::triggered, qApp, [] {
QDesktopServices::openUrl(QUrl("https://docs.vircadia.dev/")); QDesktopServices::openUrl(QUrl("https://docs.vircadia.dev/"));
}); });
// Help > Athena Forum // Help > Vircadia Forum
/* action = addActionToQMenuAndActionHash(helpMenu, "Online Forums"); /* action = addActionToQMenuAndActionHash(helpMenu, "Online Forums");
connect(action, &QAction::triggered, qApp, [] { connect(action, &QAction::triggered, qApp, [] {
QDesktopServices::openUrl(QUrl("https://forums.highfidelity.com/")); QDesktopServices::openUrl(QUrl("https://forums.highfidelity.com/"));

View file

@ -86,7 +86,7 @@ namespace MenuOption {
const QString DeleteAvatarEntitiesBookmark = "Delete Avatar Entities Bookmark"; const QString DeleteAvatarEntitiesBookmark = "Delete Avatar Entities Bookmark";
const QString DeleteBookmark = "Delete Bookmark..."; const QString DeleteBookmark = "Delete Bookmark...";
const QString DisableActivityLogger = "Disable Activity Logger"; const QString DisableActivityLogger = "Disable Activity Logger";
const QString DisableCrashLogger = "Disable Crash Logger"; const QString DisableCrashLogger = "Disable Crash Reporter";
const QString DisableEyelidAdjustment = "Disable Eyelid Adjustment"; const QString DisableEyelidAdjustment = "Disable Eyelid Adjustment";
const QString DisableLightEntities = "Disable Light Entities"; const QString DisableLightEntities = "Disable Light Entities";
const QString DisplayCrashOptions = "Display Crash Options"; const QString DisplayCrashOptions = "Display Crash Options";

View file

@ -644,33 +644,33 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
} }
/**jsdoc /**jsdoc
* Different entity types have different properties: some common to all entities (listed in the table) and some specific to * Different entity types have different properties: some common to all entities (listed in the table) and some specific to
* each {@link Entities.EntityType|EntityType} (linked to below). * each {@link Entities.EntityType|EntityType} (linked to below).
* *
* @typedef {object} Entities.EntityProperties * @typedef {object} Entities.EntityProperties
* @property {Uuid} id - The ID of the entity. <em>Read-only.</em> * @property {Uuid} id - The ID of the entity. <em>Read-only.</em>
* @property {string} name="" - A name for the entity. Need not be unique. * @property {string} name="" - A name for the entity. Need not be unique.
* @property {Entities.EntityType} type - The entity's type. You cannot change the type of an entity after it's created. * @property {Entities.EntityType} type - The entity's type. You cannot change the type of an entity after it's created.
* However, its value may switch among <code>"Box"</code>, <code>"Shape"</code>, and <code>"Sphere"</code> depending on * However, its value may switch among <code>"Box"</code>, <code>"Shape"</code>, and <code>"Sphere"</code> depending on
* changes to the <code>shape</code> property set for entities of these types. <em>Read-only.</em> * changes to the <code>shape</code> property set for entities of these types. <em>Read-only.</em>
* *
* @property {Entities.EntityHostType} entityHostType="domain" - How the entity is hosted and sent to others for display. * @property {Entities.EntityHostType} entityHostType="domain" - How the entity is hosted and sent to others for display.
* The value can only be set at entity creation by one of the {@link Entities.addEntity} methods. <em>Read-only.</em> * The value can only be set at entity creation by one of the {@link Entities.addEntity} methods. <em>Read-only.</em>
* @property {boolean} avatarEntity=false - <code>true</code> if the entity is an {@link Entities.EntityHostType|avatar entity}, * @property {boolean} avatarEntity=false - <code>true</code> if the entity is an {@link Entities.EntityHostType|avatar entity},
* <code>false</code> if it isn't. The value is per the <code>entityHostType</code> property value, set at entity creation * <code>false</code> if it isn't. The value is per the <code>entityHostType</code> property value, set at entity creation
* by one of the {@link Entities.addEntity} methods. <em>Read-only.</em> * by one of the {@link Entities.addEntity} methods. <em>Read-only.</em>
* @property {boolean} clientOnly=false - A synonym for <code>avatarEntity</code>. <em>Read-only.</em> * @property {boolean} clientOnly=false - A synonym for <code>avatarEntity</code>. <em>Read-only.</em>
* @property {boolean} localEntity=false - <code>true</code> if the entity is a {@link Entities.EntityHostType|local entity}, * @property {boolean} localEntity=false - <code>true</code> if the entity is a {@link Entities.EntityHostType|local entity},
* <code>false</code> if it isn't. The value is per the <code>entityHostType</code> property value, set at entity creation * <code>false</code> if it isn't. The value is per the <code>entityHostType</code> property value, set at entity creation
* by one of the {@link Entities.addEntity} methods. <em>Read-only.</em> * by one of the {@link Entities.addEntity} methods. <em>Read-only.</em>
* *
* @property {Uuid} owningAvatarID=Uuid.NULL - The session ID of the owning avatar if <code>avatarEntity</code> is * @property {Uuid} owningAvatarID=Uuid.NULL - The session ID of the owning avatar if <code>avatarEntity</code> is
* <code>true</code>, otherwise {@link Uuid(0)|Uuid.NULL}. <em>Read-only.</em> * <code>true</code>, otherwise {@link Uuid(0)|Uuid.NULL}. <em>Read-only.</em>
* *
* @property {string} created - The UTC date and time that the entity was created, in ISO 8601 format as * @property {string} created - The UTC date and time that the entity was created, in ISO 8601 format as
* <code>yyyy-MM-ddTHH:mm:ssZ</code>. <em>Read-only.</em> * <code>yyyy-MM-ddTHH:mm:ssZ</code>. <em>Read-only.</em>
* @property {number} age - The age of the entity in seconds since it was created. <em>Read-only.</em> * @property {number} age - The age of the entity in seconds since it was created. <em>Read-only.</em>
* @property {string} ageAsText - The age of the entity since it was created, formatted as <code>h hours m minutes s * @property {string} ageAsText - The age of the entity since it was created, formatted as <code>h hours m minutes s
* seconds</code>. * seconds</code>.
* @property {number} lifetime=-1 - How long an entity lives for, in seconds, before being automatically deleted. A value of * @property {number} lifetime=-1 - How long an entity lives for, in seconds, before being automatically deleted. A value of
* <code>-1</code> means that the entity lives for ever. * <code>-1</code> means that the entity lives for ever.
@ -679,113 +679,113 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* @property {Uuid} lastEditedBy - The session ID of the avatar or agent that most recently created or edited the entity. * @property {Uuid} lastEditedBy - The session ID of the avatar or agent that most recently created or edited the entity.
* <em>Read-only.</em> * <em>Read-only.</em>
* *
* @property {boolean} locked=false - <code>true</code> if properties other than <code>locked</code> cannot be changed and the * @property {boolean} locked=false - <code>true</code> if properties other than <code>locked</code> cannot be changed and the
* entity cannot be deleted, <code>false</code> if all properties can be changed and the entity can be deleted. * entity cannot be deleted, <code>false</code> if all properties can be changed and the entity can be deleted.
* @property {boolean} visible=true - <code>true</code> if the entity is rendered, <code>false</code> if it isn't. * @property {boolean} visible=true - <code>true</code> if the entity is rendered, <code>false</code> if it isn't.
* @property {boolean} canCastShadow=true - <code>true</code> if the entity can cast a shadow, <code>false</code> if it can't. * @property {boolean} canCastShadow=true - <code>true</code> if the entity can cast a shadow, <code>false</code> if it can't.
* Currently applicable only to {@link Entities.EntityProperties-Model|Model} and * Currently applicable only to {@link Entities.EntityProperties-Model|Model} and
* {@link Entities.EntityProperties-Shape|Shape} entities. Shadows are cast if inside a * {@link Entities.EntityProperties-Shape|Shape} entities. Shadows are cast if inside a
* {@link Entities.EntityProperties-Zone|Zone} entity with <code>castShadows</code> enabled in its <code>keyLight</code> * {@link Entities.EntityProperties-Zone|Zone} entity with <code>castShadows</code> enabled in its <code>keyLight</code>
* property. * property.
* @property {boolean} isVisibleInSecondaryCamera=true - <code>true</code> if the entity is rendered in the secondary camera, * @property {boolean} isVisibleInSecondaryCamera=true - <code>true</code> if the entity is rendered in the secondary camera,
* <code>false</code> if it isn't. * <code>false</code> if it isn't.
* @property {Entities.RenderLayer} renderLayer="world" - The layer that the entity renders in. * @property {Entities.RenderLayer} renderLayer="world" - The layer that the entity renders in.
* @property {Entities.PrimitiveMode} primitiveMode="solid" - How the entity's geometry is rendered. * @property {Entities.PrimitiveMode} primitiveMode="solid" - How the entity's geometry is rendered.
* @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} and {@link RayPick} ignore the entity, * @property {boolean} ignorePickIntersection=false - <code>true</code> if {@link Picks} and {@link RayPick} ignore the entity,
* <code>false</code> if they don't. * <code>false</code> if they don't.
* *
* @property {Vec3} position=0,0,0 - The position of the entity in world coordinates. * @property {Vec3} position=0,0,0 - The position of the entity in world coordinates.
* @property {Quat} rotation=0,0,0,1 - The orientation of the entity in world coordinates. * @property {Quat} rotation=0,0,0,1 - The orientation of the entity in world coordinates.
* @property {Vec3} registrationPoint=0.5,0.5,0.5 - The point in the entity that is set to the entity's position and is rotated * @property {Vec3} registrationPoint=0.5,0.5,0.5 - The point in the entity that is set to the entity's position and is rotated
* about, range {@link Vec3(0)|Vec3.ZERO} &ndash; {@link Vec3(0)|Vec3.ONE}. A value of {@link Vec3(0)|Vec3.ZERO} is the * about, range {@link Vec3(0)|Vec3.ZERO} &ndash; {@link Vec3(0)|Vec3.ONE}. A value of {@link Vec3(0)|Vec3.ZERO} is the
* entity's minimum x, y, z corner; a value of {@link Vec3(0)|Vec3.ONE} is the entity's maximum x, y, z corner. * entity's minimum x, y, z corner; a value of {@link Vec3(0)|Vec3.ONE} is the entity's maximum x, y, z corner.
* *
* @property {Vec3} naturalPosition=0,0,0 - The center of the entity's unscaled mesh model if it has one, otherwise * @property {Vec3} naturalPosition=0,0,0 - The center of the entity's unscaled mesh model if it has one, otherwise
* {@link Vec3(0)|Vec3.ZERO}. <em>Read-only.</em> * {@link Vec3(0)|Vec3.ZERO}. <em>Read-only.</em>
* @property {Vec3} naturalDimensions - The dimensions of the entity's unscaled mesh model if it has one, otherwise * @property {Vec3} naturalDimensions - The dimensions of the entity's unscaled mesh model if it has one, otherwise
* {@link Vec3(0)|Vec3.ONE}. <em>Read-only.</em> * {@link Vec3(0)|Vec3.ONE}. <em>Read-only.</em>
* *
* @property {Vec3} velocity=0,0,0 - The linear velocity of the entity in m/s with respect to world coordinates. * @property {Vec3} velocity=0,0,0 - The linear velocity of the entity in m/s with respect to world coordinates.
* @property {number} damping=0.39347 - How much the linear velocity of an entity slows down over time, range * @property {number} damping=0.39347 - How much the linear velocity of an entity slows down over time, range
* <code>0.0</code> &ndash; <code>1.0</code>. A higher damping value slows down the entity more quickly. The default value * <code>0.0</code> &ndash; <code>1.0</code>. 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 <code>1/e = 0.368</code> * is for an exponential decay timescale of 2.0s, where it takes 2.0s for the movement to slow to <code>1/e = 0.368</code>
* of its initial value. * of its initial value.
* @property {Vec3} angularVelocity=0,0,0 - The angular velocity of the entity in rad/s with respect to its axes, about its * @property {Vec3} angularVelocity=0,0,0 - The angular velocity of the entity in rad/s with respect to its axes, about its
* registration point. * registration point.
* @property {number} angularDamping=0.39347 - How much the angular velocity of an entity slows down over time, range * @property {number} angularDamping=0.39347 - How much the angular velocity of an entity slows down over time, range
* <code>0.0</code> &ndash; <code>1.0</code>. A higher damping value slows down the entity more quickly. The default value * <code>0.0</code> &ndash; <code>1.0</code>. 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 <code>1/e = 0.368</code> * is for an exponential decay timescale of 2.0s, where it takes 2.0s for the movement to slow to <code>1/e = 0.368</code>
* of its initial value. * of its initial value.
* *
* @property {Vec3} gravity=0,0,0 - The acceleration due to gravity in m/s<sup>2</sup> that the entity should move with, in * @property {Vec3} gravity=0,0,0 - The acceleration due to gravity in m/s<sup>2</sup> that the entity should move with, in
* world coordinates. Use a value of <code>{ x: 0, y: -9.8, z: 0 }</code> to simulate Earth's gravity. Gravity is applied * world coordinates. Use a value of <code>{ x: 0, y: -9.8, z: 0 }</code> to simulate Earth's gravity. Gravity is applied
* to an entity's motion only if its <code>dynamic</code> property is <code>true</code>. * to an entity's motion only if its <code>dynamic</code> property is <code>true</code>.
* <p>If changing an entity's <code>gravity</code> from {@link Vec3(0)|Vec3.ZERO}, you need to give it a small * <p>If changing an entity's <code>gravity</code> from {@link Vec3(0)|Vec3.ZERO}, you need to give it a small
* <code>velocity</code> in order to kick off physics simulation.</p> * <code>velocity</code> in order to kick off physics simulation.</p>
* @property {Vec3} acceleration - The current, measured acceleration of the entity, in m/s<sup>2</sup>. * @property {Vec3} acceleration - The current, measured acceleration of the entity, in m/s<sup>2</sup>.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
* @property {number} restitution=0.5 - The "bounciness" of an entity when it collides, range <code>0.0</code> &ndash; * @property {number} restitution=0.5 - The "bounciness" of an entity when it collides, range <code>0.0</code> &ndash;
* <code>0.99</code>. The higher the value, the more bouncy. * <code>0.99</code>. The higher the value, the more bouncy.
* @property {number} friction=0.5 - How much an entity slows down when it's moving against another, range <code>0.0</code> * @property {number} friction=0.5 - How much an entity slows down when it's moving against another, range <code>0.0</code>
* &ndash; <code>10.0</code>. The higher the value, the more quickly it slows down. Examples: <code>0.1</code> for ice, * &ndash; <code>10.0</code>. The higher the value, the more quickly it slows down. Examples: <code>0.1</code> for ice,
* <code>0.9</code> for sandpaper. * <code>0.9</code> for sandpaper.
* @property {number} density=1000 - The density of the entity in kg/m<sup>3</sup>, range <code>100</code> &ndash; * @property {number} density=1000 - The density of the entity in kg/m<sup>3</sup>, range <code>100</code> &ndash;
* <code>10000</code>. Examples: <code>100</code> for balsa wood, <code>10000</code> for silver. The density is used in * <code>10000</code>. Examples: <code>100</code> for balsa wood, <code>10000</code> 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. * conjunction with the entity's bounding box volume to work out its mass in the application of physics.
* *
* @property {boolean} collisionless=false - <code>true</code> if the entity shouldn't collide, <code>false</code> if it * @property {boolean} collisionless=false - <code>true</code> if the entity shouldn't collide, <code>false</code> if it
* collides with items per its <code>collisionMask</code> property. * collides with items per its <code>collisionMask</code> property.
* @property {boolean} ignoreForCollisions - Synonym for <code>collisionless</code>. * @property {boolean} ignoreForCollisions - Synonym for <code>collisionless</code>.
* @property {CollisionMask} collisionMask=31 - What types of items the entity should collide with. * @property {CollisionMask} collisionMask=31 - What types of items the entity should collide with.
* @property {string} collidesWith="static,dynamic,kinematic,myAvatar,otherAvatar," - Synonym for <code>collisionMask</code>, * @property {string} collidesWith="static,dynamic,kinematic,myAvatar,otherAvatar," - Synonym for <code>collisionMask</code>,
* in text format. * in text format.
* @property {string} collisionSoundURL="" - The sound that's played when the entity experiences a collision. Valid file * @property {string} collisionSoundURL="" - The sound that's played when the entity experiences a collision. Valid file
* formats are per {@link SoundObject}. * formats are per {@link SoundObject}.
* @property {boolean} dynamic=false - <code>true</code> if the entity's movement is affected by collisions, <code>false</code> * @property {boolean} dynamic=false - <code>true</code> if the entity's movement is affected by collisions, <code>false</code>
* if it isn't. * if it isn't.
* @property {boolean} collisionsWillMove - A synonym for <code>dynamic</code>. * @property {boolean} collisionsWillMove - A synonym for <code>dynamic</code>.
* *
* @property {string} href="" - A "hifi://" metaverse address that a user is teleported to when they click on the entity. * @property {string} href="" - A "hifi://" metaverse address that a user is teleported to when they click on the entity.
* @property {string} description="" - A description of the <code>href</code> property value. * @property {string} description="" - A description of the <code>href</code> property value.
* *
* @property {string} userData="" - Used to store extra data about the entity in JSON format. * @property {string} userData="" - Used to store extra data about the entity in JSON format.
* <p><strong>Warning:</strong> Other apps may also use this property, so make sure you handle data stored by other apps: * <p><strong>Warning:</strong> Other apps may 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 <code>JSON.parse()</code> to parse the string into * edit only your bit and leave the rest of the data intact. You can use <code>JSON.parse()</code> to parse the string into
* a JavaScript object which you can manipulate the properties of, and use <code>JSON.stringify()</code> to convert the * a JavaScript object which you can manipulate the properties of, and use <code>JSON.stringify()</code> to convert the
* object into a string to put back in the property.</p> * object into a string to put back in the property.</p>
* *
* @property {string} privateUserData="" - Like <code>userData</code>, but only accessible by server entity scripts, assignment * @property {string} privateUserData="" - Like <code>userData</code>, but only accessible by server entity scripts, assignment
* client scripts, and users who have "Can Get and Set Private User Data" permissions in the domain. * client scripts, and users who have "Can Get and Set Private User Data" permissions in the domain.
* *
* @property {string} script="" - The URL of the client entity script, if any, that is attached to the entity. * @property {string} script="" - The URL of the client entity script, if any, that is attached to the entity.
* @property {number} scriptTimestamp=0 - Used to indicate when the client entity script was loaded. Should be * @property {number} scriptTimestamp=0 - 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 <code>Date.now()</code>. * an integer number of milliseconds since midnight GMT on January 1, 1970 (e.g., as supplied by <code>Date.now()</code>.
* If you update the property's value, the <code>script</code> is re-downloaded and reloaded. This is how the "reload" * If you update the property's value, the <code>script</code> is re-downloaded and reloaded. This is how the "reload"
* button beside the "script URL" field in properties tab of the Create app works. * button beside the "script URL" field in properties tab of the Create app works.
* @property {string} serverScripts="" - The URL of the server entity script, if any, that is attached to the entity. * @property {string} serverScripts="" - The URL of the server entity script, if any, that is attached to the entity.
* *
* @property {Uuid} parentID=Uuid.NULL - The ID of the entity or avatar that the entity is parented to. A value of * @property {Uuid} parentID=Uuid.NULL - The ID of the entity or avatar that the entity is parented to. A value of
* {@link Uuid(0)|Uuid.NULL} is used if the entity is not parented. * {@link Uuid(0)|Uuid.NULL} is used if the entity is not parented.
* @property {number} parentJointIndex=65535 - The joint of the entity or avatar that the entity is parented to. Use * @property {number} parentJointIndex=65535 - The joint of the entity or avatar that the entity is parented to. Use
* <code>65535</code> or <code>-1</code> to parent to the entity or avatar's position and orientation rather than a joint. * <code>65535</code> or <code>-1</code> to parent to the entity or avatar's position and orientation rather than a joint.
* @property {Vec3} localPosition=0,0,0 - The position of the entity relative to its parent if the entity is parented, * @property {Vec3} localPosition=0,0,0 - The position of the entity relative to its parent if the entity is parented,
* otherwise the same value as <code>position</code>. If the entity is parented to an avatar and is an avatar entity * otherwise the same value as <code>position</code>. If the entity is parented to an avatar and is an avatar entity
* so that it scales with the avatar, this value remains the original local position value while the avatar scale changes. * so that it scales with the avatar, this value remains the original local position value while the avatar scale changes.
* @property {Quat} localRotation=0,0,0,1 - The rotation of the entity relative to its parent if the entity is parented, * @property {Quat} localRotation=0,0,0,1 - The rotation of the entity relative to its parent if the entity is parented,
* otherwise the same value as <code>rotation</code>. * otherwise the same value as <code>rotation</code>.
* @property {Vec3} localVelocity=0,0,0 - The velocity of the entity relative to its parent if the entity is parented, * @property {Vec3} localVelocity=0,0,0 - The velocity of the entity relative to its parent if the entity is parented,
* otherwise the same value as <code>velocity</code>. * otherwise the same value as <code>velocity</code>.
* @property {Vec3} localAngularVelocity=0,0,0 - The angular velocity of the entity relative to its parent if the entity is * @property {Vec3} localAngularVelocity=0,0,0 - The angular velocity of the entity relative to its parent if the entity is
* parented, otherwise the same value as <code>angularVelocity</code>. * parented, otherwise the same value as <code>angularVelocity</code>.
* @property {Vec3} localDimensions - The dimensions of the entity. If the entity is parented to an avatar and is an * @property {Vec3} localDimensions - The dimensions of the entity. If the entity is parented to an avatar and is an
* avatar entity so that it scales with the avatar, this value remains the original dimensions value while the * avatar entity so that it scales with the avatar, this value remains the original dimensions value while the
* avatar scale changes. * avatar scale changes.
* *
* @property {Entities.BoundingBox} boundingBox - The axis-aligned bounding box that tightly encloses the entity. * @property {Entities.BoundingBox} boundingBox - The axis-aligned bounding box that tightly encloses the entity.
* <em>Read-only.</em> * <em>Read-only.</em>
* @property {AACube} queryAACube - The axis-aligned cube that determines where the entity lives in the entity server's octree. * @property {AACube} queryAACube - 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 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 * 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. * unnecessary entity server updates. Scripts should not change this property's value.
* *
* @property {string} actionData="" - Base-64 encoded compressed dump of the actions associated with the entity. This property * @property {string} actionData="" - Base-64 encoded compressed dump of the actions associated with the entity. This property
@ -793,16 +793,16 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* {@link Entities.addAction}. The size of this property increases with the number of actions. Because this property value * {@link Entities.addAction}. The size of this property increases with the number of actions. Because this property value
* has to fit within a Vircadia datagram packet, there is a limit to the number of actions that an entity can have; * has to fit within a Vircadia datagram packet, there is a limit to the number of actions that an entity can have;
* edits which would result in overflow are rejected. <em>Read-only.</em> * edits which would result in overflow are rejected. <em>Read-only.</em>
* @property {Entities.RenderInfo} renderInfo - Information on the cost of rendering the entity. Currently information is only * @property {Entities.RenderInfo} renderInfo - Information on the cost of rendering the entity. Currently information is only
* provided for <code>Model</code> entities. <em>Read-only.</em> * provided for <code>Model</code> entities. <em>Read-only.</em>
* *
* @property {boolean} cloneable=false - <code>true</code> if the domain or avatar entity can be cloned via * @property {boolean} cloneable=false - <code>true</code> if the domain or avatar entity can be cloned via
* {@link Entities.cloneEntity}, <code>false</code> if it can't be. * {@link Entities.cloneEntity}, <code>false</code> if it can't be.
* @property {number} cloneLifetime=300 - The entity lifetime for clones created from this entity. * @property {number} cloneLifetime=300 - The entity lifetime for clones created from this entity.
* @property {number} cloneLimit=0 - The total number of clones of this entity that can exist in the domain at any given time. * @property {number} cloneLimit=0 - The total number of clones of this entity that can exist in the domain at any given time.
* @property {boolean} cloneDynamic=false - <code>true</code> if clones created from this entity will have their * @property {boolean} cloneDynamic=false - <code>true</code> if clones created from this entity will have their
* <code>dynamic</code> property set to <code>true</code>, <code>false</code> if they won't. * <code>dynamic</code> property set to <code>true</code>, <code>false</code> if they won't.
* @property {boolean} cloneAvatarEntity=false - <code>true</code> if clones created from this entity will be created as * @property {boolean} cloneAvatarEntity=false - <code>true</code> if clones created from this entity will be created as
* avatar entities, <code>false</code> if they won't be. * avatar entities, <code>false</code> if they won't be.
* @property {Uuid} cloneOriginID - The ID of the entity that this entity was cloned from. * @property {Uuid} cloneOriginID - The ID of the entity that this entity was cloned from.
* *
@ -817,12 +817,12 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* @property {string} itemCategories="" - Certifiable category of the Marketplace item. * @property {string} itemCategories="" - Certifiable category of the Marketplace item.
* @property {string} itemArtist="" - Certifiable artist that created the Marketplace item. * @property {string} itemArtist="" - Certifiable artist that created the Marketplace item.
* @property {string} itemLicense="" - Certifiable license URL for the Marketplace item. * @property {string} itemLicense="" - Certifiable license URL for the Marketplace item.
* @property {number} limitedRun=4294967295 - Certifiable maximum integer number of editions (copies) of the Marketplace item * @property {number} limitedRun=4294967295 - Certifiable maximum integer number of editions (copies) of the Marketplace item
* allowed to be sold. * allowed to be sold.
* @property {number} editionNumber=0 - Certifiable integer edition (copy) number or the Marketplace item. Each copy sold in * @property {number} editionNumber=0 - Certifiable integer edition (copy) number or the Marketplace item. Each copy sold in
* the Marketplace is numbered sequentially, starting at 1. * the Marketplace is numbered sequentially, starting at 1.
* @property {number} entityInstanceNumber=0 - Certifiable integer instance number for identical entities in a Marketplace * @property {number} entityInstanceNumber=0 - Certifiable integer instance number for identical entities in a Marketplace
* item. A Marketplace item may have multiple, identical parts. If so, then each is numbered sequentially with an instance * item. A Marketplace item may have multiple, identical parts. If so, then each is numbered sequentially with an instance
* number. * number.
* @property {string} marketplaceID="" - Certifiable UUID for the Marketplace item, as used in the URL of the item's download * @property {string} marketplaceID="" - Certifiable UUID for the Marketplace item, as used in the URL of the item's download
* and its Marketplace Web page. * and its Marketplace Web page.
@ -851,8 +851,8 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
/**jsdoc /**jsdoc
* The <code>"Box"</code> {@link Entities.EntityType|EntityType} is the same as the <code>"Shape"</code> * The <code>"Box"</code> {@link Entities.EntityType|EntityType} is the same as the <code>"Shape"</code>
* {@link Entities.EntityType|EntityType} except that its <code>shape</code> value is always set to <code>"Cube"</code> * {@link Entities.EntityType|EntityType} except that its <code>shape</code> value is always set to <code>"Cube"</code>
* when the entity is created. If its <code>shape</code> property value is subsequently changed then the entity's * when the entity is created. If its <code>shape</code> property value is subsequently changed then the entity's
* <code>type</code> will be reported as <code>"Sphere"</code> if the <code>shape</code> is set to <code>"Sphere"</code>, * <code>type</code> will be reported as <code>"Sphere"</code> if the <code>shape</code> is set to <code>"Sphere"</code>,
* otherwise it will be reported as <code>"Shape"</code>. * otherwise it will be reported as <code>"Shape"</code>.
* *
* @typedef {object} Entities.EntityProperties-Box * @typedef {object} Entities.EntityProperties-Box
@ -860,11 +860,11 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
*/ */
/**jsdoc /**jsdoc
* The <code>"Light"</code> {@link Entities.EntityType|EntityType} adds local lighting effects. It has properties in addition * The <code>"Light"</code> {@link Entities.EntityType|EntityType} adds local lighting effects. It has properties in addition
* to the common {@link Entities.EntityProperties|EntityProperties}. * to the common {@link Entities.EntityProperties|EntityProperties}.
* *
* @typedef {object} Entities.EntityProperties-Light * @typedef {object} Entities.EntityProperties-Light
* @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the entity. Surfaces outside these dimensions are not lit * @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the entity. Surfaces outside these dimensions are not lit
* by the light. * by the light.
* @property {Color} color=255,255,255 - The color of the light emitted. * @property {Color} color=255,255,255 - The color of the light emitted.
* @property {number} intensity=1 - The brightness of the light. * @property {number} intensity=1 - The brightness of the light.
@ -917,46 +917,46 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
*/ */
/**jsdoc /**jsdoc
* The <code>"Material"</code> {@link Entities.EntityType|EntityType} modifies existing materials on entities and avatars. It * The <code>"Material"</code> {@link Entities.EntityType|EntityType} modifies existing materials on entities and avatars. It
* has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}. * has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.
* <p>To apply a material to an entity, set the material entity's <code>parentID</code> property to the entity ID. * <p>To apply a material to an entity, set the material entity's <code>parentID</code> property to the entity ID.
* To apply a material to an avatar, set the material entity's <code>parentID</code> property to the avatar's session UUID. * To apply a material to an avatar, set the material entity's <code>parentID</code> property to the avatar's session UUID.
* To apply a material to your avatar such that it persists across domains and log-ins, create the material as an avatar entity * To apply a material to your avatar such that it persists across domains and log-ins, create the material as an avatar entity
* by setting the <code>entityHostType</code> parameter in {@link Entities.addEntity} to <code>"avatar"</code> and set the * by setting the <code>entityHostType</code> parameter in {@link Entities.addEntity} to <code>"avatar"</code> and set the
* entity's <code>parentID</code> property to <code>MyAvatar.SELF_ID</code>. * entity's <code>parentID</code> property to <code>MyAvatar.SELF_ID</code>.
* Material entities render as non-scalable spheres if they don't have their parent set.</p> * Material entities render as non-scalable spheres if they don't have their parent set.</p>
* *
* @typedef {object} Entities.EntityProperties-Material * @typedef {object} Entities.EntityProperties-Material
* @property {Vec3} dimensions=0.1,0.1,0.1 - Used when <code>materialMappingMode == "projected"</code>. * @property {Vec3} dimensions=0.1,0.1,0.1 - Used when <code>materialMappingMode == "projected"</code>.
* @property {string} materialURL="" - URL to a {@link Entities.MaterialResource|MaterialResource}. If you append * @property {string} materialURL="" - URL to a {@link Entities.MaterialResource|MaterialResource}. If you append
* <code>"#name"</code> to the URL, the material with that name in the {@link Entities.MaterialResource|MaterialResource} * <code>"#name"</code> to the URL, the material with that name in the {@link Entities.MaterialResource|MaterialResource}
* will be applied to the entity. Alternatively, set the property value to <code>"materialData"</code> to use the * will be applied to the entity. Alternatively, set the property value to <code>"materialData"</code> to use the
* <code>materialData</code> property for the {@link Entities.MaterialResource|MaterialResource} values. * <code>materialData</code> property for the {@link Entities.MaterialResource|MaterialResource} values.
* @property {string} materialData="" - Used to store {@link Entities.MaterialResource|MaterialResource} data as a JSON string. * @property {string} materialData="" - Used to store {@link Entities.MaterialResource|MaterialResource} data as a JSON string.
* You can use <code>JSON.parse()</code> to parse the string into a JavaScript object which you can manipulate the * You can use <code>JSON.parse()</code> to parse the string into a JavaScript object which you can manipulate the
* properties of, and use <code>JSON.stringify()</code> to convert the object into a string to put in the property. * properties of, and use <code>JSON.stringify()</code> to convert the object into a string to put in the property.
* @property {number} priority=0 - The priority for applying the material to its parent. Only the highest priority material is * @property {number} priority=0 - 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 * applied, with materials of the same priority randomly assigned. Materials that come with the model have a priority of
* <code>0</code>. * <code>0</code>.
* @property {string} parentMaterialName="0" - Selects the mesh part or parts within the parent to which to apply the material. * @property {string} parentMaterialName="0" - Selects the mesh part or parts within the parent to which to apply the material.
* If in the format <code>"mat::string"</code>, all mesh parts with material name <code>"string"</code> are replaced. * If in the format <code>"mat::string"</code>, all mesh parts with material name <code>"string"</code> are replaced.
* If <code>"all"</code>, then all mesh parts are replaced. * If <code>"all"</code>, then all mesh parts are replaced.
* Otherwise the property value is parsed as an unsigned integer, specifying the mesh part index to modify. * Otherwise the property value is parsed as an unsigned integer, specifying the mesh part index to modify.
* <p>If the string represents an array (starts with <code>"["</code> and ends with <code>"]"</code>), the string is split * <p>If the string represents an array (starts with <code>"["</code> and ends with <code>"]"</code>), the string is split
* at each <code>","</code> and each element parsed as either a number or a string if it starts with <code>"mat::"</code>. * at each <code>","</code> and each element parsed as either a number or a string if it starts with <code>"mat::"</code>.
* For example, <code>"[0,1,mat::string,mat::string2]"</code> will replace mesh parts 0 and 1, and any mesh parts with * For example, <code>"[0,1,mat::string,mat::string2]"</code> will replace mesh parts 0 and 1, and any mesh parts with
* material <code>"string"</code> or <code>"string2"</code>. Do not put spaces around the commas. Invalid values are parsed * material <code>"string"</code> or <code>"string2"</code>. Do not put spaces around the commas. Invalid values are parsed
* to <code>0</code>.</p> * to <code>0</code>.</p>
* @property {string} materialMappingMode="uv" - How the material is mapped to the entity. Either <code>"uv"</code> or * @property {string} materialMappingMode="uv" - How the material is mapped to the entity. Either <code>"uv"</code> or
* <code>"projected"</code>. In <code>"uv"</code> mode, the material is evaluated within the UV space of the mesh it is * <code>"projected"</code>. In <code>"uv"</code> mode, the material is evaluated within the UV space of the mesh it is
* applied to. In <code>"projected"</code> mode, the 3D transform (position, rotation, and dimensions) of the Material * applied to. In <code>"projected"</code> mode, the 3D transform (position, rotation, and dimensions) of the Material
* entity is used to evaluate the texture coordinates for the material. * entity is used to evaluate the texture coordinates for the material.
* @property {Vec2} materialMappingPos=0,0 - Offset position in UV-space of the top left of the material, range * @property {Vec2} materialMappingPos=0,0 - Offset position in UV-space of the top left of the material, range
* <code>{ x: 0, y: 0 }</code> &ndash; <code>{ x: 1, y: 1 }</code>. * <code>{ x: 0, y: 0 }</code> &ndash; <code>{ x: 1, y: 1 }</code>.
* @property {Vec2} materialMappingScale=1,1 - How much to scale the material within the parent's UV-space. * @property {Vec2} materialMappingScale=1,1 - How much to scale the material within the parent's UV-space.
* @property {number} materialMappingRot=0 - How much to rotate the material within the parent's UV-space, in degrees. * @property {number} materialMappingRot=0 - How much to rotate the material within the parent's UV-space, in degrees.
* @property {boolean} materialRepeat=true - <code>true</code> if the material repeats, <code>false</code> if it doesn't. If * @property {boolean} materialRepeat=true - <code>true</code> if the material repeats, <code>false</code> if it doesn't. If
* <code>false</code>, fragments outside of texCoord 0 &ndash; 1 will be discarded. Works in both <code>"uv"</code> and * <code>false</code>, fragments outside of texCoord 0 &ndash; 1 will be discarded. Works in both <code>"uv"</code> and
* <code>"projected"</code> modes. * <code>"projected"</code> modes.
* @example <caption>Color a sphere using a Material entity.</caption> * @example <caption>Color a sphere using a Material entity.</caption>
* var entityID = Entities.addEntity({ * var entityID = Entities.addEntity({
@ -983,17 +983,17 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
*/ */
/**jsdoc /**jsdoc
* The <code>"Model"</code> {@link Entities.EntityType|EntityType} displays a glTF, FBX, or OBJ model. When adding an entity, * The <code>"Model"</code> {@link Entities.EntityType|EntityType} displays a glTF, FBX, or OBJ model. When adding an entity,
* if no <code>dimensions</code> value is specified then the model is automatically sized to its * if no <code>dimensions</code> value is specified then the model is automatically sized to its
* <code>{@link Entities.EntityProperties|naturalDimensions}</code>. It has properties in addition to the common * <code>{@link Entities.EntityProperties|naturalDimensions}</code>. It has properties in addition to the common
* {@link Entities.EntityProperties|EntityProperties}. * {@link Entities.EntityProperties|EntityProperties}.
* *
* @typedef {object} Entities.EntityProperties-Model * @typedef {object} Entities.EntityProperties-Model
* @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the entity. When adding an entity, if no <code>dimensions</code> * @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the entity. When adding an entity, if no <code>dimensions</code>
* value is specified then the model is automatically sized to its * value is specified then the model is automatically sized to its
* <code>{@link Entities.EntityProperties|naturalDimensions}</code>. * <code>{@link Entities.EntityProperties|naturalDimensions}</code>.
* @property {string} modelURL="" - The URL of the glTF, FBX, or OBJ model. glTF models may be in JSON or binary format * @property {string} modelURL="" - The URL of the glTF, FBX, or OBJ model. glTF models may be in JSON or binary format
* (".gltf" or ".glb" URLs respectively). Baked models' URLs have ".baked" before the file type. Model files may also be * (".gltf" or ".glb" URLs respectively). Baked models' URLs have ".baked" before the file type. Model files may also be
* compressed in GZ format, in which case the URL ends in ".gz". * compressed in GZ format, in which case the URL ends in ".gz".
* @property {Vec3} modelScale - The scale factor applied to the model's dimensions. * @property {Vec3} modelScale - The scale factor applied to the model's dimensions.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
@ -1001,12 +1001,12 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* When editing this property, only coefficients that you are editing will change; it will not explicitly reset other * When editing this property, only coefficients that you are editing will change; it will not explicitly reset other
* coefficients. * coefficients.
* @property {string} textures="" - A JSON string of texture name, URL pairs used when rendering the model in place of the * @property {string} textures="" - 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 <code>originalTextures</code> property to override that texture. * model's original textures. Use a texture name from the <code>originalTextures</code> 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 * Only the texture names and URLs to be overridden need be specified; original textures are used where there are no
* overrides. You can use <code>JSON.stringify()</code> to convert a JavaScript object of name, URL pairs into a JSON * overrides. You can use <code>JSON.stringify()</code> to convert a JavaScript object of name, URL pairs into a JSON
* string. * string.
* @property {string} originalTextures="{}" - A JSON string of texture name, URL pairs used in the model. The property value is * @property {string} originalTextures="{}" - 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 <code>JSON.parse()</code> to * filled in after the entity has finished rezzing (i.e., textures have loaded). You can use <code>JSON.parse()</code> to
* parse the JSON string into a JavaScript object of name, URL pairs. <em>Read-only.</em> * parse the JSON string into a JavaScript object of name, URL pairs. <em>Read-only.</em>
* @property {Color} color=255,255,255 - <em>Currently not used.</em> * @property {Color} color=255,255,255 - <em>Currently not used.</em>
* *
@ -1016,28 +1016,28 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* *
* @property {Entities.AnimationProperties} animation - An animation to play on the model. * @property {Entities.AnimationProperties} animation - An animation to play on the model.
* *
* @property {Quat[]} jointRotations=[]] - Joint rotations applied to the model; <code>[]</code> if none are applied or the * @property {Quat[]} jointRotations=[]] - Joint rotations applied to the model; <code>[]</code> if none are applied or the
* model hasn't loaded. The array indexes are per {@link Entities.getJointIndex|getJointIndex}. Rotations are relative to * model hasn't loaded. The array indexes are per {@link Entities.getJointIndex|getJointIndex}. Rotations are relative to
* each joint's parent. * each joint's parent.
* <p>Joint rotations can be set by {@link Entities.setLocalJointRotation|setLocalJointRotation} and similar functions, or * <p>Joint rotations can be set by {@link Entities.setLocalJointRotation|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 * by setting the value of this property. If you set a joint rotation using this property, you also need to set the
* corresponding <code>jointRotationsSet</code> value to <code>true</code>.</p> * corresponding <code>jointRotationsSet</code> value to <code>true</code>.</p>
* @property {boolean[]} jointRotationsSet=[]] - <code>true</code> values for joints that have had rotations applied, * @property {boolean[]} jointRotationsSet=[]] - <code>true</code> values for joints that have had rotations applied,
* <code>false</code> otherwise; <code>[]</code> if none are applied or the model hasn't loaded. The array indexes are per * <code>false</code> otherwise; <code>[]</code> if none are applied or the model hasn't loaded. The array indexes are per
* {@link Entities.getJointIndex|getJointIndex}. * {@link Entities.getJointIndex|getJointIndex}.
* @property {Vec3[]} jointTranslations=[]] - Joint translations applied to the model; <code>[]</code> if none are applied or * @property {Vec3[]} jointTranslations=[]] - Joint translations applied to the model; <code>[]</code> if none are applied or
* the model hasn't loaded. The array indexes are per {@link Entities.getJointIndex|getJointIndex}. Translations are * the model hasn't loaded. The array indexes are per {@link Entities.getJointIndex|getJointIndex}. Translations are
* relative to each joint's parent. * relative to each joint's parent.
* <p>Joint translations can be set by {@link Entities.setLocalJointTranslation|setLocalJointTranslation} and similar * <p>Joint translations can be set by {@link Entities.setLocalJointTranslation|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 * 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 <code>jointTranslationsSet</code> value to <code>true</code>.</p> * set the corresponding <code>jointTranslationsSet</code> value to <code>true</code>.</p>
* @property {boolean[]} jointTranslationsSet=[]] - <code>true</code> values for joints that have had translations applied, * @property {boolean[]} jointTranslationsSet=[]] - <code>true</code> values for joints that have had translations applied,
* <code>false</code> otherwise; <code>[]</code> if none are applied or the model hasn't loaded. The array indexes are per * <code>false</code> otherwise; <code>[]</code> if none are applied or the model hasn't loaded. The array indexes are per
* {@link Entities.getJointIndex|getJointIndex}. * {@link Entities.getJointIndex|getJointIndex}.
* @property {boolean} relayParentJoints=false - <code>true</code> if when the entity is parented to an avatar, the avatar's * @property {boolean} relayParentJoints=false - <code>true</code> if when the entity is parented to an avatar, the avatar's
* joint rotations are applied to the entity's joints; <code>false</code> if a parent avatar's joint rotations are not * joint rotations are applied to the entity's joints; <code>false</code> if a parent avatar's joint rotations are not
* applied to the entity's joints. * applied to the entity's joints.
* @property {boolean} groupCulled=false - <code>true</code> if the mesh parts of the model are LOD culled as a group, * @property {boolean} groupCulled=false - <code>true</code> if the mesh parts of the model are LOD culled as a group,
* <code>false</code> if separate mesh parts are LOD culled individually. * <code>false</code> if separate mesh parts are LOD culled individually.
* *
* @example <caption>Rez a Vive tracker puck.</caption> * @example <caption>Rez a Vive tracker puck.</caption>
@ -1058,15 +1058,15 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* *
* @typedef {object} Entities.EntityProperties-ParticleEffect * @typedef {object} Entities.EntityProperties-ParticleEffect
* @property {boolean} isEmitting=true - <code>true</code> if particles are being emitted, <code>false</code> if they aren't. * @property {boolean} isEmitting=true - <code>true</code> if particles are being emitted, <code>false</code> if they aren't.
* @property {number} maxParticles=1000 - The maximum number of particles to render at one time. Older particles are deleted if * @property {number} maxParticles=1000 - The maximum number of particles to render at one time. Older particles are deleted if
* necessary when new ones are created. * necessary when new ones are created.
* @property {number} lifespan=3s - How long, in seconds, each particle lives. * @property {number} lifespan=3s - How long, in seconds, each particle lives.
* @property {number} emitRate=15 - The number of particles per second to emit. * @property {number} emitRate=15 - The number of particles per second to emit.
* @property {number} emitSpeed=5 - The speed, in m/s, that each particle is emitted at. * @property {number} emitSpeed=5 - The speed, in m/s, that each particle is emitted at.
* @property {number} speedSpread=1 - The spread in speeds at which particles are emitted at. For example, if * @property {number} speedSpread=1 - The spread in speeds at which particles are emitted at. For example, if
* <code>emitSpeed == 5</code> and <code>speedSpread == 1</code>, particles will be emitted with speeds in the range * <code>emitSpeed == 5</code> and <code>speedSpread == 1</code>, particles will be emitted with speeds in the range
* <code>4</code> &ndash; <code>6</code>m/s. * <code>4</code> &ndash; <code>6</code>m/s.
* @property {Vec3} emitAcceleration=0,-9.8,0 - The acceleration that is applied to each particle during its lifetime. The * @property {Vec3} emitAcceleration=0,-9.8,0 - The acceleration that is applied to each particle during its lifetime. The
* default is Earth's gravity value. * default is Earth's gravity value.
* @property {Vec3} accelerationSpread=0,0,0 - The spread in accelerations that each particle is given. For example, if * @property {Vec3} accelerationSpread=0,0,0 - The spread in accelerations that each particle is given. For example, if
* <code>emitAccelerations == {x: 0, y: -9.8, z: 0}</code> and <code>accelerationSpread == * <code>emitAccelerations == {x: 0, y: -9.8, z: 0}</code> and <code>accelerationSpread ==
@ -1078,33 +1078,33 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* <code>false</code> if they stay within the entity's dimensions. * <code>false</code> if they stay within the entity's dimensions.
* *
* @property {Quat} emitOrientation=-0.707,0,0,0.707 - The orientation of particle emission relative to the entity's axes. By * @property {Quat} emitOrientation=-0.707,0,0,0.707 - The orientation of particle emission relative to the entity's axes. By
* default, particles emit along the entity's local z-axis, and <code>azimuthStart</code> and <code>azimuthFinish</code> * default, particles emit along the entity's local z-axis, and <code>azimuthStart</code> and <code>azimuthFinish</code>
* 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., * 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. * the particles emit vertically.
* *
* @property {ShapeType} shapeType="ellipsoid" - The shape from which particles are emitted. * @property {ShapeType} shapeType="ellipsoid" - The shape from which particles are emitted.
* @property {string} compoundShapeURL="" - The model file to use for the compound shape if <code>shapeType == * @property {string} compoundShapeURL="" - The model file to use for the compound shape if <code>shapeType ==
* "compound"</code>. * "compound"</code>.
* @property {Vec3} emitDimensions=0,0,0 - The dimensions of the shape from which particles are emitted. * @property {Vec3} emitDimensions=0,0,0 - The dimensions of the shape from which particles are emitted.
* @property {number} emitRadiusStart=1 - The starting radius within the shape at which particles start being emitted; * @property {number} emitRadiusStart=1 - The starting radius within the shape at which particles start being emitted;
* range <code>0.0</code> &ndash; <code>1.0</code> for the center to the surface, respectively. * range <code>0.0</code> &ndash; <code>1.0</code> for the center to the surface, respectively.
* Particles are emitted from the portion of the shape that lies between <code>emitRadiusStart</code> and the * Particles are emitted from the portion of the shape that lies between <code>emitRadiusStart</code> and the
* shape's surface. * shape's surface.
* @property {number} polarStart=0 - The angle in radians from the entity's local z-axis at which particles start being emitted * @property {number} polarStart=0 - The angle in radians from the entity's local z-axis at which particles start being emitted
* within the shape; range <code>0</code> &ndash; <code>Math.PI</code>. Particles are emitted from the portion of the * within the shape; range <code>0</code> &ndash; <code>Math.PI</code>. Particles are emitted from the portion of the
* shape that lies between <code>polarStart</code> and <code>polarFinish</code>. Only used if <code>shapeType</code> is * shape that lies between <code>polarStart</code> and <code>polarFinish</code>. Only used if <code>shapeType</code> is
* <code>"ellipsoid"</code> or <code>"sphere"</code>. * <code>"ellipsoid"</code> or <code>"sphere"</code>.
* @property {number} polarFinish=0 - The angle in radians from the entity's local z-axis at which particles stop being emitted * @property {number} polarFinish=0 - The angle in radians from the entity's local z-axis at which particles stop being emitted
* within the shape; range <code>0</code> &ndash; <code>Math.PI</code>. Particles are emitted from the portion of the * within the shape; range <code>0</code> &ndash; <code>Math.PI</code>. Particles are emitted from the portion of the
* shape that lies between <code>polarStart</code> and <code>polarFinish</code>. Only used if <code>shapeType</code> is * shape that lies between <code>polarStart</code> and <code>polarFinish</code>. Only used if <code>shapeType</code> is
* <code>"ellipsoid"</code> or <code>"sphere"</code>. * <code>"ellipsoid"</code> or <code>"sphere"</code>.
* @property {number} azimuthStart=-Math.PI - The angle in radians from the entity's local x-axis about the entity's local * @property {number} azimuthStart=-Math.PI - 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 <code>-Math.PI</code> &ndash; <code>Math.PI</code>. Particles are * z-axis at which particles start being emitted; range <code>-Math.PI</code> &ndash; <code>Math.PI</code>. Particles are
* emitted from the portion of the shape that lies between <code>azimuthStart</code> and <code>azimuthFinish</code>. * emitted from the portion of the shape that lies between <code>azimuthStart</code> and <code>azimuthFinish</code>.
* Only used if <code>shapeType</code> is <code>"ellipsoid"</code>, <code>"sphere"</code>, or <code>"circle"</code>. * Only used if <code>shapeType</code> is <code>"ellipsoid"</code>, <code>"sphere"</code>, or <code>"circle"</code>.
* @property {number} azimuthFinish=Math.PI - The angle in radians from the entity's local x-axis about the entity's local * @property {number} azimuthFinish=Math.PI - 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 <code>-Math.PI</code> &ndash; <code>Math.PI</code>. Particles are * z-axis at which particles stop being emitted; range <code>-Math.PI</code> &ndash; <code>Math.PI</code>. Particles are
* emitted from the portion of the shape that lies between <code>azimuthStart</code> and <code>azimuthFinish</code>. * emitted from the portion of the shape that lies between <code>azimuthStart</code> and <code>azimuthFinish</code>.
* Only used if <code>shapeType</code> is <code>"ellipsoid"</code>, <code>"sphere"</code>, or <code>"circle"</code>. * Only used if <code>shapeType</code> is <code>"ellipsoid"</code>, <code>"sphere"</code>, or <code>"circle"</code>.
* *
* @property {string} textures="" - The URL of a JPG or PNG image file to display for each particle. If you want transparency, * @property {string} textures="" - The URL of a JPG or PNG image file to display for each particle. If you want transparency,
@ -1114,40 +1114,40 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* <code>particleRadius</code> value is used. * <code>particleRadius</code> value is used.
* @property {number} radiusFinish=null - The radius of each particle at the end of its life. If <code>null</code>, the * @property {number} radiusFinish=null - The radius of each particle at the end of its life. If <code>null</code>, the
* <code>particleRadius</code> value is used. * <code>particleRadius</code> value is used.
* @property {number} radiusSpread=0 - The spread in radius that each particle is given. For example, if * @property {number} radiusSpread=0 - The spread in radius that each particle is given. For example, if
* <code>particleRadius == 0.5</code> and <code>radiusSpread == 0.25</code>, each particle will have a radius in the range * <code>particleRadius == 0.5</code> and <code>radiusSpread == 0.25</code>, each particle will have a radius in the range
* <code>0.25</code> &ndash; <code>0.75</code>. * <code>0.25</code> &ndash; <code>0.75</code>.
* @property {Color} color=255,255,255 - The color of each particle at the middle of its life. * @property {Color} color=255,255,255 - The color of each particle at the middle of its life.
* @property {ColorFloat} colorStart=null,null,null - The color of each particle at the start of its life. If any of the * @property {ColorFloat} colorStart=null,null,null - The color of each particle at the start of its life. If any of the
* component values are undefined, the <code>color</code> value is used. * component values are undefined, the <code>color</code> value is used.
* @property {ColorFloat} colorFinish=null,null,null - The color of each particle at the end of its life. If any of the * @property {ColorFloat} colorFinish=null,null,null - The color of each particle at the end of its life. If any of the
* component values are undefined, the <code>color</code> value is used. * component values are undefined, the <code>color</code> value is used.
* @property {Color} colorSpread=0,0,0 - The spread in color that each particle is given. For example, if * @property {Color} colorSpread=0,0,0 - The spread in color that each particle is given. For example, if
* <code>color == {red: 100, green: 100, blue: 100}</code> and <code>colorSpread == * <code>color == {red: 100, green: 100, blue: 100}</code> and <code>colorSpread ==
* {red: 10, green: 25, blue: 50}</code>, each particle will have a color in the range * {red: 10, green: 25, blue: 50}</code>, each particle will have a color in the range
* <code>{red: 90, green: 75, blue: 50}</code> &ndash; <code>{red: 110, green: 125, blue: 150}</code>. * <code>{red: 90, green: 75, blue: 50}</code> &ndash; <code>{red: 110, green: 125, blue: 150}</code>.
* @property {number} alpha=1 - The opacity of each particle at the middle of its life. * @property {number} alpha=1 - The opacity of each particle at the middle of its life.
* @property {number} alphaStart=null - The opacity of each particle at the start of its life. If <code>null</code>, the * @property {number} alphaStart=null - The opacity of each particle at the start of its life. If <code>null</code>, the
* <code>alpha</code> value is used. * <code>alpha</code> value is used.
* @property {number} alphaFinish=null - The opacity of each particle at the end of its life. If <code>null</code>, the * @property {number} alphaFinish=null - The opacity of each particle at the end of its life. If <code>null</code>, the
* <code>alpha</code> value is used. * <code>alpha</code> value is used.
* @property {number} alphaSpread=0 - The spread in alpha that each particle is given. For example, if * @property {number} alphaSpread=0 - The spread in alpha that each particle is given. For example, if
* <code>alpha == 0.5</code> and <code>alphaSpread == 0.25</code>, each particle will have an alpha in the range * <code>alpha == 0.5</code> and <code>alphaSpread == 0.25</code>, each particle will have an alpha in the range
* <code>0.25</code> &ndash; <code>0.75</code>. * <code>0.25</code> &ndash; <code>0.75</code>.
* @property {Entities.Pulse} pulse - Color and alpha pulse. * @property {Entities.Pulse} pulse - Color and alpha pulse.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
* @property {number} particleSpin=0 - The rotation of each particle at the middle of its life, range <code>-2 * Math.PI</code> * @property {number} particleSpin=0 - The rotation of each particle at the middle of its life, range <code>-2 * Math.PI</code>
* &ndash; <code>2 * Math.PI</code> radians. * &ndash; <code>2 * Math.PI</code> radians.
* @property {number} spinStart=null - The rotation of each particle at the start of its life, range <code>-2 * Math.PI</code> * @property {number} spinStart=null - The rotation of each particle at the start of its life, range <code>-2 * Math.PI</code>
* &ndash; <code>2 * Math.PI</code> radians. If <code>null</code>, the <code>particleSpin</code> value is used. * &ndash; <code>2 * Math.PI</code> radians. If <code>null</code>, the <code>particleSpin</code> value is used.
* @property {number} spinFinish=null - The rotation of each particle at the end of its life, range <code>-2 * Math.PI</code> * @property {number} spinFinish=null - The rotation of each particle at the end of its life, range <code>-2 * Math.PI</code>
* &ndash; <code>2 * Math.PI</code> radians. If <code>null</code>, the <code>particleSpin</code> value is used. * &ndash; <code>2 * Math.PI</code> radians. If <code>null</code>, the <code>particleSpin</code> value is used.
* @property {number} spinSpread=0 - The spread in spin that each particle is given, range <code>0</code> &ndash; * @property {number} spinSpread=0 - The spread in spin that each particle is given, range <code>0</code> &ndash;
* <code>2 * Math.PI</code> radians. For example, if <code>particleSpin == Math.PI</code> and * <code>2 * Math.PI</code> radians. For example, if <code>particleSpin == Math.PI</code> and
* <code>spinSpread == Math.PI / 2</code>, each particle will have a rotation in the range <code>Math.PI / 2</code> &ndash; * <code>spinSpread == Math.PI / 2</code>, each particle will have a rotation in the range <code>Math.PI / 2</code> &ndash;
* <code>3 * Math.PI / 2</code>. * <code>3 * Math.PI / 2</code>.
* @property {boolean} rotateWithEntity=false - <code>true</code> if the particles' rotations are relative to the entity's * @property {boolean} rotateWithEntity=false - <code>true</code> if the particles' rotations are relative to the entity's
* instantaneous rotation, <code>false</code> if they're relative to world coordinates. If <code>true</code> with * instantaneous rotation, <code>false</code> if they're relative to world coordinates. If <code>true</code> with
* <code>particleSpin == 0</code>, the particles keep oriented per the entity's orientation. * <code>particleSpin == 0</code>, the particles keep oriented per the entity's orientation.
* *
* @example <caption>Create a ball of green smoke.</caption> * @example <caption>Create a ball of green smoke.</caption>
@ -1173,27 +1173,27 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* points. It has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}. * points. It has properties in addition to the common {@link Entities.EntityProperties|EntityProperties}.
* *
* @typedef {object} Entities.EntityProperties-PolyLine * @typedef {object} Entities.EntityProperties-PolyLine
* @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the entity, i.e., the size of the bounding box that contains the * @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the entity, i.e., the size of the bounding box that contains the
* lines drawn. <em>Read-only.</em> * lines drawn. <em>Read-only.</em>
* @property {Vec3[]} linePoints=[]] - The sequence of points to draw lines between. The values are relative to the entity's * @property {Vec3[]} linePoints=[]] - 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. * position. A maximum of 70 points can be specified.
* @property {Vec3[]} normals=[]] - The normal vectors for the line's surface at the <code>linePoints</code>. The values are * @property {Vec3[]} normals=[]] - The normal vectors for the line's surface at the <code>linePoints</code>. The values are
* relative to the entity's orientation. Must be specified in order for the entity to render. * relative to the entity's orientation. Must be specified in order for the entity to render.
* @property {number[]} strokeWidths=[]] - The widths, in m, of the line at the <code>linePoints</code>. Must be specified in * @property {number[]} strokeWidths=[]] - The widths, in m, of the line at the <code>linePoints</code>. Must be specified in
* order for the entity to render. * order for the entity to render.
* @property {Vec3[]} strokeColors=[]] - The base colors of each point, with values in the range <code>0.0,0.0,0.0</code> * @property {Vec3[]} strokeColors=[]] - The base colors of each point, with values in the range <code>0.0,0.0,0.0</code>
* &ndash; <code>1.0,1.0,1.0</code>. These colors are multiplied with the color of the texture. If there are more line * &ndash; <code>1.0,1.0,1.0</code>. These colors are multiplied with the color of the texture. If there are more line
* points than stroke colors, the <code>color</code> property value is used for the remaining points. * points than stroke colors, the <code>color</code> property value is used for the remaining points.
* <p><strong>Warning:</strong> The ordinate values are in the range <code>0.0</code> &ndash; <code>1.0</code>.</p> * <p><strong>Warning:</strong> The ordinate values are in the range <code>0.0</code> &ndash; <code>1.0</code>.</p>
* @property {Color} color=255,255,255 - Used as the color for each point if <code>strokeColors</code> doesn't have a value for * @property {Color} color=255,255,255 - Used as the color for each point if <code>strokeColors</code> doesn't have a value for
* the point. * the point.
* @property {string} textures="" - The URL of a JPG or PNG texture to use for the lines. If you want transparency, use PNG * @property {string} textures="" - The URL of a JPG or PNG texture to use for the lines. If you want transparency, use PNG
* format. * format.
* @property {boolean} isUVModeStretch=true - <code>true</code> if the texture is stretched to fill the whole line, * @property {boolean} isUVModeStretch=true - <code>true</code> if the texture is stretched to fill the whole line,
* <code>false</code> if the texture repeats along the line. * <code>false</code> if the texture repeats along the line.
* @property {boolean} glow=false - <code>true</code> if the opacity of the strokes drops off away from the line center, * @property {boolean} glow=false - <code>true</code> if the opacity of the strokes drops off away from the line center,
* <code>false</code> if it doesn't. * <code>false</code> if it doesn't.
* @property {boolean} faceCamera=false - <code>true</code> if each line segment rotates to face the camera, <code>false</code> * @property {boolean} faceCamera=false - <code>true</code> if each line segment rotates to face the camera, <code>false</code>
* if they don't. * if they don't.
* @example <caption>Draw a textured "V".</caption> * @example <caption>Draw a textured "V".</caption>
* var entity = Entities.addEntity({ * var entity = Entities.addEntity({
@ -1228,34 +1228,34 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* *
* @typedef {object} Entities.EntityProperties-PolyVox * @typedef {object} Entities.EntityProperties-PolyVox
* @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the entity. * @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the entity.
* @property {Vec3} voxelVolumeSize=32,32,32 - Integer number of voxels along each axis of the entity, in the range * @property {Vec3} voxelVolumeSize=32,32,32 - Integer number of voxels along each axis of the entity, in the range
* <code>1,1,1</code> to <code>128,128,128</code>. The dimensions of each voxel is * <code>1,1,1</code> to <code>128,128,128</code>. The dimensions of each voxel is
* <code>dimensions / voxelVolumesize</code>. * <code>dimensions / voxelVolumesize</code>.
* @property {string} voxelData="ABAAEAAQAAAAHgAAEAB42u3BAQ0AAADCoPdPbQ8HFAAAAPBuEAAAAQ==" - Base-64 encoded compressed dump of * @property {string} voxelData="ABAAEAAQAAAAHgAAEAB42u3BAQ0AAADCoPdPbQ8HFAAAAPBuEAAAAQ==" - Base-64 encoded compressed dump of
* the PolyVox data. This property is typically not used in scripts directly; rather, functions that manipulate a PolyVox * the PolyVox data. This property is typically not used in scripts directly; rather, functions that manipulate a PolyVox
* entity update it. * entity update it.
* <p>The size of this property increases with the size and complexity of the PolyVox entity, with the size depending on how * <p>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 Vircadia datagram packet, * the particular entity's voxels compress. Because this property value has to fit within a Vircadia datagram packet,
* there is a limit to the size and complexity of a PolyVox entity; edits which would result in an overflow are rejected.</p> * there is a limit to the size and complexity of a PolyVox entity; edits which would result in an overflow are rejected.</p>
* @property {Entities.PolyVoxSurfaceStyle} voxelSurfaceStyle=2 - The style of rendering the voxels' surface and how * @property {Entities.PolyVoxSurfaceStyle} voxelSurfaceStyle=2 - The style of rendering the voxels' surface and how
* neighboring PolyVox entities are joined. * neighboring PolyVox entities are joined.
* @property {string} xTextureURL="" - The URL of the texture to map to surfaces perpendicular to the entity's local x-axis. * @property {string} xTextureURL="" - The 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. * JPG or PNG format. If no texture is specified the surfaces display white.
* @property {string} yTextureURL="" - The URL of the texture to map to surfaces perpendicular to the entity's local y-axis. * @property {string} yTextureURL="" - The 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. * JPG or PNG format. If no texture is specified the surfaces display white.
* @property {string} zTextureURL="" - The URL of the texture to map to surfaces perpendicular to the entity's local z-axis. * @property {string} zTextureURL="" - The 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. * JPG or PNG format. If no texture is specified the surfaces display white.
* @property {Uuid} xNNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's -ve local x-axis * @property {Uuid} xNNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's -ve local x-axis
* direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them.
* @property {Uuid} yNNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's -ve local y-axis * @property {Uuid} yNNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's -ve local y-axis
* direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them.
* @property {Uuid} zNNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's -ve local z-axis * @property {Uuid} zNNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's -ve local z-axis
* direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them.
* @property {Uuid} xPNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's +ve local x-axis * @property {Uuid} xPNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's +ve local x-axis
* direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them.
* @property {Uuid} yPNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's +ve local y-axis * @property {Uuid} yPNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's +ve local y-axis
* direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them.
* @property {Uuid} zPNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's +ve local z-axis * @property {Uuid} zPNeighborID=Uuid.NULL - The ID of the neighboring PolyVox entity in the entity's +ve local z-axis
* direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them. * direction, if you want them joined. Set to {@link Uuid(0)|Uuid.NULL} if there is none or you don't want to join them.
* @example <caption>Create a textured PolyVox sphere.</caption> * @example <caption>Create a textured PolyVox sphere.</caption>
* var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 })); * var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.5, z: -8 }));
@ -1296,8 +1296,8 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
/**jsdoc /**jsdoc
* The <code>"Sphere"</code> {@link Entities.EntityType|EntityType} is the same as the <code>"Shape"</code> * The <code>"Sphere"</code> {@link Entities.EntityType|EntityType} is the same as the <code>"Shape"</code>
* {@link Entities.EntityType|EntityType} except that its <code>shape</code> value is always set to <code>"Sphere"</code> * {@link Entities.EntityType|EntityType} except that its <code>shape</code> value is always set to <code>"Sphere"</code>
* when the entity is created. If its <code>shape</code> property value is subsequently changed then the entity's * when the entity is created. If its <code>shape</code> property value is subsequently changed then the entity's
* <code>type</code> will be reported as <code>"Box"</code> if the <code>shape</code> is set to <code>"Cube"</code>, * <code>type</code> will be reported as <code>"Box"</code> if the <code>shape</code> is set to <code>"Cube"</code>,
* otherwise it will be reported as <code>"Shape"</code>. * otherwise it will be reported as <code>"Shape"</code>.
* *
* @typedef {object} Entities.EntityProperties-Sphere * @typedef {object} Entities.EntityProperties-Sphere
@ -1323,7 +1323,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* @property {number} rightMargin=0.0 - The right margin, in meters. * @property {number} rightMargin=0.0 - The right margin, in meters.
* @property {number} topMargin=0.0 - The top margin, in meters. * @property {number} topMargin=0.0 - The top margin, in meters.
* @property {number} bottomMargin=0.0 - The bottom margin, in meters. * @property {number} bottomMargin=0.0 - The bottom margin, in meters.
* @property {boolean} unlit=false - <code>true</code> if the entity is unaffected by lighting, <code>false</code> if it is lit * @property {boolean} unlit=false - <code>true</code> if the entity is unaffected by lighting, <code>false</code> if it is lit
* by the key light and local lights. * by the key light and local lights.
* @property {string} font="" - The font to render the text with. It can be one of the following: <code>"Courier"</code>, * @property {string} font="" - The font to render the text with. It can be one of the following: <code>"Courier"</code>,
* <code>"Inconsolata"</code>, <code>"Roboto"</code>, <code>"Timeless"</code>, or a path to a .sdff file. * <code>"Inconsolata"</code>, <code>"Roboto"</code>, <code>"Timeless"</code>, or a path to a .sdff file.
@ -1331,10 +1331,10 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* @property {Color} textEffectColor=255,255,255 - The color of the effect. * @property {Color} textEffectColor=255,255,255 - The color of the effect.
* @property {number} textEffectThickness=0.2 - The magnitude of the text effect, range <code>0.0</code> &ndash; <code>0.5</code>. * @property {number} textEffectThickness=0.2 - The magnitude of the text effect, range <code>0.0</code> &ndash; <code>0.5</code>.
* @property {BillboardMode} billboardMode="none" - Whether the entity is billboarded to face the camera. * @property {BillboardMode} billboardMode="none" - Whether the entity is billboarded to face the camera.
* @property {boolean} faceCamera - <code>true</code> if <code>billboardMode</code> is <code>"yaw"</code>, <code>false</code> * @property {boolean} faceCamera - <code>true</code> if <code>billboardMode</code> is <code>"yaw"</code>, <code>false</code>
* if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to <code>"none"</code>. * if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to <code>"none"</code>.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
* @property {boolean} isFacingAvatar - <code>true</code> if <code>billboardMode</code> is <code>"full"</code>, * @property {boolean} isFacingAvatar - <code>true</code> if <code>billboardMode</code> is <code>"full"</code>,
* <code>false</code> if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to * <code>false</code> if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to
* <code>"none"</code>. * <code>"none"</code>.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
@ -1352,35 +1352,35 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
/**jsdoc /**jsdoc
* The <code>"Web"</code> {@link Entities.EntityType|EntityType} displays a browsable web page. Each user views their own copy * The <code>"Web"</code> {@link Entities.EntityType|EntityType} displays a browsable web page. Each user views their own copy
* of 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 * of 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
* played, users don't see it in sync. It has properties in addition to the common * played, users don't see it in sync. It has properties in addition to the common
* {@link Entities.EntityProperties|EntityProperties}. * {@link Entities.EntityProperties|EntityProperties}.
* *
* @typedef {object} Entities.EntityProperties-Web * @typedef {object} Entities.EntityProperties-Web
* @property {Vec3} dimensions=0.1,0.1,0.01 - The dimensions of the entity. * @property {Vec3} dimensions=0.1,0.1,0.01 - The dimensions of the entity.
* @property {string} sourceUrl="" - The URL of the web page to display. This value does not change as you or others navigate * @property {string} sourceUrl="" - The URL of the web page to display. This value does not change as you or others navigate
* on the Web entity. * on the Web entity.
* @property {Color} color=255,255,255 - The color of the web surface. This color tints the web page displayed: the pixel * @property {Color} color=255,255,255 - The color of the web surface. This color tints the web page displayed: the pixel
* colors on the web page are multiplied by the property color. For example, a value of * colors on the web page are multiplied by the property color. For example, a value of
* <code>{ red: 255, green: 0, blue: 0 }</code> lets only the red channel of pixels' colors through. * <code>{ red: 255, green: 0, blue: 0 }</code> lets only the red channel of pixels' colors through.
* @property {number} alpha=1 - The opacity of the web surface. * @property {number} alpha=1 - The opacity of the web surface.
* @property {Entities.Pulse} pulse - Color and alpha pulse. * @property {Entities.Pulse} pulse - Color and alpha pulse.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
* @property {BillboardMode} billboardMode="none" - Whether the entity is billboarded to face the camera. * @property {BillboardMode} billboardMode="none" - Whether the entity is billboarded to face the camera.
* @property {boolean} faceCamera - <code>true</code> if <code>billboardMode</code> is <code>"yaw"</code>, <code>false</code> * @property {boolean} faceCamera - <code>true</code> if <code>billboardMode</code> is <code>"yaw"</code>, <code>false</code>
* if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to <code>"none"</code>. * if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to <code>"none"</code>.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
* @property {boolean} isFacingAvatar - <code>true</code> if <code>billboardMode</code> is <code>"full"</code>, * @property {boolean} isFacingAvatar - <code>true</code> if <code>billboardMode</code> is <code>"full"</code>,
* <code>false</code> if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to * <code>false</code> if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to
* <code>"none"</code>. * <code>"none"</code>.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
* @property {number} dpi=30 - The resolution to display the page at, in dots per inch. If you convert this to dots per meter * @property {number} dpi=30 - 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 <code>dimensions.x</code> and <code>dimensions.y</code> by that value * (multiply by 1 / 0.0254 = 39.3701) then multiply <code>dimensions.x</code> and <code>dimensions.y</code> by that value
* you get the resolution in pixels. * you get the resolution in pixels.
* @property {string} scriptURL="" - The URL of a JavaScript file to inject into the web page. * @property {string} scriptURL="" - The URL of a JavaScript file to inject into the web page.
* @property {number} maxFPS=10 - The maximum update rate for the web content, in frames/second. * @property {number} maxFPS=10 - The maximum update rate for the web content, in frames/second.
* @property {WebInputMode} inputMode="touch" - The user input mode to use. * @property {WebInputMode} inputMode="touch" - The user input mode to use.
* @property {boolean} showKeyboardFocusHighlight=true - <code>true</code> if the entity is highlighted when it has keyboard * @property {boolean} showKeyboardFocusHighlight=true - <code>true</code> if the entity is highlighted when it has keyboard
* focus, <code>false</code> if it isn't. * focus, <code>false</code> if it isn't.
* @example <caption>Create a Web entity displaying at 1920 x 1080 resolution.</caption> * @example <caption>Create a Web entity displaying at 1920 x 1080 resolution.</caption>
* var METERS_TO_INCHES = 39.3701; * var METERS_TO_INCHES = 39.3701;
@ -1401,17 +1401,17 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
/**jsdoc /**jsdoc
* The <code>"Zone"</code> {@link Entities.EntityType|EntityType} is a volume of lighting effects and avatar permissions. * The <code>"Zone"</code> {@link Entities.EntityType|EntityType} is a volume of lighting effects and avatar permissions.
* Avatar interaction events such as {@link Entities.enterEntity} are also often used with a Zone entity. It has properties in * Avatar interaction events such as {@link Entities.enterEntity} are also often used with a Zone entity. It has properties in
* addition to the common {@link Entities.EntityProperties|EntityProperties}. * addition to the common {@link Entities.EntityProperties|EntityProperties}.
* *
* @typedef {object} Entities.EntityProperties-Zone * @typedef {object} Entities.EntityProperties-Zone
* @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the volume in which the zone's lighting effects and avatar * @property {Vec3} dimensions=0.1,0.1,0.1 - The dimensions of the volume in which the zone's lighting effects and avatar
* permissions have effect. * permissions have effect.
* *
* @property {ShapeType} shapeType="box" - The shape of the volume in which the zone's lighting effects and avatar * @property {ShapeType} shapeType="box" - 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 <code>"none"</code>, or set to <code>"compound"</code> * permissions have effect. Reverts to the default value if set to <code>"none"</code>, or set to <code>"compound"</code>
* and <code>compoundShapeURL</code> is <code>""</code>. * and <code>compoundShapeURL</code> is <code>""</code>.
* @property {string} compoundShapeURL="" - The model file to use for the compound shape if <code>shapeType</code> is * @property {string} compoundShapeURL="" - The model file to use for the compound shape if <code>shapeType</code> is
* <code>"compound"</code>. * <code>"compound"</code>.
* *
* @property {Entities.ComponentMode} keyLightMode="inherit" - Configures the key light in the zone. * @property {Entities.ComponentMode} keyLightMode="inherit" - Configures the key light in the zone.
@ -1429,14 +1429,14 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* @property {Entities.ComponentMode} bloomMode="inherit" - Configures the bloom in the zone. * @property {Entities.ComponentMode} bloomMode="inherit" - Configures the bloom in the zone.
* @property {Entities.Bloom} bloom - The bloom properties of the zone. * @property {Entities.Bloom} bloom - The bloom properties of the zone.
* *
* @property {boolean} flyingAllowed=true - <code>true</code> if visitors can fly in the zone; <code>false</code> if they * @property {boolean} flyingAllowed=true - <code>true</code> if visitors can fly in the zone; <code>false</code> if they
* cannot. Only works for domain entities. * cannot. Only works for domain entities.
* @property {boolean} ghostingAllowed=true - <code>true</code> if visitors with avatar collisions turned off will not * @property {boolean} ghostingAllowed=true - <code>true</code> if visitors with avatar collisions turned off will not
* collide with content in the zone; <code>false</code> if visitors will always collide with content in the zone. Only * collide with content in the zone; <code>false</code> if visitors will always collide with content in the zone. Only
* works for domain entities. * works for domain entities.
* *
* @property {string} filterURL="" - The URL of a JavaScript file that filters changes to properties of entities within the * @property {string} filterURL="" - 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 * zone. It is periodically executed for each entity in the zone. It can, for example, be used to not allow changes to
* certain properties: * certain properties:
* <pre> * <pre>
* function filter(properties) { * function filter(properties) {
@ -1446,7 +1446,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* } * }
* </pre> * </pre>
* *
* @property {Entities.AvatarPriorityMode} avatarPriority="inherit" - Configures the priority of updates from avatars in the * @property {Entities.AvatarPriorityMode} avatarPriority="inherit" - Configures the priority of updates from avatars in the
* zone to other clients. * zone to other clients.
* *
* @property {Entities.ScreenshareMode} screenshare="inherit" - Configures a zone for screen-sharing. * @property {Entities.ScreenshareMode} screenshare="inherit" - Configures a zone for screen-sharing.
@ -1472,21 +1472,21 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
* @typedef {object} Entities.EntityProperties-Image * @typedef {object} Entities.EntityProperties-Image
* @property {Vec3} dimensions=0.1,0.1,0.01 - The dimensions of the entity. * @property {Vec3} dimensions=0.1,0.1,0.01 - The dimensions of the entity.
* @property {string} imageURL="" - The URL of the image to use. * @property {string} imageURL="" - The URL of the image to use.
* @property {boolean} emissive=false - <code>true</code> if the image should be emissive (unlit), <code>false</code> if it * @property {boolean} emissive=false - <code>true</code> if the image should be emissive (unlit), <code>false</code> if it
* shouldn't. * shouldn't.
* @property {boolean} keepAspectRatio=true - <code>true</code> if the image should maintain its aspect ratio, * @property {boolean} keepAspectRatio=true - <code>true</code> if the image should maintain its aspect ratio,
* <code>false</code> if it shouldn't. * <code>false</code> if it shouldn't.
* @property {Rect} subImage=0,0,0,0 - The portion of the image to display. If width or height are <code>0</code>, it defaults * @property {Rect} subImage=0,0,0,0 - The portion of the image to display. If width or height are <code>0</code>, it defaults
* to the full image in that dimension. * to the full image in that dimension.
* @property {Color} color=255,255,255 - The color of the image. * @property {Color} color=255,255,255 - The color of the image.
* @property {number} alpha=1 - The opacity of the image. * @property {number} alpha=1 - The opacity of the image.
* @property {Entities.Pulse} pulse - Color and alpha pulse. * @property {Entities.Pulse} pulse - Color and alpha pulse.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
* @property {BillboardMode} billboardMode="none" - Whether the entity is billboarded to face the camera. * @property {BillboardMode} billboardMode="none" - Whether the entity is billboarded to face the camera.
* @property {boolean} faceCamera - <code>true</code> if <code>billboardMode</code> is <code>"yaw"</code>, <code>false</code> * @property {boolean} faceCamera - <code>true</code> if <code>billboardMode</code> is <code>"yaw"</code>, <code>false</code>
* if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to <code>"none"</code>. * if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to <code>"none"</code>.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
* @property {boolean} isFacingAvatar - <code>true</code> if <code>billboardMode</code> is <code>"full"</code>, * @property {boolean} isFacingAvatar - <code>true</code> if <code>billboardMode</code> is <code>"full"</code>,
* <code>false</code> if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to * <code>false</code> if it isn't. Setting this property to <code>false</code> sets the <code>billboardMode</code> to
* <code>"none"</code>. * <code>"none"</code>.
* <p class="important">Deprecated: This property is deprecated and will be removed.</p> * <p class="important">Deprecated: This property is deprecated and will be removed.</p>
@ -1947,13 +1947,13 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
QScriptValue renderInfo = engine->newObject(); QScriptValue renderInfo = engine->newObject();
/**jsdoc /**jsdoc
* Information on how an entity is rendered. Properties are only filled in for <code>Model</code> entities; other * Information on how an entity is rendered. Properties are only filled in for <code>Model</code> entities; other
* entity types have an empty object, <code>{}</code>. * entity types have an empty object, <code>{}</code>.
* @typedef {object} Entities.RenderInfo * @typedef {object} Entities.RenderInfo
* @property {number} verticesCount - The number of vertices in the entity. * @property {number} verticesCount - The number of vertices in the entity.
* @property {number} texturesCount - The number of textures in the entity. * @property {number} texturesCount - The number of textures in the entity.
* @property {number} texturesSize - The total size of the textures in the entity, in bytes. * @property {number} texturesSize - The total size of the textures in the entity, in bytes.
* @property {boolean} hasTransparent - <code>true</code> if any of the textures has transparency, <code>false</code> * @property {boolean} hasTransparent - <code>true</code> if any of the textures has transparency, <code>false</code>
* if none of them do. * if none of them do.
* @property {number} drawCalls - The number of draw calls required to render the entity. * @property {number} drawCalls - The number of draw calls required to render the entity.
*/ */
@ -2604,7 +2604,7 @@ bool EntityItemProperties::getPropertyInfo(const QString& propertyName, EntityPr
ADD_PROPERTY_TO_MAP(PROP_POSITION, Position, position, vec3); ADD_PROPERTY_TO_MAP(PROP_POSITION, Position, position, vec3);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_DIMENSIONS, Dimensions, dimensions, vec3, ENTITY_ITEM_MIN_DIMENSION, FLT_MAX); ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_DIMENSIONS, Dimensions, dimensions, vec3, ENTITY_ITEM_MIN_DIMENSION, FLT_MAX);
ADD_PROPERTY_TO_MAP(PROP_ROTATION, Rotation, rotation, quat); ADD_PROPERTY_TO_MAP(PROP_ROTATION, Rotation, rotation, quat);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_REGISTRATION_POINT, RegistrationPoint, registrationPoint, vec3, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_REGISTRATION_POINT, RegistrationPoint, registrationPoint, vec3,
ENTITY_ITEM_MIN_REGISTRATION_POINT, ENTITY_ITEM_MAX_REGISTRATION_POINT); ENTITY_ITEM_MIN_REGISTRATION_POINT, ENTITY_ITEM_MAX_REGISTRATION_POINT);
ADD_PROPERTY_TO_MAP(PROP_CREATED, Created, created, quint64); ADD_PROPERTY_TO_MAP(PROP_CREATED, Created, created, quint64);
ADD_PROPERTY_TO_MAP(PROP_LAST_EDITED_BY, LastEditedBy, lastEditedBy, QUuid); ADD_PROPERTY_TO_MAP(PROP_LAST_EDITED_BY, LastEditedBy, lastEditedBy, QUuid);
@ -2641,19 +2641,19 @@ bool EntityItemProperties::getPropertyInfo(const QString& propertyName, EntityPr
} }
// Physics // Physics
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_DENSITY, Density, density, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_DENSITY, Density, density, float,
ENTITY_ITEM_MIN_DENSITY, ENTITY_ITEM_MAX_DENSITY); ENTITY_ITEM_MIN_DENSITY, ENTITY_ITEM_MAX_DENSITY);
ADD_PROPERTY_TO_MAP(PROP_VELOCITY, Velocity, velocity, vec3); ADD_PROPERTY_TO_MAP(PROP_VELOCITY, Velocity, velocity, vec3);
ADD_PROPERTY_TO_MAP(PROP_ANGULAR_VELOCITY, AngularVelocity, angularVelocity, vec3); ADD_PROPERTY_TO_MAP(PROP_ANGULAR_VELOCITY, AngularVelocity, angularVelocity, vec3);
ADD_PROPERTY_TO_MAP(PROP_GRAVITY, Gravity, gravity, vec3); ADD_PROPERTY_TO_MAP(PROP_GRAVITY, Gravity, gravity, vec3);
ADD_PROPERTY_TO_MAP(PROP_ACCELERATION, Acceleration, acceleration, vec3); ADD_PROPERTY_TO_MAP(PROP_ACCELERATION, Acceleration, acceleration, vec3);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_DAMPING, Damping, damping, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_DAMPING, Damping, damping, float,
ENTITY_ITEM_MIN_DAMPING, ENTITY_ITEM_MAX_DAMPING); ENTITY_ITEM_MIN_DAMPING, ENTITY_ITEM_MAX_DAMPING);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_ANGULAR_DAMPING, AngularDamping, angularDamping, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_ANGULAR_DAMPING, AngularDamping, angularDamping, float,
ENTITY_ITEM_MIN_DAMPING, ENTITY_ITEM_MAX_DAMPING); ENTITY_ITEM_MIN_DAMPING, ENTITY_ITEM_MAX_DAMPING);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_RESTITUTION, Restitution, restitution, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_RESTITUTION, Restitution, restitution, float,
ENTITY_ITEM_MIN_RESTITUTION, ENTITY_ITEM_MAX_RESTITUTION); ENTITY_ITEM_MIN_RESTITUTION, ENTITY_ITEM_MAX_RESTITUTION);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_FRICTION, Friction, friction, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_FRICTION, Friction, friction, float,
ENTITY_ITEM_MIN_FRICTION, ENTITY_ITEM_MAX_FRICTION); ENTITY_ITEM_MIN_FRICTION, ENTITY_ITEM_MAX_FRICTION);
ADD_PROPERTY_TO_MAP(PROP_LIFETIME, Lifetime, lifetime, float); ADD_PROPERTY_TO_MAP(PROP_LIFETIME, Lifetime, lifetime, float);
ADD_PROPERTY_TO_MAP(PROP_COLLISIONLESS, Collisionless, collisionless, bool); ADD_PROPERTY_TO_MAP(PROP_COLLISIONLESS, Collisionless, collisionless, bool);
@ -2697,7 +2697,7 @@ bool EntityItemProperties::getPropertyInfo(const QString& propertyName, EntityPr
ADD_PROPERTY_TO_MAP(PROP_LOCAL_ROTATION, LocalRotation, localRotation, quat); ADD_PROPERTY_TO_MAP(PROP_LOCAL_ROTATION, LocalRotation, localRotation, quat);
ADD_PROPERTY_TO_MAP(PROP_LOCAL_VELOCITY, LocalVelocity, localVelocity, vec3); ADD_PROPERTY_TO_MAP(PROP_LOCAL_VELOCITY, LocalVelocity, localVelocity, vec3);
ADD_PROPERTY_TO_MAP(PROP_LOCAL_ANGULAR_VELOCITY, LocalAngularVelocity, localAngularVelocity, vec3); ADD_PROPERTY_TO_MAP(PROP_LOCAL_ANGULAR_VELOCITY, LocalAngularVelocity, localAngularVelocity, vec3);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_LOCAL_DIMENSIONS, LocalDimensions, localDimensions, vec3, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_LOCAL_DIMENSIONS, LocalDimensions, localDimensions, vec3,
ENTITY_ITEM_MIN_DIMENSION, FLT_MAX); ENTITY_ITEM_MIN_DIMENSION, FLT_MAX);
// Common // Common
@ -2716,59 +2716,59 @@ bool EntityItemProperties::getPropertyInfo(const QString& propertyName, EntityPr
ADD_PROPERTY_TO_MAP(PROP_BILLBOARD_MODE, BillboardMode, billboardMode, BillboardMode); ADD_PROPERTY_TO_MAP(PROP_BILLBOARD_MODE, BillboardMode, billboardMode, BillboardMode);
// Particles // Particles
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_MAX_PARTICLES, MaxParticles, maxParticles, quint32, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_MAX_PARTICLES, MaxParticles, maxParticles, quint32,
particle::MINIMUM_MAX_PARTICLES, particle::MAXIMUM_MAX_PARTICLES); particle::MINIMUM_MAX_PARTICLES, particle::MAXIMUM_MAX_PARTICLES);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_LIFESPAN, Lifespan, lifespan, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_LIFESPAN, Lifespan, lifespan, float,
particle::MINIMUM_LIFESPAN, particle::MAXIMUM_LIFESPAN); particle::MINIMUM_LIFESPAN, particle::MAXIMUM_LIFESPAN);
ADD_PROPERTY_TO_MAP(PROP_EMITTING_PARTICLES, IsEmitting, isEmitting, bool); ADD_PROPERTY_TO_MAP(PROP_EMITTING_PARTICLES, IsEmitting, isEmitting, bool);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_EMIT_RATE, EmitRate, emitRate, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_EMIT_RATE, EmitRate, emitRate, float,
particle::MINIMUM_EMIT_RATE, particle::MAXIMUM_EMIT_RATE); particle::MINIMUM_EMIT_RATE, particle::MAXIMUM_EMIT_RATE);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_EMIT_SPEED, EmitSpeed, emitSpeed, vec3, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_EMIT_SPEED, EmitSpeed, emitSpeed, vec3,
particle::MINIMUM_EMIT_SPEED, particle::MAXIMUM_EMIT_SPEED); particle::MINIMUM_EMIT_SPEED, particle::MAXIMUM_EMIT_SPEED);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_SPEED_SPREAD, SpeedSpread, speedSpread, vec3, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_SPEED_SPREAD, SpeedSpread, speedSpread, vec3,
particle::MINIMUM_EMIT_SPEED, particle::MAXIMUM_EMIT_SPEED); particle::MINIMUM_EMIT_SPEED, particle::MAXIMUM_EMIT_SPEED);
ADD_PROPERTY_TO_MAP(PROP_EMIT_ORIENTATION, EmitOrientation, emitOrientation, quat); ADD_PROPERTY_TO_MAP(PROP_EMIT_ORIENTATION, EmitOrientation, emitOrientation, quat);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_EMIT_DIMENSIONS, EmitDimensions, emitDimensions, vec3, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_EMIT_DIMENSIONS, EmitDimensions, emitDimensions, vec3,
particle::MINIMUM_EMIT_DIMENSION, particle::MAXIMUM_EMIT_DIMENSION); particle::MINIMUM_EMIT_DIMENSION, particle::MAXIMUM_EMIT_DIMENSION);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_EMIT_RADIUS_START, EmitRadiusStart, emitRadiusStart, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_EMIT_RADIUS_START, EmitRadiusStart, emitRadiusStart, float,
particle::MINIMUM_EMIT_RADIUS_START, particle::MAXIMUM_EMIT_RADIUS_START); particle::MINIMUM_EMIT_RADIUS_START, particle::MAXIMUM_EMIT_RADIUS_START);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_POLAR_START, EmitPolarStart, polarStart, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_POLAR_START, EmitPolarStart, polarStart, float,
particle::MINIMUM_POLAR, particle::MAXIMUM_POLAR); particle::MINIMUM_POLAR, particle::MAXIMUM_POLAR);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_POLAR_FINISH, EmitPolarFinish, polarFinish, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_POLAR_FINISH, EmitPolarFinish, polarFinish, float,
particle::MINIMUM_POLAR, particle::MAXIMUM_POLAR); particle::MINIMUM_POLAR, particle::MAXIMUM_POLAR);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_AZIMUTH_START, EmitAzimuthStart, azimuthStart, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_AZIMUTH_START, EmitAzimuthStart, azimuthStart, float,
particle::MINIMUM_AZIMUTH, particle::MAXIMUM_AZIMUTH); particle::MINIMUM_AZIMUTH, particle::MAXIMUM_AZIMUTH);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_AZIMUTH_FINISH, EmitAzimuthFinish, azimuthFinish, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_AZIMUTH_FINISH, EmitAzimuthFinish, azimuthFinish, float,
particle::MINIMUM_AZIMUTH, particle::MAXIMUM_AZIMUTH); particle::MINIMUM_AZIMUTH, particle::MAXIMUM_AZIMUTH);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_EMIT_ACCELERATION, EmitAcceleration, emitAcceleration, vec3, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_EMIT_ACCELERATION, EmitAcceleration, emitAcceleration, vec3,
particle::MINIMUM_EMIT_ACCELERATION, particle::MAXIMUM_EMIT_ACCELERATION); particle::MINIMUM_EMIT_ACCELERATION, particle::MAXIMUM_EMIT_ACCELERATION);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_ACCELERATION_SPREAD, AccelerationSpread, accelerationSpread, vec3, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_ACCELERATION_SPREAD, AccelerationSpread, accelerationSpread, vec3,
particle::MINIMUM_ACCELERATION_SPREAD, particle::MAXIMUM_ACCELERATION_SPREAD); particle::MINIMUM_ACCELERATION_SPREAD, particle::MAXIMUM_ACCELERATION_SPREAD);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_PARTICLE_RADIUS, ParticleRadius, particleRadius, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_PARTICLE_RADIUS, ParticleRadius, particleRadius, float,
particle::MINIMUM_PARTICLE_RADIUS, particle::MAXIMUM_PARTICLE_RADIUS); particle::MINIMUM_PARTICLE_RADIUS, particle::MAXIMUM_PARTICLE_RADIUS);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_RADIUS_SPREAD, RadiusSpread, radiusSpread, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_RADIUS_SPREAD, RadiusSpread, radiusSpread, float,
particle::MINIMUM_PARTICLE_RADIUS, particle::MAXIMUM_PARTICLE_RADIUS); particle::MINIMUM_PARTICLE_RADIUS, particle::MAXIMUM_PARTICLE_RADIUS);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_RADIUS_START, RadiusStart, radiusStart, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_RADIUS_START, RadiusStart, radiusStart, float,
particle::MINIMUM_PARTICLE_RADIUS, particle::MAXIMUM_PARTICLE_RADIUS); particle::MINIMUM_PARTICLE_RADIUS, particle::MAXIMUM_PARTICLE_RADIUS);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_RADIUS_FINISH, RadiusFinish, radiusFinish, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_RADIUS_FINISH, RadiusFinish, radiusFinish, float,
particle::MINIMUM_PARTICLE_RADIUS, particle::MAXIMUM_PARTICLE_RADIUS); particle::MINIMUM_PARTICLE_RADIUS, particle::MAXIMUM_PARTICLE_RADIUS);
ADD_PROPERTY_TO_MAP(PROP_COLOR_SPREAD, ColorSpread, colorSpread, u8vec3Color); ADD_PROPERTY_TO_MAP(PROP_COLOR_SPREAD, ColorSpread, colorSpread, u8vec3Color);
ADD_PROPERTY_TO_MAP(PROP_COLOR_START, ColorStart, colorStart, vec3Color); ADD_PROPERTY_TO_MAP(PROP_COLOR_START, ColorStart, colorStart, vec3Color);
ADD_PROPERTY_TO_MAP(PROP_COLOR_FINISH, ColorFinish, colorFinish, vec3Color); ADD_PROPERTY_TO_MAP(PROP_COLOR_FINISH, ColorFinish, colorFinish, vec3Color);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_ALPHA_SPREAD, AlphaSpread, alphaSpread, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_ALPHA_SPREAD, AlphaSpread, alphaSpread, float,
particle::MINIMUM_ALPHA, particle::MAXIMUM_ALPHA); particle::MINIMUM_ALPHA, particle::MAXIMUM_ALPHA);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_ALPHA_START, AlphaStart, alphaStart, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_ALPHA_START, AlphaStart, alphaStart, float,
particle::MINIMUM_ALPHA, particle::MAXIMUM_ALPHA); particle::MINIMUM_ALPHA, particle::MAXIMUM_ALPHA);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_ALPHA_FINISH, AlphaFinish, alphaFinish, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_ALPHA_FINISH, AlphaFinish, alphaFinish, float,
particle::MINIMUM_ALPHA, particle::MAXIMUM_ALPHA); particle::MINIMUM_ALPHA, particle::MAXIMUM_ALPHA);
ADD_PROPERTY_TO_MAP(PROP_EMITTER_SHOULD_TRAIL, EmitterShouldTrail, emitterShouldTrail, bool); ADD_PROPERTY_TO_MAP(PROP_EMITTER_SHOULD_TRAIL, EmitterShouldTrail, emitterShouldTrail, bool);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_PARTICLE_SPIN, ParticleSpin, particleSpin, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_PARTICLE_SPIN, ParticleSpin, particleSpin, float,
particle::MINIMUM_PARTICLE_SPIN, particle::MAXIMUM_PARTICLE_SPIN); particle::MINIMUM_PARTICLE_SPIN, particle::MAXIMUM_PARTICLE_SPIN);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_SPIN_SPREAD, SpinSpread, spinSpread, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_SPIN_SPREAD, SpinSpread, spinSpread, float,
particle::MINIMUM_PARTICLE_SPIN, particle::MAXIMUM_PARTICLE_SPIN); particle::MINIMUM_PARTICLE_SPIN, particle::MAXIMUM_PARTICLE_SPIN);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_SPIN_START, SpinStart, spinStart, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_SPIN_START, SpinStart, spinStart, float,
particle::MINIMUM_PARTICLE_SPIN, particle::MAXIMUM_PARTICLE_SPIN); particle::MINIMUM_PARTICLE_SPIN, particle::MAXIMUM_PARTICLE_SPIN);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_SPIN_FINISH, SpinFinish, spinFinish, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_SPIN_FINISH, SpinFinish, spinFinish, float,
particle::MINIMUM_PARTICLE_SPIN, particle::MAXIMUM_PARTICLE_SPIN); particle::MINIMUM_PARTICLE_SPIN, particle::MAXIMUM_PARTICLE_SPIN);
ADD_PROPERTY_TO_MAP(PROP_PARTICLE_ROTATE_WITH_ENTITY, RotateWithEntity, rotateWithEntity, float); ADD_PROPERTY_TO_MAP(PROP_PARTICLE_ROTATE_WITH_ENTITY, RotateWithEntity, rotateWithEntity, float);
@ -2798,7 +2798,7 @@ bool EntityItemProperties::getPropertyInfo(const QString& propertyName, EntityPr
ADD_PROPERTY_TO_MAP(PROP_IS_SPOTLIGHT, IsSpotlight, isSpotlight, bool); ADD_PROPERTY_TO_MAP(PROP_IS_SPOTLIGHT, IsSpotlight, isSpotlight, bool);
ADD_PROPERTY_TO_MAP(PROP_INTENSITY, Intensity, intensity, float); ADD_PROPERTY_TO_MAP(PROP_INTENSITY, Intensity, intensity, float);
ADD_PROPERTY_TO_MAP(PROP_EXPONENT, Exponent, exponent, float); ADD_PROPERTY_TO_MAP(PROP_EXPONENT, Exponent, exponent, float);
ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_CUTOFF, Cutoff, cutoff, float, ADD_PROPERTY_TO_MAP_WITH_RANGE(PROP_CUTOFF, Cutoff, cutoff, float,
LightEntityItem::MIN_CUTOFF, LightEntityItem::MAX_CUTOFF); LightEntityItem::MIN_CUTOFF, LightEntityItem::MAX_CUTOFF);
ADD_PROPERTY_TO_MAP(PROP_FALLOFF_RADIUS, FalloffRadius, falloffRadius, float); ADD_PROPERTY_TO_MAP(PROP_FALLOFF_RADIUS, FalloffRadius, falloffRadius, float);
@ -5149,7 +5149,7 @@ bool EntityItemProperties::blobToProperties(QScriptEngine& scriptEngine, const Q
return true; return true;
} }
void EntityItemProperties::propertiesToBlob(QScriptEngine& scriptEngine, const QUuid& myAvatarID, void EntityItemProperties::propertiesToBlob(QScriptEngine& scriptEngine, const QUuid& myAvatarID,
const EntityItemProperties& properties, QByteArray& blob, bool allProperties) { const EntityItemProperties& properties, QByteArray& blob, bool allProperties) {
// DANGER: this method is NOT efficient. // DANGER: this method is NOT efficient.
// begin recipe for extracting unfortunately-formatted-binary-blob from EntityItem // begin recipe for extracting unfortunately-formatted-binary-blob from EntityItem

View file

@ -987,8 +987,8 @@ void EntityScriptingInterface::deleteEntity(const QUuid& id) {
// Deleting an entity has consequences for linked children: some can be deleted but others can't. // Deleting an entity has consequences for linked children: some can be deleted but others can't.
// Local- and my-avatar-entities can be deleted immediately, but other-avatar-entities can't be deleted // Local- and my-avatar-entities can be deleted immediately, but other-avatar-entities can't be deleted
// by this context, and a domain-entity must rountrip through the entity-server for authorization. // by this context, and a domain-entity must round trip through the entity-server for authorization.
if (entity->isDomainEntity()) { if (entity->isDomainEntity() && !_entityTree->isServerlessMode()) {
getEntityPacketSender()->queueEraseEntityMessage(id); getEntityPacketSender()->queueEraseEntityMessage(id);
} else { } else {
entitiesToDeleteImmediately.push_back(entity); entitiesToDeleteImmediately.push_back(entity);

View file

@ -59,7 +59,7 @@ private slots:
private: private:
UserActivityLogger(); UserActivityLogger();
Setting::Handle<bool> _disabled { "UserActivityLoggerDisabled", true }; Setting::Handle<bool> _disabled { "UserActivityLoggerDisabled", true };
Setting::Handle<bool> _crashMonitorDisabled { "CrashMonitorDisabled", false }; Setting::Handle<bool> _crashMonitorDisabled { "CrashMonitorDisabled2", true };
QElapsedTimer _timer; QElapsedTimer _timer;
}; };

View file

@ -19,25 +19,25 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y tzdata supervisor ${DEPENDS} && \ apt-get install -y tzdata supervisor ${DEPENDS} && \
apt-get clean && \ apt-get clean && \
rm -rf /var/lib/apt/lists/* && \ rm -rf /var/lib/apt/lists/* && \
mkdir -p /var/lib/athena mkdir -p /var/lib/vircadia
RUN groupadd -r athena ; \ RUN groupadd -r vircadia ; \
useradd -Nr athena -d /var/lib/athena ; \ useradd -Nr vircadia -d /var/lib/vircadia ; \
usermod -aG athena athena ; \ usermod -aG vircadia vircadia ; \
chown athena.athena /var/lib/athena ; \ chown vircadia.vircadia /var/lib/vircadia ; \
exit 0 exit 0
VOLUME /var/lib/athena VOLUME /var/lib/vircadia
RUN mkdir -p /var/run ; chmod 777 /var/run RUN mkdir -p /var/run ; chmod 777 /var/run
COPY athena.conf /etc/supervisor/conf.d/athena.conf COPY vircadia.conf /etc/supervisor/conf.d/vircadia.conf
COPY entrypoint.sh / COPY entrypoint.sh /
COPY opt /opt/athena COPY opt /opt/vircadia
COPY lib /opt/athena/lib COPY lib /opt/vircadia/lib
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/athena.conf"] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/vircadia.conf"]
LABEL \ LABEL \
net.projectathena.gitsrc="${GITSRC}" \ net.vircadia.gitsrc="${GITSRC}" \
net.projectathena.gitdate="${GITDATE}" \ net.vircadia.gitdate="${GITDATE}" \
net.projectathena.gitcommit="${GITCOMMIT}" net.vircadia.gitcommit="${GITCOMMIT}"

View file

@ -1,5 +1,5 @@
Collection of scripts to create server distribution packages. Most of these scripts assume Collection of scripts to create server distribution packages. Most of these scripts assume
use of the build script at https://github.com/daleglass/athena-builder, specifically that use of the build script at https://github.com/kasenvr/vircadia-builder, specifically that
the following directory structure exists the following directory structure exists
base folder/ base folder/
@ -9,7 +9,7 @@ base folder/
These scripts assume that the current directory is the pkg-scripts folder inside of the source directory These scripts assume that the current directory is the pkg-scripts folder inside of the source directory
and that the base folder can be reached by going to "../..". This may not work if pkg-scripts is a symlink; and that the base folder can be reached by going to "../..". This may not work if pkg-scripts is a symlink;
adding an ATHENA=~/Athena to the beginning of the commandline will override where it looks for the base folder adding an VIRCADIA=~/Vircadia to the beginning of the commandline will override where it looks for the base folder
Ubuntu: Ubuntu:
DEBEMAIL="your-email@somewhere.com" DEBFULLNAME="Your Full Name" ./make-deb-server DEBEMAIL="your-email@somewhere.com" DEBFULLNAME="Your Full Name" ./make-deb-server
@ -30,24 +30,24 @@ Docker:
Results: Results:
The following directory structure is created for binaries: The following directory structure is created for binaries:
/opt/athena - executables /opt/vircadia - executables
/opt/athena/lib - private shared libraries required for executables /opt/vircadia/lib - private shared libraries required for executables
/opt/athena/resources - files required by domain-server administrative website /opt/vircadia/resources - files required by domain-server administrative website
/opt/athena/plugins - files required by assignment-client, mainly for audio codecs /opt/vircadia/plugins - files required by assignment-client, mainly for audio codecs
The following systemd services are installed in /usr/lib/systemd/system: The following systemd services are installed in /usr/lib/systemd/system:
athena-assignment-client.service vircadia-assignment-client.service
athena-domain-server.service vircadia-domain-server.service
athena-server.target - used to launch/shutdown the two prior services vircadia-server.target - used to launch/shutdown the two prior services
athena-assignment-client@.service vircadia-assignment-client@.service
athena-domain-server@.service vircadia-domain-server@.service
athena-server@.target - used to launch/shutdown the two prior services vircadia-server@.target - used to launch/shutdown the two prior services
The top three services in this list are the "normal" services that launch Athena The top three services in this list are the "normal" services that launch Vircadia
in the typical fashion. The bottom three services are "template" services designed in the typical fashion. The bottom three services are "template" services designed
to permit multiple services to be installed and running on a single machine. to permit multiple services to be installed and running on a single machine.
The script "/opt/athena/new-server serverName basePort" will do the necessary The script "/opt/vircadia/new-server serverName basePort" will do the necessary
setup for a new domain with the specified server name and port. Upon installation setup for a new domain with the specified server name and port. Upon installation
the package will create and launch a domain named "default" at base port 40100. the package will create and launch a domain named "default" at base port 40100.
The domain name here has nothing to do with the name people will use to find your The domain name here has nothing to do with the name people will use to find your
@ -55,6 +55,6 @@ Results:
used to configure and run the domain on your server. used to configure and run the domain on your server.
The server stores its files in the following locations: The server stores its files in the following locations:
/var/lib/athena/.local - "unnamed" services (the default location for Athena servers) /var/lib/vircadia/.local - "unnamed" services (the default location for Vircadia servers)
/var/lib/athena/serverName - "named" (template) domains /var/lib/vircadia/serverName - "named" (template) domains
/etc/opt/athena - environment variables when launching named domains /etc/opt/vircadia - environment variables when launching named domains

View file

@ -1,18 +0,0 @@
[Unit]
Description=Assignment client service for Athena server
After=network.target
PartOf=athena-server.target
[Service]
Restart=always
WorkingDirectory=/opt/athena
Environment="LD_LIBRARY_PATH=/opt/athena/lib"
User=athena
Group=athena
#LimitCORE=infinity
#ExecStart=/opt/athena/assignment-client -n 6
ExecStart=/opt/athena/assignment-client --min 6 --max 20
[Install]
WantedBy=multi-user.target

View file

@ -1,20 +0,0 @@
[Unit]
Description=Assignment client service for Athena server
After=network.target
PartOf=athena-server@%i.target
[Service]
Restart=always
WorkingDirectory=/opt/athena
EnvironmentFile=/etc/opt/athena/%i.conf
Environment="LD_LIBRARY_PATH=/opt/athena/lib" "HOME=/var/lib/athena/%i"
PrivateTmp=true
User=athena
Group=athena
#LimitCORE=infinity
#ExecStart=/opt/athena/assignment-client -n 6
ExecStart=/opt/athena/assignment-client --min 6 --max 20 --server-port $HIFI_DOMAIN_SERVER_PORT
[Install]
WantedBy=multi-user.target

View file

@ -1,18 +0,0 @@
[Unit]
Description=Domain Server service for Athena
After=network.target
PartOf=athena-server.target
[Service]
Restart=on-failure
WorkingDirectory=/opt/athena
Environment="LD_LIBRARY_PATH=/opt/athena/lib"
User=athena
Group=athena
#LimitCORE=infinity
#ExecStartPre=/bin/bash -c 'if /usr/bin/pgrep -l domain-server; then /usr/bin/pkill -SIGKILL -f /usr/share/hifi/domain-server/domain-server; fi'
ExecStart=/opt/athena/domain-server
[Install]
WantedBy=multi-user.target

View file

@ -1,20 +0,0 @@
[Unit]
Description=Domain Server service for Athena
After=network.target
PartOf=athena-server@%i.target
[Service]
Restart=on-failure
WorkingDirectory=/opt/athena
EnvironmentFile=/etc/opt/athena/%i.conf
Environment="LD_LIBRARY_PATH=/opt/athena/lib" "HOME=/var/lib/athena/%i"
PrivateTmp=true
User=athena
Group=athena
#LimitCORE=infinity
#ExecStartPre=/bin/bash -c 'if /usr/bin/pgrep -l domain-server; then /usr/bin/pkill -SIGKILL -f /usr/share/hifi/domain-server/domain-server; fi'
ExecStart=/opt/athena/domain-server
[Install]
WantedBy=multi-user.target

View file

@ -1,128 +0,0 @@
#ATHENA=~/Athena rpmbuild --target x86_64 -bb athena-server.spec
%define version %{lua:print(os.getenv("VERSION"))}
%define depends %{lua:print(os.getenv("DEPENDS"))}
Name: athena-server
Version: %{version}
Release: 1%{?dist}
Summary: Project Athena metaverse platform, based on the High Fidelity Engine.
License: ASL 2.0
URL: https://projectathena.io
Source0: https://github.com/daleglass/athena-builder/blob/master/athena_builder
#BuildRequires: systemd-rpm-macros
BuildRequires: chrpath
Requires: %{depends}
BuildArch: x86_64
AutoReq: no
AutoProv: no
%description
Project Athena allows creation and sharing of VR experiences.
The Project Athena metaverse provides built-in social features, including avatar interactions, spatialized audio and interactive physics. Additionally, you have the ability to import any 3D object into your virtual environment.
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/opt/athena
install -m 0755 -t $RPM_BUILD_ROOT/opt/athena $ATHENA/build/assignment-client/assignment-client
install -m 0755 -t $RPM_BUILD_ROOT/opt/athena $ATHENA/build/domain-server/domain-server
install -m 0755 -t $RPM_BUILD_ROOT/opt/athena $ATHENA/build/tools/oven/oven
#install -m 0755 -t $RPM_BUILD_ROOT/opt/athena $ATHENA/build/ice-server/ice-server
strip --strip-all $RPM_BUILD_ROOT/opt/athena/*
chrpath -d $RPM_BUILD_ROOT/opt/athena/*
install -m 0755 -t $RPM_BUILD_ROOT/opt/athena $ATHENA/source/pkg-scripts/new-server
install -d $RPM_BUILD_ROOT/opt/athena/lib
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/build/libraries/*/*.so
strip --strip-all $RPM_BUILD_ROOT/opt/athena/lib/*
chrpath -d $RPM_BUILD_ROOT/opt/athena/lib/*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Network.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Core.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Gui.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Script.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Quick.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5Qml.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/athena/lib $ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.*
install -d $RPM_BUILD_ROOT/usr/lib/systemd/system
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-assignment-client.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-assignment-client@.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-domain-server.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-domain-server@.service
#install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-ice-server.service
#install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-ice-server@.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-server.target
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $ATHENA/source/pkg-scripts/athena-server@.target
cp -a $ATHENA/source/domain-server/resources $RPM_BUILD_ROOT/opt/athena
cp -a $ATHENA/build/assignment-client/plugins $RPM_BUILD_ROOT/opt/athena
chrpath -d $RPM_BUILD_ROOT/opt/athena/plugins/*.so
chrpath -d $RPM_BUILD_ROOT/opt/athena/plugins/*/*.so
strip --strip-all $RPM_BUILD_ROOT/opt/athena/plugins/*.so
strip --strip-all $RPM_BUILD_ROOT/opt/athena/plugins/*/*.so
find $RPM_BUILD_ROOT/opt/athena/resources -name ".gitignore" -delete
%files
%license $ATHENA/source/LICENSE
/opt/athena
/usr/lib/systemd/system
%changelog
%post
# create users
getent passwd athena >/dev/numm 2>&1 || useradd -r -c "Project Athena" -d /var/lib/athena -U -M athena
#getent group athena >/dev/null 2>&1 || groupadd -r athena
# create data folder
mkdir -p /etc/opt/athena
mkdir -p /var/lib/athena && chown athena:athena /var/lib/athena && chmod 775 /var/lib/athena
ldconfig -n /opt/athena/lib
if [ ! -d "/var/lib/athena/default" ]; then
/opt/athena/new-server default 40100
systemctl enable athena-server@default.target
systemctl start athena-server@default.target
fi
%systemd_post athena-assignment-client.service
%systemd_post athena-assignment-client@.service
%systemd_post athena-domain-server.service
%systemd_post athena-domain-server@.service
#%systemd_post athena-ice-server.service
#%systemd_post athena-ice-server@.service
%systemd_post athena-server.target
%systemd_post athena-server@.target
%preun
%systemd_preun athena-server.target
%systemd_preun athena-server@.target
%systemd_preun athena-assignment-client.service
%systemd_preun athena-assignment-client@.service
%systemd_preun athena-domain-server.service
%systemd_preun athena-domain-server@.service
#%systemd_preun athena-ice-server.service
#%systemd_preun athena-ice-server@.service
%postun
%systemd_postun_with_restart athena-server.target
%systemd_postun_with_restart athena-server@.target
%systemd_postun_with_restart athena-assignment-client.service
%systemd_postun_with_restart athena-assignment-client@.service
%systemd_postun_with_restart athena-domain-server.service
%systemd_postun_with_restart athena-domain-server@.service
#%systemd_postun_with_restart athena-ice-server.service
#%systemd_postun_with_restart athena-ice-server@.service

View file

@ -1,11 +0,0 @@
[Unit]
Description=Athena virtual domain
Wants=athena-assignment-client.service
Wants=athena-domain-server.service
#Wants=athena-ice-server.service
After=athena-assignment-client.service
After=athena-domain-server.service
#After=athena-ice-server.service
[Install]
WantedBy=multi-user.target

View file

@ -1,11 +0,0 @@
[Unit]
Description=Athena virtual domain
Wants=athena-assignment-client@%i.service
Wants=athena-domain-server@%i.service
#Wants=athena-ice-server@%i.service
After=athena-assignment-client@%i.service
After=athena-domain-server@%i.service
#After=athena-ice-server@%i.service
[Install]
WantedBy=multi-user.target

View file

@ -6,23 +6,23 @@ set -x
# allowing the container to be run directly as Jenkins. In Dev, or on unknown # allowing the container to be run directly as Jenkins. In Dev, or on unknown
# environments, run the container as root to automatically correct docker # environments, run the container as root to automatically correct docker
# group in container to match the docker.sock GID mounted from the host. # group in container to match the docker.sock GID mounted from the host.
if [ -f /var/lib/athena/.local -a "$(id -u)" = "0" ]; then if [ -f /var/lib/vircadia/.local -a "$(id -u)" = "0" ]; then
# realign gid # realign gid
THIS_ATHENA_GID=`ls -ngd /var/lib/athena/.local | cut -f3 -d' '` THIS_VIRCADIA_GID=`ls -ngd /var/lib/vircadia/.local | cut -f3 -d' '`
CUR_ATHENA_GID=`getent group athena | cut -f3 -d: || true` CUR_VIRCADIA_GID=`getent group vircadia | cut -f3 -d: || true`
if [ ! -z "$THIS_ATHENA_GID" -a "$THIS_ATHENA_GID" != "$CUR_ATHENA_GID" ]; then if [ ! -z "$THIS_VIRCADIA_GID" -a "$THIS_VIRCADIA_GID" != "$CUR_VIRCADIA_GID" ]; then
groupmod -g ${THIS_ATHENA_GID} -o athena groupmod -g ${THIS_VIRCADIA_GID} -o vircadia
fi fi
# realign pid # realign pid
THIS_ATHENA_PID=`ls -nd /var/lib/athena/.local | cut -f3 -d' '` THIS_VIRCADIA_PID=`ls -nd /var/lib/vircadia/.local | cut -f3 -d' '`
CUR_ATHENA_PID=`getent passwd athena | cut -f3 -d: || true` CUR_VIRCADIA_PID=`getent passwd vircadia | cut -f3 -d: || true`
if [ ! -z "$THIS_ATHENA_PID" -a "$THIS_ATHENA_PID" != "$CUR_ATHENA_PID" ]; then if [ ! -z "$THIS_VIRCADIA_PID" -a "$THIS_VIRCADIA_PID" != "$CUR_VIRCADIA_PID" ]; then
usermod -u ${THIS_ATHENA_PID} -o athena usermod -u ${THIS_VIRCADIA_PID} -o vircadia
fi fi
if ! groups athena | grep -q athena; then if ! groups vircadia | grep -q vircadia; then
usermod -aG athena athena usermod -aG vircadia vircadia
fi fi
fi fi

View file

@ -1,74 +1,74 @@
[supervisord] [supervisord]
user=athena user=vircadia
nodaemon=true nodaemon=true
environment=HOME="/var/lib/athena",USER="athena",LD_LIBRARY_PATH="/opt/athena/lib" environment=HOME="/var/lib/vircadia",USER="vircadia",LD_LIBRARY_PATH="/opt/vircadia/lib"
logfile=/dev/stdout logfile=/dev/stdout
logfile_maxbytes=0 logfile_maxbytes=0
pidfile=/var/run/supervisord.pid pidfile=/var/run/supervisord.pid
[program:domain-server] [program:domain-server]
command=/opt/athena/domain-server command=/opt/vircadia/domain-server
autorestart=unexpected autorestart=unexpected
directory=/opt/athena directory=/opt/vircadia
[program:audio-mixer] [program:audio-mixer]
command=/opt/athena/assignment-client -t 0 -a localhost -p 48000 command=/opt/vircadia/assignment-client -t 0 -a localhost -p 48000
autorestart=unexpected autorestart=unexpected
directory=/opt/athena directory=/opt/vircadia
stdout_logfile=/dev/stdout stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
[program:avatar-mixer] [program:avatar-mixer]
command=/opt/athena/assignment-client -t 1 -a localhost -p 48001 command=/opt/vircadia/assignment-client -t 1 -a localhost -p 48001
autorestart=unexpected autorestart=unexpected
directory=/opt/athena directory=/opt/vircadia
stdout_logfile=/dev/stdout stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
[program:entities-server] [program:entities-server]
command=/opt/athena/assignment-client -t 6 -a localhost -p 48006 command=/opt/vircadia/assignment-client -t 6 -a localhost -p 48006
autorestart=unexpected autorestart=unexpected
directory=/opt/athena directory=/opt/vircadia
stdout_logfile=/dev/stdout stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
[program:asset-server] [program:asset-server]
command=/opt/athena/assignment-client -t 3 -a localhost -p 48003 command=/opt/vircadia/assignment-client -t 3 -a localhost -p 48003
autorestart=unexpected autorestart=unexpected
directory=/opt/athena directory=/opt/vircadia
stdout_logfile=/dev/stdout stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
[program:entity-script-server] [program:entity-script-server]
command=/opt/athena/assignment-client -t 5 -a localhost -p 48005 command=/opt/vircadia/assignment-client -t 5 -a localhost -p 48005
autorestart=unexpected autorestart=unexpected
directory=/opt/athena directory=/opt/vircadia
stdout_logfile=/dev/stdout stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
[program:messages-mixer] [program:messages-mixer]
command=/opt/athena/assignment-client -t 4 -a localhost -p 48004 command=/opt/vircadia/assignment-client -t 4 -a localhost -p 48004
autorestart=unexpected autorestart=unexpected
directory=/opt/athena directory=/opt/vircadia
stdout_logfile=/dev/stdout stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
[program:scripted-agent] [program:scripted-agent]
command=/opt/athena/assignment-client -t 2 -a localhost --max 100 command=/opt/vircadia/assignment-client -t 2 -a localhost --max 100
autorestart=unexpected autorestart=unexpected
directory=/opt/athena directory=/opt/vircadia
stdout_logfile=/dev/stdout stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr stderr_logfile=/dev/stderr

View file

@ -1,107 +1,99 @@
#!/bin/sh #!/bin/sh
if [ "$ATHENA" = "" ]; then if [ "$VIRCADIA" = "" ]; then
ATHENA=`realpath ../..` VIRCADIA=`realpath ../..`
fi fi
GITDATE=`git -C $ATHENA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"` GITDATE=`git -C $VIRCADIA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`
GITCOMMIT=`git -C $ATHENA/source rev-parse HEAD | cut -c 1-7` GITCOMMIT=`git -C $VIRCADIA/source rev-parse HEAD | cut -c 1-7`
VERSION=0.86.0-k2-$GITDATE-$GITCOMMIT VERSION=2020.2.0-asteria-$GITDATE-$GITCOMMIT
sudo apt-get install chrpath binutils dh-make sudo apt-get install chrpath binutils dh-make
DEB_BUILD_ROOT=temp-make-deb/athena-server-$VERSION-0ubuntu1 DEB_BUILD_ROOT=temp-make-deb/vircadia-server-$VERSION-0ubuntu1
rm -r temp-make-deb rm -r temp-make-deb
mkdir -p $DEB_BUILD_ROOT mkdir -p $DEB_BUILD_ROOT
# copy the files over # copy the files over
cp $ATHENA/build/assignment-client/assignment-client $DEB_BUILD_ROOT cp $VIRCADIA/build/assignment-client/assignment-client $DEB_BUILD_ROOT
cp $ATHENA/build/domain-server/domain-server $DEB_BUILD_ROOT cp $VIRCADIA/build/domain-server/domain-server $DEB_BUILD_ROOT
cp $ATHENA/build/tools/oven/oven $DEB_BUILD_ROOT cp $VIRCADIA/build/tools/oven/oven $DEB_BUILD_ROOT
cp $ATHENA/build/libraries/*/*.so $DEB_BUILD_ROOT cp $VIRCADIA/build/libraries/*/*.so $DEB_BUILD_ROOT
#cp $ATHENA/build/ice-server/ice-server $DEB_BUILD_ROOT #cp $VIRCADIA/build/ice-server/ice-server $DEB_BUILD_ROOT
chrpath -d $DEB_BUILD_ROOT/* chrpath -d $DEB_BUILD_ROOT/*
cp $ATHENA/qt5-install/lib/libQt5Network.so.*.*.* $DEB_BUILD_ROOT cp $VIRCADIA/qt5-install/lib/libQt5Network.so.*.*.* $DEB_BUILD_ROOT
cp $ATHENA/qt5-install/lib/libQt5Core.so.*.*.* $DEB_BUILD_ROOT cp $VIRCADIA/qt5-install/lib/libQt5Core.so.*.*.* $DEB_BUILD_ROOT
cp $ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.* $DEB_BUILD_ROOT cp $VIRCADIA/qt5-install/lib/libQt5Widgets.so.*.*.* $DEB_BUILD_ROOT
cp $ATHENA/qt5-install/lib/libQt5Gui.so.*.*.* $DEB_BUILD_ROOT cp $VIRCADIA/qt5-install/lib/libQt5Gui.so.*.*.* $DEB_BUILD_ROOT
cp $ATHENA/qt5-install/lib/libQt5Script.so.*.*.* $DEB_BUILD_ROOT cp $VIRCADIA/qt5-install/lib/libQt5Script.so.*.*.* $DEB_BUILD_ROOT
cp $ATHENA/qt5-install/lib/libQt5Quick.so.*.*.* $DEB_BUILD_ROOT cp $VIRCADIA/qt5-install/lib/libQt5WebSockets.so.*.*.* $DEB_BUILD_ROOT
cp $ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.* $DEB_BUILD_ROOT cp $VIRCADIA/qt5-install/lib/libQt5Qml.so.*.*.* $DEB_BUILD_ROOT
cp $ATHENA/qt5-install/lib/libQt5Qml.so.*.*.* $DEB_BUILD_ROOT cp $VIRCADIA/qt5-install/lib/libQt5ScriptTools.so.*.*.* $DEB_BUILD_ROOT
cp $ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.* $DEB_BUILD_ROOT
cp $ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.* $DEB_BUILD_ROOT
chmod +x $DEB_BUILD_ROOT/*.so.*.*.* chmod +x $DEB_BUILD_ROOT/*.so.*.*.*
strip --strip-all $DEB_BUILD_ROOT/* strip --strip-all $DEB_BUILD_ROOT/*
cp $ATHENA/source/pkg-scripts/new-server $DEB_BUILD_ROOT cp $VIRCADIA/source/pkg-scripts/new-server $DEB_BUILD_ROOT
cp -a $ATHENA/source/domain-server/resources $DEB_BUILD_ROOT cp -a $VIRCADIA/source/domain-server/resources $DEB_BUILD_ROOT
find $DEB_BUILD_ROOT/resources -name ".gitignore" -delete find $DEB_BUILD_ROOT/resources -name ".gitignore" -delete
find $DEB_BUILD_ROOT/resources -type f -executable -exec sh -c 'chmod -x {}' \; find $DEB_BUILD_ROOT/resources -type f -executable -exec sh -c 'chmod -x {}' \;
cp $ATHENA/source/README.md $DEB_BUILD_ROOT cp $VIRCADIA/source/README.md $DEB_BUILD_ROOT
cp $ATHENA/source/README_hifi.md $DEB_BUILD_ROOT cp $VIRCADIA/source/README_hifi.md $DEB_BUILD_ROOT
cp -a $ATHENA/build/assignment-client/plugins $DEB_BUILD_ROOT cp -a $VIRCADIA/build/assignment-client/plugins $DEB_BUILD_ROOT
strip --strip-all $DEB_BUILD_ROOT/plugins/*.so strip --strip-all $DEB_BUILD_ROOT/plugins/*.so
strip --strip-all $DEB_BUILD_ROOT/plugins/*/*.so strip --strip-all $DEB_BUILD_ROOT/plugins/*/*.so
#begin the debian package construction #begin the debian package construction
cd $DEB_BUILD_ROOT cd $DEB_BUILD_ROOT
dh_make -p athena-server_$VERSION-0ubuntu1 -c apache -s --createorig -y dh_make -p vircadia-server_$VERSION-0ubuntu1 -c apache -s --createorig -y
cp $ATHENA/source/pkg-scripts/athena-assignment-client.service debian cp $VIRCADIA/source/pkg-scripts/vircadia-assignment-client.service debian
cp $ATHENA/source/pkg-scripts/athena-assignment-client@.service debian cp $VIRCADIA/source/pkg-scripts/vircadia-assignment-client@.service debian
cp $ATHENA/source/pkg-scripts/athena-domain-server.service debian cp $VIRCADIA/source/pkg-scripts/vircadia-domain-server.service debian
cp $ATHENA/source/pkg-scripts/athena-domain-server@.service debian cp $VIRCADIA/source/pkg-scripts/vircadia-domain-server@.service debian
#cp $ATHENA/source/pkg-scripts/athena-ice-server.service debian #cp $VIRCADIA/source/pkg-scripts/vircadia-ice-server.service debian
#cp $ATHENA/source/pkg-scripts/athena-ice-server@.service debian #cp $VIRCADIA/source/pkg-scripts/vircadia-ice-server@.service debian
cp $ATHENA/source/pkg-scripts/athena-server.target debian cp $VIRCADIA/source/pkg-scripts/vircadia-server.target debian
cp $ATHENA/source/pkg-scripts/athena-server@.target debian cp $VIRCADIA/source/pkg-scripts/vircadia-server@.target debian
cp $ATHENA/source/pkg-scripts/server-control debian/control cp $VIRCADIA/source/pkg-scripts/server-control debian/control
cp $ATHENA/source/pkg-scripts/server-prerm debian/prerm cp $VIRCADIA/source/pkg-scripts/server-prerm debian/prerm
cp $ATHENA/source/pkg-scripts/server-postinst debian/postinst cp $VIRCADIA/source/pkg-scripts/server-postinst debian/postinst
cp $ATHENA/source/LICENSE debian/copyright cp $VIRCADIA/source/pkg-scripts/server-postrm debian/postrm
cp $VIRCADIA/source/LICENSE debian/copyright
echo /etc/opt/athena > debian/dirs echo /etc/opt/vircadia > debian/dirs
echo /var/lib/athena >> debian/dirs echo /var/lib/vircadia >> debian/dirs
echo README.md > debian/docs echo README.md > debian/docs
echo README_hifi.md >> debian/docs echo README_hifi.md >> debian/docs
echo assignment-client opt/athena > debian/install echo assignment-client opt/vircadia > debian/install
echo domain-server opt/athena >> debian/install echo domain-server opt/vircadia >> debian/install
echo oven opt/athena >> debian/install echo oven opt/vircadia >> debian/install
#echo ice-server opt/athena >> debian/install #echo ice-server opt/vircadia >> debian/install
echo new-server opt/athena >> debian/install echo new-server opt/vircadia >> debian/install
for so in *.so.*.*.*; do for so in *.so.*.*.*; do
echo $so opt/athena/lib >> debian/install echo $so opt/vircadia/lib >> debian/install
done done
for so in *.so; do for so in *.so; do
echo $so opt/athena/lib >> debian/install echo $so opt/vircadia/lib >> debian/install
done done
#for service in *.service; do #for service in *.service; do
# echo $service opt/athena/systemd >> debian/install # echo $service opt/vircadia/systemd >> debian/install
#done #done
#for target in *.target; do #for target in *.target; do
# echo $target opt/athena/systemd >> debian/install # echo $target opt/vircadia/systemd >> debian/install
#done #done
find resources -type f -exec sh -c 'echo {} opt/athena/$(dirname "{}") >> debian/install' \; find resources -type f -exec sh -c 'echo {} opt/vircadia/$(dirname "{}") >> debian/install' \;
find plugins -type f -exec sh -c 'echo {} opt/athena/$(dirname "{}") >> debian/install' \; find plugins -type f -exec sh -c 'echo {} opt/vircadia/$(dirname "{}") >> debian/install' \;
#echo usr/lib/systemd/system/athena-assignment-client.service opt/athena/systemd/athena-assignment-client.service > debian/athena-server.links SOFILES=`ls *.so *.so.*.*.* | grep -Po '^(.+\.so(\.\d+)?)' | sed 's/\./\\\./g' | paste -d'|' -s`
#echo usr/lib/systemd/system/athena-assignment-client@.service opt/athena/systemd/athena-assignment-client@.service >> debian/athena-server.links
#echo usr/lib/systemd/system/athena-domain-server.service opt/athena/systemd/athena-domain-server.service >> debian/athena-server.links
#echo usr/lib/systemd/system/athena-domain-server@.service opt/athena/systemd/athena-domain-server@.service >> debian/athena-server.links
##echo usr/lib/systemd/system/athena-ice-server.service opt/athena/systemd/athena-ice-server.service >> debian/athena-server.links
##echo usr/lib/systemd/system/athena-ice-server@.service opt/athena/systemd/athena-ice-server@.service >> debian/athena-server.links
#echo usr/lib/systemd/system/athena-server.target opt/athena/systemd/athena-server.target >> debian/athena-server.links
#echo usr/lib/systemd/system/athena-server@.target opt/athena/systemd/athena-server@.target >> debian/athena-server.links
SOFILES=`ls *.so *.so.*.*.* | sed 's/\./\\\./g' | paste -d'|' -s` DEPENDS=`find * -path debian -prune -o -type f -executable -exec sh -c 'objdump -p {} | grep NEEDED' \; \
| awk '{print $2}' | sort | uniq | egrep -v "^($SOFILES)$" \
| xargs -n 1 -I {} sh -c 'dpkg -S {} | head -n 1' | cut -d ':' -f 1 | sort | uniq | paste -d',' -s`
DEPENDS=`find * -type f -executable -exec sh -c 'objdump -p {} | grep NEEDED' \; | awk '{print $2}' | sort | uniq | egrep -v "^($SOFILES)$" | xargs -n 1 -I {} sh -c 'dpkg -S {} | head -n 1' | cut -d ':' -f 1 | sort | uniq | paste -d',' -s` cp $VIRCADIA/source/pkg-scripts/server-rules debian/rules
sed "s/{DEPENDS}/$DEPENDS/" $VIRCADIA/source/pkg-scripts/server-control > debian/control
cp $ATHENA/source/pkg-scripts/server-rules debian/rules
sed "s/{DEPENDS}/$DEPENDS/" $ATHENA/source/pkg-scripts/server-control > debian/control
dpkg-buildpackage -us -uc dpkg-buildpackage -us -uc

View file

@ -1,53 +1,51 @@
#!/bin/sh #!/bin/sh
if [ "$ATHENA" = "" ]; then if [ "$VIRCADIA" = "" ]; then
ATHENA=`realpath ../..` VIRCADIA=`realpath ../..`
fi fi
GITSRC=`git -C $ATHENA/source config --get remote.origin.url | cut -d':' -f 2` GITSRC=`git -C $VIRCADIA/source config --get remote.origin.url | cut -d':' -f 2`
GITDATE=`git -C $ATHENA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"` GITDATE=`git -C $VIRCADIA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`
GITCOMMIT=`git -C $ATHENA/source rev-parse HEAD | cut -c 1-7` GITCOMMIT=`git -C $VIRCADIA/source rev-parse HEAD | cut -c 1-7`
sudo apt-get install chrpath binutils sudo apt-get install chrpath binutils
DOCK_BUILD_ROOT=temp-make-dock DOCK_BUILD_ROOT=temp-make-dock
rm -r temp-make-dock rm -r temp-make-dock
mkdir -p $DOCK_BUILD_ROOT mkdir -p $DOCK_BUILD_ROOT
cp $ATHENA/source/pkg-scripts/Dockerfile.templ $DOCK_BUILD_ROOT/Dockerfile cp $VIRCADIA/source/pkg-scripts/Dockerfile.templ $DOCK_BUILD_ROOT/Dockerfile
cp $ATHENA/source/pkg-scripts/docker-entrypoint.sh $DOCK_BUILD_ROOT/entrypoint.sh cp $VIRCADIA/source/pkg-scripts/docker-entrypoint.sh $DOCK_BUILD_ROOT/entrypoint.sh
cp $ATHENA/source/pkg-scripts/docker-athena-supervisor.conf $DOCK_BUILD_ROOT/athena.conf cp $VIRCADIA/source/pkg-scripts/docker-vircadia-supervisor.conf $DOCK_BUILD_ROOT/vircadia.conf
# copy the files over # copy the files over
mkdir -p $DOCK_BUILD_ROOT/opt mkdir -p $DOCK_BUILD_ROOT/opt
cp $ATHENA/build/assignment-client/assignment-client $DOCK_BUILD_ROOT/opt cp $VIRCADIA/build/assignment-client/assignment-client $DOCK_BUILD_ROOT/opt
cp $ATHENA/build/domain-server/domain-server $DOCK_BUILD_ROOT/opt cp $VIRCADIA/build/domain-server/domain-server $DOCK_BUILD_ROOT/opt
cp $ATHENA/build/tools/oven/oven $DOCK_BUILD_ROOT/opt cp $VIRCADIA/build/tools/oven/oven $DOCK_BUILD_ROOT/opt
#cp $ATHENA/build/ice-server/ice-server $DOCK_BUILD_ROOT/opt #cp $VIRCADIA/build/ice-server/ice-server $DOCK_BUILD_ROOT/opt
strip --strip-all $DOCK_BUILD_ROOT/opt/* strip --strip-all $DOCK_BUILD_ROOT/opt/*
chrpath -d $DOCK_BUILD_ROOT/opt/* chrpath -d $DOCK_BUILD_ROOT/opt/*
cp -a $ATHENA/build/assignment-client/plugins $DOCK_BUILD_ROOT/opt cp -a $VIRCADIA/build/assignment-client/plugins $DOCK_BUILD_ROOT/opt
strip --strip-all $DOCK_BUILD_ROOT/opt/plugins/*.so strip --strip-all $DOCK_BUILD_ROOT/opt/plugins/*.so
chrpath -d $DOCK_BUILD_ROOT/opt/plugins/*.so chrpath -d $DOCK_BUILD_ROOT/opt/plugins/*.so
strip --strip-all $DOCK_BUILD_ROOT/opt/plugins/*/*.so strip --strip-all $DOCK_BUILD_ROOT/opt/plugins/*/*.so
chrpath -d $DOCK_BUILD_ROOT/opt/plugins/*/*.so chrpath -d $DOCK_BUILD_ROOT/opt/plugins/*/*.so
cp -a $ATHENA/source/domain-server/resources $DOCK_BUILD_ROOT/opt cp -a $VIRCADIA/source/domain-server/resources $DOCK_BUILD_ROOT/opt
find $DOCK_BUILD_ROOT/opt/resources -name ".gitignore" -delete find $DOCK_BUILD_ROOT/opt/resources -name ".gitignore" -delete
find $DOCK_BUILD_ROOT/opt/resources -type f -executable -exec sh -c 'chmod -x {}' \; find $DOCK_BUILD_ROOT/opt/resources -type f -executable -exec sh -c 'chmod -x {}' \;
mkdir -p $DOCK_BUILD_ROOT/lib mkdir -p $DOCK_BUILD_ROOT/lib
cp $ATHENA/build/libraries/*/*.so $DOCK_BUILD_ROOT/lib cp $VIRCADIA/build/libraries/*/*.so $DOCK_BUILD_ROOT/lib
cp $ATHENA/qt5-install/lib/libQt5Network.so.*.*.* $DOCK_BUILD_ROOT/lib cp $VIRCADIA/qt5-install/lib/libQt5Network.so.*.*.* $DOCK_BUILD_ROOT/lib
cp $ATHENA/qt5-install/lib/libQt5Core.so.*.*.* $DOCK_BUILD_ROOT/lib cp $VIRCADIA/qt5-install/lib/libQt5Core.so.*.*.* $DOCK_BUILD_ROOT/lib
cp $ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.* $DOCK_BUILD_ROOT/lib cp $VIRCADIA/qt5-install/lib/libQt5Widgets.so.*.*.* $DOCK_BUILD_ROOT/lib
cp $ATHENA/qt5-install/lib/libQt5Gui.so.*.*.* $DOCK_BUILD_ROOT/lib cp $VIRCADIA/qt5-install/lib/libQt5Gui.so.*.*.* $DOCK_BUILD_ROOT/lib
cp $ATHENA/qt5-install/lib/libQt5Script.so.*.*.* $DOCK_BUILD_ROOT/lib cp $VIRCADIA/qt5-install/lib/libQt5Script.so.*.*.* $DOCK_BUILD_ROOT/lib
cp $ATHENA/qt5-install/lib/libQt5Quick.so.*.*.* $DOCK_BUILD_ROOT/lib cp $VIRCADIA/qt5-install/lib/libQt5WebSockets.so.*.*.* $DOCK_BUILD_ROOT/lib
cp $ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.* $DOCK_BUILD_ROOT/lib cp $VIRCADIA/qt5-install/lib/libQt5Qml.so.*.*.* $DOCK_BUILD_ROOT/lib
cp $ATHENA/qt5-install/lib/libQt5Qml.so.*.*.* $DOCK_BUILD_ROOT/lib cp $VIRCADIA/qt5-install/lib/libQt5ScriptTools.so.*.*.* $DOCK_BUILD_ROOT/lib
cp $ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.* $DOCK_BUILD_ROOT/lib
cp $ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.* $DOCK_BUILD_ROOT/lib
chmod +x $DOCK_BUILD_ROOT/lib/* chmod +x $DOCK_BUILD_ROOT/lib/*
strip --strip-all $DOCK_BUILD_ROOT/lib/* strip --strip-all $DOCK_BUILD_ROOT/lib/*
chrpath -d $DOCK_BUILD_ROOT/lib/* chrpath -d $DOCK_BUILD_ROOT/lib/*
@ -57,4 +55,4 @@ SOFILES=`ls $DOCK_BUILD_ROOT/lib | sed 's/\./\\\./g' | paste -d'|' -s`
DEPENDS=`find $DOCK_BUILD_ROOT/opt $DOCK_BUILD_ROOT/lib -type f -executable -exec sh -c 'objdump -p {} | grep NEEDED' \; | awk '{print $2}' | sort | uniq | egrep -v "^($SOFILES)$" | xargs -n 1 -I {} sh -c 'dpkg -S {} | head -n 1' | cut -d ':' -f 1 | sort | uniq | paste -d' ' -s` DEPENDS=`find $DOCK_BUILD_ROOT/opt $DOCK_BUILD_ROOT/lib -type f -executable -exec sh -c 'objdump -p {} | grep NEEDED' \; | awk '{print $2}' | sort | uniq | egrep -v "^($SOFILES)$" | xargs -n 1 -I {} sh -c 'dpkg -S {} | head -n 1' | cut -d ':' -f 1 | sort | uniq | paste -d' ' -s`
cd $DOCK_BUILD_ROOT cd $DOCK_BUILD_ROOT
docker build -t odysseus654/athena-server --build-arg "DEPENDS=$DEPENDS" --build-arg "GITSRC=$GITSRC" --build-arg "GITDATE=$GITDATE" --build-arg "GITCOMMIT=$GITCOMMIT" . docker build -t odysseus654/vircadia-server --build-arg "DEPENDS=$DEPENDS" --build-arg "GITSRC=$GITSRC" --build-arg "GITDATE=$GITDATE" --build-arg "GITCOMMIT=$GITCOMMIT" .

View file

@ -1,44 +1,42 @@
#!/bin/sh #!/bin/sh
if [ "$ATHENA" = "" ]; then if [ "$VIRCADIA" = "" ]; then
ATHENA=`realpath ../..` VIRCADIA=`realpath ../..`
fi fi
GITDATE=`git -C $ATHENA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"` GITDATE=`git -C $VIRCADIA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`
GITCOMMIT=`git -C $ATHENA/source rev-parse HEAD | cut -c 1-7` GITCOMMIT=`git -C $VIRCADIA/source rev-parse HEAD | cut -c 1-7`
VERSION=0.86.0_K2_${GITDATE}_${GITCOMMIT} VERSION=2020.2.0_ASTERIA_${GITDATE}_${GITCOMMIT}
SOFILES=`ls \ SOFILES=`ls \
$ATHENA/build/libraries/*/*.so \ $VIRCADIA/build/libraries/*/*.so \
$ATHENA/qt5-install/lib/libQt5Network.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Network.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Core.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Core.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Widgets.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Gui.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Gui.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Script.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Script.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Quick.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5WebSockets.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Qml.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Qml.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Quick.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5ScriptTools.so.*.*.* \
$ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.* \
| sed 's/\./\\\./g' \ | sed 's/\./\\\./g' \
| paste -d'|' -s` | paste -d'|' -s`
DEPENDS=mesa-libGL,`ls \ DEPENDS=mesa-libGL,`ls \
$ATHENA/build/assignment-client/assignment-client \ $VIRCADIA/build/assignment-client/assignment-client \
$ATHENA/build/domain-server/domain-server \ $VIRCADIA/build/domain-server/domain-server \
$ATHENA/build/tools/oven/oven \ $VIRCADIA/build/tools/oven/oven \
$ATHENA/build/libraries/*/*.so \ $VIRCADIA/build/libraries/*/*.so \
$ATHENA/qt5-install/lib/libQt5Network.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Network.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Core.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Core.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Widgets.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Gui.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Gui.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Script.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Script.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Quick.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5WebSockets.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Qml.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Qml.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5Quick.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.* \ $VIRCADIA/qt5-install/lib/libQt5ScriptTools.so.*.*.* \
$ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.* \ $VIRCADIA/build/assignment-client/plugins/*.so \
$ATHENA/build/assignment-client/plugins/*.so \ $VIRCADIA/build/assignment-client/plugins/*/*.so \
$ATHENA/build/assignment-client/plugins/*/*.so \
| xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \ | xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \
| awk '{print $2}' \ | awk '{print $2}' \
| sort | uniq \ | sort | uniq \
@ -51,6 +49,6 @@ DEPENDS=mesa-libGL,`ls \
sudo yum install chrpath sudo yum install chrpath
export VERSION DEPENDS ATHENA export VERSION DEPENDS VIRCADIA
rpmbuild --target x86_64 -bb ./athena-server.spec rpmbuild --target x86_64 -bb ./vircadia-server.spec
mv ~/rpmbuild/RPMS/x86_64/*.rpm . mv ~/rpmbuild/RPMS/x86_64/*.rpm .

View file

@ -2,13 +2,13 @@
if [ -z "$1" ] || [ -z "$2" ]; then if [ -z "$1" ] || [ -z "$2" ]; then
echo "new-server {name} {base-port}" echo "new-server {name} {base-port}"
echo echo
echo "Sets up a new athena server with the specified name and base port number" echo "Sets up a new vircadia server with the specified name and base port number"
echo " {name} - a simple name used to identify the server to scripts (not used in the server configuration)" echo " {name} - a simple name used to identify the server to scripts (not used in the server configuration)"
echo " {base-port} - the base port number (default server is 40100). The metaverse port will be {base-port}+2" echo " {base-port} - the base port number (default server is 40100). The metaverse port will be {base-port}+2"
echo " Four contiguous port numbers are allocated, these must not overlap with other running services on this machine" echo " Four contiguous port numbers are allocated, these must not overlap with other running services on this machine"
echo echo
echo "Launching a server created by this script is done with:" echo "Launching a server created by this script is done with:"
echo " sudo systemctl start athena-server@{name}.target" echo " sudo systemctl start vircadia-server@{name}.target"
echo echo
exit 1 exit 1
fi fi
@ -20,30 +20,30 @@ if [ "$(id -u)" -ne 0 ]; then
exit 1 exit 1
fi fi
if [ -d "/var/lib/athena/$1" ]; then if [ -d "/var/lib/vircadia/$1" ]; then
echo "Path /var/lib/athena/$1 already exists" echo "Path /var/lib/vircadia/$1 already exists"
echo echo
echo "Please remove this path first if you wish to recreate this server" echo "Please remove this path first if you wish to recreate this server"
exit 2 exit 2
fi fi
mkdir -p /var/lib/athena/$1/.local/share mkdir -p /var/lib/vircadia/$1/.local/share
ln -s ../.. /var/lib/athena/$1/.local/share/Project\ Athena\ -\ dev ln -s ../.. /var/lib/vircadia/$1/.local/share/Vircadia\ -\ dev
ln -s ../.. /var/lib/athena/$1/.local/share/Project\ Athena ln -s ../.. /var/lib/vircadia/$1/.local/share/Vircadia
mkdir -p /var/lib/athena/$1/domain-server mkdir -p /var/lib/vircadia/$1/domain-server
echo "{\"metaverse\": {\"local_port\": $(($2 + 2))},\"version\": 2.4}" > /var/lib/athena/$1/domain-server/config.json echo "{\"metaverse\": {\"local_port\": $(($2 + 2))},\"version\": 2.4}" > /var/lib/vircadia/$1/domain-server/config.json
chown -R athena.athena /var/lib/athena/$1 chown -R vircadia.vircadia /var/lib/vircadia/$1
echo HIFI_DOMAIN_SERVER_HTTP_PORT=$2 > /etc/opt/athena/$1.conf echo HIFI_DOMAIN_SERVER_HTTP_PORT=$2 > /etc/opt/vircadia/$1.conf
echo HIFI_DOMAIN_SERVER_HTTPS_PORT=$(($2 + 1)) >> /etc/opt/athena/$1.conf echo HIFI_DOMAIN_SERVER_HTTPS_PORT=$(($2 + 1)) >> /etc/opt/vircadia/$1.conf
echo HIFI_DOMAIN_SERVER_PORT=$(($2 + 2)) >> /etc/opt/athena/$1.conf echo HIFI_DOMAIN_SERVER_PORT=$(($2 + 2)) >> /etc/opt/vircadia/$1.conf
echo HIFI_DOMAIN_SERVER_DTLS_PORT=$(($2 + 3)) >> /etc/opt/athena/$1.conf echo HIFI_DOMAIN_SERVER_DTLS_PORT=$(($2 + 3)) >> /etc/opt/vircadia/$1.conf
echo "A new athena server has been created with the name of '$1'" echo "A new vircadia server has been created with the name of '$1'"
echo echo
echo "To launch it:" echo "To launch it:"
echo " sudo systemctl start athena-server@$1.target" echo " sudo systemctl start vircadia-server@$1.target"
echo "To have it launch at system start:" echo "To have it launch at system start:"
echo " sudo systemctl enable athena-server@$1.target" echo " sudo systemctl enable vircadia-server@$1.target"
echo "The server configuration console is available at:" echo "The server configuration console is available at:"
echo " http://localhost:$2" echo " http://localhost:$2"

View file

@ -1,15 +1,15 @@
Source: athena-server Source: vircadia-server
Section: comm Section: comm
Priority: optional Priority: optional
Maintainer: Heather Anderson <heath@odysseus.anderson.name> Maintainer: Heather Anderson <heath@odysseus.anderson.name>
Build-Depends: debhelper (>= 10) Build-Depends: debhelper (>= 10)
Standards-Version: 4.1.2 Standards-Version: 4.1.2
Homepage: https://www.projectathena.dev Homepage: https://vircadia.com
Vcs-Git: https://github.com/kasenvr/project-athena.git Vcs-Git: https://github.com/kasenvr/project-athena.git
Vcs-Browser: https://github.com/kasenvr/project-athena Vcs-Browser: https://github.com/kasenvr/project-athena
Package: athena-server Package: vircadia-server
Architecture: any Architecture: any
Depends: adduser, {DEPENDS} Depends: adduser, {DEPENDS}
Description: Project Athena allows creation and sharing of VR experiences. Description: Vircadia allows creation and sharing of VR experiences.
The Project Athena metaverse provides built-in social features, including avatar interactions, spatialized audio and interactive physics. Additionally, you have the ability to import any 3D object into your virtual environment. The Vircadia metaverse provides built-in social features, including avatar interactions, spatialized audio and interactive physics. Additionally, you have the ability to import any 3D object into your virtual environment.

View file

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# postinst script for athena-server # postinst script for vircadia-server
# #
# see: dh_installdeb(1) # see: dh_installdeb(1)
@ -17,23 +17,55 @@ set -e
# for details, see https://www.debian.org/doc/debian-policy/ or # for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package # the debian-policy package
case "$1" in case "$1" in
configure) configure)
ldconfig -n /opt/athena/lib ldconfig -n /opt/vircadia/lib
adduser --system --quiet --gecos "Project Athena" --home /var/lib/athena --group --no-create-home athena adduser --system --quiet --gecos "Vircadia" --home /var/lib/vircadia --group --no-create-home vircadia
mkdir -p /var/lib/athena mkdir -p /var/lib/vircadia
chown athena:athena /var/lib/athena chown vircadia:vircadia /var/lib/vircadia
chmod 775 /var/lib/athena chmod 775 /var/lib/vircadia
if [ ! -d "/var/lib/athena/default" ]; then if [ ! -d "/var/lib/vircadia/default" ]; then
/opt/athena/new-server default 40100 if [ -d "/var/lib/athena" ]; then
systemctl enable athena-server@default.target ATHENA_ACTIVE=`systemctl list-units \
systemctl start athena-server@default.target | grep -P -o "(athena-assignment-client|athena-domain-server|athena-server)\S+" \
| paste -s -d'|' \
| head -c -1`
ATHENA_ENABLED=`systemctl list-units --state=loaded \
| grep -P -o "(athena-assignment-client|athena-domain-server|athena-server)\S+" \
| xargs -I {} sh -c 'if systemctl is-enabled {} >/dev/null ; then echo {} ; fi' \
| paste -s -d'|' \
| head -c -1`
# shutdown athena servers
echo -n $ATHENA_ACTIVE | xargs -d'|' systemctl stop
# copy the server files over
cp /etc/opt/athena/* /etc/opt/vircadia
cp -R /var/lib/athena/* /var/lib/vircadia
chown -R vircadia:vircadia /var/lib/vircadia/*
find /var/lib/vircadia -maxdepth 3 -path "*\.local/share" -execdir sh -c 'cd share; ln -s ../.. "Vircadia - dev"' ';'
find /var/lib/vircadia -maxdepth 3 -path "*\.local/share" -execdir sh -c 'cd share; ln -s ../.. Vircadia' ';'
VIRCADIA_ACTIVE=`echo -n $ATHENA_ACTIVE | sed 's/athena/vircadia/g'`
VIRCADIA_ENABLED=`echo -n $ATHENA_ENABLED | sed 's/athena/vircadia/g'`
echo -n $ATHENA_ENABLED | xargs -d'|' systemctl disable
echo -n $VIRCADIA_ENABLED | xargs -d'|' systemctl enable
echo -n $VIRCADIA_ACTIVE | xargs -d'|' systemctl start
else
/opt/vircadia/new-server default 40100
systemctl enable vircadia-server@default.target
systemctl start vircadia-server@default.target
fi
else
systemctl list-units \
| grep -P -o "(vircadia-assignment-client|vircadia-domain-server|vircadia-server)\S+" \
| xargs systemctl restart
fi fi
;; ;;
abort-remove|abort-deconfigure) abort-remove|abort-deconfigure)
ldconfig -n /opt/athena/lib ldconfig -n /opt/vircadia/lib
;; ;;
abort-upgrade) abort-upgrade)

41
pkg-scripts/server-postrm Executable file
View file

@ -0,0 +1,41 @@
#!/bin/sh
# postrm script for vircadia-server
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version> <new-version>
# * <postrm> `disappear' <overwriter-package> <overwriter-version>
# * <new-postrm> `abort-install;
# * <new-postrm> `abort-install' <old-version> <new-version>
# * <new-postrm> `abort-upgrade' <old-version> <new-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
purge)
rm -r /etc/opt/vircadia
rm -r /var/lib/vircadia
;;
remove|upgrade|failed-upgrade|disappear|abort-install|abort-upgrade)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View file

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# prerm script for athena-server # prerm script for vircadia-server
# #
# see: dh_installdeb(1) # see: dh_installdeb(1)
@ -19,7 +19,11 @@ set -e
case "$1" in case "$1" in
remove) remove)
find -P /opt/athena/lib -type l -delete systemctl list-units \
| grep -P -o "(vircadia-assignment-client|vircadia-domain-server|vircadia-server)\S+" \
| xargs systemctl stop
find -P /opt/vircadia/lib -type l -delete
;; ;;
upgrade|deconfigure) upgrade|deconfigure)

View file

@ -18,26 +18,26 @@
dh $@ --with=systemd dh $@ --with=systemd
override_dh_systemd_enable: override_dh_systemd_enable:
dh_systemd_enable --no-enable --name athena-assignment-client athena-assignment-client.service dh_systemd_enable --no-enable --name vircadia-assignment-client vircadia-assignment-client.service
dh_systemd_enable --no-enable --name athena-assignment-client@ athena-assignment-client@.service dh_systemd_enable --no-enable --name vircadia-assignment-client@ vircadia-assignment-client@.service
dh_systemd_enable --no-enable --name athena-domain-server athena-domain-server.service dh_systemd_enable --no-enable --name vircadia-domain-server vircadia-domain-server.service
dh_systemd_enable --no-enable --name athena-domain-server@ athena-domain-server@.service dh_systemd_enable --no-enable --name vircadia-domain-server@ vircadia-domain-server@.service
#dh_systemd_enable --no-enable --name athena-ice-server athena-ice-server.service #dh_systemd_enable --no-enable --name vircadia-ice-server vircadia-ice-server.service
#dh_systemd_enable --no-enable --name athena-ice-server@ athena-ice-server@.service #dh_systemd_enable --no-enable --name vircadia-ice-server@ vircadia-ice-server@.service
dh_systemd_enable --no-enable --name athena-server athena-server.target dh_systemd_enable --no-enable --name vircadia-server vircadia-server.target
dh_systemd_enable --no-enable --name athena-server@ athena-server@.target dh_systemd_enable --no-enable --name vircadia-server@ vircadia-server@.target
#dh_systemd_enable --name athena-server@default athena-server@default.target #dh_systemd_enable --name vircadia-server@default vircadia-server@default.target
override_dh_systemd_start: override_dh_systemd_start:
dh_systemd_start --restart-after-upgrade --no-start athena-assignment-client.service dh_systemd_start --restart-after-upgrade --no-start vircadia-assignment-client.service
dh_systemd_start --restart-after-upgrade --no-start athena-assignment-client@.service dh_systemd_start --restart-after-upgrade --no-start vircadia-assignment-client@.service
dh_systemd_start --restart-after-upgrade --no-start athena-domain-server.service dh_systemd_start --restart-after-upgrade --no-start vircadia-domain-server.service
dh_systemd_start --restart-after-upgrade --no-start athena-domain-server@.service dh_systemd_start --restart-after-upgrade --no-start vircadia-domain-server@.service
#dh_systemd_start --restart-after-upgrade --no-start athena-ice-server.service #dh_systemd_start --restart-after-upgrade --no-start vircadia-ice-server.service
#dh_systemd_start --restart-after-upgrade --no-start athena-ice-server@.service #dh_systemd_start --restart-after-upgrade --no-start vircadia-ice-server@.service
dh_systemd_start --restart-after-upgrade --no-start athena-server.target dh_systemd_start --restart-after-upgrade --no-start vircadia-server.target
dh_systemd_start --restart-after-upgrade --no-start athena-server@.target dh_systemd_start --restart-after-upgrade --no-start vircadia-server@.target
#dh_systemd_start --restart-after-upgrade athena-server@default.target #dh_systemd_start --restart-after-upgrade vircadia-server@default.target
override_dh_installinit: override_dh_installinit:
dh_installinit --noscripts dh_installinit --noscripts

View file

@ -0,0 +1,18 @@
[Unit]
Description=Assignment client service for Vircadia server
After=network.target
PartOf=vircadia-server.target
[Service]
Restart=always
WorkingDirectory=/opt/vircadia
Environment="LD_LIBRARY_PATH=/opt/vircadia/lib"
User=vircadia
Group=vircadia
#LimitCORE=infinity
#ExecStart=/opt/vircadia/assignment-client -n 6
ExecStart=/opt/vircadia/assignment-client --min 6 --max 20
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,20 @@
[Unit]
Description=Assignment client service for Vircadia server
After=network.target
PartOf=vircadia-server@%i.target
[Service]
Restart=always
WorkingDirectory=/opt/vircadia
EnvironmentFile=/etc/opt/vircadia/%i.conf
Environment="LD_LIBRARY_PATH=/opt/vircadia/lib" "HOME=/var/lib/vircadia/%i"
PrivateTmp=true
User=vircadia
Group=vircadia
#LimitCORE=infinity
#ExecStart=/opt/vircadia/assignment-client -n 6
ExecStart=/opt/vircadia/assignment-client --min 6 --max 20 --server-port $HIFI_DOMAIN_SERVER_PORT
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,17 @@
[Unit]
Description=Domain Server service for Vircadia
After=network.target
PartOf=vircadia-server.target
[Service]
Restart=on-failure
WorkingDirectory=/opt/vircadia
Environment="LD_LIBRARY_PATH=/opt/vircadia/lib"
User=vircadia
Group=vircadia
#LimitCORE=infinity
ExecStart=/opt/vircadia/domain-server
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,19 @@
[Unit]
Description=Domain Server service for Vircadia
After=network.target
PartOf=vircadia-server@%i.target
[Service]
Restart=on-failure
WorkingDirectory=/opt/vircadia
EnvironmentFile=/etc/opt/vircadia/%i.conf
Environment="LD_LIBRARY_PATH=/opt/vircadia/lib" "HOME=/var/lib/vircadia/%i"
PrivateTmp=true
User=vircadia
Group=vircadia
#LimitCORE=infinity
ExecStart=/opt/vircadia/domain-server
[Install]
WantedBy=multi-user.target

View file

@ -1,18 +1,18 @@
[Unit] [Unit]
Description=Ice Server service for Athena Description=Ice Server service for Vircadia
After=network.target After=network.target
PartOf=athena-server.target PartOf=vircadia-server.target
[Service] [Service]
Restart=on-failure Restart=on-failure
Environment="HIFI_ENVIRONMENT=production" "LD_LIBRARY_PATH=/opt/athena/lib" Environment="HIFI_ENVIRONMENT=production" "LD_LIBRARY_PATH=/opt/vircadia/lib"
WorkingDirectory=/opt/athena WorkingDirectory=/opt/vircadia
User=athena User=vircadia
Group=athena Group=vircadia
#ExecStartPre=/bin/bash -c 'if /usr/bin/pgrep -l ice-server; then /usr/bin/pkill -SIGKILL -f /usr/share/hifi/ice-server/ice-server; fi' #ExecStartPre=/bin/bash -c 'if /usr/bin/pgrep -l ice-server; then /usr/bin/pkill -SIGKILL -f /usr/share/hifi/ice-server/ice-server; fi'
#LimitCORE=infinity #LimitCORE=infinity
ExecStart=/opt/athena/ice-server ExecStart=/opt/vircadia/ice-server
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -1,20 +1,20 @@
[Unit] [Unit]
Description=Ice Server service for Athena Description=Ice Server service for Vircadia
After=network.target After=network.target
PartOf=athena-server@%i.target PartOf=vircadia-server@%i.target
[Service] [Service]
Restart=on-failure Restart=on-failure
EnvironmentFile=/etc/opt/athena/%i.conf EnvironmentFile=/etc/opt/vircadia/%i.conf
Environment="HIFI_ENVIRONMENT=production" "LD_LIBRARY_PATH=/opt/athena/lib" "HOME=/var/lib/athena/%i" Environment="HIFI_ENVIRONMENT=production" "LD_LIBRARY_PATH=/opt/vircadia/lib" "HOME=/var/lib/vircadia/%i"
PrivateTmp=true PrivateTmp=true
WorkingDirectory=/opt/athena WorkingDirectory=/opt/vircadia
User=athena User=vircadia
Group=athena Group=vircadia
#ExecStartPre=/bin/bash -c 'if /usr/bin/pgrep -l ice-server; then /usr/bin/pkill -SIGKILL -f /usr/share/hifi/ice-server/ice-server; fi' #ExecStartPre=/bin/bash -c 'if /usr/bin/pgrep -l ice-server; then /usr/bin/pkill -SIGKILL -f /usr/share/hifi/ice-server/ice-server; fi'
#LimitCORE=infinity #LimitCORE=infinity
ExecStart=/opt/athena/ice-server ExecStart=/opt/vircadia/ice-server
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -0,0 +1,168 @@
#VIRCADIA=~/Vircadia rpmbuild --target x86_64 -bb vircadia-server.spec
%define version %{lua:print(os.getenv("VERSION"))}
%define depends %{lua:print(os.getenv("DEPENDS"))}
Name: vircadia-server
Version: %{version}
Release: 1%{?dist}
Summary: Vircadia metaverse platform, based on the High Fidelity Engine.
License: ASL 2.0
URL: https://vircadia.com
Source0: https://github.com/kasenvr/vircadia-builder/blob/master/vircadia-builder
#BuildRequires: systemd-rpm-macros
BuildRequires: chrpath
Requires: %{depends}
BuildArch: x86_64
AutoReq: no
AutoProv: no
%description
Vircadia allows creation and sharing of VR experiences.
The Vircadia metaverse provides built-in social features, including avatar interactions, spatialized audio and interactive physics. Additionally, you have the ability to import any 3D object into your virtual environment.
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/opt/vircadia
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $VIRCADIA/build/assignment-client/assignment-client
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $VIRCADIA/build/domain-server/domain-server
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $VIRCADIA/build/tools/oven/oven
#install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $VIRCADIA/build/ice-server/ice-server
strip --strip-all $RPM_BUILD_ROOT/opt/vircadia/*
chrpath -d $RPM_BUILD_ROOT/opt/vircadia/*
install -m 0755 -t $RPM_BUILD_ROOT/opt/vircadia $VIRCADIA/source/pkg-scripts/new-server
install -d $RPM_BUILD_ROOT/opt/vircadia/lib
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/build/libraries/*/*.so
strip --strip-all $RPM_BUILD_ROOT/opt/vircadia/lib/*
chrpath -d $RPM_BUILD_ROOT/opt/vircadia/lib/*
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Network.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Core.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Widgets.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Gui.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Script.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5WebSockets.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Qml.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5Quick.so.*.*.*
install -m 0644 -t $RPM_BUILD_ROOT/opt/vircadia/lib $VIRCADIA/qt5-install/lib/libQt5ScriptTools.so.*.*.*
install -d $RPM_BUILD_ROOT/usr/lib/systemd/system
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-assignment-client.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-assignment-client@.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-domain-server.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-domain-server@.service
#install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-ice-server.service
#install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-ice-server@.service
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-server.target
install -m 0644 -t $RPM_BUILD_ROOT/usr/lib/systemd/system $VIRCADIA/source/pkg-scripts/vircadia-server@.target
cp -a $VIRCADIA/source/domain-server/resources $RPM_BUILD_ROOT/opt/vircadia
cp -a $VIRCADIA/build/assignment-client/plugins $RPM_BUILD_ROOT/opt/vircadia
chrpath -d $RPM_BUILD_ROOT/opt/vircadia/plugins/*.so
chrpath -d $RPM_BUILD_ROOT/opt/vircadia/plugins/*/*.so
strip --strip-all $RPM_BUILD_ROOT/opt/vircadia/plugins/*.so
strip --strip-all $RPM_BUILD_ROOT/opt/vircadia/plugins/*/*.so
find $RPM_BUILD_ROOT/opt/vircadia/resources -name ".gitignore" -delete
%files
%license $VIRCADIA/source/LICENSE
/opt/vircadia
/usr/lib/systemd/system
%changelog
%post
# create users
getent passwd vircadia >/dev/null 2>&1 || useradd -r -c "Vircadia" -d /var/lib/vircadia -U -M vircadia
#getent group vircadia >/dev/null 2>&1 || groupadd -r vircadia
# create data folder
mkdir -p /etc/opt/vircadia
mkdir -p /var/lib/vircadia && chown vircadia:vircadia /var/lib/vircadia && chmod 775 /var/lib/vircadia
ldconfig -n /opt/vircadia/lib
%systemd_post vircadia-assignment-client.service
%systemd_post vircadia-assignment-client@.service
%systemd_post vircadia-domain-server.service
%systemd_post vircadia-domain-server@.service
#%systemd_post vircadia-ice-server.service
#%systemd_post vircadia-ice-server@.service
%systemd_post vircadia-server.target
%systemd_post vircadia-server@.target
if [ ! -d "/var/lib/vircadia/default" ]; then
if [ -d "/var/lib/athena" ]; then
ATHENA_ACTIVE=`systemctl list-units \
| grep -P -o "(athena-assignment-client|athena-domain-server|athena-server)\S+" \
| paste -s -d'|' \
| head -c -1`
ATHENA_ENABLED=`systemctl list-units --state=loaded \
| grep -P -o "(athena-assignment-client|athena-domain-server|athena-server)\S+" \
| xargs -I {} sh -c 'if systemctl is-enabled {} >/dev/null ; then echo {} ; fi' \
| paste -s -d'|' \
| head -c -1`
# shutdown athena servers
echo -n $ATHENA_ACTIVE | xargs -d'|' systemctl stop
# copy the server files over
cp /etc/opt/athena/* /etc/opt/vircadia
cp -R /var/lib/athena/* /var/lib/vircadia
chown -R vircadia:vircadia /var/lib/vircadia/*
find /var/lib/vircadia -maxdepth 3 -path "*\.local/share" -execdir sh -c 'cd share; ln -s ../.. "Vircadia - dev"' ';'
find /var/lib/vircadia -maxdepth 3 -path "*\.local/share" -execdir sh -c 'cd share; ln -s ../.. Vircadia' ';'
VIRCADIA_ACTIVE=`echo -n $ATHENA_ACTIVE | sed 's/athena/vircadia/g'`
VIRCADIA_ENABLED=`echo -n $ATHENA_ENABLED | sed 's/athena/vircadia/g'`
echo -n $ATHENA_ENABLED | xargs -d'|' systemctl disable
echo -n $VIRCADIA_ENABLED | xargs -d'|' systemctl enable
echo -n $VIRCADIA_ACTIVE | xargs -d'|' systemctl start
else
/opt/vircadia/new-server default 40100
systemctl enable vircadia-server@default.target
systemctl start vircadia-server@default.target
fi
else
systemctl list-units \
| grep -P -o "(vircadia-assignment-client|vircadia-domain-server|vircadia-server)\S+" \
| xargs systemctl restart
fi
%preun
if [ "$1" -eq 0 ]; then
systemctl list-units \
| grep -P -o "(vircadia-assignment-client|vircadia-domain-server|vircadia-server)\S+" \
| xargs systemctl stop
fi
%systemd_preun vircadia-server.target
%systemd_preun vircadia-server@.target
%systemd_preun vircadia-assignment-client.service
%systemd_preun vircadia-assignment-client@.service
%systemd_preun vircadia-domain-server.service
%systemd_preun vircadia-domain-server@.service
#%systemd_preun vircadia-ice-server.service
#%systemd_preun vircadia-ice-server@.service
%postun
%systemd_postun_with_restart vircadia-server.target
%systemd_postun_with_restart vircadia-server@.target
%systemd_postun_with_restart vircadia-assignment-client.service
%systemd_postun_with_restart vircadia-assignment-client@.service
%systemd_postun_with_restart vircadia-domain-server.service
%systemd_postun_with_restart vircadia-domain-server@.service
#%systemd_postun_with_restart vircadia-ice-server.service
#%systemd_postun_with_restart vircadia-ice-server@.service

View file

@ -0,0 +1,11 @@
[Unit]
Description=Vircadia virtual domain
Wants=vircadia-assignment-client.service
Wants=vircadia-domain-server.service
#Wants=vircadia-ice-server.service
After=vircadia-assignment-client.service
After=vircadia-domain-server.service
#After=vircadia-ice-server.service
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,11 @@
[Unit]
Description=Vircadia virtual domain
Wants=vircadia-assignment-client@%i.service
Wants=vircadia-domain-server@%i.service
#Wants=vircadia-ice-server@%i.service
After=vircadia-assignment-client@%i.service
After=vircadia-domain-server@%i.service
#After=vircadia-ice-server@%i.service
[Install]
WantedBy=multi-user.target

View file

@ -73,6 +73,9 @@
<body onload="retrieveAddressList()"> <body onload="retrieveAddressList()">
<h3>Explore</h3> <h3>Explore</h3>
<button class="myButton" onclick="navigateBack()">< Back</button>
<button class="myButton" onclick="navigateHome()">Home</button>
<button class="myButton" onclick="navigateForward()">Forward ></button>
<input type="text" id="domainAddressInput" placeholder="Type domain address here"> <input type="text" id="domainAddressInput" placeholder="Type domain address here">
@ -85,15 +88,36 @@
<script> <script>
function myDomainAddressInputGoTo() { function myDomainAddressInputGoTo() {
var hifiUrl = document.getElementById("domainAddressInput").value; var vircadiaUrl = document.getElementById("domainAddressInput").value;
if (hifiUrl != "") { if (vircadiaUrl !== "") {
var readyEvent = { var readyEvent = {
"action": "goToUrl", "action": "goToUrl",
"visit": hifiUrl, "visit": vircadiaUrl,
}; };
EventBridge.emitWebEvent(JSON.stringify(readyEvent)); EventBridge.emitWebEvent(JSON.stringify(readyEvent));
} }
} }
function navigateBack() {
var readyEvent = {
"action": "navigateBack"
}
EventBridge.emitWebEvent(JSON.stringify(readyEvent));
}
function navigateHome() {
var readyEvent = {
"action": "navigateHome"
}
EventBridge.emitWebEvent(JSON.stringify(readyEvent));
}
function navigateForward() {
var readyEvent = {
"action": "navigateForward"
}
EventBridge.emitWebEvent(JSON.stringify(readyEvent));
}
function navigateTo(url) { function navigateTo(url) {
var readyEvent = { var readyEvent = {

View file

@ -48,7 +48,7 @@
function onWebEventReceived(event) { function onWebEventReceived(event) {
messageData = JSON.parse(event); messageData = JSON.parse(event);
if (messageData.action == "requestAddressList") { if (messageData.action === "requestAddressList") {
goToAddresses = Settings.getValue("goToDecentral", ""); goToAddresses = Settings.getValue("goToDecentral", "");
for (var i = 0; i < goToAddresses.length; i++) { for (var i = 0; i < goToAddresses.length; i++) {
@ -80,14 +80,27 @@
tablet.emitScriptEvent(JSON.stringify(readyEvent)); tablet.emitScriptEvent(JSON.stringify(readyEvent));
} else if (messageData.action == "goToUrl") { } else if (messageData.action === "goToUrl") {
Window.location = messageData.visit; Window.location = messageData.visit;
} else if (messageData.action == "addLocation") { } else if (messageData.action === "navigateBack") {
location.goBack();
} else if (messageData.action === "navigateHome") {
if (LocationBookmarks.getHomeLocationAddress()) {
location.handleLookupString(LocationBookmarks.getHomeLocationAddress());
} else {
location.goToLocalSandbox();
}
} else if (messageData.action === "navigateForward") {
location.goForward();
} else if (messageData.action === "addLocation") {
var locationBoxUserData = { var locationBoxUserData = {
owner: messageData.owner, owner: messageData.owner,
domainName: messageData.domainName, domainName: messageData.domainName,
port: messageData.Port, port: messageData.Port,
ipAddress: null,
avatarCountRadius: null,
customPath: null,
grabbableKey: { grabbableKey: {
grabbable: false grabbable: false
} }
@ -105,7 +118,7 @@
collisionless: true, collisionless: true,
grabbable: false grabbable: false
}); });
} else if (messageData.action == "retrievePortInformation") { } else if (messageData.action === "retrievePortInformation") {
var readyEvent = { var readyEvent = {
"action": "retrievePortInformationResponse", "action": "retrievePortInformationResponse",
"goToAddresses": goToAddresses "goToAddresses": goToAddresses

View file

@ -23,7 +23,6 @@ var DEFAULT_SCRIPTS_COMBINED = [
"system/pal.js", // "system/mod.js", // older UX, if you prefer "system/pal.js", // "system/mod.js", // older UX, if you prefer
"system/avatarapp.js", "system/avatarapp.js",
"system/makeUserConnection.js", "system/makeUserConnection.js",
"system/tablet-goto.js",
"system/marketplaces/marketplaces.js", "system/marketplaces/marketplaces.js",
"system/notifications.js", "system/notifications.js",
"system/commerce/wallet.js", "system/commerce/wallet.js",
@ -41,7 +40,7 @@ var DEFAULT_SCRIPTS_SEPARATE = [
"system/controllers/controllerScripts.js", "system/controllers/controllerScripts.js",
"communityModules/notificationCore/notificationCore.js", "communityModules/notificationCore/notificationCore.js",
"simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js", "simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js",
{"stable": "system/more/app-more.js", "beta": "https://kasenvr.github.io/community-apps/more/app-more.js"}, {"stable": "system/more/app-more.js", "beta": "https://cdn.vircadia.com/community-apps/more/app-more.js"},
{"stable": "communityScripts/explore/explore.js", "beta": "https://metaverse.vircadia.com/interim/d-goto/app/explore.js"}, {"stable": "communityScripts/explore/explore.js", "beta": "https://metaverse.vircadia.com/interim/d-goto/app/explore.js"},
{"stable": "communityModules/chat/FloofChat.js", "beta": "https://content.fluffy.ws/scripts/chat/FloofChat.js"} {"stable": "communityModules/chat/FloofChat.js", "beta": "https://content.fluffy.ws/scripts/chat/FloofChat.js"}
//"system/chat.js" //"system/chat.js"

View file

@ -123,10 +123,11 @@ function orientationOf(vector) {
} }
function handleRadialMode(dx, dy) { function handleRadialMode(dx, dy) {
var MIN_INSPECT_RADIUS = 0.1;
azimuth += dx / AZIMUTH_RATE; azimuth += dx / AZIMUTH_RATE;
radius += radius * dy * RADIUS_RATE; radius += radius * dy * RADIUS_RATE;
if (radius < 1) { if (radius < MIN_INSPECT_RADIUS) {
radius = 1; radius = MIN_INSPECT_RADIUS;
} }
vector = { vector = {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 199 KiB