< Summary

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

Metrics

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

Methods/Properties

PhysicsLayers()