1//===========// 2// Constants // 3//===========// 4const urlParams = new URLSearchParams(window.location.search) 5 6const DOF_MODE = urlParams.has("dof") 7const SHADOW_MODE = urlParams.has("shadow") 8const SMALL_MODE = urlParams.has("small") || !urlParams.has("big") 9const MASSIVE_MODE = urlParams.has("massive") 10const D2_MODE = urlParams.has("2d") 11const D1_MODE = urlParams.has("1d") 12const VR_MODE = urlParams.has("vr") 13const TINY_MODE = urlParams.has("tiny")/* | true*/ 14const LONG_MODE = urlParams.has("long") 15const PURE_RANDOM_MODE = urlParams.has("pure") 16const SHUFFLE_MODE = urlParams.has("shuffle") 17const FIRING_MODE = urlParams.has("firing") 18const MEDIUM_MODE = urlParams.has("medium") 19const RIDICULOUS_MODE = urlParams.has("ridiculous") 20const NO_SECRET_MODE = urlParams.has("nosecret") 21 22const DARK_MODE = urlParams.has("dark") 23 24const DEFAULT_RANDOMNESS_MODE = "track" 25const RANDOM = SHUFFLE_MODE? "shuffle" : (PURE_RANDOM_MODE? "pure" : (FIRING_MODE? "firing" : DEFAULT_RANDOMNESS_MODE)) 26 27const FLOOR_TYPE = urlParams.has("nofloor")? "nofloor" : "floor" 28 29let MAX_X = (SMALL_MODE? 30 : 50) * (D1_MODE? 2 : 1) * (D2_MODE? 5 : 1) 30let MAX_Z = D1_MODE? 0 : (D2_MODE? 0 : MAX_X) 31let MAX_Y = D1_MODE? 0 : (SMALL_MODE? 30 : 40) * (D2_MODE? 8 : 1) 32 33if (TINY_MODE) { 34 MAX_X = Math.floor(MAX_X * 0.6) 35 MAX_Z = Math.floor(MAX_Z * 0.6) 36 MAX_Y = Math.floor(MAX_Y * 0.7) 37} 38 39if (MASSIVE_MODE) { 40 MAX_X = Math.floor(MAX_X * 2.5) 41 MAX_Z = Math.floor(MAX_Z * 2.5) 42 MAX_Y = Math.floor(MAX_Y * 1.5) 43} 44 45if (RIDICULOUS_MODE) { 46 MAX_X = Math.floor(MAX_X * 3.0) 47 MAX_Z = Math.floor(MAX_Z * 3.0) 48 MAX_Y = Math.floor(MAX_Y * 1.5) 49} 50 51if (LONG_MODE) { 52 MAX_X = Math.floor(MAX_X * 1.3) 53 MAX_Z = Math.floor(MAX_Z * 1) 54 MAX_Y = Math.floor(MAX_Y * 0.75) 55} 56 57if (MEDIUM_MODE) { 58 MAX_X = 40 * (D1_MODE? 2 : 1) * (D2_MODE? 5 : 1) 59 MAX_Y = 35 * (D2_MODE? 8 : 1) 60 MAX_Z = D1_MODE? 0 : (D2_MODE? 0 : MAX_X) 61} 62 63let SIZE = SMALL_MODE? "small" : "big" 64if (TINY_MODE) SIZE = "tiny" 65else if (MASSIVE_MODE) SIZE = "massive" 66else if (MEDIUM_MODE) SIZE = "medium" 67 68 69const SHAPE = LONG_MODE? "long" : "cube" 70 71const MIN_X = -MAX_X 72const MIN_Z = -MAX_Z 73const MIN_Y = 0 74 75const WORLD_WIDTH = MAX_X * 2 + 1 76const WORLD_DEPTH = MAX_Z * 2 + 1 77const WORLD_HEIGHT = MAX_Y 78 79const WORLD_AREA = { 80 x: [MIN_X, MAX_X], 81 y: [MIN_Y, MAX_Y], 82 z: [MIN_Z, MAX_Z], 83} 84 85 86const ATOM_SIZE = 0.01 87const ATOM_SCALE = 1.0 88 89const CAMERA_START_X = 0 90let CAMERA_START_Y = (D2_MODE? WORLD_HEIGHT/2 : (SMALL_MODE? 85 : 140)) * ATOM_SIZE 91let CAMERA_START_Z = (SMALL_MODE? 125 : 200) * (D2_MODE? 2 : 1) * ATOM_SIZE 92 93if (MEDIUM_MODE) { 94 CAMERA_START_Y = CAMERA_START_Y * 1.25 95 CAMERA_START_Z = CAMERA_START_Z * 1.25 96} 97 98if (MASSIVE_MODE) { 99 CAMERA_START_Y = CAMERA_START_Y * 2.25 100 CAMERA_START_Z = CAMERA_START_Z * 2.25 101} 102 103if (TINY_MODE) { 104 CAMERA_START_Y = CAMERA_START_Y * 0.65 105 CAMERA_START_Z = CAMERA_START_Z * 0.7 106} 107 108if (D2_MODE) { 109 //CAMERA_START_Y = CAMERA_START_Y * 2.8 110 CAMERA_START_Z = CAMERA_START_Z * 2.25 111} 112 113const CAMERA_SPEED = 2 114 115//window.history.replaceState({}, "", window.location.pathname) 116 117let SPEED_MOD = urlParams.get("speed") 118if (SPEED_MOD === null) SPEED_MOD = "1" 119SPEED_MOD = parseFloat(SPEED_MOD)
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.