mirror of
https://github.com/overte-org/overte.git
synced 2025-04-05 21:12:25 +02:00
Merge pull request #1168 from overte-org/fix/unequip
Fix Uuid.NULL behavior
This commit is contained in:
commit
1576351bc2
24 changed files with 114 additions and 114 deletions
|
@ -298,9 +298,9 @@ public:
|
|||
* Audio is recorded to snapshots directory specified in settings.
|
||||
* @function Audio.startRecording
|
||||
* @returns {Uuid} A valid <code>Uuid</code> if the specified file could be opened and audio recording has started, otherwise
|
||||
* <code>Uuid.NULL</code>.
|
||||
* <code>Uuid.NONE</code>.
|
||||
* @example <caption>Make a 10 second audio recording.</caption>
|
||||
* if (Audio.startRecording() !== Uuid.NULL) {
|
||||
* if (Audio.startRecording() !== Uuid.NONE) {
|
||||
* Script.setTimeout(function () {
|
||||
* Audio.stopRecording();
|
||||
* print("Audio recording finished.");
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
*
|
||||
* @property {Uuid} keyboardFocusOverlay - The <code>{@link Overlays.OverlayProperties-Web3D|"web3d"}</code> overlay
|
||||
* ({@link Entities.EntityProperties-Web|Web} entity) that has keyboard focus. If no overlay (entity) has keyboard focus,
|
||||
* returns <code>null</code>; set to <code>null</code> or {@link Uuid(0)|Uuid.NULL} to clear keyboard focus.
|
||||
* returns <code>null</code>; set to <code>null</code> or {@link Uuid(0)|Uuid.NONE} to clear keyboard focus.
|
||||
*/
|
||||
|
||||
class Overlays : public QObject {
|
||||
|
@ -125,7 +125,7 @@ public slots:
|
|||
* @function Overlays.addOverlay
|
||||
* @param {Overlays.OverlayType} type - The type of the overlay to add.
|
||||
* @param {Overlays.OverlayProperties} properties - The properties of the overlay to add.
|
||||
* @returns {Uuid} The ID of the newly created overlay if successful, otherwise {@link Uuid(0)|Uuid.NULL}.
|
||||
* @returns {Uuid} The ID of the newly created overlay if successful, otherwise {@link Uuid(0)|Uuid.NONE}.
|
||||
* @example <caption>Add a cube overlay in front of your avatar.</caption>
|
||||
* var overlay = Overlays.addOverlay("cube", {
|
||||
* position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -3 })),
|
||||
|
@ -141,7 +141,7 @@ public slots:
|
|||
* <p>Note: For cloning behavior of 3D overlays and entities, see {@link Entities.cloneEntity}.</p>
|
||||
* @function Overlays.cloneOverlay
|
||||
* @param {Uuid} id - The ID of the overlay (or entity) to clone.
|
||||
* @returns {Uuid} The ID of the new overlay (or entity) if successful, otherwise {@link Uuid(0)|Uuid.NULL}.
|
||||
* @returns {Uuid} The ID of the new overlay (or entity) if successful, otherwise {@link Uuid(0)|Uuid.NONE}.
|
||||
*/
|
||||
QUuid cloneOverlay(const QUuid& id);
|
||||
|
||||
|
@ -535,7 +535,7 @@ public slots:
|
|||
* @function Overlays.setKeyboardFocusOverlay
|
||||
* @param {Uuid} id - The ID of the <code>{@link Overlays.OverlayProperties-Web3D|"web3d"}</code> overlay
|
||||
* ({@link Entities.EntityProperties-Web|Web} entity) to set keyboard focus to. Use <code>null</code> or
|
||||
* {@link Uuid(0)|Uuid.NULL} to unset keyboard focus from an overlay (entity).
|
||||
* {@link Uuid(0)|Uuid.NONE} to unset keyboard focus from an overlay (entity).
|
||||
*/
|
||||
void setKeyboardFocusOverlay(const QUuid& id) { DependencyManager::get<EntityScriptingInterface>()->setKeyboardFocusEntity(id); }
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ public:
|
|||
/*@jsdoc
|
||||
* Gets the ID of the entity or avatar that the avatar is parented to.
|
||||
* @function MyAvatar.getParentID
|
||||
* @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NULL} if not parented.
|
||||
* @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NONE} if not parented.
|
||||
*/
|
||||
// This calls through to the SpatiallyNestable versions, but is here to expose these to JavaScript.
|
||||
Q_INVOKABLE virtual const QUuid getParentID() const override { return SpatiallyNestable::getParentID(); }
|
||||
|
@ -452,7 +452,7 @@ public:
|
|||
* Sets the ID of the entity or avatar that the avatar is parented to.
|
||||
* @function MyAvatar.setParentID
|
||||
* @param {Uuid} parentID - The ID of the entity or avatar that the avatar should be parented to. Set to
|
||||
* {@link Uuid(0)|Uuid.NULL} to unparent.
|
||||
* {@link Uuid(0)|Uuid.NONE} to unparent.
|
||||
*/
|
||||
// This calls through to the SpatiallyNestable versions, but is here to expose these to JavaScript.
|
||||
Q_INVOKABLE virtual void setParentID(const QUuid& parentID) override;
|
||||
|
|
|
@ -153,7 +153,7 @@ public slots:
|
|||
/*@jsdoc
|
||||
* Gets the ID of the entity or avatar that the avatar is parented to.
|
||||
* @function ScriptAvatar.getParentID
|
||||
* @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NULL} if not parented
|
||||
* @returns {Uuid} The ID of the entity or avatar that the avatar is parented to. {@link Uuid(0)|Uuid.NONE} if not parented
|
||||
* or avatar data aren't available.
|
||||
*/
|
||||
QUuid getParentID() const;
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
* <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>
|
||||
*
|
||||
* @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>
|
||||
* @property {Uuid} owningAvatarID=Uuid.NONE - The session ID of the owning avatar if <code>avatarEntity</code> is
|
||||
* <code>true</code>, otherwise {@link Uuid(0)|Uuid.NONE}. <em>Read-only.</em>
|
||||
*
|
||||
* @property {number} created - When the entity was created, expressed as the number of microseconds since
|
||||
* 1970-01-01T00:00:00 UTC. <em>Read-only.</em>
|
||||
|
@ -131,8 +131,8 @@
|
|||
* 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 {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.
|
||||
* @property {Uuid} parentID=Uuid.NONE - The ID of the entity or avatar that the entity is parented to. A value of
|
||||
* {@link Uuid(0)|Uuid.NONE} 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
|
||||
* <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,
|
||||
|
@ -184,7 +184,7 @@
|
|||
*
|
||||
* @property {MirrorMode} mirrorMode="none" - If this entity should render as a mirror (reflecting the view of the camera),
|
||||
* a portal (reflecting the view through its <code>portalExitID</code>), or normally.
|
||||
* @property {Uuid} portalExitID=Uuid.NULL - The ID of the entity that should act as the portal exit if the <code>mirrorMode</code>
|
||||
* @property {Uuid} portalExitID=Uuid.NONE - The ID of the entity that should act as the portal exit if the <code>mirrorMode</code>
|
||||
* is set to <code>portal</code>.
|
||||
*
|
||||
* @comment The different entity types have additional properties as follows:
|
||||
|
@ -612,18 +612,18 @@
|
|||
* 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.
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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} xNNeighborID=Uuid.NONE - 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.NONE} if there is none or you don't want to join them.
|
||||
* @property {Uuid} yNNeighborID=Uuid.NONE - 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.NONE} if there is none or you don't want to join them.
|
||||
* @property {Uuid} zNNeighborID=Uuid.NONE - 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.NONE} if there is none or you don't want to join them.
|
||||
* @property {Uuid} xPNeighborID=Uuid.NONE - 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.NONE} if there is none or you don't want to join them.
|
||||
* @property {Uuid} yPNeighborID=Uuid.NONE - 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.NONE} if there is none or you don't want to join them.
|
||||
* @property {Uuid} zPNeighborID=Uuid.NONE - 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.NONE} if there is none or you don't want to join them.
|
||||
* @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 texture = "http://public.highfidelity.com/cozza13/tuscany/Concrete2.jpg";
|
||||
|
|
|
@ -164,7 +164,7 @@ public:
|
|||
* @hifi-assignment-client
|
||||
*
|
||||
* @property {Uuid} keyboardFocusEntity - The {@link Entities.EntityProperties-Web|Web} entity that has keyboard focus. If no
|
||||
* Web entity has keyboard focus, returns <code>null</code>; set to <code>null</code> or {@link Uuid(0)|Uuid.NULL} to clear
|
||||
* Web entity has keyboard focus, returns <code>null</code>; set to <code>null</code> or {@link Uuid(0)|Uuid.NONE} to clear
|
||||
* keyboard focus.
|
||||
*/
|
||||
/// handles scripting of Entity commands from JS passed to assigned clients
|
||||
|
@ -323,7 +323,7 @@ public slots:
|
|||
* @param {Entities.EntityProperties} properties - The properties of the entity to create.
|
||||
* @param {Entities.EntityHostType} [entityHostType="domain"] - The type of entity to create.
|
||||
|
||||
* @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid(0)|Uuid.NULL}.
|
||||
* @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid(0)|Uuid.NONE}.
|
||||
* @example <caption>Create a box domain entity in front of your avatar.</caption>
|
||||
* var entityID = Entities.addEntity({
|
||||
* type: "Box",
|
||||
|
@ -354,7 +354,7 @@ public slots:
|
|||
* @param {Entities.EntityProperties} properties - The properties of the entity to create.
|
||||
* @param {boolean} [avatarEntity=false] - <code>true</code> to create an avatar entity, <code>false</code> to create a
|
||||
* domain entity.
|
||||
* @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid(0)|Uuid.NULL}.
|
||||
* @returns {Uuid} The ID of the entity if successfully created, otherwise {@link Uuid(0)|Uuid.NONE}.
|
||||
*/
|
||||
Q_INVOKABLE QUuid addEntity(const EntityItemProperties& properties, bool avatarEntity = false) {
|
||||
entity::HostType entityHostType = avatarEntity ? entity::HostType::AVATAR : entity::HostType::DOMAIN;
|
||||
|
@ -378,7 +378,7 @@ public slots:
|
|||
* <code>true</code> in order to be cloned.</p>
|
||||
* @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 <code>null</code> or {@link Uuid|Uuid.NULL}.
|
||||
* @returns {Uuid} The ID of the entity if the edit was successful, otherwise <code>null</code> or {@link Uuid|Uuid.NONE}.
|
||||
* @example <caption>Change the color of an entity.</caption>
|
||||
* 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
|
||||
* <code>null</code> or {@link Uuid(0)|Uuid.NULL} to unset keyboard focus from an entity.
|
||||
* <code>null</code> 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);
|
||||
|
|
|
@ -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.
|
||||
* <em>Read-only.</em>
|
||||
* @property {string} hostname - The name of the domain for your current directory services address (e.g., <code>"DomainName"</code>,
|
||||
|
@ -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.
|
||||
* <em>Read-only.</em>
|
||||
* @property {string} hostname - The name of the domain for your current directory services address (e.g., <code>"DomainName"</code>,
|
||||
|
@ -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.
|
||||
|
|
|
@ -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 <caption>Get the ID of the entity that a client entity script is running in.</caption>
|
||||
* var entityScript = function () {
|
||||
* this.entityID = Uuid.NULL;
|
||||
* this.entityID = Uuid.NONE;
|
||||
* };
|
||||
*
|
||||
* Script.entityScriptPreloadFinished.connect(function (entityID) {
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
/// Provides the <code><a href="https://apidocs.overte.org/Uuid.html">Uuid</a></code> 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} <code>true</code> if the UUID equals <code>Uuid.NULL</code> or is <code>null</code>, otherwise
|
||||
* @returns {boolean} <code>true</code> if the UUID equals <code>Uuid.NONE</code> or is <code>null</code>, otherwise
|
||||
* <code>false</code>.
|
||||
* @example <caption>Demonstrate <code>true</code> and <code>false</code> cases.</caption>
|
||||
* var uuid; // undefined
|
||||
* print(Uuid.isNull(uuid)); // false
|
||||
* uuid = Uuid.generate();
|
||||
* print(Uuid.isNull(uuid)); // false
|
||||
* uuid = Uuid.NULL;
|
||||
* uuid = Uuid.NONE;
|
||||
* print(Uuid.isNull(uuid)); // true
|
||||
* uuid = null;
|
||||
* print(Uuid.isNull(uuid)); // true
|
||||
|
@ -125,9 +125,9 @@ public slots:
|
|||
* print("Generated UUID: " + uuid); // Generated UUID: {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}
|
||||
*/
|
||||
void print(const QString& label, const QUuid& id);
|
||||
QString getNullUuid() const { return NULL_ID; }
|
||||
|
||||
private:
|
||||
const QString NULL_UUID() { return NULL_ID; }
|
||||
const QString NULL_ID { "{00000000-0000-0000-0000-000000000000}" };
|
||||
};
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ signals:
|
|||
* @param {string} userName - The user name of the client, if the requesting client is an administrator in the domain or
|
||||
* the <code>sessionID</code> is that of the client, otherwise <code>""</code>.
|
||||
* @param {Uuid} machineFingerprint - The machine fingerprint of the client, if the requesting client is an administrator
|
||||
* in the domain or the <code>sessionID</code> is that of the client, otherwise {@link Uuid|Uuid.NULL}.
|
||||
* in the domain or the <code>sessionID</code> is that of the client, otherwise {@link Uuid|Uuid.NONE}.
|
||||
* @param {boolean} isAdmin - <code>true</code> if the client is an administrator in the domain, <code>false</code> if not.
|
||||
* @returns {Signal}
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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: "" };
|
||||
|
@ -1858,7 +1858,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 +2890,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 +3313,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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue