mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Merge pull request #668 from kasenvr/fix/URL-migrations
New Metaverse PR
This commit is contained in:
commit
faadb9e340
156 changed files with 4327 additions and 4743 deletions
|
@ -48,7 +48,7 @@ ext {
|
|||
|
||||
def appDir = new File(projectDir, 'apps/interface')
|
||||
def jniFolder = new File(appDir, 'src/main/jniLibs/arm64-v8a')
|
||||
def baseUrl = 'https://hifi-public.s3.amazonaws.com/dependencies/android/'
|
||||
def baseUrl = 'https://cdn-1.vircadia.com/eu-c-1/vircadia-public/dependencies/android/'
|
||||
def breakpadDumpSymsDir = new File("${appDir}/build/tmp/breakpadDumpSyms")
|
||||
|
||||
task extractGvrBinaries() {
|
||||
|
|
|
@ -11,7 +11,7 @@ buildscript {
|
|||
|
||||
|
||||
def file='gvrsdk_v1.101.0.tgz'
|
||||
def url='https://hifi-public.s3.amazonaws.com/austin/android/' + file
|
||||
def url='https://cdn-1.vircadia.com/eu-c-1/vircadia-public/austin/android/' + file
|
||||
def destFile = new File(HIFI_ANDROID_PRECOMPILED, file)
|
||||
|
||||
// FIXME find a way to only download if the file doesn't exist
|
||||
|
|
|
@ -52,7 +52,7 @@ var URLs = {
|
|||
// STABLE METAVERSE_URL: https://metaverse.highfidelity.com
|
||||
// STAGING METAVERSE_URL: https://staging.highfidelity.com
|
||||
DEFAULT_METAVERSE_URL: "https://metaverse.vircadia.com/live",
|
||||
CDN_URL: 'https://content.vircadia.com/eu-c-1',
|
||||
CDN_URL: 'https://cdn-1.vircadia.com/eu-c-1',
|
||||
PLACE_URL: 'https://xr.place'
|
||||
};
|
||||
|
||||
|
@ -228,7 +228,7 @@ function getDomainFromAPI(callback) {
|
|||
return pendingDomainRequest;
|
||||
}
|
||||
|
||||
function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAdded) {
|
||||
function chooseFromMetaversePlaces(accessToken, forcePathTo, onSuccessfullyAdded) {
|
||||
if (accessToken) {
|
||||
getMetaverseUrl(function(metaverse_url) {
|
||||
|
||||
|
@ -429,7 +429,7 @@ function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAd
|
|||
loadingDialog.modal('hide');
|
||||
bootbox.confirm("We were not able to load your domain information from the Metaverse. Would you like to retry?", function(response) {
|
||||
if (response) {
|
||||
chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAdded);
|
||||
chooseFromMetaversePlaces(accessToken, forcePathTo, onSuccessfullyAdded);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -387,7 +387,7 @@ $(document).ready(function(){
|
|||
|
||||
$.post("/api/domains", domainJSON, function(data){
|
||||
// we successfully created a domain ID, set it on that field
|
||||
var domainID = data.domain.id;
|
||||
var domainID = data.domain.domainId;
|
||||
console.log("Setting domain id to ", data, domainID);
|
||||
$(Settings.DOMAIN_ID_SELECTOR).val(domainID).change();
|
||||
|
||||
|
@ -853,7 +853,7 @@ $(document).ready(function(){
|
|||
}
|
||||
// Update label
|
||||
if (showOrHideLabel()) {
|
||||
var label = data.domain.label;
|
||||
var label = data.domain.name;
|
||||
label = label === null ? '' : label;
|
||||
$('#network-label').val(label);
|
||||
}
|
||||
|
@ -959,7 +959,7 @@ $(document).ready(function(){
|
|||
var addRow = $("<tr> <td></td> <td></td> <td class='buttons'><a href='#' class='place-add glyphicon glyphicon-plus'></a></td> </tr>");
|
||||
addRow.find(".place-add").click(function(ev) {
|
||||
ev.preventDefault();
|
||||
chooseFromHighFidelityPlaces(Settings.initialValues.metaverse.access_token, null, function(placeName, newDomainID) {
|
||||
chooseFromMetaversePlaces(Settings.initialValues.metaverse.access_token, null, function(placeName, newDomainID) {
|
||||
if (newDomainID) {
|
||||
Settings.data.values.metaverse.id = newDomainID;
|
||||
var domainIDEl = $("[data-keypath='metaverse.id']");
|
||||
|
@ -1002,13 +1002,13 @@ $(document).ready(function(){
|
|||
_.each(data.data.domains, function(domain){
|
||||
var domainString = "";
|
||||
|
||||
if (domain.label) {
|
||||
domainString += '"' + domain.label+ '" - ';
|
||||
if (domain.name) {
|
||||
domainString += '"' + domain.name+ '" - ';
|
||||
}
|
||||
|
||||
domainString += domain.id;
|
||||
domainString += domain.domainId;
|
||||
|
||||
domain_select.append("<option value='" + domain.id + "'>" + domainString + "</option>");
|
||||
domain_select.append("<option value='" + domain.domainId + "'>" + domainString + "</option>");
|
||||
})
|
||||
modal_body += "<label for='domain-name-select'>Domains</label>" + domain_select[0].outerHTML
|
||||
modal_buttons["success"] = {
|
||||
|
|
|
@ -70,7 +70,7 @@ $(document).ready(function(){
|
|||
});
|
||||
|
||||
$('body').on('click', '#change-place-name', function() {
|
||||
chooseFromHighFidelityPlaces(Settings.data.values.metaverse.access_token, "/0,-10,0", function(placeName) {
|
||||
chooseFromMetaversePlaces(Settings.data.values.metaverse.access_token, "/0,-10,0", function(placeName) {
|
||||
updatePlaceNameLink(placeName);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -230,7 +230,7 @@ void DomainMetadata::maybeUpdateUsers() {
|
|||
}
|
||||
|
||||
void DomainMetadata::sendDescriptors() {
|
||||
QString domainUpdateJSON = QString("{\"domain\":{\"meta\":%1}").arg(QString(QJsonDocument(get(DESCRIPTORS)).toJson(QJsonDocument::Compact)));
|
||||
QString domainUpdateJSON = QString("{\"domain\":{\"meta\":%1}}").arg(QString(QJsonDocument(get(DESCRIPTORS)).toJson(QJsonDocument::Compact)));
|
||||
const QUuid& domainID = DependencyManager::get<LimitedNodeList>()->getSessionUUID();
|
||||
if (!domainID.isNull()) {
|
||||
static const QString DOMAIN_UPDATE = "/api/v1/domains/%1";
|
||||
|
|
|
@ -10,7 +10,7 @@ import zipfile
|
|||
|
||||
print = functools.partial(print, flush=True)
|
||||
|
||||
ANDROID_PACKAGE_URL = 'https://content.vircadia.com/eu-c-1/vircadia-public/dependencies/android/'
|
||||
ANDROID_PACKAGE_URL = 'https://cdn-1.vircadia.com/eu-c-1/vircadia-public/dependencies/android/'
|
||||
|
||||
ANDROID_PACKAGES = {
|
||||
'qt' : {
|
||||
|
@ -68,7 +68,7 @@ ANDROID_PACKAGES = {
|
|||
'includeLibs': ['libtbb.so', 'libtbbmalloc.so'],
|
||||
},
|
||||
'hifiAC': {
|
||||
'baseUrl': 'https://content.vircadia.com/eu-c-1/vircadia-public/dependencies/',
|
||||
'baseUrl': 'https://cdn-1.vircadia.com/eu-c-1/vircadia-public/dependencies/',
|
||||
'file': 'codecSDK-android_armv8-2.0.zip',
|
||||
'checksum': '1cbef929675818fc64c4101b72f84a6a'
|
||||
},
|
||||
|
|
|
@ -1,861 +1,71 @@
|
|||
{
|
||||
"Anime boy": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
{
|
||||
"properties": {
|
||||
"acceleration": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"actionData": "",
|
||||
"age": 6.915350914001465,
|
||||
"ageAsText": "0 hours 0 minutes 6 seconds",
|
||||
"angularDamping": 0.39346998929977417,
|
||||
"angularVelocity": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"animation": {
|
||||
"allowTranslation": true,
|
||||
"currentFrame": 0,
|
||||
"firstFrame": 0,
|
||||
"fps": 30,
|
||||
"hold": false,
|
||||
"lastFrame": 100000,
|
||||
"loop": true,
|
||||
"running": false,
|
||||
"url": ""
|
||||
},
|
||||
"boundingBox": {
|
||||
"brn": {
|
||||
"x": -0.10961885005235672,
|
||||
"y": -0.19444090127944946,
|
||||
"z": -0.15760529041290283
|
||||
},
|
||||
"center": {
|
||||
"x": 2.6226043701171875e-06,
|
||||
"y": -0.13999652862548828,
|
||||
"z": -0.04999971389770508
|
||||
},
|
||||
"dimensions": {
|
||||
"x": 0.21924294531345367,
|
||||
"y": 0.10888873785734177,
|
||||
"z": 0.2152111530303955
|
||||
},
|
||||
"tfl": {
|
||||
"x": 0.10962409526109695,
|
||||
"y": -0.0855521634221077,
|
||||
"z": 0.057605862617492676
|
||||
}
|
||||
},
|
||||
"canCastShadow": true,
|
||||
"certificateID": "",
|
||||
"clientOnly": true,
|
||||
"cloneAvatarEntity": false,
|
||||
"cloneDynamic": false,
|
||||
"cloneLifetime": 300,
|
||||
"cloneLimit": 0,
|
||||
"cloneOriginID": "{00000000-0000-0000-0000-000000000000}",
|
||||
"cloneable": false,
|
||||
"collidesWith": "",
|
||||
"collisionMask": 0,
|
||||
"collisionSoundURL": "",
|
||||
"collisionless": false,
|
||||
"collisionsWillMove": false,
|
||||
"compoundShapeURL": "",
|
||||
"created": "2018-06-06T17:27:53Z",
|
||||
"damping": 0.39346998929977417,
|
||||
"density": 1000,
|
||||
"description": "",
|
||||
"dimensions": {
|
||||
"x": 0.21924294531345367,
|
||||
"y": 0.07768379896879196,
|
||||
"z": 0.2055898904800415
|
||||
},
|
||||
"dynamic": false,
|
||||
"editionNumber": 15,
|
||||
"entityInstanceNumber": 0,
|
||||
"friction": 0.5,
|
||||
"gravity": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"href": "",
|
||||
"id": "{5d20c775-a0d7-4163-b158-4e0a784a4625}",
|
||||
"ignoreForCollisions": false,
|
||||
"itemArtist": "jyoum",
|
||||
"itemCategories": "Wearables",
|
||||
"itemDescription": "Wear these, and others will respect your authoritah.",
|
||||
"itemLicense": "",
|
||||
"itemName": "Aviators",
|
||||
"jointRotations": [
|
||||
],
|
||||
"jointRotationsSet": [
|
||||
],
|
||||
"jointTranslations": [
|
||||
],
|
||||
"jointTranslationsSet": [
|
||||
],
|
||||
"lastEdited": 1528306178314655,
|
||||
"lastEditedBy": "{439a2669-4626-487f-9dcf-2d15e77c69a2}",
|
||||
"lifetime": -1,
|
||||
"limitedRun": 4294967295,
|
||||
"localPosition": {
|
||||
"x": 2.6226043701171875e-06,
|
||||
"y": -0.13999652862548828,
|
||||
"z": -0.04999971389770508
|
||||
},
|
||||
"localRotation": {
|
||||
"w": 0.9969173073768616,
|
||||
"x": -0.07845909893512726,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"locked": false,
|
||||
"marketplaceID": "40d879ec-93f0-4b4a-8c58-dd6349bdb058",
|
||||
"modelURL": "http://mpassets.highfidelity.com/40d879ec-93f0-4b4a-8c58-dd6349bdb058-v1/Aviator.fbx",
|
||||
"name": "",
|
||||
"naturalDimensions": {
|
||||
"x": 0.1660931408405304,
|
||||
"y": 0.05885136127471924,
|
||||
"z": 0.15574991703033447
|
||||
},
|
||||
"naturalPosition": {
|
||||
"x": 0,
|
||||
"y": 1.6633577346801758,
|
||||
"z": 0.048884183168411255
|
||||
},
|
||||
"originalTextures": "{\n \"aviator:Eyewear2F\": \"http://mpassets.highfidelity.com/40d879ec-93f0-4b4a-8c58-dd6349bdb058-v1/Aviator.fbx/Aviator.fbm/aviator_Eyewear_Diffuse.png\",\n \"aviator:Eyewear2F1\": \"http://mpassets.highfidelity.com/40d879ec-93f0-4b4a-8c58-dd6349bdb058-v1/Aviator.fbx/Aviator.fbm/aviator_Eyewear_Specular.png\"\n}\n",
|
||||
"owningAvatarID": "{439a2669-4626-487f-9dcf-2d15e77c69a2}",
|
||||
"parentID": "{439a2669-4626-487f-9dcf-2d15e77c69a2}",
|
||||
"parentJointIndex": 66,
|
||||
"position": {
|
||||
"x": 2.6226043701171875e-06,
|
||||
"y": -0.13999652862548828,
|
||||
"z": -0.04999971389770508
|
||||
},
|
||||
"queryAACube": {
|
||||
"scale": 0.9313028454780579,
|
||||
"x": -1.4091639518737793,
|
||||
"y": -10.133878707885742,
|
||||
"z": 1.9983724355697632
|
||||
},
|
||||
"registrationPoint": {
|
||||
"x": 0.5,
|
||||
"y": 0.5,
|
||||
"z": 0.5
|
||||
},
|
||||
"relayParentJoints": false,
|
||||
"renderInfo": {
|
||||
"drawCalls": 1,
|
||||
"hasTransparent": false,
|
||||
"texturesCount": 2,
|
||||
"texturesSize": 1310720,
|
||||
"verticesCount": 982
|
||||
},
|
||||
"restitution": 0.5,
|
||||
"rotation": {
|
||||
"w": 0.9969173073768616,
|
||||
"x": -0.07845909893512726,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"script": "",
|
||||
"scriptTimestamp": 0,
|
||||
"serverScripts": "",
|
||||
"shapeType": "box",
|
||||
"staticCertificateVersion": 0,
|
||||
"textures": "",
|
||||
"type": "Model",
|
||||
"userData": "{\"Attachment\":{\"action\":\"attach\",\"joint\":\"HeadTop_End\",\"attached\":false,\"options\":{\"translation\":{\"x\":0,\"y\":0,\"z\":0},\"scale\":1}},\"grabbableKey\":{\"cloneable\":false,\"grabbable\":true}}",
|
||||
"velocity": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"visible": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "http://mpassets.highfidelity.com/46e0fd52-3cff-462f-ba97-927338d88295-v1/AnimeBoy2.fst",
|
||||
"version": 3
|
||||
},
|
||||
"Anime girl": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
{
|
||||
"properties": {
|
||||
"acceleration": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"actionData": "",
|
||||
"age": 19.66267967224121,
|
||||
"ageAsText": "0 hours 0 minutes 19 seconds",
|
||||
"angularDamping": 0.39346998929977417,
|
||||
"angularVelocity": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"animation": {
|
||||
"allowTranslation": true,
|
||||
"currentFrame": 0,
|
||||
"firstFrame": 0,
|
||||
"fps": 30,
|
||||
"hold": false,
|
||||
"lastFrame": 100000,
|
||||
"loop": true,
|
||||
"running": false,
|
||||
"url": ""
|
||||
},
|
||||
"boundingBox": {
|
||||
"brn": {
|
||||
"x": -0.10536206513643265,
|
||||
"y": -0.16647332906723022,
|
||||
"z": -0.12632352113723755
|
||||
},
|
||||
"center": {
|
||||
"x": 0,
|
||||
"y": -0.12999999523162842,
|
||||
"z": -0.030000001192092896
|
||||
},
|
||||
"dimensions": {
|
||||
"x": 0.2107241302728653,
|
||||
"y": 0.07294666767120361,
|
||||
"z": 0.1926470398902893
|
||||
},
|
||||
"tfl": {
|
||||
"x": 0.10536206513643265,
|
||||
"y": -0.09352666139602661,
|
||||
"z": 0.06632351875305176
|
||||
}
|
||||
},
|
||||
"canCastShadow": true,
|
||||
"certificateID": "",
|
||||
"clientOnly": true,
|
||||
"cloneAvatarEntity": false,
|
||||
"cloneDynamic": false,
|
||||
"cloneLifetime": 300,
|
||||
"cloneLimit": 0,
|
||||
"cloneOriginID": "{00000000-0000-0000-0000-000000000000}",
|
||||
"cloneable": false,
|
||||
"collidesWith": "",
|
||||
"collisionMask": 0,
|
||||
"collisionSoundURL": "",
|
||||
"collisionless": false,
|
||||
"collisionsWillMove": false,
|
||||
"compoundShapeURL": "",
|
||||
"created": "2018-06-05T00:10:37Z",
|
||||
"damping": 0.39346998929977417,
|
||||
"density": 1000,
|
||||
"description": "",
|
||||
"dimensions": {
|
||||
"x": 0.2107241302728653,
|
||||
"y": 0.07294666767120361,
|
||||
"z": 0.1926470398902893
|
||||
},
|
||||
"dynamic": false,
|
||||
"editionNumber": 5,
|
||||
"entityInstanceNumber": 0,
|
||||
"friction": 0.5,
|
||||
"gravity": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"href": "",
|
||||
"id": "{1586b83a-2af7-4532-9bfb-82fe3f5d5ce9}",
|
||||
"ignoreForCollisions": false,
|
||||
"itemArtist": "moam_00",
|
||||
"itemCategories": "Wearables",
|
||||
"itemDescription": "Perfect for side-glancin'.",
|
||||
"itemLicense": "",
|
||||
"itemName": "Blacker Fem Glasses",
|
||||
"jointRotations": [
|
||||
],
|
||||
"jointRotationsSet": [
|
||||
],
|
||||
"jointTranslations": [
|
||||
],
|
||||
"jointTranslationsSet": [
|
||||
],
|
||||
"lastEdited": 1528157470041658,
|
||||
"lastEditedBy": "{425df1a8-289b-42fc-819c-c3b2a12d7165}",
|
||||
"lifetime": -1,
|
||||
"limitedRun": 4294967295,
|
||||
"localPosition": {
|
||||
"x": 0,
|
||||
"y": -0.12999999523162842,
|
||||
"z": -0.029999999329447746
|
||||
},
|
||||
"localRotation": {
|
||||
"w": 1,
|
||||
"x": -2.2351741790771484e-08,
|
||||
"y": 3.4924596548080444e-10,
|
||||
"z": 3.725290298461914e-09
|
||||
},
|
||||
"locked": false,
|
||||
"marketplaceID": "06781d12-9139-48f4-ac2a-417dde090981",
|
||||
"modelURL": "http://mpassets.highfidelity.com/06781d12-9139-48f4-ac2a-417dde090981-v1/FemGlasses03.fbx",
|
||||
"name": "Female Glasses 3 by Mario Andrade",
|
||||
"naturalDimensions": {
|
||||
"x": 0.16209548711776733,
|
||||
"y": 0.05611282214522362,
|
||||
"z": 0.14819003641605377
|
||||
},
|
||||
"naturalPosition": {
|
||||
"x": 0,
|
||||
"y": -7.636845111846924e-08,
|
||||
"z": 0
|
||||
},
|
||||
"originalTextures": "{\n \"file49\": \"http://mpassets.highfidelity.com/06781d12-9139-48f4-ac2a-417dde090981-v1/FemGlasses03.fbx/FemGlasses03.fbm/FemGlasses03Mat_Mixed_AO.jpg\",\n \"file81\": \"http://mpassets.highfidelity.com/06781d12-9139-48f4-ac2a-417dde090981-v1/FemGlasses03.fbx/FemGlasses03.fbm/FemGlasses03Mat_Metallic.jpg\",\n \"file84\": \"http://mpassets.highfidelity.com/06781d12-9139-48f4-ac2a-417dde090981-v1/FemGlasses03.fbx/FemGlasses03.fbm/FemGlasses03Mat_Roughness.jpg\",\n \"file86\": \"http://mpassets.highfidelity.com/06781d12-9139-48f4-ac2a-417dde090981-v1/FemGlasses03.fbx/FemGlasses03.fbm/FemGlasses03Mat_Base_Color.jpg\",\n \"file87\": \"http://mpassets.highfidelity.com/06781d12-9139-48f4-ac2a-417dde090981-v1/FemGlasses03.fbx/FemGlasses03.fbm/FemGlasses03Mat_Normal_DirectX.jpg\"\n}\n",
|
||||
"owningAvatarID": "{1277f725-fbb4-478b-ae79-1241fd90e508}",
|
||||
"parentID": "{1277f725-fbb4-478b-ae79-1241fd90e508}",
|
||||
"parentJointIndex": 66,
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": -0.12999999523162842,
|
||||
"z": -0.029999999329447746
|
||||
},
|
||||
"queryAACube": {
|
||||
"scale": 0.8840523958206177,
|
||||
"x": -2.6587564945220947,
|
||||
"y": -10.162277221679688,
|
||||
"z": -0.9548344016075134
|
||||
},
|
||||
"registrationPoint": {
|
||||
"x": 0.5,
|
||||
"y": 0.5,
|
||||
"z": 0.5
|
||||
},
|
||||
"relayParentJoints": false,
|
||||
"renderInfo": {
|
||||
"drawCalls": 1,
|
||||
"hasTransparent": false,
|
||||
"texturesCount": 5,
|
||||
"texturesSize": 0,
|
||||
"verticesCount": 1156
|
||||
},
|
||||
"restitution": 0.5,
|
||||
"rotation": {
|
||||
"w": 1,
|
||||
"x": -2.2351741790771484e-08,
|
||||
"y": 3.4924596548080444e-10,
|
||||
"z": 3.725290298461914e-09
|
||||
},
|
||||
"script": "",
|
||||
"scriptTimestamp": 0,
|
||||
"serverScripts": "",
|
||||
"shapeType": "box",
|
||||
"staticCertificateVersion": 0,
|
||||
"textures": "",
|
||||
"type": "Model",
|
||||
"userData": "{\"Attachment\":{\"action\":\"attach\",\"joint\":\"HeadTop_End\",\"attached\":false,\"options\":{\"translation\":{\"x\":0,\"y\":0,\"z\":0},\"scale\":1}},\"grabbableKey\":{\"cloneable\":false,\"grabbable\":true}}",
|
||||
"velocity": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"visible": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "http://mpassets.highfidelity.com/0dce3426-55c8-4641-8dd5-d76eb575b64a-v1/Anime_F_Outfit.fst",
|
||||
"version": 3
|
||||
},
|
||||
"Last Legends: Male": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
{
|
||||
"properties": {
|
||||
"acceleration": {
|
||||
"blue": 0,
|
||||
"green": 0,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"actionData": "",
|
||||
"age": 321.8835144042969,
|
||||
"ageAsText": "0 hours 5 minutes 21 seconds",
|
||||
"angularDamping": 0.39346998929977417,
|
||||
"angularVelocity": {
|
||||
"blue": 0,
|
||||
"green": 0,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"animation": {
|
||||
"allowTranslation": true,
|
||||
"currentFrame": 0,
|
||||
"firstFrame": 0,
|
||||
"fps": 30,
|
||||
"hold": false,
|
||||
"lastFrame": 100000,
|
||||
"loop": true,
|
||||
"running": false,
|
||||
"url": ""
|
||||
},
|
||||
"boundingBox": {
|
||||
"brn": {
|
||||
"blue": -0.03950843587517738,
|
||||
"green": 0.20785385370254517,
|
||||
"red": -0.04381325840950012,
|
||||
"x": -0.04381325840950012,
|
||||
"y": 0.20785385370254517,
|
||||
"z": -0.03950843587517738
|
||||
},
|
||||
"center": {
|
||||
"blue": 0,
|
||||
"green": 0.23000000417232513,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0.23000000417232513,
|
||||
"z": 0
|
||||
},
|
||||
"dimensions": {
|
||||
"blue": 0.07901687175035477,
|
||||
"green": 0.044292300939559937,
|
||||
"red": 0.08762651681900024,
|
||||
"x": 0.08762651681900024,
|
||||
"y": 0.044292300939559937,
|
||||
"z": 0.07901687175035477
|
||||
},
|
||||
"tfl": {
|
||||
"blue": 0.03950843587517738,
|
||||
"green": 0.2521461546421051,
|
||||
"red": 0.04381325840950012,
|
||||
"x": 0.04381325840950012,
|
||||
"y": 0.2521461546421051,
|
||||
"z": 0.03950843587517738
|
||||
}
|
||||
},
|
||||
"canCastShadow": true,
|
||||
"certificateID": "",
|
||||
"clientOnly": true,
|
||||
"cloneAvatarEntity": false,
|
||||
"cloneDynamic": false,
|
||||
"cloneLifetime": 300,
|
||||
"cloneLimit": 0,
|
||||
"cloneOriginID": "{00000000-0000-0000-0000-000000000000}",
|
||||
"cloneable": false,
|
||||
"collidesWith": "",
|
||||
"collisionMask": 0,
|
||||
"collisionSoundURL": "",
|
||||
"collisionless": false,
|
||||
"collisionsWillMove": false,
|
||||
"compoundShapeURL": "",
|
||||
"created": "2018-07-26T23:56:46Z",
|
||||
"damping": 0.39346998929977417,
|
||||
"density": 1000,
|
||||
"description": "",
|
||||
"dimensions": {
|
||||
"blue": 0.07229919731616974,
|
||||
"green": 0.06644226610660553,
|
||||
"red": 0.03022606298327446,
|
||||
"x": 0.03022606298327446,
|
||||
"y": 0.06644226610660553,
|
||||
"z": 0.07229919731616974
|
||||
},
|
||||
"dynamic": false,
|
||||
"editionNumber": 58,
|
||||
"entityInstanceNumber": 0,
|
||||
"friction": 0.5,
|
||||
"gravity": {
|
||||
"blue": 0,
|
||||
"green": 0,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"href": "",
|
||||
"id": "{03053239-bb37-4c51-a013-a1772baaeed5}",
|
||||
"ignoreForCollisions": false,
|
||||
"itemArtist": "jyoum",
|
||||
"itemCategories": "Wearables",
|
||||
"itemDescription": "A cool scifi watch for your avatar!",
|
||||
"itemLicense": "",
|
||||
"itemName": "Scifi Watch",
|
||||
"jointRotations": [
|
||||
],
|
||||
"jointRotationsSet": [
|
||||
],
|
||||
"jointTranslations": [
|
||||
],
|
||||
"jointTranslationsSet": [
|
||||
],
|
||||
"lastEdited": 1532649569894305,
|
||||
"lastEditedBy": "{042ac463-7879-40f0-8126-e2e56c4345ca}",
|
||||
"lifetime": -1,
|
||||
"limitedRun": 4294967295,
|
||||
"localPosition": {
|
||||
"blue": 0,
|
||||
"green": 0.23000000417232513,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0.23000000417232513,
|
||||
"z": 0
|
||||
},
|
||||
"localRotation": {
|
||||
"w": 0.5910986065864563,
|
||||
"x": -0.48726415634155273,
|
||||
"y": -0.4088630974292755,
|
||||
"z": 0.49599072337150574
|
||||
},
|
||||
"locked": false,
|
||||
"marketplaceID": "0685794d-fddb-4bad-a608-6d7789ceda90",
|
||||
"modelURL": "http://mpassets.highfidelity.com/0685794d-fddb-4bad-a608-6d7789ceda90-v1/ScifiWatch.fbx",
|
||||
"name": "Scifi Watch by Jimi",
|
||||
"naturalDimensions": {
|
||||
"blue": 0.055614765733480453,
|
||||
"green": 0.0511094331741333,
|
||||
"red": 0.023250818252563477,
|
||||
"x": 0.023250818252563477,
|
||||
"y": 0.0511094331741333,
|
||||
"z": 0.055614765733480453
|
||||
},
|
||||
"naturalPosition": {
|
||||
"blue": -0.06031447649002075,
|
||||
"green": 1.4500460624694824,
|
||||
"red": 0.6493338942527771,
|
||||
"x": 0.6493338942527771,
|
||||
"y": 1.4500460624694824,
|
||||
"z": -0.06031447649002075
|
||||
},
|
||||
"originalTextures": "{\n \"file4\": \"http://mpassets.highfidelity.com/0685794d-fddb-4bad-a608-6d7789ceda90-v1/ScifiWatch.fbx/ScifiWatch/texture/lambert1_Base_Color.png\",\n \"file5\": \"http://mpassets.highfidelity.com/0685794d-fddb-4bad-a608-6d7789ceda90-v1/ScifiWatch.fbx/ScifiWatch/texture/lambert1_Normal_OpenGL.png\",\n \"file6\": \"http://mpassets.highfidelity.com/0685794d-fddb-4bad-a608-6d7789ceda90-v1/ScifiWatch.fbx/ScifiWatch/texture/lambert1_Metallic.png\",\n \"file7\": \"http://mpassets.highfidelity.com/0685794d-fddb-4bad-a608-6d7789ceda90-v1/ScifiWatch.fbx/ScifiWatch/texture/lambert1_Roughness.png\",\n \"file8\": \"http://mpassets.highfidelity.com/0685794d-fddb-4bad-a608-6d7789ceda90-v1/ScifiWatch.fbx/ScifiWatch/texture/lambert1_Emissive.png\"\n}\n",
|
||||
"owningAvatarID": "{042ac463-7879-40f0-8126-e2e56c4345ca}",
|
||||
"parentID": "{042ac463-7879-40f0-8126-e2e56c4345ca}",
|
||||
"parentJointIndex": 16,
|
||||
"position": {
|
||||
"blue": 0,
|
||||
"green": 0.23000000417232513,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0.23000000417232513,
|
||||
"z": 0
|
||||
},
|
||||
"queryAACube": {
|
||||
"scale": 0.3082179129123688,
|
||||
"x": 495.7716979980469,
|
||||
"y": 498.345703125,
|
||||
"z": 498.52044677734375
|
||||
},
|
||||
"registrationPoint": {
|
||||
"blue": 0.5,
|
||||
"green": 0.5,
|
||||
"red": 0.5,
|
||||
"x": 0.5,
|
||||
"y": 0.5,
|
||||
"z": 0.5
|
||||
},
|
||||
"relayParentJoints": false,
|
||||
"renderInfo": {
|
||||
"drawCalls": 1,
|
||||
"hasTransparent": false,
|
||||
"texturesCount": 5,
|
||||
"texturesSize": 786432,
|
||||
"verticesCount": 273
|
||||
},
|
||||
"restitution": 0.5,
|
||||
"rotation": {
|
||||
"w": 0.5910986065864563,
|
||||
"x": -0.48726415634155273,
|
||||
"y": -0.4088630974292755,
|
||||
"z": 0.49599072337150574
|
||||
},
|
||||
"script": "",
|
||||
"scriptTimestamp": 0,
|
||||
"serverScripts": "",
|
||||
"shapeType": "box",
|
||||
"staticCertificateVersion": 0,
|
||||
"textures": "",
|
||||
"type": "Model",
|
||||
"userData": "{\"Attachment\":{\"action\":\"attach\",\"joint\":\"[LR]ForeArm\",\"attached\":false,\"options\":{\"translation\":{\"x\":0,\"y\":0,\"z\":0},\"scale\":1}},\"grabbableKey\":{\"cloneable\":false,\"grabbable\":true}}",
|
||||
"velocity": {
|
||||
"blue": 0,
|
||||
"green": 0,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"acceleration": {
|
||||
"blue": 0,
|
||||
"green": 0,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"actionData": "",
|
||||
"age": 308.8044128417969,
|
||||
"ageAsText": "0 hours 5 minutes 8 seconds",
|
||||
"angularDamping": 0.39346998929977417,
|
||||
"angularVelocity": {
|
||||
"blue": 0,
|
||||
"green": 0,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"animation": {
|
||||
"allowTranslation": true,
|
||||
"currentFrame": 0,
|
||||
"firstFrame": 0,
|
||||
"fps": 30,
|
||||
"hold": false,
|
||||
"lastFrame": 100000,
|
||||
"loop": true,
|
||||
"running": false,
|
||||
"url": ""
|
||||
},
|
||||
"boundingBox": {
|
||||
"brn": {
|
||||
"blue": -0.2340194433927536,
|
||||
"green": -0.07067721337080002,
|
||||
"red": -0.17002610862255096,
|
||||
"x": -0.17002610862255096,
|
||||
"y": -0.07067721337080002,
|
||||
"z": -0.2340194433927536
|
||||
},
|
||||
"center": {
|
||||
"blue": -0.039825439453125,
|
||||
"green": 0.02001953125,
|
||||
"red": 0.0001678466796875,
|
||||
"x": 0.0001678466796875,
|
||||
"y": 0.02001953125,
|
||||
"z": -0.039825439453125
|
||||
},
|
||||
"dimensions": {
|
||||
"blue": 0.3883880078792572,
|
||||
"green": 0.18139348924160004,
|
||||
"red": 0.34038791060447693,
|
||||
"x": 0.34038791060447693,
|
||||
"y": 0.18139348924160004,
|
||||
"z": 0.3883880078792572
|
||||
},
|
||||
"tfl": {
|
||||
"blue": 0.1543685644865036,
|
||||
"green": 0.11071627587080002,
|
||||
"red": 0.17036180198192596,
|
||||
"x": 0.17036180198192596,
|
||||
"y": 0.11071627587080002,
|
||||
"z": 0.1543685644865036
|
||||
}
|
||||
},
|
||||
"canCastShadow": true,
|
||||
"certificateID": "",
|
||||
"clientOnly": true,
|
||||
"cloneAvatarEntity": false,
|
||||
"cloneDynamic": false,
|
||||
"cloneLifetime": 300,
|
||||
"cloneLimit": 0,
|
||||
"cloneOriginID": "{00000000-0000-0000-0000-000000000000}",
|
||||
"cloneable": false,
|
||||
"collidesWith": "",
|
||||
"collisionMask": 0,
|
||||
"collisionSoundURL": "",
|
||||
"collisionless": false,
|
||||
"collisionsWillMove": false,
|
||||
"compoundShapeURL": "",
|
||||
"created": "2018-07-26T23:56:46Z",
|
||||
"damping": 0.39346998929977417,
|
||||
"density": 1000,
|
||||
"description": "",
|
||||
"dimensions": {
|
||||
"blue": 0.38838762044906616,
|
||||
"green": 0.16981728374958038,
|
||||
"red": 0.33466479182243347,
|
||||
"x": 0.33466479182243347,
|
||||
"y": 0.16981728374958038,
|
||||
"z": 0.38838762044906616
|
||||
},
|
||||
"dynamic": false,
|
||||
"editionNumber": 18,
|
||||
"entityInstanceNumber": 0,
|
||||
"friction": 0.5,
|
||||
"gravity": {
|
||||
"blue": 0,
|
||||
"green": 0,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"href": "",
|
||||
"id": "{1bf231ce-3913-4c53-be3c-b1f4094dac51}",
|
||||
"ignoreForCollisions": false,
|
||||
"itemArtist": "jyoum",
|
||||
"itemCategories": "Wearables",
|
||||
"itemDescription": "A stylish and classic piece of headwear for your avatar.",
|
||||
"itemLicense": "",
|
||||
"itemName": "Fedora",
|
||||
"jointRotations": [
|
||||
],
|
||||
"jointRotationsSet": [
|
||||
],
|
||||
"jointTranslations": [
|
||||
],
|
||||
"jointTranslationsSet": [
|
||||
],
|
||||
"lastEdited": 1532649698129709,
|
||||
"lastEditedBy": "{042ac463-7879-40f0-8126-e2e56c4345ca}",
|
||||
"lifetime": -1,
|
||||
"limitedRun": 4294967295,
|
||||
"localPosition": {
|
||||
"blue": -0.039825439453125,
|
||||
"green": 0.02001953125,
|
||||
"red": 0.0001678466796875,
|
||||
"x": 0.0001678466796875,
|
||||
"y": 0.02001953125,
|
||||
"z": -0.039825439453125
|
||||
},
|
||||
"localRotation": {
|
||||
"w": 0.9998477101325989,
|
||||
"x": -9.898545982878204e-09,
|
||||
"y": 5.670873406415922e-07,
|
||||
"z": 0.017452405765652657
|
||||
},
|
||||
"locked": false,
|
||||
"marketplaceID": "11c4208d-15d7-4449-9758-a08da6dbd3dc",
|
||||
"modelURL": "http://mpassets.highfidelity.com/11c4208d-15d7-4449-9758-a08da6dbd3dc-v1/Fedora.fbx",
|
||||
"name": "",
|
||||
"naturalDimensions": {
|
||||
"blue": 0.320981502532959,
|
||||
"green": 0.14034485816955566,
|
||||
"red": 0.2765824794769287,
|
||||
"x": 0.2765824794769287,
|
||||
"y": 0.14034485816955566,
|
||||
"z": 0.320981502532959
|
||||
},
|
||||
"naturalPosition": {
|
||||
"blue": 0.022502630949020386,
|
||||
"green": 1.7460365295410156,
|
||||
"red": 0.000143393874168396,
|
||||
"x": 0.000143393874168396,
|
||||
"y": 1.7460365295410156,
|
||||
"z": 0.022502630949020386
|
||||
},
|
||||
"originalTextures": "{\n \"file5\": \"http://mpassets.highfidelity.com/11c4208d-15d7-4449-9758-a08da6dbd3dc-v1/Fedora.fbx/Texture/Fedora_Hat1_Base_Color.png\",\n \"file7\": \"http://mpassets.highfidelity.com/11c4208d-15d7-4449-9758-a08da6dbd3dc-v1/Fedora.fbx/Texture/Fedora_Hat1_Roughness.png\"\n}\n",
|
||||
"owningAvatarID": "{042ac463-7879-40f0-8126-e2e56c4345ca}",
|
||||
"parentID": "{042ac463-7879-40f0-8126-e2e56c4345ca}",
|
||||
"parentJointIndex": 66,
|
||||
"position": {
|
||||
"blue": -0.039825439453125,
|
||||
"green": 0.02001953125,
|
||||
"red": 0.0001678466796875,
|
||||
"x": 0.0001678466796875,
|
||||
"y": 0.02001953125,
|
||||
"z": -0.039825439453125
|
||||
},
|
||||
"queryAACube": {
|
||||
"scale": 1.6202316284179688,
|
||||
"x": 495.21051025390625,
|
||||
"y": 498.5577697753906,
|
||||
"z": 497.6370849609375
|
||||
},
|
||||
"registrationPoint": {
|
||||
"blue": 0.5,
|
||||
"green": 0.5,
|
||||
"red": 0.5,
|
||||
"x": 0.5,
|
||||
"y": 0.5,
|
||||
"z": 0.5
|
||||
},
|
||||
"relayParentJoints": false,
|
||||
"renderInfo": {
|
||||
"drawCalls": 1,
|
||||
"hasTransparent": false,
|
||||
"texturesCount": 2,
|
||||
"texturesSize": 327680,
|
||||
"verticesCount": 719
|
||||
},
|
||||
"restitution": 0.5,
|
||||
"rotation": {
|
||||
"w": 0.9998477101325989,
|
||||
"x": -9.898545982878204e-09,
|
||||
"y": 5.670873406415922e-07,
|
||||
"z": 0.017452405765652657
|
||||
},
|
||||
"script": "",
|
||||
"scriptTimestamp": 0,
|
||||
"serverScripts": "",
|
||||
"shapeType": "box",
|
||||
"staticCertificateVersion": 0,
|
||||
"textures": "",
|
||||
"type": "Model",
|
||||
"userData": "{\"Attachment\":{\"action\":\"attach\",\"joint\":\"HeadTop_End\",\"attached\":false,\"options\":{\"translation\":{\"x\":0,\"y\":0,\"z\":0},\"scale\":1}},\"grabbableKey\":{\"cloneable\":false,\"grabbable\":true}}",
|
||||
"velocity": {
|
||||
"blue": 0,
|
||||
"green": 0,
|
||||
"red": 0,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"visible": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "http://mpassets.highfidelity.com/28569047-6f1a-4100-af67-8054ec397cc3-v1/LLMale2.fst",
|
||||
"version": 3
|
||||
},
|
||||
"Last legends Female": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "http://mpassets.highfidelity.com/8d823be5-6197-4418-b984-eb94160ed956-v1/LLFemale_Clothes.fst",
|
||||
"version": 3
|
||||
},
|
||||
"Matthew": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "http://mpassets.highfidelity.com/b652081b-a199-425e-ae5c-7815721bdc09-v1/matthew.fst",
|
||||
"version": 3
|
||||
},
|
||||
"Priscilla": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "http://mpassets.highfidelity.com/e7565f93-8bc5-47c2-b6eb-b3b31d4a1339-v1/priscilla.fst",
|
||||
"version": 3
|
||||
},
|
||||
"Woody": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "http://mpassets.highfidelity.com/ad348528-de38-420c-82bb-054cb22163f5-v1/mannequin.fst",
|
||||
"avatarUrl": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Woody/mannequin.fst",
|
||||
"version": 3
|
||||
},
|
||||
"Kim": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Kim/fbx/Kim.fst",
|
||||
"avatarIcon": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Kim/img/icon.png",
|
||||
"version": 3
|
||||
},
|
||||
"Mason": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Mason/fbx/Mason.fst",
|
||||
"avatarIcon": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Mason/img/icon.png",
|
||||
"version": 3
|
||||
},
|
||||
"Mike": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Mike/fbx/Mike.fst",
|
||||
"avatarIcon": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Mike/img/icon.png",
|
||||
"version": 3
|
||||
},
|
||||
"Sean": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Sean/fbx/Sean.fst",
|
||||
"avatarIcon": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Sean/img/icon.png",
|
||||
"version": 3
|
||||
},
|
||||
"Summer": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Summer/fbx/Summer.fst",
|
||||
"avatarIcon": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Summer/img/icon.png",
|
||||
"version": 3
|
||||
},
|
||||
"Tanya": {
|
||||
"attachments": [
|
||||
],
|
||||
"avatarEntites": [
|
||||
],
|
||||
"avatarScale": 1,
|
||||
"avatarUrl": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Tanya/fbx/Tanya.fst",
|
||||
"avatarIcon": "https://cdn-1.vircadia.com/us-e-1/Bazaar/Avatars/Tanya/img/icon.png",
|
||||
"version": 3
|
||||
}
|
||||
}
|
||||
}
|
|
@ -49,7 +49,13 @@ ListModel {
|
|||
}
|
||||
|
||||
function makeAvatarObject(avatar, avatarName) {
|
||||
var avatarThumbnailUrl = makeThumbnailUrl(avatar.avatarUrl);
|
||||
var avatarThumbnailUrl;
|
||||
|
||||
if (!avatar.avatarIcon) {
|
||||
avatarThumbnailUrl = makeThumbnailUrl(avatar.avatarUrl);
|
||||
} else {
|
||||
avatarThumbnailUrl = avatar.avatarIcon;
|
||||
}
|
||||
|
||||
return {
|
||||
'name' : avatarName,
|
||||
|
|
|
@ -456,7 +456,7 @@ Rectangle {
|
|||
id: avatarCollisionSoundUrlInputText
|
||||
font.pixelSize: 17
|
||||
Layout.fillWidth: true
|
||||
placeholderText: 'https://hifi-public.s3.amazonaws.com/sounds/Collisions-'
|
||||
placeholderText: "https://cdn-1.vircadia.com/eu-c-1/vircadia-public/sounds/Collisions-"
|
||||
|
||||
onFocusChanged: {
|
||||
keyboardRaised = (avatarAnimationUrlInputText.focus || avatarCollisionSoundUrlInputText.focus);
|
||||
|
|
|
@ -25,7 +25,7 @@ XmlListModel {
|
|||
readonly property string realPrefix: prefix.match('.*/$') ? prefix : (prefix + "/")
|
||||
readonly property string nameRegex: realPrefix + (filter ? (".*" + filter) : "") + ".*\." + extension
|
||||
readonly property string nameQuery: "Key/substring-before(substring-after(string(), '" + prefix + "'), '." + extension + "')"
|
||||
readonly property string baseUrl: "http://s3.amazonaws.com/hifi-public"
|
||||
readonly property string baseUrl: "https://cdn-1.vircadia.com/eu-c-1/vircadia-public"
|
||||
|
||||
// FIXME need to urlencode prefix?
|
||||
source: baseUrl + "?prefix=" + realPrefix
|
||||
|
|
|
@ -296,7 +296,7 @@
|
|||
"lastEdited": 1537901430334966,
|
||||
"lastEditedBy": "{69540019-db48-4375-86c8-ac1a4a90d043}",
|
||||
"locked": true,
|
||||
"modelURL": "http://hifi-content.s3.amazonaws.com/alexia/LoadingScreens/floor.fbx",
|
||||
"modelURL": "https://cdn-1.vircadia.com/eu-c-1/vircadia-content/alexia/LoadingScreens/floor.fbx",
|
||||
"name": "floorModel",
|
||||
"owningAvatarID": "{00000000-0000-0000-0000-000000000000}",
|
||||
"position": {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -253,6 +253,7 @@
|
|||
#include <DesktopPreviewProvider.h>
|
||||
|
||||
#include "AboutUtil.h"
|
||||
#include "ExternalResource.h"
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <VersionHelpers.h>
|
||||
|
@ -3515,6 +3516,7 @@ void Application::onDesktopRootContextCreated(QQmlContext* surfaceContext) {
|
|||
surfaceContext->setContextProperty("About", AboutUtil::getInstance());
|
||||
surfaceContext->setContextProperty("HiFiAbout", AboutUtil::getInstance()); // Deprecated
|
||||
surfaceContext->setContextProperty("ResourceRequestObserver", DependencyManager::get<ResourceRequestObserver>().data());
|
||||
surfaceContext->setContextProperty("ExternalResource", ExternalResource::getInstance());
|
||||
|
||||
if (auto steamClient = PluginManager::getInstance()->getSteamClientPlugin()) {
|
||||
surfaceContext->setContextProperty("Steam", new SteamScriptingInterface(engine, steamClient.get()));
|
||||
|
@ -3629,6 +3631,8 @@ void Application::setupQmlSurface(QQmlContext* surfaceContext, bool setAdditiona
|
|||
surfaceContext->setContextProperty("WalletScriptingInterface", DependencyManager::get<WalletScriptingInterface>().data());
|
||||
surfaceContext->setContextProperty("ResourceRequestObserver", DependencyManager::get<ResourceRequestObserver>().data());
|
||||
surfaceContext->setContextProperty("PlatformInfo", PlatformInfoScriptingInterface::getInstance());
|
||||
surfaceContext->setContextProperty("ExternalResource", ExternalResource::getInstance());
|
||||
|
||||
// This `module` context property is blank for the QML scripting interface so that we don't get log errors when importing
|
||||
// certain JS files from both scripts (in the JS context) and QML (in the QML context).
|
||||
surfaceContext->setContextProperty("module", "");
|
||||
|
@ -5539,6 +5543,19 @@ void Application::loadSettings() {
|
|||
}
|
||||
|
||||
getMyAvatar()->loadData();
|
||||
|
||||
auto bucketEnum = QMetaEnum::fromType<ExternalResource::Bucket>();
|
||||
auto externalResource = ExternalResource::getInstance();
|
||||
|
||||
for (int i = 0; i < bucketEnum.keyCount(); i++) {
|
||||
const char* keyName = bucketEnum.key(i);
|
||||
QString setting("ExternalResource/");
|
||||
setting += keyName;
|
||||
auto bucket = static_cast<ExternalResource::Bucket>(bucketEnum.keyToValue(keyName));
|
||||
Setting::Handle<QString> url(setting, externalResource->getBase(bucket));
|
||||
externalResource->setBase(bucket, url.get());
|
||||
}
|
||||
|
||||
_settingsLoaded = true;
|
||||
}
|
||||
|
||||
|
@ -5555,6 +5572,22 @@ void Application::saveSettings() const {
|
|||
Menu::getInstance()->saveSettings();
|
||||
getMyAvatar()->saveData();
|
||||
PluginManager::getInstance()->saveSettings();
|
||||
|
||||
// Don't save external resource paths until such time as there's UI to select or set alternatives. Otherwise new default
|
||||
// values won't be used unless Interface.json entries are manually remove or Interface.json is deleted.
|
||||
/*
|
||||
auto bucketEnum = QMetaEnum::fromType<ExternalResource::Bucket>();
|
||||
auto externalResource = ExternalResource::getInstance();
|
||||
|
||||
for (int i = 0; i < bucketEnum.keyCount(); i++) {
|
||||
const char* keyName = bucketEnum.key(i);
|
||||
QString setting("ExternalResource/");
|
||||
setting += keyName;
|
||||
auto bucket = static_cast<ExternalResource::Bucket>(bucketEnum.keyToValue(keyName));
|
||||
Setting::Handle<QString> url(setting, externalResource->getBase(bucket));
|
||||
url.set(externalResource->getBase(bucket));
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
bool Application::importEntities(const QString& urlOrFilename, const bool isObservable, const qint64 callerId) {
|
||||
|
@ -7669,7 +7702,7 @@ bool Application::askToLoadScript(const QString& scriptFilenameOrURL) {
|
|||
|
||||
QUrl scriptURL { scriptFilenameOrURL };
|
||||
|
||||
if (scriptURL.host().endsWith(NetworkingConstants::MARKETPLACE_CDN_HOSTNAME)) {
|
||||
if (scriptURL.host().endsWith(NetworkingConstants::HF_MARKETPLACE_CDN_HOSTNAME)) {
|
||||
int startIndex = shortName.lastIndexOf('/') + 1;
|
||||
int endIndex = shortName.lastIndexOf('?');
|
||||
shortName = shortName.mid(startIndex, endIndex - startIndex);
|
||||
|
@ -7792,7 +7825,7 @@ bool Application::askToReplaceDomainContent(const QString& url) {
|
|||
const int MAX_CHARACTERS_PER_LINE = 90;
|
||||
if (DependencyManager::get<NodeList>()->getThisNodeCanReplaceContent()) {
|
||||
QUrl originURL { url };
|
||||
if (originURL.host().endsWith(NetworkingConstants::MARKETPLACE_CDN_HOSTNAME)) {
|
||||
if (originURL.host().endsWith(NetworkingConstants::HF_MARKETPLACE_CDN_HOSTNAME)) {
|
||||
// Create a confirmation dialog when this call is made
|
||||
static const QString infoText = simpleWordWrap("Your domain's content will be replaced with a new content set. "
|
||||
"If you want to save what you have now, create a backup before proceeding. For more information about backing up "
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
//
|
||||
// Created by Triplelexx on 23/03/17.
|
||||
// Copyright 2017 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
|
||||
|
@ -282,12 +283,14 @@ QVariantMap AvatarBookmarks::getAvatarDataToBookmark() {
|
|||
auto myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
|
||||
|
||||
const QString& avatarUrl = myAvatar->getSkeletonModelURL().toString();
|
||||
const QString& avatarIcon = QString("");
|
||||
const QVariant& avatarScale = myAvatar->getAvatarScale();
|
||||
|
||||
// If Avatar attachments ever change, this is where to update them, when saving remember to also append to AVATAR_BOOKMARK_VERSION
|
||||
QVariantMap bookmark;
|
||||
bookmark.insert(ENTRY_VERSION, AVATAR_BOOKMARK_VERSION);
|
||||
bookmark.insert(ENTRY_AVATAR_URL, avatarUrl);
|
||||
bookmark.insert(ENTRY_AVATAR_ICON, avatarIcon);
|
||||
bookmark.insert(ENTRY_AVATAR_SCALE, avatarScale);
|
||||
|
||||
QVariantList wearableEntities;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
//
|
||||
// Created by Triplelexx on 23/03/17.
|
||||
// Copyright 2017 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
|
||||
|
@ -148,6 +149,7 @@ protected slots:
|
|||
private:
|
||||
const QString AVATARBOOKMARKS_FILENAME = "avatarbookmarks.json";
|
||||
const QString ENTRY_AVATAR_URL = "avatarUrl";
|
||||
const QString ENTRY_AVATAR_ICON = "avatarIcon";
|
||||
const QString ENTRY_AVATAR_ATTACHMENTS = "attachments";
|
||||
const QString ENTRY_AVATAR_ENTITIES = "avatarEntites";
|
||||
const QString ENTRY_AVATAR_SCALE = "avatarScale";
|
||||
|
|
|
@ -25,28 +25,29 @@
|
|||
#include <scripting/HMDScriptingInterface.h>
|
||||
#include <AccountManager.h>
|
||||
#include <AddressManager.h>
|
||||
#include <AnimDebugDraw.h>
|
||||
#include <AnimClip.h>
|
||||
#include <AnimInverseKinematics.h>
|
||||
#include <AudioClient.h>
|
||||
#include <ClientTraitsHandler.h>
|
||||
#include <recording/Clip.h>
|
||||
#include <recording/Deck.h>
|
||||
#include <display-plugins/DisplayPlugin.h>
|
||||
#include <recording/Frame.h>
|
||||
#include <FSTReader.h>
|
||||
#include <GeometryUtil.h>
|
||||
#include <GLMHelpers.h>
|
||||
#include <NodeList.h>
|
||||
#include <NetworkingConstants.h>
|
||||
#include <udt/PacketHeaders.h>
|
||||
#include <PathUtils.h>
|
||||
#include <PerfStat.h>
|
||||
#include <SharedUtil.h>
|
||||
#include <SoundCache.h>
|
||||
#include <ModelEntityItem.h>
|
||||
#include <GLMHelpers.h>
|
||||
#include <TextRenderer3D.h>
|
||||
#include <UserActivityLogger.h>
|
||||
#include <AnimDebugDraw.h>
|
||||
#include <AnimClip.h>
|
||||
#include <AnimInverseKinematics.h>
|
||||
#include <recording/Deck.h>
|
||||
#include <recording/Recorder.h>
|
||||
#include <recording/Clip.h>
|
||||
#include <recording/Frame.h>
|
||||
#include <RecordingScriptingInterface.h>
|
||||
#include <RenderableModelEntityItem.h>
|
||||
#include <VariantMapToScriptValue.h>
|
||||
|
@ -82,7 +83,7 @@ const int SCRIPTED_MOTOR_AVATAR_FRAME = 1;
|
|||
const int SCRIPTED_MOTOR_WORLD_FRAME = 2;
|
||||
const int SCRIPTED_MOTOR_SIMPLE_MODE = 0;
|
||||
const int SCRIPTED_MOTOR_DYNAMIC_MODE = 1;
|
||||
const QString& DEFAULT_AVATAR_COLLISION_SOUND_URL = "https://hifi-public.s3.amazonaws.com/sounds/Collisions-otherorganic/Body_Hits_Impact.wav";
|
||||
const QString& DEFAULT_AVATAR_COLLISION_SOUND_URL = NetworkingConstants::HF_PUBLIC_CDN_URL + "sounds/Collisions-otherorganic/Body_Hits_Impact.wav";
|
||||
|
||||
const float MyAvatar::ZOOM_MIN = 0.5f;
|
||||
const float MyAvatar::ZOOM_MAX = 25.0f;
|
||||
|
|
|
@ -18,11 +18,13 @@
|
|||
#include <AccountManager.h>
|
||||
#include <AddressManager.h>
|
||||
#include <DependencyManager.h>
|
||||
#include <NetworkingConstants.h>
|
||||
#include <NodeList.h>
|
||||
#include <UUID.h>
|
||||
|
||||
#include "EntityScriptingInterface.h"
|
||||
#include "ScreenshareScriptingInterface.h"
|
||||
#include "ExternalResource.h"
|
||||
|
||||
static const int SCREENSHARE_INFO_REQUEST_RETRY_TIMEOUT_MS = 300;
|
||||
ScreenshareScriptingInterface::ScreenshareScriptingInterface() {
|
||||
|
@ -128,8 +130,9 @@ static const uint8_t LOCAL_SCREENSHARE_WEB_ENTITY_FPS = 30;
|
|||
// The `z` value here is dynamic.
|
||||
static const glm::vec3 LOCAL_SCREENSHARE_WEB_ENTITY_LOCAL_POSITION(0.0128f, -0.0918f, 0.0f);
|
||||
static const glm::vec3 LOCAL_SCREENSHARE_WEB_ENTITY_DIMENSIONS(3.6790f, 2.0990f, 0.0100f);
|
||||
static const QString LOCAL_SCREENSHARE_WEB_ENTITY_URL =
|
||||
"https://content.highfidelity.com/Experiences/Releases/usefulUtilities/smartBoard/screenshareViewer/screenshareClient.html";
|
||||
static const ExternalResource::Bucket LOCAL_SCREENSHARE_WEB_ENTITY_BUCKET = ExternalResource::Bucket::HF_Content;
|
||||
static const QString LOCAL_SCREENSHARE_WEB_ENTITY_PATH =
|
||||
"Experiences/Releases/usefulUtilities/smartBoard/screenshareViewer/screenshareClient.html";
|
||||
static const QString LOCAL_SCREENSHARE_WEB_ENTITY_HOST_TYPE = "local";
|
||||
void ScreenshareScriptingInterface::startScreenshare(const QUuid& screenshareZoneID,
|
||||
const QUuid& smartboardEntityID,
|
||||
|
@ -281,6 +284,8 @@ void ScreenshareScriptingInterface::handleSuccessfulScreenshareInfoGet(QNetworkR
|
|||
glm::vec3 localPosition(LOCAL_SCREENSHARE_WEB_ENTITY_LOCAL_POSITION);
|
||||
localPosition.z = _localWebEntityZOffset;
|
||||
localScreenshareWebEntityProps.setLocalPosition(localPosition);
|
||||
auto LOCAL_SCREENSHARE_WEB_ENTITY_URL = ExternalResource::getInstance()->getUrl(LOCAL_SCREENSHARE_WEB_ENTITY_BUCKET,
|
||||
LOCAL_SCREENSHARE_WEB_ENTITY_PATH);
|
||||
localScreenshareWebEntityProps.setSourceUrl(LOCAL_SCREENSHARE_WEB_ENTITY_URL);
|
||||
localScreenshareWebEntityProps.setParentID(_smartboardEntityID);
|
||||
localScreenshareWebEntityProps.setDimensions(LOCAL_SCREENSHARE_WEB_ENTITY_DIMENSIONS);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <Trace.h>
|
||||
|
||||
#include "Application.h"
|
||||
#include "NetworkingConstants.h"
|
||||
|
||||
Q_LOGGING_CATEGORY(trace_test, "trace.test")
|
||||
|
||||
|
@ -66,8 +67,8 @@ bool TestScriptingInterface::loadTestScene(QString scene) {
|
|||
return result;
|
||||
}
|
||||
|
||||
static const QString TEST_ROOT = "https://raw.githubusercontent.com/highfidelity/hifi_tests/master/";
|
||||
static const QString TEST_BINARY_ROOT = "https://hifi-public.s3.amazonaws.com/test_scene_data/";
|
||||
static const QString TEST_ROOT = "https://raw.githubusercontent.com/hifi-archive/hifi_tests/master/";
|
||||
static const QString TEST_BINARY_ROOT = NetworkingConstants::HF_CONTENT_CDN_URL + "test_scene_data/";
|
||||
static const QString TEST_SCRIPTS_ROOT = TEST_ROOT + "scripts/";
|
||||
static const QString TEST_SCENES_ROOT = TEST_ROOT + "scenes/";
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
const char* MODEL_TYPE_NAMES[] = { "entities", "heads", "skeletons", "skeletons", "attachments" };
|
||||
|
||||
static const QString S3_URL = "http://s3.amazonaws.com/hifi-public";
|
||||
static const QString PUBLIC_URL = "http://public.highfidelity.io";
|
||||
static const QString S3_URL = NetworkingConstants::HF_PUBLIC_CDN_URL;
|
||||
static const QString PUBLIC_URL = "http://public.highfidelity.io"; // Needs to change to Vircadia...?
|
||||
static const QString MODELS_LOCATION = "models/";
|
||||
|
||||
static const QString PREFIX_PARAMETER_NAME = "prefix";
|
||||
|
|
|
@ -455,7 +455,7 @@ public slots:
|
|||
* @example <caption>Create an image overlay and report whether its image is loaded after 1s.</caption>
|
||||
* var overlay = Overlays.addOverlay("image", {
|
||||
* bounds: { x: 100, y: 100, width: 200, height: 200 },
|
||||
* imageURL: "https://content.highfidelity.com/DomainContent/production/Particles/wispy-smoke.png"
|
||||
* imageURL: "https://content.vircadia.com/eu-c-1/vircadia-assets/interface/default/default_particle.png"
|
||||
* });
|
||||
* Script.setTimeout(function () {
|
||||
* var isLoaded = Overlays.isLoaded(overlay);
|
||||
|
|
|
@ -1161,7 +1161,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
* speedSpread: 0.01,
|
||||
* emitAcceleration: { x: 0, y: 0.02, z: 0 },
|
||||
* polarFinish: Math.PI,
|
||||
* textures: "https://content.highfidelity.com/DomainContent/production/Particles/wispy-smoke.png",
|
||||
* textures: "https://content.vircadia.com/eu-c-1/vircadia-assets/interface/default/default_particle.png",
|
||||
* particleRadius: 0.1,
|
||||
* color: { red: 0, green: 255, blue: 0 },
|
||||
* alphaFinish: 0,
|
||||
|
|
112
libraries/networking/src/ExternalResource.cpp
Normal file
112
libraries/networking/src/ExternalResource.cpp
Normal file
|
@ -0,0 +1,112 @@
|
|||
//
|
||||
// ExternalResource.h
|
||||
//
|
||||
// Created by Dale Glass on 6 Sep 2020
|
||||
// Copyright 2020 Vircadia contributors.
|
||||
//
|
||||
// Flexible management for external resources (e.g., on S3).
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
#include "ExternalResource.h"
|
||||
#include <QDebug>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
Q_LOGGING_CATEGORY(external_resource, "vircadia.networking.external_resource")
|
||||
|
||||
ExternalResource::ExternalResource(QObject* parent) : QObject(parent) {
|
||||
}
|
||||
|
||||
ExternalResource* ExternalResource::getInstance() {
|
||||
static ExternalResource instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
QUrl ExternalResource::getQUrl(Bucket bucket, QString path) {
|
||||
qCDebug(external_resource) << "Requested URL for bucket " << bucket << ", path " << path;
|
||||
|
||||
// Whitespace could interfere with the next step
|
||||
path = path.trimmed();
|
||||
|
||||
// Remove all initial slashes. This is because if QUrl is fed //foo/bar,
|
||||
// it will treat //foo as a domain name. This also ensures the URL is always treated as
|
||||
// relative to any path specified in the bucket.
|
||||
while (path.startsWith('/')) {
|
||||
path = path.remove(0, 1);
|
||||
}
|
||||
|
||||
// De-duplicate URL separators, since S3 doesn't actually have subdirectories, and treats a '/' as a part
|
||||
// of the filename. This means that "/dir/file.txt" and "/dir//file.txt" are not equivalent on S3.
|
||||
//
|
||||
// We feed it through a QUrl to ensure we're only working on the path component.
|
||||
QUrl pathQUrl(path);
|
||||
|
||||
QString tempPath = pathQUrl.path();
|
||||
while (tempPath.contains("//")) {
|
||||
tempPath = tempPath.replace("//", "/");
|
||||
}
|
||||
pathQUrl.setPath(tempPath);
|
||||
|
||||
if (!pathQUrl.isValid()) {
|
||||
qCCritical(external_resource) << "External resource " << pathQUrl << " was requested from bucket " << bucket
|
||||
<< " with an invalid path. Error: " << pathQUrl.errorString();
|
||||
return QUrl();
|
||||
}
|
||||
|
||||
if (!pathQUrl.isRelative()) {
|
||||
qCWarning(external_resource) << "External resource " << pathQUrl << " was requested from bucket " << bucket
|
||||
<< " without using a relative path, returning as-is.";
|
||||
return pathQUrl;
|
||||
}
|
||||
|
||||
QUrl base;
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(_bucketMutex);
|
||||
|
||||
if (!_bucketBases.contains(bucket)) {
|
||||
qCCritical(external_resource) << "External resource " << path << " was requested from unrecognized bucket "
|
||||
<< bucket;
|
||||
return QUrl();
|
||||
}
|
||||
|
||||
base = _bucketBases[bucket];
|
||||
}
|
||||
|
||||
QUrl merged = base.resolved(pathQUrl).adjusted(QUrl::NormalizePathSegments);
|
||||
|
||||
if (merged.isValid()) {
|
||||
qCDebug(external_resource) << "External resource resolved to " << merged;
|
||||
} else {
|
||||
qCCritical(external_resource) << "External resource resolved to invalid URL " << merged << "; Error "
|
||||
<< merged.errorString() << "; base = " << base << "; path = " << path
|
||||
<< "; filtered path = " << pathQUrl;
|
||||
}
|
||||
|
||||
return merged;
|
||||
}
|
||||
|
||||
QString ExternalResource::getBase(Bucket bucket) {
|
||||
std::lock_guard<std::mutex> guard(_bucketMutex);
|
||||
return _bucketBases.value(bucket).toString();
|
||||
};
|
||||
|
||||
bool ExternalResource::setBase(Bucket bucket, const QString& url) {
|
||||
QUrl newURL(url);
|
||||
|
||||
if (!newURL.isValid() || newURL.isRelative()) {
|
||||
qCCritical(external_resource) << "Attempted to set bucket " << bucket << " to invalid URL " << url;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_bucketBases.contains(bucket)) {
|
||||
qCritical(external_resource) << "Invalid bucket " << bucket;
|
||||
return false;
|
||||
}
|
||||
|
||||
qCDebug(external_resource) << "Setting base URL for " << bucket << " to " << newURL;
|
||||
|
||||
std::lock_guard<std::mutex> guard(_bucketMutex);
|
||||
_bucketBases[bucket] = newURL;
|
||||
return true;
|
||||
}
|
140
libraries/networking/src/ExternalResource.h
Normal file
140
libraries/networking/src/ExternalResource.h
Normal file
|
@ -0,0 +1,140 @@
|
|||
//
|
||||
// ExternalResource.h
|
||||
//
|
||||
// Created by Dale Glass on 6 Sep 2020
|
||||
// Copyright 2020 Vircadia contributors.
|
||||
//
|
||||
// Flexible management for external resources (e.g., on S3).
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
#ifndef vircadia_ExternalResource_h
|
||||
#define vircadia_ExternalResource_h
|
||||
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
#include <QMap>
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include "NetworkingConstants.h"
|
||||
|
||||
/**
|
||||
* Flexible management for external resources
|
||||
*
|
||||
* With the death of the original High Fidelity and the transition of the project to a community-managed
|
||||
* one, it became necessary to deal with that the various assets that used to be located under the
|
||||
* highfidelity.com domain, and there won't be a fixed place for them afterwards. Data
|
||||
* hosted by community members may not remain forever, reorganization may be necessary, people may want
|
||||
* to run mirrors, and some might want to run without external Internet access at all.
|
||||
*
|
||||
* This class makes it possible to deal with this in a more flexible manner: rather than hard-coding URLs
|
||||
* all over the codebase, now it's possible to easily change where all those things are downloaded from.
|
||||
*
|
||||
* The term 'bucket' refers to the buckets used on Amazon S3, but there's no requirement for S3 or anything
|
||||
* similar to be used. The term should just be taken as referring to the name of a data set.
|
||||
*/
|
||||
class ExternalResource : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static ExternalResource* getInstance();
|
||||
~ExternalResource(){};
|
||||
|
||||
/**jsdoc
|
||||
* <p>An external resource bucket.</p>
|
||||
* <p>The original High Fidelity used "Public", "Content", and "MPAssets" Amazon S3 buckets. The intention is that the
|
||||
* community-run versions of these will keep the original data and structure, and any new additions will be made to
|
||||
* Vircadia's "Assets" bucket. This should ease the transition from High Fidelity and ensure a clean separation.</p>
|
||||
* @typedef {object} Script.ResourceBuckets
|
||||
* @property {Script.ResourceBucket} Assets - Vircadia assets.
|
||||
* @property {Script.ResourceBucket} HF_Public - Assets that used to be in High Fidelity's <code>hifi-public</code> Amazon
|
||||
* S3 bucket.
|
||||
* @property {Script.ResourceBucket} HF_Content - Assets that used to be in High Fidelity's <code>hifi-content</code> Amazon
|
||||
* S3 bucket.
|
||||
* @property {Script.ResourceBucket} HF_Marketplace - Assets that used to be in the High Fidelity's <code>mpassets</code>
|
||||
* Amazon S3 bucket. (High Fidelity marketplace.)
|
||||
*/
|
||||
/**jsdoc
|
||||
* <p>An external resource bucket.</p>
|
||||
* <table>
|
||||
* <thead>
|
||||
* <tr><th>Value</th><th>Name</th><th>Description</th>
|
||||
* </thead>
|
||||
* <tbody>
|
||||
* <tr><td><code>0</code></td><td>HF_Public</td><td>Assets that used to be in High Fidelity's <code>hifi-public</code>
|
||||
* Amazon S3 bucket.</td></tr>
|
||||
* <tr><td><code>1</code></td><td>HF_Content</td><td>Assets that used to be in High Fidelity's <code>hifi-content</code>
|
||||
* Amazon S3 bucket.</td></tr>
|
||||
* <tr><td><code>2</code></td><td>HF_Marketplace</td><td>Assets that used to be in the High Fidelity's
|
||||
* <code>mpassets</code> Amazon S3 bucket. (High Fidelity marketplace.)</td></tr>
|
||||
* <tr><td><code>3</code></td><td>Assets</td><td>Vircadia assets.</td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
* @typedef {number} Script.ResourceBucket
|
||||
*/
|
||||
enum class Bucket {
|
||||
HF_Public,
|
||||
HF_Content,
|
||||
HF_Marketplace,
|
||||
Assets
|
||||
};
|
||||
Q_ENUM(Bucket)
|
||||
|
||||
/**
|
||||
* Returns the location of a resource as a QUrl
|
||||
*
|
||||
* Returns the location of the resource \p path in bucket \p bucket
|
||||
*
|
||||
* @note The resulting path will be sanitized by condensing multiple instances of '/' to one.
|
||||
* This is done for easier usage with Amazon S3 and compatible systems.
|
||||
*
|
||||
* @par It will also convert all paths into relative ones respect to the bucket.
|
||||
*
|
||||
* @warning This function should only be given paths with a domain name. If given a complete path,
|
||||
* it will emit a warning into the log and return the unmodified path it was given.
|
||||
*
|
||||
* @param bucket The bucket in which the resource is found
|
||||
* @param relative_path The path of the resource within the bucket
|
||||
* @returns The resulting URL as a QUrl
|
||||
*/
|
||||
QUrl getQUrl(Bucket bucket, QString path);
|
||||
|
||||
QString getUrl(Bucket bucket, QString path) {
|
||||
return ExternalResource::getQUrl(bucket, path).toString();
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the base path for a bucket
|
||||
*
|
||||
* @param bucket Bucket whose path to return
|
||||
*/
|
||||
QString getBase(Bucket bucket);
|
||||
|
||||
/**
|
||||
* Sets the base path for a bucket
|
||||
*
|
||||
* The \p url parameter will be validated, and the action will not be performed
|
||||
* if the URL isn't a valid one, or if the bucket wasn't valid.
|
||||
*
|
||||
* @param bucket Bucket whose path to set
|
||||
* @param url Base URL for the bucket.
|
||||
* @returns Whether the base was set.
|
||||
*/
|
||||
bool setBase(Bucket bucket, const QString& url);
|
||||
|
||||
private:
|
||||
ExternalResource(QObject* parent = nullptr);
|
||||
|
||||
std::mutex _bucketMutex;
|
||||
|
||||
QMap<Bucket, QUrl> _bucketBases {
|
||||
{ Bucket::HF_Public, QUrl(NetworkingConstants::HF_PUBLIC_CDN_URL) },
|
||||
{ Bucket::HF_Content, QUrl(NetworkingConstants::HF_CONTENT_CDN_URL) },
|
||||
{ Bucket::HF_Marketplace, QUrl(NetworkingConstants::HF_MPASSETS_CDN_URL) },
|
||||
{ Bucket::Assets, QUrl(NetworkingConstants::VIRCADIA_CONTENT_CDN_URL) }
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
|
@ -4,6 +4,7 @@
|
|||
//
|
||||
// Created by Stephen Birarda on 2/15/13.
|
||||
// Copyright 2013 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
|
||||
|
@ -37,6 +38,7 @@
|
|||
#include <SharedUtil.h>
|
||||
|
||||
#include "DomainHandler.h"
|
||||
#include "NetworkingConstants.h"
|
||||
#include "Node.h"
|
||||
#include "NLPacket.h"
|
||||
#include "NLPacketList.h"
|
||||
|
@ -55,8 +57,8 @@ static const size_t DEFAULT_MAX_CONNECTION_RATE { std::numeric_limits<size_t>::m
|
|||
|
||||
const char DEFAULT_ASSIGNMENT_SERVER_HOSTNAME[] = "localhost";
|
||||
|
||||
const char STUN_SERVER_HOSTNAME[] = "stun.highfidelity.io";
|
||||
const unsigned short STUN_SERVER_PORT = 3478;
|
||||
const char STUN_SERVER_HOSTNAME[] = "stun1.l.google.com";
|
||||
const unsigned short STUN_SERVER_PORT = NetworkingConstants::STUN_SERVER_DEFAULT_PORT;
|
||||
|
||||
const QString DOMAIN_SERVER_LOCAL_PORT_SMEM_KEY = "domain-server.local-port";
|
||||
const QString DOMAIN_SERVER_LOCAL_HTTP_PORT_SMEM_KEY = "domain-server.local-http-port";
|
||||
|
|
|
@ -31,8 +31,8 @@ namespace NetworkingConstants {
|
|||
const QUrl METAVERSE_SERVER_URL_STAGING { "https://metaverse.vircadia.com/live" };
|
||||
|
||||
// Web Engine requests to this parent domain have an account authorization header added
|
||||
const QString AUTH_HOSTNAME_BASE = "highfidelity.com";
|
||||
const QStringList IS_AUTHABLE_HOSTNAME = { "highfidelity.com", "highfidelity.io" };
|
||||
const QString AUTH_HOSTNAME_BASE = "vircadia.com";
|
||||
const QStringList IS_AUTHABLE_HOSTNAME = { "vircadia.com", "vircadia.io" };
|
||||
|
||||
// Use a custom User-Agent to avoid ModSecurity filtering, e.g. by hosting providers.
|
||||
const QByteArray VIRCADIA_USER_AGENT = "Mozilla/5.0 (VircadiaInterface)";
|
||||
|
@ -44,14 +44,24 @@ namespace NetworkingConstants {
|
|||
const QUrl BUILDS_XML_URL("https://highfidelity.com/builds.xml");
|
||||
const QUrl MASTER_BUILDS_XML_URL("https://highfidelity.com/dev-builds.xml");
|
||||
|
||||
// For now we only have one ice server.
|
||||
// CDN URLs
|
||||
const QString HF_CONTENT_CDN_URL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-content/";
|
||||
const QString HF_MPASSETS_CDN_URL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-mpassets/";
|
||||
const QString HF_PUBLIC_CDN_URL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-public/";
|
||||
const QString HF_MARKETPLACE_CDN_HOSTNAME = "mpassets.highfidelity.com";
|
||||
const QString VIRCADIA_CONTENT_CDN_URL = "https://cdn-1.vircadia.com/us-e-1/";
|
||||
|
||||
#if USE_STABLE_GLOBAL_SERVICES
|
||||
const QString ICE_SERVER_DEFAULT_HOSTNAME = "ice.vircadia.com";
|
||||
|
||||
const QString STUN_SERVER_DEFAULT_HOSTNAME = "stun1.l.google.com";
|
||||
const unsigned short STUN_SERVER_DEFAULT_PORT = 19302;
|
||||
#else
|
||||
const QString ICE_SERVER_DEFAULT_HOSTNAME = "ice.vircadia.com";
|
||||
#endif
|
||||
|
||||
const QString MARKETPLACE_CDN_HOSTNAME = "mpassets.highfidelity.com";
|
||||
const QString STUN_SERVER_DEFAULT_HOSTNAME = "stun2.l.google.com";
|
||||
const unsigned short STUN_SERVER_DEFAULT_PORT = 19302;
|
||||
#endif
|
||||
|
||||
const QUrl HELP_DOCS_URL { "https://docs.vircadia.dev" };
|
||||
const QUrl HELP_FORUM_URL { "https://forums.vircadia.dev" };
|
||||
|
|
|
@ -358,7 +358,7 @@ public:
|
|||
* // Replace AnimationCache with MaterialCache, ModelCache, SoundCache, or TextureCache as appropriate.
|
||||
* // TextureCache has its own version of this function.
|
||||
*
|
||||
* var resourceURL = "https://s3-us-west-1.amazonaws.com/hifi-content/clement/production/animations/sitting_idle.fbx";
|
||||
* var resourceURL = "https://cdn-1.vircadia.com/eu-c-1/vircadia-public/clement/production/animations/sitting_idle.fbx";
|
||||
* var resourceObject = AnimationCache.prefetch(resourceURL);
|
||||
*
|
||||
* function checkIfResourceLoaded(state) {
|
||||
|
|
|
@ -169,7 +169,7 @@ protected:
|
|||
* audio file.
|
||||
* @returns {AudioInjector} The audio injector that plays the audio file.
|
||||
* @example <caption>Play a sound.</caption>
|
||||
* var sound = SoundCache.getSound("http://hifi-content.s3.amazonaws.com/ken/samples/forest_ambiX.wav");
|
||||
* var sound = SoundCache.getSound("https://cdn-1.vircadia.com/us-c-1/ken/samples/forest_ambiX.wav");
|
||||
*
|
||||
* function playSound() {
|
||||
* var injectorOptions = {
|
||||
|
|
|
@ -108,6 +108,8 @@ int functionSignatureMetaID = qRegisterMetaType<QScriptEngine::FunctionSignature
|
|||
|
||||
int scriptEnginePointerMetaID = qRegisterMetaType<ScriptEnginePointer>();
|
||||
|
||||
Q_DECLARE_METATYPE(ExternalResource::Bucket);
|
||||
|
||||
static QScriptValue debugPrint(QScriptContext* context, QScriptEngine* engine) {
|
||||
QString message = "";
|
||||
for (int i = 0; i < context->argumentCount(); i++) {
|
||||
|
@ -663,6 +665,14 @@ void avatarDataFromScriptValue(const QScriptValue& object, ScriptAvatarData*& ou
|
|||
out = nullptr;
|
||||
}
|
||||
|
||||
QScriptValue externalResourceBucketToScriptValue(QScriptEngine* engine, ExternalResource::Bucket const& in) {
|
||||
return QScriptValue((int)in);
|
||||
}
|
||||
|
||||
void externalResourceBucketFromScriptValue(const QScriptValue& object, ExternalResource::Bucket& out) {
|
||||
out = static_cast<ExternalResource::Bucket>(object.toInt32());
|
||||
}
|
||||
|
||||
void ScriptEngine::resetModuleCache(bool deleteScriptCache) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
executeOnScriptThread([=]() { resetModuleCache(deleteScriptCache); });
|
||||
|
@ -770,6 +780,9 @@ void ScriptEngine::init() {
|
|||
resetModuleCache();
|
||||
}
|
||||
|
||||
qScriptRegisterMetaType(this, externalResourceBucketToScriptValue, externalResourceBucketFromScriptValue);
|
||||
registerEnum("Script.ExternalPaths", QMetaEnum::fromType<ExternalResource::Bucket>());
|
||||
|
||||
registerGlobalObject("Audio", DependencyManager::get<AudioScriptingInterface>().data());
|
||||
|
||||
registerGlobalObject("Midi", DependencyManager::get<Midi>().data());
|
||||
|
@ -827,6 +840,19 @@ void ScriptEngine::init() {
|
|||
}));
|
||||
}
|
||||
|
||||
void ScriptEngine::registerEnum(const QString& enumName, QMetaEnum newEnum) {
|
||||
if (!newEnum.isValid()) {
|
||||
qCCritical(scriptengine) << "registerEnum called on invalid enum with name " << enumName;
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < newEnum.keyCount(); i++) {
|
||||
const char* keyName = newEnum.key(i);
|
||||
QString fullName = enumName + "." + keyName;
|
||||
registerValue(fullName, newEnum.keyToValue(keyName));
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptEngine::registerValue(const QString& valueName, QScriptValue value) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
#ifdef THREAD_DEBUGGING
|
||||
|
@ -2856,3 +2882,7 @@ void ScriptEngine::callEntityScriptMethod(const EntityItemID& entityID, const QS
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString ScriptEngine::getExternalPath(ExternalResource::Bucket bucket, const QString& path) {
|
||||
return ExternalResource::getInstance()->getUrl(bucket, path);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
#include <QtCore/QSet>
|
||||
#include <QtCore/QWaitCondition>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QMap>
|
||||
#include <QMetaEnum>
|
||||
|
||||
#include <QtScript/QScriptEngine>
|
||||
|
||||
|
@ -37,6 +39,7 @@
|
|||
#include "AssetScriptingInterface.h"
|
||||
#include "AudioScriptingInterface.h"
|
||||
#include "BaseScriptEngine.h"
|
||||
#include "ExternalResource.h"
|
||||
#include "Quat.h"
|
||||
#include "Mat4.h"
|
||||
#include "ScriptCache.h"
|
||||
|
@ -118,6 +121,7 @@ public:
|
|||
* <li><code>"agent"</code>: An assignment client script.</li>
|
||||
* </ul>
|
||||
* <em>Read-only.</em>
|
||||
* @property {Script.ResourceBuckets} ExternalPaths - External resource buckets.
|
||||
*/
|
||||
class ScriptEngine : public BaseScriptEngine, public EntitiesScriptEngineProvider {
|
||||
Q_OBJECT
|
||||
|
@ -230,6 +234,17 @@ public:
|
|||
Q_INVOKABLE void registerFunction(const QString& parent, const QString& name, QScriptEngine::FunctionSignature fun,
|
||||
int numArguments = -1);
|
||||
|
||||
/**jsdoc
|
||||
* @function Script.registerEnum
|
||||
* @param {string} name - Name.
|
||||
* @param {object} enum - Enum.
|
||||
* @deprecated This function is deprecated and will be removed.
|
||||
*/
|
||||
// WARNING: This function must be called after a registerGlobalObject that creates the namespace this enum is located in, or
|
||||
// the globalObject won't function. E.g., if you have a Foo object and a Foo.FooType enum, Foo must be registered first.
|
||||
/// registers a global enum
|
||||
Q_INVOKABLE void registerEnum(const QString& enumName, QMetaEnum newEnum);
|
||||
|
||||
/**jsdoc
|
||||
* @function Script.registerValue
|
||||
* @param {string} name - Name.
|
||||
|
@ -670,6 +685,23 @@ public:
|
|||
|
||||
void setScriptEngines(QSharedPointer<ScriptEngines>& scriptEngines) { _scriptEngines = scriptEngines; }
|
||||
|
||||
/**jsdoc
|
||||
* Gets the URL for an asset in an external resource bucket. (The location where the bucket is hosted may change over time
|
||||
* but this method will return the asset's current URL.)
|
||||
* @function Script.getExternalPath
|
||||
* @param {Script.ResourceBucket} bucket - The external resource bucket that the asset is in.
|
||||
* @param {string} path - The path within the external resource bucket where the asset is located.
|
||||
* <p>Normally, this should start with a path or filename to be appended to the bucket URL.
|
||||
* Alternatively, it can be a relative path starting with <code>./</code> or <code>../</code>, to navigate within the
|
||||
* resource bucket's URL.</p>
|
||||
* @Returns {string} The URL of an external asset.
|
||||
* @example <caption>Report the URL of a default particle.</caption>
|
||||
* print(Script.getExternalPath(Script.ExternalPaths.Assets, "Bazaar/Assets/Textures/Defaults/Interface/default_particle.png"));
|
||||
* @example <caption>Report the root directory where the Vircadia assets are located.</caption>
|
||||
* print(Script.getExternalPath(Script.ExternalPaths.Assets, "."));
|
||||
*/
|
||||
Q_INVOKABLE QString getExternalPath(ExternalResource::Bucket bucket, const QString& path);
|
||||
|
||||
public slots:
|
||||
|
||||
/**jsdoc
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Screen Sharing within High Fidelity
|
||||
This Screen Share app, built using Electron, allows for easy desktop screen sharing when used in conjuction with various scripts in the `hifi-content` repository.
|
||||
This Screen Share app, built using Electron, allows for easy desktop screen sharing when used in conjuction with various scripts in the `vircadia-content` repository.
|
||||
|
||||
# Screen Sharing Source Files
|
||||
## `packager.js`
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
// Set the following variables to the right value
|
||||
var NUM_AC = 3; // This is the number of AC. Their ID need to be unique and between 0 (included) and NUM_AC (excluded)
|
||||
var NAMES = new Array("Craig", "Clement", "Jeff"); // ACs names ordered by IDs (Default name is "ACx", x = ID + 1))
|
||||
|
@ -35,7 +33,7 @@ var LOAD = 6;
|
|||
|
||||
|
||||
var windowDimensions = Controller.getViewportDimensions();
|
||||
var TOOL_ICON_URL = HIFI_PUBLIC_BUCKET + "images/tools/";
|
||||
var TOOL_ICON_URL = Script.getExternalPath(Script.ExternalPaths.Assets, "images/tools/");
|
||||
var ALPHA_ON = 1.0;
|
||||
var ALPHA_OFF = 0.7;
|
||||
var COLOR_TOOL_BAR = { red: 0, green: 0, blue: 0 };
|
||||
|
|
|
@ -20,8 +20,7 @@
|
|||
//
|
||||
|
||||
//For procedural walk animation
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
Script.include(HIFI_PUBLIC_BUCKET + "scripts/acScripts/proceduralAnimationAPI.js");
|
||||
Script.include(Script.getExternalPath(Script.ExternalPaths.Assets, "scripts/acScripts/proceduralAnimationAPI.js");
|
||||
|
||||
var procAnimAPI = new ProcAnimAPI();
|
||||
|
||||
|
@ -121,9 +120,9 @@ var newBodyFilePrefix = "bot" + botNumber;
|
|||
|
||||
// set the face model fst using the bot number
|
||||
// there is no need to change the body model - we're using the default
|
||||
Avatar.faceModelURL = HIFI_PUBLIC_BUCKET + "meshes/" + newFaceFilePrefix + ".fst";
|
||||
Avatar.skeletonModelURL = HIFI_PUBLIC_BUCKET + "meshes/" + newBodyFilePrefix + "_a.fst";
|
||||
Avatar.billboardURL = HIFI_PUBLIC_BUCKET + "meshes/billboards/bot" + botNumber + ".png";
|
||||
Avatar.faceModelURL = Script.getExternalPath(Script.ExternalPaths.Assets, "meshes/" + newFaceFilePrefix + ".fst");
|
||||
Avatar.skeletonModelURL = Script.getExternalPath(Script.ExternalPaths.Assets, "meshes/" + newBodyFilePrefix + "_a.fst");
|
||||
Avatar.billboardURL = Script.getExternalPath(Script.ExternalPaths.Assets, "meshes/billboards/bot" + botNumber + ".png");
|
||||
|
||||
Agent.isAvatar = true;
|
||||
Agent.isListeningToAudioStream = true;
|
||||
|
@ -146,9 +145,9 @@ function loadSounds() {
|
|||
var footstep_filenames = ["FootstepW2Left-12db.wav", "FootstepW2Right-12db.wav", "FootstepW3Left-12db.wav", "FootstepW3Right-12db.wav",
|
||||
"FootstepW5Left-12db.wav", "FootstepW5Right-12db.wav"];
|
||||
|
||||
var SOUND_BASE_URL = HIFI_PUBLIC_BUCKET + "sounds/Cocktail+Party+Snippets/Raws/";
|
||||
var SOUND_BASE_URL = Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/Cocktail+Party+Snippets/Raws/");
|
||||
|
||||
var FOOTSTEP_BASE_URL = HIFI_PUBLIC_BUCKET + "sounds/Footsteps/";
|
||||
var FOOTSTEP_BASE_URL = Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/Footsteps/");
|
||||
|
||||
for (var i = 0; i < sound_filenames.length; i++) {
|
||||
sounds.push(SoundCache.getSound(SOUND_BASE_URL + sound_filenames[i]));
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
function getRandomFloat(min, max) {
|
||||
return Math.random() * (max - min) + min;
|
||||
}
|
||||
|
@ -44,9 +42,9 @@ newBodyFilePrefix = "bot" + botNumber;
|
|||
|
||||
// set the face model fst using the bot number
|
||||
// there is no need to change the body model - we're using the default
|
||||
Avatar.faceModelURL = HIFI_PUBLIC_BUCKET + "meshes/" + newFaceFilePrefix + ".fst";
|
||||
Avatar.skeletonModelURL = HIFI_PUBLIC_BUCKET + "meshes/" + newBodyFilePrefix + ".fst";
|
||||
Avatar.billboardURL = HIFI_PUBLIC_BUCKET + "meshes/billboards/bot" + botNumber + ".png";
|
||||
Avatar.faceModelURL = Script.getExternalPath(Script.ExternalPaths.Assets, "meshes/" + newFaceFilePrefix + ".fst");
|
||||
Avatar.skeletonModelURL = Script.getExternalPath(Script.ExternalPaths.Assets, "meshes/" + newBodyFilePrefix + ".fst");
|
||||
Avatar.billboardURL = Script.getExternalPath(Script.ExternalPaths.Assets, "meshes/billboards/bot" + botNumber + ".png");
|
||||
|
||||
Agent.isAvatar = true;
|
||||
Agent.isListeningToAudioStream = true;
|
||||
|
|
|
@ -10,15 +10,13 @@
|
|||
//
|
||||
Script.include("./AgentPoolController.js");
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var masterController = new MasterController();
|
||||
|
||||
var input_text = null;
|
||||
|
||||
// Script. DO NOT MODIFY BEYOND THIS LINE.
|
||||
//Script.include("../libraries/toolBars.js");
|
||||
Script.include(HIFI_PUBLIC_BUCKET + "scripts/libraries/toolBars.js");
|
||||
Script.include(Script.getExternalPath(Script.ExternalPaths.Assets, "scripts/libraries/toolBars.js"));
|
||||
// We want small icons
|
||||
Tool.IMAGE_HEIGHT /= 2;
|
||||
Tool.IMAGE_WIDTH /= 2;
|
||||
|
@ -29,7 +27,7 @@ var STOP = 3;
|
|||
var LOAD = 6;
|
||||
|
||||
var windowDimensions = Controller.getViewportDimensions();
|
||||
var TOOL_ICON_URL = HIFI_PUBLIC_BUCKET + "images/tools/";
|
||||
var TOOL_ICON_URL = Script.getExternalPath(Script.ExternalPaths.Assets, "images/tools/");
|
||||
var ALPHA_ON = 1.0;
|
||||
var ALPHA_OFF = 0.7;
|
||||
var COLOR_TOOL_BAR = { red: 0, green: 0, blue: 0 };
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
function getRandomFloat(min, max) {
|
||||
return Math.random() * (max - min) + min;
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
lightTimer = 0,
|
||||
lightTimeoutID = undefined,
|
||||
audioInjector = null;
|
||||
|
||||
var HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
var cannonSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "philip/cannonShot.wav");
|
||||
var explosionSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "philip/explosion.wav");
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
var cannonSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "philip/cannonShot.wav");
|
||||
var explosionSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "philip/explosion.wav");
|
||||
|
||||
var NO_SHOOT_COLOR = { red: 100, green: 100, blue: 100 };
|
||||
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var panelWall = false;
|
||||
var orbShell = false;
|
||||
|
@ -47,16 +48,16 @@ var panelsCenterShift = Vec3.subtract(panelsCenter, orbCenter);
|
|||
|
||||
var ORB_SHIFT = { x: 0, y: -1.4, z: -0.8 };
|
||||
|
||||
var LOBBY_PANEL_WALL_URL = HIFI_PUBLIC_BUCKET + "models/sets/Lobby/PanelWallForInterface.fbx";
|
||||
var LOBBY_BLANK_PANEL_TEXTURE_URL = HIFI_PUBLIC_BUCKET + "models/sets/Lobby/Texture.jpg";
|
||||
var LOBBY_SHELL_URL = HIFI_PUBLIC_BUCKET + "models/sets/Lobby/LobbyShellForInterface.fbx";
|
||||
var LOBBY_PANEL_WALL_URL = VIRCADIA_PUBLIC_CDN + "models/sets/Lobby/PanelWallForInterface.fbx";
|
||||
var LOBBY_BLANK_PANEL_TEXTURE_URL = VIRCADIA_PUBLIC_CDN + "models/sets/Lobby/Texture.jpg";
|
||||
var LOBBY_SHELL_URL = VIRCADIA_PUBLIC_CDN + "models/sets/Lobby/LobbyShellForInterface.fbx";
|
||||
|
||||
var droneSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Lobby/drone.stereo.raw")
|
||||
var droneSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Lobby/drone.stereo.raw")
|
||||
var currentDrone = null;
|
||||
|
||||
var latinSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Lobby/latin.stereo.raw")
|
||||
var latinSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Lobby/latin.stereo.raw")
|
||||
var latinInjector = null;
|
||||
var elevatorSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Lobby/elevator.stereo.raw")
|
||||
var elevatorSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Lobby/elevator.stereo.raw")
|
||||
var elevatorInjector = null;
|
||||
var currentMuzakInjector = null;
|
||||
var currentSound = null;
|
||||
|
|
|
@ -19,7 +19,8 @@ var floorTiles = [];
|
|||
var blocks = [];
|
||||
var blockSpawner;
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
|
||||
var floorPos = Vec3.sum(MyAvatar.position, {
|
||||
|
@ -61,7 +62,7 @@ var offButton = Overlays.addOverlay("image", {
|
|||
y: screenSize.y - (BUTTON_SIZE + PADDING),
|
||||
width: BUTTON_SIZE,
|
||||
height: BUTTON_SIZE,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/close.png",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/close.png",
|
||||
color: {
|
||||
red: 255,
|
||||
green: 255,
|
||||
|
@ -75,7 +76,7 @@ var deleteButton = Overlays.addOverlay("image", {
|
|||
y: screenSize.y - (BUTTON_SIZE + PADDING),
|
||||
width: BUTTON_SIZE,
|
||||
height: BUTTON_SIZE,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/delete.png",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/delete.png",
|
||||
color: {
|
||||
red: 255,
|
||||
green: 255,
|
||||
|
|
|
@ -16,11 +16,11 @@ Script.include([
|
|||
"libraries/overlayManager.js",
|
||||
]);
|
||||
|
||||
var BG_IMAGE_URL = HIFI_PUBLIC_BUCKET + "images/card-bg.svg";
|
||||
var CLOSE_IMAGE_URL = HIFI_PUBLIC_BUCKET + "images/tools/close.svg";
|
||||
var MIC_IMAGE_URL = HIFI_PUBLIC_BUCKET + "images/tools/mic-toggle.svg";
|
||||
var FACE_IMAGE_URL = HIFI_PUBLIC_BUCKET + "images/tools/face-toggle.svg";
|
||||
var ADDRESS_BAR_IMAGE_URL = HIFI_PUBLIC_BUCKET + "images/tools/address-bar-toggle.svg";
|
||||
var BG_IMAGE_URL = VIRCADIA_PUBLIC_CDN + "images/card-bg.svg";
|
||||
var CLOSE_IMAGE_URL = VIRCADIA_PUBLIC_CDN + "images/tools/close.svg";
|
||||
var MIC_IMAGE_URL = VIRCADIA_PUBLIC_CDN + "images/tools/mic-toggle.svg";
|
||||
var FACE_IMAGE_URL = VIRCADIA_PUBLIC_CDN + "images/tools/face-toggle.svg";
|
||||
var ADDRESS_BAR_IMAGE_URL = VIRCADIA_PUBLIC_CDN + "images/tools/address-bar-toggle.svg";
|
||||
|
||||
var panel = new OverlayPanel({
|
||||
anchorPositionBinding: { avatar: "MyAvatar" },
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
function length(v) {
|
||||
return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
|
||||
|
@ -28,7 +29,7 @@ function vMinus(a, b) {
|
|||
}
|
||||
|
||||
// The model file to be used for the guitar
|
||||
var guitarModel = HIFI_PUBLIC_BUCKET + "models/attachments/guitar.fst";
|
||||
var guitarModel = VIRCADIA_PUBLIC_CDN + "models/attachments/guitar.fst";
|
||||
|
||||
// Load sounds that will be played
|
||||
|
||||
|
@ -36,22 +37,22 @@ var heyManWave = SoundCache.getSound("https://hifi-public.s3.amazonaws.com/sound
|
|||
|
||||
var chords = new Array();
|
||||
// Nylon string guitar
|
||||
chords[1] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Nylon+A.raw");
|
||||
chords[2] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Nylon+B.raw");
|
||||
chords[3] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Nylon+E.raw");
|
||||
chords[4] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Nylon+G.raw");
|
||||
chords[1] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Nylon+A.raw");
|
||||
chords[2] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Nylon+B.raw");
|
||||
chords[3] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Nylon+E.raw");
|
||||
chords[4] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Nylon+G.raw");
|
||||
|
||||
// Electric guitar
|
||||
chords[5] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Metal+A+short.raw");
|
||||
chords[6] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Metal+B+short.raw");
|
||||
chords[7] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Metal+E+short.raw");
|
||||
chords[8] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Metal+G+short.raw");
|
||||
chords[5] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Metal+A+short.raw");
|
||||
chords[6] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Metal+B+short.raw");
|
||||
chords[7] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Metal+E+short.raw");
|
||||
chords[8] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Metal+G+short.raw");
|
||||
|
||||
// Steel Guitar
|
||||
chords[9] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Steel+A.raw");
|
||||
chords[10] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Steel+B.raw");
|
||||
chords[11] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Steel+E.raw");
|
||||
chords[12] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Steel+G.raw");
|
||||
chords[9] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Steel+A.raw");
|
||||
chords[10] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Steel+B.raw");
|
||||
chords[11] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Steel+E.raw");
|
||||
chords[12] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guitars/Guitar+-+Steel+G.raw");
|
||||
|
||||
var NUM_CHORDS = 4;
|
||||
var NUM_GUITARS = 3;
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
function length(v) {
|
||||
return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
|
||||
|
@ -28,8 +29,8 @@ function vMinus(a, b) {
|
|||
|
||||
// First, load two percussion sounds to be used on the sticks
|
||||
|
||||
var drum1 = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Drums/RackTomHi.raw");
|
||||
var drum2 = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Drums/RackTomLo.raw");
|
||||
var drum1 = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Drums/RackTomHi.raw");
|
||||
var drum2 = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Drums/RackTomLo.raw");
|
||||
|
||||
// State Machine:
|
||||
// 0 = not triggered
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
Script.include("../../libraries/toolBars.js");
|
||||
|
||||
const LEFT_PALM = 0;
|
||||
|
@ -171,7 +172,7 @@ var currentMouseControl = false;
|
|||
|
||||
var newSound = SoundCache.getSound("https://dl.dropboxusercontent.com/u/1864924/hifi-sounds/throw.raw");
|
||||
var catchSound = SoundCache.getSound("https://dl.dropboxusercontent.com/u/1864924/hifi-sounds/catch.raw");
|
||||
var throwSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Switches%20and%20sliders/slider%20-%20whoosh1.raw");
|
||||
var throwSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Switches%20and%20sliders/slider%20-%20whoosh1.raw");
|
||||
|
||||
var simulatedFrisbees = [];
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@ Script.include("../../libraries/utils.js");
|
|||
Script.include("../../libraries/constants.js");
|
||||
Script.include("../../libraries/toolBars.js");
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var LASER_WIDTH = 2;
|
||||
var POSE_CONTROLS = [ Controller.Standard.LeftHand, Controller.Standard.RightHand ];
|
||||
|
@ -30,7 +31,7 @@ var TRIGGER_CONTROLS = [ Controller.Standard.LT, Controller.Standard.RT ];
|
|||
var MIN_THROWER_DELAY = 1000;
|
||||
var MAX_THROWER_DELAY = 1000;
|
||||
var RELOAD_INTERVAL = 5;
|
||||
var GUN_MODEL = HIFI_PUBLIC_BUCKET + "cozza13/gun/m1911-handgun+1.fbx?v=4";
|
||||
var GUN_MODEL = VIRCADIA_PUBLIC_CDN + "cozza13/gun/m1911-handgun+1.fbx?v=4";
|
||||
var BULLET_VELOCITY = 10.0;
|
||||
var GUN_OFFSETS = [ {
|
||||
x: -0.04,
|
||||
|
@ -84,11 +85,11 @@ function getRandomFloat(min, max) {
|
|||
|
||||
var showScore = false;
|
||||
// Load some sound to use for loading and firing
|
||||
var fireSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guns/GUN-SHOT2.raw");
|
||||
var loadSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guns/Gun_Reload_Weapon22.raw");
|
||||
var impactSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guns/BulletImpact2.raw");
|
||||
var targetHitSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/hit.raw");
|
||||
var targetLaunchSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/shoot.raw");
|
||||
var fireSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guns/GUN-SHOT2.raw");
|
||||
var loadSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guns/Gun_Reload_Weapon22.raw");
|
||||
var impactSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Guns/BulletImpact2.raw");
|
||||
var targetHitSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Space%20Invaders/hit.raw");
|
||||
var targetLaunchSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Space%20Invaders/shoot.raw");
|
||||
|
||||
var audioOptions = {
|
||||
volume: 0.9
|
||||
|
@ -118,7 +119,7 @@ var toolBar = new ToolBar(0, 0, ToolBar.HORIZONTAL, "highfidelity.gun.toolbar",
|
|||
var offButton = toolBar.addOverlay("image", {
|
||||
width: BUTTON_SIZE,
|
||||
height: BUTTON_SIZE,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/gun/close.svg",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/gun/close.svg",
|
||||
alpha: 1
|
||||
});
|
||||
|
||||
|
@ -128,7 +129,7 @@ var platformButton = toolBar.addOverlay("image", {
|
|||
y: screenSize.y - (BUTTON_SIZE + PADDING),
|
||||
width: BUTTON_SIZE,
|
||||
height: BUTTON_SIZE,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/gun/platform-targets.svg",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/gun/platform-targets.svg",
|
||||
alpha: 1
|
||||
});
|
||||
|
||||
|
@ -138,7 +139,7 @@ var gridButton = toolBar.addOverlay("image", {
|
|||
y: screenSize.y - (BUTTON_SIZE + PADDING),
|
||||
width: BUTTON_SIZE,
|
||||
height: BUTTON_SIZE,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/gun/floating-targets.svg",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/gun/floating-targets.svg",
|
||||
alpha: 1
|
||||
});
|
||||
|
||||
|
|
|
@ -10,11 +10,12 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
hitSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Collisions-ballhitsandcatches/billiards/collision1.wav");
|
||||
var rightHandAnimation = HIFI_PUBLIC_BUCKET + "animations/RightHandAnimPhilip.fbx";
|
||||
var leftHandAnimation = HIFI_PUBLIC_BUCKET + "animations/LeftHandAnimPhilip.fbx";
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
hitSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Collisions-ballhitsandcatches/billiards/collision1.wav");
|
||||
var rightHandAnimation = VIRCADIA_PUBLIC_CDN + "animations/RightHandAnimPhilip.fbx";
|
||||
var leftHandAnimation = VIRCADIA_PUBLIC_CDN + "animations/LeftHandAnimPhilip.fbx";
|
||||
|
||||
var BALL_SIZE = 0.08;
|
||||
var PADDLE_SIZE = 0.20;
|
||||
|
@ -43,7 +44,7 @@ var offButton = Overlays.addOverlay("image", {
|
|||
y: 96,
|
||||
width: 32,
|
||||
height: 32,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/close.png",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/close.png",
|
||||
color: { red: 255, green: 255, blue: 255},
|
||||
alpha: 1
|
||||
});
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
// maybe we should make these constants...
|
||||
var LEFT_PALM = 0;
|
||||
|
@ -40,7 +41,7 @@ var rightHandEntity = false;
|
|||
|
||||
var newSound = SoundCache.getSound("https://dl.dropboxusercontent.com/u/1864924/hifi-sounds/throw.raw");
|
||||
var catchSound = SoundCache.getSound("https://dl.dropboxusercontent.com/u/1864924/hifi-sounds/catch.raw");
|
||||
var throwSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Switches%20and%20sliders/slider%20-%20whoosh1.raw");
|
||||
var throwSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Switches%20and%20sliders/slider%20-%20whoosh1.raw");
|
||||
var targetRadius = 0.25;
|
||||
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ function Instructions(imageURL, originalWidth, originalHeight) {
|
|||
this.rescale();
|
||||
};
|
||||
|
||||
var theInstruction = new Instructions(HIFI_PUBLIC_BUCKET + "images/tutorial-goTo.svg", 457, 284.1);
|
||||
var theInstruction = new Instructions(VIRCADIA_PUBLIC_CDN + "images/tutorial-goTo.svg", 457, 284.1);
|
||||
|
||||
var firstControllerPlugged = false;
|
||||
|
||||
|
@ -86,7 +86,7 @@ var locationURL = "";
|
|||
var randomSounds = new SoundArray({}, true);
|
||||
var numberOfSounds = 7;
|
||||
for (var i = 1; i <= numberOfSounds; i++) {
|
||||
randomSounds.addSound(HIFI_PUBLIC_BUCKET + "sounds/UI/virtualKeyboard-press" + i + ".raw");
|
||||
randomSounds.addSound(VIRCADIA_PUBLIC_CDN + "sounds/UI/virtualKeyboard-press" + i + ".raw");
|
||||
}
|
||||
|
||||
function appendChar(char) {
|
||||
|
|
|
@ -38,7 +38,7 @@ var textSizeMeasureOverlay = Overlays.addOverlay("text3d", {visible: false});
|
|||
var randomSounds = new SoundArray({}, true);
|
||||
var numberOfSounds = 7;
|
||||
for (var i = 1; i <= numberOfSounds; i++) {
|
||||
randomSounds.addSound(HIFI_PUBLIC_BUCKET + "sounds/UI/virtualKeyboard-press" + i + ".raw");
|
||||
randomSounds.addSound(VIRCADIA_PUBLIC_CDN + "sounds/UI/virtualKeyboard-press" + i + ".raw");
|
||||
}
|
||||
|
||||
function appendChar(char) {
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
//
|
||||
Script.include("http://s3.amazonaws.com/hifi-public/scripts/libraries/toolBars.js");
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
|
||||
|
||||
|
@ -139,7 +140,7 @@ function createTable() {
|
|||
dimensions: TABLE_DIMENSIONS,
|
||||
rotation: MyAvatar.orientation,
|
||||
// color: { red: 102, green: 51, blue: 0 },
|
||||
modelURL: HIFI_PUBLIC_BUCKET + 'eric/models/woodFloor.fbx',
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + 'eric/models/woodFloor.fbx',
|
||||
collisionSoundURL: "http://public.highfidelity.io/sounds/dice/diceCollide.wav"
|
||||
});
|
||||
|
||||
|
|
|
@ -10,15 +10,16 @@
|
|||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
Script.include(HIFI_PUBLIC_BUCKET + "scripts/libraries/toolBars.js");
|
||||
Script.include(HIFI_PUBLIC_BUCKET + "scripts/libraries/utils.js");
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
Script.include(VIRCADIA_PUBLIC_CDN + "scripts/libraries/toolBars.js");
|
||||
Script.include(VIRCADIA_PUBLIC_CDN + "scripts/libraries/utils.js");
|
||||
|
||||
var rotation = Quat.safeEulerAngles(Camera.getOrientation());
|
||||
rotation = Quat.fromPitchYawRollDegrees(0, rotation.y, 0);
|
||||
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(1, Quat.getFront(rotation)));
|
||||
|
||||
var TOOL_ICON_URL = HIFI_PUBLIC_BUCKET + "images/tools/";
|
||||
var TOOL_ICON_URL = VIRCADIA_PUBLIC_CDN + "images/tools/";
|
||||
var ALPHA_ON = 1.0;
|
||||
var ALPHA_OFF = 0.7;
|
||||
var COLOR_TOOL_BAR = { red: 0, green: 0, blue: 0 };
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var sound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Animals/mexicanWhipoorwill.raw");
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var sound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Animals/mexicanWhipoorwill.raw");
|
||||
var CHANCE_OF_PLAYING_SOUND = 0.01;
|
||||
|
||||
var FACTOR = 0.05;
|
||||
|
|
|
@ -14,12 +14,13 @@
|
|||
|
||||
|
||||
// Declare HiFi public bucket.
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
// Declare variables and set up new WebWindow.
|
||||
var stream;
|
||||
var volume = 1;
|
||||
var streamWindow = new WebWindow('Stream', HIFI_PUBLIC_BUCKET + "examples/html/jsstreamplayer.html", 0, 0, false);
|
||||
var streamWindow = new WebWindow('Stream', VIRCADIA_PUBLIC_CDN + "examples/html/jsstreamplayer.html", 0, 0, false);
|
||||
|
||||
// Set up toggleStreamURLButton overlay.
|
||||
var toggleStreamURLButton = Overlays.addOverlay("text", {
|
||||
|
|
|
@ -9,10 +9,11 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var modelURL = HIFI_PUBLIC_BUCKET + "models/entities/radio/Speakers.fbx";
|
||||
var soundURL = HIFI_PUBLIC_BUCKET + "sounds/family.stereo.raw";
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var modelURL = VIRCADIA_PUBLIC_CDN + "models/entities/radio/Speakers.fbx";
|
||||
var soundURL = VIRCADIA_PUBLIC_CDN + "sounds/family.stereo.raw";
|
||||
|
||||
var AudioRotationOffset = Quat.fromPitchYawRollDegrees(0, -90, 0);
|
||||
var audioOptions = {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
var HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
var SOUND_PATH = HIFI_PUBLIC_BUCKET + "sounds/Collisions-hitsandslaps/";
|
||||
var
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
var SOUND_PATH = VIRCADIA_PUBLIC_CDN + "sounds/Collisions-hitsandslaps/";
|
||||
var soundURLS = ["67LCollision01.wav", "67LCollision02.wav", "airhockey_hit1.wav"];
|
||||
var FLOOR_SIZE = 10;
|
||||
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(FLOOR_SIZE * 1.5, Quat.getFront(Camera.getOrientation())));
|
||||
|
@ -43,7 +44,7 @@ var brownianButton = Overlays.addOverlay("image", {
|
|||
y: screenSize.y - (BUTTON_SIZE + PADDING),
|
||||
width: BUTTON_SIZE,
|
||||
height: BUTTON_SIZE,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/blocks.png",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/blocks.png",
|
||||
color: buttonOffColor,
|
||||
alpha: 1
|
||||
});
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
Script.include(HIFI_PUBLIC_BUCKET + 'scripts/utilities.js')
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
Script.include(VIRCADIA_PUBLIC_CDN + 'scripts/utilities.js')
|
||||
|
||||
var NUM_ROWS = 10;
|
||||
var CUBE_SIZE = 1;
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var count = 0;
|
||||
var moveUntil = 2000;
|
||||
|
@ -37,7 +38,7 @@ type: "Model",
|
|||
green: 255,
|
||||
blue: 0 },
|
||||
|
||||
modelURL: HIFI_PUBLIC_BUCKET + "meshes/Feisar_Ship.FBX",
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + "meshes/Feisar_Ship.FBX",
|
||||
|
||||
|
||||
rotation: rotation
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var count = 0;
|
||||
var stopAfter = 1000;
|
||||
|
@ -26,7 +27,7 @@ var modelPropertiesA = {
|
|||
y: 3.34,
|
||||
z: 0.54
|
||||
},
|
||||
modelURL: HIFI_PUBLIC_BUCKET + "meshes/Feisar_Ship.FBX",
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + "meshes/Feisar_Ship.FBX",
|
||||
lifetime: 20
|
||||
};
|
||||
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var count = 0;
|
||||
var stopAfter = 1000;
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var count = 0;
|
||||
var stopAfter = 600;
|
||||
|
|
|
@ -60,7 +60,8 @@ var puckCollisionModel = "http://headache.hungry.com/~seth/hifi/airHockeyPuck-hu
|
|||
var paddleModel = "https://hifi-public.s3.amazonaws.com/ozan/props/airHockeyTable/airHockeyPaddle.obj"
|
||||
var paddleCollisionModel = "http://headache.hungry.com/~seth/hifi/paddle-hull.obj"
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
var screenSize = Controller.getViewportDimensions();
|
||||
var BUTTON_SIZE = 32;
|
||||
var PADDING = 3;
|
||||
|
@ -113,7 +114,7 @@ var deleteButton = Overlays.addOverlay("image", {
|
|||
y: screenSize.y - (BUTTON_SIZE * 2 + PADDING),
|
||||
width: BUTTON_SIZE,
|
||||
height: BUTTON_SIZE,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/delete.png",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/delete.png",
|
||||
color: {
|
||||
red: 255,
|
||||
green: 255,
|
||||
|
@ -127,7 +128,7 @@ var spawnButton = Overlays.addOverlay("image", {
|
|||
y: screenSize.y - (BUTTON_SIZE * 2 + PADDING),
|
||||
width: BUTTON_SIZE,
|
||||
height: BUTTON_SIZE,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/puck.png",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/puck.png",
|
||||
color: {
|
||||
red: 255,
|
||||
green: 255,
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var tableParts = [];
|
||||
var balls = [];
|
||||
|
@ -33,17 +34,18 @@ var cuePosition;
|
|||
var startStroke = 0;
|
||||
|
||||
// Sounds to use
|
||||
var hitSound = HIFI_PUBLIC_BUCKET + "sounds/Collisions-ballhitsandcatches/billiards/collision1.wav";
|
||||
var hitSound = VIRCADIA_PUBLIC_CDN + "sounds/Collisions-ballhitsandcatches/billiards/collision1.wav";
|
||||
SoundCache.getSound(hitSound);
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
var screenSize = Controller.getViewportDimensions();
|
||||
var reticle = Overlays.addOverlay("image", {
|
||||
x: screenSize.x / 2 - 16,
|
||||
y: screenSize.y / 2 - 16,
|
||||
width: 32,
|
||||
height: 32,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/billiardsReticle.png",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/billiardsReticle.png",
|
||||
color: { red: 255, green: 255, blue: 255},
|
||||
alpha: 1
|
||||
});
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
/*jslint vars: true*/
|
||||
var Overlays, Entities, Controller, Script, MyAvatar, Vec3; // Referenced globals provided by High Fidelity.
|
||||
|
||||
var HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var rezButton = Overlays.addOverlay("image", {
|
||||
x: 100,
|
||||
y: 350,
|
||||
width: 32,
|
||||
height: 32,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/close.png",
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + "images/close.png",
|
||||
color: {
|
||||
red: 255,
|
||||
green: 255,
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
HIFI_PUBLIC_BUCKET = 'http://s3.amazonaws.com/hifi-public/';
|
||||
VIRCADIA_PUBLIC_CDN = 'http://s3.amazonaws.com/hifi-public/';
|
||||
|
||||
Script.include('/~/system/libraries/toolBars.js');
|
||||
|
||||
|
@ -190,7 +190,7 @@ PlankyStack = function() {
|
|||
if (!_this.ground) {
|
||||
_this.ground = Entities.addEntity({
|
||||
type: 'Model',
|
||||
modelURL: HIFI_PUBLIC_BUCKET + 'eric/models/woodFloor.fbx',
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + 'eric/models/woodFloor.fbx',
|
||||
dimensions: _this.options.baseDimension,
|
||||
position: Vec3.sum(_this.basePosition, {y: -(_this.options.baseDimension.y / 2)}),
|
||||
rotation: _this.baseRotation,
|
||||
|
@ -247,7 +247,7 @@ PlankyStack = function() {
|
|||
});
|
||||
var newProperties = {
|
||||
type: 'Model',
|
||||
modelURL: HIFI_PUBLIC_BUCKET + 'marketplace/hificontent/Games/blocks/block.fbx',
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + 'marketplace/hificontent/Games/blocks/block.fbx',
|
||||
shapeType: 'box',
|
||||
name: 'PlankyBlock' + layer + '-' + row,
|
||||
dimensions: Vec3.sum(_this.options.blockSize, {x: 0, y: -((_this.options.blockSize.y * (_this.options.blockHeightVariation / MAXIMUM_PERCENTAGE)) * Math.random()), z: 0}),
|
||||
|
@ -334,7 +334,7 @@ toolBar = new ToolBar(0, 0, ToolBar.HORIZONTAL, "highfidelity.games.planky", fun
|
|||
button = toolBar.addTool({
|
||||
width: BUTTON_DIMENSIONS.width,
|
||||
height: BUTTON_DIMENSIONS.height,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + 'marketplace/hificontent/Games/blocks/planky_button.svg',
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + 'marketplace/hificontent/Games/blocks/planky_button.svg',
|
||||
alpha: 0.8,
|
||||
visible: true
|
||||
});
|
||||
|
@ -342,7 +342,7 @@ button = toolBar.addTool({
|
|||
cogButton = toolBar.addTool({
|
||||
width: BUTTON_DIMENSIONS.width,
|
||||
height: BUTTON_DIMENSIONS.height,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + 'marketplace/hificontent/Games/blocks/cog.svg',
|
||||
imageURL: VIRCADIA_PUBLIC_CDN + 'marketplace/hificontent/Games/blocks/cog.svg',
|
||||
subImage: { x: 0, y: BUTTON_DIMENSIONS.height, width: BUTTON_DIMENSIONS.width, height: BUTTON_DIMENSIONS.height },
|
||||
alpha: 0.8,
|
||||
visible: true
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
|
||||
var iteration = 0;
|
||||
|
||||
|
@ -93,13 +94,13 @@ var maxInvaderRowOffset=stepsToGround;
|
|||
var myMissile;
|
||||
|
||||
// sounds
|
||||
var hitSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/hit.raw");
|
||||
var shootSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/shoot.raw");
|
||||
var hitSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Space%20Invaders/hit.raw");
|
||||
var shootSound = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Space%20Invaders/shoot.raw");
|
||||
var moveSounds = new Array();
|
||||
moveSounds[0] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo1.raw");
|
||||
moveSounds[1] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo2.raw");
|
||||
moveSounds[2] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo3.raw");
|
||||
moveSounds[3] = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Space%20Invaders/Lo4.raw");
|
||||
moveSounds[0] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Space%20Invaders/Lo1.raw");
|
||||
moveSounds[1] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Space%20Invaders/Lo2.raw");
|
||||
moveSounds[2] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Space%20Invaders/Lo3.raw");
|
||||
moveSounds[3] = SoundCache.getSound(VIRCADIA_PUBLIC_CDN + "sounds/Space%20Invaders/Lo4.raw");
|
||||
var currentMoveSound = 0;
|
||||
var numberOfSounds = 4;
|
||||
var stepsPerSound = invaderStepsPerCycle / numberOfSounds;
|
||||
|
@ -110,36 +111,36 @@ var soundInMyHead = true;
|
|||
// models...
|
||||
var invaderModels = new Array();
|
||||
invaderModels[0] = {
|
||||
modelURL: HIFI_PUBLIC_BUCKET + "meshes/space_invader.fbx",
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + "meshes/space_invader.fbx",
|
||||
modelScale: 450,
|
||||
modelTranslation: { x: -1.3, y: -1.3, z: -1.3 },
|
||||
};
|
||||
invaderModels[1] = {
|
||||
modelURL: HIFI_PUBLIC_BUCKET + "meshes/space_invader.fbx",
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + "meshes/space_invader.fbx",
|
||||
modelScale: 450,
|
||||
modelTranslation: { x: -1.3, y: -1.3, z: -1.3 },
|
||||
};
|
||||
invaderModels[2] = {
|
||||
modelURL: HIFI_PUBLIC_BUCKET + "meshes/space_invader.fbx",
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + "meshes/space_invader.fbx",
|
||||
modelScale: 450,
|
||||
modelTranslation: { x: -1.3, y: -1.3, z: -1.3 },
|
||||
};
|
||||
invaderModels[3] = {
|
||||
modelURL: HIFI_PUBLIC_BUCKET + "meshes/space_invader.fbx",
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + "meshes/space_invader.fbx",
|
||||
modelScale: 450,
|
||||
modelTranslation: { x: -1.3, y: -1.3, z: -1.3 },
|
||||
};
|
||||
invaderModels[4] = {
|
||||
modelURL: HIFI_PUBLIC_BUCKET + "meshes/space_invader.fbx",
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + "meshes/space_invader.fbx",
|
||||
modelScale: 450,
|
||||
modelTranslation: { x: -1.3, y: -1.3, z: -1.3 },
|
||||
};
|
||||
|
||||
|
||||
|
||||
//modelURL: HIFI_PUBLIC_BUCKET + "meshes/Feisar_Ship.FBX",
|
||||
//modelURL: HIFI_PUBLIC_BUCKET + "meshes/invader.svo",
|
||||
// HIFI_PUBLIC_BUCKET + "meshes/spaceInvader3.fbx"
|
||||
//modelURL: VIRCADIA_PUBLIC_CDN + "meshes/Feisar_Ship.FBX",
|
||||
//modelURL: VIRCADIA_PUBLIC_CDN + "meshes/invader.svo",
|
||||
// VIRCADIA_PUBLIC_CDN + "meshes/spaceInvader3.fbx"
|
||||
|
||||
function initializeMyShip() {
|
||||
myShipProperties = {
|
||||
|
@ -150,7 +151,7 @@ function initializeMyShip() {
|
|||
damping: 0,
|
||||
dimensions: { x: shipSize * 2, y: shipSize * 2, z: shipSize * 2 },
|
||||
color: { red: 0, green: 255, blue: 0 },
|
||||
modelURL: HIFI_PUBLIC_BUCKET + "meshes/space_invader.fbx",
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + "meshes/space_invader.fbx",
|
||||
lifetime: itemLifetimes
|
||||
};
|
||||
myShip = Entities.addEntity(myShipProperties);
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
var Camera, Vec3, Quat, Entities, Script; // Globals defined by HiFi, var'ed here to keep jslint happy.
|
||||
var HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
var
|
||||
var VIRCADIA_PUBLIC_CDN = networkingConstants.PUBLIC_BUCKET_CDN_URL;
|
||||
var SOUND_BUCKET = "http://public.highfidelity.io/sounds/Collisions-hitsandslaps/";
|
||||
var MAX_ANGULAR_SPEED = Math.PI;
|
||||
var N_EACH_OBJECTS = 3;
|
||||
|
@ -22,8 +23,8 @@ function makeAll() {
|
|||
right = Vec3.multiply(0.6, Quat.getRight(Camera.getOrientation())),
|
||||
currentDimensions,
|
||||
data = [
|
||||
["models/props/Dice/goldDie.fbx", HIFI_PUBLIC_BUCKET + "sounds/dice/diceCollide.wav"],
|
||||
["models/props/Pool/ball_8.fbx", HIFI_PUBLIC_BUCKET + "sounds/Collisions-ballhitsandcatches/billiards/collision1.wav"],
|
||||
["models/props/Dice/goldDie.fbx", VIRCADIA_PUBLIC_CDN + "sounds/dice/diceCollide.wav"],
|
||||
["models/props/Pool/ball_8.fbx", VIRCADIA_PUBLIC_CDN + "sounds/Collisions-ballhitsandcatches/billiards/collision1.wav"],
|
||||
["eric/models/woodFloor.fbx", SOUND_BUCKET + "67LCollision05.wav"]
|
||||
];
|
||||
currentPosition = Vec3.sum(currentPosition, Vec3.multiply(-1 * data.length * N_EACH_OBJECTS / 2, right));
|
||||
|
@ -35,7 +36,7 @@ function makeAll() {
|
|||
}
|
||||
thisEntity = Entities.addEntity({
|
||||
type: "Model",
|
||||
modelURL: HIFI_PUBLIC_BUCKET + model,
|
||||
modelURL: VIRCADIA_PUBLIC_CDN + model,
|
||||
collisionSoundURL: sound,
|
||||
dynamic: true,
|
||||
shapeType: "box",
|
||||
|
|
|
@ -14,9 +14,9 @@ Script.include([
|
|||
"../../libraries/overlayManager.js",
|
||||
]);
|
||||
|
||||
var BG_IMAGE_URL = HIFI_PUBLIC_BUCKET + "images/card-bg.svg";
|
||||
var RED_DOT_IMAGE_URL = HIFI_PUBLIC_BUCKET + "images/red-dot.svg";
|
||||
var BLUE_SQUARE_IMAGE_URL = HIFI_PUBLIC_BUCKET + "images/blue-square.svg";
|
||||
var BG_IMAGE_URL = VIRCADIA_PUBLIC_CDN + "images/card-bg.svg";
|
||||
var RED_DOT_IMAGE_URL = VIRCADIA_PUBLIC_CDN + "images/red-dot.svg";
|
||||
var BLUE_SQUARE_IMAGE_URL = VIRCADIA_PUBLIC_CDN + "images/blue-square.svg";
|
||||
|
||||
var mainPanel = new OverlayPanel({
|
||||
anchorPositionBinding: { avatar: "MyAvatar" },
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
// The "Swatches" example of this script will create 9 different image overlays, that use the color feature to
|
||||
// display different colors as color swatches. The overlays can be clicked on, to change the "selectedSwatch" variable
|
||||
// and update the image used for the overlay so that it appears to have a selected indicator.
|
||||
|
@ -52,7 +49,7 @@ for (s = 0; s < numberOfSwatches; s++) {
|
|||
width: 31,
|
||||
height: 54,
|
||||
subImage: { x: imageFromX, y: imageFromY, width: 30, height: 54 },
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/testing-swatches.svg",
|
||||
imageURL: Script.getExternalPath(Script.ExternalPaths.Assets, "images/testing-swatches.svg"),
|
||||
color: swatchColors[s],
|
||||
alpha: 1
|
||||
});
|
||||
|
@ -80,7 +77,7 @@ var toolA = Overlays.addOverlay("image", {
|
|||
width: 62,
|
||||
height: 40,
|
||||
subImage: { x: 0, y: 0, width: 62, height: 40 },
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/hifi-interface-tools.svg",
|
||||
imageURL: Script.getExternalPath(Script.ExternalPaths.Assets, "images/hifi-interface-tools.svg"),
|
||||
color: { red: 255, green: 255, blue: 255},
|
||||
visible: false
|
||||
});
|
||||
|
@ -90,7 +87,7 @@ var toolA = Overlays.addOverlay("image", {
|
|||
var slider = Overlays.addOverlay("image", {
|
||||
// alternate form of expressing bounds
|
||||
bounds: { x: 100, y: 300, width: 158, height: 35},
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/slider.png",
|
||||
imageURL: Script.getExternalPath(Script.ExternalPaths.Assets, "images/slider.png"),
|
||||
color: { red: 255, green: 255, blue: 255},
|
||||
alpha: 1
|
||||
});
|
||||
|
@ -104,7 +101,7 @@ var thumb = Overlays.addOverlay("image", {
|
|||
y: 309,
|
||||
width: 18,
|
||||
height: 17,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/thumb.png",
|
||||
imageURL: Script.getExternalPath(Script.ExternalPaths.Assets, "images/thumb.png"),
|
||||
color: { red: 255, green: 255, blue: 255},
|
||||
alpha: 1
|
||||
});
|
||||
|
@ -200,8 +197,8 @@ print("Cube overlay color =\n"
|
|||
// This model overlay example causes intermittent crashes in NetworkGeometry::setTextureWithNameToURL()
|
||||
//var modelOverlayProperties = {
|
||||
// textures: {
|
||||
// filename1: HIFI_PUBLIC_BUCKET + "images/testing-swatches.svg",
|
||||
// filename2: HIFI_PUBLIC_BUCKET + "images/hifi-interface-tools.svg"
|
||||
// filename1: Script.getExternalPath(Script.ExternalPaths.Assets, "images/testing-swatches.svg",)
|
||||
// filename2: Script.getExternalPath(Script.ExternalPaths.Assets, "images/hifi-interface-tools.svg")
|
||||
// }
|
||||
//}
|
||||
//var modelOverlay = Overlays.addOverlay("model", modelOverlayProperties);
|
||||
|
|
|
@ -180,7 +180,7 @@ function updateWriting(deltaTime){
|
|||
writing = writing + "\n";
|
||||
}
|
||||
// add blinking cursor to window during typing
|
||||
var addCursor = writing + cursor;
|
||||
var addCursor = writing + cursor;
|
||||
if (clickedText == true){
|
||||
Overlays.editOverlay(inputWindow, { text: addCursor});
|
||||
}else{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
var fireSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guns/GUN-SHOT2.raw");
|
||||
var fireSound = SoundCache.getSound(Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/Guns/GUN-SHOT2.raw"));
|
||||
var audioOptions = {
|
||||
volume: 0.9,
|
||||
position: Vec3.sum(Camera.getPosition(), Quat.getFront(Camera.getOrientation()))
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
|
||||
(function () {
|
||||
var ball = null;
|
||||
var HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
var collisionSoundURL = HIFI_PUBLIC_BUCKET + "sounds/Collisions-ballhitsandcatches/billiards/collision1.wav";
|
||||
var collisionSoundURL = Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/Collisions-ballhitsandcatches/billiards/collision1.wav");
|
||||
var triggerState = false;
|
||||
var BALL_GRAVITY = -9.8;
|
||||
var BALL_START_VELOCITY = 0.1;
|
||||
|
|
|
@ -9,11 +9,9 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var grenadeURL = HIFI_PUBLIC_BUCKET + "models/props/grenade/grenade.fbx";
|
||||
var fuseSoundURL = HIFI_PUBLIC_BUCKET + "sounds/burningFuse.wav";
|
||||
var boomSoundURL = HIFI_PUBLIC_BUCKET + "sounds/explosion.wav";
|
||||
var grenadeURL = Script.getExternalPath(Script.ExternalPaths.Assets, "models/props/grenade/grenade.fbx");
|
||||
var fuseSoundURL = Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/burningFuse.wav");
|
||||
var boomSoundURL = Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/explosion.wav");
|
||||
|
||||
var AudioRotationOffset = Quat.fromPitchYawRollDegrees(0, -90, 0);
|
||||
var audioOptions = {
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
STICK_URL = HIFI_PUBLIC_BUCKET + "models/props/geo_stick.fbx";
|
||||
STICK_URL = Script.getExternalPath(Script.ExternalPaths.Assets, "models/props/geo_stick.fbx");
|
||||
|
||||
ZERO_VECTOR = { x: 0, y: 0, z: 0 };
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ KBD_UPPERCASE_HOVER = 2;
|
|||
KBD_LOWERCASE_HOVER = 3;
|
||||
KBD_BACKGROUND = 4;
|
||||
|
||||
KEYBOARD_URL = HIFI_PUBLIC_BUCKET + "images/keyboard.svg";
|
||||
CURSOR_URL = HIFI_PUBLIC_BUCKET + "images/cursor.svg";
|
||||
KEYBOARD_URL = Script.getExternalPath(Script.ExternalPaths.Assets, "images/keyboard.svg");
|
||||
CURSOR_URL = Script.getExternalPath(Script.ExternalPaths.Assets, "images/cursor.svg");
|
||||
|
||||
RETURN_CHARCODE = 0x01000004;
|
||||
ENTER_CHARCODE = 0x01000005;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
LineRider = function() {
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
var screenSize = Controller.getViewportDimensions();
|
||||
|
||||
var BUTTON_SIZE = 32;
|
||||
|
@ -34,7 +33,7 @@ LineRider = function() {
|
|||
y: screenSize.y - (BUTTON_SIZE + PADDING),
|
||||
width: BUTTON_SIZE,
|
||||
height: BUTTON_SIZE,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/coaster.png?v2",
|
||||
imageURL: Script.getExternalPath(Script.ExternalPaths.Assets, "images/coaster.png?v2"),
|
||||
color: this.buttonOffColor,
|
||||
alpha: 1
|
||||
});
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var panelWall = false;
|
||||
var orbShell = false;
|
||||
var descriptionText = false;
|
||||
|
@ -45,16 +43,16 @@ var panelsCenterShift = Vec3.subtract(panelsCenter, orbCenter);
|
|||
|
||||
var ORB_SHIFT = { x: 0, y: -1.4, z: -0.8};
|
||||
|
||||
var LOBBY_PANEL_WALL_URL = HIFI_PUBLIC_BUCKET + "models/sets/Lobby/PanelWallForInterface.fbx";
|
||||
var LOBBY_BLANK_PANEL_TEXTURE_URL = HIFI_PUBLIC_BUCKET + "models/sets/Lobby/Texture.jpg";
|
||||
var LOBBY_SHELL_URL = HIFI_PUBLIC_BUCKET + "models/sets/Lobby/LobbyShellForInterface.fbx";
|
||||
var LOBBY_PANEL_WALL_URL = Script.getExternalPath(Script.ExternalPaths.Assets, "models/sets/Lobby/PanelWallForInterface.fbx");
|
||||
var LOBBY_BLANK_PANEL_TEXTURE_URL = Script.getExternalPath(Script.ExternalPaths.Assets, "models/sets/Lobby/Texture.jpg");
|
||||
var LOBBY_SHELL_URL = Script.getExternalPath(Script.ExternalPaths.Assets, "models/sets/Lobby/LobbyShellForInterface.fbx");
|
||||
|
||||
var droneSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Lobby/drone.stereo.raw")
|
||||
var droneSound = SoundCache.getSound(Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/Lobby/drone.stereo.raw"));
|
||||
var currentDrone = null;
|
||||
|
||||
var latinSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Lobby/latin.stereo.raw")
|
||||
var latinSound = SoundCache.getSound(Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/Lobby/latin.stereo.raw"));
|
||||
var latinInjector = null;
|
||||
var elevatorSound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Lobby/elevator.stereo.raw")
|
||||
var elevatorSound = SoundCache.getSound(Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/Lobby/elevator.stereo.raw"));
|
||||
var elevatorInjector = null;
|
||||
var currentMuzakInjector = null;
|
||||
var currentSound = null;
|
||||
|
|
|
@ -29,8 +29,6 @@ var buttonOnColor = {
|
|||
blue: 100
|
||||
};
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var userCanPoint = false;
|
||||
Script.include(["libraries/toolBars.js"]);
|
||||
var toolBar = new ToolBar(0, 0, ToolBar.HORIZONTAL, "highfidelity.pointer.toolbar", function (screenSize) {
|
||||
|
@ -39,14 +37,12 @@ var toolBar = new ToolBar(0, 0, ToolBar.HORIZONTAL, "highfidelity.pointer.toolba
|
|||
var pointerButton = toolBar.addOverlay("image", {
|
||||
width: BUTTON_SIZE,
|
||||
height: BUTTON_SIZE,
|
||||
imageURL: HIFI_PUBLIC_BUCKET + "images/laser.png",
|
||||
imageURL: Script.getExternalPath(Script.ExternalPaths.Assets, "images/laser.png"),
|
||||
color: buttonOffColor,
|
||||
alpha: 1
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
function nearLinePoint(targetPosition) {
|
||||
var handPosition = MyAvatar.getRightPalmPosition();
|
||||
var along = Vec3.subtract(targetPosition, handPosition);
|
||||
|
|
|
@ -9,9 +9,8 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
/* globals HIFI_PUBLIC_BUCKET:true, Tool, ToolBar */
|
||||
/* globals Tool, ToolBar */
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
Script.include("/~/system/libraries/toolBars.js");
|
||||
|
||||
var recordingFile = "recording.hfr";
|
||||
|
@ -25,7 +24,7 @@ function setDefaultPlayerOptions() {
|
|||
}
|
||||
|
||||
var windowDimensions = Controller.getViewportDimensions();
|
||||
var TOOL_ICON_URL = HIFI_PUBLIC_BUCKET + "images/tools/";
|
||||
var TOOL_ICON_URL = Script.getExternalPath(Script.ExternalPaths.Assets, + "images/tools/");
|
||||
var ALPHA_ON = 1.0;
|
||||
var ALPHA_OFF = 0.7;
|
||||
var COLOR_ON = { red: 128, green: 0, blue: 0 };
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var sound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/220Sine.wav");
|
||||
var sound = SoundCache.getSound(Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/220Sine.wav"));
|
||||
|
||||
var soundPlaying = false;
|
||||
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
Script.include("../../libraries/globals.js");
|
||||
|
||||
var testAnimation = HIFI_PUBLIC_BUCKET + "ozan/animations/forStephen/sniperJump.fbx";
|
||||
var testAnimation = Script.getExternalPath(Script.ExternalPaths.Assets, "ozan/animations/forStephen/sniperJump.fbx");
|
||||
|
||||
var FRAME_RATE = 24.0; // frames per second
|
||||
var isAnimating = false;
|
||||
|
|
|
@ -11,13 +11,12 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
// A few sample files you may want to try:
|
||||
|
||||
var sound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Guitars/Guitar+-+Nylon+A.raw");
|
||||
//var sound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/220Sine.wav");
|
||||
//var sound = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Cocktail+Party+Snippets/Bandcamp.wav");
|
||||
var sound = SoundCache.getSound(Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/Guitars/Guitar+-+Nylon+A.raw"));
|
||||
//var sound = SoundCache.getSound(Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/220Sine.wav"));
|
||||
//var sound = SoundCache.getSound(Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/Cocktail+Party+Snippets/Bandcamp.wav"));
|
||||
|
||||
var soundPlaying = false;
|
||||
var options = {
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var soundClip = SoundCache.getSound(HIFI_PUBLIC_BUCKET + "sounds/Cocktail%20Party%20Snippets/Walken1.wav");
|
||||
var soundClip = SoundCache.getSound(Script.getExternalPath(Script.ExternalPaths.Assets, "sounds/Cocktail%20Party%20Snippets/Walken1.wav"));
|
||||
|
||||
function playSound() {
|
||||
Audio.playSound(soundClip, {
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
HIFI_PUBLIC_BUCKET = "http://s3.amazonaws.com/hifi-public/";
|
||||
|
||||
var SLIDER_RANGE_INCREMENT_SCALE = 1 / 1000;
|
||||
var THUMB_COLOR = {
|
||||
red: 150,
|
||||
|
@ -784,7 +782,7 @@ var CHECK_MARK_COLOR = {
|
|||
green: 255,
|
||||
blue: 255
|
||||
},
|
||||
imageURL: HIFI_PUBLIC_BUCKET + 'images/tools/expand-ui.svg',
|
||||
imageURL: Script.getExternalPath(Script.ExternalPaths.Assets, 'images/tools/expand-ui.svg'),
|
||||
x: x,
|
||||
y: y,
|
||||
width: rawHeight,
|
||||
|
@ -1147,13 +1145,13 @@ var CHECK_MARK_COLOR = {
|
|||
|
||||
if (!item.isCollapsed && item.isCollapsable && clickedOverlay == item.thumb) {
|
||||
Overlays.editOverlay(item.thumb, {
|
||||
imageURL: HIFI_PUBLIC_BUCKET + 'images/tools/expand-right.svg'
|
||||
imageURL: Script.getExternalPath(Script.ExternalPaths.Assets, 'images/tools/expand-right.svg')
|
||||
});
|
||||
this.collapse(clickedOverlay);
|
||||
item.isCollapsed = true;
|
||||
} else if (item.isCollapsed && item.isCollapsable && clickedOverlay == item.thumb) {
|
||||
Overlays.editOverlay(item.thumb, {
|
||||
imageURL: HIFI_PUBLIC_BUCKET + 'images/tools/expand-ui.svg'
|
||||
imageURL: Script.getExternalPath(Script.ExternalPaths.Assets, 'images/tools/expand-ui.svg')
|
||||
});
|
||||
this.expand(clickedOverlay);
|
||||
item.isCollapsed = false;
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
//
|
||||
|
||||
// animations, reach poses, reach pose parameters, transitions, transition parameters, sounds, image/s and reference files
|
||||
const HIFI_PUBLIC_BUCKET = "https://hifi-public.s3.amazonaws.com/";
|
||||
var pathToAssets = HIFI_PUBLIC_BUCKET + "procedural-animator/assets/";
|
||||
var pathToAssets = Script.getExternalPath(Script.ExternalPaths.Assets, "procedural-animator/assets/");
|
||||
|
||||
Script.include([
|
||||
"./libraries/walkConstants.js",
|
||||
|
|
|
@ -25,9 +25,7 @@ var DEFAULT_SCRIPTS_COMBINED = [
|
|||
"system/avatarapp.js",
|
||||
"system/graphicsSettings.js",
|
||||
"system/makeUserConnection.js",
|
||||
"system/marketplaces/marketplaces.js",
|
||||
"system/notifications.js",
|
||||
"system/commerce/wallet.js",
|
||||
"system/create/edit.js",
|
||||
"system/dialTone.js",
|
||||
"system/firstPersonHMD.js",
|
||||
|
|
|
@ -82,13 +82,13 @@ var mappingJson = {
|
|||
//
|
||||
|
||||
var TABLET_BUTTON_NAME = "ACCFILT";
|
||||
var HTML_URL = "https://s3.amazonaws.com/hifi-public/tony/html/accelerationFilterApp.html?2";
|
||||
var HTML_URL = Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/html/accelerationFilterApp.html?2");
|
||||
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tabletButton = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: "https://s3.amazonaws.com/hifi-public/tony/icons/tpose-i.svg",
|
||||
activeIcon: "https://s3.amazonaws.com/hifi-public/tony/icons/tpose-a.svg"
|
||||
icon: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/tpose-i.svg"),
|
||||
activeIcon: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/tpose-a.svg")
|
||||
});
|
||||
|
||||
tabletButton.clicked.connect(function () {
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
var LookAtDebugger = function() {
|
||||
var self = this;
|
||||
var IMAGE_DIMENSIONS = {x: 0.2, y: 0.2, z:0.2};
|
||||
var TARGET_ICON_PATH = "https://hifi-content.s3.amazonaws.com/luis/test_scripts/LookAtApp/eyeFocus.png";
|
||||
var INFINITY_ICON_PATH = "https://hifi-content.s3.amazonaws.com/luis/test_scripts/LookAtApp/noFocus.png";
|
||||
var TARGET_ICON_PATH = Script.getExternalPath(Script.ExternalPaths.HF_Content, "/luis/test_scripts/LookAtApp/eyeFocus.png");
|
||||
var INFINITY_ICON_PATH = Script.getExternalPath(Script.ExternalPaths.HF_Content, "/luis/test_scripts/LookAtApp/noFocus.png");
|
||||
this.items = {};
|
||||
this.active = false;
|
||||
|
||||
|
|
|
@ -89,13 +89,13 @@ var mappingJson = {
|
|||
//
|
||||
|
||||
var TABLET_BUTTON_NAME = "EXPFILT";
|
||||
var HTML_URL = "https://s3.amazonaws.com/hifi-public/tony/html/exponentialFilterApp.html?7";
|
||||
var HTML_URL = Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/html/exponentialFilterApp.html?7");
|
||||
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tabletButton = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: "https://s3.amazonaws.com/hifi-public/tony/icons/tpose-i.svg",
|
||||
activeIcon: "https://s3.amazonaws.com/hifi-public/tony/icons/tpose-a.svg"
|
||||
icon: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/tpose-i.svg"),
|
||||
activeIcon: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/tpose-a.svg")
|
||||
});
|
||||
|
||||
tabletButton.clicked.connect(function () {
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
var TRANSITION_TIME_SECONDS = 0.25;
|
||||
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var icon = "https://hifi-content.s3.amazonaws.com/elisalj/emoji_scripts/icons/emoji-i.svg";
|
||||
var activeIcon = "https://hifi-content.s3.amazonaws.com/elisalj/emoji_scripts/icons/emoji-a.svg";
|
||||
var icon = Script.getExternalPath(Script.ExternalPaths.HF_Content, "/elisalj/emoji_scripts/icons/emoji-i.svg");
|
||||
var activeIcon = Script.getExternalPath(Script.ExternalPaths.HF_Content, "/elisalj/emoji_scripts/icons/emoji-a.svg");
|
||||
var isActive = true;
|
||||
|
||||
var controllerMappingName;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
||||
var SOUND_DATA = { url: "http://hifi-content.s3.amazonaws.com/howard/sounds/piano1.wav" };
|
||||
var SOUND_DATA = { url: Script.getExternalPath(Script.ExternalPaths.HF_Content, "/howard/sounds/piano1.wav") };
|
||||
|
||||
// getSound function from crowd-agent.js
|
||||
function getSound(data, callback) { // callback(sound) when downloaded (which may be immediate).
|
||||
|
|
|
@ -76,20 +76,20 @@ var buttonPositionX = windowDimensions.x - BUTTON_PADDING - BUTTON_WIDTH;
|
|||
var buttonPositionY = (windowDimensions.y - BUTTON_HEIGHT) / 2 - (BUTTON_HEIGHT + BUTTON_PADDING);
|
||||
|
||||
var hatButton = new ToggleButtonBuddy(buttonPositionX, buttonPositionY, BUTTON_WIDTH, BUTTON_HEIGHT, {
|
||||
up: "https://s3.amazonaws.com/hifi-public/tony/icons/hat-up.svg",
|
||||
down: "https://s3.amazonaws.com/hifi-public/tony/icons/hat-down.svg"
|
||||
up: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/hat-up.svg"),
|
||||
down: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/hat-down.svg")
|
||||
});
|
||||
|
||||
buttonPositionY += BUTTON_HEIGHT + BUTTON_PADDING;
|
||||
var coatButton = new ToggleButtonBuddy(buttonPositionX, buttonPositionY, BUTTON_WIDTH, BUTTON_HEIGHT, {
|
||||
up: "https://s3.amazonaws.com/hifi-public/tony/icons/coat-up.svg",
|
||||
down: "https://s3.amazonaws.com/hifi-public/tony/icons/coat-down.svg"
|
||||
up: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/coat-up.svg"),
|
||||
down: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/coat-down.svg")
|
||||
});
|
||||
|
||||
buttonPositionY += BUTTON_HEIGHT + BUTTON_PADDING;
|
||||
var coatButton2 = new ToggleButtonBuddy(buttonPositionX, buttonPositionY, BUTTON_WIDTH, BUTTON_HEIGHT, {
|
||||
up: "https://s3.amazonaws.com/hifi-public/tony/icons/coat-up.svg",
|
||||
down: "https://s3.amazonaws.com/hifi-public/tony/icons/coat-down.svg"
|
||||
up: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/coat-up.svg"),
|
||||
down: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/coat-down.svg")
|
||||
});
|
||||
|
||||
var AVATAR_ATTACHMENT = 0;
|
||||
|
@ -97,7 +97,7 @@ var AVATAR_SOFT_ATTACHMENT = 1;
|
|||
var ENTITY_ATTACHMENT = 2;
|
||||
|
||||
var HAT_ATTACHMENT = {
|
||||
modelURL: "https://s3.amazonaws.com/hifi-public/tony/cowboy-hat.fbx",
|
||||
modelURL: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/cowboy-hat.fbx"),
|
||||
jointName: "Head",
|
||||
translation: {"x": 0, "y": 0.25, "z": 0.03},
|
||||
rotation: {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
|
@ -106,7 +106,7 @@ var HAT_ATTACHMENT = {
|
|||
};
|
||||
|
||||
var COAT_ATTACHMENT = {
|
||||
modelURL: "https://hifi-content.s3.amazonaws.com/ozan/dev/clothes/coat/coat_rig.fbx",
|
||||
modelURL: Script.getExternalPath(Script.ExternalPaths.HF_Content, "/ozan/dev/clothes/coat/coat_rig.fbx"),
|
||||
jointName: "Hips",
|
||||
translation: {"x": 0, "y": 0, "z": 0},
|
||||
rotation: {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
|
@ -115,7 +115,7 @@ var COAT_ATTACHMENT = {
|
|||
};
|
||||
|
||||
var COAT_ENTITY_ATTACHMENT = {
|
||||
modelURL: "https://hifi-content.s3.amazonaws.com/ozan/dev/clothes/coat/coat_rig.fbx",
|
||||
modelURL: Script.getExternalPath(Script.ExternalPaths.HF_Content, "/ozan/dev/clothes/coat/coat_rig.fbx"),
|
||||
jointName: "Hips",
|
||||
translation: {"x": 0, "y": 0, "z": 0},
|
||||
rotation: {"x": 0, "y": 0, "z": 0, "w": 1},
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
var _this;
|
||||
BatonSoundEntity = function() {
|
||||
_this = this;
|
||||
_this.drumSound = SoundCache.getSound("https://s3.amazonaws.com/hifi-public/sounds/Drums/deepdrum1.wav");
|
||||
_this.drumSound = SoundCache.getSound(Script.getExternalPath(Script.ExternalPaths.HF_Public, "/sounds/Drums/deepdrum1.wav"));
|
||||
_this.injectorOptions = {position: MyAvatar.position, loop: false, volume: 1};
|
||||
_this.soundIntervalConnected = false;
|
||||
_this.batonDebugModel = Entities.addEntity({
|
||||
|
|
|
@ -17,14 +17,14 @@ Script.include("/~/system/libraries/Xform.js");
|
|||
(function() { // BEGIN LOCAL_SCOPE
|
||||
|
||||
var TABLET_BUTTON_NAME = "PUCKATTACH";
|
||||
var TABLET_APP_URL = "https://s3.amazonaws.com/hifi-public/tony/html/filtered-puck-attach.html?2";
|
||||
var TABLET_APP_URL = Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/html/filtered-puck-attach.html?2");
|
||||
var NUM_TRACKED_OBJECTS = 16;
|
||||
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tabletButton = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-i.svg",
|
||||
activeIcon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-a.svg"
|
||||
icon: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/puck-i.svg"),
|
||||
activeIcon: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/puck-a.svg")
|
||||
});
|
||||
|
||||
var shown = false;
|
||||
|
@ -87,7 +87,7 @@ function entityExists(entityID) {
|
|||
return Object.keys(Entities.getEntityProperties(entityID)).length > 0;
|
||||
}
|
||||
|
||||
var VIVE_PUCK_MODEL = "https://s3.amazonaws.com/hifi-public/tony/vive_tracker_puck_y180z180.obj";
|
||||
var VIVE_PUCK_MODEL = Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/vive_tracker_puck_y180z180.obj");
|
||||
var VIVE_PUCK_DIMENSIONS = { x: 0.0945, y: 0.0921, z: 0.0423 }; // 1/1000th scale of model
|
||||
var VIVE_PUCK_SEARCH_DISTANCE = 1.5; // metres
|
||||
var VIVE_PUCK_SPAWN_DISTANCE = 0.5; // metres
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
var soundURL = "http://hifi-public.s3.amazonaws.com/birarda/medium-crowd.wav";
|
||||
var soundURL = Script.getExternalPath(Script.ExternalPaths.HF_Public, "/birarda/medium-crowd.wav");
|
||||
var audioOptions = {
|
||||
position: { x: 0.0, y: 0.0, z: 0.0 },
|
||||
volume: 0.5
|
||||
|
|
|
@ -26,12 +26,12 @@ var MINIMUM_AVATARS = 25; // changeable by prompt
|
|||
var SPREAD_TIME_MS = 500;
|
||||
|
||||
var DENSITY = 0.3; // square meters per person. Some say 10 sq ft is arm's length (0.9m^2), 4.5 is crowd (0.4m^2), 2.5 is mosh pit (0.2m^2).
|
||||
var SOUND_DATA = {url: "http://hifi-content.s3.amazonaws.com/howard/sounds/piano1.wav"};
|
||||
var SOUND_DATA = {url: Script.getExternalPath(Script.ExternalPaths.HF_Content, "/howard/sounds/piano1.wav"};
|
||||
var AVATARS_CHATTERING_AT_ONCE = 4; // How many of the agents should we request to play SOUND at once.
|
||||
var NEXT_SOUND_SPREAD = 500; // millisecond range of how long to wait after one sound finishes, before playing the next
|
||||
var ANIMATION_DATA = {
|
||||
"url": "http://hifi-content.s3.amazonaws.com/howard/resources/avatar/animations/idle.fbx",
|
||||
// "url": "http://hifi-content.s3.amazonaws.com/howard/resources/avatar/animations/walk_fwd.fbx", // alternative example
|
||||
"url": Script.getExternalPath(Script.ExternalPaths.HF_Content, "/howard/resources/avatar/animations/idle.fbx"),
|
||||
// "url": Script.getExternalPath(Script.ExternalPaths.HF_Content, "/howard/resources/avatar/animations/walk_fwd.fbx"), // alternative example
|
||||
"startFrame": 0.0,
|
||||
"endFrame": 300.0,
|
||||
"timeScale": 1.0,
|
||||
|
@ -128,7 +128,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
orientation: Quat.fromPitchYawRollDegrees(0, Quat.safeEulerAngles(MyAvatar.orientation).y + (turnSpread * (Math.random() - 0.5)), 0),
|
||||
soundData: chatter && SOUND_DATA,
|
||||
listen: true,
|
||||
skeletonModelURL: "http://hifi-content.s3.amazonaws.com/howard/resources/meshes/defaultAvatar_full.fst",
|
||||
skeletonModelURL: Script.getExternalPath(Script.ExternalPaths.HF_Content, "/howard/resources/meshes/defaultAvatar_full.fst"),
|
||||
animationData: ANIMATION_DATA
|
||||
});
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ function doRender(continuation) {
|
|||
if (MINIMUM_AVATARS && !fail) {
|
||||
if (0 === summonedAgents.length) {
|
||||
fail = "FAIL: No agents reported.\nPlease run " + MINIMUM_AVATARS + " instances of\n\
|
||||
http://hifi-content.s3.amazonaws.com/howard/scripts/tests/performance/crowd-agent.js?v=3\n\
|
||||
https://cdn-1.vircadia.com/eu-c-1/howard/scripts/tests/performance/crowd-agent.js?v=3\n\
|
||||
on your domain server.";
|
||||
} else if (total < MINIMUM_AVATARS) {
|
||||
fail = "FAIL: Only " + summonedAgents.length + " agents reported. Now missing " + (MINIMUM_AVATARS - total) + " avatars, total.";
|
||||
|
|
|
@ -22,7 +22,7 @@ var EXPECTED_INTERSECTIONS = 1286 * OUTER_LOOPS;
|
|||
|
||||
|
||||
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getFront(Camera.getOrientation())));
|
||||
var model_url = "http://hifi-content.s3.amazonaws.com/caitlyn/production/Scansite/buddhaReduced.fbx";
|
||||
var model_url = Script.getExternalPath(Script.ExternalPaths.HF_Content, "/caitlyn/production/Scansite/buddhaReduced.fbx");
|
||||
|
||||
var rayPickOverlays = Array();
|
||||
|
||||
|
|
|
@ -31,11 +31,11 @@ debug('startup seeking:', MINIMUM_AVATARS, 'listening:', N_LISTENING, 'chatterin
|
|||
var SPREAD_TIME_MS = 500;
|
||||
|
||||
var DENSITY = 0.3; // square meters per person. Some say 10 sq ft is arm's length (0.9m^2), 4.5 is crowd (0.4m^2), 2.5 is mosh pit (0.2m^2).
|
||||
var SOUND_DATA = {url: "http://hifi-content.s3.amazonaws.com/howard/sounds/piano1.wav"};
|
||||
var SOUND_DATA = {url: Script.getExternalPath(Script.ExternalPaths.HF_Content, "/howard/sounds/piano1.wav")};
|
||||
var NEXT_SOUND_SPREAD = 500; // millisecond range of how long to wait after one sound finishes, before playing the next
|
||||
var ANIMATION_DATA = {
|
||||
"url": "http://hifi-content.s3.amazonaws.com/howard/resources/avatar/animations/idle.fbx",
|
||||
// "url": "http://hifi-content.s3.amazonaws.com/howard/resources/avatar/animations/walk_fwd.fbx", // alternative example
|
||||
"url": Script.getExternalPath(Script.ExternalPaths.HF_Content, "/howard/resources/avatar/animations/idle.fbx"),
|
||||
// "url": Script.getExternalPath(Script.ExternalPaths.HF_Content, "/howard/resources/avatar/animations/walk_fwd.fbx"), // alternative example
|
||||
"startFrame": 0.0,
|
||||
"endFrame": 300.0,
|
||||
"timeScale": 1.0,
|
||||
|
@ -100,7 +100,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
orientation: Quat.fromPitchYawRollDegrees(0, Quat.safeEulerAngles(MyAvatar.orientation).y + (turnSpread * (Math.random() - 0.5)), 0),
|
||||
soundData: chatter && SOUND_DATA,
|
||||
listen: listen,
|
||||
skeletonModelURL: "http://hifi-content.s3.amazonaws.com/howard/resources/meshes/defaultAvatar_full.fst",
|
||||
skeletonModelURL: Script.getExternalPath(Script.ExternalPaths.HF_Content, "/howard/resources/meshes/defaultAvatar_full.fst"),
|
||||
animationData: ANIMATION_DATA
|
||||
});
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ Script.setTimeout(function () {
|
|||
var total = AvatarList.getAvatarIdentifiers().length;
|
||||
if (0 === summonedAgents.length) {
|
||||
Window.alert("No agents reported.\n\Please run " + MINIMUM_AVATARS + " instances of\n\
|
||||
http://hifi-content.s3.amazonaws.com/howard/scripts/tests/performance/crowd-agent.js?v=someDate\n\
|
||||
https://cdn-1.vircadia.com/eu-c-1/howard/scripts/tests/performance/crowd-agent.js?v=someDate\n\
|
||||
on your domain server.");
|
||||
} else if (total < MINIMUM_AVATARS) {
|
||||
Window.alert("Only " + summonedAgents.length + " agents reported. Now missing " + (MINIMUM_AVATARS - total) + " avatars, total.");
|
||||
|
|
|
@ -17,13 +17,13 @@ Script.include("/~/system/libraries/Xform.js");
|
|||
(function() { // BEGIN LOCAL_SCOPE
|
||||
|
||||
var TABLET_BUTTON_NAME = "PUCKTACH";
|
||||
var TABLET_APP_URL = "https://hifi-content.s3.amazonaws.com/seefo/production/puck-attach/puck-attach.html";
|
||||
var TABLET_APP_URL = Script.getExternalPath(Script.ExternalPaths.HF_Content, "/seefo/production/puck-attach/puck-attach.html");
|
||||
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tabletButton = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-i.svg",
|
||||
activeIcon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-a.svg"
|
||||
icon: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/puck-i.svg"),
|
||||
activeIcon: Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/icons/puck-a.svg")
|
||||
});
|
||||
|
||||
var shown = false;
|
||||
|
@ -85,7 +85,7 @@ function entityExists(entityID) {
|
|||
return Object.keys(Entities.getEntityProperties(entityID)).length > 0;
|
||||
}
|
||||
|
||||
var VIVE_PUCK_MODEL = "https://s3.amazonaws.com/hifi-public/tony/vive_tracker_puck_y180z180.obj";
|
||||
var VIVE_PUCK_MODEL = Script.getExternalPath(Script.ExternalPaths.HF_Public, "/tony/vive_tracker_puck_y180z180.obj");
|
||||
var VIVE_PUCK_DIMENSIONS = { x: 0.0945, y: 0.0921, z: 0.0423 }; // 1/1000th scale of model
|
||||
var VIVE_PUCK_SEARCH_DISTANCE = 1.5; // metres
|
||||
var VIVE_PUCK_SPAWN_DISTANCE = 0.5; // metres
|
||||
|
|
|
@ -25,8 +25,8 @@ centerUp.y += 0.5;
|
|||
var centerDown = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getForward(orientation)));
|
||||
centerDown.y -= 0.5;
|
||||
|
||||
var ENTITY_SHADER_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/shaders/uniformTest.fs";
|
||||
var SKYBOX_SHADER_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/shaders/timerTest.fs";
|
||||
var ENTITY_SHADER_URL = Script.getExternalPath(Script.ExternalPaths.HF_Content, "/eric/shaders/uniformTest.fs");
|
||||
var SKYBOX_SHADER_URL = Script.getExternalPath(Script.ExternalPaths.HF_Content, "/eric/shaders/timerTest.fs");
|
||||
|
||||
var entityData = {
|
||||
ProceduralEntity: {
|
||||
|
|
|
@ -56,7 +56,7 @@ function getFrame(callback) {
|
|||
|
||||
function prefetch(callback) {
|
||||
// A folder full of individual frames.
|
||||
var MOVIE_URL = "http://hifi-content.s3.amazonaws.com/james/vidtest/";
|
||||
var MOVIE_URL = Script.getExternalPath(Script.ExternalPaths.HF_Content, "/james/vidtest/");
|
||||
|
||||
var frames = [];
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ var PX_RGBA_URL = Script.resolvePath('px_rgba.fs');
|
|||
var PX_TEX_URL = Script.resolvePath('px_tex.fs');
|
||||
var PX_TEX_RGBA_URL = Script.resolvePath('px_tex_rgba.fs');
|
||||
|
||||
var TEX_URL = 'https://hifi-public.s3.amazonaws.com/alan/Playa/Skies/Test-Sky_out.png';
|
||||
var TEX_URL = Script.getExternalPath(Script.ExternalPaths.HF_Public, "/alan/Playa/Skies/Test-Sky_out.png");
|
||||
var NO_TEX = '';
|
||||
|
||||
var COLOR = { red: 255, green: 0, blue: 255 };
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue