more CR feedback changes

This commit is contained in:
RebeccaStankus 2019-08-20 13:59:41 -07:00
parent cc22386f06
commit a78284871e
3 changed files with 14 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

View file

@ -18,8 +18,8 @@
// The information needed to properly use the sprite sheets and get the general information // The information needed to properly use the sprite sheets and get the general information
// about the emojis // about the emojis
var emojiList = Script.require("./emojiApp/resources/modules/emojiList.js?" + Date.now()); var emojiList = Script.require("./emojiApp/resources/modules/emojiList.js");
var customEmojiList = Script.require("./emojiApp/resources/modules/customEmojiList.js?" + Date.now()); var customEmojiList = Script.require("./emojiApp/resources/modules/customEmojiList.js");
var imageURLBase = Script.resolvePath("./resources/images/emojis/1024px/"); var imageURLBase = Script.resolvePath("./resources/images/emojis/1024px/");
// #endregion // #endregion
@ -159,7 +159,6 @@ function toggleReaction(reaction) {
} }
} }
var UPDATE_POINT_EMOTE_MS = 1000;
var reactionsBegun = []; var reactionsBegun = [];
var pointReticle = null; var pointReticle = null;
var mouseMoveEventsConnected = false; var mouseMoveEventsConnected = false;
@ -179,8 +178,10 @@ function beginReactionWrapper(reaction) {
break; break;
case ("point"): case ("point"):
deleteOldReticles(); deleteOldReticles();
Controller.mouseMoveEvent.connect(mouseMoveEvent); if (!mouseMoveEventsConnected) {
mouseMoveEventsConnected = true; Controller.mouseMoveEvent.connect(mouseMoveEvent);
mouseMoveEventsConnected = true;
}
} }
} }
@ -216,14 +217,13 @@ function mouseMoveEvent(event) {
} else if (entityIntersectionDistanceM) { } else if (entityIntersectionDistanceM) {
reticlePosition = entityIntersectionData.intersection; reticlePosition = entityIntersectionData.intersection;
} else { } else {
print("ERROR: No intersected avatar or entity found or the distance is too far.");
deleteOldReticles(); deleteOldReticles();
return; return;
} }
if (pointReticle) { if (pointReticle && reticlePosition) {
Entities.editEntity(pointReticle, { position: reticlePosition }); Entities.editEntity(pointReticle, { position: reticlePosition });
} else { } else if (reticlePosition) {
pointReticle = Entities.addEntity({ pointReticle = Entities.addEntity({
type: "Sphere", type: "Sphere",
name: "Point Reticle", name: "Point Reticle",
@ -231,7 +231,10 @@ function mouseMoveEvent(event) {
dimensions: { x: 0.1, y: 0.1, z: 0.1 }, dimensions: { x: 0.1, y: 0.1, z: 0.1 },
color: { red: 255, green: 0, blue: 0 }, color: { red: 255, green: 0, blue: 0 },
collisionless: true, collisionless: true,
ignorePickIntersection: true ignorePickIntersection: true,
grab: {
grabbable: false
}
}, true); }, true);
} }
} }
@ -265,7 +268,7 @@ function endReactionWrapper(reaction) {
Controller.mouseMoveEvent.disconnect(mouseMoveEvent); Controller.mouseMoveEvent.disconnect(mouseMoveEvent);
} }
intersectedEntityOrAvatarID = null; intersectedEntityOrAvatarID = null;
deleteOldReticles() deleteOldReticles();
break; break;
} }
} }
@ -438,7 +441,7 @@ function onSettingsValueChanged(settingName, newValue) {
} }
var EmojiAPI = Script.require("./emojiApp/simplifiedEmoji.js?" + Date.now()); var EmojiAPI = Script.require("./emojiApp/simplifiedEmoji.js");
var emojiAPI = new EmojiAPI(); var emojiAPI = new EmojiAPI();
var keyPressSignalsConnected = false; var keyPressSignalsConnected = false;
var emojiCodeMap; var emojiCodeMap;