mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 08:12:53 +02:00
Merge branch 'sysTraySetup' of https://github.com/roxanneskelly/hifi into sysTrayOsx
This commit is contained in:
commit
c370e064d9
12 changed files with 101 additions and 26 deletions
|
@ -68,6 +68,7 @@ if (USE_GLES AND (NOT ANDROID))
|
|||
set(DISABLE_QML_OPTION ON)
|
||||
endif()
|
||||
|
||||
|
||||
option(BUILD_CLIENT "Build client components" ${BUILD_CLIENT_OPTION})
|
||||
option(BUILD_SERVER "Build server components" ${BUILD_SERVER_OPTION})
|
||||
option(BUILD_TESTS "Build tests" ${BUILD_TESTS_OPTION})
|
||||
|
@ -162,7 +163,6 @@ if (BUILD_SERVER)
|
|||
set_target_properties(domain-server PROPERTIES FOLDER "Apps")
|
||||
add_subdirectory(ice-server)
|
||||
set_target_properties(ice-server PROPERTIES FOLDER "Apps")
|
||||
add_subdirectory(server-console)
|
||||
endif()
|
||||
|
||||
if (BUILD_CLIENT)
|
||||
|
@ -174,6 +174,7 @@ endif()
|
|||
|
||||
if (BUILD_CLIENT OR BUILD_SERVER)
|
||||
add_subdirectory(plugins)
|
||||
add_subdirectory(server-console)
|
||||
endif()
|
||||
|
||||
# BUILD_TOOLS option will be handled inside the tools's CMakeLists.txt because 'scribe' tool is required for build anyway
|
||||
|
|
|
@ -131,7 +131,7 @@ Rectangle {
|
|||
print("Marketplace item tester unsupported assetType " + assetType);
|
||||
}
|
||||
},
|
||||
"trash": function(){
|
||||
"trash": function(resource, assetType){
|
||||
if ("application" === assetType) {
|
||||
Commerce.uninstallApp(resource);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#define hifi_AudioHRTF_h
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
static const int HRTF_AZIMUTHS = 72; // 360 / 5-degree steps
|
||||
static const int HRTF_TAPS = 64; // minimum-phase FIR coefficients
|
||||
|
@ -56,6 +57,27 @@ public:
|
|||
void setGainAdjustment(float gain) { _gainAdjust = HRTF_GAIN * gain; };
|
||||
float getGainAdjustment() { return _gainAdjust; }
|
||||
|
||||
// clear internal state, but retain settings
|
||||
void reset() {
|
||||
// FIR history
|
||||
memset(_firState, 0, sizeof(_firState));
|
||||
|
||||
// integer delay history
|
||||
memset(_delayState, 0, sizeof(_delayState));
|
||||
|
||||
// biquad history
|
||||
memset(_bqState, 0, sizeof(_bqState));
|
||||
|
||||
// parameter history
|
||||
_azimuthState = 0.0f;
|
||||
_distanceState = 0.0f;
|
||||
_gainState = 0.0f;
|
||||
|
||||
// _gainAdjust is retained
|
||||
|
||||
_silentState = true;
|
||||
}
|
||||
|
||||
private:
|
||||
AudioHRTF(const AudioHRTF&) = delete;
|
||||
AudioHRTF& operator=(const AudioHRTF&) = delete;
|
||||
|
@ -88,7 +110,7 @@ private:
|
|||
// global and local gain adjustment
|
||||
float _gainAdjust = HRTF_GAIN;
|
||||
|
||||
bool _silentState = false;
|
||||
bool _silentState = true;
|
||||
};
|
||||
|
||||
#endif // AudioHRTF_h
|
||||
|
|
|
@ -187,6 +187,13 @@ void EntityTreeRenderer::resetEntitiesScriptEngine() {
|
|||
connect(entityScriptingInterface.data(), &EntityScriptingInterface::hoverLeaveEntity, _entitiesScriptEngine.data(), [&](const EntityItemID& entityID, const PointerEvent& event) {
|
||||
_entitiesScriptEngine->callEntityScriptMethod(entityID, "hoverLeaveEntity", event);
|
||||
});
|
||||
|
||||
connect(_entitiesScriptEngine.data(), &ScriptEngine::entityScriptPreloadFinished, [&](const EntityItemID& entityID) {
|
||||
EntityItemPointer entity = getTree()->findEntityByID(entityID);
|
||||
if (entity) {
|
||||
entity->setScriptHasFinishedPreload(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void EntityTreeRenderer::clear() {
|
||||
|
@ -512,7 +519,11 @@ bool EntityTreeRenderer::findBestZoneAndMaybeContainingEntities(QVector<EntityIt
|
|||
// be ignored because they can have events fired on them.
|
||||
// FIXME - this could be optimized further by determining if the script is loaded
|
||||
// and if it has either an enterEntity or leaveEntity method
|
||||
if (isZone || hasScript) {
|
||||
//
|
||||
// also, don't flag a scripted entity as containing the avatar until the script is loaded,
|
||||
// so that the script is awake in time to receive the "entityEntity" call (even if the entity is a zone).
|
||||
if ((!hasScript && isZone) ||
|
||||
(hasScript && entity->isScriptPreloadFinished())) {
|
||||
// now check to see if the point contains our entity, this can be expensive if
|
||||
// the entity has a collision hull
|
||||
if (entity->contains(_avatarPosition)) {
|
||||
|
@ -972,6 +983,7 @@ void EntityTreeRenderer::checkAndCallPreload(const EntityItemID& entityID, bool
|
|||
entity->scriptHasUnloaded();
|
||||
}
|
||||
if (shouldLoad) {
|
||||
entity->setScriptHasFinishedPreload(false);
|
||||
_entitiesScriptEngine->loadEntityScript(entityID, resolveScriptURL(scriptUrl), reload);
|
||||
entity->scriptHasPreloaded();
|
||||
}
|
||||
|
|
|
@ -97,10 +97,10 @@ void ShapeEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce
|
|||
withWriteLock([&] {
|
||||
auto entity = getEntity();
|
||||
_position = entity->getWorldPosition();
|
||||
_dimensions = entity->getScaledDimensions();
|
||||
_dimensions = entity->getUnscaledDimensions(); // get unscaled to avoid scaling twice
|
||||
_orientation = entity->getWorldOrientation();
|
||||
updateModelTransformAndBound();
|
||||
_renderTransform = getModelTransform();
|
||||
_renderTransform = getModelTransform(); // contains parent scale, if this entity scales with its parent
|
||||
if (_shape == entity::Sphere) {
|
||||
_renderTransform.postScale(SPHERE_ENTITY_SCALE);
|
||||
}
|
||||
|
|
|
@ -3197,3 +3197,26 @@ void EntityItem::setCloneIDs(const QVector<QUuid>& cloneIDs) {
|
|||
_cloneIDs = cloneIDs;
|
||||
});
|
||||
}
|
||||
|
||||
bool EntityItem::shouldPreloadScript() const {
|
||||
return !_script.isEmpty() && ((_loadedScript != _script) || (_loadedScriptTimestamp != _scriptTimestamp));
|
||||
}
|
||||
|
||||
void EntityItem::scriptHasPreloaded() {
|
||||
_loadedScript = _script;
|
||||
_loadedScriptTimestamp = _scriptTimestamp;
|
||||
}
|
||||
|
||||
void EntityItem::scriptHasUnloaded() {
|
||||
_loadedScript = "";
|
||||
_loadedScriptTimestamp = 0;
|
||||
_scriptPreloadFinished = false;
|
||||
}
|
||||
|
||||
void EntityItem::setScriptHasFinishedPreload(bool value) {
|
||||
_scriptPreloadFinished = value;
|
||||
}
|
||||
|
||||
bool EntityItem::isScriptPreloadFinished() {
|
||||
return _scriptPreloadFinished;
|
||||
}
|
||||
|
|
|
@ -470,10 +470,11 @@ public:
|
|||
/// We only want to preload if:
|
||||
/// there is some script, and either the script value or the scriptTimestamp
|
||||
/// value have changed since our last preload
|
||||
bool shouldPreloadScript() const { return !_script.isEmpty() &&
|
||||
((_loadedScript != _script) || (_loadedScriptTimestamp != _scriptTimestamp)); }
|
||||
void scriptHasPreloaded() { _loadedScript = _script; _loadedScriptTimestamp = _scriptTimestamp; }
|
||||
void scriptHasUnloaded() { _loadedScript = ""; _loadedScriptTimestamp = 0; }
|
||||
bool shouldPreloadScript() const;
|
||||
void scriptHasPreloaded();
|
||||
void scriptHasUnloaded();
|
||||
void setScriptHasFinishedPreload(bool value);
|
||||
bool isScriptPreloadFinished();
|
||||
|
||||
bool getClientOnly() const { return _clientOnly; }
|
||||
virtual void setClientOnly(bool clientOnly) { _clientOnly = clientOnly; }
|
||||
|
@ -584,6 +585,7 @@ protected:
|
|||
QString _script { ENTITY_ITEM_DEFAULT_SCRIPT }; /// the value of the script property
|
||||
QString _loadedScript; /// the value of _script when the last preload signal was sent
|
||||
quint64 _scriptTimestamp { ENTITY_ITEM_DEFAULT_SCRIPT_TIMESTAMP }; /// the script loaded property used for forced reload
|
||||
bool _scriptPreloadFinished { false };
|
||||
|
||||
QString _serverScripts;
|
||||
/// keep track of time when _serverScripts property was last changed
|
||||
|
|
|
@ -2442,6 +2442,8 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co
|
|||
// if we got this far, then call the preload method
|
||||
callEntityScriptMethod(entityID, "preload");
|
||||
|
||||
emit entityScriptPreloadFinished(entityID);
|
||||
|
||||
_occupiedScriptURLs.remove(entityScript);
|
||||
processDeferredEntityLoads(entityScript, entityID);
|
||||
}
|
||||
|
|
|
@ -712,6 +712,13 @@ signals:
|
|||
// script is updated (goes from RUNNING to ERROR_RUNNING_SCRIPT, for example)
|
||||
void entityScriptDetailsUpdated();
|
||||
|
||||
/**jsdoc
|
||||
* @function Script.entityScriptPreloadFinished
|
||||
* @returns {Signal}
|
||||
*/
|
||||
// Emitted when an entity script has finished running preload
|
||||
void entityScriptPreloadFinished(const EntityItemID& entityID);
|
||||
|
||||
protected:
|
||||
void init();
|
||||
|
||||
|
|
|
@ -73,21 +73,22 @@ Script.include("/~/system/libraries/utils.js");
|
|||
method: "clearSelection",
|
||||
hand: hand
|
||||
}));
|
||||
} else {
|
||||
if (this.selectedTarget.type === Picks.INTERSECTED_ENTITY) {
|
||||
Messages.sendLocalMessage("entityToolUpdates", JSON.stringify({
|
||||
method: "selectEntity",
|
||||
entityID: this.selectedTarget.objectID,
|
||||
hand: hand
|
||||
}));
|
||||
} else if (this.selectedTarget.type === Picks.INTERSECTED_OVERLAY) {
|
||||
Messages.sendLocalMessage("entityToolUpdates", JSON.stringify({
|
||||
method: "selectOverlay",
|
||||
overlayID: this.selectedTarget.objectID,
|
||||
hand: hand
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.selectedTarget.type === Picks.INTERSECTED_ENTITY) {
|
||||
Messages.sendLocalMessage("entityToolUpdates", JSON.stringify({
|
||||
method: "selectEntity",
|
||||
entityID: this.selectedTarget.objectID,
|
||||
hand: hand
|
||||
}));
|
||||
} else if (this.selectedTarget.type === Picks.INTERSECTED_OVERLAY) {
|
||||
Messages.sendLocalMessage("entityToolUpdates", JSON.stringify({
|
||||
method: "selectOverlay",
|
||||
overlayID: this.selectedTarget.objectID,
|
||||
hand: hand
|
||||
}));
|
||||
}
|
||||
|
||||
this.triggerClicked = true;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
var WAITING_INTERVAL = 100; // ms
|
||||
var CONNECTING_INTERVAL = 100; // ms
|
||||
var MAKING_CONNECTION_TIMEOUT = 800; // ms
|
||||
var CONNECTING_TIME = 1600; // ms
|
||||
var CONNECTING_TIME = 100; // ms One interval.
|
||||
var PARTICLE_RADIUS = 0.15; // m
|
||||
var PARTICLE_ANGLE_INCREMENT = 360 / 45; // 1hz
|
||||
var HANDSHAKE_SOUND_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/davidkelly/production/audio/4beat_sweep.wav";
|
||||
|
|
|
@ -19,7 +19,13 @@ set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Server Console")
|
|||
set_target_properties(${TARGET_NAME}-npm-install PROPERTIES FOLDER "hidden/Server Console")
|
||||
|
||||
# add a dependency from the package target to the server components
|
||||
add_dependencies(${TARGET_NAME} assignment-client domain-server interface)
|
||||
if (BUILD_CLIENT)
|
||||
add_dependencies(${TARGET_NAME} interface)
|
||||
endif()
|
||||
|
||||
if (BUILD_SERVER)
|
||||
add_dependencies(${TARGET_NAME} assignment-client domain-server interface)
|
||||
endif()
|
||||
|
||||
# set the packaged console folder depending on platform, so we can copy it
|
||||
if (APPLE)
|
||||
|
@ -49,7 +55,6 @@ elseif (WIN32)
|
|||
DIRECTORY "${CONSOLE_DESTINATION}/"
|
||||
DESTINATION ${CONSOLE_INSTALL_DIR}
|
||||
COMPONENT ${SERVER_COMPONENT}
|
||||
COMPONENT ${CLIENT_COMPONENT}
|
||||
)
|
||||
install(
|
||||
DIRECTORY "${CONSOLE_DESTINATION}/"
|
||||
|
|
Loading…
Reference in a new issue