* @function Entities.cloneEntity
* @param {Uuid} entityID - The ID of the entity to clone.
- * @returns {Uuid} The ID of the new entity if successfully cloned, otherwise {@link Uuid(0)|Uuid.NULL}.
+ * @returns {Uuid} The ID of the new entity if successfully cloned, otherwise {@link Uuid(0)|Uuid.NONE}.
*/
Q_INVOKABLE QUuid cloneEntity(const QUuid& entityID);
@@ -429,7 +429,7 @@ public slots:
* @function Entities.editEntity
* @param {Uuid} entityID - The ID of the entity to edit.
* @param {Entities.EntityProperties} properties - The new property values.
- * @returns {Uuid} The ID of the entity if the edit was successful, otherwise null or {@link Uuid|Uuid.NULL}.
+ * @returns {Uuid} The ID of the entity if the edit was successful, otherwise null or {@link Uuid|Uuid.NONE}.
* @example
Change the color of an entity.
* var entityID = Entities.addEntity({
* type: "Box",
@@ -1681,7 +1681,7 @@ public slots:
* }
*
* var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 }));
- * var root = createEntity("Root", position, Uuid.NULL);
+ * var root = createEntity("Root", position, Uuid.NONE);
* var child = createEntity("Child", Vec3.sum(position, { x: 0, y: -1, z: 0 }), root);
* var grandChild = createEntity("Grandchild", Vec3.sum(position, { x: 0, y: -2, z: 0 }), child);
*
@@ -1713,7 +1713,7 @@ public slots:
* }
*
* var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 }));
- * var root = createEntity("Root", position, Uuid.NULL);
+ * var root = createEntity("Root", position, Uuid.NONE);
* var child = createEntity("Child", Vec3.sum(position, { x: 0, y: -1, z: 0 }), root);
*
* Script.setTimeout(function () { // Wait for the entity to be created before editing.
@@ -1749,7 +1749,7 @@ public slots:
* }
*
* var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 }));
- * var root = createEntity("Root", position, Uuid.NULL);
+ * var root = createEntity("Root", position, Uuid.NONE);
* var child = createEntity("Child", Vec3.sum(position, { x: 0, y: -1, z: 0 }), root);
* var grandChild = createEntity("Grandchild", Vec3.sum(position, { x: 0, y: -2, z: 0 }), child);
*
@@ -1785,7 +1785,7 @@ public slots:
* Sets the {@link Entities.EntityProperties-Web|Web} entity that has keyboard focus.
* @function Entities.setKeyboardFocusEntity
* @param {Uuid} id - The ID of the {@link Entities.EntityProperties-Web|Web} entity to set keyboard focus to. Use
- * null or {@link Uuid(0)|Uuid.NULL} to unset keyboard focus from an entity.
+ * null or {@link Uuid(0)|Uuid.NONE} to unset keyboard focus from an entity.
*/
Q_INVOKABLE void setKeyboardFocusEntity(const QUuid& id);
@@ -2017,7 +2017,7 @@ public slots:
*
* var position = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 2, z: -5 }));
*
- * var parent = createEntity(position, MyAvatar.orientation, Uuid.NULL);
+ * var parent = createEntity(position, MyAvatar.orientation, Uuid.NONE);
*
* var childTranslation = { x: 0, y: -1.5, z: 0 };
* var childRotation = Quat.fromPitchYawRollDegrees(0, 45, 0);
diff --git a/libraries/entities/src/ZoneEntityItem.cpp.in b/libraries/entities/src/ZoneEntityItem.cpp.in
index e926f678ce..66283ebf45 100644
--- a/libraries/entities/src/ZoneEntityItem.cpp.in
+++ b/libraries/entities/src/ZoneEntityItem.cpp.in
@@ -339,7 +339,7 @@ bool ZoneEntityItem::matchesJSONFilters(const QJsonObject& jsonFilters) const {
// If set match zones of interest to avatar mixer:
if (jsonFilters.contains(AVATAR_PRIORITY_PROPERTY) && jsonFilters[AVATAR_PRIORITY_PROPERTY].toBool()
- && (_avatarPriority != COMPONENT_MODE_INHERIT || _screenshare != COMPONENT_MODE_INHERIT)) {
+ && _avatarPriority != COMPONENT_MODE_INHERIT) {
return true;
}
diff --git a/libraries/networking/src/AddressManager.h b/libraries/networking/src/AddressManager.h
index bbf78157bf..a78f9d7d73 100644
--- a/libraries/networking/src/AddressManager.h
+++ b/libraries/networking/src/AddressManager.h
@@ -49,7 +49,7 @@ const QString GET_PLACE = "/api/v1/places/%1";
* @hifi-avatar
* @hifi-assignment-client
*
- * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NULL} if you're not
+ * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NONE} if you're not
* connected to the domain or are in a serverless domain.
* Read-only.
* @property {string} hostname - The name of the domain for your current directory services address (e.g., "DomainName",
@@ -83,7 +83,7 @@ const QString GET_PLACE = "/api/v1/places/%1";
* @deprecated This API is deprecated and will be removed. Use the {@link location} or {@link Window|Window.location} APIs
* instead.
*
- * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NULL} if you're not
+ * @property {Uuid} domainID - A UUID uniquely identifying the domain you're visiting. Is {@link Uuid(0)|Uuid.NONE} if you're not
* connected to the domain or are in a serverless domain.
* Read-only.
* @property {string} hostname - The name of the domain for your current directory services address (e.g., "DomainName",
@@ -397,7 +397,7 @@ signals:
* Triggered when a request is made to go to a URL or IP address.
* @function location.possibleDomainChangeRequired
* @param {string} domainURL - The URL of the domain.
- * @param {Uuid} domainID - The UUID of the domain to go to. May be {@link Uuid|Uuid.NULL} if not yet known.
+ * @param {Uuid} domainID - The UUID of the domain to go to. May be {@link Uuid|Uuid.NONE} if not yet known.
* @returns {Signal}
*/
// No example because this function isn't typically used in scripts.
diff --git a/libraries/networking/src/udt/PacketHeaders.h b/libraries/networking/src/udt/PacketHeaders.h
index 923913e896..4b1d6fde03 100644
--- a/libraries/networking/src/udt/PacketHeaders.h
+++ b/libraries/networking/src/udt/PacketHeaders.h
@@ -341,7 +341,8 @@ enum class EntityVersion : PacketVersion {
ShadowBiasAndDistance,
TextEntityFonts,
ScriptServerKinematicMotion,
- ScreenshareZone,
+ // This was ScreenshareZone, property was dropped.
+ ScreenshareZoneUnused,
ZoneOcclusion,
ModelBlendshapes,
TransparentWeb,
@@ -362,6 +363,7 @@ enum class EntityVersion : PacketVersion {
ModelLoadPriority,
PropertyCleanup,
TextVerticalAlignment,
+ RemoveScreenshare,
// Add new versions above here
NUM_PACKET_TYPE,
diff --git a/libraries/physics/src/ObjectMotionState.cpp b/libraries/physics/src/ObjectMotionState.cpp
index 5376d296aa..a030b8ec08 100644
--- a/libraries/physics/src/ObjectMotionState.cpp
+++ b/libraries/physics/src/ObjectMotionState.cpp
@@ -23,7 +23,7 @@ const float ACTIVATION_POSITION_DELTA = 0.005f;
const float ACTIVATION_ALIGNMENT_DOT = 0.99990f;
const float ACTIVATION_LINEAR_VELOCITY_DELTA = 0.01f;
const float ACTIVATION_GRAVITY_DELTA = 0.1f;
-const float ACTIVATION_ANGULAR_VELOCITY_DELTA = 0.03f;
+const float ACTIVATION_ANGULAR_VELOCITY_DELTA = 0.0004f;
// origin of physics simulation in world-frame
diff --git a/libraries/render-utils/res/fonts/CourierPrime.arfont b/libraries/render-utils/res/fonts/CourierPrime.arfont
index 3396ccfb86..b79c4a16e3 100644
Binary files a/libraries/render-utils/res/fonts/CourierPrime.arfont and b/libraries/render-utils/res/fonts/CourierPrime.arfont differ
diff --git a/libraries/render-utils/res/fonts/InconsolataMedium.arfont b/libraries/render-utils/res/fonts/InconsolataMedium.arfont
index 0b0e3750fe..e5ca26ebf7 100644
Binary files a/libraries/render-utils/res/fonts/InconsolataMedium.arfont and b/libraries/render-utils/res/fonts/InconsolataMedium.arfont differ
diff --git a/libraries/render-utils/res/fonts/Roboto.arfont b/libraries/render-utils/res/fonts/Roboto.arfont
index b93b738e1a..6122590805 100644
Binary files a/libraries/render-utils/res/fonts/Roboto.arfont and b/libraries/render-utils/res/fonts/Roboto.arfont differ
diff --git a/libraries/render-utils/res/fonts/Timeless.arfont b/libraries/render-utils/res/fonts/Timeless.arfont
index 6d2674deeb..a9232139fe 100644
Binary files a/libraries/render-utils/res/fonts/Timeless.arfont and b/libraries/render-utils/res/fonts/Timeless.arfont differ
diff --git a/libraries/script-engine/src/ScriptManagerScriptingInterface.h b/libraries/script-engine/src/ScriptManagerScriptingInterface.h
index d319cd30ae..9fc23de283 100644
--- a/libraries/script-engine/src/ScriptManagerScriptingInterface.h
+++ b/libraries/script-engine/src/ScriptManagerScriptingInterface.h
@@ -435,7 +435,7 @@ public:
* @param {Uuid} entityID - The ID of the entity running the entity script.
* @param {string} methodName - The name of the method to call.
* @param {string[]} [parameters=[]] - The parameters to call the specified method with.
- * @param {Uuid} [remoteCallerID=Uuid.NULL] - An ID that identifies the caller.
+ * @param {Uuid} [remoteCallerID=Uuid.NONE] - An ID that identifies the caller.
*/
Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName,
const QStringList& params = QStringList(),
@@ -740,7 +740,7 @@ public:
* @returns {Signal}
* @example
Get the ID of the entity that a client entity script is running in.
* var entityScript = function () {
- * this.entityID = Uuid.NULL;
+ * this.entityID = Uuid.NONE;
* };
*
* Script.entityScriptPreloadFinished.connect(function (entityID) {
diff --git a/libraries/script-engine/src/ScriptUUID.h b/libraries/script-engine/src/ScriptUUID.h
index 921c61428b..b32d3b11a1 100644
--- a/libraries/script-engine/src/ScriptUUID.h
+++ b/libraries/script-engine/src/ScriptUUID.h
@@ -41,7 +41,7 @@
/// Provides the Uuid scripting interface
class ScriptUUID : public QObject, protected Scriptable {
Q_OBJECT
- Q_PROPERTY(QString NULL READ NULL_UUID CONSTANT) // String for use in scripts.
+ Q_PROPERTY(QString NONE READ getNullUuid CONSTANT) // String for use in scripts.
public slots:
/*@jsdoc
@@ -100,14 +100,14 @@ public slots:
* Tests whether a UUID is null.
* @function Uuid(0).isNull
* @param {Uuid} id - The UUID to test.
- * @returns {boolean} true if the UUID equals Uuid.NULL or is null, otherwise
+ * @returns {boolean} true if the UUID equals Uuid.NONE or is null, otherwise
* false.
* @example
- Are you sure you'd like to share Content Name?
-
-
- Others will be able to see everything contained within this view.
-
-
-
-
- YES, SHARE THIS CONTENT
-
-
- No, don't share this content
-
-
-
-
-
-
-
diff --git a/screenshare/src/screenshareApp.js b/screenshare/src/screenshareApp.js
deleted file mode 100644
index 6a33b827d4..0000000000
--- a/screenshare/src/screenshareApp.js
+++ /dev/null
@@ -1,312 +0,0 @@
-'use strict';
-// screenshareApp.js
-//
-// Created by Milad Nazeri, Rebecca Stankus, and Zach Fox 2019/11/13
-// Copyright 2019 High Fidelity, Inc.
-//
-// Distributed under the Apache License, Version 2.0.
-// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
-
-const { remote } = require('electron');
-
-// Helpers
-function handleError(error) {
- if (error) {
- console.error(error);
- }
-}
-
-
-// When an application is picked, make sure we clear out the previous pick, toggle the page,
-// and add the correct source
-let currentScreensharePickID = "";
-function screensharePicked(id) {
- currentScreensharePickID = id;
- document.getElementById("share_pick").innerHTML = "";
- togglePage();
- addSource(sourceMap[id], "share_pick");
-}
-
-
-// Once we have confirmed that we want to share, prepare the tokbox publishing initiating
-// and toggle back to the selects page
-function screenConfirmed(isConfirmed) {
- document.getElementById("selects").innerHTML = "";
- if (isConfirmed === true){
- onAccessApproved(currentScreensharePickID);
- }
- togglePage();
-}
-
-
-// Hide/show the select page or the confirmation page
-let currentPage = "mainPage";
-function togglePage(){
- if (currentPage === "mainPage") {
- currentPage = "confirmationPage";
- document.getElementById("select_screen").style.display = "none";
- document.getElementById("subtitle").innerHTML = "Confirm that you'd like to share this content.";
- document.getElementById("confirmation_screen").style.display = "block";
- } else {
- showSources();
- currentPage = "mainPage";
- document.getElementById("select_screen").style.display = "block";
- document.getElementById("subtitle").innerHTML = "Please select the content you'd like to share.";
- document.getElementById("confirmation_screen").style.display = "none";
- }
-}
-
-
-// UI
-
-// Render the html properly and append that to the correct parent
-function addSource(source, type) {
- let renderedHTML = renderSourceHTML(source);
- if (type === "selects") {
- document.getElementById("selects").appendChild(renderedHTML);
- } else {
- document.getElementById("share_pick").appendChild(renderedHTML);
- document.getElementById("content_name").innerHTML = source.name;
- }
-}
-
-
-// Get the html created from the source. Alter slightly depending on whether this source
-// is on the selects screen, or the confirmation screen. Mainly removing highlighting.
-// If there is an app Icon, then add it.
-function renderSourceHTML(source) {
- let type = currentPage === "confirmationPage" ? "share_pick" : "selects";
- let sourceBody = document.createElement('div')
- let thumbnail = source.thumbnail.toDataURL();
- sourceBody.classList.add("box")
- if (type === "share_pick") {
- sourceBody.style.marginLeft = "0px";
- }
-
- let image = "";
- if (source.appIcon) {
- image = ``;
- }
- sourceBody.innerHTML = `
-
- ${image}
- ${source.name}
-
-
-
-
- `
- return sourceBody;
-}
-
-
-// Separate out the screenshares and applications
-// Make sure the screens are labeled in order
-// Concact the two arrays back together and return
-function sortSources() {
- let screenSources = [];
- let applicationSources = [];
- // Difference with Mac selects:
- // 1 screen = "Enitre Screen", more than one like PC "Screen 1, Screen 2..."
- screenshareSourceArray.forEach((source) => {
- if (source.name.match(/(entire )?screen( )?([0-9]?)/i)) {
- screenSources.push(source);
- } else {
- applicationSources.push(source)
- }
- });
- screenSources.sort((a, b) => {
- let aNumber = a.name.replace(/[^\d]/, "");
- let bNumber = b.name.replace(/[^\d]/, "");
- return aNumber - bNumber;
- });
- let finalSources = [...screenSources, ...applicationSources];
- return finalSources;
-}
-
-
-// Setup sorting the selection array, add individual sources, and update the sourceMap
-function addSources() {
- screenshareSourceArray = sortSources();
- for (let i = 0; i < screenshareSourceArray.length; i++) {
- addSource(screenshareSourceArray[i], "selects");
- sourceMap[screenshareSourceArray[i].id] = screenshareSourceArray[i];
- }
-}
-
-
-// 1. Get the screens and window that are available from electron
-// 2. Remove the screenshare app itself
-// 3. Create a source map to help grab the correct source when picked
-// 4. push all the sources for sorting to the source array
-// 5. Add thse sources
-const electron = require('electron');
-const SCREENSHARE_TITLE = "Screen share";
-const SCREENSHARE_TITLE_REGEX = new RegExp("^" + SCREENSHARE_TITLE + "$");
-const IMAGE_WIDTH = 265;
-const IMAGE_HEIGHT = 165;
-let screenshareSourceArray = [];
-let sourceMap = {};
-function showSources() {
- screenshareSourceArray = [];
- electron.desktopCapturer.getSources({
- types:['window', 'screen'],
- thumbnailSize: {
- width: IMAGE_WIDTH,
- height: IMAGE_HEIGHT
- },
- fetchWindowIcons: true
- }, (error, sources) => {
- if (error) {
- console.log("Error getting sources", error);
- }
- for (let source of sources) {
- if (source.name.match(SCREENSHARE_TITLE_REGEX)){
- continue;
- }
- sourceMap[source.id] = source;
- screenshareSourceArray.push(source);
- }
- addSources();
- });
-}
-
-
-// Stop the localstream and end the tokrok publishing
-let localStream;
-let desktopSharing;
-function stopSharing() {
- desktopSharing = false;
-
- if (localStream) {
- localStream.getTracks()[0].stop();
- localStream = null;
- }
-
- document.getElementById('screenshare').style.display = "none";
- stopTokBoxPublisher();
-}
-
-
-// Callback to start publishing after we have setup the chromium stream
-function gotStream(stream) {
- if (localStream) {
- stopSharing();
- }
-
- localStream = stream;
- startTokboxPublisher(localStream);
-
- stream.onended = () => {
- if (desktopSharing) {
- togglePage();
- }
- };
-}
-
-
-// After we grant access to electron, create a stream and using the callback
-// start the tokbox publisher
-function onAccessApproved(desktop_id) {
- if (!desktop_id) {
- console.log('Desktop Capture access rejected.');
- return;
- }
-
-
-
- document.getElementById('screenshare').style.visibility = "block";
- desktopSharing = true;
- navigator.webkitGetUserMedia({
- audio: false,
- video: {
- mandatory: {
- chromeMediaSource: 'desktop',
- chromeMediaSourceId: desktop_id,
- maxWidth: 1280,
- maxHeight: 720,
- maxFrameRate: 7
- }
- }
- }, gotStream, handleError);
- remote.getCurrentWindow().minimize();
-}
-
-
-// Tokbox
-
-// Once we have the connection info, this will create the session which will allow
-// us to publish a stream when we are ready
-function initializeTokboxSession() {
- session = OT.initSession(projectAPIKey, sessionID);
- session.on('sessionDisconnected', (event) => {
- console.log('You were disconnected from the session.', event.reason);
- });
-
- // Connect to the session
- session.connect(token, (error) => {
- if (error) {
- handleError(error);
- }
- });
-}
-
-
-// Init the tokbox publisher with our newly created stream
-var publisher;
-function startTokboxPublisher(stream) {
- publisher = document.createElement("div");
- var publisherOptions = {
- audioFallbackEnabled: false,
- audioSource: null,
- fitMode: 'contain',
- frameRate: 7,
- height: 720,
- insertMode: 'append',
- publishAudio: false,
- videoSource: stream.getVideoTracks()[0],
- width: 1280
- };
-
- publisher = OT.initPublisher(publisher, publisherOptions, function(error){
- if (error) {
- console.log("ERROR: " + error);
- } else {
- session.publish(publisher, function(error) {
- if (error) {
- console.log("ERROR FROM Session.publish: " + error);
- return;
- }
- })
- }
- });
-}
-
-
-// Kills the streaming being sent to tokbox
-function stopTokBoxPublisher() {
- publisher.destroy();
-}
-
-
-// When the app is ready, we get this info from the command line arguments.
-const ipcRenderer = electron.ipcRenderer;
-let projectAPIKey;
-let sessionID;
-let token;
-let session;
-ipcRenderer.on('connectionInfo', function(event, message) {
- const connectionInfo = JSON.parse(message);
- projectAPIKey = connectionInfo.projectAPIKey;
- sessionID = connectionInfo.sessionID;
- token = connectionInfo.token;
-
- initializeTokboxSession();
-});
-
-
-// Show the initial sources after the dom has loaded
-// Sources come from electron.desktopCapturer
-document.addEventListener("DOMContentLoaded", () => {
- showSources();
-});
diff --git a/screenshare/src/screenshareMainProcess.js b/screenshare/src/screenshareMainProcess.js
deleted file mode 100644
index 5dce65a783..0000000000
--- a/screenshare/src/screenshareMainProcess.js
+++ /dev/null
@@ -1,74 +0,0 @@
-'use strict';
-// screenshareMainProcess.js
-//
-// Milad Nazeri and Zach Fox 2019/11/13
-// Copyright 2019 High Fidelity, Inc.
-//
-// Distributed under the Apache License, Version 2.0.
-// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
-
-const {app, BrowserWindow, ipcMain} = require('electron');
-const gotTheLock = app.requestSingleInstanceLock()
-const argv = require('yargs').argv;
-
-
-const connectionInfo = {
- token: argv.token || "token",
- projectAPIKey: argv.projectAPIKey || "projectAPIKey",
- sessionID: argv.sessionID || "sessionID"
-}
-
-
-// Mac and PC need slightly different width and height sizes.
-const osType = require('os').type();
-let width;
-let height;
-if (osType == "Darwin" || osType == "Linux") {
- width = 960;
- height = 660;
-} else if (osType == "Windows_NT") {
- width = 973;
- height = 740;
-}
-
-
-if (!gotTheLock) {
- console.log("Another instance of the screenshare is already running - this instance will quit.");
- app.exit(0);
- return;
-}
-
-let window;
-const zoomFactor = 1.0;
-function createWindow(){
- window = new BrowserWindow({
- backgroundColor: "#000000",
- width: width,
- height: height,
- center: true,
- frame: true,
- useContentSize: true,
- zoomFactor: zoomFactor,
- resizable: false,
- webPreferences: {
- nodeIntegration: true
- },
- icon: __dirname + `/resources/interface.png`,
- skipTaskbar: false,
- title: "Screen share"
- });
- window.loadURL('file://' + __dirname + '/screenshareApp.html');
- window.setMenu(null);
-
- window.webContents.on("did-finish-load", () => {
- window.webContents.send('connectionInfo', JSON.stringify(connectionInfo));
- });
-}
-
-
-// This method will be called when Electron has finished
-// initialization and is ready to create browser windows.
-app.on('ready', function() {
- createWindow();
- window.webContents.send('connectionInfo', JSON.stringify(connectionInfo))
-});
diff --git a/screenshare/src/styles.css b/screenshare/src/styles.css
deleted file mode 100644
index 7a6d20447d..0000000000
--- a/screenshare/src/styles.css
+++ /dev/null
@@ -1,217 +0,0 @@
-body {
- background-color: black;
- box-sizing: border-box;
- font-family: "FiraSans";
- margin: 0px 22px 10px 22px;
- }
-
-#confirmation_screen {
- width: 100%;
- display: flex;
- text-align: center;
- justify-content: center;
- align-items: center;
-}
-
-#confirmation_text {
- margin-top: 65px;
- font-size: 25px;
- line-height: 25px;
-}
-
-#confirmation_text p {
- margin: 0px;
-}
-
-#button_selection {
- margin-top: 25px;
- width: 100%;
- display: flex;
- text-align: center;
- justify-content: center;
- align-items: center;
- flex-direction: column;
-}
-
-.button_confirmation {
- margin: 4px;
- cursor: pointer;
- width: 300px;
- height: 32px;
- line-height: 32px;
- text-align: center;
- vertical-align: middle;
- color: white
-}
-
-.grey_background {
- background-color: #191919;
-}
-
-#no {
- color: rgba(1, 152, 203,0.7);
-}
-
-#no:hover {
- color: rgba(1, 152, 203,1);
-}
-
-#yes {
- outline: solid white 2px;
-}
-
-#yes:hover {
- background: #0198CB;
-}
-
-yes:hover + #yes_background {
- display: block;
-}
-
-#share_pick {
- margin-top: 60px;
-}
-
-.text_title {
- color: white;
-}
-
-@font-face {
- font-family: "FiraSans";
- src: url("./resources/FiraSans-Regular.ttf");
-}
-
-#title {
- margin-top: 21px;
-}
-
-h1 {
- line-height: 48px;
- font-size: 48px;
- margin: 0px;
-}
-
-h3 {
- line-height: 24px;
- font-size: 24px;
- margin: 9px 0px 0px 0px;
-}
-
-#publisher {
- visibility: hidden;
- width: 0px;
- height: 0px;
- bottom: 10px;
- left: 10px;
- z-index: 100;
- border: 3px solid white;
- border-radius: 3px;
-}
-
-#selects {
- margin-right: 19px;
- padding-left: 3px;
-}
-
-.screen_label {
- max-width: 220px;
- font-size: 25px;
- line-height: 25px;
- color: white;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.icon {
- display: inline-block;
- background: #000000;
- width: 20px;
- height: 20px;
- margin-right: 15px;
-}
-
-.box {
- height: 165px;
- width: 265px;
- display: inline-block;
- margin-left: 35px;
- margin-top: 60px;
- cursor: pointer;
-}
-
-.box:nth-child(1) {
- margin-top: 0 !important;
-}
-
-.box:nth-child(2) {
- margin-top: 0 !important;
-}
-
-.box:nth-child(3) {
- margin-top: 0 !important;
-}
-
-.box:nth-child(3n) {
- margin-right: 0 !important;
-}
-
-.box:nth-child(3n+1) {
- margin-left: 0 !important;
-}
-
-.heading {
- height: 35px;
- display: flex;
- align-items: center;
-}
-
-.image {
- width: 265px;
- height: 165px;
- max-height: 165px;
- max-width: 265px;
- margin: 0px;
-}
-
-.image:hover {
- outline: solid white 3px;
-}
-
-.image_no_hover {
- width: 265px;
- height: 165px;
- max-height: 165px;
- max-width: 265px;
-}
-
-img {
- width: 265px;
- height: 165px;
- margin: 0px;
-}
-
-.scrollbar {
- float: right;
- height: 500px;
- width: 100%;
- overflow-y: scroll;
- margin-top: 40px;
-}
-
-#style-1::-webkit-scrollbar {
- width: 9px;
- overflow: scroll;
- overflow-x: hidden;
-}
-
-#style-1::-webkit-scrollbar-thumb {
- background-color: #0198CB;
- width: 9px;
-}
-
-#style-1::-webkit-scrollbar-track {
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
- background-color: #848484;
- width: 9px;
-}
diff --git a/scripts/developer/utilities/render/materialInspector.js b/scripts/developer/utilities/render/materialInspector.js
index 8a7d5ad7dd..d20f20f304 100644
--- a/scripts/developer/utilities/render/materialInspector.js
+++ b/scripts/developer/utilities/render/materialInspector.js
@@ -139,7 +139,7 @@ function setSelectedObject(id, type) {
function setWindow(window) {
if (activeWindow !== undefined) {
- setSelectedObject(Uuid.NULL, "");
+ setSelectedObject(Uuid.NONE, "");
// activeWindow.closed.disconnect(killWindow);
activeWindow.fromQml.disconnect(fromQml);
Controller.mousePressEvent.disconnect(mousePressEvent);
diff --git a/scripts/system/attachedEntitiesManager.js b/scripts/system/attachedEntitiesManager.js
index 061e27f595..4af97a41fe 100644
--- a/scripts/system/attachedEntitiesManager.js
+++ b/scripts/system/attachedEntitiesManager.js
@@ -115,7 +115,7 @@ function AttachedEntitiesManager() {
var allowedJoints = getEntityCustomData('wearable', grabbedEntity, DEFAULT_WEARABLE_DATA).joints;
var props = Entities.getEntityProperties(grabbedEntity, ["position", "parentID", "parentJointIndex"]);
- if (props.parentID === Uuid.NULL || props.parentID === MyAvatar.sessionUUID) {
+ if (props.parentID === Uuid.NONE || props.parentID === MyAvatar.sessionUUID) {
var bestJointName = "";
var bestJointIndex = -1;
var bestJointDistance = 0;
@@ -167,7 +167,7 @@ function AttachedEntitiesManager() {
if (updatePresets) {
this.updateRelativeOffsets(newEntity);
}
- } else if (props.parentID != Uuid.NULL) {
+ } else if (props.parentID != Uuid.NONE) {
// drop the entity and set it to have no parent (not on the avatar), unless it's being equipped in a hand.
if (props.parentID === MyAvatar.sessionUUID &&
(props.parentJointIndex == MyAvatar.getJointIndex("RightHand") ||
@@ -175,7 +175,7 @@ function AttachedEntitiesManager() {
// this is equipped on a hand -- don't clear the parent.
} else {
var wearProps = Entities.getEntityProperties(grabbedEntity);
- wearProps.parentID = Uuid.NULL;
+ wearProps.parentID = Uuid.NONE;
wearProps.parentJointIndex = -1;
delete wearProps.id;
delete wearProps.created;
diff --git a/scripts/system/controllers/controllerModules/equipEntity.js b/scripts/system/controllers/controllerModules/equipEntity.js
index 4b24ef17b0..06bde716c8 100644
--- a/scripts/system/controllers/controllerModules/equipEntity.js
+++ b/scripts/system/controllers/controllerModules/equipEntity.js
@@ -340,7 +340,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa
var props = controllerData.nearbyEntityPropertiesByID[hotspot.entityID];
var hasParent = true;
- if (props.parentID === Uuid.NULL) {
+ if (props.parentID === Uuid.NONE) {
hasParent = false;
}
@@ -561,7 +561,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa
this.storeAttachPointInSettings();
Entities.editEntity(this.targetEntityID, {
- parentID: Uuid.NULL,
+ parentID: Uuid.NONE,
parentJointIndex: -1
});
diff --git a/scripts/system/controllers/controllerModules/farActionGrabEntity.js b/scripts/system/controllers/controllerModules/farActionGrabEntity.js
index 4fabcae04d..585b2d5a61 100644
--- a/scripts/system/controllers/controllerModules/farActionGrabEntity.js
+++ b/scripts/system/controllers/controllerModules/farActionGrabEntity.js
@@ -168,7 +168,7 @@ Script.include("/~/system/libraries/controllers.js");
tag: "far-grab-" + MyAvatar.sessionUUID,
ttl: ACTION_TTL
});
- if (this.actionID === Uuid.NULL) {
+ if (this.actionID === Uuid.NONE) {
this.actionID = null;
}
diff --git a/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js b/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js
index cb071c2dbd..a7a273f719 100644
--- a/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js
+++ b/scripts/system/controllers/controllerModules/nearParentGrabOverlay.js
@@ -134,9 +134,9 @@ Script.include("/~/system/libraries/utils.js");
this.endNearParentingGrabOverlay = function () {
var previousParentID = this.previousParentID[this.grabbedThingID];
- if ((previousParentID === Uuid.NULL || previousParentID === null) && !this.robbed) {
+ if ((previousParentID === Uuid.NONE || previousParentID === null) && !this.robbed) {
Entities.editEntity(this.grabbedThingID, {
- parentID: Uuid.NULL,
+ parentID: Uuid.NONE,
parentJointIndex: -1
});
} else if (!this.robbed){
diff --git a/scripts/system/controllers/controllerModules/stylusInput.js b/scripts/system/controllers/controllerModules/stylusInput.js
index 15048bca00..3b58657ad3 100644
--- a/scripts/system/controllers/controllerModules/stylusInput.js
+++ b/scripts/system/controllers/controllerModules/stylusInput.js
@@ -108,7 +108,7 @@ Script.include("/~/system/libraries/controllers.js");
}
// add the tabletScreen, if it is valid
- if (HMD.tabletScreenID && HMD.tabletScreenID !== Uuid.NULL &&
+ if (HMD.tabletScreenID && HMD.tabletScreenID !== Uuid.NONE &&
Entities.getEntityProperties(HMD.tabletScreenID, ["visible"]).visible) {
stylusTarget = getOverlayDistance(controllerPosition, HMD.tabletScreenID);
if (stylusTarget) {
@@ -117,7 +117,7 @@ Script.include("/~/system/libraries/controllers.js");
}
// add the tablet home button.
- if (HMD.homeButtonID && HMD.homeButtonID !== Uuid.NULL &&
+ if (HMD.homeButtonID && HMD.homeButtonID !== Uuid.NONE &&
Entities.getEntityProperties(HMD.homeButtonID, ["visible"]).visible) {
stylusTarget = getOverlayDistance(controllerPosition, HMD.homeButtonID);
if (stylusTarget) {
diff --git a/scripts/system/controllers/controllerModules/teleport.js b/scripts/system/controllers/controllerModules/teleport.js
index be45d3b70e..8e1458360d 100644
--- a/scripts/system/controllers/controllerModules/teleport.js
+++ b/scripts/system/controllers/controllerModules/teleport.js
@@ -513,7 +513,7 @@ Script.include("/~/system/libraries/controllers.js");
if (Vec3.distance(targetXZPosition, avatarXZPosition) < MIN_PARENTING_DISTANCE) {
// Set play area position and rotation in world coordinates with no parenting.
Overlays.editOverlay(_this.playAreaOverlay, {
- parentID: Uuid.NULL,
+ parentID: Uuid.NONE,
position: Vec3.sum(position,
Vec3.multiplyQbyV(sensorToWorldRotation,
Vec3.multiply(MyAvatar.sensorToWorldScale,
diff --git a/scripts/system/create/assets/data/createAppTooltips.json b/scripts/system/create/assets/data/createAppTooltips.json
index fcbad7b320..7c197e45df 100644
--- a/scripts/system/create/assets/data/createAppTooltips.json
+++ b/scripts/system/create/assets/data/createAppTooltips.json
@@ -228,9 +228,6 @@
"avatarPriority": {
"tooltip": "Alter Avatars' update priorities."
},
- "screenshare": {
- "tooltip": "Enable screen-sharing within this zone"
- },
"modelURL": {
"tooltip": "A mesh model from an FBX or OBJ file."
},
@@ -573,6 +570,39 @@
"grab.grabbable": {
"tooltip": "If enabled, this entity will allow grabbing input and will be movable."
},
+ "grab.grabFollowsController": {
+ "tooltip": "If enabled, grabbed entities will follow the movements of your hand controller instead of your avatar's hand."
+ },
+ "grab.grabKinematic": {
+ "tooltip": "If enabled, this grabbed entity will be updated in a kinematic manner. If disabled, it will be grabbed using a tractor action. A kinematic grab will make the item appear more tightly held but will cause it to behave poorly when interacting with dynamic entities."
+ },
+ "grab.grabDelegateToParent": {
+ "tooltip": "If enabled, when the entity is grabbed, the grab will be transferred to its parent entity if there is one. If disabled, the grab won't be transferred, so a child entity can be grabbed and moved relative to its parent."
+ },
+ "grab.equippable": {
+ "tooltip": "If enabled, this entity can be attached to the hands/controllers in a simple click. (Note: Entities can't be equipped if 'ignorePickIntersection' is set to true.)"
+ },
+ "grab.equippableLeftPosition": {
+ "tooltip": "When equipped on an avatar, this defines the 'position' of the entity relative to the 'left' hand."
+ },
+ "grab.equippableLeftRotation": {
+ "tooltip": "When equipped on an avatar, this defines the 'rotation' of the entity relative to the 'left' hand."
+ },
+ "grab.equippableRightPosition": {
+ "tooltip": "When equipped on an avatar, this defines the 'position' of the entity relative to the 'right' hand."
+ },
+ "grab.equippableRightRotation": {
+ "tooltip": "When equipped on an avatar, this defines the 'rotation' of the entity relative to the 'right' hand."
+ },
+ "grab.equippableIndicatorURL": {
+ "tooltip": "If a model URL is specified, this model will be used to indicate that an entity is equippable."
+ },
+ "grab.equippableIndicatorScale": {
+ "tooltip": "If an 'Indicator URL' is specified, this controls the scale factors for each dimension of the displayed indicator."
+ },
+ "grab.equippableIndicatorOffset": {
+ "tooltip": "If an 'Indicator URL' is specified, this controls the relative offset of the displayed indicator from the equippable entity."
+ },
"grab.triggerable": {
"tooltip": "If enabled, the collider on this entity is used for triggering events."
},
@@ -597,9 +627,6 @@
"cloneAvatarEntity": {
"tooltip": "If enabled, then clones created from this entity will be created as avatar entities."
},
- "grab.grabFollowsController": {
- "tooltip": "If enabled, grabbed entities will follow the movements of your hand controller instead of your avatar's hand."
- },
"canCastShadow": {
"tooltip": "If enabled, the geometry of this entity casts shadows when a shadow-casting light source shines on it. Note: Shadows are rendered only on high-profiled computers. This setting will have no effect on computers profiled to medium or low graphics."
},
diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js
index 12e8629134..82cab1c76c 100644
--- a/scripts/system/create/edit.js
+++ b/scripts/system/create/edit.js
@@ -106,7 +106,7 @@
} else if (properties.type === "Zone") {
return { imageURL: ZONE_URL };
} else if (properties.type === "Material") {
- if (properties.parentID !== Uuid.NULL && properties.name !== "MATERIAL_" + entityShapeVisualizerSessionName) {
+ if (properties.parentID !== Uuid.NONE && properties.name !== "MATERIAL_" + entityShapeVisualizerSessionName) {
return { imageURL: MATERIAL_URL };
} else {
return { imageURL: "" };
@@ -417,8 +417,7 @@
},
shapeType: "box",
bloomMode: "inherit",
- avatarPriority: "inherit",
- screenshare: "inherit",
+ avatarPriority: "inherit"
},
Model: {
collisionShape: "none",
@@ -1858,7 +1857,7 @@
}
selectedEntities.forEach(function (id, index) {
var parentId = Entities.getEntityProperties(id, ["parentID"]).parentID;
- if (parentId !== null && parentId.length > 0 && parentId !== Uuid.NULL) {
+ if (parentId !== null && parentId.length > 0 && parentId !== Uuid.NONE) {
parentCheck = true;
}
Entities.editEntity(id, {parentID: null});
@@ -2890,7 +2889,7 @@
} else if (data.type === "materialTargetRequest") {
var parentModelData;
var properties = Entities.getEntityProperties(data.entityID, ["type", "parentID"]);
- if (properties.type === "Material" && properties.parentID !== Uuid.NULL) {
+ if (properties.type === "Material" && properties.parentID !== Uuid.NONE) {
var parentType = Entities.getEntityProperties(properties.parentID, ["type"]).type;
if (parentType === "Model" || Entities.getNestableType(properties.parentID) === "avatar") {
parentModelData = Graphics.getModel(properties.parentID);
@@ -3313,7 +3312,7 @@
var state = "NONE";
var properties = Entities.getEntityProperties(id, ["parentID"]);
var children = createApp.getDomainOnlyChildrenIDs(id);
- if (properties.parentID !== Uuid.NULL) {
+ if (properties.parentID !== Uuid.NONE) {
if (children.length > 0) {
state = "PARENT_CHILDREN";
} else {
diff --git a/scripts/system/create/entityProperties/html/js/entityProperties.js b/scripts/system/create/entityProperties/html/js/entityProperties.js
index 8eab673e31..408a3771cc 100644
--- a/scripts/system/create/entityProperties/html/js/entityProperties.js
+++ b/scripts/system/create/entityProperties/html/js/entityProperties.js
@@ -760,12 +760,6 @@ const GROUPS = [
type: "dropdown",
options: { inherit: "Inherit", crowd: "Crowd", hero: "Hero" },
propertyID: "avatarPriority",
- },
- {
- label: "Screen-share",
- type: "dropdown",
- options: { inherit: "Inherit", disabled: "Off", enabled: "On" },
- propertyID: "screenshare",
}
]
},
@@ -1819,11 +1813,6 @@ const GROUPS = [
id: "behavior",
label: "BEHAVIOR",
properties: [
- {
- label: "Grabbable",
- type: "bool",
- propertyID: "grab.grabbable",
- },
{
label: "Cloneable",
type: "bool",
@@ -1856,16 +1845,6 @@ const GROUPS = [
propertyID: "cloneAvatarEntity",
showPropertyRule: { "cloneable": "true" },
},
- {
- label: "Triggerable",
- type: "bool",
- propertyID: "grab.triggerable",
- },
- {
- label: "Follow Controller",
- type: "bool",
- propertyID: "grab.grabFollowsController",
- },
{
label: "Cast Shadows",
type: "bool",
@@ -1890,6 +1869,118 @@ const GROUPS = [
}
]
},
+ {
+ id: "grabAndEquip",
+ label: "GRAB AND EQUIP",
+ properties: [
+ {
+ label: "Grabbable",
+ type: "bool",
+ propertyID: "grab.grabbable",
+ },
+ {
+ label: "Follow Controller",
+ type: "bool",
+ propertyID: "grab.grabFollowsController",
+ showPropertyRule: { "grab.grabbable": "true" },
+ },
+ {
+ label: "Kinematic Grab",
+ type: "bool",
+ propertyID: "grab.grabKinematic",
+ showPropertyRule: { "grab.grabbable": "true" },
+ },
+ {
+ label: "Delegate To Parent",
+ type: "bool",
+ propertyID: "grab.grabDelegateToParent",
+ showPropertyRule: { "grab.grabbable": "true" },
+ },
+ {
+ label: "Triggerable",
+ type: "bool",
+ propertyID: "grab.triggerable",
+ },
+ {
+ label: "Equippable",
+ type: "bool",
+ propertyID: "grab.equippable",
+ },
+ {
+ label: "Left Position",
+ type: "vec3",
+ vec3Type: "xyz",
+ subLabels: [ "x", "y", "z" ],
+ step: 0.0025,
+ decimals: 4,
+ unit: "m",
+ propertyID: "grab.equippableLeftPosition",
+ showPropertyRule: { "grab.equippable": "true" },
+ },
+ {
+ label: "Left Rotation",
+ type: "vec3",
+ vec3Type: "pyr",
+ step: 0.1,
+ decimals: 4,
+ subLabels: [ "x", "y", "z" ],
+ unit: "deg",
+ propertyID: "grab.equippableLeftRotation",
+ showPropertyRule: { "grab.equippable": "true" },
+ },
+ {
+ label: "Right Position",
+ type: "vec3",
+ vec3Type: "xyz",
+ subLabels: [ "x", "y", "z" ],
+ step: 0.0025,
+ decimals: 4,
+ unit: "m",
+ propertyID: "grab.equippableRightPosition",
+ showPropertyRule: { "grab.equippable": "true" },
+ },
+ {
+ label: "Right Rotation",
+ type: "vec3",
+ vec3Type: "pyr",
+ step: 0.1,
+ decimals: 4,
+ subLabels: [ "x", "y", "z" ],
+ unit: "deg",
+ propertyID: "grab.equippableRightRotation",
+ showPropertyRule: { "grab.equippable": "true" },
+ },
+ {
+ label: "Indicator Model URL",
+ type: "string",
+ propertyID: "grab.equippableIndicatorURL",
+ placeholder: "URL",
+ showPropertyRule: { "grab.equippable": "true" },
+ },
+ {
+ label: "Indicator Scale",
+ type: "vec3",
+ vec3Type: "xyz",
+ subLabels: [ "x", "y", "z" ],
+ step: 0.0025,
+ decimals: 4,
+ unit: "scale",
+ propertyID: "grab.equippableIndicatorScale",
+ showPropertyRule: { "grab.equippable": "true" },
+ },
+ {
+ label: "Indicator Offset",
+ type: "vec3",
+ vec3Type: "xyz",
+ subLabels: [ "x", "y", "z" ],
+ step: 0.005,
+ decimals: 4,
+ unit: "m",
+ propertyID: "grab.equippableIndicatorOffset",
+ showPropertyRule: { "grab.equippable": "true" },
+ },
+ ]
+ },
{
id: "scripts",
label: "SCRIPTS",
@@ -2068,25 +2159,25 @@ const GROUPS = [
];
const GROUPS_PER_TYPE = {
- None: [ 'base', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
- Shape: [ 'base', 'shape', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
- Text: [ 'base', 'text', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
+ None: [ 'base', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
+ Shape: [ 'base', 'shape', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
+ Text: [ 'base', 'text', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
Zone: [ 'base', 'zone', 'zone_key_light', 'zone_skybox', 'zone_ambient_light', 'zone_haze',
'zone_bloom', 'zone_tonemapping', 'zone_ambient_occlusion', 'zone_avatar_priority',
- 'zone_audio', 'spatial', 'behavior', 'scripts', 'physics' ],
- Model: [ 'base', 'model', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
- Image: [ 'base', 'image', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
- Web: [ 'base', 'web', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
- Light: [ 'base', 'light', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
- Material: [ 'base', 'material', 'spatial', 'behavior', 'scripts', 'physics' ],
+ 'zone_audio', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'physics' ],
+ Model: [ 'base', 'model', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
+ Image: [ 'base', 'image', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
+ Web: [ 'base', 'web', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
+ Light: [ 'base', 'light', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
+ Material: [ 'base', 'material', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'physics' ],
ParticleEffect: [ 'base', 'particles', 'particles_emit', 'particles_size', 'particles_color',
- 'particles_behavior', 'particles_constraints', 'spatial', 'behavior', 'scripts', 'physics' ],
- ProceduralParticleEffect: [ 'base', 'particles_procedural', 'spatial', 'behavior', 'scripts', 'physics' ],
- PolyLine: [ 'base', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
- PolyVox: [ 'base', 'polyvox', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
- Grid: [ 'base', 'grid', 'spatial', 'behavior', 'scripts', 'physics' ],
- Sound: [ 'base', 'sound', 'spatial', 'behavior', 'scripts', 'physics' ],
- Multiple: [ 'base', 'spatial', 'behavior', 'scripts', 'collision', 'physics' ],
+ 'particles_behavior', 'particles_constraints', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'physics' ],
+ ProceduralParticleEffect: [ 'base', 'particles_procedural', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'physics' ],
+ PolyLine: [ 'base', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
+ PolyVox: [ 'base', 'polyvox', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
+ Grid: [ 'base', 'grid', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'physics' ],
+ Sound: [ 'base', 'sound', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'physics' ],
+ Multiple: [ 'base', 'spatial', 'behavior', 'grabAndEquip', 'scripts', 'collision', 'physics' ],
};
const EDITOR_TIMEOUT_DURATION = 1500;
diff --git a/scripts/system/create/entityProperties/html/tabs/grabAndEquip.png b/scripts/system/create/entityProperties/html/tabs/grabAndEquip.png
new file mode 100644
index 0000000000..2cd1c75f23
Binary files /dev/null and b/scripts/system/create/entityProperties/html/tabs/grabAndEquip.png differ
diff --git a/scripts/system/create/entitySelectionTool/entitySelectionTool.js b/scripts/system/create/entitySelectionTool/entitySelectionTool.js
index 574f91eba7..42a4f0f247 100644
--- a/scripts/system/create/entitySelectionTool/entitySelectionTool.js
+++ b/scripts/system/create/entitySelectionTool/entitySelectionTool.js
@@ -428,7 +428,7 @@ SelectionManager = (function() {
entityID: newEntityID,
properties: properties
});
- if (properties.parentID !== Uuid.NULL) {
+ if (properties.parentID !== Uuid.NONE) {
duplicatedChildrenWithOldParents[newEntityID] = properties.parentID;
}
originalEntityToNewEntityID[originalEntityID] = newEntityID;
@@ -480,7 +480,7 @@ SelectionManager = (function() {
entityID: newEntityID,
properties: properties
});
- if (properties.parentID !== Uuid.NULL) {
+ if (properties.parentID !== Uuid.NONE) {
createdChildrenWithOldParents[newEntityID] = properties.parentID;
}
originalEntityToNewEntityID[properties.id] = newEntityID;
@@ -755,7 +755,7 @@ SelectionManager = (function() {
that.selections = [];
for (var i = 0; i < currentSelection.length; i++) {
var properties = Entities.getEntityProperties(currentSelection[i], ['parentID']);
- if (properties.parentID !== Uuid.NULL) {
+ if (properties.parentID !== Uuid.NONE) {
that.selections.push(properties.parentID);
}
}
@@ -772,7 +772,7 @@ SelectionManager = (function() {
that.selections = [];
for (var i = 0; i < currentSelection.length; i++) {
var topParentId = getTopParent(currentSelection[i]);
- if (topParentId !== Uuid.NULL) {
+ if (topParentId !== Uuid.NONE) {
that.selections.push(topParentId);
}
}
@@ -784,9 +784,9 @@ SelectionManager = (function() {
};
function getTopParent(id) {
- var topParentId = Uuid.NULL;
+ var topParentId = Uuid.NONE;
var properties = Entities.getEntityProperties(id, ['parentID']);
- if (properties.parentID === Uuid.NULL) {
+ if (properties.parentID === Uuid.NONE) {
topParentId = id;
} else {
topParentId = getTopParent(properties.parentID);
@@ -1567,7 +1567,7 @@ SelectionDisplay = (function() {
} else if (toolEntity === handleTranslateZCylinder) {
return handleTranslateZCone;
}
- return Uuid.NULL;
+ return Uuid.NONE;
};
that.updateHighlight = function(event) {
diff --git a/scripts/system/libraries/controllerDispatcherUtils.js b/scripts/system/libraries/controllerDispatcherUtils.js
index f331c147e0..705991d97d 100644
--- a/scripts/system/libraries/controllerDispatcherUtils.js
+++ b/scripts/system/libraries/controllerDispatcherUtils.js
@@ -317,7 +317,7 @@ var isAnothersAvatarEntity = function (iaaeProps) {
};
var isAnothersChildEntity = function (iaceProps) {
- while (iaceProps.parentID && iaceProps.parentID !== Uuid.NULL) {
+ while (iaceProps.parentID && iaceProps.parentID !== Uuid.NONE) {
if (Entities.getNestableType(iaceProps.parentID) == "avatar") {
if (iaceProps.parentID == MyAvatar.SELF_ID || iaceProps.parentID == MyAvatar.sessionUUID) {
return false; // not another's, it's mine.
@@ -452,7 +452,7 @@ var ensureDynamic = function (entityID) {
// if we distance hold something and keep it very still before releasing it, it ends up
// non-dynamic in bullet. If it's too still, give it a little bounce so it will fall.
var edProps = Entities.getEntityProperties(entityID, ["velocity", "dynamic", "parentID"]);
- if (edProps.dynamic && edProps.parentID === Uuid.NULL) {
+ if (edProps.dynamic && edProps.parentID === Uuid.NONE) {
var velocity = edProps.velocity;
if (Vec3.length(velocity) < 0.05) { // see EntityMotionState.cpp DYNAMIC_LINEAR_VELOCITY_THRESHOLD
velocity = { x: 0.0, y: 0.2, z: 0.0 };
@@ -464,7 +464,7 @@ var ensureDynamic = function (entityID) {
var findGrabbableGroupParent = function (controllerData, targetProps) {
while (targetProps.grab.grabDelegateToParent &&
targetProps.parentID &&
- targetProps.parentID !== Uuid.NULL &&
+ targetProps.parentID !== Uuid.NONE &&
Entities.getNestableType(targetProps.parentID) == "entity") {
var parentProps = Entities.getEntityProperties(targetProps.parentID, DISPATCHER_PROPERTIES);
if (!parentProps) {
@@ -484,7 +484,7 @@ var findGrabbableGroupParent = function (controllerData, targetProps) {
var getEntityParents = function(targetProps) {
var parentProperties = [];
while (targetProps.parentID &&
- targetProps.parentID !== Uuid.NULL &&
+ targetProps.parentID !== Uuid.NONE &&
Entities.getNestableType(targetProps.parentID) == "entity") {
var parentProps = Entities.getEntityProperties(targetProps.parentID, DISPATCHER_PROPERTIES);
if (!parentProps) {
diff --git a/scripts/system/libraries/touchEventUtils.js b/scripts/system/libraries/touchEventUtils.js
index bdee5cf5dc..e9ab4f3770 100644
--- a/scripts/system/libraries/touchEventUtils.js
+++ b/scripts/system/libraries/touchEventUtils.js
@@ -13,21 +13,21 @@
var controllerDispatcher = Script.require("/~/system/libraries/controllerDispatcherUtils.js");
function touchTargetHasKeyboardFocus(touchTarget) {
- if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) {
+ if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) {
return Entities.keyboardFocusEntity === touchTarget.entityID;
- } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) {
+ } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) {
return Overlays.keyboardFocusOverlay === touchTarget.overlayID;
}
}
function setKeyboardFocusOnTouchTarget(touchTarget) {
- if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL &&
+ if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE &&
Entities.wantsHandControllerPointerEvents(touchTarget.entityID)) {
- Overlays.keyboardFocusOverlay = Uuid.NULL;
+ Overlays.keyboardFocusOverlay = Uuid.NONE;
Entities.keyboardFocusEntity = touchTarget.entityID;
- } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) {
+ } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) {
Overlays.keyboardFocusOverlay = touchTarget.overlayID;
- Entities.keyboardFocusEntity = Uuid.NULL;
+ Entities.keyboardFocusEntity = Uuid.NONE;
}
}
@@ -42,9 +42,9 @@ function sendHoverEnterEventToTouchTarget(hand, touchTarget) {
button: "None"
};
- if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) {
+ if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) {
Entities.sendHoverEnterEntity(touchTarget.entityID, pointerEvent);
- } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) {
+ } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) {
Overlays.sendHoverEnterOverlay(touchTarget.overlayID, pointerEvent);
}
}
@@ -60,10 +60,10 @@ function sendHoverOverEventToTouchTarget(hand, touchTarget) {
button: "None"
};
- if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) {
+ if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) {
Entities.sendMouseMoveOnEntity(touchTarget.entityID, pointerEvent);
Entities.sendHoverOverEntity(touchTarget.entityID, pointerEvent);
- } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) {
+ } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) {
Overlays.sendMouseMoveOnOverlay(touchTarget.overlayID, pointerEvent);
Overlays.sendHoverOverOverlay(touchTarget.overlayID, pointerEvent);
}
@@ -81,10 +81,10 @@ function sendTouchStartEventToTouchTarget(hand, touchTarget) {
isPrimaryHeld: true
};
- if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) {
+ if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) {
Entities.sendMousePressOnEntity(touchTarget.entityID, pointerEvent);
Entities.sendClickDownOnEntity(touchTarget.entityID, pointerEvent);
- } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) {
+ } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) {
Overlays.sendMousePressOnOverlay(touchTarget.overlayID, pointerEvent);
}
}
@@ -100,11 +100,11 @@ function sendTouchEndEventToTouchTarget(hand, touchTarget) {
button: "Primary"
};
- if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) {
+ if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) {
Entities.sendMouseReleaseOnEntity(touchTarget.entityID, pointerEvent);
Entities.sendClickReleaseOnEntity(touchTarget.entityID, pointerEvent);
Entities.sendHoverLeaveEntity(touchTarget.entityID, pointerEvent);
- } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) {
+ } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) {
Overlays.sendMouseReleaseOnOverlay(touchTarget.overlayID, pointerEvent);
}
}
@@ -121,10 +121,10 @@ function sendTouchMoveEventToTouchTarget(hand, touchTarget) {
isPrimaryHeld: true
};
- if (touchTarget.entityID && touchTarget.entityID !== Uuid.NULL) {
+ if (touchTarget.entityID && touchTarget.entityID !== Uuid.NONE) {
Entities.sendMouseMoveOnEntity(touchTarget.entityID, pointerEvent);
Entities.sendHoldingClickOnEntity(touchTarget.entityID, pointerEvent);
- } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NULL) {
+ } else if (touchTarget.overlayID && touchTarget.overlayID !== Uuid.NONE) {
Overlays.sendMouseMoveOnOverlay(touchTarget.overlayID, pointerEvent);
}
}
diff --git a/scripts/system/miniTablet.js b/scripts/system/miniTablet.js
index acd0d96e9b..f75cbe2346 100644
--- a/scripts/system/miniTablet.js
+++ b/scripts/system/miniTablet.js
@@ -442,7 +442,7 @@
function release() {
Entities.editEntity(miniOverlay, {
- "parentID": Uuid.NULL, // Release hold so that hand can grab tablet proper.
+ "parentID": Uuid.NONE, // Release hold so that hand can grab tablet proper.
"grab": {
"grabbable": false
}
diff --git a/scripts/system/nameTag.js b/scripts/system/nameTag.js
index 147da25779..e09f19f90b 100644
--- a/scripts/system/nameTag.js
+++ b/scripts/system/nameTag.js
@@ -23,7 +23,7 @@ const SIZE_Y = 0.075;
const LETTER_OFFSET = 0.03; // arbitrary value to dynamically change width, could be more accurate by detecting characters
const LINE_HEIGHT = 0.05;
-var nameTagEntityID = Uuid.NULL;
+var nameTagEntityID = Uuid.NONE;
var lastCheckForEntity = 0;
// create the name tag entity after a brief delay
@@ -61,9 +61,9 @@ function updateNameTag() {
};
function deleteNameTag() {
- if(nameTagEntityID !== Uuid.NULL) {
+ if(nameTagEntityID !== Uuid.NONE) {
Entities.deleteEntity(nameTagEntityID);
- nameTagEntityID = Uuid.NULL;
+ nameTagEntityID = Uuid.NONE;
}
}
@@ -84,7 +84,7 @@ function cleanup() {
Script.update.connect(update);
function update() {
// if no entity we return
- if(nameTagEntityID == Uuid.NULL) {
+ if(nameTagEntityID == Uuid.NONE) {
return;
}
diff --git a/scripts/system/notifications.js b/scripts/system/notifications.js
index fec9fb2341..2f6bca6878 100644
--- a/scripts/system/notifications.js
+++ b/scripts/system/notifications.js
@@ -47,7 +47,7 @@
var HMD_UI_SCALE_FACTOR = 1.0; //This define the size of all the notification system in HMD.
var hmdPanelLocalPosition = {"x": 0.3, "y": 0.25, "z": -1.5};
var hmdPanelLocalRotation = Quat.fromVec3Degrees({"x": 0, "y": -3, "z": 0});
- var mainHMDnotificationContainerID = Uuid.NULL;
+ var mainHMDnotificationContainerID = Uuid.NONE;
var CAMERA_MATRIX_INDEX = -7;
//HMD LOCAL ENTITY PROPERTIES
@@ -128,7 +128,7 @@
"unlit": true,
"renderLayer": "hud"
};
- if (notifications[i].entityID === Uuid.NULL){
+ if (notifications[i].entityID === Uuid.NONE){
properties.text = notifications[i].dataText;
notifications[i].entityID = Entities.addEntity(properties, "local");
} else {
@@ -149,7 +149,7 @@
"alpha": alpha,
"renderLayer": "hud"
};
- if (notifications[i].imageEntityID === Uuid.NULL){
+ if (notifications[i].imageEntityID === Uuid.NONE){
properties.imageURL = notifications[i].dataImage.path;
notifications[i].imageEntityID = Entities.addEntity(properties, "local");
} else {
@@ -174,7 +174,7 @@
"leftMargin": overlayLeftMargin,
"font": {"size": overlayFontSize}
};
- if (notifications[i].overlayID === Uuid.NULL){
+ if (notifications[i].overlayID === Uuid.NONE){
properties.text = notifications[i].dataText;
notifications[i].overlayID = Overlays.addOverlay("text", properties);
} else {
@@ -192,7 +192,7 @@
"visible": true,
"alpha": alpha
};
- if (notifications[i].imageOverlayID === Uuid.NULL){
+ if (notifications[i].imageOverlayID === Uuid.NONE){
properties.imageURL = notifications[i].dataImage.path;
notifications[i].imageOverlayID = Overlays.addOverlay("image", properties);
} else {
@@ -214,26 +214,26 @@
}
function deleteSpecificNotification(indexNotification) {
- if (notifications[indexNotification].entityID !== Uuid.NULL){
+ if (notifications[indexNotification].entityID !== Uuid.NONE){
Entities.deleteEntity(notifications[indexNotification].entityID);
- notifications[indexNotification].entityID = Uuid.NULL;
+ notifications[indexNotification].entityID = Uuid.NONE;
}
- if (notifications[indexNotification].overlayID !== Uuid.NULL){
+ if (notifications[indexNotification].overlayID !== Uuid.NONE){
Overlays.deleteOverlay(notifications[indexNotification].overlayID);
- notifications[indexNotification].overlayID = Uuid.NULL;
+ notifications[indexNotification].overlayID = Uuid.NONE;
}
- if (notifications[indexNotification].imageEntityID !== Uuid.NULL){
+ if (notifications[indexNotification].imageEntityID !== Uuid.NONE){
Entities.deleteEntity(notifications[indexNotification].imageEntityID);
- notifications[indexNotification].imageEntityID = Uuid.NULL;
+ notifications[indexNotification].imageEntityID = Uuid.NONE;
}
- if (notifications[indexNotification].imageOverlayID !== Uuid.NULL){
+ if (notifications[indexNotification].imageOverlayID !== Uuid.NONE){
Overlays.deleteOverlay(notifications[indexNotification].imageOverlayID);
- notifications[indexNotification].imageOverlayID = Uuid.NULL;
+ notifications[indexNotification].imageOverlayID = Uuid.NONE;
}
}
function createMainHMDnotificationContainer() {
- if (mainHMDnotificationContainerID === Uuid.NULL) {
+ if (mainHMDnotificationContainerID === Uuid.NONE) {
var properties = {
"type": "Shape",
"shape": "Cube",
@@ -249,9 +249,9 @@
}
function deleteMainHMDnotificationContainer() {
- if (mainHMDnotificationContainerID !== Uuid.NULL) {
+ if (mainHMDnotificationContainerID !== Uuid.NONE) {
Entities.deleteEntity(mainHMDnotificationContainerID);
- mainHMDnotificationContainerID = Uuid.NULL;
+ mainHMDnotificationContainerID = Uuid.NONE;
}
}
//UTILITY FUNCTIONS
@@ -288,10 +288,10 @@
"dataText": dataText,
"dataImage": dataImage,
"timestamp": d.getTime(),
- "entityID": Uuid.NULL,
- "imageEntityID": Uuid.NULL,
- "overlayID": Uuid.NULL,
- "imageOverlayID": Uuid.NULL
+ "entityID": Uuid.NONE,
+ "imageEntityID": Uuid.NONE,
+ "overlayID": Uuid.NONE,
+ "imageOverlayID": Uuid.NONE
};
notifications.push(notification);
newEventDetected = true;
diff --git a/scripts/system/places/places.html b/scripts/system/places/places.html
index 980d8f0f1f..fda67f4066 100644
--- a/scripts/system/places/places.html
+++ b/scripts/system/places/places.html
@@ -150,7 +150,11 @@
if (message.channel === channel && message.action === "CURRENT_LOCATION") {
currentLocation = message.data;
displayCurrentLocation();
- }
+ }
+ if (message.channel === channel && message.action === "MATURITY_FILTER") {
+ maturityFilter = message.filter;
+ displayMaturityFilter();
+ }
});
var goSignal = {
@@ -600,8 +604,16 @@
maturityFilter = arrayRemove(maturityFilter, targeted);
}
loadRecordsUpTo = NUMBER_OF_RECORDS_PER_LOAD;
+
+ var messageSent = {
+ "channel": channel,
+ "action": "SET_MATURITY_FILTER",
+ "filter": maturityFilter
+ };
+ EventBridge.emitWebEvent(JSON.stringify(messageSent));
+
displayMaturityFilter();
- generateContent();
+ generateContent();
}
function filterSearchField(targeted) {
diff --git a/scripts/system/places/places.js b/scripts/system/places/places.js
index b9cd49bb1f..fa22d536b7 100644
--- a/scripts/system/places/places.js
+++ b/scripts/system/places/places.js
@@ -19,6 +19,8 @@
var metaverseServers = [];
var SETTING_METAVERSE_TO_FETCH = "placesAppMetaverseToFetch";
var SETTING_PINNED_METAVERSE = "placesAppPinnedMetaverse";
+ var SETTING_MATURITY_FILTER = "placesAppMaturityFilter";
+ var DEFAULT_MATURITY = ["adult", "mature", "teen", "everyone", "unrated"];
var REQUEST_TIMEOUT = 10000; //10 seconds
var httpRequest = null;
@@ -78,8 +80,8 @@
if (messageObj.action === "READY_FOR_CONTENT" && (n - timestamp) > INTERCALL_DELAY) {
d = new Date();
timestamp = d.getTime();
+ sendPersistedMaturityFilter();
transmitPortalList();
-
sendCurrentLocationToUI();
} else if (messageObj.action === "TELEPORT" && (n - timestamp) > INTERCALL_DELAY) {
@@ -88,17 +90,23 @@
if (messageObj.address.length > 0) {
Window.location = messageObj.address;
- }
+ }
} else if (messageObj.action === "GO_HOME" && (n - timestamp) > INTERCALL_DELAY) {
+ d = new Date();
+ timestamp = d.getTime();
if (LocationBookmarks.getHomeLocationAddress()) {
location.handleLookupString(LocationBookmarks.getHomeLocationAddress());
} else {
Window.location = "file:///~/serverless/tutorial.json";
}
} else if (messageObj.action === "GO_BACK" && (n - timestamp) > INTERCALL_DELAY) {
+ d = new Date();
+ timestamp = d.getTime();
location.goBack();
} else if (messageObj.action === "GO_FORWARD" && (n - timestamp) > INTERCALL_DELAY) {
+ d = new Date();
+ timestamp = d.getTime();
location.goForward();
} else if (messageObj.action === "PIN_META" && (n - timestamp) > INTERCALL_DELAY) {
d = new Date();
@@ -122,6 +130,10 @@
}
metaverseServers.push(newMs);
savePinnedMetaverseSetting();
+ } else if (messageObj.action === "SET_MATURITY_FILTER" && (n - timestamp) > INTERCALL_DELAY) {
+ d = new Date();
+ timestamp = d.getTime();
+ Settings.setValue(SETTING_MATURITY_FILTER, messageObj.filter);
}
}
}
@@ -224,6 +236,15 @@
};
+ function sendPersistedMaturityFilter() {
+ var messageSent = {
+ "channel": channel,
+ "action": "MATURITY_FILTER",
+ "filter": Settings.getValue(SETTING_MATURITY_FILTER, DEFAULT_MATURITY)
+ };
+ tablet.emitScriptEvent(messageSent);
+ }
+
function getFederationData() {
/*
//If federation.json is got from the Metaverse Server (not implemented yet)