mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-02 06:02:15 +02:00
Merge remote-tracking branch 'upstream/master' into ui-refactor
This commit is contained in:
commit
dab8761c71
17 changed files with 185 additions and 94 deletions
|
@ -95,6 +95,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
function loaded() {
|
function loaded() {
|
||||||
|
var allSections = [];
|
||||||
var elID = document.getElementById("property-id");
|
var elID = document.getElementById("property-id");
|
||||||
var elType = document.getElementById("property-type");
|
var elType = document.getElementById("property-type");
|
||||||
var elLocked = document.getElementById("property-locked");
|
var elLocked = document.getElementById("property-locked");
|
||||||
|
@ -146,11 +147,13 @@
|
||||||
var elUserData = document.getElementById("property-user-data");
|
var elUserData = document.getElementById("property-user-data");
|
||||||
|
|
||||||
var elBoxSections = document.querySelectorAll(".box-section");
|
var elBoxSections = document.querySelectorAll(".box-section");
|
||||||
|
allSections.push(elBoxSections);
|
||||||
var elBoxColorRed = document.getElementById("property-box-red");
|
var elBoxColorRed = document.getElementById("property-box-red");
|
||||||
var elBoxColorGreen = document.getElementById("property-box-green");
|
var elBoxColorGreen = document.getElementById("property-box-green");
|
||||||
var elBoxColorBlue = document.getElementById("property-box-blue");
|
var elBoxColorBlue = document.getElementById("property-box-blue");
|
||||||
|
|
||||||
var elLightSections = document.querySelectorAll(".light-section");
|
var elLightSections = document.querySelectorAll(".light-section");
|
||||||
|
allSections.push(elLightSections);
|
||||||
var elLightSpotLight = document.getElementById("property-light-spot-light");
|
var elLightSpotLight = document.getElementById("property-light-spot-light");
|
||||||
var elLightColorRed = document.getElementById("property-light-color-red");
|
var elLightColorRed = document.getElementById("property-light-color-red");
|
||||||
var elLightColorGreen = document.getElementById("property-light-color-green");
|
var elLightColorGreen = document.getElementById("property-light-color-green");
|
||||||
|
@ -161,7 +164,9 @@
|
||||||
var elLightCutoff = document.getElementById("property-light-cutoff");
|
var elLightCutoff = document.getElementById("property-light-cutoff");
|
||||||
|
|
||||||
var elModelSections = document.querySelectorAll(".model-section");
|
var elModelSections = document.querySelectorAll(".model-section");
|
||||||
|
allSections.push(elModelSections);
|
||||||
var elModelURL = document.getElementById("property-model-url");
|
var elModelURL = document.getElementById("property-model-url");
|
||||||
|
var elShapeType = document.getElementById("property-shape-type");
|
||||||
var elCompoundShapeURL = document.getElementById("property-compound-shape-url");
|
var elCompoundShapeURL = document.getElementById("property-compound-shape-url");
|
||||||
var elModelAnimationURL = document.getElementById("property-model-animation-url");
|
var elModelAnimationURL = document.getElementById("property-model-animation-url");
|
||||||
var elModelAnimationPlaying = document.getElementById("property-model-animation-playing");
|
var elModelAnimationPlaying = document.getElementById("property-model-animation-playing");
|
||||||
|
@ -170,9 +175,9 @@
|
||||||
var elModelAnimationSettings = document.getElementById("property-model-animation-settings");
|
var elModelAnimationSettings = document.getElementById("property-model-animation-settings");
|
||||||
var elModelTextures = document.getElementById("property-model-textures");
|
var elModelTextures = document.getElementById("property-model-textures");
|
||||||
var elModelOriginalTextures = document.getElementById("property-model-original-textures");
|
var elModelOriginalTextures = document.getElementById("property-model-original-textures");
|
||||||
var elModelShapeType = document.getElementById("property-model-shape");
|
|
||||||
|
|
||||||
var elTextSections = document.querySelectorAll(".text-section");
|
var elTextSections = document.querySelectorAll(".text-section");
|
||||||
|
allSections.push(elTextSections);
|
||||||
var elTextText = document.getElementById("property-text-text");
|
var elTextText = document.getElementById("property-text-text");
|
||||||
var elTextLineHeight = document.getElementById("property-text-line-height");
|
var elTextLineHeight = document.getElementById("property-text-line-height");
|
||||||
var elTextTextColorRed = document.getElementById("property-text-text-color-red");
|
var elTextTextColorRed = document.getElementById("property-text-text-color-red");
|
||||||
|
@ -183,6 +188,7 @@
|
||||||
var elTextBackgroundColorBlue = document.getElementById("property-text-background-color-blue");
|
var elTextBackgroundColorBlue = document.getElementById("property-text-background-color-blue");
|
||||||
|
|
||||||
var elZoneSections = document.querySelectorAll(".zone-section");
|
var elZoneSections = document.querySelectorAll(".zone-section");
|
||||||
|
allSections.push(elZoneSections);
|
||||||
var elZoneStageSunModelEnabled = document.getElementById("property-zone-stage-sun-model-enabled");
|
var elZoneStageSunModelEnabled = document.getElementById("property-zone-stage-sun-model-enabled");
|
||||||
var elZoneKeyLightColorRed = document.getElementById("property-zone-key-light-color-red");
|
var elZoneKeyLightColorRed = document.getElementById("property-zone-key-light-color-red");
|
||||||
var elZoneKeyLightColorGreen = document.getElementById("property-zone-key-light-color-green");
|
var elZoneKeyLightColorGreen = document.getElementById("property-zone-key-light-color-green");
|
||||||
|
@ -299,11 +305,13 @@
|
||||||
elScriptURL.value = properties.script;
|
elScriptURL.value = properties.script;
|
||||||
elUserData.value = properties.userData;
|
elUserData.value = properties.userData;
|
||||||
|
|
||||||
if (properties.type != "Box") {
|
for (var i = 0; i < allSections.length; i++) {
|
||||||
for (var i = 0; i < elBoxSections.length; i++) {
|
for (var j = 0; j < allSections[i].length; j++) {
|
||||||
elBoxSections[i].style.display = 'none';
|
allSections[i][j].style.display = 'none';
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if (properties.type == "Box") {
|
||||||
for (var i = 0; i < elBoxSections.length; i++) {
|
for (var i = 0; i < elBoxSections.length; i++) {
|
||||||
elBoxSections[i].style.display = 'block';
|
elBoxSections[i].style.display = 'block';
|
||||||
}
|
}
|
||||||
|
@ -311,18 +319,13 @@
|
||||||
elBoxColorRed.value = properties.color.red;
|
elBoxColorRed.value = properties.color.red;
|
||||||
elBoxColorGreen.value = properties.color.green;
|
elBoxColorGreen.value = properties.color.green;
|
||||||
elBoxColorBlue.value = properties.color.blue;
|
elBoxColorBlue.value = properties.color.blue;
|
||||||
}
|
} else if (properties.type == "Model") {
|
||||||
|
|
||||||
if (properties.type != "Model") {
|
|
||||||
for (var i = 0; i < elModelSections.length; i++) {
|
|
||||||
elModelSections[i].style.display = 'none';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (var i = 0; i < elModelSections.length; i++) {
|
for (var i = 0; i < elModelSections.length; i++) {
|
||||||
elModelSections[i].style.display = 'block';
|
elModelSections[i].style.display = 'block';
|
||||||
}
|
}
|
||||||
|
|
||||||
elModelURL.value = properties.modelURL;
|
elModelURL.value = properties.modelURL;
|
||||||
|
elShapeType.value = properties.shapeType;
|
||||||
elCompoundShapeURL.value = properties.compoundShapeURL;
|
elCompoundShapeURL.value = properties.compoundShapeURL;
|
||||||
elModelAnimationURL.value = properties.animationURL;
|
elModelAnimationURL.value = properties.animationURL;
|
||||||
elModelAnimationPlaying.checked = properties.animationIsPlaying;
|
elModelAnimationPlaying.checked = properties.animationIsPlaying;
|
||||||
|
@ -331,14 +334,7 @@
|
||||||
elModelAnimationSettings.value = properties.animationSettings;
|
elModelAnimationSettings.value = properties.animationSettings;
|
||||||
elModelTextures.value = properties.textures;
|
elModelTextures.value = properties.textures;
|
||||||
elModelOriginalTextures.value = properties.originalTextures;
|
elModelOriginalTextures.value = properties.originalTextures;
|
||||||
elModelShapeType.value = properties.shapeType;
|
} else if (properties.type == "Text") {
|
||||||
}
|
|
||||||
|
|
||||||
if (properties.type != "Text") {
|
|
||||||
for (var i = 0; i < elTextSections.length; i++) {
|
|
||||||
elTextSections[i].style.display = 'none';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (var i = 0; i < elTextSections.length; i++) {
|
for (var i = 0; i < elTextSections.length; i++) {
|
||||||
elTextSections[i].style.display = 'block';
|
elTextSections[i].style.display = 'block';
|
||||||
}
|
}
|
||||||
|
@ -351,13 +347,7 @@
|
||||||
elTextBackgroundColorRed.value = properties.backgroundColor.red;
|
elTextBackgroundColorRed.value = properties.backgroundColor.red;
|
||||||
elTextBackgroundColorGreen.value = properties.backgroundColor.green;
|
elTextBackgroundColorGreen.value = properties.backgroundColor.green;
|
||||||
elTextBackgroundColorBlue.value = properties.backgroundColor.blue;
|
elTextBackgroundColorBlue.value = properties.backgroundColor.blue;
|
||||||
}
|
} else if (properties.type == "Light") {
|
||||||
|
|
||||||
if (properties.type != "Light") {
|
|
||||||
for (var i = 0; i < elLightSections.length; i++) {
|
|
||||||
elLightSections[i].style.display = 'none';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (var i = 0; i < elLightSections.length; i++) {
|
for (var i = 0; i < elLightSections.length; i++) {
|
||||||
elLightSections[i].style.display = 'block';
|
elLightSections[i].style.display = 'block';
|
||||||
}
|
}
|
||||||
|
@ -371,13 +361,7 @@
|
||||||
elLightIntensity.value = properties.intensity;
|
elLightIntensity.value = properties.intensity;
|
||||||
elLightExponent.value = properties.exponent;
|
elLightExponent.value = properties.exponent;
|
||||||
elLightCutoff.value = properties.cutoff;
|
elLightCutoff.value = properties.cutoff;
|
||||||
}
|
} else if (properties.type == "Zone") {
|
||||||
|
|
||||||
if (properties.type != "Zone") {
|
|
||||||
for (var i = 0; i < elZoneSections.length; i++) {
|
|
||||||
elZoneSections[i].style.display = 'none';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (var i = 0; i < elZoneSections.length; i++) {
|
for (var i = 0; i < elZoneSections.length; i++) {
|
||||||
elZoneSections[i].style.display = 'block';
|
elZoneSections[i].style.display = 'block';
|
||||||
}
|
}
|
||||||
|
@ -397,6 +381,8 @@
|
||||||
elZoneStageAltitude.value = properties.stageAltitude.toFixed(2);
|
elZoneStageAltitude.value = properties.stageAltitude.toFixed(2);
|
||||||
elZoneStageDay.value = properties.stageDay;
|
elZoneStageDay.value = properties.stageDay;
|
||||||
elZoneStageHour.value = properties.stageHour;
|
elZoneStageHour.value = properties.stageHour;
|
||||||
|
elShapeType.value = properties.shapeType;
|
||||||
|
elCompoundShapeURL.value = properties.compoundShapeURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected) {
|
if (selected) {
|
||||||
|
@ -487,6 +473,7 @@
|
||||||
elLightCutoff.addEventListener('change', createEmitNumberPropertyUpdateFunction('cutoff'));
|
elLightCutoff.addEventListener('change', createEmitNumberPropertyUpdateFunction('cutoff'));
|
||||||
|
|
||||||
elModelURL.addEventListener('change', createEmitTextPropertyUpdateFunction('modelURL'));
|
elModelURL.addEventListener('change', createEmitTextPropertyUpdateFunction('modelURL'));
|
||||||
|
elShapeType.addEventListener('change', createEmitTextPropertyUpdateFunction('shapeType'));
|
||||||
elCompoundShapeURL.addEventListener('change', createEmitTextPropertyUpdateFunction('compoundShapeURL'));
|
elCompoundShapeURL.addEventListener('change', createEmitTextPropertyUpdateFunction('compoundShapeURL'));
|
||||||
elModelAnimationURL.addEventListener('change', createEmitTextPropertyUpdateFunction('animationURL'));
|
elModelAnimationURL.addEventListener('change', createEmitTextPropertyUpdateFunction('animationURL'));
|
||||||
elModelAnimationPlaying.addEventListener('change', createEmitCheckedPropertyUpdateFunction('animationIsPlaying'));
|
elModelAnimationPlaying.addEventListener('change', createEmitCheckedPropertyUpdateFunction('animationIsPlaying'));
|
||||||
|
@ -494,7 +481,6 @@
|
||||||
elModelAnimationFrame.addEventListener('change', createEmitNumberPropertyUpdateFunction('animationFrameIndex'));
|
elModelAnimationFrame.addEventListener('change', createEmitNumberPropertyUpdateFunction('animationFrameIndex'));
|
||||||
elModelAnimationSettings.addEventListener('change', createEmitTextPropertyUpdateFunction('animationSettings'));
|
elModelAnimationSettings.addEventListener('change', createEmitTextPropertyUpdateFunction('animationSettings'));
|
||||||
elModelTextures.addEventListener('change', createEmitTextPropertyUpdateFunction('textures'));
|
elModelTextures.addEventListener('change', createEmitTextPropertyUpdateFunction('textures'));
|
||||||
elModelShapeType.addEventListener('change', createEmitTextPropertyUpdateFunction('shapeType'));
|
|
||||||
|
|
||||||
elTextText.addEventListener('change', createEmitTextPropertyUpdateFunction('text'));
|
elTextText.addEventListener('change', createEmitTextPropertyUpdateFunction('text'));
|
||||||
elTextLineHeight.addEventListener('change', createEmitNumberPropertyUpdateFunction('lineHeight'));
|
elTextLineHeight.addEventListener('change', createEmitNumberPropertyUpdateFunction('lineHeight'));
|
||||||
|
@ -774,7 +760,18 @@
|
||||||
<input type="text" id="property-model-url" class="url"></input>
|
<input type="text" id="property-model-url" class="url"></input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="model-section property">
|
<div class="model-section zone-section property">
|
||||||
|
<div class="label">Shape Type</div>
|
||||||
|
<div class="value">
|
||||||
|
<select name="SelectShapeType" id="property-shape-type" name="SelectShapeType">
|
||||||
|
<option value='none'>none</option>
|
||||||
|
<option value='box'>box</option>
|
||||||
|
<option value='sphere'>sphere</option>
|
||||||
|
<option value='compound'>compound</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="model-section zone-section property">
|
||||||
<div class="label">Compound Shape URL</div>
|
<div class="label">Compound Shape URL</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<input type="text" id="property-compound-shape-url" class="url"></input>
|
<input type="text" id="property-compound-shape-url" class="url"></input>
|
||||||
|
@ -823,18 +820,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="model-section property">
|
|
||||||
<div class="label">Shape Type</div>
|
|
||||||
<div class="value">
|
|
||||||
<select name="SelectShapeType" id="property-model-shape" name="SelectShapeType">
|
|
||||||
<option value='none'>none</option>
|
|
||||||
<option value='box'>box</option>
|
|
||||||
<option value='sphere'>sphere</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="text-section property">
|
<div class="text-section property">
|
||||||
<div class="label">Text</div>
|
<div class="label">Text</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
|
|
|
@ -53,6 +53,7 @@ function Tooltip() {
|
||||||
text += "ID: " + properties.id + "\n"
|
text += "ID: " + properties.id + "\n"
|
||||||
if (properties.type == "Model") {
|
if (properties.type == "Model") {
|
||||||
text += "Model URL: " + properties.modelURL + "\n"
|
text += "Model URL: " + properties.modelURL + "\n"
|
||||||
|
text += "Shape Type: " + properties.shapeType + "\n"
|
||||||
text += "Compound Shape URL: " + properties.compoundShapeURL + "\n"
|
text += "Compound Shape URL: " + properties.compoundShapeURL + "\n"
|
||||||
text += "Animation URL: " + properties.animationURL + "\n"
|
text += "Animation URL: " + properties.animationURL + "\n"
|
||||||
text += "Animation is playing: " + properties.animationIsPlaying + "\n"
|
text += "Animation is playing: " + properties.animationIsPlaying + "\n"
|
||||||
|
|
|
@ -52,6 +52,8 @@ EntityPropertyDialogBox = (function () {
|
||||||
if (properties.type == "Model") {
|
if (properties.type == "Model") {
|
||||||
array.push({ label: "Model URL:", value: properties.modelURL });
|
array.push({ label: "Model URL:", value: properties.modelURL });
|
||||||
index++;
|
index++;
|
||||||
|
array.push({ label: "Shape Type:", value: properties.shapeType });
|
||||||
|
index++;
|
||||||
array.push({ label: "Compound Shape URL:", value: properties.compoundShapeURL });
|
array.push({ label: "Compound Shape URL:", value: properties.compoundShapeURL });
|
||||||
index++;
|
index++;
|
||||||
array.push({ label: "Animation URL:", value: properties.animationURL });
|
array.push({ label: "Animation URL:", value: properties.animationURL });
|
||||||
|
@ -284,6 +286,7 @@ EntityPropertyDialogBox = (function () {
|
||||||
properties.locked = array[index++].value;
|
properties.locked = array[index++].value;
|
||||||
if (properties.type == "Model") {
|
if (properties.type == "Model") {
|
||||||
properties.modelURL = array[index++].value;
|
properties.modelURL = array[index++].value;
|
||||||
|
properties.shapeType = array[index++].value;
|
||||||
properties.compoundShapeURL = array[index++].value;
|
properties.compoundShapeURL = array[index++].value;
|
||||||
properties.animationURL = array[index++].value;
|
properties.animationURL = array[index++].value;
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,7 @@ ZoneOverlayManager = function(isEntityFunc, entityAddedFunc, entityRemovedFunc,
|
||||||
if (entityID.id in entityOverlays) {
|
if (entityID.id in entityOverlays) {
|
||||||
releaseOverlay(entityOverlays[entityID.id].outline);
|
releaseOverlay(entityOverlays[entityID.id].outline);
|
||||||
releaseOverlay(entityOverlays[entityID.id].solid);
|
releaseOverlay(entityOverlays[entityID.id].solid);
|
||||||
|
delete entityIDs[entityID.id];
|
||||||
delete entityOverlays[entityID.id];
|
delete entityOverlays[entityID.id];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,9 @@ var yawFromTouch = 0;
|
||||||
var pitchFromTouch = 0;
|
var pitchFromTouch = 0;
|
||||||
|
|
||||||
// Touch Data
|
// Touch Data
|
||||||
|
var TIME_BEFORE_GENERATED_END_TOUCH_EVENT = 50; // ms
|
||||||
var startedTouching = false;
|
var startedTouching = false;
|
||||||
|
var lastTouchEvent = 0;
|
||||||
var lastMouseX = 0;
|
var lastMouseX = 0;
|
||||||
var lastMouseY = 0;
|
var lastMouseY = 0;
|
||||||
var yawFromMouse = 0;
|
var yawFromMouse = 0;
|
||||||
|
@ -80,11 +82,17 @@ function touchBeginEvent(event) {
|
||||||
yawFromTouch = 0;
|
yawFromTouch = 0;
|
||||||
pitchFromTouch = 0;
|
pitchFromTouch = 0;
|
||||||
startedTouching = true;
|
startedTouching = true;
|
||||||
|
var d = new Date();
|
||||||
|
lastTouchEvent = d.getTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
function touchEndEvent(event) {
|
function touchEndEvent(event) {
|
||||||
if (wantDebugging) {
|
if (wantDebugging) {
|
||||||
|
if (event) {
|
||||||
print("touchEndEvent event.x,y=" + event.x + ", " + event.y);
|
print("touchEndEvent event.x,y=" + event.x + ", " + event.y);
|
||||||
|
} else {
|
||||||
|
print("touchEndEvent generated");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
startedTouching = false;
|
startedTouching = false;
|
||||||
}
|
}
|
||||||
|
@ -97,15 +105,16 @@ function touchUpdateEvent(event) {
|
||||||
|
|
||||||
if (!startedTouching) {
|
if (!startedTouching) {
|
||||||
// handle Qt 5.4.x bug where we get touch update without a touch begin event
|
// handle Qt 5.4.x bug where we get touch update without a touch begin event
|
||||||
startedTouching = true;
|
touchBeginEvent(event);
|
||||||
lastTouchX = event.x;
|
return;
|
||||||
lastTouchY = event.y;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
yawFromTouch += ((event.x - lastTouchX) * TOUCH_YAW_SCALE * FIXED_TOUCH_TIMESTEP);
|
yawFromTouch += ((event.x - lastTouchX) * TOUCH_YAW_SCALE * FIXED_TOUCH_TIMESTEP);
|
||||||
pitchFromTouch += ((event.y - lastTouchY) * TOUCH_PITCH_SCALE * FIXED_TOUCH_TIMESTEP);
|
pitchFromTouch += ((event.y - lastTouchY) * TOUCH_PITCH_SCALE * FIXED_TOUCH_TIMESTEP);
|
||||||
lastTouchX = event.x;
|
lastTouchX = event.x;
|
||||||
lastTouchY = event.y;
|
lastTouchY = event.y;
|
||||||
|
var d = new Date();
|
||||||
|
lastTouchEvent = d.getTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,6 +123,14 @@ function update(deltaTime) {
|
||||||
print("update()...");
|
print("update()...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (startedTouching) {
|
||||||
|
var d = new Date();
|
||||||
|
var sinceLastTouch = d.getTime() - lastTouchEvent;
|
||||||
|
if (sinceLastTouch > TIME_BEFORE_GENERATED_END_TOUCH_EVENT) {
|
||||||
|
touchEndEvent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (yawFromTouch != 0 || yawFromMouse != 0) {
|
if (yawFromTouch != 0 || yawFromMouse != 0) {
|
||||||
var newOrientation = Quat.multiply(MyAvatar.orientation, Quat.fromPitchYawRollRadians(0, yawFromTouch + yawFromMouse, 0));
|
var newOrientation = Quat.multiply(MyAvatar.orientation, Quat.fromPitchYawRollRadians(0, yawFromTouch + yawFromMouse, 0));
|
||||||
|
|
||||||
|
|
|
@ -1528,9 +1528,11 @@ void Application::mouseReleaseEvent(QMouseEvent* event, unsigned int deviceID) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::touchUpdateEvent(QTouchEvent* event) {
|
void Application::touchUpdateEvent(QTouchEvent* event) {
|
||||||
|
if (event->type() == QEvent::TouchUpdate) {
|
||||||
TouchEvent thisEvent(*event, _lastTouchEvent);
|
TouchEvent thisEvent(*event, _lastTouchEvent);
|
||||||
_controllerScriptingInterface.emitTouchUpdateEvent(thisEvent); // send events to any registered scripts
|
_controllerScriptingInterface.emitTouchUpdateEvent(thisEvent); // send events to any registered scripts
|
||||||
_lastTouchEvent = thisEvent;
|
_lastTouchEvent = thisEvent;
|
||||||
|
}
|
||||||
|
|
||||||
// if one of our scripts have asked to capture this event, then stop processing it
|
// if one of our scripts have asked to capture this event, then stop processing it
|
||||||
if (_controllerScriptingInterface.isTouchCaptured()) {
|
if (_controllerScriptingInterface.isTouchCaptured()) {
|
||||||
|
|
|
@ -683,11 +683,11 @@ void MyAvatar::loadData() {
|
||||||
|
|
||||||
_useFullAvatar = settings.value("useFullAvatar").toBool();
|
_useFullAvatar = settings.value("useFullAvatar").toBool();
|
||||||
_headURLFromPreferences = settings.value("faceModelURL", DEFAULT_HEAD_MODEL_URL).toUrl();
|
_headURLFromPreferences = settings.value("faceModelURL", DEFAULT_HEAD_MODEL_URL).toUrl();
|
||||||
_fullAvatarURLFromPreferences = settings.value("fullAvatarURL").toUrl();
|
_fullAvatarURLFromPreferences = settings.value("fullAvatarURL", DEFAULT_FULL_AVATAR_MODEL_URL).toUrl();
|
||||||
_skeletonURLFromPreferences = settings.value("skeletonModelURL").toUrl();
|
_skeletonURLFromPreferences = settings.value("skeletonModelURL", DEFAULT_BODY_MODEL_URL).toUrl();
|
||||||
_headModelName = settings.value("headModelName").toString();
|
_headModelName = settings.value("headModelName", DEFAULT_HEAD_MODEL_NAME).toString();
|
||||||
_bodyModelName = settings.value("bodyModelName").toString();
|
_bodyModelName = settings.value("bodyModelName", DEFAULT_BODY_MODEL_NAME).toString();
|
||||||
_fullAvatarModelName = settings.value("fullAvatarModelName").toString();;
|
_fullAvatarModelName = settings.value("fullAvatarModelName", DEFAULT_FULL_AVATAR_MODEL_NAME).toString();
|
||||||
|
|
||||||
if (isOldSettings) {
|
if (isOldSettings) {
|
||||||
bool assumeFullAvatar = _headURLFromPreferences.isEmpty();
|
bool assumeFullAvatar = _headURLFromPreferences.isEmpty();
|
||||||
|
@ -706,13 +706,22 @@ void MyAvatar::loadData() {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_fullAvatarURLFromPreferences = DEFAULT_FULL_AVATAR_MODEL_URL;
|
_fullAvatarURLFromPreferences = DEFAULT_FULL_AVATAR_MODEL_URL;
|
||||||
_skeletonURLFromPreferences = settings.value("skeletonModelURL").toUrl();
|
_skeletonURLFromPreferences = settings.value("skeletonModelURL", DEFAULT_BODY_MODEL_URL).toUrl();
|
||||||
|
|
||||||
QVariantHash headFST = FSTReader::downloadMapping(_headURLFromPreferences.toString());
|
if (_skeletonURLFromPreferences == DEFAULT_BODY_MODEL_URL) {
|
||||||
|
_bodyModelName = DEFAULT_BODY_MODEL_NAME;
|
||||||
|
} else {
|
||||||
QVariantHash bodyFST = FSTReader::downloadMapping(_skeletonURLFromPreferences.toString());
|
QVariantHash bodyFST = FSTReader::downloadMapping(_skeletonURLFromPreferences.toString());
|
||||||
|
|
||||||
_headModelName = headFST["name"].toString();
|
|
||||||
_bodyModelName = bodyFST["name"].toString();
|
_bodyModelName = bodyFST["name"].toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_headURLFromPreferences == DEFAULT_HEAD_MODEL_URL) {
|
||||||
|
_headModelName = DEFAULT_HEAD_MODEL_NAME;
|
||||||
|
} else {
|
||||||
|
QVariantHash headFST = FSTReader::downloadMapping(_headURLFromPreferences.toString());
|
||||||
|
_headModelName = headFST["name"].toString();
|
||||||
|
}
|
||||||
|
|
||||||
_fullAvatarModelName = "Default";
|
_fullAvatarModelName = "Default";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QElapsedTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
|
|
||||||
|
@ -136,6 +136,9 @@ struct Packet {
|
||||||
|
|
||||||
const float STARTING_DDE_MESSAGE_TIME = 0.033f;
|
const float STARTING_DDE_MESSAGE_TIME = 0.033f;
|
||||||
|
|
||||||
|
const int FPS_TIMER_DELAY = 2000; // ms
|
||||||
|
const int FPS_TIMER_DURATION = 2000; // ms
|
||||||
|
|
||||||
DdeFaceTracker::DdeFaceTracker() :
|
DdeFaceTracker::DdeFaceTracker() :
|
||||||
DdeFaceTracker(QHostAddress::Any, DDE_SERVER_PORT, DDE_CONTROL_PORT)
|
DdeFaceTracker(QHostAddress::Any, DDE_SERVER_PORT, DDE_CONTROL_PORT)
|
||||||
{
|
{
|
||||||
|
@ -168,7 +171,9 @@ DdeFaceTracker::DdeFaceTracker(const QHostAddress& host, quint16 serverPort, qui
|
||||||
_lastLeftEyeBlink(0.0f),
|
_lastLeftEyeBlink(0.0f),
|
||||||
_filteredLeftEyeBlink(0.0f),
|
_filteredLeftEyeBlink(0.0f),
|
||||||
_lastRightEyeBlink(0.0f),
|
_lastRightEyeBlink(0.0f),
|
||||||
_filteredRightEyeBlink(0.0f)
|
_filteredRightEyeBlink(0.0f),
|
||||||
|
_isCalculatingFPS(false),
|
||||||
|
_frameCount(0)
|
||||||
{
|
{
|
||||||
_coefficients.resize(NUM_FACESHIFT_BLENDSHAPES);
|
_coefficients.resize(NUM_FACESHIFT_BLENDSHAPES);
|
||||||
|
|
||||||
|
@ -200,7 +205,7 @@ void DdeFaceTracker::setEnabled(bool enabled) {
|
||||||
qDebug() << "[Info] DDE Face Tracker Starting";
|
qDebug() << "[Info] DDE Face Tracker Starting";
|
||||||
_ddeProcess = new QProcess(qApp);
|
_ddeProcess = new QProcess(qApp);
|
||||||
connect(_ddeProcess, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(processFinished(int, QProcess::ExitStatus)));
|
connect(_ddeProcess, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(processFinished(int, QProcess::ExitStatus)));
|
||||||
_ddeProcess->start(QCoreApplication::applicationDirPath() + DDE_PROGRAM_PATH, DDE_ARGUMENTS, QIODevice::ReadOnly);
|
_ddeProcess->start(QCoreApplication::applicationDirPath() + DDE_PROGRAM_PATH, DDE_ARGUMENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!enabled && _ddeProcess) {
|
if (!enabled && _ddeProcess) {
|
||||||
|
@ -229,6 +234,12 @@ void DdeFaceTracker::reset() {
|
||||||
const char* DDE_RESET_COMMAND = "reset";
|
const char* DDE_RESET_COMMAND = "reset";
|
||||||
_udpSocket.writeDatagram(DDE_RESET_COMMAND, DDE_SERVER_ADDR, _controlPort);
|
_udpSocket.writeDatagram(DDE_RESET_COMMAND, DDE_SERVER_ADDR, _controlPort);
|
||||||
|
|
||||||
|
// Log camera FPS after a reset
|
||||||
|
if (!_isCalculatingFPS) {
|
||||||
|
QTimer::singleShot(FPS_TIMER_DELAY, this, SLOT(startFPSTimer()));
|
||||||
|
_isCalculatingFPS = true;
|
||||||
|
}
|
||||||
|
|
||||||
_reset = true;
|
_reset = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,8 +419,23 @@ void DdeFaceTracker::decodePacket(const QByteArray& buffer) {
|
||||||
}
|
}
|
||||||
_lastMessageReceived = usecsNow;
|
_lastMessageReceived = usecsNow;
|
||||||
|
|
||||||
|
// Count frames if timing
|
||||||
|
if (_isCalculatingFPS) {
|
||||||
|
_frameCount++;
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
qCDebug(interfaceapp) << "[Error] DDE Face Tracker Decode Error";
|
qCDebug(interfaceapp) << "[Error] DDE Face Tracker Decode Error";
|
||||||
}
|
}
|
||||||
_lastReceiveTimestamp = usecTimestampNow();
|
_lastReceiveTimestamp = usecTimestampNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DdeFaceTracker::startFPSTimer() {
|
||||||
|
_frameCount = 0;
|
||||||
|
QTimer::singleShot(FPS_TIMER_DURATION, this, SLOT(finishFPSTimer()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void DdeFaceTracker::finishFPSTimer() {
|
||||||
|
qDebug() << "[Info] DDE FPS =" << (float)_frameCount / ((float)FPS_TIMER_DURATION / 1000.0f);
|
||||||
|
_isCalculatingFPS = false;
|
||||||
|
}
|
||||||
|
|
|
@ -59,6 +59,9 @@ private slots:
|
||||||
void readPendingDatagrams();
|
void readPendingDatagrams();
|
||||||
void socketStateChanged(QAbstractSocket::SocketState socketState);
|
void socketStateChanged(QAbstractSocket::SocketState socketState);
|
||||||
|
|
||||||
|
void startFPSTimer();
|
||||||
|
void finishFPSTimer();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DdeFaceTracker();
|
DdeFaceTracker();
|
||||||
DdeFaceTracker(const QHostAddress& host, quint16 serverPort, quint16 controlPort);
|
DdeFaceTracker(const QHostAddress& host, quint16 serverPort, quint16 controlPort);
|
||||||
|
@ -108,6 +111,9 @@ private:
|
||||||
float _filteredLeftEyeBlink;
|
float _filteredLeftEyeBlink;
|
||||||
float _lastRightEyeBlink;
|
float _lastRightEyeBlink;
|
||||||
float _filteredRightEyeBlink;
|
float _filteredRightEyeBlink;
|
||||||
|
|
||||||
|
bool _isCalculatingFPS;
|
||||||
|
int _frameCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_DdeFaceTracker_h
|
#endif // hifi_DdeFaceTracker_h
|
|
@ -30,9 +30,14 @@ const QString DEFAULT_FACESHIFT_HOSTNAME = "localhost";
|
||||||
const quint16 FACESHIFT_PORT = 33433;
|
const quint16 FACESHIFT_PORT = 33433;
|
||||||
const float DEFAULT_FACESHIFT_EYE_DEFLECTION = 0.25f;
|
const float DEFAULT_FACESHIFT_EYE_DEFLECTION = 0.25f;
|
||||||
|
|
||||||
|
const int FPS_TIMER_DELAY = 2000; // ms
|
||||||
|
const int FPS_TIMER_DURATION = 2000; // ms
|
||||||
|
|
||||||
Faceshift::Faceshift() :
|
Faceshift::Faceshift() :
|
||||||
_eyeDeflection("faceshiftEyeDeflection", DEFAULT_FACESHIFT_EYE_DEFLECTION),
|
_eyeDeflection("faceshiftEyeDeflection", DEFAULT_FACESHIFT_EYE_DEFLECTION),
|
||||||
_hostname("faceshiftHostname", DEFAULT_FACESHIFT_HOSTNAME)
|
_hostname("faceshiftHostname", DEFAULT_FACESHIFT_HOSTNAME),
|
||||||
|
_isCalculatingFPS(false),
|
||||||
|
_frameCount(0)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_FACESHIFT
|
#ifdef HAVE_FACESHIFT
|
||||||
connect(&_tcpSocket, SIGNAL(connected()), SLOT(noteConnected()));
|
connect(&_tcpSocket, SIGNAL(connected()), SLOT(noteConnected()));
|
||||||
|
@ -81,6 +86,12 @@ void Faceshift::reset() {
|
||||||
string message;
|
string message;
|
||||||
fsBinaryStream::encode_message(message, fsMsgCalibrateNeutral());
|
fsBinaryStream::encode_message(message, fsMsgCalibrateNeutral());
|
||||||
send(message);
|
send(message);
|
||||||
|
|
||||||
|
// Log camera FPS after a reset
|
||||||
|
if (!_isCalculatingFPS) {
|
||||||
|
QTimer::singleShot(FPS_TIMER_DELAY, this, SLOT(startFPSTimer()));
|
||||||
|
_isCalculatingFPS = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_longTermAverageInitialized = false;
|
_longTermAverageInitialized = false;
|
||||||
}
|
}
|
||||||
|
@ -283,6 +294,10 @@ void Faceshift::receive(const QByteArray& buffer) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
// Count frames if timing
|
||||||
|
if (_isCalculatingFPS) {
|
||||||
|
_frameCount++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Faceshift::setEyeDeflection(float faceshiftEyeDeflection) {
|
void Faceshift::setEyeDeflection(float faceshiftEyeDeflection) {
|
||||||
|
@ -292,3 +307,13 @@ void Faceshift::setEyeDeflection(float faceshiftEyeDeflection) {
|
||||||
void Faceshift::setHostname(const QString& hostname) {
|
void Faceshift::setHostname(const QString& hostname) {
|
||||||
_hostname.set(hostname);
|
_hostname.set(hostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Faceshift::startFPSTimer() {
|
||||||
|
_frameCount = 0;
|
||||||
|
QTimer::singleShot(FPS_TIMER_DURATION, this, SLOT(finishFPSTimer()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void Faceshift::finishFPSTimer() {
|
||||||
|
qCDebug(interfaceapp) << "Faceshift: FPS =" << (float)_frameCount / ((float)FPS_TIMER_DURATION / 1000.0f);
|
||||||
|
_isCalculatingFPS = false;
|
||||||
|
}
|
||||||
|
|
|
@ -95,6 +95,8 @@ private slots:
|
||||||
void noteError(QAbstractSocket::SocketError error);
|
void noteError(QAbstractSocket::SocketError error);
|
||||||
void readPendingDatagrams();
|
void readPendingDatagrams();
|
||||||
void readFromSocket();
|
void readFromSocket();
|
||||||
|
void startFPSTimer();
|
||||||
|
void finishFPSTimer();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Faceshift();
|
Faceshift();
|
||||||
|
@ -152,6 +154,9 @@ private:
|
||||||
int _mouthSmileRightIndex = 29;
|
int _mouthSmileRightIndex = 29;
|
||||||
|
|
||||||
int _jawOpenIndex = 21;
|
int _jawOpenIndex = 21;
|
||||||
|
|
||||||
|
bool _isCalculatingFPS;
|
||||||
|
int _frameCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_Faceshift_h
|
#endif // hifi_Faceshift_h
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <QWebFrame>
|
#include <QWebFrame>
|
||||||
#include <QWebView>
|
#include <QWebView>
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
|
#include <QStyleFactory>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "ui/DataWebPage.h"
|
#include "ui/DataWebPage.h"
|
||||||
|
@ -72,6 +73,11 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid
|
||||||
_windowWidget = dialogWidget;
|
_windowWidget = dialogWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto style = QStyleFactory::create("fusion");
|
||||||
|
if (style) {
|
||||||
|
_webView->setStyle(style);
|
||||||
|
}
|
||||||
|
|
||||||
_webView->setPage(new DataWebPage());
|
_webView->setPage(new DataWebPage());
|
||||||
_webView->setUrl(url);
|
_webView->setUrl(url);
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,10 @@ const QUrl DEFAULT_HEAD_MODEL_URL = QUrl("http://public.highfidelity.io/models/h
|
||||||
const QUrl DEFAULT_BODY_MODEL_URL = QUrl("http://public.highfidelity.io/models/skeletons/defaultAvatar_body.fst");
|
const QUrl DEFAULT_BODY_MODEL_URL = QUrl("http://public.highfidelity.io/models/skeletons/defaultAvatar_body.fst");
|
||||||
const QUrl DEFAULT_FULL_AVATAR_MODEL_URL = QUrl("http://public.highfidelity.io/marketplace/contents/029db3d4-da2c-4cb2-9c08-b9612ba576f5/02949063e7c4aed42ad9d1a58461f56d.fst");
|
const QUrl DEFAULT_FULL_AVATAR_MODEL_URL = QUrl("http://public.highfidelity.io/marketplace/contents/029db3d4-da2c-4cb2-9c08-b9612ba576f5/02949063e7c4aed42ad9d1a58461f56d.fst");
|
||||||
|
|
||||||
|
const QString DEFAULT_HEAD_MODEL_NAME = QString("Robot");
|
||||||
|
const QString DEFAULT_BODY_MODEL_NAME = QString("Robot");
|
||||||
|
const QString DEFAULT_FULL_AVATAR_MODEL_NAME = QString("Default");
|
||||||
|
|
||||||
|
|
||||||
// Where one's own Avatar begins in the world (will be overwritten if avatar data file is found).
|
// Where one's own Avatar begins in the world (will be overwritten if avatar data file is found).
|
||||||
// This is the start location in the Sandbox (xyz: 6270, 211, 6000).
|
// This is the start location in the Sandbox (xyz: 6270, 211, 6000).
|
||||||
|
|
|
@ -643,7 +643,7 @@ void EntityTreeRenderer::renderElement(OctreeElement* element, RenderArgs* args)
|
||||||
// NOTE: Zone Entities are a special case we handle here... Zones don't render
|
// NOTE: Zone Entities are a special case we handle here... Zones don't render
|
||||||
// like other entity types. So we will skip the normal rendering tests
|
// like other entity types. So we will skip the normal rendering tests
|
||||||
if (entityItem->getType() == EntityTypes::Zone) {
|
if (entityItem->getType() == EntityTypes::Zone) {
|
||||||
if (entityItem->contains(args->_viewFrustum->getPosition())) {
|
if (entityItem->contains(_viewState->getAvatarPosition())) {
|
||||||
float entityVolumeEstimate = entityItem->getVolumeEstimate();
|
float entityVolumeEstimate = entityItem->getVolumeEstimate();
|
||||||
if (entityVolumeEstimate < _bestZoneVolume) {
|
if (entityVolumeEstimate < _bestZoneVolume) {
|
||||||
_bestZoneVolume = entityVolumeEstimate;
|
_bestZoneVolume = entityVolumeEstimate;
|
||||||
|
|
|
@ -192,31 +192,34 @@ void EntityItemProperties::setLastEdited(quint64 usecTime) {
|
||||||
_lastEdited = usecTime > _created ? usecTime : _created;
|
_lastEdited = usecTime > _created ? usecTime : _created;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* shapeTypeNames[] = {"none", "box", "sphere", "ellipsoid", "convex-hull", "plane", "compound", "capsule-x",
|
const char* shapeTypeNames[] = {"none", "box", "sphere", "ellipsoid", "plane", "compound", "capsule-x",
|
||||||
"capsule-y", "capsule-z", "cylinder-x", "cylinder-y", "cylinder-z"};
|
"capsule-y", "capsule-z", "cylinder-x", "cylinder-y", "cylinder-z"};
|
||||||
|
|
||||||
QHash<QString, ShapeType> stringToShapeTypeLookup;
|
QHash<QString, ShapeType> stringToShapeTypeLookup;
|
||||||
|
|
||||||
|
void addShapeType(ShapeType type) {
|
||||||
|
stringToShapeTypeLookup[shapeTypeNames[type]] = type;
|
||||||
|
}
|
||||||
|
|
||||||
void buildStringToShapeTypeLookup() {
|
void buildStringToShapeTypeLookup() {
|
||||||
stringToShapeTypeLookup["none"] = SHAPE_TYPE_NONE;
|
addShapeType(SHAPE_TYPE_NONE);
|
||||||
stringToShapeTypeLookup["box"] = SHAPE_TYPE_BOX;
|
addShapeType(SHAPE_TYPE_BOX);
|
||||||
stringToShapeTypeLookup["sphere"] = SHAPE_TYPE_SPHERE;
|
addShapeType(SHAPE_TYPE_SPHERE);
|
||||||
stringToShapeTypeLookup["ellipsoid"] = SHAPE_TYPE_ELLIPSOID;
|
addShapeType(SHAPE_TYPE_ELLIPSOID);
|
||||||
stringToShapeTypeLookup["convex-hull"] = SHAPE_TYPE_COMPOUND;
|
addShapeType(SHAPE_TYPE_PLANE);
|
||||||
stringToShapeTypeLookup["plane"] = SHAPE_TYPE_PLANE;
|
addShapeType(SHAPE_TYPE_COMPOUND);
|
||||||
stringToShapeTypeLookup["compound"] = SHAPE_TYPE_COMPOUND;
|
addShapeType(SHAPE_TYPE_CAPSULE_X);
|
||||||
stringToShapeTypeLookup["capsule-x"] = SHAPE_TYPE_CAPSULE_X;
|
addShapeType(SHAPE_TYPE_CAPSULE_Y);
|
||||||
stringToShapeTypeLookup["capsule-y"] = SHAPE_TYPE_CAPSULE_Y;
|
addShapeType(SHAPE_TYPE_CAPSULE_Z);
|
||||||
stringToShapeTypeLookup["capsule-z"] = SHAPE_TYPE_CAPSULE_Z;
|
addShapeType(SHAPE_TYPE_CYLINDER_X);
|
||||||
stringToShapeTypeLookup["cylinder-x"] = SHAPE_TYPE_CYLINDER_X;
|
addShapeType(SHAPE_TYPE_CYLINDER_Y);
|
||||||
stringToShapeTypeLookup["cylinder-y"] = SHAPE_TYPE_CYLINDER_Y;
|
addShapeType(SHAPE_TYPE_CYLINDER_Z);
|
||||||
stringToShapeTypeLookup["cylinder-z"] = SHAPE_TYPE_CYLINDER_Z;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString EntityItemProperties::getShapeTypeAsString() const {
|
QString EntityItemProperties::getShapeTypeAsString() const {
|
||||||
if (_shapeType < sizeof(shapeTypeNames) / sizeof(char *))
|
if (_shapeType < sizeof(shapeTypeNames) / sizeof(char *))
|
||||||
return QString(shapeTypeNames[_shapeType]);
|
return QString(shapeTypeNames[_shapeType]);
|
||||||
return QString("none");
|
return QString(shapeTypeNames[SHAPE_TYPE_NONE]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityItemProperties::setShapeTypeFromString(const QString& shapeName) {
|
void EntityItemProperties::setShapeTypeFromString(const QString& shapeName) {
|
||||||
|
|
|
@ -55,9 +55,9 @@ public:
|
||||||
|
|
||||||
glm::vec3 getKeyLightColorVec3() const {
|
glm::vec3 getKeyLightColorVec3() const {
|
||||||
const quint8 MAX_COLOR = 255;
|
const quint8 MAX_COLOR = 255;
|
||||||
glm::vec3 color = { _keyLightColor[RED_INDEX] / MAX_COLOR,
|
glm::vec3 color = { (float)_keyLightColor[RED_INDEX] / (float)MAX_COLOR,
|
||||||
_keyLightColor[GREEN_INDEX] / MAX_COLOR,
|
(float)_keyLightColor[GREEN_INDEX] / (float)MAX_COLOR,
|
||||||
_keyLightColor[BLUE_INDEX] / MAX_COLOR };
|
(float)_keyLightColor[BLUE_INDEX] / (float)MAX_COLOR };
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -340,8 +340,6 @@ bool OffscreenUi::eventFilter(QObject* originalDestination, QEvent* event) {
|
||||||
case QEvent::KeyPress:
|
case QEvent::KeyPress:
|
||||||
case QEvent::KeyRelease: {
|
case QEvent::KeyRelease: {
|
||||||
event->ignore();
|
event->ignore();
|
||||||
//if (_quickWindow->activeFocusItem()) {
|
|
||||||
// _quickWindow->sendEvent(_quickWindow->activeFocusItem(), event);
|
|
||||||
if (QCoreApplication::sendEvent(_quickWindow, event)) {
|
if (QCoreApplication::sendEvent(_quickWindow, event)) {
|
||||||
return event->isAccepted();
|
return event->isAccepted();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue