PageSourceSearch

https://davidyao.me/projects/envymygun/js/nvmc-race-data.js

js davidyao.me collected 2026-10-04 00:20:41 UTC 703 bytes, 44 lines download raw bytes

1function randTree() {
2  function randC() {
3    return 190 * Math.random() - 95;
4  }
5  var r = 2, h = 20;
6  return {
7    position: [randC(), 0, randC()],
8    height: r + (h - 2 * r) * Math.random()
9  };
10}
11
12function getNtrees(n) {
13  var result = new Array(n);
14  for (var i = 0; i < n; i++) {
15    result[i] = randTree();
16  }
17  return result;
18}
19
20NVMC.DefaultRace = {
21  startPosition : [ 0,0,0 ],
22
23  bbox : [ -100, 0, -100, 100, 20, 100 ],
24
25  track : {
26    leftCurb : [],
27    rightCurb : [],
28  },
29
30  tunnels : [],
31
32  arealigths : [],
33
34  lamps : [],
35
36  trees : getNtrees(20),
37
38  buildings : [],
39  weather : {
40    sunLightDirection : [ -1, -1,  -1],
41    cloudDensity      : 0,
42    rainStrength      : 0
43  }
44};

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.