mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 01:22:08 +02:00
Merge branch 'kasen/core' into feature/default-nametag
This commit is contained in:
commit
68d9ec81d9
30 changed files with 214 additions and 130 deletions
|
@ -976,15 +976,18 @@ while (true) {
|
|||
|
||||
#### [4.3.4] Source files (header and implementation) must include a boilerplate.
|
||||
|
||||
Boilerplates should include the filename, location, creator, copyright, and Apache 2.0 License information and be placed at the top of the file.
|
||||
Boilerplates should include the filename, location, creator, copyright Project Athena contributors, and Apache 2.0 License
|
||||
information. This should be placed at the top of the file. If editing an existing file that is copyright High Fidelity, add a
|
||||
second copyright line, copyright Project Athena contributors.
|
||||
|
||||
```cpp
|
||||
//
|
||||
// NodeList.h
|
||||
// libraries/shared/src
|
||||
//
|
||||
// Created by Stephen Birarda on 2/15/13.
|
||||
// Created by Stephen Birarda on 15 Feb 2013.
|
||||
// Copyright 2013 High Fidelity, Inc.
|
||||
// Copyright 2020 Project Athena contributors.
|
||||
//
|
||||
// This is where you could place an optional one line comment about the file.
|
||||
//
|
||||
|
|
60
README.md
60
README.md
|
@ -1,56 +1,54 @@
|
|||
# Project Athena
|
||||
# Project Athena
|
||||
|
||||
#### v0.86.0 K1 (12/3/19)
|
||||
### What is this?
|
||||
|
||||
* Audio Buffer choppy audio bugfix by increasing the buffer size.
|
||||
* User Activity Logger disabled, option in code to log the reports to console.
|
||||
* CMakeLists.txt configured to work for Polyvox, Interface JSDocs. (may be obsolete)
|
||||
* Custom Application Title.
|
||||
* Entity Script Whitelist, no scripts are whitelisted by default.
|
||||
* Background CMD outputs full log, instant close of application on closing of the CMD-line.
|
||||
Project Athena is a 3D social software project seeking to incrementally bring about a truly free and open metaverse, in desktop and XR.
|
||||
|
||||
### [Download](https://projectathena.io/download-athena/)
|
||||
|
||||
### Releases
|
||||
|
||||
#### v0.86.0 K2 (TBD)
|
||||
|
||||
##### Features, Bugs, and Housekeeping
|
||||
Check out the releases page for more information!
|
||||
|
||||
### Whitelist Instructions
|
||||
#### v0.86.0 K1 (12/3/19)
|
||||
|
||||
The whitelist checks every entity-script attempting to run on your client against a list of domains, their subfolders, or the specific script URL entirely.
|
||||
* Audio Buffer choppy audio bugfix by increasing the buffer size.
|
||||
* User Activity Logger disabled, option in code to log the reports to console.
|
||||
* CMakeLists.txt configured to work for Polyvox, Interface JSDocs. (May be obsolete.)
|
||||
* Custom Application Title.
|
||||
* Entity Script Whitelist, no scripts are whitelisted by default.
|
||||
* Background CMD outputs full log, instant close of application on closing of the CMD-line.
|
||||
|
||||
The Interface has the whitelist settings under "**Settings -> Entity Script Whitelist**" for you to configure live. The whitelist checks against the domains literally, so you have to be precise to ensure security and functionality. For example, the difference between "http://" and "https://" matters as those will be seen as two different domains in the eyes of the whitelist. Separate each URL by a new line.
|
||||
|
||||
Do not use spaces or commas in the whitelist interface, you will only separate by commas and not new lines in the environment variables.
|
||||
|
||||
You can also set the Windows environment variable "**EXTRA_WHITELIST**" with your whitelisted domains comma separated like so: "**http://mpassets.highfidelity.com/,https://raw.githubusercontent.com/highfidelity/,https://hifi-content.s3.amazonaws.com/**"
|
||||
|
||||
Alternatively you can make a batch file placed in the same folder as interface.exe that sets the whitelist environment variable temporarily:
|
||||
|
||||
```
|
||||
set "EXTRA_WHITELIST=http://mpassets.highfidelity.com/,https://raw.githubusercontent.com/highfidelity/,https://hifi-content.s3.amazonaws.com/"
|
||||
interface.exe
|
||||
```
|
||||
|
||||
### How to build interface.exe
|
||||
### How to build the Interface
|
||||
|
||||
[For Windows](https://github.com/kasenvr/project-athena/blob/kasen/core/BUILD_WIN.md)
|
||||
|
||||
[For Linux](https://github.com/kasenvr/project-athena/blob/kasen/core/BUILD_LINUX.md)
|
||||
|
||||
[For Linux - Athena Builder](https://github.com/daleglass/athena-builder)
|
||||
|
||||
### Boot to Metaverse: The Goal
|
||||
|
||||
Too many of us have our own personal combinations of High Fidelity from C++ modifications to different default scripts, all of which are lost to time as their fullest potential is never truly shared and propagated through the system.
|
||||
Having a place to experience adventure, a place to relax with calm breath, that's a world to live in. An engine to support infinite combinations and possibilities of worlds without censorship and interruption, that's a metaverse. Finding a way to make infinite realities our reality, that's the dream.
|
||||
|
||||
The goal of this repo is to give a common area to PR the very best of our findings and creations so that we may effectively take each necessary step towards our common goal of living in a true metaverse.
|
||||
### Boot to Metaverse: The Technicals
|
||||
|
||||
### Why High Fidelity's Engine?
|
||||
Many developers have personal combinations of High Fidelity from C++ modifications to different default scripts, all of which are lost to time as their fullest potential is never truly shared and propagated through the system.
|
||||
|
||||
Because of all the options, it is the only starting point that is open-source, cross-platform, fully VR integrated + fully desktop integrated with an aim for quality visuals and performance. It also does us the service of providing a foundation to start from such as entity management, full body IK, etc.
|
||||
The goal of this project is to achieve the metaverse dream through shared contribution and building. Setting goals that are achievable yet meaningful is key to making proper forward progress on the technical front whilst maintaining morale.
|
||||
|
||||
WebXR offers the open-source and decentralized aspect but does not have any of the full featured starting points such as avatars, IK, etc.
|
||||
### Why High Fidelity's Virtual Reality Platform?
|
||||
|
||||
Platforms like NeosVR or VRChat are unusable from go due to their fundamental closed-source and centralized nature. A metaverse to live on cannot have the keys handed over to any one entity, if any at all.
|
||||
Because of all the options, it is the only starting point that is open-source, cross-platform, fully VR integrated + fully desktop integrated with an aim for quality visuals and performance. It also provides a foundation to build from including components like entity management, full body IK, etc.
|
||||
|
||||
So the necessary desire is to use High Fidelity as our foundation as a community of one, of all to build a metaverse worth living in.
|
||||
WebXR offers the open-source and decentralized aspect but does not have any of the full featured starting points such as avatars, IK, etc. which means that a lot of ground work will have to be laid to make something functional. Far more work will need to be done to create a truly seamless and extensive experience as well.
|
||||
|
||||
Platforms like NeosVR or VRChat are not viable from go due to their fundamental closed-source and centralized nature. A metaverse to live in cannot have the keys handed over to any singular entity, if any at all.
|
||||
|
||||
We need to do the best we can with what we've got and our best bet as open source developers is to not redesign the wheel if we can help it!
|
||||
|
||||
### Contribution
|
||||
|
||||
|
|
|
@ -61,4 +61,12 @@ endif ()
|
|||
|
||||
if (APPLE)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
# Static libs result in duplicated constructor and destructor calls on Linux
|
||||
# and crashes on exit, and perhaps loss of global state on plugin loads.
|
||||
#
|
||||
# This will need to be looked at closely before Linux can have a static build.
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif ()
|
||||
|
|
|
@ -142,6 +142,9 @@ if (APPLE)
|
|||
list(APPEND INTERFACE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/icon/${INTERFACE_ICON_FILENAME})
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif ()
|
||||
|
||||
# create the executable, make it a bundle on OS X
|
||||
if (APPLE)
|
||||
|
@ -156,7 +159,7 @@ elseif (WIN32)
|
|||
set(CONFIGURE_ICON_RC_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Icon.rc")
|
||||
configure_file("${HF_CMAKE_DIR}/templates/Icon.rc.in" ${CONFIGURE_ICON_RC_OUTPUT})
|
||||
|
||||
set(APP_FULL_NAME "High Fidelity")
|
||||
set(APP_FULL_NAME "Project Athena")
|
||||
set(CONFIGURE_VERSION_INFO_RC_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.rc")
|
||||
configure_file("${HF_CMAKE_DIR}/templates/VersionInfo.rc.in" ${CONFIGURE_VERSION_INFO_RC_OUTPUT})
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import controlsUit 1.0
|
|||
|
||||
WebView {
|
||||
id: webview
|
||||
url: "https://highfidelity.com/"
|
||||
url: "https://projectathena.io/"
|
||||
profile: FileTypeProfile;
|
||||
|
||||
property var parentRoot: null
|
||||
|
|
|
@ -44,7 +44,6 @@ Rectangle {
|
|||
return (root.parent !== null) && root.parent.objectName == "loader";
|
||||
}
|
||||
|
||||
|
||||
property bool isVR: AudioScriptingInterface.context === "VR"
|
||||
property real rightMostInputLevelPos: root.width
|
||||
//placeholder for control sizes and paddings
|
||||
|
@ -128,16 +127,16 @@ Rectangle {
|
|||
anchors.top: flickView.top;
|
||||
anchors.right: flickView.right;
|
||||
anchors.bottom: flickView.bottom;
|
||||
anchors.rightMargin: -verticalScrollWidth; //compensate flickView's right margin
|
||||
z: 100 // Display over top of separators.
|
||||
|
||||
background: Item {
|
||||
implicitWidth: verticalScrollWidth;
|
||||
Rectangle {
|
||||
color: hifi.colors.darkGray30;
|
||||
color: hifi.colors.baseGrayShadow
|
||||
radius: 4;
|
||||
anchors {
|
||||
fill: parent;
|
||||
topMargin: -1; // Finesse size
|
||||
bottomMargin: -2;
|
||||
topMargin: 2 // Finess position
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -148,9 +147,7 @@ Rectangle {
|
|||
color: hifi.colors.white30;
|
||||
anchors {
|
||||
fill: parent;
|
||||
leftMargin: 2; // Finesse size and position.
|
||||
topMargin: 1;
|
||||
bottomMargin: 1;
|
||||
topMargin: 1; // Finesse position.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -338,7 +335,6 @@ Rectangle {
|
|||
anchors.topMargin: 10;
|
||||
}
|
||||
|
||||
|
||||
Item {
|
||||
id: inputDeviceHeader
|
||||
x: margins.paddings;
|
||||
|
@ -688,4 +684,5 @@ Rectangle {
|
|||
anchors.topMargin: 10;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
//
|
||||
|
||||
import QtQuick 2.5
|
||||
import QtQuick.Controls 2.2
|
||||
|
||||
import "."
|
||||
import "./preferences"
|
||||
|
@ -33,7 +34,10 @@ Item {
|
|||
property bool gotoPreviousAppFromScript: false
|
||||
|
||||
property var tablet;
|
||||
|
||||
|
||||
readonly property real verticalScrollWidth: 10
|
||||
readonly property real verticalScrollShaft: 8
|
||||
|
||||
function saveAll() {
|
||||
dialog.forceActiveFocus(); // Accept any text box edits in progress.
|
||||
|
||||
|
@ -103,6 +107,43 @@ Item {
|
|||
height: parent.height
|
||||
contentWidth: parent.width
|
||||
contentHeight: getSectionsHeight();
|
||||
|
||||
anchors.top: main.top
|
||||
anchors.bottom: main.bottom
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
policy: ScrollBar.AlwaysOn
|
||||
parent: scrollView.parent
|
||||
anchors.top: scrollView.top
|
||||
anchors.right: scrollView.right
|
||||
anchors.bottom: scrollView.bottom
|
||||
z: 100 // Display over top of separators.
|
||||
|
||||
background: Item {
|
||||
implicitWidth: verticalScrollWidth
|
||||
Rectangle {
|
||||
color: hifi.colors.baseGrayShadow
|
||||
radius: 4
|
||||
anchors {
|
||||
fill: parent
|
||||
bottomMargin: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
contentItem: Item {
|
||||
implicitWidth: verticalScrollShaft
|
||||
Rectangle {
|
||||
radius: verticalScrollShaft/2
|
||||
color: hifi.colors.white30
|
||||
anchors {
|
||||
fill: parent
|
||||
topMargin: 1
|
||||
bottomMargin: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
width: 480
|
||||
Component {
|
||||
|
@ -183,7 +224,7 @@ Item {
|
|||
for (var i = 0; i < sections.length; i++) {
|
||||
totalHeight += sections[i].height + sections[i].getPreferencesHeight();
|
||||
}
|
||||
var bottomPadding = 170;
|
||||
var bottomPadding = 30;
|
||||
return (totalHeight + bottomPadding);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,11 +97,10 @@ Windows.Window {
|
|||
background: Item {
|
||||
implicitWidth: verticalScrollWidth
|
||||
Rectangle {
|
||||
color: hifi.colors.darkGray30
|
||||
color: hifi.colors.baseGrayShadow
|
||||
radius: 4
|
||||
anchors {
|
||||
fill: parent
|
||||
topMargin: -1 // Finesse size
|
||||
bottomMargin: -2
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +112,6 @@ Windows.Window {
|
|||
color: hifi.colors.white30
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: 2 // Finesse size and position.
|
||||
topMargin: 1
|
||||
bottomMargin: 1
|
||||
}
|
||||
|
|
|
@ -512,27 +512,6 @@ std::atomic<uint64_t> DeadlockWatchdogThread::_maxElapsed;
|
|||
std::atomic<int> DeadlockWatchdogThread::_maxElapsedAverage;
|
||||
ThreadSafeMovingAverage<int, DeadlockWatchdogThread::HEARTBEAT_SAMPLES> DeadlockWatchdogThread::_movingAverage;
|
||||
|
||||
bool isDomainURL(QUrl url) {
|
||||
if (!url.isValid()) {
|
||||
return false;
|
||||
}
|
||||
if (url.scheme() == URL_SCHEME_HIFI) {
|
||||
return true;
|
||||
}
|
||||
if (url.scheme() != HIFI_URL_SCHEME_FILE) {
|
||||
// TODO -- once Octree::readFromURL no-longer takes over the main event-loop, serverless-domain urls can
|
||||
// be loaded over http(s)
|
||||
// && url.scheme() != HIFI_URL_SCHEME_HTTP &&
|
||||
// url.scheme() != HIFI_URL_SCHEME_HTTPS
|
||||
return false;
|
||||
}
|
||||
if (url.path().endsWith(".json", Qt::CaseInsensitive) ||
|
||||
url.path().endsWith(".json.gz", Qt::CaseInsensitive)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
static const UINT UWM_IDENTIFY_INSTANCES =
|
||||
RegisterWindowMessage("UWM_IDENTIFY_INSTANCES_{8AB82783-B74A-4258-955B-8188C22AA0D6}_" + qgetenv("USERNAME"));
|
||||
|
@ -564,14 +543,6 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
if (message->message == WM_COPYDATA) {
|
||||
COPYDATASTRUCT* pcds = (COPYDATASTRUCT*)(message->lParam);
|
||||
QUrl url = QUrl((const char*)(pcds->lpData));
|
||||
if (isDomainURL(url)) {
|
||||
DependencyManager::get<AddressManager>()->handleLookupString(url.toString());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Attempting to close MIDI interfaces of a hot-unplugged device can result in audio-driver deadlock.
|
||||
// Detecting MIDI devices that have been added/removed after starting Inteface has been disabled.
|
||||
// https://support.microsoft.com/en-us/help/4460006/midi-device-app-hangs-when-former-midi-api-is-used
|
||||
|
@ -3185,7 +3156,7 @@ void Application::showLoginScreen() {
|
|||
QJsonObject loginData = {};
|
||||
loginData["action"] = "login dialog popped up";
|
||||
UserActivityLogger::getInstance().logAction("encourageLoginDialog", loginData);
|
||||
_window->setWindowTitle("High Fidelity");
|
||||
_window->setWindowTitle("Project Athena");
|
||||
} else {
|
||||
resumeAfterLoginDialogActionTaken();
|
||||
}
|
||||
|
@ -4059,7 +4030,7 @@ void Application::setIsServerlessMode(bool serverlessDomain) {
|
|||
}
|
||||
}
|
||||
|
||||
std::map<QString, QString> Application::prepareServerlessDomainContents(QUrl domainURL) {
|
||||
std::map<QString, QString> Application::prepareServerlessDomainContents(QUrl domainURL, QByteArray data) {
|
||||
QUuid serverlessSessionID = QUuid::createUuid();
|
||||
getMyAvatar()->setSessionUUID(serverlessSessionID);
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
|
@ -4070,14 +4041,13 @@ std::map<QString, QString> Application::prepareServerlessDomainContents(QUrl dom
|
|||
permissions.setAll(true);
|
||||
nodeList->setPermissions(permissions);
|
||||
|
||||
// we can't import directly into the main tree because we would need to lock it, and
|
||||
// Octree::readFromURL calls loop.exec which can run code which will also attempt to lock the tree.
|
||||
// FIXME: Lock the main tree and import directly into it.
|
||||
EntityTreePointer tmpTree(new EntityTree());
|
||||
tmpTree->setIsServerlessMode(true);
|
||||
tmpTree->createRootElement();
|
||||
auto myAvatar = getMyAvatar();
|
||||
tmpTree->setMyAvatar(myAvatar);
|
||||
bool success = tmpTree->readFromURL(domainURL.toString());
|
||||
bool success = tmpTree->readFromByteArray(domainURL.toString(), data);
|
||||
if (success) {
|
||||
tmpTree->reaverageOctreeElements();
|
||||
tmpTree->sendEntities(&_entityEditSender, getEntities()->getTree(), 0, 0, 0);
|
||||
|
@ -4100,12 +4070,26 @@ void Application::loadServerlessDomain(QUrl domainURL) {
|
|||
return;
|
||||
}
|
||||
|
||||
auto namedPaths = prepareServerlessDomainContents(domainURL);
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
QString trimmedUrl = domainURL.toString().trimmed();
|
||||
bool DEFAULT_IS_OBSERVABLE = true;
|
||||
const qint64 DEFAULT_CALLER_ID = -1;
|
||||
auto request = DependencyManager::get<ResourceManager>()->createResourceRequest(
|
||||
this, trimmedUrl, DEFAULT_IS_OBSERVABLE, DEFAULT_CALLER_ID, "Application::loadServerlessDomain");
|
||||
|
||||
nodeList->getDomainHandler().connectedToServerless(namedPaths);
|
||||
if (!request) {
|
||||
return;
|
||||
}
|
||||
|
||||
_fullSceneReceivedCounter++;
|
||||
connect(request, &ResourceRequest::finished, this, [=]() {
|
||||
if (request->getResult() == ResourceRequest::Success) {
|
||||
auto namedPaths = prepareServerlessDomainContents(domainURL, request->getData());
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
nodeList->getDomainHandler().connectedToServerless(namedPaths);
|
||||
_fullSceneReceivedCounter++;
|
||||
}
|
||||
request->deleteLater();
|
||||
});
|
||||
request->send();
|
||||
}
|
||||
|
||||
void Application::loadErrorDomain(QUrl domainURL) {
|
||||
|
@ -4114,16 +4098,7 @@ void Application::loadErrorDomain(QUrl domainURL) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (domainURL.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto namedPaths = prepareServerlessDomainContents(domainURL);
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
|
||||
nodeList->getDomainHandler().loadedErrorDomain(namedPaths);
|
||||
|
||||
_fullSceneReceivedCounter++;
|
||||
loadServerlessDomain(domainURL);
|
||||
}
|
||||
|
||||
bool Application::importImage(const QString& urlString) {
|
||||
|
@ -5542,6 +5517,8 @@ bool Application::importEntities(const QString& urlOrFilename, const bool isObse
|
|||
_entityClipboard->withWriteLock([&] {
|
||||
_entityClipboard->eraseAllOctreeElements();
|
||||
|
||||
// FIXME: readFromURL() can take over the main event loop which may cause problems, especially if downloading the JSON
|
||||
// from the Web.
|
||||
success = _entityClipboard->readFromURL(urlOrFilename, isObservable, callerId);
|
||||
if (success) {
|
||||
_entityClipboard->reaverageOctreeElements();
|
||||
|
@ -9259,7 +9236,7 @@ void Application::readArgumentsFromLocalSocket() const {
|
|||
|
||||
// If we received a message, try to open it as a URL
|
||||
if (message.length() > 0) {
|
||||
DependencyManager::get<WindowScriptingInterface>()->openUrl(QString::fromUtf8(message));
|
||||
DependencyManager::get<AddressManager>()->handleLookupString(QString::fromUtf8(message));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ public slots:
|
|||
void setPreferredCursor(const QString& cursor);
|
||||
|
||||
void setIsServerlessMode(bool serverlessDomain);
|
||||
std::map<QString, QString> prepareServerlessDomainContents(QUrl domainURL);
|
||||
std::map<QString, QString> prepareServerlessDomainContents(QUrl domainURL, QByteArray data);
|
||||
|
||||
void loadServerlessDomain(QUrl domainURL);
|
||||
void loadErrorDomain(QUrl domainURL);
|
||||
|
|
|
@ -262,7 +262,9 @@ int main(int argc, const char* argv[]) {
|
|||
if (socket.waitForConnected(LOCAL_SERVER_TIMEOUT_MS)) {
|
||||
if (parser.isSet(urlOption)) {
|
||||
QUrl url = QUrl(parser.value(urlOption));
|
||||
if (url.isValid() && (url.scheme() == URL_SCHEME_HIFI || url.scheme() == URL_SCHEME_HIFIAPP)) {
|
||||
if (url.isValid() && (url.scheme() == URL_SCHEME_HIFI || url.scheme() == URL_SCHEME_HIFIAPP
|
||||
|| url.scheme() == HIFI_URL_SCHEME_HTTP || url.scheme() == HIFI_URL_SCHEME_HTTPS
|
||||
|| url.scheme() == HIFI_URL_SCHEME_FILE)) {
|
||||
qDebug() << "Writing URL to local socket";
|
||||
socket.write(url.toString().toUtf8());
|
||||
if (!socket.waitForBytesWritten(5000)) {
|
||||
|
|
|
@ -31,6 +31,8 @@ public:
|
|||
surfaceNormal = stylusPickResult.surfaceNormal;
|
||||
}
|
||||
|
||||
StylusPickResult& operator=(const StylusPickResult &right) = default;
|
||||
|
||||
IntersectionType type { NONE };
|
||||
bool intersects { false };
|
||||
QUuid objectID;
|
||||
|
|
|
@ -162,6 +162,7 @@ protected:
|
|||
const QString& typeVarIn, const QString& weightVarIn, float weightIn, const std::vector<float>& flexCoefficientsIn,
|
||||
const QString& poleVectorEnabledVar, const QString& poleReferenceVectorVar, const QString& poleVectorVar);
|
||||
IKTargetVar(const IKTargetVar& orig);
|
||||
AnimInverseKinematics::IKTargetVar& operator=(const AnimInverseKinematics::IKTargetVar&) = default;
|
||||
|
||||
QString jointName;
|
||||
QString positionVar;
|
||||
|
|
|
@ -1366,7 +1366,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* var METERS_TO_INCHES = 39.3701;
|
||||
* var entity = Entities.addEntity({
|
||||
* type: "Web",
|
||||
* sourceUrl: "https://highfidelity.com/",
|
||||
* sourceUrl: "https://projectathena.io/",
|
||||
* position: Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0.75, z: -4 })),
|
||||
* rotation: MyAvatar.orientation,
|
||||
* dimensions: {
|
||||
|
|
|
@ -121,6 +121,8 @@ public:
|
|||
static void propertiesToBlob(QScriptEngine& scriptEngine, const QUuid& myAvatarID, const EntityItemProperties& properties, QByteArray& blob);
|
||||
|
||||
EntityItemProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags());
|
||||
EntityItemProperties(const EntityItemProperties&) = default;
|
||||
|
||||
virtual ~EntityItemProperties() = default;
|
||||
|
||||
void merge(const EntityItemProperties& other);
|
||||
|
|
|
@ -112,6 +112,7 @@ public:
|
|||
|
||||
SimulationOwner();
|
||||
SimulationOwner(const QUuid& id, uint8_t priority);
|
||||
SimulationOwner(const SimulationOwner &) = default;
|
||||
|
||||
const QUuid& getID() const { return _id; }
|
||||
const uint64_t& getExpiry() const { return _expiry; }
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace image {
|
|||
Image() : _dims(0,0) {}
|
||||
Image(int width, int height, Format format);
|
||||
Image(const QImage& data) : _packedData(data), _dims(data.width(), data.height()), _format((Format)data.format()) {}
|
||||
|
||||
Image(const Image &other) = default;
|
||||
void operator=(const QImage& other) {
|
||||
_packedData = other;
|
||||
_floatData.clear();
|
||||
|
|
|
@ -157,6 +157,7 @@ void AddressManager::storeCurrentAddress() {
|
|||
auto url = currentAddress();
|
||||
|
||||
if (url.scheme() == HIFI_URL_SCHEME_FILE ||
|
||||
url.scheme() == HIFI_URL_SCHEME_HTTP || url.scheme() == HIFI_URL_SCHEME_HTTPS ||
|
||||
(url.scheme() == URL_SCHEME_HIFI && !url.host().isEmpty())) {
|
||||
// TODO -- once Octree::readFromURL no-longer takes over the main event-loop, serverless-domain urls can
|
||||
// be loaded over http(s)
|
||||
|
@ -358,13 +359,11 @@ bool AddressManager::handleUrl(const QUrl& lookupUrlIn, LookupTrigger trigger) {
|
|||
emit lookupResultsFinished();
|
||||
|
||||
return true;
|
||||
} else if (lookupUrl.scheme() == HIFI_URL_SCHEME_FILE) {
|
||||
// TODO -- once Octree::readFromURL no-longer takes over the main event-loop, serverless-domain urls can
|
||||
// be loaded over http(s)
|
||||
// lookupUrl.scheme() == URL_SCHEME_HTTP ||
|
||||
// lookupUrl.scheme() == HIFI_URL_SCHEME_HTTPS ||
|
||||
// TODO once a file can return a connection refusal if there were to be some kind of load error, we'd
|
||||
// need to store the previous domain tried in _lastVisitedURL. For now , do not store it.
|
||||
} else if (lookupUrl.scheme() == HIFI_URL_SCHEME_FILE || lookupUrl.scheme() == HIFI_URL_SCHEME_HTTPS
|
||||
|| lookupUrl.scheme() == HIFI_URL_SCHEME_HTTP) {
|
||||
|
||||
// Save the last visited domain URL.
|
||||
_lastVisitedURL = lookupUrl;
|
||||
|
||||
_previousAPILookup.clear();
|
||||
_shareablePlaceName.clear();
|
||||
|
|
|
@ -209,7 +209,9 @@ void DomainHandler::setURLAndID(QUrl domainURL, QUuid domainID) {
|
|||
}
|
||||
|
||||
// if it's in the error state, reset and try again.
|
||||
if ((_domainURL != domainURL || _sockAddr.getPort() != domainPort) || _isInErrorState) {
|
||||
if (_domainURL != domainURL
|
||||
|| (_sockAddr.getPort() != domainPort && domainURL.scheme() == URL_SCHEME_HIFI)
|
||||
|| _isInErrorState) {
|
||||
// re-set the domain info so that auth information is reloaded
|
||||
hardReset("Changing domain URL");
|
||||
|
||||
|
|
|
@ -738,7 +738,6 @@ bool Octree::readFromURL(
|
|||
) {
|
||||
QString trimmedUrl = urlString.trimmed();
|
||||
QString marketplaceID = getMarketplaceID(trimmedUrl);
|
||||
qDebug() << "!!!!! going to createResourceRequest " << callerId;
|
||||
auto request = std::unique_ptr<ResourceRequest>(
|
||||
DependencyManager::get<ResourceManager>()->createResourceRequest(
|
||||
this, trimmedUrl, isObservable, callerId, "Octree::readFromURL"));
|
||||
|
@ -770,6 +769,24 @@ bool Octree::readFromURL(
|
|||
return readFromStream(data.size(), inputStream, marketplaceID);
|
||||
}
|
||||
|
||||
bool Octree::readFromByteArray(
|
||||
const QString& urlString,
|
||||
const QByteArray& data
|
||||
) {
|
||||
QString trimmedUrl = urlString.trimmed();
|
||||
QString marketplaceID = getMarketplaceID(trimmedUrl);
|
||||
|
||||
QByteArray uncompressedJsonData;
|
||||
bool wasCompressed = gunzip(data, uncompressedJsonData);
|
||||
|
||||
if (wasCompressed) {
|
||||
QDataStream inputStream(uncompressedJsonData);
|
||||
return readFromStream(uncompressedJsonData.size(), inputStream, marketplaceID);
|
||||
}
|
||||
|
||||
QDataStream inputStream(data);
|
||||
return readFromStream(data.size(), inputStream, marketplaceID);
|
||||
}
|
||||
|
||||
bool Octree::readFromStream(
|
||||
uint64_t streamLength,
|
||||
|
|
|
@ -217,6 +217,7 @@ public:
|
|||
// Octree importers
|
||||
bool readFromFile(const char* filename);
|
||||
bool readFromURL(const QString& url, const bool isObservable = true, const qint64 callerId = -1); // will support file urls as well...
|
||||
bool readFromByteArray(const QString& url, const QByteArray& byteArray);
|
||||
bool readFromStream(uint64_t streamLength, QDataStream& inputStream, const QString& marketplaceID="");
|
||||
bool readSVOFromStream(uint64_t streamLength, QDataStream& inputStream);
|
||||
bool readJSONFromStream(uint64_t streamLength, QDataStream& inputStream, const QString& marketplaceID="");
|
||||
|
|
|
@ -412,7 +412,7 @@ void ScriptEngines::stopAllScripts(bool restart) {
|
|||
continue;
|
||||
}
|
||||
|
||||
bool isOverrideScript = it.key().toString().compare(this->_defaultScriptsOverride.toString());
|
||||
bool isOverrideScript = it.key().toString().compare(this->_defaultScriptsOverride.toString()) == 0;
|
||||
// queue user scripts if restarting
|
||||
if (restart && (scriptEngine->isUserLoaded() || isOverrideScript)) {
|
||||
_isReloading = true;
|
||||
|
|
|
@ -19,6 +19,8 @@ public:
|
|||
|
||||
CubicHermiteSplineFunctor(const CubicHermiteSplineFunctor& orig) : _p0(orig._p0), _m0(orig._m0), _p1(orig._p1), _m1(orig._m1) {}
|
||||
|
||||
CubicHermiteSplineFunctor& operator=(const CubicHermiteSplineFunctor&) = default;
|
||||
|
||||
virtual ~CubicHermiteSplineFunctor() {}
|
||||
|
||||
// evalute the hermite curve at parameter t (0..1)
|
||||
|
@ -85,6 +87,8 @@ public:
|
|||
memcpy(_values, orig._values, sizeof(float) * (NUM_SUBDIVISIONS + 1));
|
||||
}
|
||||
|
||||
CubicHermiteSplineFunctorWithArcLength& operator=(const CubicHermiteSplineFunctorWithArcLength&) = default;
|
||||
|
||||
// given the spline parameter (0..1) output the arcLength of the spline up to that point.
|
||||
float arcLength(float t) const {
|
||||
float index = t * NUM_SUBDIVISIONS;
|
||||
|
|
|
@ -48,6 +48,7 @@ public:
|
|||
webMediaTypes(mediaType.webMediaTypes),
|
||||
fileSignatures(mediaType.fileSignatures) {
|
||||
}
|
||||
MediaType& operator=(const MediaType&) = default;
|
||||
|
||||
static MediaType NONE;
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
* @returns {TabletProxy} The tablet instance.
|
||||
* @example <caption>Display the High Fidelity home page on the system tablet.</caption>
|
||||
* var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
* tablet.gotoWebScreen("https://highfidelity.com/");
|
||||
* tablet.gotoWebScreen("https://projectathena.io/");
|
||||
*/
|
||||
Q_INVOKABLE TabletProxy* getTablet(const QString& tabletId);
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ Script.setInterval(function () {
|
|||
if (isModel) {
|
||||
properties.modelURL = type;
|
||||
} else if (type === 'Web') {
|
||||
properties.sourceUrl = 'https://highfidelity.com';
|
||||
properties.sourceUrl = 'https://projectathena.io';
|
||||
} else {
|
||||
properties.color = { red: x / ROWS_X * 255, green: y / ROWS_Y * 255, blue: z / ROWS_Z * 255 };
|
||||
if (type === 'ParticleEffect') {
|
||||
|
|
|
@ -44,7 +44,7 @@ var muted = Settings.getValue(settingsRoot + "/muted", {"Local": false, "Domain"
|
|||
|
||||
var ws;
|
||||
var wsReady = false;
|
||||
var WEB_SOCKET_URL = "ws://gridchat.darlingvr.club:8090"; // WebSocket for Grid chat.
|
||||
var WEB_SOCKET_URL = "ws://chat.projectathena.io:8880"; // WebSocket for Grid chat.
|
||||
var shutdownBool = false;
|
||||
|
||||
var defaultColour = {red: 255, green: 255, blue: 255};
|
||||
|
@ -575,4 +575,4 @@ function shutdown() {
|
|||
}
|
||||
chatBar.close();
|
||||
chatHistory.close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,8 +39,8 @@ var DEFAULT_SCRIPTS_COMBINED = [
|
|||
var DEFAULT_SCRIPTS_SEPARATE = [
|
||||
"system/controllers/controllerScripts.js",
|
||||
"communityModules/notificationCore/notificationCore.js",
|
||||
"communityModules/chat/FloofChat.js",
|
||||
"simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js"
|
||||
"simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js",
|
||||
{"stable": "communityModules/chat/FloofChat.js", "beta": "https://content.fluffy.ws/scripts/chat/FloofChat.js"}
|
||||
//"system/chat.js"
|
||||
];
|
||||
|
||||
|
@ -54,7 +54,9 @@ var MENU_CATEGORY = "Developer > Scripting";
|
|||
var MENU_ITEM = "Debug defaultScripts.js";
|
||||
|
||||
var SETTINGS_KEY = '_debugDefaultScriptsIsChecked';
|
||||
var previousSetting = Settings.getValue(SETTINGS_KEY);
|
||||
var SETTINGS_KEY_BETA = '_betaDefaultScriptsIsChecked';
|
||||
var previousSetting = Settings.getValue(SETTINGS_KEY, false);
|
||||
var previousSettingBeta = Settings.getValue(SETTINGS_KEY_BETA, false);
|
||||
|
||||
if (previousSetting === '' || previousSetting === false || previousSetting === 'false') {
|
||||
previousSetting = false;
|
||||
|
@ -78,17 +80,30 @@ function loadSeparateDefaults() {
|
|||
|
||||
for (var i in DEFAULT_SCRIPTS_SEPARATE) {
|
||||
var shouldLoadCurrentDefaultScript = true;
|
||||
var scriptItem = DEFAULT_SCRIPTS_SEPARATE[i];
|
||||
if (typeof scriptItem === "object") {
|
||||
if (previousSettingBeta) {
|
||||
console.log("Loading Beta item " + scriptItem.beta);
|
||||
scriptItem = scriptItem.beta;
|
||||
} else {
|
||||
scriptItem = scriptItem.stable;
|
||||
}
|
||||
}
|
||||
|
||||
for (var j = 0; j < currentlyRunningScripts.length; j++) {
|
||||
var currentRunningScriptObject = currentlyRunningScripts[j];
|
||||
var currentDefaultScriptName = DEFAULT_SCRIPTS_SEPARATE[i].substr((DEFAULT_SCRIPTS_SEPARATE[i].lastIndexOf("/") + 1), DEFAULT_SCRIPTS_SEPARATE[i].length);
|
||||
var currentDefaultScriptName = scriptItem.substr((scriptItem.lastIndexOf("/") + 1), scriptItem.length);
|
||||
if (currentDefaultScriptName === currentRunningScriptObject.name) {
|
||||
shouldLoadCurrentDefaultScript = false;
|
||||
if (currentRunningScriptObject.url !== scriptItem) {
|
||||
ScriptDiscoveryService.stopScript(currentRunningScriptObject.url);
|
||||
} else {
|
||||
shouldLoadCurrentDefaultScript = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldLoadCurrentDefaultScript) {
|
||||
Script.load(DEFAULT_SCRIPTS_SEPARATE[i]);
|
||||
Script.load(scriptItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -162,7 +177,7 @@ function removeMenuItem() {
|
|||
}
|
||||
}
|
||||
|
||||
Script.scriptEnding.connect(function() {
|
||||
Script.scriptEnding.connect(function () {
|
||||
removeMenuItem();
|
||||
});
|
||||
|
||||
|
|
|
@ -427,7 +427,7 @@ const DEFAULT_ENTITY_PROPERTIES = {
|
|||
y: 0.9,
|
||||
z: 0.01
|
||||
},
|
||||
sourceUrl: "https://highfidelity.com/",
|
||||
sourceUrl: "https://projectathena.io/",
|
||||
dpi: 30,
|
||||
},
|
||||
ParticleEffect: {
|
||||
|
|
|
@ -34,17 +34,29 @@
|
|||
</style>
|
||||
<script>
|
||||
//We are running the check here to preload the theme because it may load the incorrect one first for a split second.
|
||||
var darkDisabled = JSON.parse(localStorage.getItem('darkDisabled'));
|
||||
if (darkDisabled == null) {
|
||||
localStorage.setItem('darkDisabled', JSON.stringify(false));
|
||||
var isLocalStorageSupported = false;
|
||||
try { // Edge browsing files on local file system doesn't support localStorage.
|
||||
if (localStorage) {
|
||||
isLocalStorageSupported = true;
|
||||
}
|
||||
} catch (e) {
|
||||
// nop
|
||||
}
|
||||
|
||||
var defaultDarkDisabled = false;
|
||||
var darkDisabled = isLocalStorageSupported ? JSON.parse(localStorage.getItem('darkDisabled')) : defaultDarkDisabled;
|
||||
if (darkDisabled === null) {
|
||||
localStorage.setItem('darkDisabled', JSON.stringify(defaultDarkDisabled));
|
||||
} else {
|
||||
var nightSheet = document.querySelector('[href="styles/night.css"]');
|
||||
nightSheet.disabled = darkDisabled;
|
||||
}
|
||||
|
||||
var responsiveDisabled = JSON.parse(localStorage.getItem('responsiveDisabled'));
|
||||
var defaultResponsiveDisabled = true;
|
||||
var responsiveDisabled =
|
||||
isLocalStorageSupported ? JSON.parse(localStorage.getItem('responsiveDisabled')) : defaultResponsiveDisabled;
|
||||
if (responsiveDisabled === null) {
|
||||
localStorage.setItem('responsiveDisabled', JSON.stringify(true));
|
||||
localStorage.setItem('responsiveDisabled', JSON.stringify(defaultResponsiveDisabled));
|
||||
} else {
|
||||
var responsiveSheet = document.querySelector('[href="styles/responsive.css"]');
|
||||
responsiveSheet.disabled = responsiveDisabled;
|
||||
|
|
Loading…
Reference in a new issue