25.1f3d6c9616e13f12f5f2.js 138 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481
  1. (window.webpackJsonpNVIV = window.webpackJsonpNVIV || []).push([[25], {
  2. 1906: function(t, e, n) {
  3. var i;
  4. window,
  5. t.exports = (i = n(4),
  6. function(t) {
  7. var e = {};
  8. function n(i) {
  9. if (e[i])
  10. return e[i].exports;
  11. var o = e[i] = {
  12. i: i,
  13. l: !1,
  14. exports: {}
  15. };
  16. return t[i].call(o.exports, o, o.exports, n),
  17. o.l = !0,
  18. o.exports
  19. }
  20. return n.m = t,
  21. n.c = e,
  22. n.d = function(t, e, i) {
  23. n.o(t, e) || Object.defineProperty(t, e, {
  24. enumerable: !0,
  25. get: i
  26. })
  27. }
  28. ,
  29. n.r = function(t) {
  30. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
  31. value: "Module"
  32. }),
  33. Object.defineProperty(t, "__esModule", {
  34. value: !0
  35. })
  36. }
  37. ,
  38. n.t = function(t, e) {
  39. if (1 & e && (t = n(t)),
  40. 8 & e)
  41. return t;
  42. if (4 & e && "object" == typeof t && t && t.__esModule)
  43. return t;
  44. var i = Object.create(null);
  45. if (n.r(i),
  46. Object.defineProperty(i, "default", {
  47. enumerable: !0,
  48. value: t
  49. }),
  50. 2 & e && "string" != typeof t)
  51. for (var o in t)
  52. n.d(i, o, function(e) {
  53. return t[e]
  54. }
  55. .bind(null, o));
  56. return i
  57. }
  58. ,
  59. n.n = function(t) {
  60. var e = t && t.__esModule ? function() {
  61. return t.default
  62. }
  63. : function() {
  64. return t
  65. }
  66. ;
  67. return n.d(e, "a", e),
  68. e
  69. }
  70. ,
  71. n.o = function(t, e) {
  72. return Object.prototype.hasOwnProperty.call(t, e)
  73. }
  74. ,
  75. n.p = "",
  76. n(n.s = 8)
  77. }([function(t, e) {
  78. t.exports = i
  79. }
  80. , function(t, e, n) {
  81. "use strict";
  82. function i(t) {
  83. this.content = [],
  84. this.scoreFunction = t
  85. }
  86. Object.defineProperty(e, "__esModule", {
  87. value: !0
  88. }),
  89. e.BinaryHeap = i,
  90. i.prototype = {
  91. push: function(t) {
  92. this.content.push(t),
  93. this.bubbleUp(this.content.length - 1)
  94. },
  95. pop: function() {
  96. var t = this.content[0]
  97. , e = this.content.pop();
  98. return this.content.length > 0 && (this.content[0] = e,
  99. this.sinkDown(0)),
  100. t
  101. },
  102. remove: function(t) {
  103. for (var e = this.content.length, n = 0; n < e; n++)
  104. if (this.content[n] == t) {
  105. var i = this.content.pop();
  106. if (n == e - 1)
  107. break;
  108. this.content[n] = i,
  109. this.bubbleUp(n),
  110. this.sinkDown(n);
  111. break
  112. }
  113. },
  114. size: function() {
  115. return this.content.length
  116. },
  117. bubbleUp: function(t) {
  118. for (var e = this.content[t], n = this.scoreFunction(e); t > 0; ) {
  119. var i = Math.floor((t + 1) / 2) - 1
  120. , o = this.content[i];
  121. if (n >= this.scoreFunction(o))
  122. break;
  123. this.content[i] = e,
  124. this.content[t] = o,
  125. t = i
  126. }
  127. },
  128. sinkDown: function(t) {
  129. for (var e = this.content.length, n = this.content[t], i = this.scoreFunction(n); ; ) {
  130. var o = 2 * (t + 1)
  131. , r = o - 1
  132. , a = null;
  133. if (r < e) {
  134. var s = this.content[r]
  135. , u = this.scoreFunction(s);
  136. u < i && (a = r)
  137. }
  138. if (o < e) {
  139. var l = this.content[o];
  140. this.scoreFunction(l) < (null == a ? i : u) && (a = o)
  141. }
  142. if (null == a)
  143. break;
  144. this.content[t] = this.content[a],
  145. this.content[a] = n,
  146. t = a
  147. }
  148. }
  149. }
  150. }
  151. , function(t, e, n) {
  152. "use strict";
  153. n.r(e),
  154. e.default = "precision highp float;\nprecision highp int;\n\nattribute vec3 position;\nattribute vec2 uv;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main() {\n vUv = uv;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}"
  155. }
  156. , function(t, e, n) {
  157. "use strict";
  158. n.r(e),
  159. e.default = "precision highp float;\nprecision highp int;\n\nuniform mat4 projectionMatrix;\n\nuniform float screenWidth;\nuniform float screenHeight;\n\nuniform sampler2D map;\n\nvarying vec2 vUv;\n\nvoid main() {\n\n\tfloat dx = 1.0 / screenWidth;\n\tfloat dy = 1.0 / screenHeight;\n\n\tvec3 color = vec3(0.0, 0.0, 0.0);\n\tcolor += texture2D(map, vUv + vec2(-dx, -dy)).rgb;\n\tcolor += texture2D(map, vUv + vec2( 0, -dy)).rgb;\n\tcolor += texture2D(map, vUv + vec2(+dx, -dy)).rgb;\n\tcolor += texture2D(map, vUv + vec2(-dx, 0)).rgb;\n\tcolor += texture2D(map, vUv + vec2( 0, 0)).rgb;\n\tcolor += texture2D(map, vUv + vec2(+dx, 0)).rgb;\n\tcolor += texture2D(map, vUv + vec2(-dx, dy)).rgb;\n\tcolor += texture2D(map, vUv + vec2( 0, dy)).rgb;\n\tcolor += texture2D(map, vUv + vec2(+dx, dy)).rgb;\n \n\tcolor = color / 9.0;\n\t\n\tgl_FragColor = vec4(color, 1.0);\n\t\n\t\n}"
  160. }
  161. , function(t, e, n) {
  162. "use strict";
  163. n.r(e),
  164. e.default = "precision highp float;\nprecision highp int;\n\n#define max_clip_boxes 30\n\nattribute vec3 position;\nattribute vec3 color;\nattribute vec3 normal;\nattribute float intensity;\nattribute float classification;\nattribute float returnNumber;\nattribute float numberOfReturns;\nattribute float pointSourceID;\nattribute vec4 indices;\n\nuniform mat4 modelMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\n\nuniform float pcIndex;\n\nuniform float screenWidth;\nuniform float screenHeight;\nuniform float fov;\nuniform float spacing;\n\n#if defined use_clip_box\n\tuniform mat4 clipBoxes[max_clip_boxes];\n#endif\n\nuniform float heightMin;\nuniform float heightMax;\nuniform float size; // pixel size factor\nuniform float minSize; // minimum pixel size\nuniform float maxSize; // maximum pixel size\nuniform float octreeSize;\nuniform vec3 bbSize;\nuniform vec3 uColor;\nuniform float opacity;\nuniform float clipBoxCount;\nuniform float level;\nuniform float vnStart;\nuniform bool isLeafNode;\n\nuniform float filterByNormalThreshold;\nuniform vec2 intensityRange;\nuniform float opacityAttenuation;\nuniform float intensityGamma;\nuniform float intensityContrast;\nuniform float intensityBrightness;\nuniform float rgbGamma;\nuniform float rgbContrast;\nuniform float rgbBrightness;\nuniform float transition;\nuniform float wRGB;\nuniform float wIntensity;\nuniform float wElevation;\nuniform float wClassification;\nuniform float wReturnNumber;\nuniform float wSourceID;\n\nuniform sampler2D visibleNodes;\nuniform sampler2D gradient;\nuniform sampler2D classificationLUT;\nuniform sampler2D depthMap;\n\n#ifdef highlight_point\n\tuniform vec3 highlightedPointCoordinate;\n\tuniform bool enablePointHighlighting;\n\tuniform float highlightedPointScale;\n#endif\n\nvarying vec3 vColor;\n\n#if !defined(color_type_point_index)\n\tvarying float vOpacity;\n#endif\n\n#if defined(weighted_splats)\n\tvarying float vLinearDepth;\n#endif\n\n#if !defined(paraboloid_point_shape) && defined(use_edl)\n\tvarying float vLogDepth;\n#endif\n\n#if defined(color_type_phong) && (MAX_POINT_LIGHTS > 0 || MAX_DIR_LIGHTS > 0) || defined(paraboloid_point_shape)\n\tvarying vec3 vViewPosition;\n#endif\n\n#if defined(weighted_splats) || defined(paraboloid_point_shape)\n\tvarying float vRadius;\n#endif\n\n#if defined(color_type_phong) && (MAX_POINT_LIGHTS > 0 || MAX_DIR_LIGHTS > 0)\n\tvarying vec3 vNormal;\n#endif\n\n#ifdef highlight_point\n\tvarying float vHighlight;\n#endif\n\n// ---------------------\n// OCTREE\n// ---------------------\n\n#if (defined(adaptive_point_size) || defined(color_type_lod)) && defined(tree_type_octree)\n\n/**\n * Rounds the specified number to the closest integer.\n */\nfloat round(float number){\n\treturn floor(number + 0.5);\n}\n\n/**\n * Gets the number of 1-bits up to inclusive index position.\n * \n * number is treated as if it were an integer in the range 0-255\n */\nint numberOfOnes(int number, int index) {\n\tint numOnes = 0;\n\tint tmp = 128;\n\tfor (int i = 7; i >= 0; i--) {\n\n\t\tif (number >= tmp) {\n\t\t\tnumber = number - tmp;\n\n\t\t\tif (i <= index) {\n\t\t\t\tnumOnes++;\n\t\t\t}\n\t\t}\n\n\t\ttmp = tmp / 2;\n\t}\n\n\treturn numOnes;\n}\n\n/**\n * Checks whether the bit at index is 1.0\n *\n * number is treated as if it were an integer in the range 0-255\n */\nbool isBitSet(int number, int index){\n\n\t// weird multi else if due to lack of proper array, int and bitwise support in WebGL 1.0\n\tint powi = 1;\n\tif (index == 0) {\n\t\tpowi = 1;\n\t} else if (index == 1) {\n\t\tpowi = 2;\n\t} else if (index == 2) {\n\t\tpowi = 4;\n\t} else if (index == 3) {\n\t\tpowi = 8;\n\t} else if (index == 4) {\n\t\tpowi = 16;\n\t} else if (index == 5) {\n\t\tpowi = 32;\n\t} else if (index == 6) {\n\t\tpowi = 64;\n\t} else if (index == 7) {\n\t\tpowi = 128;\n\t}\n\n\tint ndp = number / powi;\n\n\treturn mod(float(ndp), 2.0) != 0.0;\n}\n\n/**\n * Gets the the LOD at the point position.\n */\nfloat getLOD() {\n\tvec3 offset = vec3(0.0, 0.0, 0.0);\n\tint iOffset = int(vnStart);\n\tfloat depth = level;\n\n\tfor (float i = 0.0; i <= 30.0; i++) {\n\t\tfloat nodeSizeAtLevel = octreeSize / pow(2.0, i + level + 0.0);\n\t\t\n\t\tvec3 index3d = (position-offset) / nodeSizeAtLevel;\n\t\tindex3d = floor(index3d + 0.5);\n\t\tint index = int(round(4.0 * index3d.x + 2.0 * index3d.y + index3d.z));\n\t\t\n\t\tvec4 value = texture2D(visibleNodes, vec2(float(iOffset) / 2048.0, 0.0));\n\t\tint mask = int(round(value.r * 255.0));\n\n\t\tif (isBitSet(mask, index)) {\n\t\t\t// there are more visible child nodes at this position\n\t\t\tint advanceG = int(round(value.g * 255.0)) * 256;\n\t\t\tint advanceB = int(round(value.b * 255.0));\n\t\t\tint advanceChild = numberOfOnes(mask, index - 1);\n\t\t\tint advance = advanceG + advanceB + advanceChild;\n\n\t\t\tiOffset = iOffset + advance;\n\n\t\t\tdepth++;\n\t\t} else {\n\t\t\treturn value.a * 255.0; // no more visible child nodes at this position\n\t\t}\n\t\t\n\t\toffset = offset + (vec3(1.0, 1.0, 1.0) * nodeSizeAtLevel * 0.5) * index3d; \n\t}\n\t\t\n\treturn depth;\n}\n\nfloat getPointSizeAttenuation() {\n\treturn 0.5 * pow(2.0, getLOD());\n}\n\n#endif\n\n// ---------------------\n// KD-TREE\n// ---------------------\n\n#if (defined(adaptive_point_size) || defined(color_type_lod)) && defined(tree_type_kdtree)\n\nfloat getLOD() {\n\tvec3 offset = vec3(0.0, 0.0, 0.0);\n\tfloat intOffset = 0.0;\n\tfloat depth = 0.0;\n\t\t\t\n\tvec3 size = bbSize;\t\n\tvec3 pos = position;\n\t\t\n\tfor (float i = 0.0; i <= 1000.0; i++) {\n\t\t\n\t\tvec4 value = texture2D(visibleNodes, vec2(intOffset / 2048.0, 0.0));\n\t\t\n\t\tint children = int(value.r * 255.0);\n\t\tfloat next = value.g * 255.0;\n\t\tint split = int(value.b * 255.0);\n\t\t\n\t\tif (next == 0.0) {\n\t\t \treturn depth;\n\t\t}\n\t\t\n\t\tvec3 splitv = vec3(0.0, 0.0, 0.0);\n\t\tif (split == 1) {\n\t\t\tsplitv.x = 1.0;\n\t\t} else if (split == 2) {\n\t\t \tsplitv.y = 1.0;\n\t\t} else if (split == 4) {\n\t\t \tsplitv.z = 1.0;\n\t\t}\n\t\t\n\t\tintOffset = intOffset + next;\n\t\t\n\t\tfloat factor = length(pos * splitv / size);\n\t\tif (factor < 0.5) {\n\t\t \t// left\n\t\t\tif (children == 0 || children == 2) {\n\t\t\t\treturn depth;\n\t\t\t}\n\t\t} else {\n\t\t\t// right\n\t\t\tpos = pos - size * splitv * 0.5;\n\t\t\tif (children == 0 || children == 1) {\n\t\t\t\treturn depth;\n\t\t\t}\n\t\t\tif (children == 3) {\n\t\t\t\tintOffset = intOffset + 1.0;\n\t\t\t}\n\t\t}\n\t\tsize = size * ((1.0 - (splitv + 1.0) / 2.0) + 0.5);\n\t\t\n\t\tdepth++;\n\t}\n\t\t\n\t\t\n\treturn depth;\t\n}\n\nfloat getPointSizeAttenuation() {\n\treturn 0.5 * pow(1.3, getLOD());\n}\n\n#endif\n\n// formula adapted from: http://www.dfstudios.co.uk/articles/programming/image-programming-algorithms/image-processing-algorithms-part-5-contrast-adjustment/\nfloat getContrastFactor(float contrast) {\n\treturn (1.0158730158730156 * (contrast + 1.0)) / (1.0158730158730156 - contrast);\n}\n\nvec3 getRGB() {\n\t#if defined(use_rgb_gamma_contrast_brightness)\n\t vec3 rgb = color;\n\t\trgb = pow(rgb, vec3(rgbGamma));\n\t\trgb = rgb + rgbBrightness;\n\t\trgb = (rgb - 0.5) * getContrastFactor(rgbContrast) + 0.5;\n\t\trgb = clamp(rgb, 0.0, 1.0);\n\t\treturn rgb;\n\t#else\n\t\treturn color;\n\t#endif\n}\n\nfloat getIntensity() {\n\tfloat w = (intensity - intensityRange.x) / (intensityRange.y - intensityRange.x);\n\tw = pow(w, intensityGamma);\n\tw = w + intensityBrightness;\n\tw = (w - 0.5) * getContrastFactor(intensityContrast) + 0.5;\n\tw = clamp(w, 0.0, 1.0);\n\t\n\treturn w;\n}\n\nvec3 getElevation() {\n\tvec4 world = modelMatrix * vec4( position, 1.0 );\n\tfloat w = (world.z - heightMin) / (heightMax-heightMin);\n\tvec3 cElevation = texture2D(gradient, vec2(w,1.0-w)).rgb;\n\t\n\treturn cElevation;\n}\n\nvec4 getClassification() {\n\tvec2 uv = vec2(classification / 255.0, 0.5);\n\tvec4 classColor = texture2D(classificationLUT, uv);\n\t\n\treturn classColor;\n}\n\nvec3 getReturnNumber() {\n\tif (numberOfReturns == 1.0) {\n\t\treturn vec3(1.0, 1.0, 0.0);\n\t} else {\n\t\tif (returnNumber == 1.0) {\n\t\t\treturn vec3(1.0, 0.0, 0.0);\n\t\t} else if (returnNumber == numberOfReturns) {\n\t\t\treturn vec3(0.0, 0.0, 1.0);\n\t\t} else {\n\t\t\treturn vec3(0.0, 1.0, 0.0);\n\t\t}\n\t}\n}\n\nvec3 getSourceID() {\n\tfloat w = mod(pointSourceID, 10.0) / 10.0;\n\treturn texture2D(gradient, vec2(w, 1.0 - w)).rgb;\n}\n\nvec3 getCompositeColor() {\n\tvec3 c;\n\tfloat w;\n\n\tc += wRGB * getRGB();\n\tw += wRGB;\n\t\n\tc += wIntensity * getIntensity() * vec3(1.0, 1.0, 1.0);\n\tw += wIntensity;\n\t\n\tc += wElevation * getElevation();\n\tw += wElevation;\n\t\n\tc += wReturnNumber * getReturnNumber();\n\tw += wReturnNumber;\n\t\n\tc += wSourceID * getSourceID();\n\tw += wSourceID;\n\t\n\tvec4 cl = wClassification * getClassification();\n\tc += cl.a * cl.rgb;\n\tw += wClassification * cl.a;\n\n\tc = c / w;\n\t\n\tif (w == 0.0) {\n\t\tgl_Position = vec4(100.0, 100.0, 100.0, 0.0);\n\t}\n\t\n\treturn c;\n}\n\nvoid main() {\n\tvec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n\n\tgl_Position = projectionMatrix * mvPosition;\n\n\t#if defined(color_type_phong) && (MAX_POINT_LIGHTS > 0 || MAX_DIR_LIGHTS > 0) || defined(paraboloid_point_shape)\n\t\tvViewPosition = mvPosition.xyz;\n\t#endif\n\n\t#if defined weighted_splats\n\t\tvLinearDepth = gl_Position.w;\n\t#endif\n\n\t#if defined(color_type_phong) && (MAX_POINT_LIGHTS > 0 || MAX_DIR_LIGHTS > 0)\n\t\tvNormal = normalize(normalMatrix * normal);\n\t#endif\n\n\t#if !defined(paraboloid_point_shape) && defined(use_edl)\n\t\tvLogDepth = log2(-mvPosition.z);\n\t#endif\n\n\t// ---------------------\n\t// POINT SIZE\n\t// ---------------------\n\n\tfloat pointSize = 1.0;\n\tfloat slope = tan(fov / 2.0);\n\tfloat projFactor = -0.5 * screenHeight / (slope * mvPosition.z);\n\n\t#if defined fixed_point_size\n\t\tpointSize = size;\n\t#elif defined attenuated_point_size\n\t\tpointSize = size * spacing * projFactor;\n\t#elif defined adaptive_point_size\n\t\tfloat worldSpaceSize = 2.0 * size * spacing / getPointSizeAttenuation();\n\t\tpointSize = worldSpaceSize * projFactor;\n\t#endif\n\n\tpointSize = max(minSize, pointSize);\n\tpointSize = min(maxSize, pointSize);\n\n\t#if defined(weighted_splats) || defined(paraboloid_point_shape)\n\t\tvRadius = pointSize / projFactor;\n\t#endif\n\n\tgl_PointSize = pointSize;\n\n\t// ---------------------\n\t// HIGHLIGHTING\n\t// ---------------------\n\n\t#ifdef highlight_point\n\t\tvec4 mPosition = modelMatrix * vec4(position, 1.0);\n\t\tif (enablePointHighlighting && abs(mPosition.x - highlightedPointCoordinate.x) < 0.0001 &&\n\t\t\tabs(mPosition.y - highlightedPointCoordinate.y) < 0.0001 &&\n\t\t\tabs(mPosition.z - highlightedPointCoordinate.z) < 0.0001) {\n\t\t\tvHighlight = 1.0;\n\t\t\tgl_PointSize = pointSize * highlightedPointScale;\n\t\t} else {\n\t\t\tvHighlight = 0.0;\n\t\t}\n\t#endif\n\n\t// ---------------------\n\t// OPACITY\n\t// ---------------------\n\n\t#ifndef color_type_point_index\n\t\t#ifdef attenuated_opacity\n\t\t\tvOpacity = opacity * exp(-length(-mvPosition.xyz) / opacityAttenuation);\n\t\t#else\n\t\t\tvOpacity = opacity;\n\t\t#endif\n\t#endif\n\n\t// ---------------------\n\t// FILTERING\n\t// ---------------------\n\n\t#ifdef use_filter_by_normal\n\t\tif(abs((modelViewMatrix * vec4(normal, 0.0)).z) > filterByNormalThreshold) {\n\t\t\t// Move point outside clip space space to discard it.\n\t\t\tgl_Position = vec4(0.0, 0.0, 2.0, 1.0);\n\t\t}\n\t#endif\n\n\t// ---------------------\n\t// POINT COLOR\n\t// ---------------------\t\n\n\t#ifdef color_type_rgb\n\t\tvColor = getRGB();\n\t#elif defined color_type_height\n\t\tvColor = getElevation();\n\t#elif defined color_type_rgb_height\n\t\tvec3 cHeight = getElevation();\n\t\tvColor = (1.0 - transition) * getRGB() + transition * cHeight;\n\t#elif defined color_type_depth\n\t\tfloat linearDepth = -mvPosition.z ;\n\t\tfloat expDepth = (gl_Position.z / gl_Position.w) * 0.5 + 0.5;\n\t\tvColor = vec3(linearDepth, expDepth, 0.0);\n\t#elif defined color_type_intensity\n\t\tfloat w = getIntensity();\n\t\tvColor = vec3(w, w, w);\n\t#elif defined color_type_intensity_gradient\n\t\tfloat w = getIntensity();\n\t\tvColor = texture2D(gradient, vec2(w, 1.0 - w)).rgb;\n\t#elif defined color_type_color\n\t\tvColor = uColor;\n\t#elif defined color_type_lod\n\tfloat w = getLOD() / 10.0;\n\tvColor = texture2D(gradient, vec2(w, 1.0 - w)).rgb;\n\t#elif defined color_type_point_index\n\t\tvColor = indices.rgb;\n\t#elif defined color_type_classification\n\t vec4 cl = getClassification(); \n\t\tvColor = cl.rgb;\n\t#elif defined color_type_return_number\n\t\tvColor = getReturnNumber();\n\t#elif defined color_type_source\n\t\tvColor = getSourceID();\n\t#elif defined color_type_normal\n\t\tvColor = (modelMatrix * vec4(normal, 0.0)).xyz;\n\t#elif defined color_type_phong\n\t\tvColor = color;\n\t#elif defined color_type_composite\n\t\tvColor = getCompositeColor();\n\t#endif\n\t\n\t#if !defined color_type_composite && defined color_type_classification\n\t\tif (cl.a == 0.0) {\n\t\t\tgl_Position = vec4(100.0, 100.0, 100.0, 0.0);\n\t\t\treturn;\n\t\t}\n\t#endif\n\n\t// ---------------------\n\t// CLIPPING\n\t// ---------------------\n\n\t#if defined use_clip_box\n\t\tbool insideAny = false;\n\t\tfor (int i = 0; i < max_clip_boxes; i++) {\n\t\t\tif (i == int(clipBoxCount)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t\tvec4 clipPosition = clipBoxes[i] * modelMatrix * vec4(position, 1.0);\n\t\t\tbool inside = -0.5 <= clipPosition.x && clipPosition.x <= 0.5;\n\t\t\tinside = inside && -0.5 <= clipPosition.y && clipPosition.y <= 0.5;\n\t\t\tinside = inside && -0.5 <= clipPosition.z && clipPosition.z <= 0.5;\n\t\t\tinsideAny = insideAny || inside;\n\t\t}\n\n\t\tif (!insideAny) {\n\t\t\t#if defined clip_outside\n\t\t\t\tgl_Position = vec4(1000.0, 1000.0, 1000.0, 1.0);\n\t\t\t#elif defined clip_highlight_inside && !defined(color_type_depth)\n\t\t\t\tfloat c = (vColor.r + vColor.g + vColor.b) / 6.0;\n\t\t\t#endif\n\t\t} else {\n\t\t\t#if defined clip_highlight_inside\n\t\t\t\tvColor.r += 0.5;\n\t\t\t#endif\n\t\t}\n\t#endif\n}\n"
  165. }
  166. , function(t, e, n) {
  167. "use strict";
  168. n.r(e),
  169. e.default = "precision highp float;\nprecision highp int;\n\n#if defined paraboloid_point_shape\n\t#extension GL_EXT_frag_depth : enable\n#endif\n\nuniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\n\nuniform mat4 projectionMatrix;\nuniform float opacity;\n\nuniform float blendHardness;\nuniform float blendDepthSupplement;\nuniform float fov;\nuniform float spacing;\nuniform float pcIndex;\nuniform float screenWidth;\nuniform float screenHeight;\n\nuniform sampler2D depthMap;\n\n#ifdef highlight_point\n\tuniform vec4 highlightedPointColor;\n#endif\n\nvarying vec3 vColor;\n\n#if !defined(color_type_point_index)\n\tvarying float vOpacity;\n#endif\n\n#if defined(weighted_splats)\n\tvarying float vLinearDepth;\n#endif\n\n#if !defined(paraboloid_point_shape) && defined(use_edl)\n\tvarying float vLogDepth;\n#endif\n\n#if defined(color_type_phong) && (MAX_POINT_LIGHTS > 0 || MAX_DIR_LIGHTS > 0) || defined(paraboloid_point_shape)\n\tvarying vec3 vViewPosition;\n#endif\n\n#if defined(weighted_splats) || defined(paraboloid_point_shape)\n\tvarying float vRadius;\n#endif\n\n#if defined(color_type_phong) && (MAX_POINT_LIGHTS > 0 || MAX_DIR_LIGHTS > 0)\n\tvarying vec3 vNormal;\n#endif\n\n#ifdef highlight_point\n\tvarying float vHighlight;\n#endif\n\nfloat specularStrength = 1.0;\n\nvoid main() {\n\tvec3 color = vColor;\n\tfloat depth = gl_FragCoord.z;\n\n\t#if defined(circle_point_shape) || defined(paraboloid_point_shape) || defined (weighted_splats)\n\t\tfloat u = 2.0 * gl_PointCoord.x - 1.0;\n\t\tfloat v = 2.0 * gl_PointCoord.y - 1.0;\n\t#endif\n\t\n\t#if defined(circle_point_shape) || defined (weighted_splats)\n\t\tfloat cc = u*u + v*v;\n\t\tif(cc > 1.0){\n\t\t\tdiscard;\n\t\t}\n\t#endif\n\n\t#if defined weighted_splats\n\t\tvec2 uv = gl_FragCoord.xy / vec2(screenWidth, screenHeight);\n\t\tfloat sDepth = texture2D(depthMap, uv).r;\n\t\tif(vLinearDepth > sDepth + vRadius + blendDepthSupplement){\n\t\t\tdiscard;\n\t\t}\n\t#endif\n\t\t\n\t#if defined color_type_point_index\n\t\tgl_FragColor = vec4(color, pcIndex / 255.0);\n\t#else\n\t\tgl_FragColor = vec4(color, vOpacity);\n\t#endif\n\n\t#if defined(color_type_phong)\n\t\t#if MAX_POINT_LIGHTS > 0 || MAX_DIR_LIGHTS > 0\n\t\t\tvec3 normal = normalize( vNormal );\n\t\t\tnormal.z = abs(normal.z);\n\n\t\t\tvec3 viewPosition = normalize( vViewPosition );\n\t\t#endif\n\n\t\t// code taken from three.js phong light fragment shader\n\t\n\t\t#if MAX_POINT_LIGHTS > 0\n\n\t\t\tvec3 pointDiffuse = vec3( 0.0 );\n\t\t\tvec3 pointSpecular = vec3( 0.0 );\n\n\t\t\tfor ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {\n\n\t\t\t\tvec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );\n\t\t\t\tvec3 lVector = lPosition.xyz + vViewPosition.xyz;\n\n\t\t\t\tfloat lDistance = 1.0;\n\t\t\t\tif ( pointLightDistance[ i ] > 0.0 )\n\t\t\t\t\tlDistance = 1.0 - min( ( length( lVector ) / pointLightDistance[ i ] ), 1.0 );\n\n\t\t\t\tlVector = normalize( lVector );\n\n\t\t\t\t\t\t// diffuse\n\n\t\t\t\tfloat dotProduct = dot( normal, lVector );\n\n\t\t\t\t#ifdef WRAP_AROUND\n\n\t\t\t\t\tfloat pointDiffuseWeightFull = max( dotProduct, 0.0 );\n\t\t\t\t\tfloat pointDiffuseWeightHalf = max( 0.5 * dotProduct + 0.5, 0.0 );\n\n\t\t\t\t\tvec3 pointDiffuseWeight = mix( vec3( pointDiffuseWeightFull ), vec3( pointDiffuseWeightHalf ), wrapRGB );\n\n\t\t\t\t#else\n\n\t\t\t\t\tfloat pointDiffuseWeight = max( dotProduct, 0.0 );\n\n\t\t\t\t#endif\n\n\t\t\t\tpointDiffuse += diffuse * pointLightColor[ i ] * pointDiffuseWeight * lDistance;\n\n\t\t\t\t// specular\n\n\t\t\t\tvec3 pointHalfVector = normalize( lVector + viewPosition );\n\t\t\t\tfloat pointDotNormalHalf = max( dot( normal, pointHalfVector ), 0.0 );\n\t\t\t\tfloat pointSpecularWeight = specularStrength * max( pow( pointDotNormalHalf, shininess ), 0.0 );\n\n\t\t\t\tfloat specularNormalization = ( shininess + 2.0 ) / 8.0;\n\n\t\t\t\tvec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( lVector, pointHalfVector ), 0.0 ), 5.0 );\n\t\t\t\tpointSpecular += schlick * pointLightColor[ i ] * pointSpecularWeight * pointDiffuseWeight * lDistance * specularNormalization;\n\t\t\t\tpointSpecular = vec3(0.0, 0.0, 0.0);\n\t\t\t}\n\t\t\n\t\t#endif\n\t\t\n\t\t#if MAX_DIR_LIGHTS > 0\n\n\t\t\tvec3 dirDiffuse = vec3( 0.0 );\n\t\t\tvec3 dirSpecular = vec3( 0.0 );\n\n\t\t\tfor( int i = 0; i < MAX_DIR_LIGHTS; i ++ ) {\n\n\t\t\t\tvec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );\n\t\t\t\tvec3 dirVector = normalize( lDirection.xyz );\n\n\t\t\t\t\t\t// diffuse\n\n\t\t\t\tfloat dotProduct = dot( normal, dirVector );\n\n\t\t\t\t#ifdef WRAP_AROUND\n\n\t\t\t\t\tfloat dirDiffuseWeightFull = max( dotProduct, 0.0 );\n\t\t\t\t\tfloat dirDiffuseWeightHalf = max( 0.5 * dotProduct + 0.5, 0.0 );\n\n\t\t\t\t\tvec3 dirDiffuseWeight = mix( vec3( dirDiffuseWeightFull ), vec3( dirDiffuseWeightHalf ), wrapRGB );\n\n\t\t\t\t#else\n\n\t\t\t\t\tfloat dirDiffuseWeight = max( dotProduct, 0.0 );\n\n\t\t\t\t#endif\n\n\t\t\t\tdirDiffuse += diffuse * directionalLightColor[ i ] * dirDiffuseWeight;\n\n\t\t\t\t// specular\n\n\t\t\t\tvec3 dirHalfVector = normalize( dirVector + viewPosition );\n\t\t\t\tfloat dirDotNormalHalf = max( dot( normal, dirHalfVector ), 0.0 );\n\t\t\t\tfloat dirSpecularWeight = specularStrength * max( pow( dirDotNormalHalf, shininess ), 0.0 );\n\n\t\t\t\tfloat specularNormalization = ( shininess + 2.0 ) / 8.0;\n\n\t\t\t\tvec3 schlick = specular + vec3( 1.0 - specular ) * pow( max( 1.0 - dot( dirVector, dirHalfVector ), 0.0 ), 5.0 );\n\t\t\t\tdirSpecular += schlick * directionalLightColor[ i ] * dirSpecularWeight * dirDiffuseWeight * specularNormalization;\n\t\t\t}\n\n\t\t#endif\n\t\t\n\t\tvec3 totalDiffuse = vec3( 0.0 );\n\t\tvec3 totalSpecular = vec3( 0.0 );\n\t\t\n\t\t#if MAX_POINT_LIGHTS > 0\n\n\t\t\ttotalDiffuse += pointDiffuse;\n\t\t\ttotalSpecular += pointSpecular;\n\n\t\t#endif\n\t\t\n\t\t#if MAX_DIR_LIGHTS > 0\n\n\t\t\ttotalDiffuse += dirDiffuse;\n\t\t\ttotalSpecular += dirSpecular;\n\n\t\t#endif\n\t\t\n\t\tgl_FragColor.xyz = gl_FragColor.xyz * ( emissive + totalDiffuse + ambientLightColor * ambient ) + totalSpecular;\n\n\t#endif\n\t\n\t#if defined weighted_splats\n\t //float w = pow(1.0 - (u*u + v*v), blendHardness);\n\t\t\n\t\tfloat wx = 2.0 * length(2.0 * gl_PointCoord - 1.0);\n\t\tfloat w = exp(-wx * wx * 0.5);\n\t\t\n\t\t//float distance = length(2.0 * gl_PointCoord - 1.0);\n\t\t//float w = exp( -(distance * distance) / blendHardness);\n\t\t\n\t\tgl_FragColor.rgb = gl_FragColor.rgb * w;\n\t\tgl_FragColor.a = w;\n\t#endif\n\t\n\t#if defined paraboloid_point_shape\n\t\tfloat wi = 0.0 - ( u*u + v*v);\n\t\tvec4 pos = vec4(vViewPosition, 1.0);\n\t\tpos.z += wi * vRadius;\n\t\tfloat linearDepth = -pos.z;\n\t\tpos = projectionMatrix * pos;\n\t\tpos = pos / pos.w;\n\t\tfloat expDepth = pos.z;\n\t\tdepth = (pos.z + 1.0) / 2.0;\n\t\tgl_FragDepthEXT = depth;\n\t\t\n\t\t#if defined(color_type_depth)\n\t\t\tgl_FragColor.r = linearDepth;\n\t\t\tgl_FragColor.g = expDepth;\n\t\t#endif\n\t\t\n\t\t#if defined(use_edl)\n\t\t\tgl_FragColor.a = log2(linearDepth);\n\t\t#endif\n\t\t\n\t#else\n\t\t#if defined(use_edl)\n\t\t\tgl_FragColor.a = vLogDepth;\n\t\t#endif\n\t#endif\n\n\t#ifdef highlight_point\n\t\tif (vHighlight > 0.0) {\n\t\t\tgl_FragColor = highlightedPointColor;\n\t\t}\n\t#endif\n}\n"
  170. }
  171. , function(t, e, n) {
  172. t.exports = function() {
  173. return n(7)('!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";var n=r(1);onmessage=n.handleMessage},function(t,e,r){"use strict";var n;r.r(e),function(t){t[t.POSITION_CARTESIAN=0]="POSITION_CARTESIAN",t[t.COLOR_PACKED=1]="COLOR_PACKED",t[t.COLOR_FLOATS_1=2]="COLOR_FLOATS_1",t[t.COLOR_FLOATS_255=3]="COLOR_FLOATS_255",t[t.NORMAL_FLOATS=4]="NORMAL_FLOATS",t[t.FILLER=5]="FILLER",t[t.INTENSITY=6]="INTENSITY",t[t.CLASSIFICATION=7]="CLASSIFICATION",t[t.NORMAL_SPHEREMAPPED=8]="NORMAL_SPHEREMAPPED",t[t.NORMAL_OCT16=9]="NORMAL_OCT16",t[t.NORMAL=10]="NORMAL"}(n||(n={}));var i={ordinal:1,size:4},a={ordinal:2,size:1},o={ordinal:3,size:1},u={ordinal:5,size:2};function s(t,e,r){return{name:t,type:e,numElements:r,byteSize:r*e.size}}var f=s(n.COLOR_PACKED,a,4),A={POSITION_CARTESIAN:s(n.POSITION_CARTESIAN,i,3),RGBA_PACKED:f,COLOR_PACKED:f,RGB_PACKED:s(n.COLOR_PACKED,a,3),NORMAL_FLOATS:s(n.NORMAL_FLOATS,i,3),FILLER_1B:s(n.FILLER,o,1),INTENSITY:s(n.INTENSITY,u,1),CLASSIFICATION:s(n.CLASSIFICATION,o,1),NORMAL_SPHEREMAPPED:s(n.NORMAL_SPHEREMAPPED,o,2),NORMAL_OCT16:s(n.NORMAL_OCT16,o,2),NORMAL:s(n.NORMAL,i,3)};!function(){function t(t){void 0===t&&(t=[]),this.attributes=[],this.byteSize=0,this.size=0;for(var e=0;e<t.length;e++){var r=t[e],n=A[r];this.attributes.push(n),this.byteSize+=n.byteSize,this.size++}}t.prototype.add=function(t){this.attributes.push(t),this.byteSize+=t.byteSize,this.size++},t.prototype.hasColors=function(){return void 0!==this.attributes.find(O)},t.prototype.hasNormals=function(){return void 0!==this.attributes.find(b)}}();function O(t){return t.name===n.COLOR_PACKED}function b(t){var e=t.name;return e===n.NORMAL_SPHEREMAPPED||e===n.NORMAL_FLOATS||e===n.NORMAL||e===n.NORMAL_OCT16}var c=function(){function t(t){this.versionMinor=0,this.version=t;var e=-1===t.indexOf(".")?t.length:t.indexOf(".");this.versionMajor=parseInt(t.substr(0,e),10),this.versionMinor=parseInt(t.substr(e+1),10),isNaN(this.versionMinor)&&(this.versionMinor=0)}return t.prototype.newerThan=function(e){var r=new t(e);return this.versionMajor>r.versionMajor||this.versionMajor===r.versionMajor&&this.versionMinor>r.versionMinor},t.prototype.equalOrHigher=function(e){var r=new t(e);return this.versionMajor>r.versionMajor||this.versionMajor===r.versionMajor&&this.versionMinor>=r.versionMinor},t.prototype.upTo=function(t){return!this.newerThan(t)},t}(),h=function(){function t(t){this.tmp=new ArrayBuffer(4),this.tmpf=new Float32Array(this.tmp),this.tmpu8=new Uint8Array(this.tmp),this.u8=new Uint8Array(t)}return t.prototype.getUint32=function(t){return this.u8[t+3]<<24|this.u8[t+2]<<16|this.u8[t+1]<<8|this.u8[t]},t.prototype.getUint16=function(t){return this.u8[t+1]<<8|this.u8[t]},t.prototype.getFloat32=function(t){var e=this.tmpu8,r=this.u8,n=this.tmpf;return e[0]=r[t+0],e[1]=r[t+1],e[2]=r[t+2],e[3]=r[t+3],n[0]},t.prototype.getUint8=function(t){return this.u8[t]},t}();r.d(e,"handleMessage",(function(){return M}));var I=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1};function M(t){for(var e=t.data.buffer,r=t.data.pointAttributes,i={attributeBuffers:{},currentOffset:0,data:new h(e),mean:[0,0,0],nodeOffset:t.data.offset,numPoints:t.data.buffer.byteLength/r.byteSize,pointAttributes:r,scale:t.data.scale,tightBoxMax:[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],tightBoxMin:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transferables:[],version:new c(t.data.version)},a=0,o=i.pointAttributes.attributes;a<o.length;a++){var u=o[a];S(u,i),i.currentOffset+=u.byteSize}for(var s=new ArrayBuffer(4*i.numPoints),f=new Uint32Array(s),O=0;O<i.numPoints;O++)f[O]=O;i.attributeBuffers[n.CLASSIFICATION]||function(t){for(var e=new ArrayBuffer(4*t.numPoints),r=new Float32Array(e),i=0;i<t.numPoints;i++)r[i]=0;t.attributeBuffers[n.CLASSIFICATION]={buffer:e,attribute:A.CLASSIFICATION}}(i);var b={buffer:e,mean:i.mean,attributeBuffers:i.attributeBuffers,tightBoundingBox:{min:i.tightBoxMin,max:i.tightBoxMax},indices:s};postMessage(b,i.transferables)}function S(t,e){var r=function(t,e){switch(t.name){case n.POSITION_CARTESIAN:return function(t,e){for(var r=new ArrayBuffer(4*e.numPoints*3),n=new Float32Array(r),i=0;i<e.numPoints;i++){var a=void 0,o=void 0,u=void 0;e.version.newerThan("1.3")?(a=e.data.getUint32(e.currentOffset+i*e.pointAttributes.byteSize+0)*e.scale,o=e.data.getUint32(e.currentOffset+i*e.pointAttributes.byteSize+4)*e.scale,u=e.data.getUint32(e.currentOffset+i*e.pointAttributes.byteSize+8)*e.scale):(a=e.data.getFloat32(i*e.pointAttributes.byteSize+0)+e.nodeOffset[0],o=e.data.getFloat32(i*e.pointAttributes.byteSize+4)+e.nodeOffset[1],u=e.data.getFloat32(i*e.pointAttributes.byteSize+8)+e.nodeOffset[2]),n[3*i+0]=a,n[3*i+1]=o,n[3*i+2]=u,e.mean[0]+=a/e.numPoints,e.mean[1]+=o/e.numPoints,e.mean[2]+=u/e.numPoints,e.tightBoxMin[0]=Math.min(e.tightBoxMin[0],a),e.tightBoxMin[1]=Math.min(e.tightBoxMin[1],o),e.tightBoxMin[2]=Math.min(e.tightBoxMin[2],u),e.tightBoxMax[0]=Math.max(e.tightBoxMax[0],a),e.tightBoxMax[1]=Math.max(e.tightBoxMax[1],o),e.tightBoxMax[2]=Math.max(e.tightBoxMax[2],u)}return{buffer:r,attribute:t}}(t,e);case n.COLOR_PACKED:return function(t,e){for(var r=new ArrayBuffer(3*e.numPoints),n=new Uint8Array(r),i=0;i<e.numPoints;i++)n[3*i+0]=e.data.getUint8(e.currentOffset+i*e.pointAttributes.byteSize+0),n[3*i+1]=e.data.getUint8(e.currentOffset+i*e.pointAttributes.byteSize+1),n[3*i+2]=e.data.getUint8(e.currentOffset+i*e.pointAttributes.byteSize+2);return{buffer:r,attribute:t}}(t,e);case n.INTENSITY:return function(t,e){for(var r=new ArrayBuffer(4*e.numPoints),n=new Float32Array(r),i=0;i<e.numPoints;i++)n[i]=e.data.getUint16(e.currentOffset+i*e.pointAttributes.byteSize);return{buffer:r,attribute:t}}(t,e);case n.CLASSIFICATION:return function(t,e){for(var r=new ArrayBuffer(e.numPoints),n=new Uint8Array(r),i=0;i<e.numPoints;i++)n[i]=e.data.getUint8(e.currentOffset+i*e.pointAttributes.byteSize);return{buffer:r,attribute:t}}(t,e);case n.NORMAL_SPHEREMAPPED:return function(t,e){for(var r=new ArrayBuffer(4*e.numPoints*3),n=new Float32Array(r),i=0;i<e.numPoints;i++){var a=e.data.getUint8(e.currentOffset+i*e.pointAttributes.byteSize+0),o=e.data.getUint8(e.currentOffset+i*e.pointAttributes.byteSize+1),u=2*(a/255)-1,s=2*(o/255)-1,f=1,A=u*-u+s*-s+1*f;f=A,u*=Math.sqrt(A),s*=Math.sqrt(A),u*=2,s*=2,f=2*f-1,n[3*i+0]=u,n[3*i+1]=s,n[3*i+2]=f}return{buffer:r,attribute:t}}(t,e);case n.NORMAL_OCT16:return function(t,e){for(var r=new ArrayBuffer(4*e.numPoints*3),n=new Float32Array(r),i=0;i<e.numPoints;i++){var a=e.data.getUint8(e.currentOffset+i*e.pointAttributes.byteSize+0),o=e.data.getUint8(e.currentOffset+i*e.pointAttributes.byteSize+1),u=a/255*2-1,s=o/255*2-1,f=1-Math.abs(u)-Math.abs(s),A=0,O=0;f>=0?(A=u,O=s):(A=-(s/I(s)-1)/I(u),O=-(u/I(u)-1)/I(s));var b=Math.sqrt(A*A+O*O+f*f);A/=b,O/=b,f/=b,n[3*i+0]=A,n[3*i+1]=O,n[3*i+2]=f}return{buffer:r,attribute:t}}(t,e);case n.NORMAL:return function(t,e){for(var r=new ArrayBuffer(4*e.numPoints*3),n=new Float32Array(r),i=0;i<e.numPoints;i++){var a=e.data.getFloat32(e.currentOffset+i*e.pointAttributes.byteSize+0),o=e.data.getFloat32(e.currentOffset+i*e.pointAttributes.byteSize+4),u=e.data.getFloat32(e.currentOffset+i*e.pointAttributes.byteSize+8);n[3*i+0]=a,n[3*i+1]=o,n[3*i+2]=u}return{buffer:r,attribute:t}}(t,e);default:return}}(t,e);void 0!==r&&(e.attributeBuffers[r.attribute.name]=r,e.transferables.push(r.buffer))}}]);', null)
  174. }
  175. }
  176. , function(t, e, n) {
  177. "use strict";
  178. var i = window.URL || window.webkitURL;
  179. t.exports = function(t, e) {
  180. try {
  181. try {
  182. var n;
  183. try {
  184. (n = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder)).append(t),
  185. n = n.getBlob()
  186. } catch (e) {
  187. n = new Blob([t])
  188. }
  189. return new Worker(i.createObjectURL(n))
  190. } catch (e) {
  191. return new Worker("data:application/javascript," + encodeURIComponent(t))
  192. }
  193. } catch (t) {
  194. if (!e)
  195. throw Error("Inline worker is not supported");
  196. return new Worker(e)
  197. }
  198. }
  199. }
  200. , function(t, e, n) {
  201. "use strict";
  202. n.r(e);
  203. var i, o, r, a, s, u, l, f = n(0), d = (i = function(t, e) {
  204. return (i = Object.setPrototypeOf || {
  205. __proto__: []
  206. }instanceof Array && function(t, e) {
  207. t.__proto__ = e
  208. }
  209. || function(t, e) {
  210. for (var n in e)
  211. e.hasOwnProperty(n) && (t[n] = e[n])
  212. }
  213. )(t, e)
  214. }
  215. ,
  216. function(t, e) {
  217. function n() {
  218. this.constructor = t
  219. }
  220. i(t, e),
  221. t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype,
  222. new n)
  223. }
  224. ), p = function(t) {
  225. function e() {
  226. var e = null !== t && t.apply(this, arguments) || this;
  227. return e.vertexShader = n(2),
  228. e.fragmentShader = n(3),
  229. e.uniforms = {
  230. screenWidth: {
  231. type: "f",
  232. value: 0
  233. },
  234. screenHeight: {
  235. type: "f",
  236. value: 0
  237. },
  238. map: {
  239. type: "t",
  240. value: null
  241. }
  242. },
  243. e
  244. }
  245. return d(e, t),
  246. e
  247. }(f.ShaderMaterial);
  248. !function(t) {
  249. t[t.DISABLED = 0] = "DISABLED",
  250. t[t.CLIP_OUTSIDE = 1] = "CLIP_OUTSIDE",
  251. t[t.HIGHLIGHT_INSIDE = 2] = "HIGHLIGHT_INSIDE"
  252. }(o || (o = {})),
  253. function(t) {
  254. t[t.FIXED = 0] = "FIXED",
  255. t[t.ATTENUATED = 1] = "ATTENUATED",
  256. t[t.ADAPTIVE = 2] = "ADAPTIVE"
  257. }(r || (r = {})),
  258. function(t) {
  259. t[t.SQUARE = 0] = "SQUARE",
  260. t[t.CIRCLE = 1] = "CIRCLE",
  261. t[t.PARABOLOID = 2] = "PARABOLOID"
  262. }(a || (a = {})),
  263. function(t) {
  264. t[t.OCTREE = 0] = "OCTREE",
  265. t[t.KDTREE = 1] = "KDTREE"
  266. }(s || (s = {})),
  267. function(t) {
  268. t[t.FIXED = 0] = "FIXED",
  269. t[t.ATTENUATED = 1] = "ATTENUATED"
  270. }(u || (u = {})),
  271. function(t) {
  272. t[t.RGB = 0] = "RGB",
  273. t[t.COLOR = 1] = "COLOR",
  274. t[t.DEPTH = 2] = "DEPTH",
  275. t[t.HEIGHT = 3] = "HEIGHT",
  276. t[t.ELEVATION = 3] = "ELEVATION",
  277. t[t.INTENSITY = 4] = "INTENSITY",
  278. t[t.INTENSITY_GRADIENT = 5] = "INTENSITY_GRADIENT",
  279. t[t.LOD = 6] = "LOD",
  280. t[t.LEVEL_OF_DETAIL = 6] = "LEVEL_OF_DETAIL",
  281. t[t.POINT_INDEX = 7] = "POINT_INDEX",
  282. t[t.CLASSIFICATION = 8] = "CLASSIFICATION",
  283. t[t.RETURN_NUMBER = 9] = "RETURN_NUMBER",
  284. t[t.SOURCE = 10] = "SOURCE",
  285. t[t.NORMAL = 11] = "NORMAL",
  286. t[t.PHONG = 12] = "PHONG",
  287. t[t.RGB_HEIGHT = 13] = "RGB_HEIGHT",
  288. t[t.COMPOSITE = 50] = "COMPOSITE"
  289. }(l || (l = {}));
  290. var c = new f.Color(0,0,0)
  291. , h = new f.Vector4(1,0,0,1);
  292. function g(t) {
  293. return parseInt(t.charAt(t.length - 1), 10)
  294. }
  295. function v(t, e) {
  296. var n = t.name
  297. , i = e.name;
  298. return n.length !== i.length ? n.length - i.length : n < i ? -1 : n > i ? 1 : 0
  299. }
  300. var m = {
  301. 0: new f.Vector4(.5,.5,.5,1),
  302. 1: new f.Vector4(.5,.5,.5,1),
  303. 2: new f.Vector4(.63,.32,.18,1),
  304. 3: new f.Vector4(0,1,0,1),
  305. 4: new f.Vector4(0,.8,0,1),
  306. 5: new f.Vector4(0,.6,0,1),
  307. 6: new f.Vector4(1,.66,0,1),
  308. 7: new f.Vector4(1,0,1,1),
  309. 8: new f.Vector4(1,0,0,1),
  310. 9: new f.Vector4(0,0,1,1),
  311. 12: new f.Vector4(1,1,0,1),
  312. DEFAULT: new f.Vector4(.3,.6,.6,.5)
  313. }
  314. , y = [[0, new f.Color(0,0,0)], [1, new f.Color(1,1,1)]]
  315. , b = [[0, new f.Color(.077,.042,.206)], [.1, new f.Color(.225,.036,.388)], [.2, new f.Color(.373,.074,.432)], [.3, new f.Color(.522,.128,.42)], [.4, new f.Color(.665,.182,.37)], [.5, new f.Color(.797,.255,.287)], [.6, new f.Color(.902,.364,.184)], [.7, new f.Color(.969,.516,.063)], [.8, new f.Color(.988,.683,.072)], [.9, new f.Color(.961,.859,.298)], [1, new f.Color(.988,.998,.645)]]
  316. , _ = [[0, new f.Color(.241,.015,.61)], [.1, new f.Color(.387,.001,.654)], [.2, new f.Color(.524,.025,.653)], [.3, new f.Color(.651,.125,.596)], [.4, new f.Color(.752,.227,.513)], [.5, new f.Color(.837,.329,.431)], [.6, new f.Color(.907,.435,.353)], [.7, new f.Color(.963,.554,.272)], [.8, new f.Color(.992,.681,.195)], [.9, new f.Color(.987,.822,.144)], [1, new f.Color(.94,.975,.131)]]
  317. , x = [[0, new f.Color(.278,0,.714)], [1 / 6, new f.Color(0,0,1)], [2 / 6, new f.Color(0,1,1)], [.5, new f.Color(0,1,0)], [4 / 6, new f.Color(1,1,0)], [5 / 6, new f.Color(1,.64,0)], [1, new f.Color(1,0,0)]]
  318. , A = [[0, new f.Color(.3686,.3098,.6353)], [.1, new f.Color(.1961,.5333,.7412)], [.2, new f.Color(.4,.7608,.6471)], [.3, new f.Color(.6706,.8667,.6431)], [.4, new f.Color(.902,.9608,.5961)], [.5, new f.Color(1,1,.749)], [.6, new f.Color(.9961,.8784,.5451)], [.7, new f.Color(.9922,.6824,.3804)], [.8, new f.Color(.9569,.4275,.2627)], [.9, new f.Color(.8353,.2431,.3098)], [1, new f.Color(.6196,.0039,.2588)]]
  319. , w = [[0, new f.Color(.267,.005,.329)], [.1, new f.Color(.283,.141,.458)], [.2, new f.Color(.254,.265,.53)], [.3, new f.Color(.207,.372,.553)], [.4, new f.Color(.164,.471,.558)], [.5, new f.Color(.128,.567,.551)], [.6, new f.Color(.135,.659,.518)], [.7, new f.Color(.267,.749,.441)], [.8, new f.Color(.478,.821,.318)], [.9, new f.Color(.741,.873,.15)], [1, new f.Color(.993,.906,.144)]]
  320. , T = [[0, new f.Color(.1647,.2824,.3451)], [.1, new f.Color(.1338,.3555,.4227)], [.2, new f.Color(.061,.4319,.4864)], [.3, new f.Color(0,.5099,.5319)], [.4, new f.Color(0,.5881,.5569)], [.5, new f.Color(.137,.665,.5614)], [.6, new f.Color(.2906,.7395,.5477)], [.7, new f.Color(.4453,.8099,.5201)], [.8, new f.Color(.6102,.8748,.485)], [.9, new f.Color(.7883,.9323,.4514)], [1, new f.Color(.9804,.9804,.4314)]];
  321. function O(t, e, n) {
  322. for (var i = t * e, o = new Uint8Array(4 * i), r = Math.floor(255 * n.r), a = Math.floor(255 * n.g), s = Math.floor(255 * n.b), u = 0; u < i; u++)
  323. o[3 * u] = r,
  324. o[3 * u + 1] = a,
  325. o[3 * u + 2] = s;
  326. var l = new f.DataTexture(o,t,e,f.RGBAFormat);
  327. return l.needsUpdate = !0,
  328. l.magFilter = f.NearestFilter,
  329. l
  330. }
  331. function N(t) {
  332. var e = document.createElement("canvas");
  333. e.width = 64,
  334. e.height = 64;
  335. var n = e.getContext("2d");
  336. n.rect(0, 0, 64, 64);
  337. for (var i = n.createLinearGradient(0, 0, 64, 64), o = 0; o < t.length; o++) {
  338. var r = t[o];
  339. i.addColorStop(r[0], "#" + r[1].getHexString())
  340. }
  341. n.fillStyle = i,
  342. n.fill();
  343. var a = new f.CanvasTexture(e);
  344. return a.needsUpdate = !0,
  345. a.minFilter = f.LinearFilter,
  346. a
  347. }
  348. function P(t) {
  349. for (var e = new Uint8Array(262144), n = 0; n < 256; n++)
  350. for (var i = 0; i < 256; i++) {
  351. var o, r = n + 256 * i;
  352. o = t[n] ? t[n] : t[n % 32] ? t[n % 32] : t.DEFAULT,
  353. e[4 * r + 0] = 255 * o.x,
  354. e[4 * r + 1] = 255 * o.y,
  355. e[4 * r + 2] = 255 * o.z,
  356. e[4 * r + 3] = 255 * o.w
  357. }
  358. var a = new f.DataTexture(e,256,256,f.RGBAFormat);
  359. return a.magFilter = f.NearestFilter,
  360. a.needsUpdate = !0,
  361. a
  362. }
  363. var S, C, I, M, B, E, L, D = function() {
  364. var t = function(e, n) {
  365. return (t = Object.setPrototypeOf || {
  366. __proto__: []
  367. }instanceof Array && function(t, e) {
  368. t.__proto__ = e
  369. }
  370. || function(t, e) {
  371. for (var n in e)
  372. e.hasOwnProperty(n) && (t[n] = e[n])
  373. }
  374. )(e, n)
  375. };
  376. return function(e, n) {
  377. function i() {
  378. this.constructor = e
  379. }
  380. t(e, n),
  381. e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype,
  382. new i)
  383. }
  384. }(), R = function(t, e, n, i) {
  385. var o, r = arguments.length, a = r < 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, n) : i;
  386. if ("object" == typeof Reflect && "function" == typeof Reflect.decorate)
  387. a = Reflect.decorate(t, e, n, i);
  388. else
  389. for (var s = t.length - 1; s >= 0; s--)
  390. (o = t[s]) && (a = (r < 3 ? o(a) : r > 3 ? o(e, n, a) : o(e, n)) || a);
  391. return r > 3 && a && Object.defineProperty(e, n, a),
  392. a
  393. }, z = ((S = {})[s.OCTREE] = "tree_type_octree",
  394. S[s.KDTREE] = "tree_type_kdtree",
  395. S), F = ((C = {})[r.FIXED] = "fixed_point_size",
  396. C[r.ATTENUATED] = "attenuated_point_size",
  397. C[r.ADAPTIVE] = "adaptive_point_size",
  398. C), G = ((I = {})[u.ATTENUATED] = "attenuated_opacity",
  399. I[u.FIXED] = "fixed_opacity",
  400. I), U = ((M = {})[a.SQUARE] = "square_point_shape",
  401. M[a.CIRCLE] = "circle_point_shape",
  402. M[a.PARABOLOID] = "paraboloid_point_shape",
  403. M), H = ((B = {})[l.RGB] = "color_type_rgb",
  404. B[l.COLOR] = "color_type_color",
  405. B[l.DEPTH] = "color_type_depth",
  406. B[l.HEIGHT] = "color_type_height",
  407. B[l.INTENSITY] = "color_type_intensity",
  408. B[l.INTENSITY_GRADIENT] = "color_type_intensity_gradient",
  409. B[l.LOD] = "color_type_lod",
  410. B[l.POINT_INDEX] = "color_type_point_index",
  411. B[l.CLASSIFICATION] = "color_type_classification",
  412. B[l.RETURN_NUMBER] = "color_type_return_number",
  413. B[l.SOURCE] = "color_type_source",
  414. B[l.NORMAL] = "color_type_normal",
  415. B[l.PHONG] = "color_type_phong",
  416. B[l.RGB_HEIGHT] = "color_type_rgb_height",
  417. B[l.COMPOSITE] = "color_type_composite",
  418. B), V = ((E = {})[o.DISABLED] = "clip_disabled",
  419. E[o.CLIP_OUTSIDE] = "clip_outside",
  420. E[o.HIGHLIGHT_INSIDE] = "clip_highlight_inside",
  421. E), j = function(t) {
  422. function e(e) {
  423. void 0 === e && (e = {});
  424. var n = t.call(this) || this;
  425. n.lights = !1,
  426. n.fog = !1,
  427. n.numClipBoxes = 0,
  428. n.clipBoxes = [],
  429. n.visibleNodeTextureOffsets = new Map,
  430. n._gradient = A,
  431. n.gradientTexture = N(n._gradient),
  432. n._classification = m,
  433. n.classificationTexture = P(n._classification),
  434. n.uniforms = {
  435. bbSize: k("fv", [0, 0, 0]),
  436. blendDepthSupplement: k("f", 0),
  437. blendHardness: k("f", 2),
  438. classificationLUT: k("t", n.classificationTexture || new f.Texture),
  439. clipBoxCount: k("f", 0),
  440. clipBoxes: k("Matrix4fv", []),
  441. depthMap: k("t", null),
  442. diffuse: k("fv", [1, 1, 1]),
  443. fov: k("f", 1),
  444. gradient: k("t", n.gradientTexture || new f.Texture),
  445. heightMax: k("f", 1),
  446. heightMin: k("f", 0),
  447. intensityBrightness: k("f", 0),
  448. intensityContrast: k("f", 0),
  449. intensityGamma: k("f", 1),
  450. intensityRange: k("fv", [0, 65e3]),
  451. isLeafNode: k("b", 0),
  452. level: k("f", 0),
  453. maxSize: k("f", 50),
  454. minSize: k("f", 2),
  455. octreeSize: k("f", 0),
  456. opacity: k("f", 1),
  457. pcIndex: k("f", 0),
  458. rgbBrightness: k("f", 0),
  459. rgbContrast: k("f", 0),
  460. rgbGamma: k("f", 1),
  461. screenHeight: k("f", 1),
  462. screenWidth: k("f", 1),
  463. size: k("f", 1),
  464. spacing: k("f", 1),
  465. toModel: k("Matrix4f", []),
  466. transition: k("f", .5),
  467. uColor: k("c", new f.Color(16777215)),
  468. visibleNodes: k("t", n.visibleNodesTexture || new f.Texture),
  469. vnStart: k("f", 0),
  470. wClassification: k("f", 0),
  471. wElevation: k("f", 0),
  472. wIntensity: k("f", 0),
  473. wReturnNumber: k("f", 0),
  474. wRGB: k("f", 1),
  475. wSourceID: k("f", 0),
  476. opacityAttenuation: k("f", 1),
  477. filterByNormalThreshold: k("f", 0),
  478. highlightedPointCoordinate: k("fv", new f.Vector3),
  479. highlightedPointColor: k("fv", h.clone()),
  480. enablePointHighlighting: k("b", !0),
  481. highlightedPointScale: k("f", 2)
  482. },
  483. n.useClipBox = !1,
  484. n.weighted = !1,
  485. n.pointColorType = l.RGB,
  486. n.pointSizeType = r.ADAPTIVE,
  487. n.clipMode = o.DISABLED,
  488. n.useEDL = !1,
  489. n.shape = a.SQUARE,
  490. n.treeType = s.OCTREE,
  491. n.pointOpacityType = u.FIXED,
  492. n.useFilterByNormal = !1,
  493. n.highlightPoint = !1,
  494. n.attributes = {
  495. position: {
  496. type: "fv",
  497. value: []
  498. },
  499. color: {
  500. type: "fv",
  501. value: []
  502. },
  503. normal: {
  504. type: "fv",
  505. value: []
  506. },
  507. intensity: {
  508. type: "f",
  509. value: []
  510. },
  511. classification: {
  512. type: "f",
  513. value: []
  514. },
  515. returnNumber: {
  516. type: "f",
  517. value: []
  518. },
  519. numberOfReturns: {
  520. type: "f",
  521. value: []
  522. },
  523. pointSourceID: {
  524. type: "f",
  525. value: []
  526. },
  527. indices: {
  528. type: "fv",
  529. value: []
  530. }
  531. };
  532. var i = n.visibleNodesTexture = O(2048, 1, new f.Color(16777215));
  533. return i.minFilter = f.NearestFilter,
  534. i.magFilter = f.NearestFilter,
  535. n.setUniform("visibleNodes", i),
  536. n.treeType = W(e.treeType, s.OCTREE),
  537. n.size = W(e.size, 1),
  538. n.minSize = W(e.minSize, 2),
  539. n.maxSize = W(e.maxSize, 50),
  540. n.classification = m,
  541. n.defaultAttributeValues.normal = [0, 0, 0],
  542. n.defaultAttributeValues.classification = [0, 0, 0],
  543. n.defaultAttributeValues.indices = [0, 0, 0, 0],
  544. n.vertexColors = !0,
  545. n.updateShaderSource(),
  546. n
  547. }
  548. return D(e, t),
  549. e.prototype.dispose = function() {
  550. t.prototype.dispose.call(this),
  551. this.gradientTexture && (this.gradientTexture.dispose(),
  552. this.gradientTexture = void 0),
  553. this.visibleNodesTexture && (this.visibleNodesTexture.dispose(),
  554. this.visibleNodesTexture = void 0),
  555. this.clearVisibleNodeTextureOffsets(),
  556. this.classificationTexture && (this.classificationTexture.dispose(),
  557. this.classificationTexture = void 0),
  558. this.depthMap && (this.depthMap.dispose(),
  559. this.depthMap = void 0)
  560. }
  561. ,
  562. e.prototype.clearVisibleNodeTextureOffsets = function() {
  563. this.visibleNodeTextureOffsets.clear()
  564. }
  565. ,
  566. e.prototype.updateShaderSource = function() {
  567. this.vertexShader = this.applyDefines(n(4).default),
  568. this.fragmentShader = this.applyDefines(n(5).default),
  569. 1 === this.opacity ? (this.blending = f.NoBlending,
  570. this.transparent = !1,
  571. this.depthTest = !0,
  572. this.depthWrite = !0,
  573. this.depthFunc = f.LessEqualDepth) : this.opacity < 1 && !this.useEDL && (this.blending = f.AdditiveBlending,
  574. this.transparent = !0,
  575. this.depthTest = !1,
  576. this.depthWrite = !0),
  577. this.weighted && (this.blending = f.AdditiveBlending,
  578. this.transparent = !0,
  579. this.depthTest = !0,
  580. this.depthWrite = !1,
  581. this.depthFunc = f.LessEqualDepth),
  582. this.needsUpdate = !0
  583. }
  584. ,
  585. e.prototype.applyDefines = function(t) {
  586. var e = [];
  587. function n(t) {
  588. t && e.push("#define " + t)
  589. }
  590. return n(z[this.treeType]),
  591. n(F[this.pointSizeType]),
  592. n(U[this.shape]),
  593. n(H[this.pointColorType]),
  594. n(V[this.clipMode]),
  595. n(G[this.pointOpacityType]),
  596. 1 === this.rgbGamma && 0 === this.rgbBrightness && 0 === this.rgbContrast || n("use_rgb_gamma_contrast_brightness"),
  597. this.useFilterByNormal && n("use_filter_by_normal"),
  598. this.useEDL && n("use_edl"),
  599. this.weighted && n("weighted_splats"),
  600. this.numClipBoxes > 0 && n("use_clip_box"),
  601. this.highlightPoint && n("highlight_point"),
  602. n("MAX_POINT_LIGHTS 0"),
  603. n("MAX_DIR_LIGHTS 0"),
  604. e.push(t),
  605. e.join("\n")
  606. }
  607. ,
  608. e.prototype.setClipBoxes = function(t) {
  609. if (t) {
  610. this.clipBoxes = t;
  611. var e = this.numClipBoxes !== t.length && (0 === t.length || 0 === this.numClipBoxes);
  612. this.numClipBoxes = t.length,
  613. this.setUniform("clipBoxCount", this.numClipBoxes),
  614. e && this.updateShaderSource();
  615. for (var n = 16 * this.numClipBoxes, i = new Float32Array(n), o = 0; o < this.numClipBoxes; o++)
  616. i.set(t[o].inverse.elements, 16 * o);
  617. for (o = 0; o < n; o++)
  618. isNaN(i[o]) && (i[o] = 1 / 0);
  619. this.setUniform("clipBoxes", i)
  620. }
  621. }
  622. ,
  623. Object.defineProperty(e.prototype, "gradient", {
  624. get: function() {
  625. return this._gradient
  626. },
  627. set: function(t) {
  628. this._gradient !== t && (this._gradient = t,
  629. this.gradientTexture = N(this._gradient),
  630. this.setUniform("gradient", this.gradientTexture))
  631. },
  632. enumerable: !0,
  633. configurable: !0
  634. }),
  635. Object.defineProperty(e.prototype, "classification", {
  636. get: function() {
  637. return this._classification
  638. },
  639. set: function(t) {
  640. for (var e = {}, n = 0, i = Object.keys(t); n < i.length; n++)
  641. e[s = i[n]] = t[s].clone();
  642. var o = !1;
  643. if (void 0 === this._classification)
  644. o = !1;
  645. else {
  646. o = Object.keys(e).length === Object.keys(this._classification).length;
  647. for (var r = 0, a = Object.keys(e); r < a.length; r++) {
  648. var s = a[r];
  649. o = (o = o && void 0 !== this._classification[s]) && e[s].equals(this._classification[s])
  650. }
  651. }
  652. o || (this._classification = e,
  653. this.recomputeClassification())
  654. },
  655. enumerable: !0,
  656. configurable: !0
  657. }),
  658. e.prototype.recomputeClassification = function() {
  659. this.classificationTexture = P(this._classification),
  660. this.setUniform("classificationLUT", this.classificationTexture)
  661. }
  662. ,
  663. Object.defineProperty(e.prototype, "elevationRange", {
  664. get: function() {
  665. return [this.heightMin, this.heightMax]
  666. },
  667. set: function(t) {
  668. this.heightMin = t[0],
  669. this.heightMax = t[1]
  670. },
  671. enumerable: !0,
  672. configurable: !0
  673. }),
  674. e.prototype.getUniform = function(t) {
  675. return void 0 === this.uniforms ? void 0 : this.uniforms[t].value
  676. }
  677. ,
  678. e.prototype.setUniform = function(t, e) {
  679. if (void 0 !== this.uniforms) {
  680. var n = this.uniforms[t];
  681. "c" === n.type ? n.value.copy(e) : e !== n.value && (n.value = e)
  682. }
  683. }
  684. ,
  685. e.prototype.updateMaterial = function(t, n, i, o) {
  686. var a = o.getPixelRatio();
  687. "PerspectiveCamera" === i.type ? this.fov = i.fov * (Math.PI / 180) : this.fov = Math.PI / 2;
  688. var s = o.getRenderTarget();
  689. null !== s && s instanceof f.WebGLRenderTarget ? (this.screenWidth = s.width,
  690. this.screenHeight = s.height) : (this.screenWidth = o.domElement.clientWidth * a,
  691. this.screenHeight = o.domElement.clientHeight * a);
  692. var u = Math.max(t.scale.x, t.scale.y, t.scale.z);
  693. this.spacing = t.pcoGeometry.spacing * u,
  694. this.octreeSize = t.pcoGeometry.boundingBox.getSize(e.helperVec3).x,
  695. this.pointSizeType !== r.ADAPTIVE && this.pointColorType !== l.LOD || this.updateVisibilityTextureData(n)
  696. }
  697. ,
  698. e.prototype.updateVisibilityTextureData = function(t) {
  699. t.sort(v);
  700. var e = new Uint8Array(4 * t.length)
  701. , n = new Array(t.length).fill(1 / 0);
  702. this.visibleNodeTextureOffsets.clear();
  703. for (var i = 0; i < t.length; i++) {
  704. var o = t[i];
  705. if (this.visibleNodeTextureOffsets.set(o.name, i),
  706. i > 0) {
  707. var r = o.name.slice(0, -1)
  708. , a = this.visibleNodeTextureOffsets.get(r)
  709. , s = i - a;
  710. n[a] = Math.min(n[a], s);
  711. var u = 4 * a;
  712. e[u] = e[u] | 1 << o.index,
  713. e[u + 1] = n[a] >> 8,
  714. e[u + 2] = n[a] % 256
  715. }
  716. e[4 * i + 3] = o.name.length
  717. }
  718. var l = this.visibleNodesTexture;
  719. l && (l.image.data.set(e),
  720. l.needsUpdate = !0)
  721. }
  722. ,
  723. e.makeOnBeforeRender = function(t, e, n) {
  724. return function(i, o, r, a, s) {
  725. var u = s
  726. , l = u.uniforms;
  727. l.level.value = e.level,
  728. l.isLeafNode.value = e.isLeafNode;
  729. var f = u.visibleNodeTextureOffsets.get(e.name);
  730. void 0 !== f && (l.vnStart.value = f),
  731. l.pcIndex.value = void 0 !== n ? n : t.visibleNodes.indexOf(e),
  732. s.uniformsNeedUpdate = !0
  733. }
  734. }
  735. ,
  736. e.helperVec3 = new f.Vector3,
  737. R([Y("bbSize")], e.prototype, "bbSize", void 0),
  738. R([Y("depthMap")], e.prototype, "depthMap", void 0),
  739. R([Y("fov")], e.prototype, "fov", void 0),
  740. R([Y("heightMax")], e.prototype, "heightMax", void 0),
  741. R([Y("heightMin")], e.prototype, "heightMin", void 0),
  742. R([Y("intensityBrightness")], e.prototype, "intensityBrightness", void 0),
  743. R([Y("intensityContrast")], e.prototype, "intensityContrast", void 0),
  744. R([Y("intensityGamma")], e.prototype, "intensityGamma", void 0),
  745. R([Y("intensityRange")], e.prototype, "intensityRange", void 0),
  746. R([Y("maxSize")], e.prototype, "maxSize", void 0),
  747. R([Y("minSize")], e.prototype, "minSize", void 0),
  748. R([Y("octreeSize")], e.prototype, "octreeSize", void 0),
  749. R([Y("opacity", !0)], e.prototype, "opacity", void 0),
  750. R([Y("rgbBrightness", !0)], e.prototype, "rgbBrightness", void 0),
  751. R([Y("rgbContrast", !0)], e.prototype, "rgbContrast", void 0),
  752. R([Y("rgbGamma", !0)], e.prototype, "rgbGamma", void 0),
  753. R([Y("screenHeight")], e.prototype, "screenHeight", void 0),
  754. R([Y("screenWidth")], e.prototype, "screenWidth", void 0),
  755. R([Y("size")], e.prototype, "size", void 0),
  756. R([Y("spacing")], e.prototype, "spacing", void 0),
  757. R([Y("transition")], e.prototype, "transition", void 0),
  758. R([Y("uColor")], e.prototype, "color", void 0),
  759. R([Y("wClassification")], e.prototype, "weightClassification", void 0),
  760. R([Y("wElevation")], e.prototype, "weightElevation", void 0),
  761. R([Y("wIntensity")], e.prototype, "weightIntensity", void 0),
  762. R([Y("wReturnNumber")], e.prototype, "weightReturnNumber", void 0),
  763. R([Y("wRGB")], e.prototype, "weightRGB", void 0),
  764. R([Y("wSourceID")], e.prototype, "weightSourceID", void 0),
  765. R([Y("opacityAttenuation")], e.prototype, "opacityAttenuation", void 0),
  766. R([Y("filterByNormalThreshold")], e.prototype, "filterByNormalThreshold", void 0),
  767. R([Y("highlightedPointCoordinate")], e.prototype, "highlightedPointCoordinate", void 0),
  768. R([Y("highlightedPointColor")], e.prototype, "highlightedPointColor", void 0),
  769. R([Y("enablePointHighlighting")], e.prototype, "enablePointHighlighting", void 0),
  770. R([Y("highlightedPointScale")], e.prototype, "highlightedPointScale", void 0),
  771. R([X()], e.prototype, "useClipBox", void 0),
  772. R([X()], e.prototype, "weighted", void 0),
  773. R([X()], e.prototype, "pointColorType", void 0),
  774. R([X()], e.prototype, "pointSizeType", void 0),
  775. R([X()], e.prototype, "clipMode", void 0),
  776. R([X()], e.prototype, "useEDL", void 0),
  777. R([X()], e.prototype, "shape", void 0),
  778. R([X()], e.prototype, "treeType", void 0),
  779. R([X()], e.prototype, "pointOpacityType", void 0),
  780. R([X()], e.prototype, "useFilterByNormal", void 0),
  781. R([X()], e.prototype, "highlightPoint", void 0),
  782. e
  783. }(f.RawShaderMaterial);
  784. function k(t, e) {
  785. return {
  786. type: t,
  787. value: e
  788. }
  789. }
  790. function W(t, e) {
  791. return void 0 === t ? e : t
  792. }
  793. function Y(t, e) {
  794. return void 0 === e && (e = !1),
  795. function(n, i) {
  796. Object.defineProperty(n, i, {
  797. get: function() {
  798. return this.getUniform(t)
  799. },
  800. set: function(n) {
  801. n !== this.getUniform(t) && (this.setUniform(t, n),
  802. e && this.updateShaderSource())
  803. }
  804. })
  805. }
  806. }
  807. function X() {
  808. return function(t, e) {
  809. var n = "_" + e.toString();
  810. Object.defineProperty(t, e, {
  811. get: function() {
  812. return this[n]
  813. },
  814. set: function(t) {
  815. t !== this[n] && (this[n] = t,
  816. this.updateShaderSource())
  817. }
  818. })
  819. }
  820. }
  821. !function(t) {
  822. t[t.POSITION_CARTESIAN = 0] = "POSITION_CARTESIAN",
  823. t[t.COLOR_PACKED = 1] = "COLOR_PACKED",
  824. t[t.COLOR_FLOATS_1 = 2] = "COLOR_FLOATS_1",
  825. t[t.COLOR_FLOATS_255 = 3] = "COLOR_FLOATS_255",
  826. t[t.NORMAL_FLOATS = 4] = "NORMAL_FLOATS",
  827. t[t.FILLER = 5] = "FILLER",
  828. t[t.INTENSITY = 6] = "INTENSITY",
  829. t[t.CLASSIFICATION = 7] = "CLASSIFICATION",
  830. t[t.NORMAL_SPHEREMAPPED = 8] = "NORMAL_SPHEREMAPPED",
  831. t[t.NORMAL_OCT16 = 9] = "NORMAL_OCT16",
  832. t[t.NORMAL = 10] = "NORMAL"
  833. }(L || (L = {}));
  834. var K = {
  835. DATA_TYPE_DOUBLE: {
  836. ordinal: 0,
  837. size: 8
  838. },
  839. DATA_TYPE_FLOAT: {
  840. ordinal: 1,
  841. size: 4
  842. },
  843. DATA_TYPE_INT8: {
  844. ordinal: 2,
  845. size: 1
  846. },
  847. DATA_TYPE_UINT8: {
  848. ordinal: 3,
  849. size: 1
  850. },
  851. DATA_TYPE_INT16: {
  852. ordinal: 4,
  853. size: 2
  854. },
  855. DATA_TYPE_UINT16: {
  856. ordinal: 5,
  857. size: 2
  858. },
  859. DATA_TYPE_INT32: {
  860. ordinal: 6,
  861. size: 4
  862. },
  863. DATA_TYPE_UINT32: {
  864. ordinal: 7,
  865. size: 4
  866. },
  867. DATA_TYPE_INT64: {
  868. ordinal: 8,
  869. size: 8
  870. },
  871. DATA_TYPE_UINT64: {
  872. ordinal: 9,
  873. size: 8
  874. }
  875. };
  876. function q(t, e, n) {
  877. return {
  878. name: t,
  879. type: e,
  880. numElements: n,
  881. byteSize: n * e.size
  882. }
  883. }
  884. var Q = q(L.COLOR_PACKED, K.DATA_TYPE_INT8, 4)
  885. , J = {
  886. POSITION_CARTESIAN: q(L.POSITION_CARTESIAN, K.DATA_TYPE_FLOAT, 3),
  887. RGBA_PACKED: Q,
  888. COLOR_PACKED: Q,
  889. RGB_PACKED: q(L.COLOR_PACKED, K.DATA_TYPE_INT8, 3),
  890. NORMAL_FLOATS: q(L.NORMAL_FLOATS, K.DATA_TYPE_FLOAT, 3),
  891. FILLER_1B: q(L.FILLER, K.DATA_TYPE_UINT8, 1),
  892. INTENSITY: q(L.INTENSITY, K.DATA_TYPE_UINT16, 1),
  893. CLASSIFICATION: q(L.CLASSIFICATION, K.DATA_TYPE_UINT8, 1),
  894. NORMAL_SPHEREMAPPED: q(L.NORMAL_SPHEREMAPPED, K.DATA_TYPE_UINT8, 2),
  895. NORMAL_OCT16: q(L.NORMAL_OCT16, K.DATA_TYPE_UINT8, 2),
  896. NORMAL: q(L.NORMAL, K.DATA_TYPE_FLOAT, 3)
  897. }
  898. , Z = function() {
  899. function t(t) {
  900. void 0 === t && (t = []),
  901. this.attributes = [],
  902. this.byteSize = 0,
  903. this.size = 0;
  904. for (var e = 0; e < t.length; e++) {
  905. var n = t[e]
  906. , i = J[n];
  907. this.attributes.push(i),
  908. this.byteSize += i.byteSize,
  909. this.size++
  910. }
  911. }
  912. return t.prototype.add = function(t) {
  913. this.attributes.push(t),
  914. this.byteSize += t.byteSize,
  915. this.size++
  916. }
  917. ,
  918. t.prototype.hasColors = function() {
  919. return void 0 !== this.attributes.find($)
  920. }
  921. ,
  922. t.prototype.hasNormals = function() {
  923. return void 0 !== this.attributes.find(tt)
  924. }
  925. ,
  926. t
  927. }();
  928. function $(t) {
  929. return t.name === L.COLOR_PACKED
  930. }
  931. function tt(t) {
  932. var e = t.name;
  933. return e === L.NORMAL_SPHEREMAPPED || e === L.NORMAL_FLOATS || e === L.NORMAL || e === L.NORMAL_OCT16
  934. }
  935. function et(t, e) {
  936. return (new f.Box3).setFromPoints([new f.Vector3(t.min.x,t.min.y,t.min.z).applyMatrix4(e), new f.Vector3(t.min.x,t.min.y,t.min.z).applyMatrix4(e), new f.Vector3(t.max.x,t.min.y,t.min.z).applyMatrix4(e), new f.Vector3(t.min.x,t.max.y,t.min.z).applyMatrix4(e), new f.Vector3(t.min.x,t.min.y,t.max.z).applyMatrix4(e), new f.Vector3(t.min.x,t.max.y,t.max.z).applyMatrix4(e), new f.Vector3(t.max.x,t.max.y,t.min.z).applyMatrix4(e), new f.Vector3(t.max.x,t.min.y,t.max.z).applyMatrix4(e), new f.Vector3(t.max.x,t.max.y,t.max.z).applyMatrix4(e)])
  937. }
  938. function nt(t, e) {
  939. var n = t.min.clone()
  940. , i = t.max.clone()
  941. , o = (new f.Vector3).subVectors(i, n);
  942. return (1 & e) > 0 ? n.z += o.z / 2 : i.z -= o.z / 2,
  943. (2 & e) > 0 ? n.y += o.y / 2 : i.y -= o.y / 2,
  944. (4 & e) > 0 ? n.x += o.x / 2 : i.x -= o.x / 2,
  945. new f.Box3(n,i)
  946. }
  947. var it = function() {
  948. var t = function(e, n) {
  949. return (t = Object.setPrototypeOf || {
  950. __proto__: []
  951. }instanceof Array && function(t, e) {
  952. t.__proto__ = e
  953. }
  954. || function(t, e) {
  955. for (var n in e)
  956. e.hasOwnProperty(n) && (t[n] = e[n])
  957. }
  958. )(e, n)
  959. };
  960. return function(e, n) {
  961. function i() {
  962. this.constructor = e
  963. }
  964. t(e, n),
  965. e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype,
  966. new i)
  967. }
  968. }()
  969. , ot = function(t) {
  970. function e(n, i, o) {
  971. var r = t.call(this) || this;
  972. return r.id = e.idCount++,
  973. r.level = 0,
  974. r.spacing = 0,
  975. r.hasChildren = !1,
  976. r.children = [null, null, null, null, null, null, null, null],
  977. r.mean = new f.Vector3,
  978. r.numPoints = 0,
  979. r.loaded = !1,
  980. r.loading = !1,
  981. r.failed = !1,
  982. r.parent = null,
  983. r.oneTimeDisposeHandlers = [],
  984. r.isLeafNode = !0,
  985. r.isTreeNode = !1,
  986. r.isGeometryNode = !0,
  987. r.name = n,
  988. r.index = g(n),
  989. r.pcoGeometry = i,
  990. r.boundingBox = o,
  991. r.tightBoundingBox = o.clone(),
  992. r.boundingSphere = o.getBoundingSphere(new f.Sphere),
  993. r
  994. }
  995. return it(e, t),
  996. e.prototype.dispose = function() {
  997. this.geometry && this.parent && (this.geometry.dispose(),
  998. this.geometry = void 0,
  999. this.loaded = !1,
  1000. this.oneTimeDisposeHandlers.forEach((function(t) {
  1001. return t()
  1002. }
  1003. )),
  1004. this.oneTimeDisposeHandlers = [])
  1005. }
  1006. ,
  1007. e.prototype.getUrl = function() {
  1008. var t = this.pcoGeometry
  1009. , e = t.loader.version
  1010. , n = [t.octreeDir];
  1011. return t.loader && e.equalOrHigher("1.5") ? (n.push(this.getHierarchyBaseUrl()),
  1012. n.push(this.name)) : (e.equalOrHigher("1.4") || e.upTo("1.3")) && n.push(this.name),
  1013. n.join("/")
  1014. }
  1015. ,
  1016. e.prototype.getHierarchyUrl = function() {
  1017. let hrcUrl = this.pcoGeometry.octreeDir + "/" + this.getHierarchyBaseUrl() + "/" + this.name + ".hrc"
  1018. return hrcUrl;
  1019. }
  1020. ,
  1021. e.prototype.addChild = function(t) {
  1022. this.children[t.index] = t,
  1023. this.isLeafNode = !1,
  1024. t.parent = this
  1025. }
  1026. ,
  1027. e.prototype.traverse = function(t, e) {
  1028. void 0 === e && (e = !0);
  1029. for (var n, i = e ? [this] : []; void 0 !== (n = i.pop()); ) {
  1030. t(n);
  1031. for (var o = 0, r = n.children; o < r.length; o++) {
  1032. var a = r[o];
  1033. null !== a && i.push(a)
  1034. }
  1035. }
  1036. }
  1037. ,
  1038. e.prototype.load = function() {
  1039. var t = this;
  1040. return this.canLoad() ? (this.loading = !0,
  1041. this.pcoGeometry.numNodesLoading++,
  1042. this.pcoGeometry.needsUpdate = !0,
  1043. (this.pcoGeometry.loader.version.equalOrHigher("1.5") && this.level % this.pcoGeometry.hierarchyStepSize == 0 && this.hasChildren ? this.loadHierachyThenPoints() : this.loadPoints()).catch((function(e) {
  1044. throw t.loading = !1,
  1045. t.failed = !0,
  1046. t.pcoGeometry.numNodesLoading--,
  1047. e
  1048. }
  1049. ))) : Promise.resolve()
  1050. }
  1051. ,
  1052. e.prototype.canLoad = function() {
  1053. return !this.loading && !this.loaded && !this.pcoGeometry.disposed && !this.pcoGeometry.loader.disposed && this.pcoGeometry.numNodesLoading < this.pcoGeometry.maxNumNodesLoading
  1054. }
  1055. ,
  1056. e.prototype.loadPoints = function() {
  1057. return this.pcoGeometry.needsUpdate = !0,
  1058. this.pcoGeometry.loader.load(this)
  1059. }
  1060. ,
  1061. e.prototype.loadHierachyThenPoints = function() {
  1062. var t = this;
  1063. return this.level % this.pcoGeometry.hierarchyStepSize != 0 ? Promise.resolve() : Promise.resolve(this.pcoGeometry.loader.getUrl(this.getHierarchyUrl())).then((function(e) {
  1064. return t.pcoGeometry.xhrRequest(e, {
  1065. mode: "cors"
  1066. })
  1067. }
  1068. )).then((function(t) {
  1069. return t.arrayBuffer()
  1070. }
  1071. )).then((function(e) {
  1072. return t.loadHierarchy(t, e)
  1073. }
  1074. ))
  1075. }
  1076. ,
  1077. e.prototype.getHierarchyBaseUrl = function() {
  1078. for (var t = this.pcoGeometry.hierarchyStepSize, e = this.name.substr(1), n = Math.floor(e.length / t), i = "r/", o = 0; o < n; o++)
  1079. i += e.substr(o * t, t) + "/";
  1080. return i.slice(0, -1)
  1081. }
  1082. ,
  1083. e.prototype.loadHierarchy = function(t, e) {
  1084. var n = this
  1085. , i = new DataView(e)
  1086. , o = this.getNodeData(t.name, 0, i);
  1087. t.numPoints = o.numPoints;
  1088. for (var r = [o], a = [], s = 5; r.length > 0; )
  1089. for (var u = r.shift(), l = 1, f = 0; f < 8 && s + 1 < e.byteLength; f++) {
  1090. if (0 != (u.children & l)) {
  1091. var d = this.getNodeData(u.name + f, s, i);
  1092. a.push(d),
  1093. r.push(d),
  1094. s += 5
  1095. }
  1096. l *= 2
  1097. }
  1098. t.pcoGeometry.needsUpdate = !0;
  1099. var p = new Map;
  1100. p.set(t.name, t),
  1101. a.forEach((function(e) {
  1102. return n.addNode(e, t.pcoGeometry, p)
  1103. }
  1104. )),
  1105. t.loadPoints()
  1106. }
  1107. ,
  1108. e.prototype.getNodeData = function(t, e, n) {
  1109. return {
  1110. children: n.getUint8(e),
  1111. numPoints: n.getUint32(e + 1, !0),
  1112. name: t
  1113. }
  1114. }
  1115. ,
  1116. e.prototype.addNode = function(t, n, i) {
  1117. var o = t.name
  1118. , r = t.numPoints
  1119. , a = t.children
  1120. , s = g(o)
  1121. , u = o.substring(0, o.length - 1)
  1122. , l = i.get(u)
  1123. , f = o.length - 1
  1124. , d = new e(o,n,nt(l.boundingBox, s));
  1125. d.level = f,
  1126. d.numPoints = r,
  1127. d.hasChildren = a > 0,
  1128. d.spacing = n.spacing / Math.pow(2, f),
  1129. l.addChild(d),
  1130. i.set(o, d)
  1131. }
  1132. ,
  1133. e.idCount = 0,
  1134. e
  1135. }(f.EventDispatcher)
  1136. , rt = function() {
  1137. function t(t, e, n, i, o) {
  1138. this.loader = t,
  1139. this.boundingBox = e,
  1140. this.tightBoundingBox = n,
  1141. this.offset = i,
  1142. this.xhrRequest = o,
  1143. this.disposed = !1,
  1144. this.needsUpdate = !0,
  1145. this.octreeDir = "",
  1146. this.hierarchyStepSize = -1,
  1147. this.nodes = {},
  1148. this.numNodesLoading = 0,
  1149. this.maxNumNodesLoading = 3,
  1150. this.spacing = 0,
  1151. this.pointAttributes = new Z([]),
  1152. this.projection = null,
  1153. this.url = null
  1154. }
  1155. return t.prototype.dispose = function() {
  1156. this.loader.dispose(),
  1157. this.root.traverse((function(t) {
  1158. return t.dispose()
  1159. }
  1160. )),
  1161. this.disposed = !0
  1162. }
  1163. ,
  1164. t.prototype.addNodeLoadedCallback = function(t) {
  1165. this.loader.callbacks.push(t)
  1166. }
  1167. ,
  1168. t.prototype.clearNodeLoadedCallbacks = function() {
  1169. this.loader.callbacks = []
  1170. }
  1171. ,
  1172. t
  1173. }()
  1174. , at = function() {
  1175. var t = function(e, n) {
  1176. return (t = Object.setPrototypeOf || {
  1177. __proto__: []
  1178. }instanceof Array && function(t, e) {
  1179. t.__proto__ = e
  1180. }
  1181. || function(t, e) {
  1182. for (var n in e)
  1183. e.hasOwnProperty(n) && (t[n] = e[n])
  1184. }
  1185. )(e, n)
  1186. };
  1187. return function(e, n) {
  1188. function i() {
  1189. this.constructor = e
  1190. }
  1191. t(e, n),
  1192. e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype,
  1193. new i)
  1194. }
  1195. }()
  1196. , st = function(t) {
  1197. function e(e, n) {
  1198. var i = t.call(this) || this;
  1199. return i.pcIndex = void 0,
  1200. i.boundingBoxNode = null,
  1201. i.loaded = !0,
  1202. i.isTreeNode = !0,
  1203. i.isGeometryNode = !1,
  1204. i.geometryNode = e,
  1205. i.sceneNode = n,
  1206. i.children = e.children.slice(),
  1207. i
  1208. }
  1209. return at(e, t),
  1210. e.prototype.dispose = function() {
  1211. this.geometryNode.dispose()
  1212. }
  1213. ,
  1214. e.prototype.disposeSceneNode = function() {
  1215. var t = this.sceneNode;
  1216. if (t.geometry instanceof f.BufferGeometry) {
  1217. var e = t.geometry.attributes;
  1218. for (var n in e)
  1219. "position" === n && delete e[n].array,
  1220. delete e[n];
  1221. t.geometry.dispose(),
  1222. t.geometry = void 0
  1223. }
  1224. }
  1225. ,
  1226. e.prototype.traverse = function(t, e) {
  1227. this.geometryNode.traverse(t, e)
  1228. }
  1229. ,
  1230. Object.defineProperty(e.prototype, "id", {
  1231. get: function() {
  1232. return this.geometryNode.id
  1233. },
  1234. enumerable: !0,
  1235. configurable: !0
  1236. }),
  1237. Object.defineProperty(e.prototype, "name", {
  1238. get: function() {
  1239. return this.geometryNode.name
  1240. },
  1241. enumerable: !0,
  1242. configurable: !0
  1243. }),
  1244. Object.defineProperty(e.prototype, "level", {
  1245. get: function() {
  1246. return this.geometryNode.level
  1247. },
  1248. enumerable: !0,
  1249. configurable: !0
  1250. }),
  1251. Object.defineProperty(e.prototype, "isLeafNode", {
  1252. get: function() {
  1253. return this.geometryNode.isLeafNode
  1254. },
  1255. enumerable: !0,
  1256. configurable: !0
  1257. }),
  1258. Object.defineProperty(e.prototype, "numPoints", {
  1259. get: function() {
  1260. return this.geometryNode.numPoints
  1261. },
  1262. enumerable: !0,
  1263. configurable: !0
  1264. }),
  1265. Object.defineProperty(e.prototype, "index", {
  1266. get: function() {
  1267. return this.geometryNode.index
  1268. },
  1269. enumerable: !0,
  1270. configurable: !0
  1271. }),
  1272. Object.defineProperty(e.prototype, "boundingSphere", {
  1273. get: function() {
  1274. return this.geometryNode.boundingSphere
  1275. },
  1276. enumerable: !0,
  1277. configurable: !0
  1278. }),
  1279. Object.defineProperty(e.prototype, "boundingBox", {
  1280. get: function() {
  1281. return this.geometryNode.boundingBox
  1282. },
  1283. enumerable: !0,
  1284. configurable: !0
  1285. }),
  1286. Object.defineProperty(e.prototype, "spacing", {
  1287. get: function() {
  1288. return this.geometryNode.spacing
  1289. },
  1290. enumerable: !0,
  1291. configurable: !0
  1292. }),
  1293. e
  1294. }(f.EventDispatcher);
  1295. function ut(t, e, n) {
  1296. return Math.min(Math.max(e, t), n)
  1297. }
  1298. var lt = function() {
  1299. function t() {}
  1300. return t.prototype.dispose = function() {
  1301. this.pickState && (this.pickState.material.dispose(),
  1302. this.pickState.renderTarget.dispose())
  1303. }
  1304. ,
  1305. t.prototype.pick = function(e, n, i, o, r) {
  1306. if (void 0 === r && (r = {}),
  1307. 0 === o.length)
  1308. return null;
  1309. var a = this.pickState ? this.pickState : this.pickState = t.getPickState()
  1310. , s = a.material
  1311. , u = e.getPixelRatio()
  1312. , l = Math.ceil(e.domElement.clientWidth * u)
  1313. , f = Math.ceil(e.domElement.clientHeight * u);
  1314. t.updatePickRenderTarget(this.pickState, l, f);
  1315. var d = t.helperVec3;
  1316. r.pixelPosition ? d.copy(r.pixelPosition) : (d.addVectors(n.position, i.direction).project(n),
  1317. d.x = (d.x + 1) * l * .5,
  1318. d.y = (d.y + 1) * f * .5);
  1319. var p = Math.floor((r.pickWindowSize || 15) * u)
  1320. , c = (p - 1) / 2
  1321. , h = Math.floor(ut(d.x - c, 0, l))
  1322. , g = Math.floor(ut(d.y - c, 0, f));
  1323. t.prepareRender(e, h, g, p, s, a);
  1324. var v = t.render(e, n, s, o, i, a, r);
  1325. s.clearVisibleNodeTextureOffsets();
  1326. var m = t.readPixels(e, h, g, p)
  1327. , y = t.findHit(m, p);
  1328. return t.getPickPoint(y, v)
  1329. }
  1330. ,
  1331. t.prepareRender = function(t, e, n, i, o, r) {
  1332. t.setScissor(e, n, i, i),
  1333. t.setScissorTest(!0),
  1334. t.state.buffers.depth.setTest(o.depthTest),
  1335. t.state.buffers.depth.setMask(o.depthWrite),
  1336. t.state.setBlending(f.NoBlending),
  1337. t.setRenderTarget(r.renderTarget);
  1338. var a = t.getClearColor()
  1339. , s = t.getClearAlpha();
  1340. t.setClearColor(c, 0),
  1341. t.clear(!0, !0, !0),
  1342. t.setClearColor(a, s)
  1343. }
  1344. ,
  1345. t.render = function(e, n, i, o, r, a, s) {
  1346. for (var u = [], l = function(o) {
  1347. var l = t.nodesOnRay(o, r);
  1348. if (!l.length)
  1349. return "continue";
  1350. t.updatePickMaterial(i, o.material, s),
  1351. i.updateMaterial(o, l, n, e),
  1352. s.onBeforePickRender && s.onBeforePickRender(i, a.renderTarget),
  1353. a.scene.children = t.createTempNodes(o, l, i, u.length),
  1354. e.render(a.scene, n),
  1355. l.forEach((function(t) {
  1356. return u.push({
  1357. node: t,
  1358. octree: o
  1359. })
  1360. }
  1361. ))
  1362. }, f = 0, d = o; f < d.length; f++)
  1363. l(d[f]);
  1364. return u
  1365. }
  1366. ,
  1367. t.nodesOnRay = function(e, n) {
  1368. for (var i = [], o = n.clone(), r = 0, a = e.visibleNodes; r < a.length; r++) {
  1369. var s = a[r]
  1370. , u = t.helperSphere.copy(s.boundingSphere).applyMatrix4(e.matrixWorld);
  1371. o.intersectsSphere(u) && i.push(s)
  1372. }
  1373. return i
  1374. }
  1375. ,
  1376. t.readPixels = function(t, e, n, i) {
  1377. var o = new Uint8Array(4 * i * i);
  1378. return t.readRenderTargetPixels(t.getRenderTarget(), e, n, i, i, o),
  1379. t.setScissorTest(!1),
  1380. t.setRenderTarget(null),
  1381. o
  1382. }
  1383. ,
  1384. t.createTempNodes = function(t, e, n, i) {
  1385. for (var o = [], r = 0; r < e.length; r++) {
  1386. var a = e[r]
  1387. , s = a.sceneNode
  1388. , u = new f.Points(s.geometry,n);
  1389. u.matrix = s.matrix,
  1390. u.matrixWorld = s.matrixWorld,
  1391. u.matrixAutoUpdate = !1,
  1392. u.frustumCulled = !1;
  1393. var l = i + r + 1;
  1394. l > 255 && console.error("More than 255 nodes for pick are not supported."),
  1395. u.onBeforeRender = j.makeOnBeforeRender(t, a, l),
  1396. o.push(u)
  1397. }
  1398. return o
  1399. }
  1400. ,
  1401. t.updatePickMaterial = function(t, e, n) {
  1402. t.pointSizeType = e.pointSizeType,
  1403. t.shape = e.shape,
  1404. t.size = e.size,
  1405. t.minSize = e.minSize,
  1406. t.maxSize = e.maxSize,
  1407. t.classification = e.classification,
  1408. t.useFilterByNormal = e.useFilterByNormal,
  1409. t.filterByNormalThreshold = e.filterByNormalThreshold,
  1410. n.pickOutsideClipRegion ? t.clipMode = o.DISABLED : (t.clipMode = e.clipMode,
  1411. t.setClipBoxes(e.clipMode === o.CLIP_OUTSIDE ? e.clipBoxes : []))
  1412. }
  1413. ,
  1414. t.updatePickRenderTarget = function(e, n, i) {
  1415. e.renderTarget.width === n && e.renderTarget.height === i || (e.renderTarget.dispose(),
  1416. e.renderTarget = t.makePickRenderTarget(),
  1417. e.renderTarget.setSize(n, i))
  1418. }
  1419. ,
  1420. t.makePickRenderTarget = function() {
  1421. return new f.WebGLRenderTarget(1,1,{
  1422. minFilter: f.LinearFilter,
  1423. magFilter: f.NearestFilter,
  1424. format: f.RGBAFormat
  1425. })
  1426. }
  1427. ,
  1428. t.findHit = function(t, e) {
  1429. for (var n = new Uint32Array(t.buffer), i = Number.MAX_VALUE, o = null, r = 0; r < e; r++)
  1430. for (var a = 0; a < e; a++) {
  1431. var s = r + a * e
  1432. , u = Math.pow(r - (e - 1) / 2, 2) + Math.pow(a - (e - 1) / 2, 2)
  1433. , l = t[4 * s + 3];
  1434. t[4 * s + 3] = 0;
  1435. var f = n[s];
  1436. l > 0 && u < i && (o = {
  1437. pIndex: f,
  1438. pcIndex: l - 1
  1439. },
  1440. i = u)
  1441. }
  1442. return o
  1443. }
  1444. ,
  1445. t.getPickPoint = function(e, n) {
  1446. if (!e)
  1447. return null;
  1448. var i = {}
  1449. , o = n[e.pcIndex] && n[e.pcIndex].node.sceneNode;
  1450. if (!o)
  1451. return null;
  1452. i.pointCloud = n[e.pcIndex].octree;
  1453. var r = o.geometry.attributes;
  1454. for (var a in r)
  1455. if (r.hasOwnProperty(a)) {
  1456. var s = r[a];
  1457. if ("position" === a)
  1458. t.addPositionToPickPoint(i, e, s, o);
  1459. else if ("normal" === a)
  1460. t.addNormalToPickPoint(i, e, s, o);
  1461. else if ("indices" === a)
  1462. ;
  1463. else if (1 === s.itemSize)
  1464. i[a] = s.array[e.pIndex];
  1465. else {
  1466. for (var u = [], l = 0; l < s.itemSize; l++)
  1467. u.push(s.array[s.itemSize * e.pIndex + l]);
  1468. i[a] = u
  1469. }
  1470. }
  1471. return i
  1472. }
  1473. ,
  1474. t.addPositionToPickPoint = function(t, e, n, i) {
  1475. t.position = (new f.Vector3).fromBufferAttribute(n, e.pIndex).applyMatrix4(i.matrixWorld)
  1476. }
  1477. ,
  1478. t.addNormalToPickPoint = function(t, e, n, i) {
  1479. var o = (new f.Vector3).fromBufferAttribute(n, e.pIndex)
  1480. , r = new f.Vector4(o.x,o.y,o.z,0).applyMatrix4(i.matrixWorld);
  1481. o.set(r.x, r.y, r.z),
  1482. t.normal = o
  1483. }
  1484. ,
  1485. t.getPickState = function() {
  1486. var e = new f.Scene;
  1487. e.autoUpdate = !1;
  1488. var n = new j;
  1489. return n.pointColorType = l.POINT_INDEX,
  1490. {
  1491. renderTarget: t.makePickRenderTarget(),
  1492. material: n,
  1493. scene: e
  1494. }
  1495. }
  1496. ,
  1497. t.helperVec3 = new f.Vector3,
  1498. t.helperSphere = new f.Sphere,
  1499. t
  1500. }()
  1501. , ft = function() {
  1502. var t = function(e, n) {
  1503. return (t = Object.setPrototypeOf || {
  1504. __proto__: []
  1505. }instanceof Array && function(t, e) {
  1506. t.__proto__ = e
  1507. }
  1508. || function(t, e) {
  1509. for (var n in e)
  1510. e.hasOwnProperty(n) && (t[n] = e[n])
  1511. }
  1512. )(e, n)
  1513. };
  1514. return function(e, n) {
  1515. function i() {
  1516. this.constructor = e
  1517. }
  1518. t(e, n),
  1519. e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype,
  1520. new i)
  1521. }
  1522. }()
  1523. , dt = function(t) {
  1524. function e() {
  1525. var e = null !== t && t.apply(this, arguments) || this;
  1526. return e.root = null,
  1527. e
  1528. }
  1529. return ft(e, t),
  1530. e.prototype.initialized = function() {
  1531. return null !== this.root
  1532. }
  1533. ,
  1534. e
  1535. }(f.Object3D)
  1536. , pt = function() {
  1537. var t = function(e, n) {
  1538. return (t = Object.setPrototypeOf || {
  1539. __proto__: []
  1540. }instanceof Array && function(t, e) {
  1541. t.__proto__ = e
  1542. }
  1543. || function(t, e) {
  1544. for (var n in e)
  1545. e.hasOwnProperty(n) && (t[n] = e[n])
  1546. }
  1547. )(e, n)
  1548. };
  1549. return function(e, n) {
  1550. function i() {
  1551. this.constructor = e
  1552. }
  1553. t(e, n),
  1554. e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype,
  1555. new i)
  1556. }
  1557. }()
  1558. , ct = function(t) {
  1559. function e(e, n, i) {
  1560. var o = t.call(this) || this;
  1561. return o.disposed = !1,
  1562. o.level = 0,
  1563. o.maxLevel = 1 / 0,
  1564. o.minNodePixelSize = 50,
  1565. o.root = null,
  1566. o.boundingBoxNodes = [],
  1567. o.visibleNodes = [],
  1568. o.visibleGeometry = [],
  1569. o.numVisiblePoints = 0,
  1570. o.showBoundingBox = !1,
  1571. o.visibleBounds = new f.Box3,
  1572. o.name = "",
  1573. o.potree = e,
  1574. o.root = n.root,
  1575. o.pcoGeometry = n,
  1576. o.boundingBox = n.boundingBox,
  1577. o.boundingSphere = o.boundingBox.getBoundingSphere(new f.Sphere),
  1578. o.position.copy(n.offset),
  1579. o.updateMatrix(),
  1580. o.material = i || new j,
  1581. o.initMaterial(o.material),
  1582. o
  1583. }
  1584. return pt(e, t),
  1585. e.prototype.initMaterial = function(t) {
  1586. this.updateMatrixWorld(!0);
  1587. var e = et(this.pcoGeometry.tightBoundingBox || this.getBoundingBoxWorld(), this.matrixWorld)
  1588. , n = e.min
  1589. , i = e.max
  1590. , o = i.z - n.z;
  1591. t.heightMin = n.z - .2 * o,
  1592. t.heightMax = i.z + .2 * o
  1593. }
  1594. ,
  1595. e.prototype.dispose = function() {
  1596. var t = this;
  1597. this.root && this.root.dispose(),
  1598. this.pcoGeometry.root.traverse((function(e) {
  1599. return t.potree.lru.remove(e)
  1600. }
  1601. )),
  1602. this.pcoGeometry.dispose(),
  1603. this.material.dispose(),
  1604. this.visibleNodes = [],
  1605. this.visibleGeometry = [],
  1606. this.picker && (this.picker.dispose(),
  1607. this.picker = void 0),
  1608. this.disposed = !0
  1609. }
  1610. ,
  1611. Object.defineProperty(e.prototype, "pointSizeType", {
  1612. get: function() {
  1613. return this.material.pointSizeType
  1614. },
  1615. set: function(t) {
  1616. this.material.pointSizeType = t
  1617. },
  1618. enumerable: !0,
  1619. configurable: !0
  1620. }),
  1621. e.prototype.toTreeNode = function(t, e) {
  1622. var n = new f.Points(t.geometry,this.material)
  1623. , i = new st(t,n);
  1624. return n.name = t.name,
  1625. n.position.copy(t.boundingBox.min),
  1626. n.frustumCulled = !1,
  1627. n.onBeforeRender = j.makeOnBeforeRender(this, i),
  1628. e ? (e.sceneNode.add(n),
  1629. e.children[t.index] = i,
  1630. t.oneTimeDisposeHandlers.push((function() {
  1631. i.disposeSceneNode(),
  1632. e.sceneNode.remove(i.sceneNode),
  1633. e.children[t.index] = t
  1634. }
  1635. ))) : (this.root = i,
  1636. this.add(n)),
  1637. i
  1638. }
  1639. ,
  1640. e.prototype.updateVisibleBounds = function() {
  1641. var t = this.visibleBounds;
  1642. t.min.set(1 / 0, 1 / 0, 1 / 0),
  1643. t.max.set(-1 / 0, -1 / 0, -1 / 0);
  1644. for (var e = 0, n = this.visibleNodes; e < n.length; e++) {
  1645. var i = n[e];
  1646. i.isLeafNode && (t.expandByPoint(i.boundingBox.min),
  1647. t.expandByPoint(i.boundingBox.max))
  1648. }
  1649. }
  1650. ,
  1651. e.prototype.updateBoundingBoxes = function() {
  1652. if (this.showBoundingBox && this.parent) {
  1653. var t = this.parent.getObjectByName("bbroot");
  1654. t || ((t = new f.Object3D).name = "bbroot",
  1655. this.parent.add(t));
  1656. for (var e = [], n = 0, i = this.visibleNodes; n < i.length; n++) {
  1657. var o = i[n];
  1658. void 0 !== o.boundingBoxNode && o.isLeafNode && e.push(o.boundingBoxNode)
  1659. }
  1660. t.children = e
  1661. }
  1662. }
  1663. ,
  1664. e.prototype.updateMatrixWorld = function(t) {
  1665. !0 === this.matrixAutoUpdate && this.updateMatrix(),
  1666. !0 !== this.matrixWorldNeedsUpdate && !0 !== t || (this.parent ? this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix) : this.matrixWorld.copy(this.matrix),
  1667. this.matrixWorldNeedsUpdate = !1,
  1668. t = !0)
  1669. }
  1670. ,
  1671. e.prototype.hideDescendants = function(t) {
  1672. var e = [];
  1673. for (i(t); e.length > 0; ) {
  1674. var n = e.shift();
  1675. n.visible = !1,
  1676. i(n)
  1677. }
  1678. function i(t) {
  1679. for (var n = 0, i = t.children; n < i.length; n++) {
  1680. var o = i[n];
  1681. o.visible && e.push(o)
  1682. }
  1683. }
  1684. }
  1685. ,
  1686. e.prototype.moveToOrigin = function() {
  1687. this.position.set(0, 0, 0),
  1688. this.position.set(0, 0, 0).sub(this.getBoundingBoxWorld().getCenter(new f.Vector3))
  1689. }
  1690. ,
  1691. e.prototype.moveToGroundPlane = function() {
  1692. this.position.y += -this.getBoundingBoxWorld().min.y
  1693. }
  1694. ,
  1695. e.prototype.getBoundingBoxWorld = function() {
  1696. return this.updateMatrixWorld(!0),
  1697. et(this.boundingBox, this.matrixWorld)
  1698. }
  1699. ,
  1700. e.prototype.getVisibleExtent = function() {
  1701. return this.visibleBounds.applyMatrix4(this.matrixWorld)
  1702. }
  1703. ,
  1704. e.prototype.pick = function(t, e, n, i) {
  1705. return void 0 === i && (i = {}),
  1706. this.picker = this.picker || new lt,
  1707. this.picker.pick(t, e, n, [this], i)
  1708. }
  1709. ,
  1710. Object.defineProperty(e.prototype, "progress", {
  1711. get: function() {
  1712. return 0 === this.visibleGeometry.length ? 0 : this.visibleNodes.length / this.visibleGeometry.length
  1713. },
  1714. enumerable: !0,
  1715. configurable: !0
  1716. }),
  1717. e
  1718. }(dt)
  1719. , ht = document.createElement("canvas").getContext("webgl")
  1720. , gt = {
  1721. SHADER_INTERPOLATION: vt("EXT_frag_depth") && mt(8),
  1722. SHADER_SPLATS: vt("EXT_frag_depth") && vt("OES_texture_float") && mt(8),
  1723. SHADER_EDL: vt("OES_texture_float") && mt(8),
  1724. precision: function() {
  1725. if (null === ht)
  1726. return "";
  1727. var t = ht.getShaderPrecisionFormat(ht.VERTEX_SHADER, ht.HIGH_FLOAT)
  1728. , e = ht.getShaderPrecisionFormat(ht.VERTEX_SHADER, ht.MEDIUM_FLOAT)
  1729. , n = ht.getShaderPrecisionFormat(ht.FRAGMENT_SHADER, ht.HIGH_FLOAT)
  1730. , i = ht.getShaderPrecisionFormat(ht.FRAGMENT_SHADER, ht.MEDIUM_FLOAT)
  1731. , o = t && n && t.precision > 0 && n.precision > 0
  1732. , r = e && i && e.precision > 0 && i.precision > 0;
  1733. return o ? "highp" : r ? "mediump" : "lowp"
  1734. }()
  1735. };
  1736. function vt(t) {
  1737. return null !== ht && Boolean(ht.getExtension(t))
  1738. }
  1739. function mt(t) {
  1740. return null !== ht && ht.getParameter(ht.MAX_VARYING_VECTORS) >= t
  1741. }
  1742. var yt = function() {
  1743. function t(t) {
  1744. this.versionMinor = 0,
  1745. this.version = t;
  1746. var e = -1 === t.indexOf(".") ? t.length : t.indexOf(".");
  1747. this.versionMajor = parseInt(t.substr(0, e), 10),
  1748. this.versionMinor = parseInt(t.substr(e + 1), 10),
  1749. isNaN(this.versionMinor) && (this.versionMinor = 0)
  1750. }
  1751. return t.prototype.newerThan = function(e) {
  1752. var n = new t(e);
  1753. return this.versionMajor > n.versionMajor || this.versionMajor === n.versionMajor && this.versionMinor > n.versionMinor
  1754. }
  1755. ,
  1756. t.prototype.equalOrHigher = function(e) {
  1757. var n = new t(e);
  1758. return this.versionMajor > n.versionMajor || this.versionMajor === n.versionMajor && this.versionMinor >= n.versionMinor
  1759. }
  1760. ,
  1761. t.prototype.upTo = function(t) {
  1762. return !this.newerThan(t)
  1763. }
  1764. ,
  1765. t
  1766. }()
  1767. , bt = function() {
  1768. function t(t) {
  1769. var e = t.getUrl
  1770. , n = void 0 === e ? function(t) {
  1771. return Promise.resolve(t)
  1772. }
  1773. : e
  1774. , i = t.version
  1775. , o = t.boundingBox
  1776. , r = t.scale
  1777. , a = t.xhrRequest;
  1778. this.disposed = !1,
  1779. this.workers = [],
  1780. this.version = "string" == typeof i ? new yt(i) : i,
  1781. this.xhrRequest = a,
  1782. this.getUrl = n,
  1783. this.boundingBox = o,
  1784. this.scale = r,
  1785. this.callbacks = []
  1786. }
  1787. return t.prototype.dispose = function() {
  1788. this.workers.forEach((function(t) {
  1789. return t.terminate()
  1790. }
  1791. )),
  1792. this.workers = [],
  1793. this.disposed = !0
  1794. }
  1795. ,
  1796. t.prototype.load = function(t) {
  1797. var e = this;
  1798. return t.loaded || this.disposed ? Promise.resolve() : Promise.resolve(this.getUrl(this.getNodeUrl(t))).then((function(t) {
  1799. return e.xhrRequest(t, {
  1800. mode: "cors"
  1801. })
  1802. }
  1803. )).then((function(t) {
  1804. return t.arrayBuffer()
  1805. }
  1806. )).then((function(n) {
  1807. return new Promise((function(i) {
  1808. return e.parse(t, n, i)
  1809. }
  1810. ))
  1811. }
  1812. ))
  1813. }
  1814. ,
  1815. t.prototype.getNodeUrl = function(t) {
  1816. var e = t.getUrl();
  1817. return this.version.equalOrHigher("1.4") && (e += ".bin"),
  1818. e
  1819. }
  1820. ,
  1821. t.prototype.parse = function(t, e, n) {
  1822. var i = this;
  1823. if (this.disposed)
  1824. n();
  1825. else {
  1826. var o = this.getWorker()
  1827. , r = t.pcoGeometry.pointAttributes
  1828. , a = e.byteLength / r.byteSize;
  1829. this.version.upTo("1.5") && (t.numPoints = a),
  1830. o.onmessage = function(e) {
  1831. if (i.disposed)
  1832. n();
  1833. else {
  1834. var r = e.data
  1835. , s = t.geometry = t.geometry || new f.BufferGeometry;
  1836. s.boundingBox = t.boundingBox,
  1837. i.addBufferAttributes(s, r.attributeBuffers),
  1838. i.addIndices(s, r.indices),
  1839. i.addNormalAttribute(s, a),
  1840. t.mean = (new f.Vector3).fromArray(r.mean),
  1841. t.tightBoundingBox = i.getTightBoundingBox(r.tightBoundingBox),
  1842. t.loaded = !0,
  1843. t.loading = !1,
  1844. t.failed = !1,
  1845. t.pcoGeometry.numNodesLoading--,
  1846. t.pcoGeometry.needsUpdate = !0,
  1847. i.releaseWorker(o),
  1848. i.callbacks.forEach((function(e) {
  1849. return e(t)
  1850. }
  1851. )),
  1852. n()
  1853. }
  1854. }
  1855. ;
  1856. var s = {
  1857. buffer: e,
  1858. pointAttributes: r,
  1859. version: this.version.version,
  1860. min: t.boundingBox.min.toArray(),
  1861. offset: t.pcoGeometry.offset.toArray(),
  1862. scale: this.scale,
  1863. spacing: t.spacing,
  1864. hasChildren: t.hasChildren
  1865. };
  1866. o.postMessage(s, [s.buffer])
  1867. }
  1868. }
  1869. ,
  1870. t.prototype.getWorker = function() {
  1871. return this.workers.pop() || new (n(6))
  1872. }
  1873. ,
  1874. t.prototype.releaseWorker = function(t) {
  1875. this.workers.push(t)
  1876. }
  1877. ,
  1878. t.prototype.getTightBoundingBox = function(t) {
  1879. var e = t.min
  1880. , n = t.max
  1881. , i = new f.Box3((new f.Vector3).fromArray(e),(new f.Vector3).fromArray(n));
  1882. return i.max.sub(i.min),
  1883. i.min.set(0, 0, 0),
  1884. i
  1885. }
  1886. ,
  1887. t.prototype.addBufferAttributes = function(t, e) {
  1888. var n = this;
  1889. Object.keys(e).forEach((function(i) {
  1890. var o = e[i].buffer;
  1891. n.isAttribute(i, L.POSITION_CARTESIAN) ? t.setAttribute("position", new f.BufferAttribute(new Float32Array(o),3)) : n.isAttribute(i, L.COLOR_PACKED) ? t.setAttribute("color", new f.BufferAttribute(new Uint8Array(o),3,!0)) : n.isAttribute(i, L.INTENSITY) ? t.setAttribute("intensity", new f.BufferAttribute(new Float32Array(o),1)) : n.isAttribute(i, L.CLASSIFICATION) ? t.setAttribute("classification", new f.BufferAttribute(new Uint8Array(o),1)) : (n.isAttribute(i, L.NORMAL_SPHEREMAPPED) || n.isAttribute(i, L.NORMAL_OCT16) || n.isAttribute(i, L.NORMAL)) && t.setAttribute("normal", new f.BufferAttribute(new Float32Array(o),3))
  1892. }
  1893. ))
  1894. }
  1895. ,
  1896. t.prototype.addIndices = function(t, e) {
  1897. var n = new f.Uint8BufferAttribute(e,4);
  1898. n.normalized = !0,
  1899. t.setAttribute("indices", n)
  1900. }
  1901. ,
  1902. t.prototype.addNormalAttribute = function(t, e) {
  1903. if (!t.getAttribute("normal")) {
  1904. var n = new Float32Array(3 * e);
  1905. t.setAttribute("normal", new f.BufferAttribute(new Float32Array(n),3))
  1906. }
  1907. }
  1908. ,
  1909. t.prototype.isAttribute = function(t, e) {
  1910. return parseInt(t, 10) === e
  1911. }
  1912. ,
  1913. t
  1914. }();
  1915. function _t(t) {
  1916. return null != t && t.isGeometryNode
  1917. }
  1918. function xt(t) {
  1919. return null != t && t.isTreeNode
  1920. }
  1921. var At = n(1)
  1922. , wt = function() {
  1923. var t = function(e, n) {
  1924. return (t = Object.setPrototypeOf || {
  1925. __proto__: []
  1926. }instanceof Array && function(t, e) {
  1927. t.__proto__ = e
  1928. }
  1929. || function(t, e) {
  1930. for (var n in e)
  1931. e.hasOwnProperty(n) && (t[n] = e[n])
  1932. }
  1933. )(e, n)
  1934. };
  1935. return function(e, n) {
  1936. function i() {
  1937. this.constructor = e
  1938. }
  1939. t(e, n),
  1940. e.prototype = null === n ? Object.create(n) : (i.prototype = n.prototype,
  1941. new i)
  1942. }
  1943. }()
  1944. , Tt = function(t) {
  1945. function e(e, n) {
  1946. void 0 === n && (n = new f.Color(16776960));
  1947. var i = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7])
  1948. , o = new Float32Array([e.min.x, e.min.y, e.min.z, e.max.x, e.min.y, e.min.z, e.max.x, e.min.y, e.max.z, e.min.x, e.min.y, e.max.z, e.min.x, e.max.y, e.min.z, e.max.x, e.max.y, e.min.z, e.max.x, e.max.y, e.max.z, e.min.x, e.max.y, e.max.z])
  1949. , r = new f.BufferGeometry;
  1950. r.setIndex(new f.BufferAttribute(i,1)),
  1951. r.setAttribute("position", new f.BufferAttribute(o,3));
  1952. var a = new f.LineBasicMaterial({
  1953. color: n
  1954. });
  1955. return t.call(this, r, a) || this
  1956. }
  1957. return wt(e, t),
  1958. e
  1959. }(f.LineSegments)
  1960. , Ot = function(t) {
  1961. this.node = t,
  1962. this.next = null,
  1963. this.previous = null
  1964. }
  1965. , Nt = function() {
  1966. function t(t) {
  1967. void 0 === t && (t = 1e6),
  1968. this.pointBudget = t,
  1969. this.first = null,
  1970. this.last = null,
  1971. this.numPoints = 0,
  1972. this.items = new Map
  1973. }
  1974. return Object.defineProperty(t.prototype, "size", {
  1975. get: function() {
  1976. return this.items.size
  1977. },
  1978. enumerable: !0,
  1979. configurable: !0
  1980. }),
  1981. t.prototype.has = function(t) {
  1982. return this.items.has(t.id)
  1983. }
  1984. ,
  1985. t.prototype.touch = function(t) {
  1986. if (t.loaded) {
  1987. var e = this.items.get(t.id);
  1988. e ? this.touchExisting(e) : this.addNew(t)
  1989. }
  1990. }
  1991. ,
  1992. t.prototype.addNew = function(t) {
  1993. var e = new Ot(t);
  1994. e.previous = this.last,
  1995. this.last = e,
  1996. e.previous && (e.previous.next = e),
  1997. this.first || (this.first = e),
  1998. this.items.set(t.id, e),
  1999. this.numPoints += t.numPoints
  2000. }
  2001. ,
  2002. t.prototype.touchExisting = function(t) {
  2003. t.previous ? t.next && (t.previous.next = t.next,
  2004. t.next.previous = t.previous,
  2005. t.previous = this.last,
  2006. t.next = null,
  2007. this.last = t,
  2008. t.previous && (t.previous.next = t)) : t.next && (this.first = t.next,
  2009. this.first.previous = null,
  2010. t.previous = this.last,
  2011. t.next = null,
  2012. this.last = t,
  2013. t.previous && (t.previous.next = t))
  2014. }
  2015. ,
  2016. t.prototype.remove = function(t) {
  2017. var e = this.items.get(t.id);
  2018. e && (1 === this.items.size ? (this.first = null,
  2019. this.last = null) : (e.previous || (this.first = e.next,
  2020. this.first.previous = null),
  2021. e.next || (this.last = e.previous,
  2022. this.last.next = null),
  2023. e.previous && e.next && (e.previous.next = e.next,
  2024. e.next.previous = e.previous)),
  2025. this.items.delete(t.id),
  2026. this.numPoints -= t.numPoints)
  2027. }
  2028. ,
  2029. t.prototype.getLRUItem = function() {
  2030. return this.first ? this.first.node : void 0
  2031. }
  2032. ,
  2033. t.prototype.freeMemory = function() {
  2034. if (!(this.items.size <= 1))
  2035. for (; this.numPoints > 2 * this.pointBudget; ) {
  2036. var t = this.getLRUItem();
  2037. t && this.disposeSubtree(t)
  2038. }
  2039. }
  2040. ,
  2041. t.prototype.disposeSubtree = function(t) {
  2042. var e = [t];
  2043. t.traverse((function(t) {
  2044. t.loaded && e.push(t)
  2045. }
  2046. ));
  2047. for (var n = 0, i = e; n < i.length; n++) {
  2048. var o = i[n];
  2049. o.dispose(),
  2050. this.remove(o)
  2051. }
  2052. }
  2053. ,
  2054. t
  2055. }()
  2056. , Pt = function(t, e, n, i) {
  2057. this.pointCloudIndex = t,
  2058. this.weight = e,
  2059. this.node = n,
  2060. this.parent = i
  2061. }
  2062. , St = function() {
  2063. function t() {
  2064. var t, e, n;
  2065. this._pointBudget = 1e6,
  2066. this._rendererSize = new f.Vector2,
  2067. this.maxNumNodesLoading = 4,
  2068. this.features = gt,
  2069. this.lru = new Nt(this._pointBudget),
  2070. this.updateVisibilityStructures = (t = new f.Matrix4,
  2071. e = new f.Matrix4,
  2072. n = new f.Matrix4,
  2073. function(i, o) {
  2074. for (var r = [], a = [], s = new At.BinaryHeap((function(t) {
  2075. return 1 / t.weight
  2076. }
  2077. )), u = 0; u < i.length; u++) {
  2078. var l = i[u];
  2079. if (l.initialized()) {
  2080. l.numVisiblePoints = 0,
  2081. l.visibleNodes = [],
  2082. l.visibleGeometry = [],
  2083. o.updateMatrixWorld(!1);
  2084. var d = o.matrixWorldInverse
  2085. , p = l.matrixWorld;
  2086. if (t.identity().multiply(o.projectionMatrix).multiply(d).multiply(p),
  2087. r.push((new f.Frustum).setFromProjectionMatrix(t)),
  2088. e.getInverse(p),
  2089. n.identity().multiply(e).multiply(o.matrixWorld),
  2090. a.push((new f.Vector3).setFromMatrixPosition(n)),
  2091. l.visible && null !== l.root) {
  2092. var c = Number.MAX_VALUE;
  2093. s.push(new Pt(u,c,l.root))
  2094. }
  2095. xt(l.root) && l.hideDescendants(l.root.sceneNode);
  2096. for (var h = 0, g = l.boundingBoxNodes; h < g.length; h++)
  2097. g[h].visible = !1
  2098. }
  2099. }
  2100. return {
  2101. frustums: r,
  2102. cameraPositions: a,
  2103. priorityQueue: s
  2104. }
  2105. }
  2106. )
  2107. }
  2108. return t.prototype.loadPointCloud = function(t, e, n) {
  2109. var i = this;
  2110. return void 0 === n && (n = function(t, e) {
  2111. return fetch(t, e)
  2112. }
  2113. ),
  2114. function(t, e, n) {
  2115. return Promise.resolve(e(t)).then((function(t) {
  2116. return n(t, {
  2117. mode: "cors"
  2118. }).then((function(t) {
  2119. return t.json()
  2120. }
  2121. )).then(function(t, e, n) {
  2122. return function(i) {
  2123. var o = function(t) {
  2124. var e = new f.Vector3(t.boundingBox.lx,t.boundingBox.ly,t.boundingBox.lz)
  2125. , n = new f.Vector3(t.boundingBox.ux,t.boundingBox.uy,t.boundingBox.uz)
  2126. , i = new f.Box3(e,n)
  2127. , o = i.clone()
  2128. , r = e.clone();
  2129. if (t.tightBoundingBox) {
  2130. var a = t.tightBoundingBox
  2131. , s = a.lx
  2132. , u = a.ly
  2133. , l = a.lz
  2134. , d = a.ux
  2135. , p = a.uy
  2136. , c = a.uz;
  2137. o.min.set(s, u, l),
  2138. o.max.set(d, p, c)
  2139. }
  2140. return i.min.sub(r),
  2141. i.max.sub(r),
  2142. o.min.sub(r),
  2143. o.max.sub(r),
  2144. {
  2145. offset: r,
  2146. boundingBox: i,
  2147. tightBoundingBox: o
  2148. }
  2149. }(i)
  2150. , r = o.offset
  2151. , a = o.boundingBox
  2152. , s = o.tightBoundingBox
  2153. , u = new bt({
  2154. getUrl: e,
  2155. version: i.version,
  2156. boundingBox: a,
  2157. scale: i.scale,
  2158. xhrRequest: n
  2159. })
  2160. , l = new rt(u,a,s,r,n);
  2161. l.url = t,
  2162. l.octreeDir = i.octreeDir,
  2163. l.needsUpdate = !0,
  2164. l.spacing = i.spacing,
  2165. l.hierarchyStepSize = i.hierarchyStepSize;
  2166. l.projection = i.projection,
  2167. l.offset = r,
  2168. l.pointAttributes = new Z(i.pointAttributes);
  2169. var d = {}
  2170. , p = new yt(i.version);
  2171. return function(t, e, n, i) {
  2172. var o = new ot("r",t,t.boundingBox);
  2173. return o.hasChildren = !0,
  2174. o.spacing = t.spacing,
  2175. i.upTo("1.5") ? o.numPoints = e.hierarchy[0][1] : o.numPoints = 0,
  2176. t.root = o,
  2177. n.r = o,
  2178. t.root.load()
  2179. }(l, i, d, p).then((function() {
  2180. return p.upTo("1.4") && function(t, e, n) {
  2181. for (var i = 1; i < e.hierarchy.length; i++) {
  2182. var o = e.hierarchy[i]
  2183. , r = o[0]
  2184. , a = o[1]
  2185. , s = {
  2186. index: g(c = r),
  2187. parentName: c.substring(0, c.length - 1),
  2188. level: c.length - 1
  2189. }
  2190. , u = s.index
  2191. , l = s.level
  2192. , f = n[s.parentName]
  2193. , d = nt(f.boundingBox, u)
  2194. , p = new ot(r,t,d);
  2195. p.level = l,
  2196. p.numPoints = a,
  2197. p.spacing = t.spacing / Math.pow(2, p.level),
  2198. n[r] = p,
  2199. f.addChild(p)
  2200. }
  2201. var c
  2202. }(l, i, d),
  2203. l.nodes = d,
  2204. l
  2205. }
  2206. ))
  2207. }
  2208. }(t, e, n))
  2209. }
  2210. ))
  2211. }(t, e, n).then((function(t) {
  2212. return new ct(i,t)
  2213. }
  2214. ))
  2215. }
  2216. ,
  2217. t.prototype.updatePointClouds = function(t, e, n) {
  2218. for (var i = this.updateVisibility(t, e, n), o = 0; o < t.length; o++) {
  2219. var r = t[o];
  2220. r.disposed || (r.material.updateMaterial(r, r.visibleNodes, e, n),
  2221. r.updateVisibleBounds(),
  2222. r.updateBoundingBoxes())
  2223. }
  2224. return this.lru.freeMemory(),
  2225. i
  2226. }
  2227. ,
  2228. t.pick = function(e, n, i, o, r) {
  2229. return void 0 === r && (r = {}),
  2230. t.picker = t.picker || new lt,
  2231. t.picker.pick(n, i, o, e, r)
  2232. }
  2233. ,
  2234. Object.defineProperty(t.prototype, "pointBudget", {
  2235. get: function() {
  2236. return this._pointBudget
  2237. },
  2238. set: function(t) {
  2239. t !== this._pointBudget && (this._pointBudget = t,
  2240. this.lru.pointBudget = t,
  2241. this.lru.freeMemory())
  2242. },
  2243. enumerable: !0,
  2244. configurable: !0
  2245. }),
  2246. t.prototype.updateVisibility = function(t, e, n) {
  2247. for (var i, o = 0, r = [], a = [], s = this.updateVisibilityStructures(t, e), u = s.frustums, l = s.cameraPositions, f = s.priorityQueue, d = 0, p = !1, c = !1; void 0 !== (i = f.pop()); ) {
  2248. var h = i.node;
  2249. if (o + h.numPoints > this.pointBudget)
  2250. break;
  2251. var g = i.pointCloudIndex
  2252. , v = t[g]
  2253. , m = void 0 !== v.maxLevel ? v.maxLevel : 1 / 0;
  2254. if (!(h.level > m || !u[g].intersectsBox(h.boundingBox) || this.shouldClip(v, h.boundingBox))) {
  2255. o += h.numPoints,
  2256. v.numVisiblePoints += h.numPoints;
  2257. var y = i.parent;
  2258. if (_t(h) && (!y || xt(y)))
  2259. if (h.loaded && d < 2)
  2260. h = v.toTreeNode(h, y),
  2261. d++;
  2262. else {
  2263. if (h.failed) {
  2264. c = !0;
  2265. continue
  2266. }
  2267. h.loaded && d >= 2 && (p = !0),
  2268. a.push(h),
  2269. v.visibleGeometry.push(h)
  2270. }
  2271. xt(h) && (this.updateTreeNodeVisibility(v, h, r),
  2272. v.visibleGeometry.push(h.geometryNode));
  2273. var b = .5 * n.getSize(this._rendererSize).height * n.getPixelRatio();
  2274. this.updateChildVisibility(i, f, v, h, l[g], e, b)
  2275. }
  2276. }
  2277. for (var _ = Math.min(this.maxNumNodesLoading, a.length), x = [], A = 0; A < _; A++)
  2278. x.push(a[A].load());
  2279. return {
  2280. visibleNodes: r,
  2281. numVisiblePoints: o,
  2282. exceededMaxLoadsToGPU: p,
  2283. nodeLoadFailed: c,
  2284. nodeLoadPromises: x
  2285. }
  2286. }
  2287. ,
  2288. t.prototype.updateTreeNodeVisibility = function(t, e, n) {
  2289. this.lru.touch(e.geometryNode);
  2290. var i = e.sceneNode;
  2291. i.visible = !0,
  2292. i.material = t.material,
  2293. i.updateMatrix(),
  2294. i.matrixWorld.multiplyMatrices(t.matrixWorld, i.matrix),
  2295. n.push(e),
  2296. t.visibleNodes.push(e),
  2297. this.updateBoundingBoxVisibility(t, e)
  2298. }
  2299. ,
  2300. t.prototype.updateChildVisibility = function(t, e, n, i, o, r, a) {
  2301. for (var s = i.children, u = 0; u < s.length; u++) {
  2302. var l = s[u];
  2303. if (null !== l) {
  2304. var f = l.boundingSphere
  2305. , d = f.center.distanceTo(o)
  2306. , p = f.radius
  2307. , c = 0;
  2308. if ("PerspectiveCamera" === r.type) {
  2309. var h = r.fov * Math.PI / 180;
  2310. c = a / (Math.tan(h / 2) * d)
  2311. } else {
  2312. var g = r;
  2313. c = 2 * a / (g.top - g.bottom)
  2314. }
  2315. var v = p * c;
  2316. if (!(v < n.minNodePixelSize)) {
  2317. var m = d < p ? Number.MAX_VALUE : v + 1 / d;
  2318. e.push(new Pt(t.pointCloudIndex,m,l,i))
  2319. }
  2320. }
  2321. }
  2322. }
  2323. ,
  2324. t.prototype.updateBoundingBoxVisibility = function(t, e) {
  2325. if (t.showBoundingBox && !e.boundingBoxNode) {
  2326. var n = new Tt(e.boundingBox);
  2327. n.matrixAutoUpdate = !1,
  2328. t.boundingBoxNodes.push(n),
  2329. e.boundingBoxNode = n,
  2330. e.boundingBoxNode.matrix.copy(t.matrixWorld)
  2331. } else
  2332. t.showBoundingBox && e.boundingBoxNode ? (e.boundingBoxNode.visible = !0,
  2333. e.boundingBoxNode.matrix.copy(t.matrixWorld)) : !t.showBoundingBox && e.boundingBoxNode && (e.boundingBoxNode.visible = !1)
  2334. }
  2335. ,
  2336. t.prototype.shouldClip = function(t, e) {
  2337. var n = t.material;
  2338. if (0 === n.numClipBoxes || n.clipMode !== o.CLIP_OUTSIDE)
  2339. return !1;
  2340. var i = e.clone();
  2341. t.updateMatrixWorld(!0),
  2342. i.applyMatrix4(t.matrixWorld);
  2343. for (var r = n.clipBoxes, a = 0; a < r.length; a++) {
  2344. var s = r[a].matrix
  2345. , u = new f.Box3(new f.Vector3(-.5,-.5,-.5),new f.Vector3(.5,.5,.5)).applyMatrix4(s);
  2346. if (i.intersectsBox(u))
  2347. return !1
  2348. }
  2349. return !0
  2350. }
  2351. ,
  2352. t
  2353. }();
  2354. n.d(e, "BlurMaterial", (function() {
  2355. return p
  2356. }
  2357. )),
  2358. n.d(e, "ClipMode", (function() {
  2359. return o
  2360. }
  2361. )),
  2362. n.d(e, "PointSizeType", (function() {
  2363. return r
  2364. }
  2365. )),
  2366. n.d(e, "PointShape", (function() {
  2367. return a
  2368. }
  2369. )),
  2370. n.d(e, "TreeType", (function() {
  2371. return s
  2372. }
  2373. )),
  2374. n.d(e, "PointOpacityType", (function() {
  2375. return u
  2376. }
  2377. )),
  2378. n.d(e, "PointColorType", (function() {
  2379. return l
  2380. }
  2381. )),
  2382. n.d(e, "PointCloudMaterial", (function() {
  2383. return j
  2384. }
  2385. )),
  2386. n.d(e, "generateDataTexture", (function() {
  2387. return O
  2388. }
  2389. )),
  2390. n.d(e, "generateGradientTexture", (function() {
  2391. return N
  2392. }
  2393. )),
  2394. n.d(e, "generateClassificationTexture", (function() {
  2395. return P
  2396. }
  2397. )),
  2398. n.d(e, "GRAYSCALE", (function() {
  2399. return y
  2400. }
  2401. )),
  2402. n.d(e, "INFERNO", (function() {
  2403. return b
  2404. }
  2405. )),
  2406. n.d(e, "PLASMA", (function() {
  2407. return _
  2408. }
  2409. )),
  2410. n.d(e, "RAINBOW", (function() {
  2411. return x
  2412. }
  2413. )),
  2414. n.d(e, "SPECTRAL", (function() {
  2415. return A
  2416. }
  2417. )),
  2418. n.d(e, "VIRIDIS", (function() {
  2419. return w
  2420. }
  2421. )),
  2422. n.d(e, "YELLOW_GREEN", (function() {
  2423. return T
  2424. }
  2425. )),
  2426. n.d(e, "PointAttributeName", (function() {
  2427. return L
  2428. }
  2429. )),
  2430. n.d(e, "POINT_ATTRIBUTE_TYPES", (function() {
  2431. return K
  2432. }
  2433. )),
  2434. n.d(e, "POINT_ATTRIBUTES", (function() {
  2435. return J
  2436. }
  2437. )),
  2438. n.d(e, "PointAttributes", (function() {
  2439. return Z
  2440. }
  2441. )),
  2442. n.d(e, "PointCloudOctreeGeometryNode", (function() {
  2443. return ot
  2444. }
  2445. )),
  2446. n.d(e, "PointCloudOctreeGeometry", (function() {
  2447. return rt
  2448. }
  2449. )),
  2450. n.d(e, "PointCloudOctreeNode", (function() {
  2451. return st
  2452. }
  2453. )),
  2454. n.d(e, "PointCloudOctreePicker", (function() {
  2455. return lt
  2456. }
  2457. )),
  2458. n.d(e, "PointCloudOctree", (function() {
  2459. return ct
  2460. }
  2461. )),
  2462. n.d(e, "PointCloudTree", (function() {
  2463. return dt
  2464. }
  2465. )),
  2466. n.d(e, "QueueItem", (function() {
  2467. return Pt
  2468. }
  2469. )),
  2470. n.d(e, "Potree", (function() {
  2471. return St
  2472. }
  2473. )),
  2474. n.d(e, "Version", (function() {
  2475. return yt
  2476. }
  2477. ))
  2478. }
  2479. ]))
  2480. }
  2481. }]);