< Summary

Class:DCL.Configuration.BIWSettings
Assembly:Configuration
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Configuration/Configuration.cs
Covered lines:14
Uncovered lines:0
Coverable lines:14
Total lines:239
Line coverage:100% (14 of 14)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
BIWSettings()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Configuration/Configuration.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using UnityEngine;
 3
 4namespace DCL.Configuration
 5{
 6    public static class BIWSettings
 7    {
 8        //Note: Don't use these URL directly, you need to get them in the BuilderInWorldUtils to take into account the E
 9        public const string BASE_URL_SCENE_OBJECT_CONTENT = "https://builder-api.decentraland.{ENV}/v1/storage/contents/
 10        public const string BASE_URL_CATALOG = "https://builder-api.decentraland.{ENV}/v1/assetPacks?owner=";
 11        public const string BASE_URL_BUILDER_API = "https://builder-api.decentraland.{ENV}/v1";
 12        public const string BASE_URL_ASSETS_PACK_CONTENT = "https://builder-api.decentraland.{ENV}/v1/storage/assetPacks
 13
 14        public const string BASE_URL_BUILDER_PROJECT_THUMBNAIL = "https://builder-api.decentraland.{ENV}/v1/projects/{id
 15
 16        //Useful links
 17        public const string MARKETPLACE_URL = "https://market.decentraland.org/lands";
 18        public const string GUEST_WALLET_INFO = "https://docs.decentraland.org/examples/get-a-wallet/";
 19
 20        //Deployment constants
 21        public const string DEPLOYMENT_DEFINITION_FILE = "scene-state-definition.json";
 22        public const string DEPLOYMENT_SCENE_FILE = "scene.json";
 23        public const string DEPLOYMENT_MODELS_FOLDER = "models";
 24        public const string DEPLOYMENT_BUNDLED_GAME_FILE = "bin/game.js";
 25        public const string DEPLOYMENT_SCENE_THUMBNAIL = "thumbnail.png";
 26        public const string DEPLOYMENT_ASSETS = "scene-assets.json";
 27        public const string DEPLOYMENT_SOURCE_TYPE = "builder-in-world";
 28
 29        //Layers
 130        public static readonly LayerMask SELECTION_LAYER_INDEX = LayerMask.NameToLayer("Selection");
 131        public static readonly LayerMask DEFAULT_LAYER_INDEX = LayerMask.NameToLayer("Default");
 132        public static readonly LayerMask COLLIDER_SELECTION_LAYER_INDEX = LayerMask.NameToLayer("OnBuilderPointerClick")
 33
 134        public static readonly LayerMask SELECTION_LAYER = LayerMask.GetMask("Selection");
 135        public static readonly LayerMask COLLIDER_SELECTION_LAYER = LayerMask.GetMask("OnBuilderPointerClick");
 136        public static readonly LayerMask GIZMOS_LAYER = LayerMask.GetMask("Gizmo");
 137        public static readonly LayerMask GROUND_LAYER = LayerMask.GetMask("Ground");
 138        public static readonly LayerMask FX_LAYER = LayerMask.GetMask("FX");
 39
 40        // Screenshot settings
 41        public const int SCENE_SNAPSHOT_WIDTH_RES = 854;
 42        public const int SCENE_SNAPSHOT_HEIGHT_RES = 480;
 43
 44        public const int AERIAL_SCREENSHOT_WIDTH = 315;
 45        public const int AERIAL_SCREENSHOT_HEIGHT = 253;
 46
 47        // Identifiers
 48        public const string VOXEL_ASSETS_PACK_ID = "b51e5e7c-c56b-4ad9-b9d2-1dc1c6546169";
 49        public const string SMART_ITEM_ASSETS_PACK_ID = "07e7e010-3003-496d-a720-2a714a63a58b";
 50        public const string FLOOR_CATEGORY = "ground";
 51
 52        public const string CATALOG_ASSET_PACK_TITLE = "Asset Packs";
 53        public const string VOXEL_TAG = "Voxel";
 54        public const string CUSTOM_LAND = "CUSTOM LAND";
 55
 56        //NFT
 57        public const string NFT_ETHEREUM_PROTOCOL = "ethereum://";
 58
 59        //Scene files
 60        public const string BUILDER_SCENE_STATE_DEFINITION_FILE_NAME = "scene-state-definition.json";
 61        public const string BUILDER_SCENE_ASSET_FILE_NAME = "scene-assets.json";
 62
 63        //Builder API
 64        public const string PROJECT_NOT_FOUND = "Project doesn't exists";
 65        public const int MANIFEST_VERSION = 10;
 66
 67        //Inputs
 168        public static float MOUSE_THRESHOLD_FOR_DRAG = 15f;
 169        public static float MOUSE_MS_DOUBLE_CLICK_THRESHOLD = 500f;
 70
 71        //Kernel Report
 72        public const string STATE_EVENT_NAME = "stateEvent";
 73        public const string SCENE_EVENT_NAME = "SceneEvent";
 74        public const string BIW_HEADER_REQUEST_WITH_PARAM_EVENT_NAME = "RequestSignedHeaderForBuilder";
 175        public static float ENTITY_POSITION_REPORTING_DELAY = 0.1f; // In seconds
 176        public static float ENTITY_POSITION_REPORTING_THRESHOLD = 0.04f; // In meters
 177        public static float ENTITY_SCALE_REPORTING_THRESHOLD = 0.04f; // In meters
 178        public static float ENTITY_ROTATION_REPORTING_THRESHOLD = 0.1f; // In degrees
 79
 80        //Floor Scene Object
 81        public const string FLOOR_ID = "c9b17021-765c-4d9a-9966-ce93a9c323d1";
 82        public const string FLOOR_MODEL = "FloorBaseGrass_01/FloorBaseGrass_01.glb";
 83        public const string FLOOR_NAME = "Floor";
 84        public const string FLOOR_ASSET_PACK_ID = "e6fa9601-3e47-4dff-9a84-e8e017add15a";
 85        public const string FLOOR_ASSET_PACK_NAME = "Genesis City";
 86        public const string FLOOR_ASSET_THUMBNAIL = "https://builder-api.decentraland.io/v1/storage/contents/QmexuPHcbEt
 87
 88        public const string FLOOR_GLTF_KEY = "FloorBaseGrass_01/FloorBaseGrass_01.glb";
 89        public const string FLOOR_GLTF_VALUE = "QmSyvWnb5nKCaGHw9oHLSkwywvS5NYpj6vgb8L121kWveS";
 90
 91        public const string FLOOR_TEXTURE_KEY = "FloorBaseGrass_01/Floor_Grass01.png.png";
 92        public const string FLOOR_TEXTURE_VALUE = "QmT1WfQPMBVhgwyxV5SfcfWivZ6hqMCT74nxdKXwyZBiXb";
 93
 94        public const string FLOOR_THUMBNAIL_KEY = "FloorBaseGrass_01/thumbnail.png";
 95        public const string FLOOR_THUMBNAIL_VALUE = "QmexuPHcbEtQCR11dPXxKZmRjGuY4iTooPJYfST7hW71DE";
 96
 97        //Collectables
 98        public const string ASSETS_COLLECTIBLES = "Collectibles";
 99        public const string COLLECTIBLE_MODEL_PROTOCOL = "ethereum://";
 100
 101        //Gizmos
 102        public const string TRANSLATE_GIZMO_NAME = "MOVE";
 103        public const string ROTATE_GIZMO_NAME = "ROTATE";
 104        public const string SCALE_GIZMO_NAME = "SCALE";
 105        public const string EMPTY_GIZMO_NAME = "NONE";
 106        public const float GIZMOS_RELATIVE_SCALE_RATIO = 0.06f;
 107
 108        //Publish
 109        public const string EXIT_MODAL_TITLE = "Exiting Builder mode";
 110        public const string EXIT_MODAL_SUBTITLE = "Are you sure you want to exit Builder mode? You can continue your wor
 111        public const string EXIT_MODAL_CONFIRM_BUTTON = "EXIT";
 112        public const string EXIT_MODAL_CANCEL_BUTTON = "CANCEL";
 113        public const string EXIT_WITHOUT_PUBLISH_MODAL_SUBTITLE = "There are unpublished changes in this scene. But don'
 114        public const string EXIT_WITHOUT_PUBLISH_MODAL_CONFIRM_BUTTON = "GOT IT!";
 115        public const string EXIT_WITHOUT_PUBLISH_MODAL_CANCEL_BUTTON = "BACK";
 116
 117        //Others
 118        public const float RAYCAST_MAX_DISTANCE = 10000f;
 119        public const string LAND_EDITION_NOT_ALLOWED_BY_PERMISSIONS_MESSAGE = "This land does not belong to you, nor hav
 120        public const string LAND_EDITION_WAITING_FOR_PERMISSIONS_MESSAGE = "Checking if you have permission to edit this
 121        public const string LAND_EDITION_NOT_ALLOWED_BY_SDK_LIMITATION_MESSAGE = "This place was created with the SDK an
 122        public const string GUEST_CANT_USE_BUILDER = "In order to use the builder, you need to log-in connecting a walle
 123        public const float CACHE_TIME_LAND = 5 * 60;
 124        public const float CACHE_TIME_SCENES = 1 * 60;
 125        public const float REFRESH_LANDS_WITH_ACCESS_INTERVAL = 2 * 60;
 126        public const float LAND_NOTIFICATIONS_TIMER = 10f;
 127        public const float LAND_CHECK_MESSAGE_TIMER = 5f;
 128    }
 129
 130    public static class TextureCompressionSettings
 131    {
 132        public const int GLTF_TEX_MAX_SIZE_WEB = 512;
 133        public const int GENERAL_TEX_MAX_SIZE_WEB = 2048;
 134    }
 135
 136    public static class ApplicationSettings
 137    {
 138        public static string version = "1.0";
 139    }
 140
 141    public static class EnvironmentSettings
 142    {
 143        public static bool RUNNING_TESTS = false;
 144        public static bool DEBUG = true;
 145        public static readonly int MORDOR_SCALAR = 8000;
 146        public static readonly Vector3 MORDOR = new Vector3(MORDOR_SCALAR, MORDOR_SCALAR, MORDOR_SCALAR);
 147        public const float UNINITIALIZED_FLOAT = 999999f;
 148        public static readonly string AVATAR_GLOBAL_SCENE_ID = "dcl-gs-avatars";
 149    }
 150
 151    public static class InputSettings
 152    {
 153        public static KeyCode PrimaryButtonKeyCode = KeyCode.E;
 154        public static KeyCode SecondaryButtonKeyCode = KeyCode.F;
 155        public static KeyCode ForwardButtonKeyCode = KeyCode.W;
 156        public static KeyCode BackwardButtonKeyCode = KeyCode.S;
 157        public static KeyCode LeftButtonKeyCode = KeyCode.A;
 158        public static KeyCode RightButtonKeyCode = KeyCode.D;
 159        public static KeyCode ForwardButtonKeyCodeAlt = KeyCode.UpArrow;
 160        public static KeyCode BackwardButtonKeyCodeAlt = KeyCode.DownArrow;
 161        public static KeyCode LeftButtonKeyCodeAlt = KeyCode.LeftArrow;
 162        public static KeyCode RightButtonKeyCodeAlt = KeyCode.RightArrow;
 163        public static KeyCode JumpButtonKeyCode = KeyCode.Space;
 164        public static KeyCode WalkButtonKeyCode = KeyCode.LeftShift;
 165        public static KeyCode PlusKeyCode = KeyCode.KeypadPlus;
 166        public static KeyCode MinusKeyCode = KeyCode.KeypadMinus;
 167        public static KeyCode ActionButton3Keycode = KeyCode.Alpha1;
 168        public static KeyCode ActionButton4Keycode = KeyCode.Alpha2;
 169        public static KeyCode ActionButton5Keycode = KeyCode.Alpha3;
 170        public static KeyCode ActionButton6Keycode = KeyCode.Alpha4;
 171    }
 172
 173    public static class PlayerSettings
 174    {
 175        public static float POSITION_REPORTING_DELAY = 0.1f; // In seconds
 176        public static float WORLD_REPOSITION_MINIMUM_DISTANCE = 100f;
 177    }
 178
 179    public static class ParcelSettings
 180    {
 181        public static float DEBUG_FLOOR_HEIGHT = -0.1f;
 182        public static float PARCEL_SIZE = 16f;
 183        public static float PARCEL_BOUNDARIES_THRESHOLD = 0.01f;
 184        public static float UNLOAD_DISTANCE = PARCEL_SIZE * 12f;
 185        public static bool VISUAL_LOADING_ENABLED = true;
 186    }
 187
 188    public static class TestSettings
 189    {
 190        public static int VISUAL_TESTS_APPROVED_AFFINITY = 95;
 191        public static float VISUAL_TESTS_PIXELS_CHECK_THRESHOLD = 5.0f;
 192        public static int VISUAL_TESTS_SNAPSHOT_WIDTH = 1280;
 193        public static int VISUAL_TESTS_SNAPSHOT_HEIGHT = 720;
 194    }
 195
 196    public static class AssetManagerSettings
 197    {
 198        //When library item count gets above this threshold, unused items will get pruned on Get() method.
 199        public static int LIBRARY_CLEANUP_THRESHOLD = 10;
 200    }
 201
 202    public static class MessageThrottlingSettings
 203    {
 204        public static float SIXTY_FPS_TIME = 1.0f / 60.0f;
 205        public static float GLOBAL_FRAME_THROTTLING_TIME = SIXTY_FPS_TIME / 8.0f;
 206        public static float LOAD_PARCEL_SCENES_THROTTLING_TIME = SIXTY_FPS_TIME / 4.0f;
 207    }
 208
 209    public static class UISettings
 210    {
 211        public static float RESERVED_CANVAS_TOP_PERCENTAGE = 10f;
 212    }
 213
 214    public static class NFTDataFetchingSettings
 215    {
 216        public static UnityEngine.Vector2
 217            NORMALIZED_DIMENSIONS =
 218                new UnityEngine.Vector2(512f, 512f); // The image dimensions that correspond to Vector3.One scale
 219
 220        public static string DAR_API_URL = "https://schema.decentraland.org/dar";
 221    }
 222
 223    public static class PhysicsLayers
 224    {
 225        public static int defaultLayer = LayerMask.NameToLayer("Default");
 226        public static int onPointerEventLayer = LayerMask.NameToLayer("OnPointerEvent");
 227        public static int characterLayer = LayerMask.NameToLayer("CharacterController");
 228        public static int characterOnlyLayer = LayerMask.NameToLayer("CharacterOnly");
 229        public static LayerMask physicsCastLayerMask = 1 << onPointerEventLayer;
 230
 231        public static LayerMask physicsCastLayerMaskWithoutCharacter = (physicsCastLayerMask | (1 << defaultLayer))
 232                                                                       & ~(1 << characterLayer)
 233                                                                       & ~(1 << characterOnlyLayer);
 234
 235        public static int friendsHUDPlayerMenu = LayerMask.NameToLayer("FriendsHUDPlayerMenu");
 236        public static int playerInfoCardMenu = LayerMask.NameToLayer("PlayerInfoCardMenu");
 237        public static int avatarTriggerMask = LayerMask.GetMask("AvatarTriggerDetection");
 238    }
 239}

Methods/Properties

BIWSettings()