diff --git a/.github/workflows/master_build.yml b/.github/workflows/master_build.yml index 9ef4728cb0..824c279845 100644 --- a/.github/workflows/master_build.yml +++ b/.github/workflows/master_build.yml @@ -3,114 +3,60 @@ name: Master CI Build on: push: branches: - - master + - gha-master-ci +# FIXME: Change target branch to "master" before merging into "master" branch. env: - #APP_NAME: gpu-frame-player APP_NAME: interface BUILD_TYPE: Release - BUCKET_NAME: hifi-gh-builds + BUILD_NUMBER: ${{ github.run_number }} CI_BUILD: Github - CMAKE_BACKTRACE_URL: https://highfidelity.sp.backtrace.io:6098 - CMAKE_BACKTRACE_TOKEN: ${{ secrets.backtrace_token }} - CMAKE_BACKTRACE_SYMBOLS_TOKEN: ${{ secrets.backtrace_symbols_token }} GIT_COMMIT: ${{ github.sha }} - HIFI_VCPKG_BOOTSTRAP: true - LAUNCHER_HMAC_SECRET: ${{ secrets.launcher_hmac_secret }} - OCULUS_APP_ID: '${{ secrets.oculus_app_id }}' + # VCPKG did not build well on OSX disabling HIFI_VCPKG_BOOTSTRAP, which invokes a download to a working version of vcpkg + # HIFI_VCPKG_BOOTSTRAP: true RELEASE_TYPE: PRODUCTION - RELEASE_DYNAMODB_V2: ReleaseManager2-ReleaseQueue-prod + RELEASE_NUMBER: ${{ github.run_number }} STABLE_BUILD: 0 + UPLOAD_BUCKET: athena-public - - # OSX specific variables + # OSX-specific variables DEVELOPER_DIR: /Applications/Xcode_11.2.app/Contents/Developer MACOSX_DEPLOYMENT_TARGET: '10.11' - # WIN32 specific variables + # WIN-specific variables PreferredToolArchitecture: X64 -# Mac OS -#PLATFORM_CMAKE_GENERATOR=Xcode -#PLATFORM_BUILD_ARGUMENTS=--config Release --target package -#ARTIFACT_EXPRESSION=build/*.dmg,build/*.zip - -# Windows -#PLATFORM_CMAKE_GENERATOR=Visual Studio 15 2017 Win64 -#PLATFORM_BUILD_ARGUMENTS=--target package --config release -#ARTIFACT_EXPRESSION=build/*.exe,build/*.zip,*-symbols.zip - -# Ubuntu -#PLATFORM_CMAKE_GENERATOR=Unix Makefiles -#PLATFORM_BUILD_ARGUMENTS=--target all -- -j4 -#ARTIFACT_EXPRESSION=build/assignment-client/**,build/domain-server/**,build/ice-server/ice-server,build/tools/ice-client/ice-client,build/tools/ac-client/ac-client,build/tools/oven,build/ext/makefiles/nvtt/project/lib/**,build/ext/makefiles/quazip/project/lib/** - -# Android -# branch: master -# GA_TRACKING_ID: ${{ secrets.ga_tracking_id }} -# ANDROID_OAUTH_CLIENT_SECRET=${MASKED_ANDROID_OAUTH_CLIENT_SECRET_NIGHTLY} -# ANDROID_OAUTH_CLIENT_ID=6c7d2349c0614640150db37457a1f75dce98a28ffe8f14d47f6cfae4de5b262a -# ANDROID_OAUTH_REDIRECT_URI=https://dev-android-interface.highfidelity.com/auth -# branch: !master -# GA_TRACKING_ID=UA-39558647-11 -# ANDROID_OAUTH_CLIENT_SECRET=${MASKED_ANDROID_OAUTH_CLIENT_SECRET_RELEASE} -# ANDROID_OAUTH_CLIENT_ID= c1063ea5d0b0c405e0c9cd77351328e211a91496a3f25985a99e861f1661db1d -# ANDROID_OAUTH_REDIRECT_URI=https://android-interface.highfidelity.com/auth -# ARTIFACT_EXPRESSION=android/*.apk -# ANDROID_APK_NAME=HighFidelity-Beta-PR${RELEASE_NUMBER}-${GIT_COMMIT_SHORT}.apk -# ANDROID_BUILT_APK_NAME=interface-debug.apk -# ANDROID_APP=interface -# ANDROID_BUILD_DIR=debug -# ANDROID_BUILD_TARGET=assembleDebug -# STABLE_BUILD=0 - - - jobs: - generate_build_number: - runs-on: ubuntu-latest - steps: - - name: Generate build number - id: buildnumber - uses: highfidelity/build-number@v3 - with: - token: ${{secrets.github_token}} - - name: Upload build number - uses: actions/upload-artifact@v1 - with: - name: BUILD_NUMBER - path: BUILD_NUMBER - build: strategy: matrix: - os: [windows-latest, macOS-latest] - build_type: [full, client] - #os: [windows-latest, macOS-latest, ubuntu-latest] - # exclude: - # - os: ubuntu-latest - # build_type: client + os: [windows-latest, macOS-latest, ubuntu-18.04] + # build_type: [full, client] + build_type: [full] + include: + - os: ubuntu-18.04 + build_type: full + apt-dependencies: mesa-common-dev libegl1 libglvnd-dev libdouble-conversion1 libpulse0 + fail-fast: false runs-on: ${{matrix.os}} - needs: generate_build_number steps: - - name: Download build number - uses: actions/download-artifact@v1 - with: - name: BUILD_NUMBER - - name: Restore build number - id: buildnumber - uses: highfidelity/build-number@v3 - with: - output_name: RELEASE_NUMBER - - name: Configure Build Environment 1 + - name: Report Build Number + shell: bash + run: | + echo "Build number: $BUILD_NUMBER" + - name: Configure build environment 1 shell: bash id: buildenv1 run: | echo ::set-env name=UPLOAD_PREFIX::master echo ::set-env name=GIT_COMMIT_SHORT::`echo $GIT_COMMIT | cut -c1-7` + echo ::set-env name=JOB_NAME::"build (${{matrix.os}}, ${{matrix.build_type}})" # Linux build variables - if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then + if [[ "${{ matrix.os }}" = "ubuntu-"* ]]; then + echo ::set-env name=PYTHON_EXEC::python3 echo ::set-env name=INSTALLER_EXT::tgz + echo ::set-env name=CMAKE_BUILD_EXTRA::"-- -j3" + echo ::set-env name=CMAKE_EXTRA::"-DBUILD_TOOLS:BOOLEAN=FALSE -DHIFI_PYTHON_EXEC:FILEPATH=$(which python3)" fi # Mac build variables if [ "${{ matrix.os }}" = "macOS-latest" ]; then @@ -118,8 +64,8 @@ jobs: echo ::set-env name=ZIP_COMMAND::zip echo ::set-env name=ZIP_ARGS::-r echo ::set-env name=INSTALLER_EXT::dmg - echo ::set-env name=SYMBOL_REGEX::dSYM - echo "::set-output name=symbols_archive::${{ steps.buildnumber.outputs.build_number }}-${{ matrix.build_type }}-mac-symbols.zip" + echo ::set-env name=CMAKE_EXTRA::"-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -G Xcode" + echo "::set-output name=symbols_archive::${BUILD_NUMBER}-${{ matrix.build_type }}-mac-symbols.zip" fi # Windows build variables if [ "${{ matrix.os }}" = "windows-latest" ]; then @@ -127,40 +73,28 @@ jobs: echo ::set-env name=ZIP_COMMAND::7z echo ::set-env name=ZIP_ARGS::a echo ::set-env name=INSTALLER_EXT::exe + echo ::set-env name=CMAKE_EXTRA::"-A x64" echo "::set-env name=SYMBOL_REGEX::\(exe\|dll\|pdb\)" - echo "::set-output name=symbols_archive::${{ steps.buildnumber.outputs.build_number }}-${{ matrix.build_type }}-win-symbols.zip" + echo "::set-output name=symbols_archive::${BUILD_NUMBER}-${{ matrix.build_type }}-win-symbols.zip" + # echo ::set-env name=HF_PFX_PASSPHRASE::${{secrets.pfx_key}} + # echo "::set-env name=HF_PFX_FILE::${{runner.workspace}}\build\codesign.pfx" fi # Configuration is broken into two steps because you can't set an env var and also reference it in the same step - - name: Configure Build Environment 2 + - name: Configure build environment 2 shell: bash run: | echo "${{ steps.buildenv1.outputs.symbols_archive }}" - echo ::set-env name=ARTIFACT_PATTERN::HighFidelity-Beta-*.$INSTALLER_EXT + echo ::set-env name=ARTIFACT_PATTERN::Vircadia-Alpha-*.$INSTALLER_EXT # Build type variables if [ "${{ matrix.build_type }}" = "full" ]; then echo ::set-env name=CLIENT_ONLY::FALSE - echo ::set-env name=INSTALLER::HighFidelity-Beta-$RELEASE_NUMBER-$GIT_COMMIT_SHORT.$INSTALLER_EXT + echo ::set-env name=INSTALLER::Vircadia-Alpha-$BUILD_NUMBER-$GIT_COMMIT_SHORT.$INSTALLER_EXT else echo ::set-env name=CLIENT_ONLY::TRUE - echo ::set-env name=INSTALLER::HighFidelity-Beta-Interface-$RELEASE_NUMBER-$GIT_COMMIT_SHORT.$INSTALLER_EXT + echo ::set-env name=INSTALLER::Vircadia-Alpha-Interface-$BUILD_NUMBER-$GIT_COMMIT_SHORT.$INSTALLER_EXT fi - # Linux build variables - if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then - echo ::set-env name=PYTHON_EXEC::python3 - echo ::set-env name=CMAKE_EXTRA::"" - fi - # Mac build variables - if [ "${{ matrix.os }}" = "macOS-latest" ]; then - echo ::set-env name=CMAKE_EXTRA::"-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -G Xcode" - fi - # Windows build variables - if [ "${{ matrix.os }}" = "windows-latest" ]; then - echo ::set-env name=CMAKE_EXTRA::"-A x64" - echo ::set-env name=HF_PFX_PASSPHRASE::${{secrets.pfx_key}} - echo "::set-env name=HF_PFX_FILE::${{runner.workspace}}\build\codesign.pfx" - fi - - name: Clear Working Directory - if: matrix.os == 'windows-latest' + - name: Clear working directory + if: startsWith(matrix.os, 'windows') shell: bash working-directory: ${{runner.workspace}} run: rm -rf ./* @@ -168,89 +102,119 @@ jobs: with: submodules: true fetch-depth: 1 - - name: Create Build Directory - run: cmake -E make_directory ${{runner.workspace}}/build - - name: Decrypt Signing Key (Windows) - if: matrix.os == 'windows-latest' - working-directory: ${{runner.workspace}}/build + - name: Install dependencies + if: startsWith(matrix.os, 'ubuntu') shell: bash - run: gpg --batch --yes -o codesign.pfx --passphrase "${{secrets.gpg_symmetric_key}}" --decrypt $GITHUB_WORKSPACE/tools/ci-scripts/codesign.pfx.gpg - - name: Import Signing Key (Windows) - if: matrix.os == 'windows-latest' - working-directory: ${{runner.workspace}}/build - shell: powershell - run: | - $mypwd=ConvertTo-SecureString -String ${{ secrets.pfx_key }} -Force -AsPlainText - Import-PfxCertificate -Password $mypwd -CertStoreLocation Cert:\CurrentUser\My -FilePath ${{runner.workspace}}\build\codesign.pfx - Import-PfxCertificate -Password $mypwd -CertStoreLocation Cert:\LocalMachine\My -FilePath ${{runner.workspace}}\build\codesign.pfx + run: | + echo "Installing Python Modules:" + pip3 install distro || exit 1 + echo "Updating apt repository index" + sudo apt update || exit 1 + echo "Installing apt packages" + sudo apt install -y ${{ matrix.apt-dependencies }} || exit 1 - name: Install Python modules - if: matrix.os != 'ubuntu-latest' + if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macOS') shell: bash run: $PYTHON_EXEC -m pip install boto3 PyGithub + - name: Create build environment + shell: bash + run: cmake -E make_directory "${{runner.workspace}}/build" - name: Configure CMake working-directory: ${{runner.workspace}}/build shell: bash - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCLIENT_ONLY:BOOLEAN=$CLIENT_ONLY $CMAKE_EXTRA - - name: Build Application + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DVCPKG_BUILD_TYPE=release -DCLIENT_ONLY:BOOLEAN=$CLIENT_ONLY -DBYPASS_SIGNING:BOOLEAN=TRUE $CMAKE_EXTRA + - name: Build application working-directory: ${{runner.workspace}}/build shell: bash - run: cmake --build . --config $BUILD_TYPE --target $APP_NAME - - name: Build Console + run: cmake --build . --config $BUILD_TYPE --target $APP_NAME $CMAKE_BUILD_EXTRA + - name: Build domain server working-directory: ${{runner.workspace}}/build shell: bash - run: cmake --build . --config $BUILD_TYPE --target packaged-server-console - - name: Build Domain Server (FullBuild) - if: matrix.build_type == 'full' - shell: bash - working-directory: ${{runner.workspace}}/build - run: cmake --build . --config $BUILD_TYPE --target domain-server - - name: Build Assignment Client (FullBuild) - if: matrix.build_type == 'full' - shell: bash - working-directory: ${{runner.workspace}}/build - run: cmake --build . --config $BUILD_TYPE --target assignment-client - - name: Build Installer + run: cmake --build . --config $BUILD_TYPE --target domain-server $CMAKE_BUILD_EXTRA + - name: Build assignment client working-directory: ${{runner.workspace}}/build shell: bash - run: cmake --build . --config $BUILD_TYPE --target package - - name: Sign Installer (Windows) - if: matrix.os == 'windows-latest' - shell: powershell - working-directory: C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64 - run: .\signtool.exe sign /fd sha256 /f ${{runner.workspace}}\build\codesign.pfx /p ${{secrets.pfx_key}} /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 ${{runner.workspace}}\build\${env:INSTALLER} - - name: Upload Artifact - if: matrix.os != 'ubuntu-latest' + run: cmake --build . --config $BUILD_TYPE --target assignment-client $CMAKE_BUILD_EXTRA + - name: Build console + working-directory: ${{runner.workspace}}/build + shell: bash + run: cmake --build . --config $BUILD_TYPE --target packaged-server-console $CMAKE_BUILD_EXTRA + - name: Build installer + working-directory: ${{runner.workspace}}/build + shell: bash + run: | + echo "Retry code from https://unix.stackexchange.com/a/137639" + function fail { + echo $1 >&2 + exit 1 + } + function retry { + local n=1 + local max=5 + local delay=15 + while true; do + "$@" && break || { + if [[ $n -lt $max ]]; then + ((n++)) + echo "Command failed. Attempt $n/$max:" + sleep $delay; + else + fail "The command has failed after $n attempts." + fi + } + done + } + retry cmake --build . --config $BUILD_TYPE --target package $CMAKE_BUILD_EXTRA + #- name: Sign installer (Windows) + # if: startsWith(matrix.os, 'windows') + # shell: powershell + # working-directory: C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64 + # run: .\signtool.exe sign /fd sha256 /f ${{runner.workspace}}\build\codesign.pfx /p ${{secrets.pfx_key}} /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td SHA256 ${{runner.workspace}}\build\${env:INSTALLER} + - name: Output system stats + if: ${{ always() }} + working-directory: ${{runner.workspace}}/build + shell: bash + run: | + echo "Disk usage:" + df -h + - name: Output installer logs + if: failure() && startsWith(matrix.os, 'windows') + shell: bash + working-directory: ${{runner.workspace}}/build + run: cat ./_CPack_Packages/win64/NSIS/NSISOutput.log + - name: Upload artifact + if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macOS') shell: bash working-directory: ${{runner.workspace}}/build env: AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }} AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }} run: $PYTHON_EXEC $GITHUB_WORKSPACE/tools/ci-scripts/upload.py - - name: Archive Symbols - if: (matrix.os == 'windows-latest') || (matrix.os == 'macOS-latest') - working-directory: ${{runner.workspace}} - shell: bash - run: | - SYMBOLS_TEMP="symbols-temp" - mkdir $SYMBOLS_TEMP - find "./build" \( -path '*/tools/gpu-frame-player/*' -or -path '*/interface/*' -or -path '*/plugins/*' \) -regex ".*\.$SYMBOL_REGEX" -exec cp -r {} $SYMBOLS_TEMP \; - cd $SYMBOLS_TEMP - $ZIP_COMMAND $ZIP_ARGS ../${{ steps.buildenv1.outputs.symbols_archive }} . - - name: Upload Symbols - if: (matrix.os == 'windows-latest') || (matrix.os == 'macOS-latest') - working-directory: ${{runner.workspace}} - shell: bash - run: | - curl --data-binary @${{ steps.buildenv1.outputs.symbols_archive }} "$CMAKE_BACKTRACE_URL/post?format=symbols&token=$CMAKE_BACKTRACE_SYMBOLS_TOKEN&upload_file=${{steps.buildenv1.outputs.symbols_archive}}&tag=$RELEASE_NUMBER" - # - name: Debug List Symbols - # if: (matrix.os == 'windows-latest') || (matrix.os == 'macOS-latest') - # working-directory: ${{runner.workspace}} - # shell: bash - # run: | - # unzip -v "${{runner.workspace}}/${{ steps.buildenv1.outputs.symbols_archive }}" - # - name: Debug Upload Symbols Artifact - # if: (matrix.os == 'windows-latest') || (matrix.os == 'macOS-latest') - # uses: actions/upload-artifact@v1 - # with: - # name: symbols - # path: ${{runner.workspace}}/${{ steps.buildenv1.outputs.symbols_archive }} + #- name: Archive symbols + # if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macOS') + # working-directory: ${{runner.workspace}} + # shell: bash + # run: | + # SYMBOLS_TEMP="symbols-temp" + # mkdir $SYMBOLS_TEMP + # find "./build" \( -path '*/tools/gpu-frame-player/*' -or -path '*/interface/*' -or -path '*/plugins/*' \) -regex ".*\.$SYMBOL_REGEX" -exec cp -r {} $SYMBOLS_TEMP \; + # cd $SYMBOLS_TEMP + # $ZIP_COMMAND $ZIP_ARGS ../${{ steps.buildenv1.outputs.symbols_archive }} . + #- name: Upload symbols + # if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macOS') + # working-directory: ${{runner.workspace}} + # shell: bash + # run: | + # curl --data-binary @${{ steps.buildenv1.outputs.symbols_archive }} "$CMAKE_BACKTRACE_URL/post?format=symbols&token=$CMAKE_BACKTRACE_SYMBOLS_TOKEN&upload_file=${{steps.buildenv1.outputs.symbols_archive}}&tag=$BUILD_NUMBER" + #- name: Debug list symbols + # if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macOS') + # working-directory: ${{runner.workspace}} + # shell: bash + # run: | + # unzip -v "${{runner.workspace}}/${{ steps.buildenv1.outputs.symbols_archive }}" + #- name: Upload debug list symbols + # if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macOS') + # uses: actions/upload-artifact@v1 + # with: + # name: symbols + # path: ${{runner.workspace}}/${{ steps.buildenv1.outputs.symbols_archive }} diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index 59e53bb2cb..a8ce7e30e5 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -112,11 +112,12 @@ Agent::Agent(ReceivedMessage& message) : packetReceiver.registerListenerForTypes( { PacketType::MixedAudio, PacketType::SilentAudioFrame }, - this, "handleAudioPacket"); + PacketReceiver::makeUnsourcedListenerReference(this, &Agent::handleAudioPacket)); packetReceiver.registerListenerForTypes( { PacketType::OctreeStats, PacketType::EntityData, PacketType::EntityErase }, - this, "handleOctreePacket"); - packetReceiver.registerListener(PacketType::SelectedAudioFormat, this, "handleSelectedAudioFormat"); + PacketReceiver::makeSourcedListenerReference(this, &Agent::handleOctreePacket)); + packetReceiver.registerListener(PacketType::SelectedAudioFormat, + PacketReceiver::makeUnsourcedListenerReference(this, &Agent::handleSelectedAudioFormat)); // 100Hz timer for audio const int TARGET_INTERVAL_MSEC = 10; // 10ms diff --git a/assignment-client/src/AssignmentClient.cpp b/assignment-client/src/AssignmentClient.cpp index ce724d7368..50eee258ab 100644 --- a/assignment-client/src/AssignmentClient.cpp +++ b/assignment-client/src/AssignmentClient.cpp @@ -118,8 +118,10 @@ AssignmentClient::AssignmentClient(Assignment::Type requestAssignmentType, QStri setUpStatusToMonitor(); } auto& packetReceiver = DependencyManager::get()->getPacketReceiver(); - packetReceiver.registerListener(PacketType::CreateAssignment, this, "handleCreateAssignmentPacket"); - packetReceiver.registerListener(PacketType::StopNode, this, "handleStopNodePacket"); + packetReceiver.registerListener(PacketType::CreateAssignment, + PacketReceiver::makeUnsourcedListenerReference(this, &AssignmentClient::handleCreateAssignmentPacket)); + packetReceiver.registerListener(PacketType::StopNode, + PacketReceiver::makeUnsourcedListenerReference(this, &AssignmentClient::handleStopNodePacket)); } void AssignmentClient::stopAssignmentClient() { diff --git a/assignment-client/src/AssignmentClientMonitor.cpp b/assignment-client/src/AssignmentClientMonitor.cpp index 4c7f71a7aa..68c0dfc9fd 100644 --- a/assignment-client/src/AssignmentClientMonitor.cpp +++ b/assignment-client/src/AssignmentClientMonitor.cpp @@ -72,7 +72,8 @@ AssignmentClientMonitor::AssignmentClientMonitor(const unsigned int numAssignmen auto nodeList = DependencyManager::set(listenPort); auto& packetReceiver = DependencyManager::get()->getPacketReceiver(); - packetReceiver.registerListener(PacketType::AssignmentClientStatus, this, "handleChildStatusPacket"); + packetReceiver.registerListener(PacketType::AssignmentClientStatus, + PacketReceiver::makeUnsourcedListenerReference(this, &AssignmentClientMonitor::handleChildStatusPacket)); adjustOSResources(std::max(_numAssignmentClientForks, _maxAssignmentClientForks)); // use QProcess to fork off a process for each of the child assignment clients diff --git a/assignment-client/src/assets/AssetServer.cpp b/assignment-client/src/assets/AssetServer.cpp index b3344e3832..ffb6747fd7 100644 --- a/assignment-client/src/assets/AssetServer.cpp +++ b/assignment-client/src/assets/AssetServer.cpp @@ -308,7 +308,8 @@ AssetServer::AssetServer(ReceivedMessage& message) : // Queue all requests until the Asset Server is fully setup auto& packetReceiver = DependencyManager::get()->getPacketReceiver(); - packetReceiver.registerListenerForTypes({ PacketType::AssetGet, PacketType::AssetGetInfo, PacketType::AssetUpload, PacketType::AssetMappingOperation }, this, "queueRequests"); + packetReceiver.registerListenerForTypes({ PacketType::AssetGet, PacketType::AssetGetInfo, PacketType::AssetUpload, PacketType::AssetMappingOperation }, + PacketReceiver::makeSourcedListenerReference(this, &AssetServer::queueRequests)); #ifdef Q_OS_WIN updateConsumedCores(); @@ -464,10 +465,14 @@ void AssetServer::completeSetup() { qCDebug(asset_server) << "Overriding temporary queuing packet handler."; // We're fully setup, override the request queueing handler and replay all requests auto& packetReceiver = DependencyManager::get()->getPacketReceiver(); - packetReceiver.registerListener(PacketType::AssetGet, this, "handleAssetGet"); - packetReceiver.registerListener(PacketType::AssetGetInfo, this, "handleAssetGetInfo"); - packetReceiver.registerListener(PacketType::AssetUpload, this, "handleAssetUpload"); - packetReceiver.registerListener(PacketType::AssetMappingOperation, this, "handleAssetMappingOperation"); + packetReceiver.registerListener(PacketType::AssetGet, + PacketReceiver::makeSourcedListenerReference(this, &AssetServer::handleAssetGet)); + packetReceiver.registerListener(PacketType::AssetGetInfo, + PacketReceiver::makeSourcedListenerReference(this, &AssetServer::handleAssetGetInfo)); + packetReceiver.registerListener(PacketType::AssetUpload, + PacketReceiver::makeSourcedListenerReference(this, &AssetServer::handleAssetUpload)); + packetReceiver.registerListener(PacketType::AssetMappingOperation, + PacketReceiver::makeSourcedListenerReference(this, &AssetServer::handleAssetMappingOperation)); replayRequests(); } diff --git a/assignment-client/src/audio/AudioMixer.cpp b/assignment-client/src/audio/AudioMixer.cpp index 161a6f4285..42a269c544 100644 --- a/assignment-client/src/audio/AudioMixer.cpp +++ b/assignment-client/src/audio/AudioMixer.cpp @@ -101,20 +101,23 @@ AudioMixer::AudioMixer(ReceivedMessage& message) : PacketType::InjectorGainSet, PacketType::AudioSoloRequest, PacketType::StopInjector }, - this, "queueAudioPacket"); + PacketReceiver::makeSourcedListenerReference(this, &AudioMixer::queueAudioPacket) + ); // packets whose consequences are global should be processed on the main thread - packetReceiver.registerListener(PacketType::MuteEnvironment, this, "handleMuteEnvironmentPacket"); - packetReceiver.registerListener(PacketType::NodeMuteRequest, this, "handleNodeMuteRequestPacket"); - packetReceiver.registerListener(PacketType::KillAvatar, this, "handleKillAvatarPacket"); + packetReceiver.registerListener(PacketType::MuteEnvironment, + PacketReceiver::makeSourcedListenerReference(this, &AudioMixer::handleMuteEnvironmentPacket)); + packetReceiver.registerListener(PacketType::NodeMuteRequest, + PacketReceiver::makeSourcedListenerReference(this, &AudioMixer::handleNodeMuteRequestPacket)); + packetReceiver.registerListener(PacketType::KillAvatar, + PacketReceiver::makeSourcedListenerReference(this, &AudioMixer::handleKillAvatarPacket)); packetReceiver.registerListenerForTypes({ PacketType::ReplicatedMicrophoneAudioNoEcho, PacketType::ReplicatedMicrophoneAudioWithEcho, PacketType::ReplicatedInjectAudio, - PacketType::ReplicatedSilentAudioFrame - }, - this, "queueReplicatedAudioPacket" + PacketType::ReplicatedSilentAudioFrame }, + PacketReceiver::makeUnsourcedListenerReference(this, &AudioMixer::queueReplicatedAudioPacket) ); connect(nodeList.data(), &NodeList::nodeKilled, this, &AudioMixer::handleNodeKilled); diff --git a/assignment-client/src/avatars/AvatarMixer.cpp b/assignment-client/src/avatars/AvatarMixer.cpp index 807f54953e..27b7d0d302 100644 --- a/assignment-client/src/avatars/AvatarMixer.cpp +++ b/assignment-client/src/avatars/AvatarMixer.cpp @@ -71,26 +71,38 @@ AvatarMixer::AvatarMixer(ReceivedMessage& message) : connect(DependencyManager::get().data(), &NodeList::nodeKilled, this, &AvatarMixer::handleAvatarKilled); auto& packetReceiver = DependencyManager::get()->getPacketReceiver(); - packetReceiver.registerListener(PacketType::AvatarData, this, "queueIncomingPacket"); - packetReceiver.registerListener(PacketType::AdjustAvatarSorting, this, "handleAdjustAvatarSorting"); - packetReceiver.registerListener(PacketType::AvatarQuery, this, "handleAvatarQueryPacket"); - packetReceiver.registerListener(PacketType::AvatarIdentity, this, "handleAvatarIdentityPacket"); - packetReceiver.registerListener(PacketType::KillAvatar, this, "handleKillAvatarPacket"); - packetReceiver.registerListener(PacketType::NodeIgnoreRequest, this, "handleNodeIgnoreRequestPacket"); - packetReceiver.registerListener(PacketType::RadiusIgnoreRequest, this, "handleRadiusIgnoreRequestPacket"); - packetReceiver.registerListener(PacketType::RequestsDomainListData, this, "handleRequestsDomainListDataPacket"); - packetReceiver.registerListener(PacketType::SetAvatarTraits, this, "queueIncomingPacket"); - packetReceiver.registerListener(PacketType::BulkAvatarTraitsAck, this, "queueIncomingPacket"); + packetReceiver.registerListener(PacketType::AvatarData, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::queueIncomingPacket)); + packetReceiver.registerListener(PacketType::AdjustAvatarSorting, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::handleAdjustAvatarSorting)); + packetReceiver.registerListener(PacketType::AvatarQuery, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::handleAvatarQueryPacket)); + packetReceiver.registerListener(PacketType::AvatarIdentity, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::handleAvatarIdentityPacket)); + packetReceiver.registerListener(PacketType::KillAvatar, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::handleKillAvatarPacket)); + packetReceiver.registerListener(PacketType::NodeIgnoreRequest, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::handleNodeIgnoreRequestPacket)); + packetReceiver.registerListener(PacketType::RadiusIgnoreRequest, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::handleRadiusIgnoreRequestPacket)); + packetReceiver.registerListener(PacketType::RequestsDomainListData, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::handleRequestsDomainListDataPacket)); + packetReceiver.registerListener(PacketType::SetAvatarTraits, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::queueIncomingPacket)); + packetReceiver.registerListener(PacketType::BulkAvatarTraitsAck, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::queueIncomingPacket)); packetReceiver.registerListenerForTypes({ PacketType::OctreeStats, PacketType::EntityData, PacketType::EntityErase }, - this, "handleOctreePacket"); - packetReceiver.registerListener(PacketType::ChallengeOwnership, this, "queueIncomingPacket"); + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::handleOctreePacket)); + packetReceiver.registerListener(PacketType::ChallengeOwnership, + PacketReceiver::makeSourcedListenerReference(this, &AvatarMixer::queueIncomingPacket)); packetReceiver.registerListenerForTypes({ PacketType::ReplicatedAvatarIdentity, PacketType::ReplicatedKillAvatar - }, this, "handleReplicatedPacket"); + }, PacketReceiver::makeUnsourcedListenerReference(this, &AvatarMixer::handleReplicatedPacket)); - packetReceiver.registerListener(PacketType::ReplicatedBulkAvatarData, this, "handleReplicatedBulkAvatarPacket"); + packetReceiver.registerListener(PacketType::ReplicatedBulkAvatarData, + PacketReceiver::makeUnsourcedListenerReference(this, &AvatarMixer::handleReplicatedBulkAvatarPacket)); auto nodeList = DependencyManager::get(); connect(nodeList.data(), &NodeList::packetVersionMismatch, this, &AvatarMixer::handlePacketVersionMismatch); diff --git a/assignment-client/src/entities/EntityServer.cpp b/assignment-client/src/entities/EntityServer.cpp index 4c4fcbf2dd..e68f95bda0 100644 --- a/assignment-client/src/entities/EntityServer.cpp +++ b/assignment-client/src/entities/EntityServer.cpp @@ -59,8 +59,7 @@ EntityServer::EntityServer(ReceivedMessage& message) : PacketType::ChallengeOwnership, PacketType::ChallengeOwnershipRequest, PacketType::ChallengeOwnershipReply }, - this, - "handleEntityPacket"); + PacketReceiver::makeSourcedListenerReference(this, &EntityServer::handleEntityPacket)); connect(&_dynamicDomainVerificationTimer, &QTimer::timeout, this, &EntityServer::startDynamicDomainVerification); _dynamicDomainVerificationTimer.setSingleShot(true); diff --git a/assignment-client/src/messages/MessagesMixer.cpp b/assignment-client/src/messages/MessagesMixer.cpp index d2127835f9..bcf4881fcf 100644 --- a/assignment-client/src/messages/MessagesMixer.cpp +++ b/assignment-client/src/messages/MessagesMixer.cpp @@ -25,9 +25,12 @@ MessagesMixer::MessagesMixer(ReceivedMessage& message) : ThreadedAssignment(mess { connect(DependencyManager::get().data(), &NodeList::nodeKilled, this, &MessagesMixer::nodeKilled); auto& packetReceiver = DependencyManager::get()->getPacketReceiver(); - packetReceiver.registerListener(PacketType::MessagesData, this, "handleMessages"); - packetReceiver.registerListener(PacketType::MessagesSubscribe, this, "handleMessagesSubscribe"); - packetReceiver.registerListener(PacketType::MessagesUnsubscribe, this, "handleMessagesUnsubscribe"); + packetReceiver.registerListener(PacketType::MessagesData, + PacketReceiver::makeSourcedListenerReference(this, &MessagesMixer::handleMessages)); + packetReceiver.registerListener(PacketType::MessagesSubscribe, + PacketReceiver::makeSourcedListenerReference(this, &MessagesMixer::handleMessagesSubscribe)); + packetReceiver.registerListener(PacketType::MessagesUnsubscribe, + PacketReceiver::makeSourcedListenerReference(this, &MessagesMixer::handleMessagesUnsubscribe)); } void MessagesMixer::nodeKilled(SharedNodePointer killedNode) { diff --git a/assignment-client/src/octree/OctreeServer.cpp b/assignment-client/src/octree/OctreeServer.cpp index 63520262cd..f72ab0ac05 100644 --- a/assignment-client/src/octree/OctreeServer.cpp +++ b/assignment-client/src/octree/OctreeServer.cpp @@ -1122,8 +1122,10 @@ void OctreeServer::run() { void OctreeServer::domainSettingsRequestComplete() { auto& packetReceiver = DependencyManager::get()->getPacketReceiver(); - packetReceiver.registerListener(PacketType::OctreeDataNack, this, "handleOctreeDataNackPacket"); - packetReceiver.registerListener(getMyQueryMessageType(), this, "handleOctreeQueryPacket"); + packetReceiver.registerListener(PacketType::OctreeDataNack, + PacketReceiver::makeSourcedListenerReference(this, &OctreeServer::handleOctreeDataNackPacket)); + packetReceiver.registerListener(getMyQueryMessageType(), + PacketReceiver::makeSourcedListenerReference(this, &OctreeServer::handleOctreeQueryPacket)); qDebug(octree_server) << "Received domain settings"; diff --git a/assignment-client/src/scripts/EntityScriptServer.cpp b/assignment-client/src/scripts/EntityScriptServer.cpp index 7c3d491470..065ab12abc 100644 --- a/assignment-client/src/scripts/EntityScriptServer.cpp +++ b/assignment-client/src/scripts/EntityScriptServer.cpp @@ -83,13 +83,18 @@ EntityScriptServer::EntityScriptServer(ReceivedMessage& message) : ThreadedAssig auto& packetReceiver = DependencyManager::get()->getPacketReceiver(); packetReceiver.registerListenerForTypes({ PacketType::OctreeStats, PacketType::EntityData, PacketType::EntityErase }, - this, "handleOctreePacket"); - packetReceiver.registerListener(PacketType::SelectedAudioFormat, this, "handleSelectedAudioFormat"); + PacketReceiver::makeSourcedListenerReference(this, &EntityScriptServer::handleOctreePacket)); + packetReceiver.registerListener(PacketType::SelectedAudioFormat, + PacketReceiver::makeUnsourcedListenerReference(this, &EntityScriptServer::handleSelectedAudioFormat)); - packetReceiver.registerListener(PacketType::ReloadEntityServerScript, this, "handleReloadEntityServerScriptPacket"); - packetReceiver.registerListener(PacketType::EntityScriptGetStatus, this, "handleEntityScriptGetStatusPacket"); - packetReceiver.registerListener(PacketType::EntityServerScriptLog, this, "handleEntityServerScriptLogPacket"); - packetReceiver.registerListener(PacketType::EntityScriptCallMethod, this, "handleEntityScriptCallMethodPacket"); + packetReceiver.registerListener(PacketType::ReloadEntityServerScript, + PacketReceiver::makeSourcedListenerReference(this, &EntityScriptServer::handleReloadEntityServerScriptPacket)); + packetReceiver.registerListener(PacketType::EntityScriptGetStatus, + PacketReceiver::makeSourcedListenerReference(this, &EntityScriptServer::handleEntityScriptGetStatusPacket)); + packetReceiver.registerListener(PacketType::EntityServerScriptLog, + PacketReceiver::makeSourcedListenerReference(this, &EntityScriptServer::handleEntityServerScriptLogPacket)); + packetReceiver.registerListener(PacketType::EntityScriptCallMethod, + PacketReceiver::makeSourcedListenerReference(this, &EntityScriptServer::handleEntityScriptCallMethodPacket)); static const int LOG_INTERVAL = MSECS_PER_SECOND / 10; auto timer = new QTimer(this); diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 013eb98f84..752fb25d20 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -202,9 +202,9 @@ ; The Inner invocation has written an uninstaller binary for us. ; We need to sign it if it's a production or PR build. !if @PRODUCTION_BUILD@ == 1 - !if @BYPASS_SIGNING@ == 1 + !if @BYPASS_SIGNING@ == TRUE !warning "BYPASS_SIGNING set - installer will not be signed" - !else + !else !system '"@SIGNTOOL_EXECUTABLE@" sign /fd sha256 /f %HF_PFX_FILE% /p %HF_PFX_PASSPHRASE% /tr http://timestamp.comodoca.com?td=sha256 /td SHA256 $%TEMP%\@UNINSTALLER_NAME@' = 0 !endif !endif diff --git a/debian/rules b/debian/rules index 8a56eecdfb..b39ff04487 100755 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ override_dh_auto_configure: mkdir obj-$(DEB_TARGET_MULTIARCH) - (cd obj-$(DEB_TARGET_MULTIARCH) && cmake .. -DCMAKE_INSTALL_PREFIX=/opt/hifi -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCLIENT_ONLY=ON -DDOWNLOAD_SERVERLESS_CONTENT=ON -DCMAKE_CXX_COMPILER=/usr/lib/llvm-7/bin/clang\+\+ -DOpenGL_GL_PREFERENCE=GLVND) + (cd obj-$(DEB_TARGET_MULTIARCH) && cmake .. -DCMAKE_INSTALL_PREFIX=/opt/hifi -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCLIENT_ONLY=ON -DDOWNLOAD_SERVERLESS_CONTENT=ON -DCMAKE_CXX_COMPILER=/usr/lib/llvm-7/bin/clang\+\+ -DOpenGL_GL_PREFERENCE=LEGACY) override_dh_auto_build: (cd obj-$(DEB_TARGET_MULTIARCH) && make -j4) diff --git a/domain-server/resources/web/js/shared.js b/domain-server/resources/web/js/shared.js index 5469125162..bffd512890 100644 --- a/domain-server/resources/web/js/shared.js +++ b/domain-server/resources/web/js/shared.js @@ -500,6 +500,31 @@ function prepareAccessTokenPrompt(callback) { }); } +function createDomainIDPrompt(callback) { + swal({ + title: 'Finish Registering Domain', + type: 'input', + text: 'Enter a label for this machine.

This will help you identify which domain ID belongs to which machine.

This is a required step for registration.

', + showCancelButton: true, + confirmButtonText: "Create", + closeOnConfirm: false, + html: true + }, function (inputValue) { + if (inputValue === false) { + return false; + } + + if (inputValue === "") { + swal.showInputError("Please enter a valid label for your machine."); + return false; + } + + if (callback) { + callback(inputValue); + } + }); +} + function getMetaverseUrl(callback) { $.ajax('/api/metaverse_info', { success: function(data) { diff --git a/domain-server/resources/web/settings/js/settings.js b/domain-server/resources/web/settings/js/settings.js index 8a9971d520..ea38a30f49 100644 --- a/domain-server/resources/web/settings/js/settings.js +++ b/domain-server/resources/web/settings/js/settings.js @@ -40,6 +40,8 @@ $(document).ready(function(){ // call our method to setup the place names table setupPlacesTable(); + // hide the places table for now because we do not want that interacted with from the domain-server + $('#' + Settings.PLACES_TABLE_ID).hide(); setupDomainNetworkingSettings(); // setupDomainLabelSetting(); @@ -363,7 +365,7 @@ $(document).ready(function(){ confirmButtonText: "Create", closeOnConfirm: false, html: true - }, function(inputValue){ + }, function (inputValue) { if (inputValue === false) { swal.close(); @@ -373,7 +375,7 @@ $(document).ready(function(){ } } else { // we're going to change the alert to a new one with a spinner while we create this domain - showSpinnerAlert('Creating domain ID'); + // showSpinnerAlert('Creating domain ID'); createNewDomainID(inputValue, justConnected); } }); @@ -385,7 +387,12 @@ $(document).ready(function(){ "label": label } - $.post("/api/domains", domainJSON, function(data){ + $.post("/api/domains", domainJSON, function(data) { + if (data.status === "failure") { + failedToCreateDomainID(data, justConnected); + return; + } + // we successfully created a domain ID, set it on that field var domainID = data.domain.domainId; console.log("Setting domain id to ", data, domainID); @@ -406,40 +413,50 @@ $(document).ready(function(){ text: successText, html: true, confirmButtonText: 'Save' - }, function(){ + }, function () { saveSettings(); }); - }, 'json').fail(function(){ + }, 'json').fail(function (data) { + failedToCreateDomainID(data, justConnected); + }); + } + + function failedToCreateDomainID(data, justConnected) { + var errorText = "There was a problem creating your new domain ID. Do you want to try again or"; - var errorText = "There was a problem creating your new domain ID. Do you want to try again or"; + if (data && data.status === "failure") { + errorText = "Error: " + data.error + "
Do you want to try again or"; + console.log("Error: " + data.error); + } else { + console.log("Error: Failed to post to metaverse."); + } - if (justConnected) { - errorText += " just save your new access token?

You can always create a new domain ID later."; + if (justConnected) { + errorText += " just save your new access token?

You can always create a new domain ID later."; + } else { + errorText += " cancel?" + } + + // we failed to create the new domain ID, show a sweet-alert that lets them try again or cancel + swal({ + title: '', + type: 'error', + text: errorText, + html: true, + confirmButtonText: 'Try again', + showCancelButton: true, + closeOnConfirm: false + }, function (isConfirm) { + if (isConfirm) { + // they want to try creating a domain ID again + showDomainCreationAlert(justConnected); } else { - errorText += " cancel?" - } - - // we failed to create the new domain ID, show a sweet-alert that lets them try again or cancel - swal({ - title: '', - type: 'error', - text: errorText, - html: true, - confirmButtonText: 'Try again', - showCancelButton: true, - closeOnConfirm: false - }, function(isConfirm){ - if (isConfirm) { - // they want to try creating a domain ID again - showDomainCreationAlert(justConnected); - } else { - // they want to cancel - if (justConnected) { - // since they just connected we need to save the access token here - saveSettings(); - } + // they want to cancel + if (justConnected) { + // since they just connected we need to save the access token here + saveSettings(); } - }); + } }); } @@ -711,8 +728,8 @@ $(document).ready(function(){ name: 'places', label: 'Places', html_id: Settings.PLACES_TABLE_ID, - help: "The following places currently point to this domain.
To point places to this domain, " - + " go to the My Places " + help: "To point places to this domain, " + + " go to the Places " + "page in your Metaverse account.", read_only: true, can_add_new_rows: false, @@ -745,9 +762,10 @@ $(document).ready(function(){ var errorEl = createDomainLoadingError("There was an error retrieving your places."); $("#" + Settings.PLACES_TABLE_ID).after(errorEl); - var temporaryPlaceButton = dynamicButton(Settings.GET_TEMPORARY_NAME_BTN_ID, 'Get a temporary place name'); - temporaryPlaceButton.hide(); - $('#' + Settings.PLACES_TABLE_ID).after(temporaryPlaceButton); + // DISABLE TEMP PLACE NAME BUTTON... + // var temporaryPlaceButton = dynamicButton(Settings.GET_TEMPORARY_NAME_BTN_ID, 'Get a temporary place name'); + // temporaryPlaceButton.hide(); + // $('#' + Settings.PLACES_TABLE_ID).after(temporaryPlaceButton); if (accessTokenIsSet()) { appendAddButtonToPlacesTable(); } diff --git a/domain-server/resources/web/wizard/index.shtml b/domain-server/resources/web/wizard/index.shtml index 4093eda39a..6d56a99682 100644 --- a/domain-server/resources/web/wizard/index.shtml +++ b/domain-server/resources/web/wizard/index.shtml @@ -19,7 +19,7 @@ -
@@ -88,5 +91,142 @@
+
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + +
+ diff --git a/scripts/system/create/entityList/html/js/entityList.js b/scripts/system/create/entityList/html/js/entityList.js index b70e53ce15..be79593511 100644 --- a/scripts/system/create/entityList/html/js/entityList.js +++ b/scripts/system/create/entityList/html/js/entityList.js @@ -2,6 +2,7 @@ // // Created by Ryan Huffman on 19 Nov 2014 // Copyright 2014 High Fidelity, Inc. +// Copyright 2020 Vircadia contributors. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -46,6 +47,14 @@ const COLUMNS = { alwaysShown: true, defaultSortOrder: ASCENDING_SORT, }, + parentState: { + columnHeader: "A", + vglyph: true, + dropdownLabel: "Hierarchy", + propertyID: "parentState", + initialWidth: 0.08, + defaultSortOrder: DESCENDING_SORT, + }, name: { columnHeader: "Name", propertyID: "name", @@ -133,6 +142,20 @@ const COLUMNS = { initialWidth: 0.06, defaultSortOrder: DESCENDING_SORT, }, + created: { + columnHeader: "Created (UTC)", + dropdownLabel: "Creation Date", + propertyID: "created", + initialWidth: 0.38, + defaultSortOrder: DESCENDING_SORT, + }, + lastEdited: { + columnHeader: "Modified (UTC)", + dropdownLabel: "Modification Date", + propertyID: "lastEdited", + initialWidth: 0.38, + defaultSortOrder: DESCENDING_SORT, + }, }; const FILTER_TYPES = [ @@ -164,6 +187,7 @@ let selectedEntities = []; let entityList = null; // The ListView +let hmdMultiSelectMode = false; /** * @type EntityListContextMenu */ @@ -198,7 +222,31 @@ let elEntityTable, elRefresh, elToggleLocked, elToggleVisible, + elActionsMenu, + elSelectionMenu, + elMenuBackgroundOverlay, + elHmdMultiSelect, + elHmdCopy, + elHmdCut, + elHmdPaste, + elHmdDuplicate, + elUndo, + elRedo, + elParent, + elUnparent, elDelete, + elMoveEntitySelectionToAvatar, + elSelectAll, + elSelectInverse, + elSelectNone, + elSelectAllInBox, + elSelectAllTouchingBox, + elSelectParent, + elSelectTopParent, + elAddChildrenToSelection, + elSelectFamily, + elSelectTopFamily, + elTeleportToEntity, elFilterTypeMultiselectBox, elFilterTypeText, elFilterTypeOptions, @@ -233,7 +281,7 @@ const PROFILE = !ENABLE_PROFILING ? PROFILE_NOOP : function(name, fn, args) { console.log("PROFILE-Web " + profileIndent + "(" + name + ") End " + delta + "ms"); }; -function loaded() { +function loaded() { openEventBridge(function() { elEntityTable = document.getElementById("entity-table"); elEntityTableHeader = document.getElementById("entity-table-header"); @@ -241,8 +289,32 @@ function loaded() { elEntityTableScroll = document.getElementById("entity-table-scroll"); elRefresh = document.getElementById("refresh"); elToggleLocked = document.getElementById("locked"); - elToggleVisible = document.getElementById("visible"); + elToggleVisible = document.getElementById("visible"); + elHmdMultiSelect = document.getElementById("hmdmultiselect"); + elActionsMenu = document.getElementById("actions"); + elSelectionMenu = document.getElementById("selection"); + elMenuBackgroundOverlay = document.getElementById("menuBackgroundOverlay"); + elHmdCopy = document.getElementById("hmdcopy"); + elHmdCut = document.getElementById("hmdcut"); + elHmdPaste = document.getElementById("hmdpaste"); + elHmdDuplicate = document.getElementById("hmdduplicate"); + elUndo = document.getElementById("undo"); + elRedo = document.getElementById("redo"); + elParent = document.getElementById("parent"); + elUnparent = document.getElementById("unparent"); elDelete = document.getElementById("delete"); + elMoveEntitySelectionToAvatar = document.getElementById("moveEntitySelectionToAvatar"); + elSelectAll = document.getElementById("selectall"); + elSelectInverse = document.getElementById("selectinverse"); + elSelectNone = document.getElementById("selectnone"); + elSelectAllInBox = document.getElementById("selectallinbox"); + elSelectAllTouchingBox = document.getElementById("selectalltouchingbox"); + elSelectParent = document.getElementById("selectparent"); + elSelectTopParent = document.getElementById("selecttopparent"); + elAddChildrenToSelection = document.getElementById("addchildrentoselection"); + elSelectFamily = document.getElementById("selectfamily"); + elSelectTopFamily = document.getElementById("selecttopfamily"); + elTeleportToEntity = document.getElementById("teleport-to-entity"); elFilterTypeMultiselectBox = document.getElementById("filter-type-multiselect-box"); elFilterTypeText = document.getElementById("filter-type-text"); elFilterTypeOptions = document.getElementById("filter-type-options"); @@ -270,8 +342,156 @@ function loaded() { elExport.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'export'})); }; + elHmdMultiSelect.onclick = function() { + if (hmdMultiSelectMode) { + elHmdMultiSelect.className = "vglyph"; + hmdMultiSelectMode = false; + } else { + elHmdMultiSelect.className = "white vglyph"; + hmdMultiSelectMode = true; + } + EventBridge.emitWebEvent(JSON.stringify({ type: 'hmdMultiSelectMode', value: hmdMultiSelectMode })); + }; + elActionsMenu.onclick = function() { + document.getElementById("menuBackgroundOverlay").style.display = "block"; + document.getElementById("actions-menu").style.display = "block"; + }; + elSelectionMenu.onclick = function() { + document.getElementById("menuBackgroundOverlay").style.display = "block"; + document.getElementById("selection-menu").style.display = "block"; + }; + elMenuBackgroundOverlay.onclick = function() { + closeAllEntityListMenu(); + }; + elHmdCopy.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'copy' })); + closeAllEntityListMenu(); + }; + elHmdCut.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'cut' })); + closeAllEntityListMenu(); + }; + elHmdPaste.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'paste' })); + closeAllEntityListMenu(); + }; + elHmdDuplicate.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'duplicate' })); + closeAllEntityListMenu(); + }; + elParent.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'parent' })); + closeAllEntityListMenu(); + }; + elUnparent.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'unparent' })); + closeAllEntityListMenu(); + }; + elUndo.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'undo' })); + closeAllEntityListMenu(); + }; + elRedo.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'redo' })); + closeAllEntityListMenu(); + }; elDelete.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'delete' })); + closeAllEntityListMenu(); + }; + elMoveEntitySelectionToAvatar.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'moveEntitySelectionToAvatar' })); + closeAllEntityListMenu(); + }; + elSelectAll.onclick = function() { + + let visibleEntityIDs = visibleEntities.map(visibleEntity => visibleEntity.id); + let selectionIncludesAllVisibleEntityIDs = visibleEntityIDs.every(visibleEntityID => { + return selectedEntities.includes(visibleEntityID); + }); + + let selection = []; + + if (!selectionIncludesAllVisibleEntityIDs) { + selection = visibleEntityIDs; + } + + updateSelectedEntities(selection, false); + + EventBridge.emitWebEvent(JSON.stringify({ + "type": "selectionUpdate", + "focus": false, + "entityIds": selection + })); + + closeAllEntityListMenu(); + }; + elSelectInverse.onclick = function() { + let visibleEntityIDs = visibleEntities.map(visibleEntity => visibleEntity.id); + let selectionIncludesAllVisibleEntityIDs = visibleEntityIDs.every(visibleEntityID => { + return selectedEntities.includes(visibleEntityID); + }); + + let selection = []; + + if (!selectionIncludesAllVisibleEntityIDs) { + visibleEntityIDs.forEach(function(id) { + if (!selectedEntities.includes(id)) { + selection.push(id); + } + }); + } + + updateSelectedEntities(selection, false); + + EventBridge.emitWebEvent(JSON.stringify({ + "type": "selectionUpdate", + "focus": false, + "entityIds": selection + })); + + closeAllEntityListMenu(); + }; + elSelectNone.onclick = function() { + updateSelectedEntities([], false); + EventBridge.emitWebEvent(JSON.stringify({ + "type": "selectionUpdate", + "focus": false, + "entityIds": [] + })); + closeAllEntityListMenu(); + }; + elSelectAllInBox.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'selectAllInBox' })); + closeAllEntityListMenu(); + }; + elSelectAllTouchingBox.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'selectAllTouchingBox' })); + closeAllEntityListMenu(); + }; + elSelectParent.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'selectParent' })); + closeAllEntityListMenu(); + }; + elSelectTopParent.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'selectTopParent' })); + closeAllEntityListMenu(); + }; + elAddChildrenToSelection.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'addChildrenToSelection' })); + closeAllEntityListMenu(); + }; + elSelectFamily.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'selectFamily' })); + closeAllEntityListMenu(); + }; + elSelectTopFamily.onclick = function() { + EventBridge.emitWebEvent(JSON.stringify({ type: 'selectTopFamily' })); + closeAllEntityListMenu(); + }; + elTeleportToEntity.onclick = function () { + EventBridge.emitWebEvent(JSON.stringify({ type: "teleportToEntity" })); + closeAllEntityListMenu(); }; elToggleSpaceMode.onclick = function() { EventBridge.emitWebEvent(JSON.stringify({ type: 'toggleSpaceMode' })); @@ -330,9 +550,12 @@ function loaded() { elTh.setAttribute("id", thID); elTh.setAttribute("columnIndex", columnIndex); elTh.setAttribute("columnID", columnID); - if (columnData.glyph) { + if (columnData.glyph || columnData.vglyph) { let elGlyph = document.createElement("span"); elGlyph.className = "glyph"; + if (columnData.vglyph) { + elGlyph.className = "vglyph"; + } elGlyph.innerHTML = columnData.columnHeader; elTh.appendChild(elGlyph); } else { @@ -538,7 +761,7 @@ function loaded() { let selection = [entityID]; let controlKey = window.navigator.platform.startsWith("Mac") ? clickEvent.metaKey : clickEvent.ctrlKey; - if (controlKey) { + if (controlKey || hmdMultiSelectMode) { let selectedIndex = selectedEntities.indexOf(entityID); if (selectedIndex >= 0) { selection = []; @@ -632,10 +855,13 @@ function loaded() { isBaked: entity.isBaked, drawCalls: displayIfNonZero(entity.drawCalls), hasScript: entity.hasScript, + parentState: entity.parentState, + created: entity.created, + lastEdited: entity.lastEdited, elRow: null, // if this entity has a visible row element assigned to it selected: false // if this entity is selected for edit regardless of having a visible row }; - + entities.push(entityData); entitiesByID[entityData.id] = entityData; }); @@ -817,7 +1043,7 @@ function loaded() { function updateSelectedEntities(selectedIDs, autoScroll) { let notFound = false; - + // reset all currently selected entities and their rows first selectedEntities.forEach(function(id) { let entity = entitiesByID[id]; @@ -828,7 +1054,7 @@ function loaded() { } } }); - + // then reset selected entities list with newly selected entities and set them selected selectedEntities = []; selectedIDs.forEach(function(id) { @@ -891,6 +1117,8 @@ function loaded() { let elCell = elRow.childNodes[i]; if (column.data.glyph) { elCell.innerHTML = itemData[column.data.propertyID] ? column.data.columnHeader : null; + } else if (column.data.vglyph) { + elCell.innerHTML = itemData[column.data.propertyID]; } else { let value = itemData[column.data.propertyID]; if (column.data.format) { @@ -978,6 +1206,9 @@ function loaded() { let column = columnsByID[columnID]; let visible = column.elTh.style.visibility !== "hidden"; let className = column.data.glyph ? "glyph" : ""; + if (column.data.vglyph) { + className = "vglyph"; + } className += visible ? "" : " hidden"; return className; } @@ -1327,7 +1558,7 @@ function loaded() { break; } - if (controlKey && keyCodeString === "A") { + if (controlKey && !shiftKey && !altKey && keyCodeString === "A") { let visibleEntityIDs = visibleEntities.map(visibleEntity => visibleEntity.id); let selectionIncludesAllVisibleEntityIDs = visibleEntityIDs.every(visibleEntityID => { return selectedEntities.includes(visibleEntityID); @@ -1350,6 +1581,32 @@ function loaded() { return; } + if (controlKey && !shiftKey && !altKey && keyCodeString === "I") { + let visibleEntityIDs = visibleEntities.map(visibleEntity => visibleEntity.id); + let selectionIncludesAllVisibleEntityIDs = visibleEntityIDs.every(visibleEntityID => { + return selectedEntities.includes(visibleEntityID); + }); + + let selection = []; + + if (!selectionIncludesAllVisibleEntityIDs) { + visibleEntityIDs.forEach(function(id) { + if (!selectedEntities.includes(id)) { + selection.push(id); + } + }); + } + + updateSelectedEntities(selection); + + EventBridge.emitWebEvent(JSON.stringify({ + "type": "selectionUpdate", + "focus": false, + "entityIds": selection + })); + + return; + } EventBridge.emitWebEvent(JSON.stringify({ type: 'keyUpEvent', @@ -1364,10 +1621,12 @@ function loaded() { } })); }, false); - + if (window.EventBridge !== undefined) { EventBridge.scriptEventReceived.connect(function(data) { + data = JSON.parse(data); + if (data.type === "clearEntityList") { clearEntities(); } else if (data.type === "selectionUpdate") { @@ -1395,6 +1654,12 @@ function loaded() { removeEntities(data.ids); } else if (data.type === "setSpaceMode") { setSpaceMode(data.spaceMode); + } else if (data.type === "confirmHMDstate") { + if (data.isHmd) { + document.getElementById("hmdmultiselect").style.display = "inline"; + } else { + document.getElementById("hmdmultiselect").style.display = "none"; + } } }); } @@ -1419,4 +1684,11 @@ function loaded() { $(window).blur(function() { entityListContextMenu.close(); }); + + function closeAllEntityListMenu() { + document.getElementById("menuBackgroundOverlay").style.display = "none"; + document.getElementById("selection-menu").style.display = "none"; + document.getElementById("actions-menu").style.display = "none"; + } + } diff --git a/scripts/system/create/entityProperties/html/js/entityProperties.js b/scripts/system/create/entityProperties/html/js/entityProperties.js index 8364d5b155..f3f92a887e 100644 --- a/scripts/system/create/entityProperties/html/js/entityProperties.js +++ b/scripts/system/create/entityProperties/html/js/entityProperties.js @@ -1618,7 +1618,8 @@ const GROUPS = [ type: "vec3", vec3Type: "pyr", multiplier: DEGREES_TO_RADIANS, - decimals: 4, + decimals: 6, + step: 1, subLabels: [ "x", "y", "z" ], unit: "deg/s", propertyID: "localAngularVelocity", diff --git a/scripts/system/create/entitySelectionTool/entitySelectionTool.js b/scripts/system/create/entitySelectionTool/entitySelectionTool.js index 33f9bbafb3..ffa828affe 100644 --- a/scripts/system/create/entitySelectionTool/entitySelectionTool.js +++ b/scripts/system/create/entitySelectionTool/entitySelectionTool.js @@ -19,6 +19,7 @@ const SPACE_LOCAL = "local"; const SPACE_WORLD = "world"; const HIGHLIGHT_LIST_NAME = "editHandleHighlightList"; +const MIN_DISTANCE_TO_REZ_FROM_AVATAR = 3; Script.include([ "../../libraries/controllers.js", @@ -26,7 +27,6 @@ Script.include([ "../../libraries/utils.js" ]); - function deepCopy(v) { return JSON.parse(JSON.stringify(v)); } @@ -103,7 +103,11 @@ SelectionManager = (function() { if (wantDebug) { print("setting selection to " + messageParsed.entityID); } - that.setSelections([messageParsed.entityID], that); + if (hmdMultiSelectMode) { + that.addEntity(messageParsed.entityID, true, that); + } else { + that.setSelections([messageParsed.entityID], that); + } } } else if (messageParsed.method === "clearSelection") { if (!SelectionDisplay.triggered() || SelectionDisplay.triggeredHand === messageParsed.hand) { @@ -314,6 +318,7 @@ SelectionManager = (function() { that.addChildrenEntities(originalEntityID, entitiesToDuplicate, entityHostTypes[i].entityHostType); } + var duplicateInterrupted = false; // duplicate entities from above and store their original to new entity mappings and children needing re-parenting for (var i = 0; i < entitiesToDuplicate.length; i++) { var originalEntityID = entitiesToDuplicate[i]; @@ -360,6 +365,8 @@ SelectionManager = (function() { duplicatedChildrenWithOldParents[newEntityID] = properties.parentID; } originalEntityToNewEntityID[originalEntityID] = newEntityID; + } else { + duplicateInterrupted = true; } } @@ -378,6 +385,11 @@ SelectionManager = (function() { } }); + if (duplicateInterrupted) { + audioFeedback.rejection(); + } else { + audioFeedback.confirmation(); + } return duplicatedEntityIDs; }; @@ -624,6 +636,141 @@ SelectionManager = (function() { } }; + that.teleportToEntity = function() { + if (that.hasSelection()) { + var distanceFromTarget = MIN_DISTANCE_TO_REZ_FROM_AVATAR + Math.max(Math.max(that.worldDimensions.x, that.worldDimensions.y), that.worldDimensions.z); + var teleportTargetPosition = Vec3.sum(that.worldPosition, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: distanceFromTarget })); + MyAvatar.goToLocation(teleportTargetPosition, false); + } else { + audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected."); + } + }; + + that.moveEntitiesSelectionToAvatar = function() { + if (that.hasSelection() && that.hasUnlockedSelection()) { + that.saveProperties(); + var distanceFromTarget = MIN_DISTANCE_TO_REZ_FROM_AVATAR + Math.max(Math.max(that.worldDimensions.x, that.worldDimensions.y), that.worldDimensions.z); + var targetPosition = Vec3.sum(MyAvatar.position, Vec3.multiplyQbyV(MyAvatar.orientation, { x: 0, y: 0, z: -distanceFromTarget })); + // editing a parent will cause all the children to automatically follow along, so don't + // edit any entity who has an ancestor in that.selections + var toMove = that.selections.filter(function (selection) { + if (that.selections.indexOf(that.savedProperties[selection].parentID) >= 0) { + return false; // a parent is also being moved, so don't issue an edit for this entity + } else { + return true; + } + }); + for (var i = 0; i < toMove.length; i++) { + var id = toMove[i]; + var properties = that.savedProperties[id]; + var relativePosition = Vec3.subtract(properties.position, that.worldPosition); + var newPosition = Vec3.sum(relativePosition, targetPosition); + Entities.editEntity(id, { "position": newPosition }); + } + that._update(false, this); + } else { + audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected or the selection has locked entities."); + } + }; + + that.selectParent = function() { + if (that.hasSelection()) { + var currentSelection = that.selections; + that.selections = []; + for (var i = 0; i < currentSelection.length; i++) { + var properties = Entities.getEntityProperties(currentSelection[i], ['parentID']); + if (properties.parentID !== Uuid.NULL) { + that.selections.push(properties.parentID); + } + } + that._update(true, this); + } else { + audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected."); + } + }; + + that.selectTopParent = function() { + if (that.hasSelection()) { + var currentSelection = that.selections; + that.selections = []; + for (var i = 0; i < currentSelection.length; i++) { + var topParentId = getTopParent(currentSelection[i]); + if (topParentId !== Uuid.NULL) { + that.selections.push(topParentId); + } + } + that._update(true, this); + } else { + audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected."); + } + }; + + function getTopParent(id) { + var topParentId = Uuid.NULL; + var properties = Entities.getEntityProperties(id, ['parentID']); + if (properties.parentID === Uuid.NULL) { + topParentId = id; + } else { + topParentId = getTopParent(properties.parentID); + } + return topParentId; + } + + that.addChildrenToSelection = function() { + if (that.hasSelection()) { + for (var i = 0; i < that.selections.length; i++) { + var childrenIDs = Entities.getChildrenIDs(that.selections[i]); + var collectNewChildren; + var j; + var k = 0; + do { + collectNewChildren = Entities.getChildrenIDs(childrenIDs[k]); + if (collectNewChildren.length > 0) { + for (j = 0; j < collectNewChildren.length; j++) { + childrenIDs.push(collectNewChildren[j]); + } + } + k++; + } while (k < childrenIDs.length); + if (childrenIDs.length > 0) { + for (j = 0; j < childrenIDs.length; j++) { + that.selections.push(childrenIDs[j]); + } + } + } + that._update(true, this); + } else { + audioFeedback.rejection(); + Window.notifyEditError("You have nothing selected."); + } + }; + + that.hasUnlockedSelection = function() { + var selectionNotLocked = true; + for (var i = 0; i < that.selections.length; i++) { + var properties = Entities.getEntityProperties(that.selections[i], ['locked']); + if (properties.locked) { + selectionNotLocked = false; + break; + } + } + return selectionNotLocked; + }; + + that.selectFamily = function() { + that.selectParent(); + that.addChildrenToSelection(); + }; + + that.selectTopFamily = function() { + that.selectTopParent(); + that.addChildrenToSelection(); + }; + return that; })(); @@ -648,8 +795,10 @@ SelectionDisplay = (function() { const COLOR_HOVER = { red: 255, green: 220, blue: 82 }; const COLOR_DUPLICATOR = { red: 162, green: 0, blue: 255 }; const COLOR_ROTATE_CURRENT_RING = { red: 255, green: 99, blue: 9 }; - const COLOR_BOUNDING_EDGE = { red: 128, green: 128, blue: 128 }; - const COLOR_SCALE_CUBE = { red: 160, green: 160, blue: 160 }; + const COLOR_BOUNDING_EDGE = { red: 160, green: 160, blue: 160 }; + const COLOR_BOUNDING_EDGE_PARENT = { red: 194, green: 123, blue: 0 }; + const COLOR_BOUNDING_EDGE_CHILDREN = { red: 0, green: 168, blue: 214 }; + const COLOR_SCALE_CUBE = { red: 192, green: 192, blue: 192 }; const COLOR_DEBUG_PICK_PLANE = { red: 255, green: 255, blue: 255 }; const COLOR_DEBUG_PICK_PLANE_HIT = { red: 255, green: 165, blue: 0 }; @@ -1779,6 +1928,18 @@ SelectionDisplay = (function() { var rotationZ = Quat.multiply(rotation, localRotationZ); worldRotationZ = rotationZ; + var handleBoundingBoxColor = COLOR_BOUNDING_EDGE; + if (SelectionManager.selections.length === 1) { + var parentState = getParentState(SelectionManager.selections[0]); + if (parentState === "CHILDREN") { + handleBoundingBoxColor = COLOR_BOUNDING_EDGE_CHILDREN; + } else { + if (parentState === "PARENT" || parentState === "PARENT_CHILDREN") { + handleBoundingBoxColor = COLOR_BOUNDING_EDGE_PARENT; + } + } + } + var selectionBoxGeometry = { position: position, rotation: rotation, @@ -1900,6 +2061,7 @@ SelectionDisplay = (function() { Entities.editEntity(handleBoundingBox, { position: position, rotation: rotation, + color: handleBoundingBoxColor, dimensions: dimensions }); diff --git a/scripts/system/create/qml/EditTabView.qml b/scripts/system/create/qml/EditTabView.qml index a0cff70d50..53f6068424 100644 --- a/scripts/system/create/qml/EditTabView.qml +++ b/scripts/system/create/qml/EditTabView.qml @@ -55,18 +55,18 @@ TabBar { font.pixelSize: 14 font.bold: true anchors.top: parent.top - anchors.topMargin: 28 + anchors.topMargin: 30 anchors.left: parent.left - anchors.leftMargin: 28 + anchors.leftMargin: 30 } Flow { id: createEntitiesFlow - spacing: 35 + spacing: 20 anchors.right: parent.right - anchors.rightMargin: 55 + anchors.rightMargin: 30 anchors.left: parent.left - anchors.leftMargin: 55 + anchors.leftMargin: 30 anchors.top: parent.top anchors.topMargin: 70 @@ -186,9 +186,9 @@ TabBar { color: hifi.buttons.black colorScheme: hifi.colorSchemes.dark anchors.right: parent.right - anchors.rightMargin: 55 + anchors.rightMargin: 30 anchors.left: parent.left - anchors.leftMargin: 55 + anchors.leftMargin: 30 anchors.top: createEntitiesFlow.bottom anchors.topMargin: 35 onClicked: { @@ -205,9 +205,9 @@ TabBar { color: hifi.buttons.black colorScheme: hifi.colorSchemes.dark anchors.right: parent.right - anchors.rightMargin: 55 + anchors.rightMargin: 30 anchors.left: parent.left - anchors.leftMargin: 55 + anchors.leftMargin: 30 anchors.top: assetServerButton.bottom anchors.topMargin: 20 onClicked: { diff --git a/scripts/system/create/qml/NewMaterialDialog.qml b/scripts/system/create/qml/NewMaterialDialog.qml index 3cc619e176..e08ca868b6 100644 --- a/scripts/system/create/qml/NewMaterialDialog.qml +++ b/scripts/system/create/qml/NewMaterialDialog.qml @@ -55,7 +55,7 @@ Rectangle { Text { id: text1 - text: qsTr("Material URL (Optional)") + text: qsTr("Material URL (Optional)") color: "#ffffff" font.pixelSize: 12 } diff --git a/scripts/system/create/qml/NewModelDialog.qml b/scripts/system/create/qml/NewModelDialog.qml index dd4ef3c8ad..758706a79b 100644 --- a/scripts/system/create/qml/NewModelDialog.qml +++ b/scripts/system/create/qml/NewModelDialog.qml @@ -55,7 +55,7 @@ Rectangle { Text { id: text1 - text: qsTr("Model URL") + text: qsTr("Model URL (.fbx, .fst, .glb, .gltf, .obj, .gz)") color: "#ffffff" font.pixelSize: 12 } diff --git a/scripts/system/html/css/edit-style.css b/scripts/system/html/css/edit-style.css index ada8116a0d..1f1fb9c86a 100644 --- a/scripts/system/html/css/edit-style.css +++ b/scripts/system/html/css/edit-style.css @@ -65,6 +65,14 @@ url(../fonts/hifi-glyphs.ttf); } +@font-face { + font-family: Vircadia-Glyphs; + src: url(../../../../resources/fonts/vircadia_glyphs.ttf), + url(../../../../fonts/vircadia_glyphs.ttf), + url(../../../../interface/resources/fonts/vircadia_glyphs.ttf), + url(../fonts/vircadia_glyphs.ttf); +} + * { margin: 0; padding: 0; @@ -407,6 +415,21 @@ input[type=button].glyph, button.hifi-edit-button.glyph { padding: 0; } +input[type=button].normal, button.hifi-edit-button.normal { + font-family: FiraSans-SemiBold; + font-size: 15px; + text-transform: none; + padding: 0; +} + +input[type=button].vglyph, button.hifi-edit-button.vglyph { + font-family: Vircadia-Glyphs; + font-size: 20px; + text-transform: none; + min-width: 32px; + padding: 0; +} + input[type=button].red, button.hifi-edit-button.red { color: #fff; background-color: #94132e; @@ -417,6 +440,16 @@ input[type=button].blue, button.hifi-edit-button.blue { background-color: #1080b8; background: linear-gradient(#00b4ef 20%, #1080b8 100%); } +input[type=button].orange, button.hifi-edit-button.orange { + color: #fff; + background-color: #8f5100; + background: linear-gradient(#d97b00 20%, #8f5100 100%); +} +input[type=button].green, button.hifi-edit-button.green { + color: #fff; + background-color: #078a00; + background: linear-gradient(#00cc07 20%, #078a00 100%); +} input[type=button].white, button.hifi-edit-button.white { color: #121212; background-color: #afafaf; @@ -435,6 +468,14 @@ input[type=button].blue:enabled:hover, button.hifi-edit-button.blue:enabled:hove background: linear-gradient(#00b4ef, #00b4ef); border: none; } +input[type=button].orange:enabled:hover, button.hifi-edit-button.orange:enabled:hover { + background: linear-gradient(#d97b00, #d97b00); + border: none; +} +input[type=button].green:enabled:hover, button.hifi-edit-button.green:enabled:hover { + background: linear-gradient(#00cc07, #00cc07); + border: none; +} input[type=button].white:enabled:hover, button.hifi-edit-button.white:enabled:hover { background: linear-gradient(#fff, #fff); border: none; @@ -449,6 +490,12 @@ input[type=button].red:active, button.hifi-edit-button.red:active { input[type=button].blue:active, button.hifi-edit-button.blue:active { background: linear-gradient(#1080b8, #1080b8); } +input[type=button].orange:active, button.hifi-edit-button.orange:active { + background: linear-gradient(#8f5100, #8f5100); +} +input[type=button].green:active, button.hifi-edit-button.green:active { + background: linear-gradient(#078a00, #078a00); +} input[type=button].white:active, button.hifi-edit-button.white:active { background: linear-gradient(#afafaf, #afafaf); } @@ -1196,7 +1243,6 @@ textarea:enabled[scrolling="true"]::-webkit-resizer { background: #2e2e2e url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACKSURBVChTjdAxDsMgDAXQT4UYuQIzCwsSKxsSJ4YDoByDY7AwUOG2aZMQqX+xhd9gzIwxA3/k8a7LCCFgraX+Fk4UY4RSCoyxNfwgzjlyzhhjXOEvSimhtUbvB3hGUkp472m2wxUKIaD3TnOCd6jWim3bvlBrfdjJOUeolEJoZj/4PMH83bl/BXgCWSs2Z09IjgoAAAAASUVORK5CYII=) no-repeat bottom right; } - div#grid-section, body#entity-list-body { padding-bottom: 0; margin: 16px; @@ -1227,12 +1273,6 @@ div#grid-section, body#entity-list-body { border-bottom-left-radius: 0; } -#delete { - float: right; - margin-right: 0; - background-color: #ff0000; -} - #entity-list { position: relative; /* New positioning context. */ } @@ -1408,6 +1448,11 @@ input[type=button]#export { font-size: 15px; } +#entity-table-scroll .vglyph { + font-family: Vircadia-Glyphs; + font-size: 15px; +} + #entity-table { margin-top: -28px; margin-bottom: -18px; @@ -1420,7 +1465,7 @@ input[type=button]#export { background: none; } -#entity-table .glyph { +#entity-table .glyph .vglyph { margin: 0 -2px 0 -2px; vertical-align: middle; } @@ -1453,11 +1498,11 @@ input[type=button]#export { outline: none; } -#entity-table th .glyph { +#entity-table th .glyph .vglyph { position: relative; left: 4px; } -#entity-table th .glyph + .sort-order { +#entity-table th .glyph .vglyph + .sort-order { position: relative; left: 4px; } @@ -1484,7 +1529,7 @@ input[type=button]#export { #entity-table td { box-sizing: border-box; } -#entity-table td.glyph { +#entity-table td .glyph .vglyph { text-align: center; padding: 0; } @@ -1820,3 +1865,71 @@ div.multiZoneSelToolbar { padding: 0px; } +#menuBackgroundOverlay{ + background-color:transparent; + position:fixed; + width: 100%; + height: 100%; + top:0; + left:0; + right:0; + bottom:0; + display:none; +} + +div.entity-list-menu { + position: fixed; + display: none; + width: 70%; + height: 30px; + top: 42px; + left: 150px; + right: 0; + bottom: 0; + border-style: solid; + border-color: #505050; + border-width: 1px; + background-color: #c0c0c0; + z-index: 2; + cursor: pointer; +} + +div.menu-separator{ + width: 90%; + height: 2px; + background-color: #505050; + } + +button.menu-button { + font-family: FiraSans-SemiBold; + font-size: 15px; + width: 100%; + height: auto; + border-radius: 0; + padding: 6px; + text-align: left; + background-color: #c0c0c0; + border: none; +} + +button.menu-button:hover { + background-color: #00B4EF; + border: none; +} + +button.menu-button:active { + background-color: #00B4EF; + border: none; +} + +div.menu-item { + width: 100%; +} + +div.menu-item-caption { + float: left; +} + +div.menu-item-shortcut { + float: right; +} diff --git a/scripts/system/onFirstRun.js b/scripts/system/onFirstRun.js new file mode 100644 index 0000000000..65c1d06ec5 --- /dev/null +++ b/scripts/system/onFirstRun.js @@ -0,0 +1,32 @@ +'use strict'; + +// +// onFirstRun.js +// +// Created by Kalila L. on Oct 5 2020. +// Copyright 2020 Vircadia contributors. +// +// This script triggers on first run to perform bootstrapping actions. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +(function() { // BEGIN LOCAL_SCOPE + var SETTING_TO_CHECK = 'firstRun'; + var DEFAULT_DISPLAY_NAME = ''; + + if (!Settings.getValue(SETTING_TO_CHECK, false)) { + return; + } + + if (MyAvatar.displayName === '') { + var selectedDisplayName = Window.prompt('Enter a display name.', MyAvatar.displayName); + + if (selectedDisplayName === '') { + MyAvatar.displayName = DEFAULT_DISPLAY_NAME; + } else { + MyAvatar.displayName = selectedDisplayName; + } + } +}()); diff --git a/scripts/tutorials/butterflies.js b/scripts/tutorials/butterflies.js index 9d8d1de52c..5876b04240 100644 --- a/scripts/tutorials/butterflies.js +++ b/scripts/tutorials/butterflies.js @@ -86,13 +86,13 @@ function addButterfly() { dimensions: dimensions, color: color, animation: { - url: "http://hifi-production.s3.amazonaws.com/tutorials/butterflies/butterfly.fbx", + url: "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/butterflies/butterfly.fbx", fps: newFrameRate, loop: true, running: true, startAutomatically:false }, - modelURL: "http://hifi-production.s3.amazonaws.com/tutorials/butterflies/butterfly.fbx" + modelURL: "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/butterflies/butterfly.fbx" }; butterflies.push(Entities.addEntity(properties)); } diff --git a/scripts/tutorials/createCow.js b/scripts/tutorials/createCow.js index 0f034ecefa..c23e2eab1f 100644 --- a/scripts/tutorials/createCow.js +++ b/scripts/tutorials/createCow.js @@ -9,9 +9,9 @@ // // references to our assets. entity scripts need to be served from somewhere that is publically accessible -- so http(s) or atp -var SCRIPT_URL ="http://hifi-production.s3.amazonaws.com/tutorials/entity_scripts/cow.js"; -var MODEL_URL = "http://hifi-production.s3.amazonaws.com/tutorials/cow/cow.fbx"; -var ANIMATION_URL = 'http://hifi-production.s3.amazonaws.com/tutorials/cow/cow.fbx'; +var SCRIPT_URL ="https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/entity_scripts/cow.js"; +var MODEL_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/cow/cow.fbx"; +var ANIMATION_URL = 'https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/cow/cow.fbx'; // this part of the code describes how to center the entity in front of your avatar when it is created. var orientation = MyAvatar.orientation; diff --git a/scripts/tutorials/createDice.js b/scripts/tutorials/createDice.js index 46ad0172aa..7b88686c91 100644 --- a/scripts/tutorials/createDice.js +++ b/scripts/tutorials/createDice.js @@ -23,7 +23,7 @@ var DIE_SIZE = 0.20; var madeSound = true; // Set false at start of throw to look for collision -SoundCache.getSound("http://hifi-production.s3.amazonaws.com/tutorials/dice/diceCollide.wav"); +SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/dice/diceCollide.wav"); var INSUFFICIENT_PERMISSIONS_ERROR_MSG = "You do not have the necessary permissions to create new objects." @@ -45,7 +45,7 @@ var toolBar = new ToolBar(0, 0, ToolBar.HORIZONTAL, "highfidelity.toolbars-dice" var offButton = toolBar.addOverlay("image", { width: BUTTON_SIZE, height: BUTTON_SIZE, - imageURL: "http://hifi-production.s3.amazonaws.com/tutorials/dice/close.png", + imageURL: "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/dice/close.png", alpha: 1 }); @@ -54,11 +54,11 @@ var deleteButton = toolBar.addOverlay("image", { y: screenSize.y - (BUTTON_SIZE + PADDING)+BOTTOM_PADDING, width: BUTTON_SIZE, height: BUTTON_SIZE, - imageURL: "http://hifi-production.s3.amazonaws.com/tutorials/dice/delete.png", + imageURL: "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/dice/delete.png", alpha: 1 }); -var diceIconURL = "http://hifi-production.s3.amazonaws.com/tutorials/dice/dice.png" +var diceIconURL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/dice/dice.png" var diceButton = toolBar.addOverlay("image", { x: screenSize.x / 2 + PADDING, y: screenSize.y - (BUTTON_SIZE + PADDING)+BOTTOM_PADDING, @@ -82,7 +82,7 @@ function shootDice(position, velocity) { for (var i = 0; i < NUMBER_OF_DICE; i++) { dice.push(Entities.addEntity({ type: "Model", - modelURL: "http://hifi-production.s3.amazonaws.com/tutorials/dice/goldDie.fbx", + modelURL: "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/dice/goldDie.fbx", position: position, velocity: velocity, rotation: Quat.fromPitchYawRollDegrees(Math.random() * 360, Math.random() * 360, Math.random() * 360), @@ -99,7 +99,7 @@ function shootDice(position, velocity) { lifetime: LIFETIME, shapeType: "box", dynamic: true, - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/tutorials/dice/diceCollide.wav" + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/dice/diceCollide.wav" })); position = Vec3.sum(position, Vec3.multiply(DIE_SIZE, Vec3.normalize(Quat.getRight(Camera.getOrientation())))); } diff --git a/scripts/tutorials/createFlashlight.js b/scripts/tutorials/createFlashlight.js index 329be56af7..5bbbc52f24 100644 --- a/scripts/tutorials/createFlashlight.js +++ b/scripts/tutorials/createFlashlight.js @@ -9,8 +9,8 @@ // -var SCRIPT_URL = "http://hifi-production.s3.amazonaws.com/tutorials/entity_scripts/flashlight.js"; -var MODEL_URL = "http://hifi-production.s3.amazonaws.com/tutorials/flashlight/flashlight2.fbx"; +var SCRIPT_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/entity_scripts/flashlight.js"; +var MODEL_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/flashlight/flashlight2.fbx"; var center = Vec3.sum(Vec3.sum(MyAvatar.position, { x: 0, diff --git a/scripts/tutorials/createGolfClub.js b/scripts/tutorials/createGolfClub.js index 4135b6680d..fb2466e0f4 100644 --- a/scripts/tutorials/createGolfClub.js +++ b/scripts/tutorials/createGolfClub.js @@ -17,8 +17,8 @@ orientation.x = 0; orientation = Quat.fromVec3Degrees(orientation); var center = Vec3.sum(MyAvatar.getHeadPosition(), Vec3.multiply(2, Quat.getForward(orientation))); -var CLUB_MODEL = "http://hifi-production.s3.amazonaws.com/tutorials/golfClub/putter_VR.fbx"; -var CLUB_COLLISION_HULL = "http://hifi-production.s3.amazonaws.com/tutorials/golfClub/club_collision_hull.obj"; +var CLUB_MODEL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/golfClub/putter_VR.fbx"; +var CLUB_COLLISION_HULL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/golfClub/club_collision_hull.obj"; var CLUB_DIMENSIONS = { "x": 0.043093059211969376, @@ -34,7 +34,7 @@ var CLUB_ROTATION = { }; -var SCRIPT_URL = "http://hifi-production.s3.amazonaws.com/tutorials/entity_scripts/golfClub.js"; +var SCRIPT_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/entity_scripts/golfClub.js"; var golfClubProperties = { position: center, lifetime: 3600, diff --git a/scripts/tutorials/createPictureFrame.js b/scripts/tutorials/createPictureFrame.js index 873b604bfa..ea1e5ae7de 100644 --- a/scripts/tutorials/createPictureFrame.js +++ b/scripts/tutorials/createPictureFrame.js @@ -17,7 +17,7 @@ var center = Vec3.sum(Vec3.sum(MyAvatar.position, { }), Vec3.multiply(1, Quat.getForward(Camera.getOrientation()))); // this is just a model exported from blender with a texture named 'Picture' on one face. also made it emissive so it doesn't require lighting. -var MODEL_URL = "http://hifi-production.s3.amazonaws.com/tutorials/pictureFrame/finalFrame.fbx"; +var MODEL_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pictureFrame/finalFrame.fbx"; //this is where we are going to get our image from. the stuff at the end is our API key. var NASA_API_ENDPOINT = "https://api.nasa.gov/planetary/apod?api_key=XNmgPJvVK8hGroZHB19PaQtlqKZk4q8GorWViuND"; @@ -59,7 +59,7 @@ function makePictureFrame() { } var pictureFrame = Entities.addEntity(pictureFrameProperties); - var OUTER_FRAME_MODEL_URL = "http://hifi-production.s3.amazonaws.com/tutorials/pictureFrame/outer_frame.fbx"; + var OUTER_FRAME_MODEL_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pictureFrame/outer_frame.fbx"; var outerFrameProps = { name: "Tutorial Outer Frame", type: "Model", diff --git a/scripts/tutorials/createPingPongGun.js b/scripts/tutorials/createPingPongGun.js index 927738f29e..b5e397d5ed 100644 --- a/scripts/tutorials/createPingPongGun.js +++ b/scripts/tutorials/createPingPongGun.js @@ -7,9 +7,9 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -var SCRIPT_URL = "http://hifi-production.s3.amazonaws.com/tutorials/entity_scripts/pingPongGun.js"; -var MODEL_URL = 'http://hifi-production.s3.amazonaws.com/tutorials/pingPongGun/Pingpong-Gun-New.fbx'; -var COLLISION_HULL_URL = 'http://hifi-production.s3.amazonaws.com/tutorials/pingPongGun/Pingpong-Gun-New.obj'; +var SCRIPT_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/entity_scripts/pingPongGun.js"; +var MODEL_URL = 'https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pingPongGun/Pingpong-Gun-New.fbx'; +var COLLISION_HULL_URL = 'https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pingPongGun/Pingpong-Gun-New.obj'; var center = Vec3.sum(Vec3.sum(MyAvatar.position, { x: 0, y: 0.5, diff --git a/scripts/tutorials/createPistol.js b/scripts/tutorials/createPistol.js index 0912645c35..d54621a633 100644 --- a/scripts/tutorials/createPistol.js +++ b/scripts/tutorials/createPistol.js @@ -7,9 +7,9 @@ // var center = Vec3.sum(MyAvatar.position, Vec3.multiply(1.5, Quat.getForward(Camera.getOrientation()))); -var SCRIPT_URL = "http://hifi-production.s3.amazonaws.com/tutorials/entity_scripts/pistol.js"; -var MODEL_URL = "http://hifi-production.s3.amazonaws.com/tutorials/pistol/gun.fbx"; -var COLLISION_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/tutorials/pistol/drop.wav' +var SCRIPT_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/entity_scripts/pistol.js"; +var MODEL_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pistol/gun.fbx"; +var COLLISION_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pistol/drop.wav' var pistolProperties = { type: 'Model', diff --git a/scripts/tutorials/createSoundMaker.js b/scripts/tutorials/createSoundMaker.js index 2d86864982..365dd266fd 100644 --- a/scripts/tutorials/createSoundMaker.js +++ b/scripts/tutorials/createSoundMaker.js @@ -6,8 +6,8 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -var SCRIPT_URL = "http://hifi-production.s3.amazonaws.com/tutorials/entity_scripts/soundMaker.js"; -var MODEL_URL = "http://hifi-production.s3.amazonaws.com/tutorials/soundMaker/Front-Desk-Bell.fbx"; +var SCRIPT_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/entity_scripts/soundMaker.js"; +var MODEL_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/soundMaker/Front-Desk-Bell.fbx"; var center = Vec3.sum(Vec3.sum(MyAvatar.position, { x: 0, diff --git a/scripts/tutorials/entity_scripts/cow.js b/scripts/tutorials/entity_scripts/cow.js index 117864beb6..992ad3c9d1 100644 --- a/scripts/tutorials/entity_scripts/cow.js +++ b/scripts/tutorials/entity_scripts/cow.js @@ -19,7 +19,7 @@ //set our id so other methods can get it. _this.entityID = entityID; //load the mooing sound - _this.mooSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/tutorials/cow/moo.wav") + _this.mooSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/cow/moo.wav") _this.mooSoundOptions = { volume: 0.7, loop: false diff --git a/scripts/tutorials/entity_scripts/golfClub.js b/scripts/tutorials/entity_scripts/golfClub.js index 6342838aa4..0d0426c87b 100644 --- a/scripts/tutorials/entity_scripts/golfClub.js +++ b/scripts/tutorials/entity_scripts/golfClub.js @@ -13,7 +13,7 @@ (function() { var ball = null; - var collisionSoundURL = "http://hifi-production.s3.amazonaws.com/tutorials/golfClub/collision1.wav"; + var collisionSoundURL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/golfClub/collision1.wav"; var triggerState = false; var BALL_GRAVITY = -9.8; var BALL_START_VELOCITY = 0.1; diff --git a/scripts/tutorials/entity_scripts/pingPongGun.js b/scripts/tutorials/entity_scripts/pingPongGun.js index 5ba4b15ea7..084e3287ed 100644 --- a/scripts/tutorials/entity_scripts/pingPongGun.js +++ b/scripts/tutorials/entity_scripts/pingPongGun.js @@ -12,7 +12,7 @@ (function() { var _this = this; - var SHOOTING_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/tutorials/pingPongGun/pong_sound.wav'; + var SHOOTING_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pingPongGun/pong_sound.wav'; function PingPongGun() { return; diff --git a/scripts/tutorials/entity_scripts/pistol.js b/scripts/tutorials/entity_scripts/pistol.js index 62517f486d..52985bb116 100644 --- a/scripts/tutorials/entity_scripts/pistol.js +++ b/scripts/tutorials/entity_scripts/pistol.js @@ -30,8 +30,8 @@ this.forceMultiplier = 1; this.laserLength = 100; - this.fireSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/tutorials/pistol/GUN-SHOT2.raw"); - this.ricochetSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/tutorials/pistol/Ricochet.L.wav"); + this.fireSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pistol/GUN-SHOT2.raw"); + this.ricochetSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pistol/Ricochet.L.wav"); this.playRichochetSoundChance = 0.1; this.fireVolume = 0.2; this.bulletForce = 10; @@ -220,7 +220,7 @@ "alphaStart": 0, "alphaFinish": 0, "additiveBlending": true, - "textures": "http://hifi-production.s3.amazonaws.com/tutorials/pistol/star.png" + "textures": "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pistol/star.png" }); Script.setTimeout(function() { @@ -270,7 +270,7 @@ "alphaStart": 0, "alphaFinish": 0, "additiveBlending": 0, - "textures": "http://hifi-production.s3.amazonaws.com/tutorials/pistol/smoke.png" + "textures": "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pistol/smoke.png" }); Script.setTimeout(function() { Entities.editEntity(smoke, { @@ -333,7 +333,7 @@ "alphaStart": 0, "alphaFinish": 0, "additiveBlending": true, - "textures": "http://hifi-production.s3.amazonaws.com/tutorials/pistol/star.png" + "textures": "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/pistol/star.png" }); Script.setTimeout(function() { Entities.editEntity(flash, { diff --git a/scripts/tutorials/entity_scripts/soundMaker.js b/scripts/tutorials/entity_scripts/soundMaker.js index 950334aee6..f4fb745b7a 100644 --- a/scripts/tutorials/entity_scripts/soundMaker.js +++ b/scripts/tutorials/entity_scripts/soundMaker.js @@ -8,7 +8,7 @@ (function(){ - var soundURL ='http://hifi-production.s3.amazonaws.com/tutorials/soundMaker/bell.wav'; + var soundURL ='https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/soundMaker/bell.wav'; var ringSound; this.preload = function(entityID) { diff --git a/scripts/tutorials/giveAvatarMagicFingers.js b/scripts/tutorials/giveAvatarMagicFingers.js index 23902bdd94..e6fc8ebb0a 100644 --- a/scripts/tutorials/giveAvatarMagicFingers.js +++ b/scripts/tutorials/giveAvatarMagicFingers.js @@ -76,7 +76,7 @@ var particleProperties = { alphaStart: 1, alphaFinish: 0, emitterShouldTrail: true, - textures: 'http://hifi-production.s3.amazonaws.com/tutorials/particleFingers/smoke.png', + textures: 'https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/particleFingers/smoke.png', lifetime: 3600 }; diff --git a/scripts/tutorials/makeAvatarClap.js b/scripts/tutorials/makeAvatarClap.js index c51e7a8d3a..2a593ed3c2 100644 --- a/scripts/tutorials/makeAvatarClap.js +++ b/scripts/tutorials/makeAvatarClap.js @@ -8,7 +8,7 @@ // // An animation of the avatar clapping its hands while standing -var ANIM_URL = "http://hifi-production.s3.amazonaws.com/tutorials/avatarAnimation/clap.fbx"; +var ANIM_URL = "https://cdn-1.vircadia.com/us-e-1/Developer/Tutorials/avatarAnimation/clap.fbx"; // overrideRoleAnimation only replaces a single animation at a time. the rest of the motion is driven normally // @animationRole - name of animation diff --git a/tools/ci-scripts/upload.py b/tools/ci-scripts/upload.py index f43fbfd574..ab96e4ba24 100644 --- a/tools/ci-scripts/upload.py +++ b/tools/ci-scripts/upload.py @@ -6,19 +6,18 @@ import boto3 import glob from github import Github - def main(): - bucket_name = os.environ['BUCKET_NAME'] + bucket_name = os.environ['UPLOAD_BUCKET'] upload_prefix = os.environ['UPLOAD_PREFIX'] release_number = os.environ['RELEASE_NUMBER'] - full_prefix = upload_prefix + '/' + release_number[0:-2] + '/' + release_number + full_prefix = upload_prefix + '/' + release_number S3 = boto3.client('s3') path = os.path.join(os.getcwd(), os.environ['ARTIFACT_PATTERN']) files = glob.glob(path, recursive=False) for archiveFile in files: filePath, fileName = os.path.split(archiveFile) S3.upload_file(os.path.join(filePath, fileName), bucket_name, full_prefix + '/' + fileName) - print("Uploaded Artifact to S3: https://{}.s3-us-west-2.amazonaws.com/{}/{}".format(bucket_name, full_prefix, fileName)) + print("Uploaded Artifact to S3: https://{}.s3-eu-west-3.amazonaws.com/{}/{}".format(bucket_name, full_prefix, fileName)) print("Finished") main() diff --git a/tools/gpu-frame-player/CMakeLists.txt b/tools/gpu-frame-player/CMakeLists.txt index 6ea896edf2..cb20cdde25 100644 --- a/tools/gpu-frame-player/CMakeLists.txt +++ b/tools/gpu-frame-player/CMakeLists.txt @@ -22,7 +22,7 @@ link_hifi_libraries( target_compile_definitions(${TARGET_NAME} PRIVATE USE_GL) -set(OpenGL_GL_PREFERENCE "GLVND") +set(OpenGL_GL_PREFERENCE "LEGACY") target_opengl() #target_vulkan() diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/billboard.js b/unpublishedScripts/DomainContent/CellScience/Scripts/billboard.js index b5e725cfcf..0e552e2107 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/billboard.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/billboard.js @@ -6,7 +6,7 @@ // -var spriteURL = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/Sprites/nucleosomes_sprite.fbx"; +var spriteURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/Sprites/nucleosomes_sprite.fbx"; var spriteDimensions = { x: 10, y: 10, diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/clickToRideAndLook.js b/unpublishedScripts/DomainContent/CellScience/Scripts/clickToRideAndLook.js index 61ccec9f9b..ed0fe770a4 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/clickToRideAndLook.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/clickToRideAndLook.js @@ -13,7 +13,7 @@ z: -1 } - var baseURL = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/"; + var baseURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/"; var self = this; diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_cells.js b/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_cells.js index 2253bb8068..b33e081e5d 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_cells.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_cells.js @@ -9,7 +9,7 @@ var version = 13; - var baseURL = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/"; + var baseURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/"; var button; var _this; diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_hexokinase.js b/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_hexokinase.js index 7ca8de64a6..cda2018a93 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_hexokinase.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_hexokinase.js @@ -15,7 +15,7 @@ var version = 13; - var baseURL = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/"; + var baseURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/"; var button; var _this; diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_inside_the_cell.js b/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_inside_the_cell.js index 47cffa1a52..81f8494a36 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_inside_the_cell.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_inside_the_cell.js @@ -9,7 +9,7 @@ var version = 13; - var baseURL = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/"; + var baseURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/"; var button; var _this; diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_ribosome.js b/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_ribosome.js index 95ec29a479..b4adebe865 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_ribosome.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/nav_button_ribosome.js @@ -8,7 +8,7 @@ var version = 13; - var baseURL = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/"; + var baseURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/"; var button; var _this; diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/navigationButton.js b/unpublishedScripts/DomainContent/CellScience/Scripts/navigationButton.js index 9992c13acb..cd5f954525 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/navigationButton.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/navigationButton.js @@ -14,7 +14,7 @@ Script.include(utilsScript); var self = this; - var baseURL = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/"; + var baseURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/"; this.preload = function(entityId) { this.entityId = entityId; diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/showButtonToPlaySound.js b/unpublishedScripts/DomainContent/CellScience/Scripts/showButtonToPlaySound.js index 6c1533371b..080f985908 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/showButtonToPlaySound.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/showButtonToPlaySound.js @@ -6,7 +6,7 @@ // (function() { - var baseURL = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/"; + var baseURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/"; var self = this; this.buttonImageURL = baseURL + "GUI/play_audio.svg?2"; diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/showIdentification.js b/unpublishedScripts/DomainContent/CellScience/Scripts/showIdentification.js index c33caf8b37..f012fb00ba 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/showIdentification.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/showIdentification.js @@ -8,7 +8,7 @@ (function() { var self = this; - var baseURL = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/"; + var baseURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/"; var version = 3; this.preload = function(entityId) { diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/zoom.js b/unpublishedScripts/DomainContent/CellScience/Scripts/zoom.js index 156774f8e3..f1c5ba592a 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/zoom.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/zoom.js @@ -44,7 +44,7 @@ volume: 0.5 }; - self.teleportSound = SoundCache.getSound("https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/Audio/whoosh.wav"); + self.teleportSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/Audio/whoosh.wav"); // print(" portal destination is " + self.portalDestination); } } diff --git a/unpublishedScripts/DomainContent/CellScience/backgroundMusicAC.js b/unpublishedScripts/DomainContent/CellScience/backgroundMusicAC.js index 829dfbeae9..5922f382b9 100644 --- a/unpublishedScripts/DomainContent/CellScience/backgroundMusicAC.js +++ b/unpublishedScripts/DomainContent/CellScience/backgroundMusicAC.js @@ -1,6 +1,6 @@ var soundMap = [{ name: 'Cells', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/CellScience/Audio/Cells.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/Audio/Cells.wav", audioOptions: { position: { x: 15850, @@ -12,7 +12,7 @@ var soundMap = [{ } }, { name: 'Cell Layout', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/CellScience/Audio/CellLayout.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/Audio/CellLayout.wav", audioOptions: { position: { x: 15950, @@ -24,7 +24,7 @@ var soundMap = [{ } }, { name: 'Ribsome', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/CellScience/Audio/Ribosome.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/Audio/Ribosome.wav", audioOptions: { position: { x: 15650, @@ -36,7 +36,7 @@ var soundMap = [{ } }, { name: 'Hexokinase', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/CellScience/Audio/Hexokinase.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/Audio/Hexokinase.wav", audioOptions: { position: { x: 15750, diff --git a/unpublishedScripts/DomainContent/CellScience/importNow.js b/unpublishedScripts/DomainContent/CellScience/importNow.js index 0d06e60954..b6eb98d23e 100644 --- a/unpublishedScripts/DomainContent/CellScience/importNow.js +++ b/unpublishedScripts/DomainContent/CellScience/importNow.js @@ -38,7 +38,7 @@ function transformToSmallerWorld(vector) { } var cellLayout; -var baseLocation = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/"; +var baseLocation = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/"; var utilsScript = Script.resolvePath('Scripts/utils.js'); Script.include(utilsScript); diff --git a/unpublishedScripts/DomainContent/CellScience/motorProteinControllerAC.js b/unpublishedScripts/DomainContent/CellScience/motorProteinControllerAC.js index 54f8d8a924..724effdc85 100644 --- a/unpublishedScripts/DomainContent/CellScience/motorProteinControllerAC.js +++ b/unpublishedScripts/DomainContent/CellScience/motorProteinControllerAC.js @@ -10,7 +10,7 @@ var numKinesin = 2; var percentOnMainMT = 100; -baseLocation = "https://hifi-production.s3.amazonaws.com/DomainContent/CellScience/" +baseLocation = "https://cdn-1.vircadia.com/us-e-1/DomainContent/CellScience/" var WORLD_OFFSET = { x: 0, diff --git a/unpublishedScripts/DomainContent/Toybox/AC_scripts/toybox_sounds.js b/unpublishedScripts/DomainContent/Toybox/AC_scripts/toybox_sounds.js index e73630e380..84242d69ab 100644 --- a/unpublishedScripts/DomainContent/Toybox/AC_scripts/toybox_sounds.js +++ b/unpublishedScripts/DomainContent/Toybox/AC_scripts/toybox_sounds.js @@ -10,7 +10,7 @@ var soundMap = [{ name: 'river water', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/sounds/Water_Lap_River_Edge_Gentle.L.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/sounds/Water_Lap_River_Edge_Gentle.L.wav", audioOptions: { position: { x: 580, @@ -22,7 +22,7 @@ var soundMap = [{ } }, { name: 'windmill', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/sounds/WINDMILL_Mono.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/sounds/WINDMILL_Mono.wav", audioOptions: { position: { x: 530, @@ -34,7 +34,7 @@ var soundMap = [{ } }, { name: 'insects', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/sounds/insects3.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/sounds/insects3.wav", audioOptions: { position: { x: 560, @@ -46,7 +46,7 @@ var soundMap = [{ } }, { name: 'fireplace', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/sounds/0619_Fireplace__Tree_B.L.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/sounds/0619_Fireplace__Tree_B.L.wav", audioOptions: { position: { x: 551.61, @@ -58,7 +58,7 @@ var soundMap = [{ } }, { name: 'cat purring', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/sounds/Cat_Purring_Deep_Low_Snor.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/sounds/Cat_Purring_Deep_Low_Snor.wav", audioOptions: { position: { x: 551.48, @@ -70,7 +70,7 @@ var soundMap = [{ } }, { name: 'dogs barking', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/sounds/dogs_barking_1.L.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/sounds/dogs_barking_1.L.wav", audioOptions: { position: { x: 523, @@ -83,7 +83,7 @@ var soundMap = [{ playAtInterval: 60 * 1000 }, { name: 'arcade game', - url: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/sounds/ARCADE_GAMES_VID.L.L.wav", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/sounds/ARCADE_GAMES_VID.L.L.wav", audioOptions: { position: { x: 543.77, diff --git a/unpublishedScripts/DomainContent/Toybox/basketball/createHoop.js b/unpublishedScripts/DomainContent/Toybox/basketball/createHoop.js index 8a3f9bb6d7..cb253ddf0b 100644 --- a/unpublishedScripts/DomainContent/Toybox/basketball/createHoop.js +++ b/unpublishedScripts/DomainContent/Toybox/basketball/createHoop.js @@ -8,8 +8,8 @@ // -var hoopURL ="http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball_hoop.fbx"; -var hoopCollisionHullURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball_hoop_collision_hull.obj"; +var hoopURL ="https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball_hoop.fbx"; +var hoopCollisionHullURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball_hoop_collision_hull.obj"; var hoopStartPosition = Vec3.sum(MyAvatar.position, diff --git a/unpublishedScripts/DomainContent/Toybox/basketball/createRack.js b/unpublishedScripts/DomainContent/Toybox/basketball/createRack.js index 8209a88f33..85bd5b43d1 100644 --- a/unpublishedScripts/DomainContent/Toybox/basketball/createRack.js +++ b/unpublishedScripts/DomainContent/Toybox/basketball/createRack.js @@ -11,10 +11,10 @@ Script.include("../libraries/utils.js"); -var basketballURL ="http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball2.fbx"; -var collisionSoundURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball.wav"; -var rackURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball_rack.fbx"; -var rackCollisionHullURL ="http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/rack_collision_hull.obj"; +var basketballURL ="https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball2.fbx"; +var collisionSoundURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball.wav"; +var rackURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball_rack.fbx"; +var rackCollisionHullURL ="https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/rack_collision_hull.obj"; var NUMBER_OF_BALLS = 4; var DIAMETER = 0.30; var RESET_DISTANCE = 1; diff --git a/unpublishedScripts/DomainContent/Toybox/basketball/createSingleBasketball.js b/unpublishedScripts/DomainContent/Toybox/basketball/createSingleBasketball.js index d70b9a1bd8..1300a26e68 100644 --- a/unpublishedScripts/DomainContent/Toybox/basketball/createSingleBasketball.js +++ b/unpublishedScripts/DomainContent/Toybox/basketball/createSingleBasketball.js @@ -10,8 +10,8 @@ // -var basketballURL ="http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball2.fbx"; -var collisionSoundURL ="http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball.wav"; +var basketballURL ="https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball2.fbx"; +var collisionSoundURL ="https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball.wav"; var basketball = null; diff --git a/unpublishedScripts/DomainContent/Toybox/basketballsResetter.js b/unpublishedScripts/DomainContent/Toybox/basketballsResetter.js index 580453bf24..5dadee868b 100644 --- a/unpublishedScripts/DomainContent/Toybox/basketballsResetter.js +++ b/unpublishedScripts/DomainContent/Toybox/basketballsResetter.js @@ -41,8 +41,8 @@ createBasketballs: function() { var NUMBER_OF_BALLS = 4; var DIAMETER = 0.30; - var basketballURL ="http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball2.fbx"; - var basketballCollisionSoundURL ="http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball.wav"; + var basketballURL ="https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball2.fbx"; + var basketballCollisionSoundURL ="https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball.wav"; var position = { x: 542.86, diff --git a/unpublishedScripts/DomainContent/Toybox/bow/bow.js b/unpublishedScripts/DomainContent/Toybox/bow/bow.js index 47335bcb6d..5e39c2141d 100644 --- a/unpublishedScripts/DomainContent/Toybox/bow/bow.js +++ b/unpublishedScripts/DomainContent/Toybox/bow/bow.js @@ -13,10 +13,10 @@ Script.include("../libraries/utils.js"); - var NOTCH_ARROW_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/notch.wav'; - var SHOOT_ARROW_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/String_release2.L.wav'; - var STRING_PULL_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/Bow_draw.1.L.wav'; - var ARROW_HIT_SOUND_URL = 'https://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/Arrow_impact1.L.wav' + var NOTCH_ARROW_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/notch.wav'; + var SHOOT_ARROW_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/String_release2.L.wav'; + var STRING_PULL_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/Bow_draw.1.L.wav'; + var ARROW_HIT_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/Arrow_impact1.L.wav' var ARROW_DIMENSIONS = { x: 0.02, @@ -32,9 +32,9 @@ z: 0 }; - var ARROW_MODEL_URL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/newarrow_textured.fbx"; + var ARROW_MODEL_URL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/newarrow_textured.fbx"; var ARROW_COLLISION_HULL_URL = - "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/newarrow_collision_hull.obj"; + "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/newarrow_collision_hull.obj"; var ARROW_DIMENSIONS = { x: 0.02, diff --git a/unpublishedScripts/DomainContent/Toybox/bow/createBow.js b/unpublishedScripts/DomainContent/Toybox/bow/createBow.js index 5a4275d96a..8de8379c18 100644 --- a/unpublishedScripts/DomainContent/Toybox/bow/createBow.js +++ b/unpublishedScripts/DomainContent/Toybox/bow/createBow.js @@ -15,8 +15,8 @@ Script.include(utilsPath); var SCRIPT_URL = Script.resolvePath('bow.js'); -var MODEL_URL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/bow-deadly.fbx"; -var COLLISION_HULL_URL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/bow_collision_hull.obj"; +var MODEL_URL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/bow-deadly.fbx"; +var COLLISION_HULL_URL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/bow_collision_hull.obj"; var BOW_DIMENSIONS = { x: 0.04, y: 1.3, diff --git a/unpublishedScripts/DomainContent/Toybox/bubblewand/createWand.js b/unpublishedScripts/DomainContent/Toybox/bubblewand/createWand.js index 0a7d8b7055..5f1e8b072e 100644 --- a/unpublishedScripts/DomainContent/Toybox/bubblewand/createWand.js +++ b/unpublishedScripts/DomainContent/Toybox/bubblewand/createWand.js @@ -12,8 +12,8 @@ Script.include("../libraries/utils.js"); -var WAND_MODEL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bubblewand/wand.fbx'; -var WAND_COLLISION_SHAPE = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bubblewand/wand_collision_hull.obj'; +var WAND_MODEL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bubblewand/wand.fbx'; +var WAND_COLLISION_SHAPE = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bubblewand/wand_collision_hull.obj'; var WAND_SCRIPT_URL = Script.resolvePath("wand.js"); diff --git a/unpublishedScripts/DomainContent/Toybox/bubblewand/wand.js b/unpublishedScripts/DomainContent/Toybox/bubblewand/wand.js index 6f63fe3ec9..0142b610e9 100644 --- a/unpublishedScripts/DomainContent/Toybox/bubblewand/wand.js +++ b/unpublishedScripts/DomainContent/Toybox/bubblewand/wand.js @@ -16,7 +16,7 @@ Script.include("../libraries/utils.js"); - var BUBBLE_MODEL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bubblewand/bubble.fbx"; + var BUBBLE_MODEL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bubblewand/bubble.fbx"; var BUBBLE_INITIAL_DIMENSIONS = { x: 0.01, diff --git a/unpublishedScripts/DomainContent/Toybox/cat/cat.js b/unpublishedScripts/DomainContent/Toybox/cat/cat.js index 78b3a92bc3..90ff34e2e4 100644 --- a/unpublishedScripts/DomainContent/Toybox/cat/cat.js +++ b/unpublishedScripts/DomainContent/Toybox/cat/cat.js @@ -16,7 +16,7 @@ var _this; Cat = function() { _this = this; - this.meowSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/cat/cat_meow.wav"); + this.meowSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/cat/cat_meow.wav"); }; Cat.prototype = { diff --git a/unpublishedScripts/DomainContent/Toybox/doll/createDoll.js b/unpublishedScripts/DomainContent/Toybox/doll/createDoll.js index 37771fee4a..2e0c2a297d 100644 --- a/unpublishedScripts/DomainContent/Toybox/doll/createDoll.js +++ b/unpublishedScripts/DomainContent/Toybox/doll/createDoll.js @@ -11,7 +11,7 @@ /*global MyAvatar, Entities, AnimationCache, SoundCache, Scene, Camera, Overlays, Audio, HMD, AvatarList, AvatarManager, Controller, UndoStack, Window, Account, GlobalServices, Script, ScriptDiscoveryService, LODManager, Menu, Vec3, Quat, AudioDevice, Paths, Clipboard, Settings, XMLHttpRequest, randFloat, randInt */ function createDoll() { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/doll/bboy2.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/doll/bboy2.fbx"; var scriptURL = Script.resolvePath("doll.js"); diff --git a/unpublishedScripts/DomainContent/Toybox/doll/doll.js b/unpublishedScripts/DomainContent/Toybox/doll/doll.js index 654151a0a7..e1c815add9 100644 --- a/unpublishedScripts/DomainContent/Toybox/doll/doll.js +++ b/unpublishedScripts/DomainContent/Toybox/doll/doll.js @@ -18,7 +18,7 @@ // this is the "constructor" for the entity as a JS object we don't do much here var Doll = function() { _this = this; - this.screamSounds = [SoundCache.getSound("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/doll/KenDoll_1%2303.wav")]; + this.screamSounds = [SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/doll/KenDoll_1%2303.wav")]; }; Doll.prototype = { @@ -31,7 +31,7 @@ Entities.editEntity(this.entityID, { animation: { - url: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/doll/zombie_scream.fbx", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/doll/zombie_scream.fbx", running: true } }); diff --git a/unpublishedScripts/DomainContent/Toybox/flappyAvatars/flappyAvatars.js b/unpublishedScripts/DomainContent/Toybox/flappyAvatars/flappyAvatars.js index deefad3507..f45e6e2131 100644 --- a/unpublishedScripts/DomainContent/Toybox/flappyAvatars/flappyAvatars.js +++ b/unpublishedScripts/DomainContent/Toybox/flappyAvatars/flappyAvatars.js @@ -37,7 +37,7 @@ var yVelocity = 0.0; var yAcceleration = -G; - var airSwipeSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/Air%20Swipe%2005.wav"); + var airSwipeSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/Air%20Swipe%2005.wav"); var injector = null; this.position = function() { @@ -51,7 +51,7 @@ type: "Model", modelURL: MyAvatar.skeletonModelURL, animation: { - url: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/fly.fbx", + url: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/fly.fbx", running: true, fps: 30, firstFrame: 1.0, @@ -76,7 +76,7 @@ animation: {running: false} }); - airSwipeSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/8bit%20Jump%2003.wav"); + airSwipeSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/8bit%20Jump%2003.wav"); injector = null; } @@ -132,7 +132,7 @@ var id = entityManager.add({ type: "Model", - modelURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/coin.fbx", + modelURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/coin.fbx", angularVelocity: { x: 0, y: 20, z: 0 }, position: to3DPosition(this.position()), dimensions:dimensions @@ -172,14 +172,14 @@ var idUp = entityManager.add({ type: "Model", - modelURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/greenPipe.fbx", + modelURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/greenPipe.fbx", rotation: Quat.fromPitchYawRollDegrees(180, 0, 0), position: to3DPosition({ x: xPosition, y: upYPosition }), dimensions: { x: width, y: upHeight, z: width } }); var idDown = entityManager.add({ type: "Model", - modelURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/greenPipe.fbx", + modelURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/greenPipe.fbx", position: to3DPosition({ x: xPosition, y: height / 2.0 }), dimensions: { x: width, y: height, z: width } }); @@ -217,7 +217,7 @@ var pipes = new Array(); var coins = new Array(); - var coinsSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/Coin.wav"); + var coinsSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/Coin.wav"); var injector = null; this.update = function(deltaTime, gameTime, startedPlaying) { @@ -325,7 +325,7 @@ var numberDimensions = { x: 0.0660, y: 0.1050, z: 0.0048 }; function numberUrl(number) { - return "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/" + number + ".fbx" + return "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/" + number + ".fbx" } function digitPosition(digit) { return Vec3.multiplyQbyV(space.orientation, { x: 0.3778 + digit * (numberDimensions.x + 0.01), y: 0.0, z: 0.0 }); @@ -341,7 +341,7 @@ var bestId = entityManager.add({ type: "Model", - modelURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/best.fbx", + modelURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/best.fbx", position: topLeft, rotation: Quat.multiply(space.orientation, Quat.fromPitchYawRollDegrees(90, 0, 0)), dimensions: { x: 0.2781, y: 0.0063, z: 0.1037 } @@ -359,7 +359,7 @@ var scoreId = entityManager.add({ type: "Model", - modelURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/score.fbx", + modelURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/score.fbx", position: bottomLeft, rotation: Quat.multiply(space.orientation, Quat.fromPitchYawRollDegrees(90, 0, 0)), dimensions: { x: 0.3678, y: 0.0063, z: 0.1037 } @@ -453,7 +453,7 @@ var pipes = null; var score = null; - var gameOverSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/Game%20Over.wav"); + var gameOverSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/Game%20Over.wav"); var injector = null; var directions = ["UP", "DOWN", "LEFT", "RIGHT"]; @@ -466,7 +466,7 @@ current = 0; } if (current === sequence.length) { - avatar.changeModel("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/mario.fbx"); + avatar.changeModel("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/mario.fbx"); current = 0; } } diff --git a/unpublishedScripts/DomainContent/Toybox/flappyAvatars/flappyAvatars.json b/unpublishedScripts/DomainContent/Toybox/flappyAvatars/flappyAvatars.json index 90c6e5b13d..26dbecc47f 100644 --- a/unpublishedScripts/DomainContent/Toybox/flappyAvatars/flappyAvatars.json +++ b/unpublishedScripts/DomainContent/Toybox/flappyAvatars/flappyAvatars.json @@ -10,7 +10,7 @@ }, "dynamic": 1, "id": "{ee5b25e6-aca2-4dc7-9462-51537d89c126}", - "modelURL": "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/cube.fbx", + "modelURL": "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/cube.fbx", "queryAACube": { "scale": 0.5974045991897583, "x": -5.1575918197631836, @@ -23,7 +23,7 @@ "y": -0.13279926776885986, "z": 0.34688329696655273 }, - "script": "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flappyAvatars/flappyAvatars.js", + "script": "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flappyAvatars/flappyAvatars.js", "scriptTimestamp": 1457031937425, "shapeType": "box", "type": "Model", diff --git a/unpublishedScripts/DomainContent/Toybox/flashlight/createFlashlight.js b/unpublishedScripts/DomainContent/Toybox/flashlight/createFlashlight.js index 9bcc6dae58..c57c3a0cd3 100644 --- a/unpublishedScripts/DomainContent/Toybox/flashlight/createFlashlight.js +++ b/unpublishedScripts/DomainContent/Toybox/flashlight/createFlashlight.js @@ -16,7 +16,7 @@ Script.include("../libraries/utils.js"); var scriptURL = Script.resolvePath('flashlight.js'); -var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flashlight/flashlight.fbx"; +var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flashlight/flashlight.fbx"; var center = Vec3.sum(Vec3.sum(MyAvatar.position, { x: 0, diff --git a/unpublishedScripts/DomainContent/Toybox/flashlight/flashlight.js b/unpublishedScripts/DomainContent/Toybox/flashlight/flashlight.js index 82a354c767..08d98a80fe 100644 --- a/unpublishedScripts/DomainContent/Toybox/flashlight/flashlight.js +++ b/unpublishedScripts/DomainContent/Toybox/flashlight/flashlight.js @@ -19,8 +19,8 @@ Script.include("../libraries/utils.js"); - var ON_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flashlight/flashlight_on.wav'; - var OFF_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flashlight/flashlight_off.wav'; + var ON_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flashlight/flashlight_on.wav'; + var OFF_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flashlight/flashlight_off.wav'; //we are creating lights that we don't want to get stranded so lets make sure that we can get rid of them var startTime = Date.now(); diff --git a/unpublishedScripts/DomainContent/Toybox/flowArts/raveStickEntityScript.js b/unpublishedScripts/DomainContent/Toybox/flowArts/raveStickEntityScript.js index 03e15d66db..2cbe9c00b9 100644 --- a/unpublishedScripts/DomainContent/Toybox/flowArts/raveStickEntityScript.js +++ b/unpublishedScripts/DomainContent/Toybox/flowArts/raveStickEntityScript.js @@ -30,7 +30,7 @@ green: 10, blue: 40 }]; - var texture = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flowArts/trails.png"; + var texture = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flowArts/trails.png"; this.trail = Entities.addEntity({ type: "PolyLine", dimensions: { diff --git a/unpublishedScripts/DomainContent/Toybox/hiddenEntityReset.js b/unpublishedScripts/DomainContent/Toybox/hiddenEntityReset.js index fe514f6dfc..c4607c1a01 100644 --- a/unpublishedScripts/DomainContent/Toybox/hiddenEntityReset.js +++ b/unpublishedScripts/DomainContent/Toybox/hiddenEntityReset.js @@ -170,7 +170,7 @@ } function createRaveStick(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flowArts/raveStick.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flowArts/raveStick.fbx"; var rotation = Quat.fromPitchYawRollDegrees(0, 0, 0); var stick = Entities.addEntity({ type: "Model", @@ -260,7 +260,7 @@ alphaSpread: 0.1, alphaStart: 0.1, alphaFinish: 0.1, - textures: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flowArts/beamParticle.png", + textures: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flowArts/beamParticle.png", emitterShouldTrail: false, userData: JSON.stringify({ resetMe: { @@ -272,7 +272,7 @@ } function createGun(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/pistol/gun.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/pistol/gun.fbx"; var pistol = Entities.addEntity({ type: 'Model', @@ -281,7 +281,7 @@ position: position, restitution: 0, damping: 0.5, - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/pistol/drop.wav", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/pistol/drop.wav", dimensions: { x: 0.05, y: 0.23, @@ -345,8 +345,8 @@ var SCRIPT_URL = Script.resolvePath('bow.js'); var BOW_ROTATION = Quat.fromPitchYawRollDegrees(-103.05, -178.60, -87.27); - var MODEL_URL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/bow-deadly.fbx"; - var COLLISION_HULL_URL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/bow_collision_hull.obj"; + var MODEL_URL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/bow-deadly.fbx"; + var COLLISION_HULL_URL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/bow_collision_hull.obj"; var BOW_DIMENSIONS = { x: 0.04, @@ -497,7 +497,7 @@ type: "ParticleEffect", name: "fire", animationSettings: animationSettings, - textures: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/fire/Particle-Sprite-Smoke-1.png", + textures: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/fire/Particle-Sprite-Smoke-1.png", position: { x: 551.45, y: 494.82, @@ -560,10 +560,10 @@ var DIAMETER = 0.30; var RESET_DISTANCE = 1; var MINIMUM_MOVE_LENGTH = 0.05; - var basketballURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball2.fbx"; - var basketballCollisionSoundURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball.wav"; - var rackURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball_rack.fbx"; - var rackCollisionHullURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/rack_collision_hull.obj"; + var basketballURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball2.fbx"; + var basketballCollisionSoundURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball.wav"; + var rackURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball_rack.fbx"; + var rackCollisionHullURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/rack_collision_hull.obj"; var rackRotation = Quat.fromPitchYawRollDegrees(0, -90, 0); @@ -639,7 +639,7 @@ z: 0 }, dynamic: true, - collisionSoundURL: 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball.wav', + collisionSoundURL: 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball.wav', collisionless: false, modelURL: basketballURL, userData: JSON.stringify({ @@ -734,8 +734,8 @@ function createTargets() { - var MODEL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/target.fbx'; - var COLLISION_HULL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/target_collision_hull.obj'; + var MODEL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/target.fbx'; + var COLLISION_HULL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/target_collision_hull.obj'; var MINIMUM_MOVE_LENGTH = 0.05; var RESET_DISTANCE = 0.5; @@ -814,8 +814,8 @@ function createCat(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/cat/Dark_Cat.fbx"; - var animationURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/cat/sleeping.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/cat/Dark_Cat.fbx"; + var animationURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/cat/sleeping.fbx"; var animationSettings = JSON.stringify({ running: true }); @@ -851,7 +851,7 @@ } function createFlashlight(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flashlight/flashlight.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flashlight/flashlight.fbx"; var flashlight = Entities.addEntity({ type: "Model", @@ -865,7 +865,7 @@ z: 0.08 }, dynamic: true, - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flashlight/flashlight_drop.L.wav", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flashlight/flashlight_drop.L.wav", gravity: { x: 0, y: -3.5, @@ -916,7 +916,7 @@ } function createLights() { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/lights/lightswitch.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/lights/lightswitch.fbx"; var rotation = { @@ -1164,8 +1164,8 @@ function createDice() { var diceProps = { type: "Model", - modelURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/dice/goldDie.fbx", - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/dice/diceCollide.wav", + modelURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/dice/goldDie.fbx", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/dice/diceCollide.wav", name: "dice", position: { x: 541.61, @@ -1212,7 +1212,7 @@ } function createGates() { - var MODEL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/gates/fence.fbx'; + var MODEL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/gates/fence.fbx'; var rotation = Quat.fromPitchYawRollDegrees(0, -16, 0); var gate = Entities.addEntity({ @@ -1253,9 +1253,9 @@ function createPingPongBallGun() { - var MODEL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.fbx'; - var COLLISION_HULL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.obj'; - var COLLISION_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/plastic_impact.L.wav'; + var MODEL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.fbx'; + var COLLISION_HULL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.obj'; + var COLLISION_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/plastic_impact.L.wav'; var position = { x: 548.6, y: 495.4, @@ -1321,8 +1321,8 @@ } function createWand(position) { - var WAND_MODEL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bubblewand/wand.fbx'; - var WAND_COLLISION_SHAPE = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bubblewand/wand_collision_hull.obj'; + var WAND_MODEL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bubblewand/wand.fbx'; + var WAND_COLLISION_SHAPE = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bubblewand/wand_collision_hull.obj'; var wand = Entities.addEntity({ name: 'Bubble Wand', @@ -1382,7 +1382,7 @@ function createBasketBall(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball2.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball2.fbx"; var entity = Entities.addEntity({ type: "Model", @@ -1408,7 +1408,7 @@ y: -0.01, z: 0 }, - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball.wav", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball.wav", userData: JSON.stringify({ resetMe: { resetMe: true @@ -1422,7 +1422,7 @@ } function createDoll(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/doll/bboy2.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/doll/bboy2.fbx"; var naturalDimensions = { x: 1.63, @@ -1463,7 +1463,7 @@ function createSprayCan(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/spray_paint/paintcan.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/spray_paint/paintcan.fbx"; var entity = Entities.addEntity({ type: "Model", @@ -1477,7 +1477,7 @@ z: 0.07 }, dynamic: true, - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/spray_paint/SpryPntCnDrp1.L.wav", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/spray_paint/SpryPntCnDrp1.L.wav", shapeType: 'box', restitution: 0, gravity: { @@ -1503,7 +1503,7 @@ } function createPottedPlant(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/potted_plant/potted_plant.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/potted_plant/potted_plant.fbx"; var entity = Entities.addEntity({ type: "Model", @@ -1541,8 +1541,8 @@ function createCombinedArmChair(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/armchair/combined_chair.fbx"; - var RED_ARM_CHAIR_COLLISION_HULL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/armchair/red_arm_chair_collision_hull.obj"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/armchair/combined_chair.fbx"; + var RED_ARM_CHAIR_COLLISION_HULL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/armchair/red_arm_chair_collision_hull.obj"; var rotation = Quat.fromPitchYawRollDegrees(0, -143, 0); @@ -1584,8 +1584,8 @@ } function createBlocks(position) { - var baseURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/planky/"; - var collisionSoundURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/planky/ToyWoodBlock.L.wav"; + var baseURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/planky/"; + var collisionSoundURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/planky/ToyWoodBlock.L.wav"; var NUM_BLOCKS_PER_COLOR = 4; var i, j; diff --git a/unpublishedScripts/DomainContent/Toybox/lights/lightSwitch.js b/unpublishedScripts/DomainContent/Toybox/lights/lightSwitch.js index 2a1ef04ed3..34228184bd 100644 --- a/unpublishedScripts/DomainContent/Toybox/lights/lightSwitch.js +++ b/unpublishedScripts/DomainContent/Toybox/lights/lightSwitch.js @@ -21,7 +21,7 @@ Script.include(utilitiesScript); LightSwitch = function() { _this = this; - this.switchSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/lights/lamp_switch_2.wav"); + this.switchSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/lights/lamp_switch_2.wav"); }; LightSwitch.prototype = { diff --git a/unpublishedScripts/DomainContent/Toybox/masterReset.js b/unpublishedScripts/DomainContent/Toybox/masterReset.js index b621544621..7bbbdf616d 100644 --- a/unpublishedScripts/DomainContent/Toybox/masterReset.js +++ b/unpublishedScripts/DomainContent/Toybox/masterReset.js @@ -143,7 +143,7 @@ MasterReset = function() { } function createRaveStick(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flowArts/raveStick.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flowArts/raveStick.fbx"; var rotation = Quat.fromPitchYawRollDegrees(0, 0, 0); var stick = Entities.addEntity({ type: "Model", @@ -238,7 +238,7 @@ MasterReset = function() { alphaSpread: 0.1, alphaStart: 0.1, alphaFinish: 0.1, - textures: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flowArts/beamParticle.png", + textures: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flowArts/beamParticle.png", emitterShouldTrail: false, userData: JSON.stringify({ resetMe: { @@ -249,7 +249,7 @@ MasterReset = function() { } function createGun(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/pistol/gun.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/pistol/gun.fbx"; var pistol = Entities.addEntity({ @@ -277,7 +277,7 @@ MasterReset = function() { restitution: 0, dynamic: true, damping: 0.5, - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/pistol/drop.wav", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/pistol/drop.wav", userData: JSON.stringify({ "wearable": { "joints": { @@ -323,8 +323,8 @@ MasterReset = function() { var SCRIPT_URL = Script.resolvePath('bow.js'); var BOW_ROTATION = Quat.fromPitchYawRollDegrees(-103.05, -178.60, -87.27); - var MODEL_URL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/bow-deadly.fbx"; - var COLLISION_HULL_URL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bow/bow_collision_hull.obj"; + var MODEL_URL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/bow-deadly.fbx"; + var COLLISION_HULL_URL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bow/bow_collision_hull.obj"; var BOW_DIMENSIONS = { x: 0.04, y: 1.3, @@ -474,7 +474,7 @@ MasterReset = function() { type: "ParticleEffect", name: "fire", animationSettings: animationSettings, - textures: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/fire/Particle-Sprite-Smoke-1.png", + textures: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/fire/Particle-Sprite-Smoke-1.png", position: { x: 551.45, y: 494.82, @@ -538,10 +538,10 @@ MasterReset = function() { var DIAMETER = 0.30; var RESET_DISTANCE = 1; var MINIMUM_MOVE_LENGTH = 0.05; - var basketballURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball2.fbx"; - var basketballCollisionSoundURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball.wav"; - var rackURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball_rack.fbx"; - var rackCollisionHullURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/rack_collision_hull.obj"; + var basketballURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball2.fbx"; + var basketballCollisionSoundURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball.wav"; + var rackURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball_rack.fbx"; + var rackCollisionHullURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/rack_collision_hull.obj"; var rackRotation = Quat.fromPitchYawRollDegrees(0, -90, 0); @@ -618,7 +618,7 @@ MasterReset = function() { z: 0 }, dynamic: true, - collisionSoundURL: 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball.wav', + collisionSoundURL: 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball.wav', collisionless: false, modelURL: basketballURL, userData: JSON.stringify({ @@ -715,8 +715,8 @@ MasterReset = function() { function createTargets() { - var MODEL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/target.fbx'; - var COLLISION_HULL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/target_collision_hull.obj'; + var MODEL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/target.fbx'; + var COLLISION_HULL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/target_collision_hull.obj'; var MINIMUM_MOVE_LENGTH = 0.05; var RESET_DISTANCE = 0.5; @@ -795,8 +795,8 @@ MasterReset = function() { function createCat(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/cat/Dark_Cat.fbx"; - var animationURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/cat/sleeping.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/cat/Dark_Cat.fbx"; + var animationURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/cat/sleeping.fbx"; var animationSettings = JSON.stringify({ running: true }); @@ -832,7 +832,7 @@ MasterReset = function() { } function createFlashlight(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flashlight/flashlight.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flashlight/flashlight.fbx"; var flashlight = Entities.addEntity({ type: "Model", @@ -846,7 +846,7 @@ MasterReset = function() { z: 0.08 }, dynamic: true, - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/flashlight/flashlight_drop.L.wav", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/flashlight/flashlight_drop.L.wav", gravity: { x: 0, y: -3.5, @@ -897,7 +897,7 @@ MasterReset = function() { } function createLights() { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/lights/lightswitch.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/lights/lightswitch.fbx"; var rotation = { w: 0.63280689716339111, @@ -1144,8 +1144,8 @@ MasterReset = function() { function createDice() { var diceProps = { type: "Model", - modelURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/dice/goldDie.fbx", - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/dice/diceCollide.wav", + modelURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/dice/goldDie.fbx", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/dice/diceCollide.wav", name: "dice", position: { x: 541.61, @@ -1192,7 +1192,7 @@ MasterReset = function() { } function createGates() { - var MODEL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/gates/fence.fbx'; + var MODEL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/gates/fence.fbx'; var rotation = Quat.fromPitchYawRollDegrees(0, -16, 0); var gate = Entities.addEntity({ name: 'Front Door Fence', @@ -1231,9 +1231,9 @@ MasterReset = function() { } function createPingPongBallGun() { - var MODEL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.fbx'; - var COLLISION_HULL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.obj'; - var COLLISION_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/plastic_impact.L.wav'; + var MODEL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.fbx'; + var COLLISION_HULL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.obj'; + var COLLISION_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/plastic_impact.L.wav'; var position = { x: 548.6, y: 495.4, @@ -1299,8 +1299,8 @@ MasterReset = function() { } function createWand(position) { - var WAND_MODEL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bubblewand/wand.fbx'; - var WAND_COLLISION_SHAPE = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/bubblewand/wand_collision_hull.obj'; + var WAND_MODEL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bubblewand/wand.fbx'; + var WAND_COLLISION_SHAPE = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/bubblewand/wand_collision_hull.obj'; var wand = Entities.addEntity({ name: 'Bubble Wand', @@ -1360,7 +1360,7 @@ MasterReset = function() { function createBasketBall(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball2.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball2.fbx"; var entity = Entities.addEntity({ type: "Model", @@ -1386,7 +1386,7 @@ MasterReset = function() { y: -0.01, z: 0 }, - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/basketball/basketball.wav", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/basketball/basketball.wav", userData: JSON.stringify({ resetMe: { resetMe: true @@ -1400,7 +1400,7 @@ MasterReset = function() { } function createDoll(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/doll/bboy2.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/doll/bboy2.fbx"; var naturalDimensions = { x: 1.63, @@ -1442,7 +1442,7 @@ MasterReset = function() { function createSprayCan(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/spray_paint/paintcan.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/spray_paint/paintcan.fbx"; var entity = Entities.addEntity({ type: "Model", @@ -1456,7 +1456,7 @@ MasterReset = function() { z: 0.07 }, dynamic: true, - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/spray_paint/SpryPntCnDrp1.L.wav", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/spray_paint/SpryPntCnDrp1.L.wav", shapeType: 'box', gravity: { x: 0, @@ -1482,7 +1482,7 @@ MasterReset = function() { } function createPottedPlant(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/potted_plant/potted_plant.fbx"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/potted_plant/potted_plant.fbx"; var entity = Entities.addEntity({ type: "Model", @@ -1520,8 +1520,8 @@ MasterReset = function() { function createCombinedArmChair(position) { - var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/armchair/combined_chair.fbx"; - var RED_ARM_CHAIR_COLLISION_HULL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/armchair/red_arm_chair_collision_hull.obj"; + var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/armchair/combined_chair.fbx"; + var RED_ARM_CHAIR_COLLISION_HULL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/armchair/red_arm_chair_collision_hull.obj"; var rotation = Quat.fromPitchYawRollDegrees(0, -143, 0); @@ -1563,8 +1563,8 @@ MasterReset = function() { } function createBlocks(position) { - var baseURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/planky/"; - var collisionSoundURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/planky/ToyWoodBlock.L.wav"; + var baseURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/planky/"; + var collisionSoundURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/planky/ToyWoodBlock.L.wav"; var NUM_BLOCKS_PER_COLOR = 4; var i, j; diff --git a/unpublishedScripts/DomainContent/Toybox/musicPlayer/musicPlayer.js b/unpublishedScripts/DomainContent/Toybox/musicPlayer/musicPlayer.js index e3280e8f9c..2bc8584c89 100644 --- a/unpublishedScripts/DomainContent/Toybox/musicPlayer/musicPlayer.js +++ b/unpublishedScripts/DomainContent/Toybox/musicPlayer/musicPlayer.js @@ -19,7 +19,7 @@ var PLAYLIST_URL = "https://spreadsheets.google.com/feeds/cells/1x-ceGPGHldkHadARABFWfujLPTOWzXJPhrf2bTwg2cQ/od6/public/basic?alt=json"; var SONG_VOLUME = 0.1; var HEADPHONES_ATTACHMENT = { - modelURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/musicPlayer/headphones2-v2.fbx", + modelURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/musicPlayer/headphones2-v2.fbx", jointName: "Head", translation: {"x": 0, "y": 0.19, "z": 0.06}, rotation: {"x":0,"y":0.7071067690849304,"z":0.7071067690849304,"w":0}, diff --git a/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/createPingPongGun.js b/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/createPingPongGun.js index 22812c1206..2785dae573 100644 --- a/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/createPingPongGun.js +++ b/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/createPingPongGun.js @@ -13,9 +13,9 @@ Script.include("../libraries/utils.js"); var scriptURL = Script.resolvePath('pingPongGun.js'); -var MODEL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.fbx' -var COLLISION_HULL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.obj'; -var COLLISION_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/plastic_impact.L.wav'; +var MODEL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.fbx' +var COLLISION_HULL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/Pingpong-Gun-New.obj'; +var COLLISION_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/plastic_impact.L.wav'; var center = Vec3.sum(Vec3.sum(MyAvatar.position, { x: 0, y: 0.5, diff --git a/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/createTargets.js b/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/createTargets.js index c52d2bff32..1e47a921fe 100644 --- a/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/createTargets.js +++ b/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/createTargets.js @@ -14,8 +14,8 @@ Script.include("../libraries/utils.js"); var scriptURL = Script.resolvePath('wallTarget.js'); -var MODEL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/target.fbx'; -var COLLISION_HULL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/target_collision_hull.obj'; +var MODEL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/target.fbx'; +var COLLISION_HULL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/target_collision_hull.obj'; var MINIMUM_MOVE_LENGTH = 0.05; var RESET_DISTANCE = 0.5; diff --git a/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/pingPongGun.js b/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/pingPongGun.js index 81a293a830..b1a91084d4 100644 --- a/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/pingPongGun.js +++ b/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/pingPongGun.js @@ -13,8 +13,8 @@ Script.include("../libraries/utils.js"); - var SHOOTING_SOUND_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/pong_sound.wav'; - var PING_PONG_BALL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/ping_pong_ball.fbx'; + var SHOOTING_SOUND_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/pong_sound.wav'; + var PING_PONG_BALL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/ping_pong_ball.fbx'; function PingPongGun() { return; diff --git a/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/wallTarget.js b/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/wallTarget.js index 267faff4ed..1e3b21a06d 100644 --- a/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/wallTarget.js +++ b/unpublishedScripts/DomainContent/Toybox/ping_pong_gun/wallTarget.js @@ -20,7 +20,7 @@ hasBecomeActive: false, preload: function(entityID) { this.entityID = entityID; - var SOUND_URL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/Clay_Pigeon_02.L.wav"; + var SOUND_URL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/Clay_Pigeon_02.L.wav"; this.hitSound = SoundCache.getSound(SOUND_URL); }, collisionWithEntity: function(me, otherEntity) { diff --git a/unpublishedScripts/DomainContent/Toybox/pistol/createPistol.js b/unpublishedScripts/DomainContent/Toybox/pistol/createPistol.js index c3069547cb..358aa19221 100644 --- a/unpublishedScripts/DomainContent/Toybox/pistol/createPistol.js +++ b/unpublishedScripts/DomainContent/Toybox/pistol/createPistol.js @@ -1,6 +1,6 @@ var center = Vec3.sum(MyAvatar.position, Vec3.multiply(1.5, Quat.getFront(Camera.getOrientation()))); var scriptURL = Script.resolvePath('pistol.js'); -var modelURL = "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/pistol/gun.fbx"; +var modelURL = "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/pistol/gun.fbx"; var pistol = Entities.addEntity({ @@ -27,7 +27,7 @@ var pistol = Entities.addEntity({ }, restitution: 0, damping:0.5, - collisionSoundURL: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/pistol/drop.wav", + collisionSoundURL: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/pistol/drop.wav", userData: JSON.stringify({ grabbableKey: { invertSolidWhileHeld: true diff --git a/unpublishedScripts/DomainContent/Toybox/pistol/pistol.js b/unpublishedScripts/DomainContent/Toybox/pistol/pistol.js index d86ffd753a..22d709b9bd 100644 --- a/unpublishedScripts/DomainContent/Toybox/pistol/pistol.js +++ b/unpublishedScripts/DomainContent/Toybox/pistol/pistol.js @@ -27,8 +27,8 @@ this.forceMultiplier = 1; this.laserLength = 100; - this.fireSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/pistol/GUN-SHOT2.raw"); - this.ricochetSound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/pistol/Ricochet.L.wav"); + this.fireSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/pistol/GUN-SHOT2.raw"); + this.ricochetSound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/pistol/Ricochet.L.wav"); this.playRichochetSoundChance = 0.1; this.fireVolume = 0.2; this.bulletForce = 10; @@ -216,7 +216,7 @@ "alphaStart": 0, "alphaFinish": 0, "additiveBlending": true, - "textures": "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/pistol/star.png" + "textures": "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/pistol/star.png" }); Script.setTimeout(function() { diff --git a/unpublishedScripts/DomainContent/Toybox/spray_paint/sprayPaintCan.js b/unpublishedScripts/DomainContent/Toybox/spray_paint/sprayPaintCan.js index 54534ef656..09b8080bd4 100644 --- a/unpublishedScripts/DomainContent/Toybox/spray_paint/sprayPaintCan.js +++ b/unpublishedScripts/DomainContent/Toybox/spray_paint/sprayPaintCan.js @@ -12,7 +12,7 @@ (function () { Script.include("../libraries/utils.js"); - this.spraySound = SoundCache.getSound("http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/spray_paint/spray_paint.wav"); + this.spraySound = SoundCache.getSound("https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/spray_paint/spray_paint.wav"); var TIP_OFFSET_Z = 0.02; var TIP_OFFSET_Y = 0.08; @@ -60,7 +60,7 @@ name: "streamEffect", isEmitting: true, position: position, - textures: "http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/spray_paint/smokeparticle.png", + textures: "https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/spray_paint/smokeparticle.png", emitSpeed: 3, speedSpread: 0.02, emitAcceleration: ZERO_VEC, diff --git a/unpublishedScripts/DomainContent/Toybox/targetsResetter.js b/unpublishedScripts/DomainContent/Toybox/targetsResetter.js index d8253fc48a..347fe89ac6 100644 --- a/unpublishedScripts/DomainContent/Toybox/targetsResetter.js +++ b/unpublishedScripts/DomainContent/Toybox/targetsResetter.js @@ -44,8 +44,8 @@ createTargets: function() { - var MODEL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/target.fbx'; - var COLLISION_HULL_URL = 'http://hifi-production.s3.amazonaws.com/DomainContent/Toybox/ping_pong_gun/target_collision_hull.obj'; + var MODEL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/target.fbx'; + var COLLISION_HULL_URL = 'https://cdn-1.vircadia.com/us-e-1/DomainContent/Toybox/ping_pong_gun/target_collision_hull.obj'; var MINIMUM_MOVE_LENGTH = 0.05; var RESET_DISTANCE = 0.5;